Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
389 commits
Select commit Hold shift + click to select a range
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
ebd0e59
Update _version.py (#86)
YaphetKG Oct 5, 2023
b66eb64
Update _version.py
YaphetKG Oct 5, 2023
e7e5f7c
Rti merge (#84)
YaphetKG Oct 31, 2023
96c75df
Merge branch 'main' into develop
YaphetKG Oct 31, 2023
de46493
Release 0.10.4 (#89)
YaphetKG Oct 31, 2023
fee790d
adding v5.0
YaphetKG Nov 1, 2023
e15a373
cde-links branch
YaphetKG Nov 6, 2023
6aac2fd
pin linkml
YaphetKG Nov 6, 2023
487b2c1
Update config.yaml
YaphetKG Nov 7, 2023
bb61ab9
pop total items before result
YaphetKG Nov 8, 2023
48650b8
print extracted elements
YaphetKG Nov 8, 2023
1413e92
Merge pull request #92 from helxplatform/robokop-v5.0
HowardLander Nov 29, 2023
3cfe3f5
Update requirements.txt
YaphetKG Dec 21, 2023
21889ed
Keep edge provenance (#94)
YaphetKG Jan 4, 2024
85cbead
Merge branch 'main' into develop
YaphetKG Feb 19, 2024
a8feb24
Develop to main sync (#98)
YaphetKG Feb 19, 2024
2eb136a
Pipeline parameterize restructure (#95)
YaphetKG Apr 18, 2024
2aee7f3
Merge branch 'main' into develop
YaphetKG Apr 18, 2024
f671194
pin avalon
YaphetKG Apr 18, 2024
dfc7176
release sync (#100)
YaphetKG Apr 18, 2024
473816a
deleted jenkins and added workflows
pchachicho Jun 6, 2024
98257d9
unlinked helx-actions
pchachicho Jun 7, 2024
d7b1f7e
testing paths
pchachicho Jun 11, 2024
b0d8c92
testing again
pchachicho Jun 11, 2024
9bee088
d
pchachicho Jun 11, 2024
2b44c22
tests
pchachicho Jun 11, 2024
7a8cc6d
commented out pytest
pchachicho Jun 13, 2024
94253c9
try again for bandit
pchachicho Jun 13, 2024
7f37f91
commented out bandit
pchachicho Jun 13, 2024
e696854
changed dag to dags
pchachicho Jun 14, 2024
b909274
Added fixes
pchachicho Jun 21, 2024
44ea4df
Merge pull request #101 from helxplatform/gh_actions
pchachicho Jun 21, 2024
4532bda
Bagel (#103)
YaphetKG Aug 7, 2024
af41d8f
Dbgap programs (#104)
YaphetKG Aug 7, 2024
99a6e7b
adding bagel config parse to bool
YaphetKG Sep 19, 2024
05b115e
Dev sync main (#106)
YaphetKG Sep 19, 2024
b01c982
Dev sync main (#108)
YaphetKG Sep 19, 2024
8b031b1
prep for release (#107)
YaphetKG Sep 19, 2024
2058584
Updated docker image to 2.10.2
mbacon-renci Oct 8, 2024
6dec958
fix kgx path error
YaphetKG Oct 8, 2024
d3f03ab
fix kgx path error
YaphetKG Oct 8, 2024
9ba7498
Merge branch 'develop' into new_image_2-10-2
mbacon-renci Oct 10, 2024
745cf79
Trying out the slim apache images to reduce vulnerability footprint
mbacon-renci Oct 10, 2024
b86807e
Building general package update into dockerfile
mbacon-renci Oct 10, 2024
5dbe502
Trying more rigorous dist-upgrade to try to get rid of vulerabilities…
mbacon-renci Oct 10, 2024
3f6e987
dist-upgrade also needs -y flag
mbacon-renci Oct 10, 2024
a1673b6
Rolling back from slim image
mbacon-renci Oct 11, 2024
0464da1
Fixed apt-get syntax error
mbacon-renci Oct 11, 2024
47df70d
Reverting develop to 2.7.2 for stability's sake, will revisit after u…
mbacon-renci Oct 11, 2024
b721976
Update Dockerfile
YaphetKG Oct 11, 2024
6f505d8
Update Dockerfile
YaphetKG Oct 11, 2024
be2b07d
Removed post-install package cleanup
mbacon-renci Oct 11, 2024
be35f9c
spurious merge
mbacon-renci Oct 11, 2024
73812a1
Update requirements.txt
YaphetKG Oct 12, 2024
6d5194c
test merge issue
YaphetKG Oct 21, 2024
6db88f8
fix merge issue
YaphetKG Oct 21, 2024
dec80b9
Merge branch 'main' into develop
YaphetKG Oct 22, 2024
9f6a237
Release merge (#109)
YaphetKG Oct 22, 2024
2c1ab9d
test
yskale Nov 21, 2024
ac8ebc2
changed the pipeline name
yskale Nov 29, 2024
6b93868
parser name updated
yskale Nov 29, 2024
9635e65
update pipeline name
yskale Dec 2, 2024
86bd037
update the get_object/files
yskale Dec 2, 2024
5794dc1
modify radx pipeline (#111)
YaphetKG Feb 18, 2025
dbfb5b2
Heal ingest 2 18 (#112)
YaphetKG Feb 26, 2025
06a4ed1
test node type
YaphetKG Feb 26, 2025
1ab5a3a
changed the lakefs dataset name for testing
yskale Mar 5, 2025
8faddd1
Merge pull request #113 from helxplatform/develop
yskale Mar 6, 2025
faf4975
Heal ingest 2 18 (#114)
YaphetKG Mar 24, 2025
4d8cf1a
Merge branch 'main' into develop
YaphetKG Mar 25, 2025
048e15f
Bitnami (#117)
YaphetKG Mar 26, 2025
d3e4b0a
Sync develop with main (#116)
YaphetKG Mar 26, 2025
0cc7e8a
Merge branch 'develop' into picsure_data_ingest_test
yskale Mar 31, 2025
837f458
update the pipelines for new programs in BDC
yskale Mar 31, 2025
f0f5bbf
init parser and crawler objects once and retry
YaphetKG Apr 10, 2025
303bf6d
fix logger -> log typo
YaphetKG Apr 10, 2025
ddb3663
remove clear index
YaphetKG May 19, 2025
6545e4a
remove clear index (#119)
YaphetKG May 19, 2025
27cc880
Update requirements.txt
yskale May 19, 2025
1334e4b
Merge pull request #120 from helxplatform/develop
yskale May 19, 2025
2cea207
fix study name in graph (#121)
YaphetKG May 27, 2025
6e4ad05
Merge branch 'main' into develop
YaphetKG May 28, 2025
a9f9765
dev main sync (#122)
YaphetKG May 28, 2025
30c4e8d
comment clear index. rolledback during merge
YaphetKG May 28, 2025
451ae62
dev to main (#123)
YaphetKG May 28, 2025
fb05abf
update with develop (#124)
YaphetKG Jun 3, 2025
1203949
Update requirements.txt with Dug V2.13.10 which have all the new chan…
yskale Jun 3, 2025
3a81811
Picsure data ingest test (#118)
yskale Jun 3, 2025
1171679
Dev master sync (#125)
YaphetKG Jun 3, 2025
0182738
fix dug version
YaphetKG Jun 3, 2025
4b59d18
Merge branch 'main' into develop
YaphetKG Jun 3, 2025
4ec7343
Merge branch 'develop' into picsure_data_ingest_test
YaphetKG Sep 9, 2025
40fd060
fix req
YaphetKG Sep 9, 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
23 changes: 23 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
AIRFLOW_UID=502
AIRFLOW_GID=0

API_WORKERS=4
API_PORT=5551
API_TIMEOUT=10

DATA_DIR=./local_storage

DUG_LOG_LEVEL=INFO

ELASTICSEARCH_PASSWORD=12345
ELASTICSEARCH_HOST=elasticsearch
ELASTICSEARCH_USERNAME=elastic

NBOOST_API_HOST=nboost

REDIS_PASSWORD=weak
REDIS_HOST=merge-redis-master
REDIS_PORT=6379
TRANQL_ACCESS_LOG=access.log
TRANQL_ERROR_LOG=error.log
ROGER_DUG__INPUTS_DATA__SETS=topmed:v1.0
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