Skip to content

Commit

Permalink
Add Any type to built-in types (#11)
Browse files Browse the repository at this point in the history
Add Any type

- Add test for Any type
- Install `cwltool` with `pipx` to avoid library conflicts.
- Remove Ubuntu from test platforms (pypa/pipx#597)

Co-authored-by: Bogdan Gavrilovic <[email protected]>
Co-authored-by: Kaushik Ghose <[email protected]>
  • Loading branch information
3 people authored Jan 14, 2021
1 parent ff611ae commit cda5131
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# pipx ensurepath on ubuntu has an issue
# https://github.com/pipxproject/pipx/issues/597
#os: [ubuntu-latest, macos-latest, windows-latest]
os: [macos-latest, windows-latest]
python-version: [3.6, 3.7, 3.8]

steps:
Expand All @@ -19,7 +22,6 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install cwltool
pip install .
- name: Lint with flake8
run: |
Expand All @@ -28,11 +30,18 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install test dependencies
run: |
pip install pytest
pip install pipx
pipx install cwltool
pipx ensurepath
# Need a new shell so that ensurepath takes
- name: Test with pytest
env:
SB_AUTH_TOKEN: ${{ secrets.API_KEY }}
SB_API_ENDPOINT: https://api.sbgenomics.com/v2
SB_API_ENDPOINT: https://api.sbgenomics.com/v2
run: |
pip install pytest
echo $PATH
cd tests
py.test
py.test
2 changes: 1 addition & 1 deletion sbpack/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class MissingKeyField(BaseException):
pass


built_in_types = ["null", "boolean", "int", "long", "float", "double", "string", "File", "Directory", "stdout", "stderr"]
built_in_types = ["null", "boolean", "int", "long", "float", "double", "string", "File", "Directory", "stdout", "stderr", "Any"]
magic_string = "##sbpack_rename_user_type##"


Expand Down
2 changes: 2 additions & 0 deletions tests/tools/clt1.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ inputs:
# type: ../types/singletype2.yml#simple_record2
in4:
type: [string, ../types/recursive.yml#sample_meta]
in5:
type: Any?

outputs:
out1:
Expand Down

0 comments on commit cda5131

Please sign in to comment.