Skip to content

Commit eeccbce

Browse files
authored
Merge pull request #108 from xylar/move-tests-outside-of-package
Move tests outside of pyremap package
2 parents be807c3 + a4d145a commit eeccbce

32 files changed

+14
-11
lines changed

.github/workflows/build_workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,5 @@ jobs:
9090
CHECK_IMAGES: False
9191
run: |
9292
conda activate pyremap_dev
93-
pytest --pyargs pyremap
93+
pytest --pyargs tests
9494

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
recursive-include pyremap *.nc

ci/recipe/meta.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{% set name = "pyremap" %}
22
{% set version = "1.4.1" %}
3+
{% set python_min = "3.9" %}
34

45
package:
56
name: {{ name|lower }}
@@ -15,11 +16,11 @@ build:
1516

1617
requirements:
1718
host:
18-
- python >=3.9
19+
- python {{ python_min }}
1920
- pip
2021
- setuptools
2122
run:
22-
- python >=3.9
23+
- python >={{ python_min }}
2324
- numpy
2425
- scipy
2526
- netcdf4
@@ -32,8 +33,11 @@ requirements:
3233
test:
3334
requires:
3435
- pytest
36+
- python {{ python_min }}
37+
source_files:
38+
- tests
3539
commands:
36-
- pytest --pyargs pyremap
40+
- pytest --pyargs tests
3741
imports:
3842
- pyremap
3943

docs/developer_guide/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Welcome to the Developer Guide for `pyremap`. This section provides resources an
1818
- Place tests in the `pyremap/tests/` directory.
1919
- Run tests locally before submitting changes:
2020
```bash
21-
pytest --pyargs pyremap
21+
pytest --pyargs tests
2222
```
2323

2424
## Contribution Guidelines

docs/developer_guide/testing_instructions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This document provides detailed instructions for testing `pyremap`.
1818

1919
3. Run the test suite using `pytest`:
2020
```bash
21-
pytest --pyargs pyremap
21+
pytest --pyargs tests
2222
```
2323

2424
4. To run a specific test file, provide the file path:
@@ -28,7 +28,7 @@ This document provides detailed instructions for testing `pyremap`.
2828

2929
5. For more verbose output, use the `-v` flag:
3030
```bash
31-
pytest -v --pyargs pyremap
31+
pytest -v --pyargs tests
3232
```
3333

3434
## Writing Tests
@@ -41,7 +41,7 @@ This document provides detailed instructions for testing `pyremap`.
4141

4242
- Use the `--pdb` flag to drop into the Python debugger on test failure:
4343
```bash
44-
pytest --pdb --pyargs pyremap
44+
pytest --pdb --pyargs tests
4545
```
4646

4747
- Review the stack trace provided by `pytest` to identify the source of the failure.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ requires = ["setuptools>=60"]
9191
build-backend = "setuptools.build_meta"
9292

9393
[tool.setuptools.packages.find]
94-
exclude = ["ci*", "docs*", "licenses*", "examples*"]
94+
exclude = ["ci", "docs", "examples", "licenses", "tests"]
9595

9696
[tool.setuptools.dynamic]
9797
version = { attr = "pyremap.version.__version__" }
File renamed without changes.

pyremap/test/test_interpolate.py renamed to tests/test_interpolate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
ProjectionGridDescriptor,
3333
Remapper,
3434
)
35-
from pyremap.test import TestCase, loaddatadir # noqa: F401
35+
from tests import TestCase, loaddatadir # noqa: F401
3636

3737

3838
@pytest.mark.usefixtures('loaddatadir')

0 commit comments

Comments
 (0)