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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ coverage.xml
*.log

# Sphinx documentation
doc/_build/
docs/_build/

# PyBuilder
target/
Expand Down
18 changes: 18 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2

sphinx:
configuration: docs/conf.py

build:
os: ubuntu-24.04
tools:
python: "3.13"
jobs:
pre_create_environment:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
create_environment:
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
install:
- UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen --group docs
3 changes: 3 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ publish: build

examples:
uv run --extra all python -m physt.examples

docs:
uv run --extra all sphinx-build -b html docs/ docs/_build/html
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ uv run --with "physt[terminal]>=0.8.3" -m physt.examples

## Command-line interface (experimental)

You can run (and install) `physt` as a command-line application to quickly analyse
You can run (and install) `physt` as a command-line application to quickly analyse
data files. This functionality is currently in development.

```shell
Expand All @@ -52,7 +52,7 @@ hist << 190 # <--- add a forgotten value
hist.plot() # <--- and plot it
```

![Heights plot](doc/heights.png)
![Heights plot](docs/heights.png)

## 2D example

Expand All @@ -65,7 +65,7 @@ iris_hist = h2(iris["sepal_length"], iris["sepal_width"], "pretty", bin_count=[1
iris_hist.plot(show_zero=False, cmap="gray_r", show_values=True);
```

![Iris 2D plot](doc/iris-2d.png)
![Iris 2D plot](docs/iris-2d.png)

## 3D directional example

Expand All @@ -86,19 +86,18 @@ h = special_histograms.spherical(data)
h.projection("theta", "phi").plot.globe_map(density=True, figsize=(7, 7), cmap="rainbow")
```

![Directional 3D plot](doc/globe.png)
![Directional 3D plot](docs/globe.png)

See more in docstring's and notebooks:

- Basic tutorial: <http://nbviewer.jupyter.org/github/janpipek/physt/blob/dev/doc/tutorial.ipynb>
- Binning: <http://nbviewer.jupyter.org/github/janpipek/physt/blob/dev/doc/binning.ipynb>
- 2D histograms: <http://nbviewer.jupyter.org/github/janpipek/physt/blob/dev/doc/2d_histograms.ipynb>
- Special histograms (polar, spherical, cylindrical - *beta*): <http://nbviewer.jupyter.org/github/janpipek/physt/blob/dev/doc/special_histograms.ipynb>
- Adaptive histograms: <http://nbviewer.jupyter.org/github/janpipek/physt/blob/dev/doc/adaptive_histogram.ipynb>
- Use dask for large (not "big") data - *alpha*: <http://nbviewer.jupyter.org/github/janpipek/physt/blob/dev/doc/dask.ipynb>
- Geographical bins . *alpha*: <http://nbviewer.jupyter.org/github/janpipek/physt/blob/dev/doc/geospatial.ipynb>
- Plotting with vega backend: <http://nbviewer.jupyter.org/github/janpipek/physt/blob/dev/doc/vega-examples.ipynb>
...and others, see the `doc` directory.
- Basic tutorial: <http://nbviewer.jupyter.org/github/janpipek/physt/blob/dev/docs/tutorial.ipynb>
- Binning: <http://nbviewer.jupyter.org/github/janpipek/physt/blob/dev/docs/binning.ipynb>
- 2D histograms: <http://nbviewer.jupyter.org/github/janpipek/physt/blob/dev/docs/2d_histograms.ipynb>
- Special histograms (polar, spherical, cylindrical - *beta*): <http://nbviewer.jupyter.org/github/janpipek/physt/blob/dev/docs/special_histograms.ipynb>
- Adaptive histograms: <http://nbviewer.jupyter.org/github/janpipek/physt/blob/dev/docs/adaptive_histogram.ipynb>
- Use dask for large (not "big") data - *alpha*: <http://nbviewer.jupyter.org/github/janpipek/physt/blob/dev/docs/dask.ipynb>
- Geographical bins . *alpha*: <http://nbviewer.jupyter.org/github/janpipek/physt/blob/dev/docs/geospatial.ipynb>
...and others, see the `docs` directory.

## Installation

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion doc/conf.py → docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

# General information about the project.
project = "Physt"
copyright = "2016, Jan Pipek"
copyright = "2016-2025, Jan Pipek"
author = "Jan Pipek"

import physt.binnings
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 13 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,19 @@ dependencies = [
]

[tool.uv]
dev-dependencies = ["physt[all]"]
dev-dependencies = [
"bumpver>=2025.1131",
"mypy>=1.18.2",
"nbsphinx>=0.9.7",
"physt[all]",
"pytest>=8.4.1",
"pytest-xdist>=3.8.0",
"sphinx>=7.4.7",
"sphinx-rtd-theme>=3.0.2",
"sphinxcontrib-apidoc>=0.6.0",
]

[project.optional-dependencies]
dev = ["pytest", "mypy>=1.8", "types-setuptools", "bumpver", "pytest-xdist"]
# doc = ["sphinx", "sphinx_rtd_theme", "sphixncontrib-apidoc", "nbsphinx"]
astropy = ["astropy>=6.0"]
dask = ["dask[array]>=2023.0"]
pandas = ["pandas>=1.3"]
Expand Down Expand Up @@ -62,7 +70,7 @@ include = '\.pyi?$'
# TODO: revisit
ignore_missing_imports = true
# plugins = ["numpy.typing.mypy_plugin"]
exclude = ["doc"]
exclude = ["docs"]

[tool.isort]
profile = "black"
Expand All @@ -76,7 +84,7 @@ where = ["src"]
[tool.ruff]
# Be a bit tolerant
# line-length = 100
extend-exclude = ["doc"]
extend-exclude = ["docs"]
target-version = "py39"

[tool.ruff.per-file-ignores]
Expand Down
Loading
Loading