diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml index de768821..02d5dcff 100644 --- a/.github/workflows/check-pr.yml +++ b/.github/workflows/check-pr.yml @@ -27,9 +27,9 @@ jobs: with: python-version: "3.x" - - name: Install dependencies + - name: Install docs dependencies run: | - python -m pip install '.[docs]' + python -m pip install . --group docs - name: Sphinx build run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a187fb17..f54deabc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: run: data-morph --version - name: Install testing dependencies - run: python -m pip install '.[dev]' + run: python -m pip install --group test - name: Run tests run: pytest diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e1ffd355..81d1b062 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -38,7 +38,7 @@ jobs: - name: Install dependencies run: | - pip install '.[docs]' + pip install . --group docs - name: Sphinx build run: | git worktree add docs/_build/html gh-pages diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6f8b4509..0e71f904 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ Open up an issue describing in detail the bug or feature request you are proposi Once you have been given the go ahead, you can start working on the code. Start by forking the project, cloning locally, and then creating a branch to work on. You will need to then install the main dependencies as well as the `dev` and `docs` dependencies, which can be done by running the following command: ```shell -$ pip install -e '.[dev,docs]' +$ pip install -e . --group dev ``` Set up the pre-commit hooks to make sure you can pass the CI checks: diff --git a/docs/README.md b/docs/README.md index d2cbd10d..7ccacffc 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ # Docs -1. Install the docs dependencies: `pip install '.[docs]'`. +1. Install the docs dependencies: `pip install --group docs`. 2. From this directory, run `make html`. ## Managing versions diff --git a/pyproject.toml b/pyproject.toml index 379da0be..f830a249 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,26 +49,31 @@ dependencies = [ "pandas>=1.2", "rich>=13.9.4", ] -optional-dependencies.dev = [ - "pre-commit", - "pytest", - "pytest-cov", - "pytest-mock", - "pytest-randomly", - "pytest-xdist", -] -optional-dependencies.docs = [ + +urls."Bug Tracker" = "https://github.com/stefmolin/data-morph/issues" +urls."Documentation" = "https://stefaniemolin.com/data-morph/stable/api.html" +urls."Homepage" = "https://stefaniemolin.com/data-morph" +urls."Source" = "https://github.com/stefmolin/data-morph" +scripts.data-morph = "data_morph.cli:main" + +[dependency-groups] +dev = [ "pre-commit", { include-group = "docs" }, { include-group = "test" } ] + +test = [ + "pytest>=8.3.4", + "pytest-cov>=4.1.0", + "pytest-mock>=3.10.0", + "pytest-randomly>=3.12.0", + "pytest-xdist>=3.6.1", +] + +docs = [ "pydata-sphinx-theme>=0.15.3", "sphinx>=7.2.6", "sphinx-argparse-cli>=1.16.0", "sphinx-copybutton>=0.5.1", "sphinx-design>=0.6.1", ] -urls."Bug Tracker" = "https://github.com/stefmolin/data-morph/issues" -urls."Documentation" = "https://stefaniemolin.com/data-morph/stable/api.html" -urls."Homepage" = "https://stefaniemolin.com/data-morph" -urls."Source" = "https://github.com/stefmolin/data-morph" -scripts.data-morph = "data_morph.cli:main" [tool.setuptools.packages.find] where = [