Skip to content

Commit ddf0a23

Browse files
authored
(chore): Add wheel build workflow (PolusAI#304)
1 parent 62559d3 commit ddf0a23

File tree

4 files changed

+47
-6
lines changed

4 files changed

+47
-6
lines changed

.github/workflows/build_wheel.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build and Test Wheel
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
package:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout 🛎️
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Python 3.11
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: 3.11
19+
20+
- name: Install sophios 🔧
21+
run: |
22+
pip install .[test]
23+
- name: Test with pytest
24+
run: |
25+
python -m pytest -k test_cwl_docker_extract
26+
python -m pytest -m "not skip_pypi_ci" -vv
27+
28+
- name: Build sophios
29+
run: |
30+
python -m pip install twine build
31+
python -m build --wheel
32+
python -m build --sdist
33+
34+
- name: Upload Artifact
35+
uses: actions/upload-artifact@v3
36+
with:
37+
name: sophios-wheels
38+
path: dist/*
39+
retention-days: 1

src/sophios/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"search_paths_cwl": {
33
"global": [
4-
"../workflow-inference-compiler/cwl_adapters",
4+
"../sophios/cwl_adapters",
55
"../image-workflows/cwl_adapters",
66
"../biobb_adapters/biobb_adapters",
77
"../mm-workflows/cwl_adapters"
@@ -12,7 +12,7 @@
1212
},
1313
"search_paths_wic": {
1414
"global": [
15-
"../workflow-inference-compiler/docs/tutorials",
15+
"../sophios/docs/tutorials",
1616
"../image-workflows/workflows",
1717
"../mm-workflows/examples"
1818
]

src/sophios/python_cwl_adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
DRIVER_SCRIPT = '/python_cwl_driver.py'
99
TYPES_SCRIPT = '/workflow_types.py'
1010

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

1313
# NOTE: VERY IMPORTANT: Since we have to programmatically import the python file in the compiler,
1414
# and since the act of importing it executes the entire file (i.e. including import statements),

tests/test_rest_core.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ async def receive() -> Json:
132132
res: Json = asyncio.run(restapi.compile_wf(req)) # call to rest api
133133
return res
134134

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

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

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

181181

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

197198

198199
@pytest.mark.fast
200+
@pytest.mark.skip_pypi_ci
199201
def test_rest_core_multi_node_inline_cwl() -> None:
200202
"""A simple multi node (inline cwl) sophios/restapi test"""
201203
basepath = 'autogenerated'

0 commit comments

Comments
 (0)