Skip to content

Commit

Permalink
align dev commands with holoviews
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt committed Feb 19, 2025
1 parent 6b03a1b commit 9330a35
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
12 changes: 6 additions & 6 deletions doc/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ If you have any problems with the steps here, please reach out in the `dev` chan
0. Open an [issue on Github](https://github.com/holoviz/hvplot/issues) if needed
1. Fork and clone [hvPlot's Github repository](https://github.com/holoviz/hvplot)
2. Install [`pixi`](https://pixi.sh)
3. Run `pixi run install-dev` to create your development environment
3. Run `pixi run setup-dev` to create your development environment
4. Make some changes and run:
- `pixi run test-unit` if you updated the source code to run the unit tests
- `pixi run test-example` if you updated the notebooks to run them
- `pixi run docs-build-dev` if you need to build the website locally
- `pixi run docs-build` if you need to build the website locally
5. Open a Pull Request

## Preliminaries
Expand Down Expand Up @@ -80,7 +80,7 @@ This `hvplot` directory is the _source checkout_ for the remainder of this docum
To start developing, run the following command, this will create an environment called `default` (in `.pixi/envs`), install hvPlot in [editable mode](https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs), download test datasets, and install `pre-commit`:

```bash
pixi run install-dev
pixi run setup-dev
```

:::{admonition} Note
Expand All @@ -106,7 +106,7 @@ pixi run sync-git-tags

The `default` environment is meant to provide all the tools needed to develop hvPlot.

This environment is created by running `pixi run install-dev`. Run `pixi shell` to activate it; this is equivalent to `source venv/bin/activate` in a Python virtual environment or `conda activate` in a conda environment.
This environment is created by running `pixi run setup-dev`. Run `pixi shell` to activate it; this is equivalent to `source venv/bin/activate` in a Python virtual environment or `conda activate` in a conda environment.

If you need to run a command directly instead of via `pixi`, activate the environment and run the command (e.g. `pixi shell` and `pytest hvplot/tests/<somefile.py>`).

Expand Down Expand Up @@ -137,7 +137,7 @@ You can launch Jupyter lab with the `default` environment with `pixi run lab`. T

## Linting

hvPlot uses [`pre-commit`](https://pre-commit.com/) to lint and format the source code. `pre-commit` is installed automatically when running `pixi run install-dev`; it can also be installed with `pixi run lint-install`.
hvPlot uses [`pre-commit`](https://pre-commit.com/) to lint and format the source code. `pre-commit` is installed automatically when running `pixi run setup-dev`; it can also be installed with `pixi run lint-install`.
`pre-commit` runs all the linters when a commit is made locally. Linting can be forced to run for all the files with:

```bash
Expand Down Expand Up @@ -209,7 +209,7 @@ pixi run test-example
The documentation can be built with the command:

```bash
pixi run docs-build-dev
pixi run docs-build
```

As hvPlot uses notebooks for much of the documentation, this takes a little while. You can disable building the gallery by setting the environment variable `HVPLOT_REFERENCE_GALLERY` to `false`.
Expand Down
9 changes: 5 additions & 4 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ param = ">=1.12.0,<3.0"
[feature.required.tasks]
download-data = 'python scripts/download_data.py'
install = 'python -m pip install --no-deps --disable-pip-version-check -e .'
install-dev = { cmd = "pre-commit install", depends-on = ["install", "download-data"] }
setup-dev = { depends-on = ["install", "download-data", "lint-install"] }
sync-git-tags = 'python scripts/sync_git_tags.py hvplot'

[feature.required.activation.env]
Expand Down Expand Up @@ -232,10 +232,11 @@ MPLBACKEND = "Agg"
DISPLAY = ":99.0"

[feature.doc.tasks]
docs-build = 'sphinx-build -b html doc builtdocs'
# docs-build-dev = { cmd = "pre-commit install", depends-on = ["install", "docs-build"] }
docs-build-sphinx = 'sphinx-build -b html doc builtdocs'
_docs-install = 'python -m pip install --no-deps --disable-pip-version-check -e .'
docs-build-dev = { depends-on = ["_docs-install", "docs-build"] }
# Depends on _docs-install instead of install as install
# in the default environment
docs-build = { depends-on = ["_docs-install", "docs-build-sphinx"] }


# ================== BUILD ====================
Expand Down

0 comments on commit 9330a35

Please sign in to comment.