diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f7f140..f62aded 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,7 +37,7 @@ jobs: run: | pip install unittest-xml-reporting mkdir testresults - pip install -r requirements.txt + pip install -e .[lock-redis] - name: Run tests run: | python -m xmlrunner discover -s test -p '*.py' -o ./testresults @@ -84,7 +84,7 @@ jobs: - name: Install dependencies run: | pip install coverage - pip install -r requirements.txt + pip install -e .[lock-redis] - name: Generate coverage report run: | coverage run --source=watergrid -m unittest discover -s test -p '*.py' diff --git a/CHANGELOG.md b/CHANGELOG.md index f474b64..40262c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Changed - Bumped `redis` dependency to 4.2.2. +- Dependencies for `MetricsExporter` and `PipelineLock` modules must now be installed separately through `watergrid[...]` metapackages. ### Deprecated diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 6a87156..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -redis==4.2.2 -pycron==3.0.0 \ No newline at end of file diff --git a/setup.py b/setup.py index fd7c734..22786b7 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,6 @@ with open("README.md", "r") as fh: long_description = fh.read() -with open("requirements.txt", "r") as fh: - requirements = fh.read().splitlines() setuptools.setup( name="watergrid", @@ -23,5 +21,12 @@ "Operating System :: OS Independent", ], python_requires=">=3.9", - install_requires=requirements, + install_requires=[ + "pycron==3.0.0", + ], + extras_require={ + "lock-redis": ["redis==4.2.2"], + "metrics-elasticsearch": ["elastic-apm==6.8.1"], + }, + setup_requires=["black==22.3.0"], )