Skip to content

Commit

Permalink
remove non required install for building documentation (#22)
Browse files Browse the repository at this point in the history
* remove non-required install for building documentation
* get package automatically in setup.py
* rewrite requirement files
  • Loading branch information
LegrandNico authored Feb 1, 2023
1 parent a857c12 commit ee53944
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 21 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ jobs:
- name: Build
run: |
sudo apt-get install graphviz
pip install git+https://github.com/embodied-computation-group/systole.git@dev
pip install .
pip install -r requirements-docs.txt
sphinx-build -b html docs/source docs/build/html
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ jobs:
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-tests.txt
pip install .
pip install ipykernel coverage pytest pytest-cov
python -m ipykernel install --user --name python3
- name: Run tests and coverage
Expand Down
4 changes: 1 addition & 3 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
-e .
xarray>=2022.6.0
pymc>=5.0.1
matplotlib>=3.0.2
jupyter_sphinx>=0.4.0
pydata-sphinx-theme>=0.12.0
sphinx-bootstrap-theme>=0.8.1
sphinxcontrib-bibtex>=2.4.2
sphinx-gallery>=0.11.0
myst-nb>=0.16.0
sphinx>=5.3.0
numpydoc>=1.4.0
Expand Down
1 change: 1 addition & 0 deletions requirements-tests.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
-e .
seaborn>=0.11.2
11 changes: 7 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
numpy>=1.17
numba>=0.51.2
matplotlib>=3.4.3
numpy>=1.18,<=1.23
numba>=0.56.4
matplotlib>=3.0.2
seaborn>=0.9.0
arviz>=0.12.0
pymc>=5.0.0
jax<=0.4.1
jaxlib<=0.4.1
jaxlib<=0.4.1
setuptools>=38.4
packaging
20 changes: 10 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import codecs
import os

from setuptools import setup
from setuptools import setup, find_packages

PROJECT_ROOT = os.path.dirname(os.path.realpath(__file__))
REQUIREMENTS_FILE = os.path.join(PROJECT_ROOT, "requirements.txt")

def get_requirements():
with codecs.open(REQUIREMENTS_FILE) as buff:
return buff.read().splitlines()

# Get the package's version number of the __init__.py file
def read(rel_path):
Expand Down Expand Up @@ -31,13 +37,7 @@ def get_version(rel_path):
DISTNAME = "ghgf"
AUTHOR = "ILAB"
MAINTAINER = "Nicolas Legrand"
MAINTAINER_EMAIL = "nicolas.legrand@cfin.au.dk"
INSTALL_REQUIRES = [
"jax>=0.3.13",
"jaxlib>=0.3.10",
]
PACKAGES = ["ghgf"]

MAINTAINER_EMAIL = "nicolas.legrand@cas.au.dk"


if __name__ == "__main__":
Expand All @@ -53,8 +53,8 @@ def get_version(rel_path):
long_description_content_type="text/x-rst",
license="GPL-3.0",
version=get_version("ghgf/__init__.py"),
install_requires=INSTALL_REQUIRES,
install_requires=get_requirements(),
include_package_data=True,
package_data={"": ["ghgf/ghgf/data/*.dat"]},
packages=PACKAGES,
packages=find_packages(),
)

0 comments on commit ee53944

Please sign in to comment.