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
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ test -d .venv || uv venv --python python$(cat .python-version-default)
Change into the newly created directory and after activating a virtual environment, install an editable version of this project along with its tests requirements:

```console
$ pip install -e .[dev] # or `uv pip install -e .[dev]`
$ pip install -e . --group dev # or `uv pip install -e . --group dev`
```

Now you can run the test suite:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ jobs:
- uses: hynek/setup-cached-uv@v2

- run: uv venv
- run: uv pip install -e .[dev]
- run: uv pip install -e . --group dev

- run: .venv/bin/python -Ic 'import structlog; print(structlog.__version__)'
if: runner.os != 'Windows'
Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Mastodon = "https://mastodon.social/@hynek"
Bluesky = "https://bsky.app/profile/hynek.me"
Twitter = "https://twitter.com/hynek"

[project.optional-dependencies]
[dependency-groups]
tests = [
"freezegun>=0.2.8",
"pretend",
Expand All @@ -60,7 +60,10 @@ docs = [
"sphinxext-opengraph",
"twisted",
]
dev = ["structlog[tests,typing]"]
dev = [
{include-group = "tests"},
{include-group = "typing"},
]


[tool.hatch.version]
Expand Down Expand Up @@ -140,7 +143,6 @@ ignore = [
"PLR2004", # numbers are sometimes fine
"PLW2901", # overwriting a loop var can be useful
"RUF001", # leave my smart characters alone
"RUF001", # leave my smart characters alone
"SLF001", # private members are accessed by friendly functions
"T201", # prints are fine
"TC", # TYPE_CHECKING blocks break autodocs
Expand Down
12 changes: 6 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env_list =
[testenv]
package = wheel
wheel_build_env = .pkg
extras =
dependency_groups =
tests: tests
mypy: typing
commands =
Expand Down Expand Up @@ -46,7 +46,7 @@ commands =
[testenv:docs-{build,doctests,linkcheck}]
# Keep base_python in sync with ci.yml/docs and .readthedocs.yaml.
base_python = py313
extras = docs
dependency_groups = docs
commands =
build: sphinx-build -n -T -W -b html -d {envtmpdir}/doctrees docs {posargs:docs/_build/}html
doctests: sphinx-build -n -T -W -b doctest -d {envtmpdir}/doctrees docs {posargs:docs/_build/}html
Expand All @@ -55,7 +55,7 @@ commands =
[testenv:docs-watch]
package = editable
base_python = {[testenv:docs-build]base_python}
extras = {[testenv:docs-build]extras}
dependency_groups = {[testenv:docs-build]dependency_groups}
deps = watchfiles
commands =
watchfiles \
Expand All @@ -77,13 +77,13 @@ commands = pre-commit run --all-files


[testenv:mypy-pkg]
extras = typing
dependency_groups = typing
commands = mypy src


[testenv:pyright]
deps = pyright
extras = typing
dependency_groups = typing
commands = pyright tests/typing


Expand All @@ -101,7 +101,7 @@ commands = python -c "import structlog; structlog.get_logger().warning('should b

[testenv:docset]
deps = doc2dash
extras = docs
dependency_groups = docs
allowlist_externals =
rm
cp
Expand Down