8000 [MAINT]: Remove tests from wheel distro (#2277) · nick-code-lab/pvlib-python@1eafae0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1eafae0

Browse files
echedey-lsAdamRJensenkandersolar
authored
[MAINT]: Remove tests from wheel distro (pvlib#2277)
* Move files only used in tests to `pvlib/tests/data` * Attemp # 1 * Fine-tune inclusion via no-automatic data inclusion * Update v0.11.2.rst * Fix flake8 warnings * Update docs/sphinx/source/whatsnew/v0.11.2.rst Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com> * Flatten the tests dir out of pvlib * fix CI * revert back to the 💩 CRLF * Update v0.7.2.rst * whatsnews * Update test_solcast.py --------- Co-authored-by: Adam R. Jensen <39184289+AdamRJensen@users.noreply.github.com> Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
1 parent 8bc594c commit 1eafae0

File tree

121 files changed

+179
-129
lines changed

Some content is hidden

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

121 files changed

+179
-129
lines changed

.github/workflows/pytest-remote-data.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
SOLARANYWHERE_API_KEY: ${{ secrets.SOLARANYWHERE_API_KEY }}
101101
BSRN_FTP_USERNAME: ${{ secrets.BSRN_FTP_USERNAME }}
102102
BSRN_FTP_PASSWORD: ${{ secrets.BSRN_FTP_PASSWORD }}
103-
run: pytest pvlib/tests/iotools --cov=./ --cov-report=xml --remote-data
103+
run: pytest tests/iotools --cov=./ --cov-report=xml --remote-data
104104

105105
- name: Upload coverage to Codecov
106106
if: matrix.python-version == 3.9 && matrix.suffix == ''

.github/workflows/pytest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
shell: bash -l {0} # necessary for conda env to be active
8080
run: |
8181
# ignore iotools; those tests are run in a separate workflow
82-
pytest pvlib --cov=./ --cov-report=xml --ignore=pvlib/tests/iotools
82+
pytest tests --cov=./ --cov-report=xml --ignore=tests/iotools
8383
8484
- name: Upload coverage to Codecov
8585
if: matrix.python-version == 3.9 && matrix.suffix == '' && matrix.os == 'ubuntu-latest' && matrix.environment-type == 'conda'

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ coverage.xml
8181

8282

8383
# Datafiles
84-
*.csv
85-
# Ignore some csv
86-
!pvlib/data/*.csv
84+
# Do not exclude data directories
85+
!pvlib/data/**
86+
!tests/data/**
8787

8888
# vi
8989
*.swp

codecov.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ flags:
1414
core:
1515
paths:
1616
- pvlib/
17+
- tests/
1718
- '!pvlib/iotools/'
18-
- '!pvlib/tests/iotools/'
19+
- '!tests/iotools/'
1920
carryforward: false
2021

2122
remote-data:
2223
paths:
2324
- pvlib/iotools/
24-
- pvlib/tests/iotools
25+
- tests/iotools
2526
carryforward: true # if not run, use coverage from previous commit
2627

2728

@@ -47,15 +48,15 @@ coverage:
4748
tests-core:
4849
target: 95%
4950
paths:
50-
- 'pvlib/tests/.*'
51-
- '!pvlib/tests/iotools/.*'
51+
- 'tests/.*'
52+
- '!tests/iotools/.*'
5253
flags:
5354
- core
5455

5556
tests-remote-data:
5657
target: 95%
5758
paths:
58-
- 'pvlib/tests/iotools/.*'
59+
- 'tests/iotools/.*'
5960
flags:
6061
- remote-data
6162

docs/sphinx/source/contributing/testing.rst

Lines changed: 3 additions & 3 deletions

docs/sphinx/source/whatsnew/v0.11.3.rst

Lines changed: 7 additions & 0 deletions

docs/sphinx/source/whatsnew/v0.7.2.rst

Lines changed: 1 addition & 1 deletion

pyproject.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,22 @@ all = ["pvlib[test,optional,doc]"]
8585
Documentation = "https://pvlib-python.readthedocs.io/"
8686
"Source Code" = "https://github.com/pvlib/pvlib-python"
8787

88+
[tool.setuptools]
89+
# do not include all non-python files in the bdist by default, but select them manually
90+
# https://setuptools.pypa.io/en/latest/userguide/datafiles.html#interplay-between-these-keywords (2024-10-22)
91+
include-package-data = false # true by default
92+
8893
[tool.setuptools.packages.find]
8994
include = ["pvlib*"]
9095

96+
[tool.setuptools.package-data]
97+
pvlib = ["data/*"]
98+
9199
[tool.setuptools_scm]
92100

93101
[tool.pytest]
94102
junit_family = "xunit2"
95-
testpaths = "pvlib/tests"
103+
testpaths = "tests"
96104
# warning messages to suppress from pytest output. useful in cases
97105
# where a dependency hasn't addressed a deprecation yet, and there's
98106
# nothing we can do to fix it ourselves.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)
0