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

Implementing TOML file for packaging #125

Merged
merged 22 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ __pypackages__/
.env
.venv
env/
venv/
venv*/
ENV/
env.bak/
venv.bak/
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ If you are a part of the AeoLiS team and have write access to the aeolis-python
3. Set up a development environment on your computer by installing the AeoLiS in development mode with the following command: (Consider using a virtual environment for this purpose.)

```bash
pip install -e .
pip install -e .[dev]
niketagrawal marked this conversation as resolved.
Show resolved Hide resolved
```

4. Set up your code editor to follow [PEP 8](https://peps.python.org/pep-0008/) (remove trailing white space, no tabs, etc.). Check code with [flake8](https://flake8.pycqa.org/en/latest/).
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
include aeolis/VERSION
include LICENSE.txt
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ effects, air humidity and roughness elements.
**Requirements:**

- Python 3.8 or higher
- Setuptools
- pip

### Installing from PyPI
Expand All @@ -35,12 +34,18 @@ pip install AeoLiS

1. Clone the repository (AEOLIS_V2 branch) using git, or download the source code.

2. Go to the `aeolis-python` directory and install using pip
2. AeoLiS users may install the package with only the required dependencies. Go to `aeolis-python` directory and install using pip
```shell
cd aeolis-python/
pip install .
```

3. AeoLiS developers may install the package including additional dependencies (test and documentation files). Go to `aeolis-python` directory and install as follows:
```shell
cd aeolis-python/
pip install .[dev]
```

### Running AeoLiS

Example from command line:
Expand Down
21 changes: 0 additions & 21 deletions README.rst

This file was deleted.

13 changes: 4 additions & 9 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,11 @@
We publish the package on PyPI. Only administrators can create new releases, and releases are made using the **main** branch.

## 1. Prepare Release
All of the Python
packaging instructions are in the the following files:

* `aoelis/VERSION`
* `setup.cfg`
* `setup.py`
All packaging instructions are in the [pyproject.toml](pyproject.toml)

A. Before generating a new release, make sure that all relevant code changes have been merge to the **main** branch.

B. Bump the version by updating the `aeolis/VERISON`. For consistency, you have to update the version on `CITATION.cff` and `README.md` (citation section).
B. Bump the version by updating the `pyproject.toml`. For consistency, you also have to update the version on `CITATION.cff` and `README.md` (citation section).

C. To test if the Python source package (`.tar.gz`) and the binary package (`.whl`) can be built without problem in the `dist/` directory, install `build` and build the package:

Expand All @@ -30,7 +25,7 @@ E. Make any relavant updates or changes to the package documentation. Then, push

## 2. Publish Release

A. On GitHub, create a new release. Use `v.x.x.x` as tag and title for the new release. In the description of the release use the same text we used in `docs/whatsnew.rst`. Mind about the MarkDown formatting.
A. On GitHub, create a new release. Use `v.x.x.x` as **tag** and **title** for the new release. In the description of the release use the same text we used in `docs/whatsnew.rst`. Mind about the MarkDown formatting.

B. Then, publish the relaese. This will trigger the `Upload PyPI release` workflow which builds and uploads the package to PyPI. This will take some time to complete.
B. Then, publish the relaese. This will trigger the `Upload PyPI release` CI workflow which builds and uploads the package to PyPI. This will take some time to complete.

1 change: 0 additions & 1 deletion aeolis/VERSION

This file was deleted.

66 changes: 66 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build]
exclude = [
"/docs",
"/notebooks",
"/aeolis/tests",
]

[project]
name = "AeoLiS"
version = "2.1.1"
authors = [
{ name="Sierd de Vries", email="sierd.devries@tudelft.nl" },
]
maintainers = [
{name="Sierd de Vries", email="sierd.devries@tudelft.nl"},
{name="Bart van de Westen"},
]
description = "A process-based model for simulating supply-limited aeolian sediment transport"
readme = "README.md"
requires-python = ">=3.8, <4"
license = {file = "LICENSE.txt"}
keywords = ["aeolian sediment", "transport", "model", "deltares", "tudelft"]
dependencies = [
"docopt==0.6.1",
"bmi-python",
"netCDF4",
"scipy",
"numpy<1.24,>=1.18",
"matplotlib",
"numba",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering :: Physics",
]

[project.optional-dependencies]
dev = [
"pytest",
"pytest-cov",
"Sphinx",
"sphinx-rtd-theme",
]

[project.scripts]
aeolis = "aeolis.console:aeolis"
aeolis-wind = "aeolis.console:wind"

[project.urls]
Homepage = "https://github.com/openearth/aeolis-python"
Documentation = "https://aeolis-python.readthedocs.io"
"Bug Tracker" = "https://github.com/openearth/aeolis-python/issues"
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

65 changes: 0 additions & 65 deletions setup.py

This file was deleted.