diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d16f1ed..43f1ae1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,10 +25,5 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install . - pip install mkdocs-material - pip install mkdocstrings - pip install markdown-include - pip install -q 'setupext-janitor' # - pip install pytkdocs[numpy-style] + pip install .[dev,docs] pytest diff --git a/README.md b/README.md index 84b8e35..c7eb1f6 100644 --- a/README.md +++ b/README.md @@ -66,8 +66,9 @@ Once inside the environment, you can install ``CosmoPower``: cd cosmopower pip install . - To test the installation, you can use + To run the test suite, install the development extras and use ``pytest``: + pip install .[dev] pytest diff --git a/docs/installation.md b/docs/installation.md index 9f5bec6..6815ccc 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -23,6 +23,7 @@ Once inside the environment, you can install ``CosmoPower``: cd cosmopower pip install . - To test the installation, you can use + To run the test suite, install the development extras and use ``pytest``: + pip install .[dev] pytest diff --git a/pyproject.toml b/pyproject.toml index b045155..94a9929 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ [build-system] -requires = ["setuptools>=61.0", "wheel"] +requires = ["setuptools>=64", "wheel"] build-backend = "setuptools.build_meta" [project] -name = "cosmpower" +name = "cosmopower" version = "0.2.0" description = "Machine Learning - accelerated Bayesian inference" readme = "README.md" @@ -22,17 +22,26 @@ dependencies = [ "astropy>=3.2", "scikit-learn", "tqdm", - "gdown", - "jupyter", - "mkdocs-material", - "mkdocstrings", "matplotlib", - "pytest", "pyDOE", "h5py", "tensorflow>=2.18", "tensorflow_probability>=0.24", - "tf-keras" + "tf-keras", +] + +[project.optional-dependencies] +docs = [ + "mkdocs-material", + "mkdocstrings", + "pytkdocs[numpy-style]", +] +examples = [ + "jupyter", + "gdown", +] +dev = [ + "pytest", ] [project.urls] @@ -41,3 +50,11 @@ homepage = "https://alessiospuriomancini.github.io/cosmopower/" [tool.setuptools.packages.find] where = ["."] +[tool.pytest.ini_options] +filterwarnings = [ + "error", + "ignore::UserWarning", + "ignore::DeprecationWarning", +] +testpaths = ["cosmopower/tests"] + diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index d6c4dd2..0000000 --- a/pytest.ini +++ /dev/null @@ -1,7 +0,0 @@ -[pytest] -filterwarnings = - error - ignore::UserWarning - ignore::DeprecationWarning -testpaths = - cosmopower/tests diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 25b09ba..0000000 --- a/requirements.txt +++ /dev/null @@ -1,13 +0,0 @@ -scikit-learn -tqdm -gdown -jupyter -mkdocs-material -mkdocstrings -matplotlib -pytest -pyDOE -h5py -tensorflow>=2.18 -tensorflow_probability>=0.24 -tf-keras \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index fc1f76c..0000000 --- a/setup.py +++ /dev/null @@ -1,3 +0,0 @@ -from setuptools import setup - -setup() \ No newline at end of file