Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ jobs:
- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install build twine
pip install .
pip install ".[lint, test]"
pip install . --group test --group build twine

- name: Update version
id: version
Expand Down
11 changes: 8 additions & 3 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@ Python3.11+. This project has historically aimed to support several recent versi

## Installation

To get started, first fork and clone this repository. Then install the project and core packages as well as linting and testing dependencies:
To get started, first fork and clone this repository. Then install the project in "editable" mode, along with all of the dependencies needed for running and development:

```shell
pip install .
pip install ".[lint, test]"
pip install -e . --group dev
```

Developers that use a `uv` environment can "sync" the project to install the project with all dependencies:

```shell
uv sync
```

## Testing
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ Python development tools for MODFLOW 6 and related projects.

Python3.11+, dependency-free by default.

Two main dependency groups are available, oriented around specific use cases:
Two optional dependencies are available, oriented around specific use cases:

- `test`: pytest fixtures, markers, and extensions
- `ecosystem`: program/model management, definition file utilities
- `pytest`: pytest fixtures, markers, and extensions

## Installation

Expand All @@ -56,10 +56,10 @@ Two main dependency groups are available, oriented around specific use cases:
pip install modflow-devtools
```

To install an optional dependency group:
To install the optional dependencies (choose one or more):

```shell
pip install "modflow-devtools[test]"
pip install "modflow-devtools[ecosystem,pytest]"
```

To install from source and set up a development environment please see the [developer documentation](DEVELOPER.md).
Expand Down
18 changes: 14 additions & 4 deletions docs/md/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ Packages are [available on PyPi](https://pypi.org/project/modflow-devtools/) and
pip install modflow-devtools
```

Two optional dependencies are available, oriented around specific use cases:

- `ecosystem`: program/model management, definition file utilities
- `pytest`: pytest fixtures, markers, and extensions

To install the optional dependencies (choose one or more):

```shell
pip install modflow-devtools[ecosystem,pytest]
```

## Installing `modflow-devtools` from source

To set up a `modflow-devtools` development environment, first clone the repository:
Expand All @@ -16,11 +27,10 @@ To set up a `modflow-devtools` development environment, first clone the reposito
git clone https://github.com/MODFLOW-ORG/modflow-devtools.git
```

Then install the local copy as well as testing, linting, and docs dependencies:
Then install the local copy in "editable" mode, as well as dependencies needed for testing, linting, and build docs:

```
pip install .
pip install ".[lint, test, docs]"
```shell
pip install -e . --group dev
```

## Using `modflow-devtools` as a `pytest` plugin
Expand Down
90 changes: 16 additions & 74 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,47 +39,7 @@ requires-python = ">=3.11"
dynamic = ["version"]

[project.optional-dependencies]
build = [
"build",
"twine"
]
lint = [
"codespell[toml]",
"ruff",
"mypy"
]
test = [
"modflow-devtools[lint]",
"coverage",
"flaky",
"filelock",
"meson!=0.63.0",
"ninja",
"numpy",
"pandas",
"pytest!=8.1.0",
"pytest-cov",
"pytest-dotenv",
"pytest-xdist",
"PyYaml",
"syrupy <5.0.0"
]
docs = [
"sphinx",
"sphinx-rtd-theme",
"myst-parser"
]
# deprecated
dfn = [
"boltons",
"pooch",
"pyaml",
"pydantic",
"tomli",
"tomli-w"
]
# deprecated
models = [
ecosystem = [
"boltons",
"filelock",
"pooch",
Expand All @@ -88,9 +48,17 @@ models = [
"tomli",
"tomli-w"
]
# prefer ecosystem to dfn/models separately
ecosystem = ["modflow-devtools[dfn,models]"]
dev = ["modflow-devtools[lint,test,docs,dfn,models]"]
pytest = [
"numpy",
"pytest!=8.1.0",
"syrupy <5.0.0",
]
# optional dependencies listed below are deprecated, to be removed in version 2.x
# deprecated - prefer "ecosystem" to "dfn"/"models" separately
dfn = ["modflow-devtools[ecosystem]"]
models = ["modflow-devtools[ecosystem]"]
# deprecated - prefer "pytest" to "test" (to be kept only as a dependency-group)
test = ["modflow-devtools[pytest]"]

[dependency-groups]
build = [
Expand All @@ -103,10 +71,9 @@ lint = [
"mypy",
]
test = [
"modflow-devtools[lint]",
"modflow-devtools[ecosystem,pytest]", # self-reference to project.optional-dependencies
"coverage",
"flaky",
"filelock",
"meson!=0.63.0",
"ninja",
"numpy",
Expand All @@ -116,44 +83,19 @@ test = [
"pytest-dotenv",
"pytest-xdist",
"PyYaml",
"syrupy <5.0.0"
"syrupy <5.0.0",
{include-group = "lint"},
]
docs = [
"sphinx",
"sphinx-rtd-theme",
"myst-parser"
]
# deprecated
dfn = [
"boltons",
"pooch",
"pyaml",
"pydantic",
"tomli",
"tomli-w"
]
# deprecated
models = [
"boltons",
"filelock",
"pooch",
"pyaml",
"pydantic",
"tomli",
"tomli-w"
]
# prefer ecosystem to dfn/models separately
ecosystem = [
{include-group = "dfn"},
{include-group = "models"},
]
dev = [
"modflow-devtools[ecosystem,pytest]", # self-reference to project.optional-dependencies
{include-group = "build"},
{include-group = "lint"},
{include-group = "test"},
{include-group = "docs"},
{include-group = "dfn"},
{include-group = "models"},
]

[project.urls]
Expand Down
Loading