Skip to content

Commit 0dac245

Browse files
committed
1 parent 062336c commit 0dac245

219 files changed

Lines changed: 23 additions & 42 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ sphinx:
1313
formats: all
1414

1515
build:
16-
os: ubuntu-22.04
16+
os: ubuntu-24.04
1717
tools:
1818
python: "3.11"
1919
apt_packages:

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ EXTRAS="[testing]"
2626

2727
# `SHELL=bash` doesn't work for some, so don't use BASH-isms like
2828
# `[[` conditional expressions.
29-
PYSOURCES=$(filter-out $(MODULE)/parser/cwl_v%,$(shell find $(MODULE) -name "*.py")) \
29+
PYSOURCES=$(filter-out src/$(MODULE)/parser/cwl_v%,$(shell find src/$(MODULE) -name "*.py")) \
3030
create_cwl_from_objects.py load_cwl_by_path.py \
31-
${MODULE}/parser/cwl_v1_?_utils.py docs/conf.py
31+
src/${MODULE}/parser/cwl_v1_?_utils.py docs/conf.py
3232
DEVPKGS=build diff_cover pylint pep257 ruff 'tox>=4' \
3333
wheel autoflake pyupgrade bandit auto-walrus \
3434
-rlint-requirements.txt -rmypy-requirements.txt
3535
DEBDEVPKGS=pep8 python-autopep8 pylint python-coverage ruff sloccount \
3636
python-flake8 python-mock shellcheck
37-
VERSION=v$(shell echo $$(tail -n 1 cwl_utils/__meta__.py | awk '{print $$3}'))
37+
VERSION=v$(shell echo $$(tail -n 1 src/cwl_utils/__meta__.py | awk '{print $$3}'))
3838
mkfile_dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
3939
UNAME_S=$(shell uname -s)
4040

@@ -80,7 +80,7 @@ docs: FORCE
8080

