Skip to content

Commit

Permalink
Test timers (#20)
Browse files Browse the repository at this point in the history
* Added test timing.

* Removed long-running test for ease of development

* Further clean-up

* Reinstated time-consuming tests

* Removing hardcoding of repo

* Removing reference to saved table. Timing is shown in stdout of each run

* More descriptive name of column

* Updated actions/checkout to v3

* Updated the README, adding curation-only workflow.

* Minor reformatting (#4)

* Pycharm reformatting and removal of redundant parentheses

* Simplifying boolean expressions

---------

Co-authored-by: Marius André Strand <[email protected]>

---------

Co-authored-by: Marius André Strand <[email protected]>
  • Loading branch information
maanst and Marius André Strand authored Nov 15, 2023
1 parent 5a5438d commit 9b8e1bc
Show file tree
Hide file tree
Showing 10 changed files with 166 additions and 168 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
### GitHub Actions workflows for caseologue

`build_docs.yml` : will run when a modification occurs in the docs/ folder of the caseologye.py script. It will trigger the update and deployment of the github page documentation of caseologue.
`build_docs.yml` : This workflow will run when a modification occurs in the docs/ folder of the caseologue.py script. A run of this workflow will trigger the update and deployment of the caseologue GitHub page documentation.

`caseologue_python.yml`: Is a callable workflow to run the caseologue.py script, running custom SPARQL queries. It cannot be run on it's own, it needs to be called by another workflow. It requires as input the ontology path and optionnaly severity level.
`caseologue_python.yml`: This is a callable workflow to run the caseologue.py script, running custom SPARQL queries. This workflow cannot be run on its own as it needs to be called by another workflow. The workflow requires an ontology path as input, with optional severity levels.

`caseologue_robot_reason.yml`: Is a callable workflow to run the ELK reasonner using the robot reason tool. It cannot be run on it's own, it needs to be called by another workflow. It requires as input the ontology path.
`caseologue_robot_reason.yml`: This is a callable workflow to run the ELK reasoner using the ROBOT reason tool. This workflow cannot be run on its own as it needs to be called by another workflow. The workflow requires an ontology path as input.

`caseologue_robot_report.yml`: Is a callable workflow to run the generic and adapted robot SPARQL queries using the robot report tool. It cannot be run on it's own, it needs to be called by another workflow. It requires as input the ontology path.
`caseologue_robot_report.yml`: This is a callable workflow to run the generic and adapted ROBOT SPARQL queries using the ROBOT report tool. This workflow cannot be run on its own as it needs to be called by another workflow. The workflow requires an ontology path as input.

`caseologue_all_tests.yml`: Calls the 3 workflows above (caseologue_python.yml, caseologue_robot_reason.yml, caseologue_robot_report.yml) and run them on the current dev version of EDAM. It can only be run mannualy on the GitHub Actions interface. It runs all test including the one with a "curation" level in caseologue python.
`caseologue_all_tests.yml`: This workflow runs "error", "essential" and "curation" tests. The workflow calls caseologue_python.yml, caseologue_robot_reason.yml, and caseologue_robot_report.yml and runs them on the current dev version of EDAM. The workflow can only be run manually on the GitHub Actions interface.

`caseologue_error_essential.yml`: Calls the 3 workflows above (caseologue_python.yml, caseologue_robot_reason.yml, caseologue_robot_report.yml) and run them on the current dev version of EDAM. It is triggered by every push on the caseologue repository and can be run manually on the GitHub Actions interface. For caseologue python, it only runs the test with a "error" and "essential" level.
`caseologue_error_essential.yml`: This workflow runs "error" and "essential" level tests. The workflow calls caseologue_python.yml, caseologue_robot_reason.yml, and caseologue_robot_report.yml and runs them on the current dev version of EDAM. The workflow calls the same three workflows as caseologue_all_tests and runs them on the current dev version of EDAM. The workflow is triggered by every push on the caseologue repository, but can also be run manually on the GitHub Actions interface.

`test_caseologue.yml`: runs the test_caseologue.py script in th caseologue_oyhton/test/ folder. It tests that caseologue tests do catch errors in the test data owl files.
`caseologue_curation.yml`: This workflow runs "curation" level tests. The workflow calls caseologue_python.yml, caseologue_robot_reason.yml, and caseologue_robot_report.yml and runs them on the current dev version of EDAM. The workflow can only be run manually on the GitHub Actions interface.

`test_caseologue.yml`: This workflow runs the test_caseologue.py script in the caseologue_python/test/ folder and checks that caseologue tests catch the correct number of errors in the test data owl files.
4 changes: 2 additions & 2 deletions .github/workflows/caseologue_all_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
upload_edam:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: download edam
run: wget https://raw.githubusercontent.com/edamontology/edamontology/main/EDAM_dev.owl
- name: upload edam
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: input_ontology
path: EDAM_dev.owl
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/caseologue_curation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
upload_edam:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: download edam
run: wget https://raw.githubusercontent.com/edamontology/edamontology/main/EDAM_dev.owl
- name: upload edam
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: input_ontology
path: EDAM_dev.owl
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/caseologue_error_essential.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
upload_edam:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: download edam
run: wget https://raw.githubusercontent.com/edamontology/edamontology/main/EDAM_dev.owl
- name: upload edam
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: input_ontology
path: EDAM_dev.owl
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/caseologue_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ jobs:

steps:

- uses: actions/checkout@v2
with:
repository: edamontology/caseologue
- uses: actions/checkout@v3
# with:
# This will automatically check out the branch that triggered the workflow
# within the current repository.
# repository: ${{ github.repository }}
# ref: ${{ github.ref }}

- name: download artifacts
uses: actions/download-artifact@v3
Expand All @@ -35,17 +38,12 @@ jobs:
- name: run
run: |
cd caseologue_python/
printf "\n_____________________________________________________________________________________________\n\nFollowing debug table can be found as a tsv file at the bottom of the summary of this job\n_____________________________________________________________________________________________"
printf "\n_____________________________________________________________________________________________\n\nThe following debug table is archived as an artifact called 'output_caseologue'\n_____________________________________________________________________________________________\n\n"
EDAM_PATH=${{inputs.edam_path}} python3 caseologue.py ${{inputs.caseologue_options}}
# - name: Print output
# if: always()
# run: |
# cat caseologue_python/output_caseologue.tsv
- name: Archive tests output
- name: Archive test outputs
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: output_caseologue
path: caseologue_python/output_caseologue.tsv
path: caseologue_python/output_caseologue.tsv
6 changes: 3 additions & 3 deletions .github/workflows/caseologue_robot_reason.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:

steps:

- uses: actions/checkout@v2
with:
repository: edamontology/caseologue
- uses: actions/checkout@v3
# with:
# repository: edamontology/caseologue
- name: download artifacts
uses: actions/download-artifact@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/caseologue_robot_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:

steps:

- uses: actions/checkout@v2
with:
repository: edamontology/caseologue
- uses: actions/checkout@v3
# with:
# repository: edamontology/caseologue

- name: download artifacts
uses: actions/download-artifact@v3
Expand All @@ -41,7 +41,7 @@ jobs:
- name: Archive Robot report tests
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: robot_report_profile
path: ./robot_config/report_profile.tsv
2 changes: 1 addition & 1 deletion .github/workflows/test_caseologue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install requirements
run: |
Expand Down
Loading

0 comments on commit 9b8e1bc

Please sign in to comment.