Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
308 commits
Select commit Hold shift + click to select a range
ffebffc
added dug data path to roger config
muralikarthikk Feb 17, 2021
a8067c7
update Dockerfile
muralikarthikk Feb 17, 2021
aec1604
reads redis params from config.
YaphetKG Feb 17, 2021
95e540d
switiching branch for installation to test
YaphetKG Feb 17, 2021
dd01d6b
Merge branch 'roger-dug' of https://github.com/helxplatform/roger int…
Feb 17, 2021
0493393
KGX generation overhaul, and some structring to file based outputs
YaphetKG Feb 18, 2021
5cfcfdc
Some comments and config overhaul for dag
YaphetKG Feb 18, 2021
5822c93
removing redis
YaphetKG Feb 18, 2021
2e10eeb
logstream
YaphetKG Feb 18, 2021
bb2d949
few mods for testing
YaphetKG Feb 19, 2021
8ab5549
few mods for testing
YaphetKG Feb 19, 2021
ba0002a
removing create redis call
YaphetKG Feb 19, 2021
9eb9ab8
annotate final tree
YaphetKG Feb 19, 2021
a15f42a
Dir structuring
YaphetKG Feb 19, 2021
fd75189
Merge pull request #4 from helxplatform/consolidated-helm
YaphetKG Feb 19, 2021
6213fe6
Merge branch 'develop' into roger-dug-extension
Feb 19, 2021
f24151d
Merge pull request #5 from helxplatform/roger-dug-extension
YaphetKG Feb 22, 2021
0acae01
change helm values to point to develop branch
YaphetKG Feb 22, 2021
df99f20
git ignore boiler plate for python projects
YaphetKG Feb 22, 2021
aa305d9
Merge pull request #6 from helxplatform/roger-dug-extension
YaphetKG Feb 22, 2021
32e0aef
Indexing and integration (#9)
YaphetKG Mar 5, 2021
02bd4cb
Config overhaul (#10)
YaphetKG Mar 10, 2021
30e2f46
fixes requirments around bmt and biolink-model, requests (#11)
YaphetKG Mar 19, 2021
4f9a3a3
Re integration dug (#12)
YaphetKG Mar 19, 2021
21e376b
Indexing and validation, adds validation , reincorporates dug index v…
YaphetKG Mar 23, 2021
4eb43c9
bumps dug req to new build off of dug's trapi-1.0-revamp branch (#14)
YaphetKG Mar 24, 2021
afce1ee
fixing knowledge_graph typo in dug build
YaphetKG Mar 24, 2021
8a3ca88
bumps dug to new build that adds publications array to kg edges.
YaphetKG Mar 25, 2021
ae63dcd
Crawl tranql (#15)
YaphetKG Mar 25, 2021
1dc1e9f
predicate type and defaulting ID as name for nodes in dug
YaphetKG Mar 25, 2021
28c3a38
Feature/makefiles and cli (#17)
YaphetKG Apr 8, 2021
0e3af5d
Enabling docker compose for local development
Apr 19, 2021
82f4d1e
Improving Makefile to bring up stack more easily
Apr 20, 2021
0fc3bea
Makefile now runs tests
Apr 20, 2021
6b54caa
Merge branch 'develop' of github.com:helxplatform/roger into feature/…
Apr 20, 2021
857c0a3
Adding pytest to requirements. Putting mock definitions in conftest
Apr 20, 2021
5d6b51c
Jenkinsfile. Skipping tests that aren't working yet
Apr 20, 2021
cf6b446
Unzip dbgap and index, no kgx for dbgap yet (#19)
YaphetKG Apr 23, 2021
949b11e
Update requirements.txt
YaphetKG Apr 23, 2021
9f7b6a9
Update core.py
YaphetKG Apr 23, 2021
0dad376
moving dag_util to roger module
Apr 26, 2021
11fd441
Bumping version
Apr 26, 2021
14268a4
Merge branch 'develop' of github.com:helxplatform/roger into feature/…
Apr 26, 2021
c98bb46
input files path
Apr 26, 2021
6bca3d9
Logging line numbers
Apr 26, 2021
38b2bce
Logging to find exceptions
Apr 26, 2021
5392a11
More logging
Apr 26, 2021
23d6e26
Adding ability to configure data output dir via env var
Apr 27, 2021
a1f7451
Error handling and logging for db gap files
Apr 27, 2021
e02c2b8
Redis config from env vars
Apr 27, 2021
56ea0ec
tranql connection info from env vars
Apr 27, 2021
e715f74
redis graph variables
Apr 27, 2021
9ec48f8
db_gap file pathing issue
Apr 27, 2021
6c125a4
annotate files can handle plugins correctly
Apr 27, 2021
ac6405a
parser call
Apr 27, 2021
d0995f2
Merge pull request #20 from helxplatform/release/0.1.0
cschreep Apr 28, 2021
1a43cc8
Redis configs in validate
Apr 28, 2021
39db13e
Pulling tranql endpoint from environment
May 6, 2021
0b01948
Adding Configuration classes, integrating Dug changes
May 10, 2021
09b6a76
Removing some debug statements. Fixing test
May 11, 2021
0169dea
Pinning dug dependency
May 17, 2021
836151a
Merge pull request #21 from helxplatform/feature/cicd-improvements
cschreep May 17, 2021
6d239c9
Adding unit tests to make test target
May 24, 2021
72115eb
Feature/dbgap data dicts (#18)
YaphetKG May 26, 2021
fd656b8
Updating dag to fetch data from network rather than expect it on disk
Jun 2, 2021
2a675ca
Jenkinsfile
Jun 2, 2021
c67b940
Merge branch 'develop' into feature/network-data-sources
Jun 2, 2021
6c050cd
Merge pull request #22 from helxplatform/feature/network-data-sources
cschreep Jun 8, 2021
de63cbe
Updating dug dependency to 2.2.0
Jun 10, 2021
4a9a9fc
Merge pull request #23 from helxplatform/feature/update-dug
cschreep Jun 10, 2021
38310f7
Volume name
Jun 11, 2021
45d96c5
Commenting out volume mounts
Jun 11, 2021
2992900
return values for file fetch
Jun 11, 2021
822349d
normalizer service endpoint
Jun 11, 2021
aec664f
Merge pull request #24 from helxplatform/fix/pvc-name
cschreep Jun 22, 2021
ca4fd94
Fix/indexing concepts tweak (#25)
YaphetKG Jun 24, 2021
825e96f
reverts download url (#26)
YaphetKG Jun 25, 2021
40d3678
Feature/new kgx files (#27)
YaphetKG Jun 28, 2021
adfe98f
Bumping version
Jul 8, 2021
1b221f8
Bumping version
Jul 8, 2021
c934704
Merge pull request #28 from helxplatform/release/0.3.0
cschreep Jul 8, 2021
9f7fd0c
Bumping version
Jul 8, 2021
7544ed8
Updating dug dependency to 2.3.0
Jul 12, 2021
c0b16fc
Merge pull request #29 from helxplatform/feature/dug-2.3
cschreep Jul 12, 2021
2988cf9
upgrade airflow to 2.1.2
warrenstephens Jul 22, 2021
c828c2f
upgrade airflow to 2.1.2 in requirements.txt
warrenstephens Jul 22, 2021
e918b3a
change 1 for nida and logging
warrenstephens Jul 23, 2021
f561d52
change 2: fix dag
warrenstephens Jul 23, 2021
6327483
change 3: fix dummies
warrenstephens Jul 23, 2021
db6d7e3
change 4: fix continues
warrenstephens Jul 23, 2021
c700cfe
5: straighten dag
warrenstephens Jul 23, 2021
d2d7058
6: two paths
warrenstephens Jul 23, 2021
e60c371
7: no list for paths
warrenstephens Jul 23, 2021
c4631a7
8: new arrangement
warrenstephens Jul 23, 2021
5ab97ae
9: parallel arrangement
warrenstephens Jul 23, 2021
7c9d73d
10: add debug output
warrenstephens Jul 23, 2021
c28dd6d
dug mod for debug
warrenstephens Jul 23, 2021
f058e11
dug fix for identifier response errors
warrenstephens Jul 26, 2021
f8a8765
dag logging test
warrenstephens Jul 26, 2021
8a8679a
only kwargs
warrenstephens Jul 26, 2021
4d17417
log level investigation
warrenstephens Jul 26, 2021
517eb76
cleanup
warrenstephens Jul 26, 2021
0978a6f
retry pythonoperator
warrenstephens Jul 26, 2021
2f43a47
add extra log
warrenstephens Jul 26, 2021
a011155
no op_kwargs
warrenstephens Jul 26, 2021
99d1e77
switch python operator style
warrenstephens Jul 26, 2021
0e23743
remove tlogger
warrenstephens Jul 26, 2021
ec31b66
remove python operator stuff again
warrenstephens Jul 26, 2021
b62166d
cleanup log experiments
warrenstephens Jul 29, 2021
7767cc5
revert version.py
warrenstephens Jul 29, 2021
a754f6f
adding support multi-tenancy of datasets
YaphetKG Aug 4, 2021
c3aaeee
fix tests
Aug 16, 2021
d3e10a2
Merge pull request #30 from helxplatform/feature/nidaW1
cschreep Aug 18, 2021
c934a22
Bumping version
Aug 18, 2021
b80a4b5
Pinning Dug dep
Aug 18, 2021
b6d4df3
Merge branch 'main' into release/0.4
cschreep Aug 18, 2021
9c11508
Merge branch 'develop' of github.com:helxplatform/roger into release/0.4
Aug 18, 2021
0bb8369
Merge branch 'release/0.4' of github.com:helxplatform/roger into rele…
Aug 18, 2021
bc05dd5
Fixing dug version pin
Aug 18, 2021
fff510c
Pinning Dug to released version
Aug 19, 2021
5202aae
Merge pull request #31 from helxplatform/release/0.4
cschreep Aug 19, 2021
c3a1539
Bumping version
Aug 19, 2021
0564c84
Bumping version
Aug 19, 2021
40afc5e
Feature/biolink 2.1 (#34)
YaphetKG Sep 20, 2021
adc3c5a
Bumping version
Sep 21, 2021
bfcdb15
Merge pull request #36 from helxplatform/release/0.5
cschreep Sep 21, 2021
e02ccbf
Bumping version
Sep 21, 2021
0557870
Bumping version
Sep 21, 2021
418ad35
Updating Jenkinsfil to publish tags
Sep 28, 2021
9f25a9c
Merge pull request #37 from helxplatform/feature/jenkins-publish
cschreep Sep 28, 2021
4f78734
Add podTemplate to Jenkinsfile and enclose body of each step in conta…
cnbennett3 Oct 7, 2021
8f4e4ed
Merge pull request #39 from helxplatform/jenkinsfile_podtemplate_update
cnbennett3 Oct 7, 2021
fc5f9ac
Feature/caching overhaul (#38)
YaphetKG Oct 8, 2021
f978cee
Adding S3 Utils and Config classes. Implementing S3 to fetch data fro…
Oct 12, 2021
347e0e4
Fixing import; updating requirements
Oct 13, 2021
d9c6edd
Import paths and module name
Oct 13, 2021
1d3287e
Import path
Oct 13, 2021
4b30c52
Marking file load tests as skipped until we can safely store S3
Oct 14, 2021
6229335
nida parsing changes and concurrent downloading for files
warrenstephens Sep 17, 2021
21fbcbc
remove nida from default data sets
warrenstephens Oct 14, 2021
f834e7f
add skip cached kgx files for jsonl format downloading
warrenstephens Oct 14, 2021
b4c48da
change download logs to info from debug
warrenstephens Oct 14, 2021
d016f97
Merge pull request #41 from helxplatform/feature/nidaW2squash
warrenstephens Oct 15, 2021
1e3c261
Merge branch 'develop' of github.com:helxplatform/roger into feature/…
Oct 18, 2021
665b499
Updating NIDA task to use S3
Oct 18, 2021
2c052fe
Update requirements.txt
YaphetKG Oct 18, 2021
6aadfbb
Merge pull request #42 from helxplatform/dug-lib-update
cschreep Oct 18, 2021
e8f7f5c
Merge branch 'develop' of github.com:helxplatform/roger into feature/…
Oct 18, 2021
60c1c11
Release/0.6.0 (#43)
YaphetKG Oct 18, 2021
afa22d3
Making sure dags are backwards-compatible
Oct 18, 2021
dcb21e8
Dug utils
Oct 18, 2021
41fb2e7
Logic for data set matching
Oct 18, 2021
0d66e17
File info for s3/stars
Oct 19, 2021
7a81a91
Logic for specifying data source
Oct 19, 2021
d88a15a
Merge pull request #40 from helxplatform/feature/s3-utils-simple
cschreep Oct 19, 2021
820df3a
Initial pass at adding SPARC processor
Oct 20, 2021
8d969c3
sparc metadata
Oct 20, 2021
1ce2427
Logging
Oct 20, 2021
14f591e
tmp making SciCrunchParser init explicit
Oct 20, 2021
bb418cc
Undoing previous commit
Oct 20, 2021
158ced3
scicrunch parser name
Oct 21, 2021
6efaff4
scicrunch parser name
Oct 21, 2021
4d4038e
Makefile
Oct 21, 2021
ef1667d
Batching key delete using scan (#45)
YaphetKG Nov 2, 2021
25bfb93
Bumping version
Nov 3, 2021
6019ae3
Merge pull request #44 from helxplatform/feature/sparc-1.0-data
cschreep Nov 5, 2021
785f85f
Patch/delete keys (#46)
YaphetKG Nov 8, 2021
c6d2f12
adding some logging
Nov 8, 2021
675bf8d
Feature/redis lib updates (#47)
YaphetKG Nov 9, 2021
e687d44
rename sparc format to 'sparc'
Nov 11, 2021
9f65357
Merge pull request #48 from helxplatform/patch/sparc-format
cschreep Nov 11, 2021
676cdb2
Changing normalizer URL
Nov 29, 2021
020cd58
Pinning dug version to 2.7.rc0
Nov 29, 2021
a63b05f
Bumping version
Nov 29, 2021
907ee6a
Pathing for sparc data
Nov 30, 2021
5b0ad31
Bumping dug to released versioN
Dec 2, 2021
7d9c81f
Merge branch 'main' of github.com:helxplatform/roger into release/0.7…
Dec 2, 2021
e10ebd4
Merge pull request #49 from helxplatform/release/0.7.rc0
cschreep Dec 2, 2021
c5f34bb
Bumping version
Dec 2, 2021
7bb4d1f
Bumping version
Dec 2, 2021
2f51fd9
Feature/cde crawls (#51)
YaphetKG Feb 9, 2022
0b5574a
Remove logging of config; contains redis and S3 keys (#52)
mac-chaffee Feb 10, 2022
af8ecca
when two graph sets are downloaded, bug that deletes the first downlo…
YaphetKG Feb 11, 2022
1ea2aaf
added the version and the new tag
HowardLander Apr 1, 2022
b0798a4
Changed git to https to satisfy the git gods
HowardLander Apr 4, 2022
ef4c0ff
changed the requirements.txt to match the latest branch
HowardLander Apr 4, 2022
cbfd049
Cde harmonization 2 (#57)
YaphetKG Apr 5, 2022
fd5a88a
Merge branch 'sparc_parser_fix' into develop
HowardLander Apr 8, 2022
3aacf11
Update requirements.txt
YaphetKG Apr 19, 2022
0776bb3
Merge pull request #59 from helxplatform/dug-version-to-latest-release
waTeim Apr 19, 2022
ea9ffdb
Update _version.py
YaphetKG Apr 22, 2022
47612cb
Anvil pipeline (#60)
YaphetKG May 3, 2022
7a69986
Initial commit
Hoid May 18, 2022
71314dc
Remove unnecessary Install stage
Hoid May 18, 2022
3afea8a
Change user to root during part of Dockerfile
Hoid May 18, 2022
4e8fc98
Increase ephemeral storage limit
Hoid May 18, 2022
4721fcb
Maybe fix pip command?
Hoid May 18, 2022
7447279
Increase ephemeral storage limits
Hoid May 18, 2022
810307a
Reduce ephemeral storage limits a bit to test
Hoid May 18, 2022
d453f20
Cleanup
Hoid May 18, 2022
08e65c7
Merge pull request #61 from helxplatform/new-jenkins-test
Hoid May 24, 2022
be879c2
Separate build and publish, initial feature branch tagging, prep for …
cnbennett3 Jun 9, 2022
25cfb2b
Update script for extracting version from version file.
cnbennett3 Jun 9, 2022
48d42d9
Add versioning and tagging for develop and master + bump version.
cnbennett3 Jun 29, 2022
3bf4baa
Merge pull request #62 from helxplatform/jenkins-test
cnbennett3 Jul 1, 2022
142ed93
Initial commit
Hoid Jul 13, 2022
f6afce1
Add third tag back to master branch tag push
Hoid Jul 13, 2022
12bb33c
Increase ephemeral storage limits and requests
Hoid Jul 13, 2022
d4a30b3
Move test stage to before stuff
Hoid Jul 18, 2022
386d46f
Merge pull request #63 from helxplatform/use-pipeline-utils
Hoid Jul 18, 2022
3f09957
Ncpi datasets (#64)
YaphetKG Aug 25, 2022
7459128
Sprint task (#65)
YaphetKG Oct 5, 2022
6fc7161
Bacpac parsing (#66)
YaphetKG Jan 5, 2023
e375945
Issue 124 annotation kgx (#69)
YaphetKG Jan 26, 2023
c9dc66e
Bdc new data (#72)
YaphetKG Jul 19, 2023
1207a1f
Disk merge (#71)
HowardLander Jul 19, 2023
219e83c
Filerenames. Deprecated DummyOperator -> EmptyOperator, imports. (#74)
vladimir2217 Jul 26, 2023
89520a3
Changes to fix the loading bug for json files (#77)
HowardLander Aug 15, 2023
d0b652b
Break up core.py, restructure Util class to path module
mbacon-renci Aug 8, 2023
0ae83b7
Changes to testing framework to accommodate Util->storage change. Som…
mbacon-renci Aug 16, 2023
668a177
Incorporate one more change from develop
mbacon-renci Aug 18, 2023
bae5919
Merge cleanup
mbacon-renci Aug 18, 2023
50d54f1
Merge pull request #78 from helxplatform/refactor/core_reorganize_2
mbacon-renci Aug 18, 2023
b17ea15
Revert "Refactor/core reorganize 2" (#80)
YaphetKG Aug 21, 2023
e621fae
Revert "Revert "Refactor/core reorganize 2" (#80)"
YaphetKG Aug 21, 2023
99b5473
fix variable sources
YaphetKG Aug 21, 2023
52bf97c
reverting roger data dir env
YaphetKG Aug 21, 2023
856dafd
fix metadata yaml path for kgx files
YaphetKG Aug 21, 2023
7f41aa7
missing function url retrive
YaphetKG Aug 21, 2023
eba76f4
missing ntpath import in kgx.py
YaphetKG Aug 21, 2023
b96ef4b
typo on json iter from storage in kgx.py
YaphetKG Aug 21, 2023
fe20728
typo on storage path for indexing elements
YaphetKG Aug 23, 2023
187811c
removes old data files and helm chart
YaphetKG Aug 23, 2023
9235071
Merge pull request #81 from helxplatform/refactor-reverted
mbacon-renci Aug 23, 2023
fb8bc87
Study names plus (#79)
YaphetKG Aug 24, 2023
9678977
Mds import (#82)
YaphetKG Sep 6, 2023
95940f3
Bacpac and cde (#83)
YaphetKG Sep 29, 2023
7f61501
Update _version.py
YaphetKG Oct 5, 2023
de46493
Release 0.10.4 (#89)
YaphetKG Oct 31, 2023
a8feb24
Develop to main sync (#98)
YaphetKG Feb 19, 2024
dfc7176
release sync (#100)
YaphetKG Apr 18, 2024
b01c982
Dev sync main (#108)
YaphetKG Sep 19, 2024
8b031b1
prep for release (#107)
YaphetKG Sep 19, 2024
9f6a237
Release merge (#109)
YaphetKG Oct 22, 2024
d3e4b0a
Sync develop with main (#116)
YaphetKG Mar 26, 2025
a9f9765
dev main sync (#122)
YaphetKG May 28, 2025
451ae62
dev to main (#123)
YaphetKG May 28, 2025
1171679
Dev master sync (#125)
YaphetKG Jun 3, 2025
7ea0ccb
dev sync (#126)
YaphetKG Jun 3, 2025
33126c5
merge airflow 3.1.1 (#132)
YaphetKG Nov 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

KGX_DATA_SETS="bdc-studies-kgx:v1.0"
INPUT_DATA_SETS="heal-mds-studies:v1.0"

LAKEFS_ACCESS_KEY=""
LAKEFS_SECRET_KEY=""
LAKEFS_REPO=""
LAKEFS_BRANCH=""
LAKEFS_URL="https://lakefs.apps.renci.org"

BIOMEGATRON_URL="https://med-nemo.apps.renci.org/annotate"
SAPBERT_URL="https://sap-qdrant.apps.renci.org/annotate"
NODE_NORM_URL="https://nodenormalization-sri.renci.org/get_normalized_nodes?conflate=false&description=true&curie="
NAME_RES_URL="https://name-resolution-sri.renci.org/reverse_lookup"
86 changes: 86 additions & 0 deletions .github/workflows/build-push-dev-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Workflow responsible for the
# development release processes.
#
name: Build-Push-Dev-Image
on:
push:
branches:
- develop
paths-ignore:
- README.md
- .old_cicd/*
- .github/*
- .github/workflows/*
- LICENSE
- .gitignore
- .dockerignore
- .githooks
# Do not build another image on a pull request.
# Any push to develop will trigger a new build however.
pull_request:
branches-ignore:
- '*'

jobs:
build-push-dev-image:
runs-on: ubuntu-latest
steps:

- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
# fetch-depth: 0 means, get all branches and commits
fetch-depth: 0

- name: Set short git commit SHA
id: vars
run: |
echo "short_sha=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT
# https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

- name: Confirm git commit SHA output
run: echo ${{ steps.vars.outputs.short_sha }}

# Docker Buildx is important to caching in the Build And Push Container
# step
# https://github.com/marketplace/actions/build-and-push-docker-images

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
network=host

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
logout: true

- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: containers.renci.org
username: ${{ secrets.CONTAINERHUB_USERNAME }}
password: ${{ secrets.CONTAINERHUB_TOKEN }}
logout: true


# Notes on Cache:
# https://docs.docker.com/build/ci/github-actions/examples/#inline-cache
- name: Build Push Container
uses: docker/build-push-action@v5
with:
context: .
push: true
# Push to renci-registry and dockerhub here.
# cache comes from dockerhub.
tags: |
${{ github.repository }}:develop
${{ github.repository }}:${{ steps.vars.outputs.short_sha }}
containers.renci.org/${{ github.repository }}:develop
containers.renci.org/${{ github.repository }}:${{ steps.vars.outputs.short_sha }}
cache-from: type=registry,ref=${{ github.repository }}:buildcache-dev
cache-to: type=registry,ref=${{ github.repository }}:buildcache-dev,mode=max
131 changes: 131 additions & 0 deletions .github/workflows/build-push-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Workflow responsible for the
# major release processes.
#

name: Build-Push-Release
on:
push:
branches:
- master
- main
paths-ignore:
- README.md
- .old_cicd/*
- .github/*
- .github/workflows/*
- LICENSE
- .gitignore
- .dockerignore
- .githooks
tags-ignore:
- '*'
jobs:
build-push-release:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0

- name: Set short git commit SHA
id: vars
run: |
echo "short_sha=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT
# https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

- name: Confirm git commit SHA output
run: echo ${{ steps.vars.outputs.short_sha }}

# https://github.com/marketplace/actions/git-semantic-version
- name: Semver Check
uses: paulhatch/semantic-version@v5.0.3
id: version
with:
# The prefix to use to identify tags
tag_prefix: "v"
# A string which, if present in a git commit, indicates that a change represents a
# major (breaking) change, supports regular expressions wrapped with '/'
major_pattern: "/breaking:|major:/"
# A string which indicates the flags used by the `major_pattern` regular expression. Supported flags: idgs
major_regexp_flags: "ig"
# Same as above except indicating a minor change, supports regular expressions wrapped with '/'
minor_pattern: "/feat:|feature:|minor:/"
# A string which indicates the flags used by the `minor_pattern` regular expression. Supported flags: idgs
minor_regexp_flags: "ig"
# A string to determine the format of the version output
# version_format: "${major}.${minor}.${patch}-prerelease${increment}"
version_format: "${major}.${minor}.${patch}"
search_commit_body: false

# Docker Buildx is important to caching in the Build And Push Container
# step
# https://github.com/marketplace/actions/build-and-push-docker-images
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
network=host
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
logout: true

- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: containers.renci.org
username: ${{ secrets.CONTAINERHUB_USERNAME }}
password: ${{ secrets.CONTAINERHUB_TOKEN }}
logout: true

# Notes on Cache:
# https://docs.docker.com/build/ci/github-actions/examples/#inline-cache
- name: Build Push Container
uses: docker/build-push-action@v5
with:
push: true
# Push to renci-registry and dockerhub here.
# cache comes from dockerhub.
tags: |
containers.renci.org/${{ github.repository }}:v${{ steps.version.outputs.version }}
containers.renci.org/${{ github.repository }}:latest
containers.renci.org/${{ github.repository }}:${{ steps.vars.outputs.short_sha }}
${{ github.repository }}:v${{ steps.version.outputs.version }}
${{ github.repository }}:latest
${{ github.repository }}:${{ steps.vars.outputs.short_sha }}
cache-from: type=registry,ref=${{ github.repository }}:buildcache-release
cache-to: type=registry,ref=${{ github.repository }}:buildcache-release,mode=max

#==========================TAG & RELEASE W/ NOTES =========================

# Note: GITHUB_TOKEN is autogenerated feature of github app
# which is auto-enabled when using github actions.
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication
# https://docs.github.com/en/rest/git/tags?apiVersion=2022-11-28#create-a-tag-object
# https://docs.github.com/en/rest/git/refs?apiVersion=2022-11-28#create-a-reference
# This creates a "lightweight" ref tag.
- name: Create Tag for Release
run: |
curl \
-s --fail -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/git/refs \
-d '{"ref":"refs/tags/v${{ steps.version.outputs.version }}","sha":"${{ github.sha }}"}'
# https://cli.github.com/manual/gh_release_create
- name: Create Release
env:
RELEASE_VERSION: ${{ steps.version.outputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ env.RELEASE_VERSION }} \
-t "${{ env.RELEASE_VERSION }}" \
--generate-notes \
--latest
129 changes: 129 additions & 0 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Workflow responsible for core acceptance testing.
# Tests Currently Run:
# - flake8-linter
# - PYTest
# - Bandit
# For PR Vulnerability Scanning a separate workflow will run.
# The build-push-dev-image and build-push-release workflows
# handle the develop and release image storage respectively.
#
#

name: Code-Checks
on:
push:
branches-ignore:
- master
- main
- develop
pull_request:
branches:
- develop
- master
- main
types: [opened, synchronize]
paths-ignore:
- README.md
- .old_cicd/*
- .github/*
- .github/workflows/*
- LICENSE
- .gitignore
- .dockerignore
- .githooks

jobs:
############################## flake8-linter ##############################
flake8-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

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

# Currently actions/setup-python supports caching
# but the cache is not as robust as cache action.
# Here we cache the entire python env which speeds subsequent builds up alot. (alot being scientific term)
# Ref: https://blog.allenai.org/python-caching-in-github-actions-e9452698e98d
- uses: actions/cache@v3
name: Cache Python
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('pyproject.toml') }}

- name: Install Requirements
run: |
pip install -r requirements.txt

- name: Lint with flake8
run: |
pip install flake8
flake8 --ignore=E,W dags
# We continue on error here until the code is clean
# flake8 --ignore=E,W --exit-zero .
continue-on-error: true

################################### PYTEST ###################################
# pytest:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: '3.12'

# - name: Install Requirements
# run: |
# pip install -r requirements.txt
# pip install coverage
# pip install ./tests

# - name: Test with pytest
# run: |
# make test
############################## test-image-build ##############################
test-image-build:
runs-on: ubuntu-latest
# if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: actions/checkout@v3

- name: Set short git commit SHA
id: vars
run: |
echo "short_sha=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT
# https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
- name: Confirm git commit SHA output
run: echo ${{ steps.vars.outputs.short_sha }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
logout: true

- name: Parse Github Reference Name
id: branch
run: |
REF=${{ github.ref_name }}
echo "GHR=${REF%/*}" >> $GITHUB_OUTPUT

# Notes on Cache:
# https://docs.docker.com/build/ci/github-actions/examples/#inline-cache
- name: Build Container
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
${{ github.repository }}:test_${{ steps.branch.outputs.GHR }}
cache-from: type=registry,ref=${{ github.repository }}:buildcache
cache-to: type=registry,ref=${{ github.repository }}:buildcache,mode=max
Loading