Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Sep 27, 2021
1 parent d36144a commit 611b992
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,18 @@ jobs:
# Set the parameters to be used in the response
repo=${{ github.event.client_payload.repo }}
owner=${{ github.event.client_payload.owner }}
ref=${{ github.event.client_payload.ref }}
sha=${{ github.event.client_payload.sha }}
number=${{ github.event.client_payload.number }}
repo_name=${repo#"$owner"}
repo_name=${repo_name#"/"}
echo "client_repo="${{ github.event.client_payload.repo }} >> $GITHUB_ENV
echo "client_repo="$repo >> $GITHUB_ENV
echo "client_repo_name="$repo_name >> $GITHUB_ENV
echo "client_owner="${{ github.event.client_payload.owner }} >> $GITHUB_ENV
echo "client_ref="${{ github.event.client_payload.ref }} >> $GITHUB_ENV
echo "client_sha="${{ github.event.client_payload.sha }} >> $GITHUB_ENV
echo "client_number="${{ github.event.client_payload.number }} >> $GITHUB_ENV
echo "client_owner="$owner >> $GITHUB_ENV
echo "client_ref="$ref >> $GITHUB_ENV
echo "client_sha="$sha >> $GITHUB_ENV
echo "client_number="$number >> $GITHUB_ENV
# Checkout the sha from the specified repository.
# Only run the tests matching the specified repository.
if [[ $repo =~ 'omero-ms-zarr' ]]; then
Expand Down Expand Up @@ -68,6 +71,7 @@ jobs:
- name: Run pytest
shell: bash -l {0}
run: pytest -vxk "not omero"
# yamllint disable rule:line-length
- name: Notify job status
if: always() && github.event.action == 'run_test_suite'
uses: actions/github-script@v3
Expand Down
30 changes: 17 additions & 13 deletions configure_test.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
import yaml
import sys

import yaml

# Change the value of the skip flag depending on the repository used
# repository:
#value = "bioformats2raw", "ome_zarr", "omero_ms_zarr"
# repository:
# value = "bioformats2raw", "ome_zarr", "omero_ms_zarr"
ref_value = "ome_zarr"
def main(argv):


def main() -> None:
argv = sys.argv[1:]
value = argv[0]
with open('sources.yml', 'r') as f:
with open("sources.yml") as f:
doc = yaml.safe_load(f)
for k in doc:
k['skip'] = True
if 'script' in k:
if k['script'].startswith(value):
k['skip'] = False
k["skip"] = True
if "script" in k:
if k["script"].startswith(value):
k["skip"] = False
else:
if value == ref_value:
k['skip'] = False

k["skip"] = False

with open('sources.yml', 'w') as f:
with open("sources.yml", "w") as f:
yaml.dump(doc, f, default_flow_style=False, sort_keys=False)


if __name__ == "__main__":
main(sys.argv[1:])
main()
2 changes: 1 addition & 1 deletion sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
- name: idr6001240
path: https://s3.embassy.ebi.ac.uk/idr/zarr/v0.1/6001240.zarr
skip: False

- name: bf2rawraw
script: bioformats2raw_fake
args:
Expand Down

0 comments on commit 611b992

Please sign in to comment.