Skip to content

Commit 76a8ccc

Browse files
authored
Delete requirements.txt; related CI & test changes (#149)
* delete requirements.txt * add pytest-cov to tests_require * rework CI config * don't globally import ruptures in tests * more ruptures fix * install [optional] as well as [test] * nix reference to requirements.txt in sphinx docs
1 parent 61e0f54 commit 76a8ccc

File tree

5 files changed

+8
-19
lines changed

5 files changed

+8
-19
lines changed

.github/workflows/lint-and-test.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
matrix:
1010
os: [ubuntu-latest, macos-latest, windows-latest]
1111
python-version: [3.7, 3.8, 3.9, "3.10"]
12-
requirements: [requirements.txt]
12+
requirements: ['']
1313
include:
14-
- requirements: requirements-min.txt
14+
- requirements: "-r requirements-min.txt"
1515
python-version: 3.7
1616
os: ubuntu-latest
1717

@@ -23,13 +23,12 @@ jobs:
2323
uses: actions/setup-python@v1
2424
with:
2525
python-version: ${{ matrix.python-version }}
26-
- name: Install dependencies in ${{ matrix.requirements }}
26+
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
29-
pip install -r ${{ matrix.requirements }} .[all]
29+
pip install ${{ matrix.requirements }} .[test,optional]
3030
- name: Test with pytest
3131
run: |
32-
pip install pytest pytest-cov
3332
pytest --cov=pvanalytics --cov-config=.coveragerc --cov-report term-missing pvanalytics --runslow
3433
- name: Upload Coverage
3534
run: |
@@ -75,11 +74,8 @@ jobs:
7574
uses: actions/setup-python@v1
7675
with:
7776
python-version: ${{ matrix.python-version }}
78-
- name: Install dependencies
79-
run: |
80-
python -m pip install --upgrade pip
81-
pip install -r requirements.txt
8277
- name: Lint with flake8
8378
run: |
79+
python -m pip install --upgrade pip
8480
pip install flake8
8581
flake8 . --count --statistics --show-source

docs/index.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ It supports:
8282
and at minimum the last three minor versions
8383
- The latest release of `PVLib <https://pvlib-python.readthedocs.io>`_.
8484

85-
PVAnalytics depends on the following packages:
86-
87-
.. literalinclude:: ../requirements.txt
8885

8986
Contents
9087
========

pvanalytics/tests/quality/test_data_shifts.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import pytest
44
from pvanalytics.quality import data_shifts as dt
55
from ..conftest import DATA_DIR, requires_ruptures
6-
import ruptures
76

87

98
test_file_1 = DATA_DIR / "pvlib_data_shift.csv"
@@ -28,6 +27,7 @@ def test_detect_data_shifts(generate_series):
2827
Unit test that data shifts are correctly identified in the simulated time
2928
series.
3029
"""
30+
import ruptures
3131
signal_no_index, signal_datetime_index, df_weekly_resample, \
3232
changepoint_date = generate_series
3333
# Test that an error is thrown when a Pandas series with no datetime
@@ -62,6 +62,7 @@ def test_detect_data_shifts(generate_series):
6262
assert (len(shift_index_param.index) == len(signal_datetime_index.index))
6363

6464

65+
@requires_ruptures
6566
def test_get_longest_shift_segment_dates(generate_series):
6667
"""
6768
Unit test that the longest interval between data shifts is selected for

requirements.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
TESTS_REQUIRE = [
3030
'pytest',
31+
'pytest-cov',
3132
]
3233

3334
INSTALL_REQUIRES = [

0 commit comments

Comments
 (0)