Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install with pyproject.toml #115

Merged
merged 3 commits into from
Jul 17, 2024
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: 0 additions & 2 deletions PICMI_Python/MANIFEST.in

This file was deleted.

14 changes: 7 additions & 7 deletions PICMI_Python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ The *Particle-In-Cell Modeling Interface* (**PICMI**) standard establishes conve

The goal of the standard is to propose a set (or dictionary) of names and definitions that can be used in simulations, with as little changes as possible between codes.

This contains the base classes for the implementation of the PICMI standard. In order to install this package, run:
This contains the base classes for the implementation of the PICMI standard. In order to install this package from PyPI, run:
```
python setup.py install
pip install picmistandard
```
The latest release of this package is also available via `pip`:

Optionally, the package can be installed from the source (run from the main directory since this uses the pyproject.toml file):
```
pip install picmistandard
python -m pip install .
```

The Python classes provided here should be the bases classes of the code specific implementation. For each class, the implementation
Expand Down Expand Up @@ -54,11 +55,10 @@ Change the tag number as needed to match the version number.
Now, go to the [GitHub releases page](https://github.com/picmi-standard/picmi/releases) and create a release matching the pushed tag.
If you are not signing your tags with GPG keys, the tagging and GitHub release can also be done in one step on this page.

The final step is to update the version on PyPI. It is recommended to use the twine command. Here are the commands:
The final step is to update the version on PyPI. It is recommended to use the twine command. Here are the commands (run from the main directory since this uses the pyproject.toml file):

```
cd PICMI_Python
python setup.py sdist bdist_wheel
python -m build --sdist --wheel
twine upload dist/*
```

Expand Down
21 changes: 0 additions & 21 deletions PICMI_Python/setup.py

This file was deleted.

11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@ This repository contains:

- A set of **example scripts** that use the PICMI standard (in the directory `Examples`)

- A **Python package** that contains the base classes for the implementation of the PICMI standard (in the directory `PICMI_Python`). In order to install this package, run:
- A **Python package** that contains the base classes for the implementation of the PICMI standard (in the directory `PICMI_Python`). It is best to install the package from PyPI:
```
cd PICMI_Python
python setup.py install
pip install picmistandard
```
The latest release of this package is also available via `pip`:
Optionally, it can be installed from the source (run from the main directory where the pyproject.toml file is).
```
pip install picmistandard
python -m pip install .
```

- The sources to generate the **Sphinx documentation** for the PICMI standard (in the directory `Docs`). In order to generate the Sphinx documentation, first install [Sphinx](http://www.sphinx-doc.org/en/master/), as well as the version of the PICMI standard that you would like to document (e.g. via `python setup.py`). Then type:
```
cd Docs
make html
```
You can then view the documentation by opening the file `Docs/build/html/index.html` with a standard web browser.
You can then view the documentation by opening the file `Docs/build/html/index.html` with a standard web browser.
30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "picmistandard"
dynamic = ["version"]
dependencies = ["numpy~=1.15",
"scipy~=1.5"]
description = "Python base classes for PICMI standard"
readme = "README.md"
license = {file = "License.txt"}
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: User Interfaces"
]

[tool.setuptools.dynamic]
version = {attr = "PICMI_Python.version.__version__"}

[tool.setuptools]
packages = ["picmistandard"]
package-dir = {"picmistandard" = "PICMI_Python"}

[project.urls]
Repository = "https://github.com/picmi-standard/picmi"
Documentation = "https://picmi.readthedocs.io/en/latest"