Skip to content

Commit

Permalink
update pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
bwalsh authored and lbeckman314 committed Nov 1, 2024
1 parent 55a3dee commit 95e32d5
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 20 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.10
- name: Set up Python 3.12
id: setup-python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"

- name: Install dependencies
id: install-dependencies
Expand Down Expand Up @@ -84,7 +84,8 @@ jobs:
echo $CREDENTIALS > ~/.gen3/credentials.json
gen3-client configure --profile=CALIPER --cred=~/.gen3/credentials.json --apiendpoint="${{ inputs.endpoint }}"
gen3-client auth --profile=CALIPER
export G3T_PROFILE=CALIPER
echo "G3T_PROFILE=CALIPER" >> $GITHUB_ENV
g3t ping
- name: Create Project
Expand All @@ -98,6 +99,7 @@ jobs:
export PROJECT="${{ inputs.program }}-integration_test_$RANDOM"
mkdir $PROJECT
cd $PROJECT
g3t init $PROJECT
g3t collaborator approve --all
Expand Down Expand Up @@ -133,6 +135,7 @@ jobs:
source ~/.bash_profile
cd $PROJECT
g3t push
END=$(date +%s)
Expand All @@ -146,6 +149,7 @@ jobs:
source ~/.bash_profile
mkdir download-test
cd download-test
g3t clone $PROJECT
cd $PROJECT
g3t pull
Expand Down
29 changes: 16 additions & 13 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,39 @@ on:
workflow_dispatch: # Allow manual triggering of the workflow

jobs:
cbds:
with:
environment: cbds
endpoint: "https://idp.cbds.ohsu.edu"
# Self-hosted runner to access https://idp.cbds.ohsu.edu
# https://github.com/ACED-IDP/gen3_util/settings/actions/runners/21
# https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-a-repository
runs-on: self-hosted
program: cbds
secrets:
CREDENTIALS: ${{ secrets.CREDENTIALS }}
uses: ./.github/workflows/integration.yaml

production:
with:
environment: production
endpoint: https://aced-idp.org
endpoint: "https://aced-idp.org"
secrets:
CREDENTIALS: ${{ secrets.CREDENTIALS }}
uses: ./.github/workflows/integration.yaml

staging:
with:
environment: staging
endpoint: https://staging.aced-idp.org
endpoint: "https://staging.aced-idp.org"
secrets:
CREDENTIALS: ${{ secrets.CREDENTIALS }}
uses: ./.github/workflows/integration.yaml

development:
with:
environment: development
endpoint: https://development.aced-idp.org
secrets:
CREDENTIALS: ${{ secrets.CREDENTIALS }}
uses: ./.github/workflows/integration.yaml

cbds:
with:
environment: cbds
endpoint: https://idp.cbds.ohsu.edu
runs-on: self-hosted
program: cbds
endpoint: "https://development.aced-idp.org"
secrets:
CREDENTIALS: ${{ secrets.CREDENTIALS }}
uses: ./.github/workflows/integration.yaml
42 changes: 39 additions & 3 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,58 @@ on:

jobs:
pytest:
runs-on: ubuntu-latest
# We're testing 'cbds' by default so we can use the self-hosted runner to access htps://idp.cbds.ohsu.edu
# https://github.com/ACED-IDP/gen3_util/settings/actions/runners/21
# https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-a-repository
environment: cbds
runs-on: self-hosted
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.12"

- name: Install gen3-client
id: install-gen3-client
run: |
wget https://github.com/ACED-IDP/cdis-data-client/releases/latest/download/gen3-client-linux-amd64.zip
unzip gen3-client-linux-amd64.zip
mkdir -p ~/.gen3
mv gen3-client ~/.gen3/gen3-client
echo 'export PATH=$PATH:~/.gen3' >> ~/.bash_profile
source ~/.bash_profile
gen3-client
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .
- name: Configure gen3-client
id: configure-gen3-client
env:
CREDENTIALS: ${{ secrets.CREDENTIALS }}
run: |
source ~/.bash_profile
echo $CREDENTIALS > ~/.gen3/credentials.json
# Hardcoding the endpoint for now
# TODO: Should we make this configurable to run `pytest` against all Gen3 instances?
export ENDPOINT="https://idp.cbds.ohsu.edu"
gen3-client configure --profile=CALIPER --cred=~/.gen3/credentials.json --apiendpoint="$ENDPOINT"
export G3T_PROFILE=CALIPER
echo "G3T_PROFILE=CALIPER" >> $GITHUB_ENV
g3t ping
# A 'local' profile appears to be required for the `pytest` tests
# So we just "duplicate" the existing 'CALIPER' profile
gen3-client configure --profile=local --cred=~/.gen3/credentials.json --apiendpoint="$ENDPOINT"
- name: Pytest
run: |
pytest tests/ --cov=gen3_util
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name='gen3_tracker',
version='0.0.5rc8',
version='0.0.6',
description='A CLI for adding version control to Gen3 data submission projects.',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit 95e32d5

Please sign in to comment.