-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify coverage and lint actions v2 (#435)
* simplify coverage and lint actions * move around the testing for coverage * try 3.11 * clean up a bit * separate tests * run tests twice * no coverage target for cython tests * full tests for polygon_to_cells_experimental * i think that gets the actions how we want
- Loading branch information
Showing
26 changed files
with
95 additions
and
83 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: lint_and_coverage | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: ['*'] | ||
|
||
jobs: | ||
linting: | ||
name: Lint and Coverage | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Install from source | ||
run: pip install .[test] | ||
|
||
- name: Run Linting | ||
uses: astral-sh/ruff-action@v3 | ||
|
||
- name: Coverage Requirement - Library | ||
run: | | ||
pytest --cov=tests/test_lib --cov-fail-under=100 | ||
- name: Coverage - Cython | ||
run: | | ||
pip install cython | ||
cythonize tests/test_cython/cython_example.pyx | ||
pytest --cov=tests/test_cython |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
We separate the `h3-py` tests into two groups, organized by subfolder. | ||
|
||
We do this because we expect 100% coverage on the library tests, but are | ||
still working through getting full coverage on the Cython tests. | ||
|
||
|
||
## `test_lib` | ||
|
||
The tests in this folder are for the main `h3-py` Python API for folks | ||
who are using the pure-Python library functionality. | ||
|
||
## `test_cython` | ||
|
||
The tests in this folder are for the advanced Cython API, that allows | ||
for other *Cython* packages or scripts to use the Cython code provided | ||
by the `h3-py` internals. | ||
|
||
Note that the "Cython API" of `h3-py` is not currently externally supported. |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.