Skip to content

Commit

Permalink
build: restructure requirements (#40)
Browse files Browse the repository at this point in the history
* build: restructure requirements

remove requirements.txt files and replace with structured
requirements in setup.py, with extras_require for 'test' and
'docs'. set minimum python version to 3.10.

* ci: fix ci to install package properly

* fix: add ipykernel to docs requirements
  • Loading branch information
alubbock authored Aug 13, 2024
1 parent def62e5 commit 7ca9758
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 28 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 0 additions & 10 deletions doc/requirements.txt

This file was deleted.

11 changes: 0 additions & 11 deletions requirements.txt

This file was deleted.

7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@ def main():
author_email='[email protected]',
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=[
Expand Down

0 comments on commit 7ca9758

Please sign in to comment.