Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(chore): Add wheel build workflow #304

Merged
merged 4 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
39 changes: 39 additions & 0 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and Test Wheel

on:
pull_request:
workflow_dispatch:

jobs:
package:
runs-on: ubuntu-latest

steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

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

- name: Install sophios 🔧
run: |
pip install .[test]
- name: Test with pytest
run: |
python -m pytest -k test_cwl_docker_extract
python -m pytest -m "not skip_pypi_ci" -vv

- name: Build sophios
run: |
python -m pip install twine build
python -m build --wheel
python -m build --sdist

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: sophios-wheels
path: dist/*
retention-days: 1
4 changes: 2 additions & 2 deletions src/sophios/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"search_paths_cwl": {
"global": [
"../workflow-inference-compiler/cwl_adapters",
"../sophios/cwl_adapters",
"../image-workflows/cwl_adapters",
"../biobb_adapters/biobb_adapters",
"../mm-workflows/cwl_adapters"
Expand All @@ -12,7 +12,7 @@
},
"search_paths_wic": {
"global": [
"../workflow-inference-compiler/docs/tutorials",
"../sophios/docs/tutorials",
"../image-workflows/workflows",
"../mm-workflows/examples"
]
Expand Down
2 changes: 1 addition & 1 deletion src/sophios/python_cwl_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
DRIVER_SCRIPT = '/python_cwl_driver.py'
TYPES_SCRIPT = '/workflow_types.py'

TYPES_SCRIPT_REL = '../workflow-inference-compiler/examples/scripts/workflow_types.py'
TYPES_SCRIPT_REL = '../sophios/examples/scripts/workflow_types.py'

# NOTE: VERY IMPORTANT: Since we have to programmatically import the python file in the compiler,
# and since the act of importing it executes the entire file (i.e. including import statements),
Expand Down
8 changes: 5 additions & 3 deletions tests/test_rest_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async def receive() -> Json:
res: Json = asyncio.run(restapi.compile_wf(req)) # call to rest api
return res


@pytest.mark.skip_pypi_ci
@pytest.mark.fast
def test_rest_core_single_node() -> None:
"""A simple single node sophios/restapi test"""
Expand All @@ -148,7 +148,7 @@ def test_rest_core_single_node() -> None:
retval = run_cwl_local(workflow_name, 'cwltool', 'docker', False)
assert retval == 0


@pytest.mark.skip_pypi_ci
def test_rest_core_single_node_bbbc() -> None:
"""A simple single node sophios/restapi test"""
basepath = 'autogenerated'
Expand All @@ -163,7 +163,7 @@ def test_rest_core_single_node_bbbc() -> None:
retval = run_cwl_local(workflow_name, 'cwltool', 'docker', False)
assert retval == 0


@pytest.mark.skip_pypi_ci
def test_rest_core_bbbc_download_wfb() -> None:
"""A simple multi node (inline cwl) sophios/restapi test"""
basepath = 'autogenerated'
Expand All @@ -180,6 +180,7 @@ def test_rest_core_bbbc_download_wfb() -> None:


@pytest.mark.fast
@pytest.mark.skip_pypi_ci
def test_rest_core_multi_node_file() -> None:
"""A simple multi node sophios/restapi test"""
basepath = 'autogenerated'
Expand All @@ -196,6 +197,7 @@ def test_rest_core_multi_node_file() -> None:


@pytest.mark.fast
@pytest.mark.skip_pypi_ci
def test_rest_core_multi_node_inline_cwl() -> None:
"""A simple multi node (inline cwl) sophios/restapi test"""
basepath = 'autogenerated'
Expand Down
Loading