diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b5622b0..0125edc 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -27,13 +27,10 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install flake8 pytest nbval django codecov pytest-cov - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + pip install -e '.[tests]' - name: Lint with flake8 run: | - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics + flake8 . - name: Test with pytest run: | pytest --nbval --sanitize-with doc/pytest-sanitize.ini --cov=thunor diff --git a/.readthedocs.yml b/.readthedocs.yml index 888005d..6684e9a 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -26,4 +26,7 @@ sphinx: # Optionally declare the Python requirements required to build your docs python: install: - - requirements: doc/requirements.txt + - method: pip + path: . + extra_requirements: + - docs diff --git a/doc/requirements.txt b/doc/requirements.txt deleted file mode 100644 index eee5547..0000000 --- a/doc/requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ --r ../requirements.txt -MarkupSafe<2.2 -Sphinx==7.4.7 -jinja2==3.1.4 -jupyter-client==8.6.2 -mock==5.1.0 -nbformat==5.10.4 -nbsphinx==0.9.4 -notebook==7.2.1 -sphinx-rtd-theme==2.0.0 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 2d0e64d..0000000 --- a/requirements.txt +++ /dev/null @@ -1,11 +0,0 @@ -XlsxWriter==3.2.0 -ipython==8.26.0 -matplotlib==3.9.2 -numpy<3 -pandas==2.2.2 -plotly==5.23.0 -python-magic==0.4.27 -scipy==1.14.0 -seaborn==0.13.2 -tables==3.10.0 -xlrd==2.0.1 diff --git a/setup.py b/setup.py index 1ad2e8e..569710f 100644 --- a/setup.py +++ b/setup.py @@ -19,9 +19,14 @@ def main(): author_email='code@alexlubbock.com', url='https://www.thunor.net', packages=['thunor', 'thunor.converters'], + python_requires='>=3.10', install_requires=['numpy', 'scipy', 'pandas', 'plotly', 'seaborn', 'tables'], - tests_require=['pytest', 'nbval', 'django', 'nbformat'], + extras_require={ + 'test': ['pytest', 'nbval', 'django', 'nbformat'], + 'docs': ['sphinx<8', 'sphinx-rtd-theme', 'mock', 'nbsphinx', + 'ipykernel'], + }, cmdclass=versioneer.get_cmdclass(), zip_safe=True, classifiers=[