You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/README.md
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,28 +3,32 @@
3
3
This package implements different workflows for CI.
4
4
They are organised as follows.
5
5
6
-
###Documentation
6
+
## Documentation
7
7
8
-
The `documentation` workflow triggers on any push to master, builds the documentation and pushes it to the `gh-pages` branch (if the build is successful).
9
-
It runs on `ubuntu-latest` and `Python 3.9`.
8
+
The `documentation` workflow builds the documentation.
9
+
It runs on `ubuntu-latest` and the latest supported Python version.
10
+
If the workflow is run from `master` it pushes the successfully build documentation to the `gh-pages` branch.
11
+
If run from a `pull_request` the documentation is uploaded as an artifact to allow manual checks.
10
12
11
-
###Testing Suite
13
+
## Testing Suite
12
14
13
-
Tests are ensured in the `tests` workflow, which triggers on all pushes.
14
-
Tests run on a matrix of all GitHub Actions supported operating systems for all supported Python versions (currently `3.8+`).
15
+
Tests are ensured in the `tests` workflow.
16
+
Tests run on a matrix of all supported operating systems and all currently supported Python versions.
15
17
16
-
###Test Coverage
18
+
## Test Coverage
17
19
18
-
Test coverage is calculated in the `coverage`wokflow, which triggers on pushes to `master` and any push to a `pull request`.
19
-
It runs on `ubuntu-latest` and `Python 3.9`, and reports the coverage results of the test suite to `Codecov`.
20
+
Test coverage is calculated in the `coverage`workflow.
21
+
It runs on `ubuntu-latest` and our latest supported Python version, and reports the coverage results of the test suite to `Codecov`.
20
22
21
-
###Regular Testing
23
+
## Regular Testing
22
24
23
-
A `cron` workflow triggers every Saturday at 12:00 (UTC time) and runs the full testing suite, on all GitHub Actions supported operating systems for all supported Python versions (currently `3.8+`).
24
-
It also runs on `Python 3.x` so that newly released Python versions that would break tests are automatically detected and reported.
25
+
A `cron` workflow triggers every Saturday at 12:00 (UTC time) and runs the full testing suite, on all supported operating systems and supported Python versions.
26
+
It is very similar to the normal Testing Suite, but in addition also runs on `Python 3.x` so that newly released Python versions that would break tests are automatically included.
25
27
26
-
###Publishing
28
+
## Publishing
27
29
28
-
Publishing to `PyPI` is done through the `publish` workflow, which triggers anytime a `release` is made of the GitHub repository and runs on `ubuntu-latest` and `Python 3.9`.
29
-
It builds a source distribution (`tar.gz`) and a `wheel` of the package, and pushes to `PyPI` if the builds are successful.
30
-
No matrix is needed for this build as `pyhdtoolkit` is a pure python package and generates `*-py3-none-any.whl` wheels.
30
+
Publishing to `PyPI` is done through the `publish` workflow, which triggers anytime a `release` is made on GitHub.
31
+
It runs on `ubuntu-latest` and the latest supported Python version.
32
+
33
+
It builds the package (source distribution and `wheel`), checks the created artifacts, and pushes to `PyPI` if checks are successful.
34
+
No matrix is needed for this build as `pyhdtoolkit` is a pure python package and generates `*-py3-none-any.whl` wheels.
@echo "Building static pages with $(D)Sphinx$(E)."
78
-
@python -m sphinx -v -b html docs doc_build -d doc_build
76
+
@uv run python -m sphinx -v -b html docs doc_build -d doc_build
79
77
80
78
format:
81
-
@echo "Formatting code to PEP8 with $(P)isort$(E) and $(P)Black$(E) for $(C)docs$(E), $(C)pyhdtoolkit$(E) and $(C)tests$(E) folders. Max line length is 120 characters."
82
-
@python -m isort .&& black .
83
-
@echo "Formatting code to PEP8 with $(P)isort$(E) and $(P)Black$(E) for $(C)examples$(E) folder. Max line length is 95 characters."
84
-
@python -m isort examples && black -l 95 examples
85
-
86
-
install: format clean
87
-
@echo "Installing (editable) with $(D)pip$(E) in the current environment."
88
-
@python -m pip install --editable . -v
89
-
90
-
lines: format
79
+
@echo "Formatting code in $(C)docs$(E), $(C)tests$(E) and $(C)pyhdtoolkit$(E)."
80
+
@uvx isort docs && uvx black docs
81
+
@uvx isort tests && uvx black tests
82
+
@uvx isort pyhdtoolkit && uvx black pyhdtoolkit
83
+
@echo "Formatting code to PEP8 with $(P)isort$(E) and $(P)Black$(E) for $(C)examples$(E) folder."
84
+
@uvx isort examples && uvx black -l 95 examples
85
+
86
+
install:
87
+
@echo "Installing (editable) the package in the current environment."
88
+
@uv pip install --editable .
89
+
90
+
lines:
91
+
@echo "Counting lines of code with $(P)tokei$(E)."
91
92
@tokei .
92
93
93
-
lint: format
94
-
@echo "Linting code with $(P)Pylint$(E)."
95
-
@python -m pylint pyhdtoolkit/
96
-
97
-
typing: format
98
-
@echo "Checking code typing with $(P)mypy$(E)."
99
-
@python -m mypy pyhdtoolkit
100
-
@make clean
101
-
102
-
103
-
# ----- Tests Targets ----- #
104
-
105
-
quicktests: # all tests not involving pyhdtoolkit.cpymadtools
106
-
@python -m pytest -k "not test_cpymadtools" -n auto -v
107
-
108
-
slowtests: # all tests for pyhdtoolkit.cpymadtools
109
-
@python -m pytest -k "test_cpymadtools" -n auto -v
94
+
lint:
95
+
@echo "Linting code with $(P)Ruff$(E)."
96
+
@uvx ruff check pyhdtoolkit
110
97
111
-
alltests:
112
-
@python -m pytest -n auto -v
98
+
tests:
99
+
@uv run python -m pytest -n auto -v
113
100
114
101
# Catch-all unknow targets without returning an error. This is a POSIX-compliant syntax.
0 commit comments