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
3 changes: 1 addition & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ jobs:

name: ${{ matrix.env.label }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ contains(matrix.env.name, 'pre') }} # make "all-green" pass even if pre-release job fails


continue-on-error: ${{ matrix.env.allow_failure }}

steps:
Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
sys.path.insert(0, str(HERE / "extensions"))


# -- Project information -----------------------------------------------------co
# -- Project information -----------------------------------------------------

# NOTE: If you installed your project in editable mode, this might be stale.
# If this is the case, reinstall it to refresh the metadata
info = metadata("pycea")
info = metadata("pycea-lineage")
project = info["Name"]
author = info["Author"]
copyright = f"{datetime.now():%Y}, {author}."
Expand Down Expand Up @@ -59,7 +59,7 @@
"sphinxcontrib.bibtex",
"sphinxcontrib.katex",
"sphinx_autodoc_typehints",
"sphinx_tabs.tabs",
"sphinx_design",
"IPython.sphinxext.ipython_console_highlighting",
"sphinxext.opengraph",
*[p.stem for p in (HERE / "extensions").glob("*.py")],
Expand Down
24 changes: 12 additions & 12 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ it is still possible to use different tools to manage dependencies, such as `uv`
In addition to the packages needed to _use_ this package,
you need additional python packages to [run tests](#writing-tests) and [build the documentation](#docs-building).

:::::{tabs}
::::{group-tab} Hatch
:::::{tab-set}
::::{tab-item} Hatch

On the command line, you typically interact with hatch through its command line interface (CLI).
Running one of the following commands will automatically resolve the environments for testing and
Expand Down Expand Up @@ -94,7 +94,7 @@ In this future, this may become easier through a hatch vscode extension.

::::

::::{group-tab} uv
::::{tab-item} uv

A popular choice for managing virtual environments is [uv][].
The main disadvantage compared to hatch is that it supports only a single environment per project at a time,
Expand All @@ -113,7 +113,7 @@ The `.venv` directory is typically automatically discovered by IDEs such as VS C

::::

::::{group-tab} Pip
::::{tab-item} Pip

Pip is nowadays mostly superseded by environment manager such as [hatch][].
However, for the sake of completeness, and since it’s ubiquitously available,
Expand Down Expand Up @@ -184,8 +184,8 @@ hatch env find hatch-test # list all possible test environment paths

Alternatively, you can run all tests from the command line by executing

:::::{tabs}
::::{group-tab} Hatch
:::::{tab-set}
::::{tab-item} Hatch

```bash
hatch test # test with the highest supported Python version
Expand All @@ -195,15 +195,15 @@ hatch test --all # test with all supported Python versions

::::

::::{group-tab} uv
::::{tab-item} uv

```bash
uv run pytest
```

::::

::::{group-tab} Pip
::::{tab-item} Pip

```bash
source .venv/bin/activate
Expand Down Expand Up @@ -297,8 +297,8 @@ please check out [this feature request][issue-render-notebooks] in the `cookiecu

### Building the docs locally

:::::{tabs}
::::{group-tab} Hatch
:::::{tab-set}
::::{tab-item} Hatch

```bash
hatch run docs:build
Expand All @@ -307,7 +307,7 @@ hatch run docs:open

::::

::::{group-tab} uv
::::{tab-item} uv

```bash
cd docs
Expand All @@ -317,7 +317,7 @@ uv run sphinx-build -M html . _build -W

::::

::::{group-tab} Pip
::::{tab-item} Pip

```bash
source .venv/bin/activate
Expand Down
14 changes: 8 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ dependencies = [
"session-info",
"treedata>=0.2.2",
]
# https://docs.pypi.org/project_metadata/#project-urls
urls.Documentation = "https://pycea.readthedocs.io/"
urls.Homepage = "https://github.com/colganwi/pycea"
urls.Source = "https://github.com/colganwi/pycea"

[project.urls]
Documentation = "https://pycea.readthedocs.io/"
Homepage = "https://github.com/colganwi/pycea"
Source = "https://github.com/colganwi/pycea"

[dependency-groups]
dev = [
Expand All @@ -60,7 +61,7 @@ doc = [
"sphinx-autodoc-typehints",
"sphinx-book-theme>=1",
"sphinx-copybutton",
"sphinx-tabs",
"sphinx-design>=0.7.0",
"sphinxcontrib-bibtex>=1",
"sphinxcontrib-katex",
"sphinxext-opengraph",
Expand All @@ -71,7 +72,8 @@ installer = "uv"
dependency-groups = [ "dev" ]

[tool.hatch.envs.docs]
features = [ "doc" ]
installer = "uv"
dependency-groups = [ "doc" ]
scripts.build = "sphinx-build -M html docs docs/_build {args}"
scripts.open = "python -m webbrowser -t docs/_build/html/index.html"
scripts.clean = "git clean -fdX -- {args:docs}"
Expand Down
Loading