8181
## clean : clean up all temporary / machine-generated files
8282
clean: FORCE
83-
rm -f ${MODULE}/*.pyc ${MODULE}/tests/*.pyc
83+
find src -name '*.pyc' -delete
8484
rm -Rf .coverage
8585
rm -f diff-cover.html
8686

@@ -191,25 +191,25 @@ release: release-test
191191
flake8: FORCE
192192
flake8 $(PYSOURCES)
193193

194-
cwl_utils/parser/cwl_v1_0.py: FORCE
194+
src/cwl_utils/parser/cwl_v1_0.py: FORCE
195195
schema-salad-tool --codegen python \
196196
--codegen-parser-info "org.w3id.cwl.v1_0" \
197197
https://github.com/common-workflow-language/common-workflow-language/raw/codegen/v1.0/extensions.yml \
198198
> $@
199199

200-
cwl_utils/parser/cwl_v1_1.py: FORCE
200+
src/cwl_utils/parser/cwl_v1_1.py: FORCE
201201
schema-salad-tool --codegen python \
202202
--codegen-parser-info "org.w3id.cwl.v1_1" \
203203
https://github.com/common-workflow-language/cwl-v1.1/raw/codegen/extensions.yml \
204204
> $@
205205

206-
cwl_utils/parser/cwl_v1_2.py: FORCE
206+
src/cwl_utils/parser/cwl_v1_2.py: FORCE
207207
schema-salad-tool --codegen python \
208208
--codegen-parser-info "org.w3id.cwl.v1_2" \
209209
https://github.com/common-workflow-language/cwl-v1.2/raw/codegen/extensions.yml \
210210
> $@
211211

212-
regen_parsers: cwl_utils/parser/cwl_v1_*.py
212+
regen_parsers: src/cwl_utils/parser/cwl_v1_*.py
213213

214214
FORCE:
215215

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181

8282
version = __version__
8383

84-
autoapi_dirs = ["../cwl_utils"]
84+
autoapi_dirs = ["../src/cwl_utils"]
8585
autodoc_typehints = "description"
8686
autoapi_keep_files = True
8787
autoapi_ignore = ["*migrations*", "*.pyi", "*tests*"]

load_cwl_by_path.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cwl_utils/tests/load_cwl_by_path.py
1+
src/cwl_utils/tests/load_cwl_by_path.py

pyproject.toml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,18 @@ cwl-normalizer = "cwl_utils.normalizer:main"
7171
cwl-inputs-schema-gen = "cwl_utils.inputs_schema_gen:main"
7272

7373
[tool.pytest.ini_options]
74-
testpaths = ["cwl_utils/tests"]
75-
addopts = "-rsx -n auto"
74+
addopts = "-rsx -n auto --pyargs cwl_utils.tests"
7675

7776
[tool.hatch.version]
78-
path = "cwl_utils/__meta__.py"
77+
path = "src/cwl_utils/__meta__.py"
7978

8079
[tool.hatch.build.targets.sdist]
8180
only-include = [
8281
".flake8",
8382
".coveragerc",
8483
"create_cwl_from_objects.py",
8584
"CONTRIBUTING.md",
86-
"cwl_utils",
85+
"src/cwl_utils",
8786
"docs",
8887
"LICENSE",
8988
"lint-requirements.txt",
@@ -96,11 +95,6 @@ only-include = [
9695
"tox.ini"
9796
]
9897

99-
[tool.hatch.build.targets.wheel]
100-
only-include = [
101-
"cwl_utils",
102-
]
103-
10498
[tool.hatch.build.targets.wheel.hooks.mypyc]
10599
enable-by-default = false
106100
dependencies = [
@@ -112,8 +106,8 @@ dependencies = [
112106
]
113107
require-runtime-dependencies = true
114108
include = [
115-
"/cwl_utils/parser",
116-
"/cwl_utils/expression.py"
109+
"src/cwl_utils/parser",
110+
"src/cwl_utils/expression.py"
117111
]
118112

119113
[tool.hatch.envs.test]
@@ -139,4 +133,4 @@ ignore = [
139133
]
140134

141135
[tool.bandit]
142-
exclude_dirs = ["cwl_utils/tests"]
136+
exclude_dirs = ["src/cwl_utils/tests"]

release-test.sh

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ else
1717
repo=https://github.com/common-workflow-language/cwl-utils.git
1818
HEAD=$(git rev-parse HEAD)
1919
fi
20-
run_tests="bin/py.test --pyargs ${module}"
2120
pipver=23.1 # minimum required version of pip for Python 3.12
2221
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
2322

@@ -34,12 +33,7 @@ then
3433
pip install ".${extras}"
3534
make test
3635
pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install
37-
mkdir testenv1/not-${module}
38-
# if there is a subdir named '${module}' py.test will execute tests
39-
# there instead of the installed module's tests
40-
pushd testenv1/not-${module}
41-
# shellcheck disable=SC2086
42-
../${run_tests}; popd
36+
make test
4337
fi
4438

4539
python3 -m venv testenv2
@@ -64,9 +58,8 @@ make test
6458
cp dist/${module}*tar.gz ../../../testenv3/
6559
cp dist/${module}*whl ../../../testenv4/
6660
pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install
67-
popd # ../.. no subdir named ${proj} here, safe for py.testing the installed module
68-
# shellcheck disable=SC2086
69-
${run_tests}
61+
make test
62+
popd
7063
popd
7164

7265
# Is the source distribution in testenv2 complete enough to build
@@ -85,10 +78,7 @@ pushd out/${module}*
8578
make dist
8679
make test
8780
pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install
88-
mkdir ../not-${module}
89-
pushd ../not-${module}
90-
# shellcheck disable=SC2086
91-
../../${run_tests}; popd
81+
make test
9282
popd
9383
popd
9484

@@ -100,8 +90,5 @@ source bin/activate \
10090
&& pip install --force-reinstall -U pip==${pipver} \
10191
&& pip install build wheel
10292
pip install "$(ls ${module}*.whl)${extras}"
103-
mkdir not-${module}
104-
pushd not-${module}
105-
# shellcheck disable=SC2086
106-
../${run_tests}; popd
93+
make test
10794
popd

0 commit comments

Comments
 (0)