Skip to content

Commit

Permalink
Prepare for PEP 771 (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
eltos committed Feb 15, 2025
1 parent d561078 commit 8310f85
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A plotting library for [Xsuite](https://github.com/xsuite) and simmilar accelera
## Usage

```bash
pip install xplt[full]
pip install xplt[recommended]
```

Read the docs at https://xsuite.github.io/xplt
Expand Down
10 changes: 7 additions & 3 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
## Installation

```bash
pip install xplt[full]
pip install xplt[recommended]
```

It is recommended to install the library with all optional dependencies, to make use its full functionality.
For a minimal installation without `[full]`, certain features like automatic unit conversion and resolving or support for pandas dataframes are disabled.
The following extras are available:
- `xplt[minimal]` Minimal installation, certain features like unit conversion and unit resolving are disabled
- `xplt[recommended]` Recommended default
- `xplt[full]` Includes optional dependencies, adds support for pandas data frames

Currently, `pip install xplt` defaults to `xplt[minimal]`. Once [PEP 771](https://peps.python.org/pep-0771/) is established, this will change to `xplt[recommended]` instead.


## Gallery
Expand Down
22 changes: 16 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,37 @@ classifiers = [
"Framework :: Matplotlib",
"Programming Language :: Python :: 3",
]
dynamic = ["version"]

requires-python = ">=3.9"
dependencies = [
"matplotlib>=3.6",
"numpy>=1.17.0",
"scipy>=1.2.0",
]
dynamic = ["version"]

[project.urls]
homepage = "https://github.com/eltos/xplt"
documentation = "https://xsuite.github.io/xplt"
repository = "https://github.com/xsuite/xplt"
# PEP 771
#default-optional-dependency-keys = [
# "recommended",
#]

[project.optional-dependencies]
minimal= []
recommended = [
"pint>=0.24.1",
]
full = [
"xplt[recommended]",
"pandas",
"pint>=0.24.1",
]


[project.urls]
homepage = "https://github.com/eltos/xplt"
documentation = "https://xsuite.github.io/xplt"
repository = "https://github.com/xsuite/xplt"


# Build tools

[build-system]
Expand Down

0 comments on commit 8310f85

Please # to comment.