Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use hatchling instead of setuptools, add pixi task: pypi-publish #760

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

Merged
merged 9 commits into from
Jan 24, 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
5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

6 changes: 6 additions & 0 deletions docs/api/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ Changed
environments. This replaces the ``imod-environment.yml`` conda environment. We
advice doing development installations with pixi from now on. `See the
documentation. <https://deltares.github.io/imod-python/installation.html>`_
This does not affect users who installed with ``pip install imod``, ``mamba
install imod`` or ``conda install imod``.
- Changed build system from ``setuptools`` to ``hatchling``. Users who did a
development install are adviced to run ``pip uninstall imod`` and ``pip
install -e .`` again. This does not affect users who installed with ``pip
install imod``, ``mamba install imod`` or ``conda install imod``.


[0.15.1] - 2023-12-22
Expand Down
13 changes: 5 additions & 8 deletions docs/developing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ To follow these steps, you need to be one of the maintainers for imod on both
`PyPI <https://pypi.org/project/imod/>`_ and `conda-forge
<https://github.com/conda-forge/imod-feedstock>`_.

1. Update the :doc:`../api/changelog` and the pyproject.toml files.
1. Update the :doc:`../api/changelog` and the ``__version__`` in ``imod/__init__.py``,
and the version entry in the ``pixi.toml`` for complenetess.

2. Create a tag on your local machine and push it GitHub. `Old tags are here
<https://github.com/Deltares/imod-python/tags>`_. `Old releases are
Expand All @@ -96,14 +97,10 @@ To follow these steps, you need to be one of the maintainers for imod on both

4. Locally, ``git fetch --tags`` and ``git pull``, verify you are on the commit
you want to release, and that it is clean.

5. Run ``pixi run pypi-publish`` to build the package and upload to PyPI.

5. Remove the ``build``, ``dist``, ``imod.egg-info`` folders if present.

6. Create a source distribution under ``dist/`` with ``python -m build --sdist``

7. Upload the files from step 6 to PyPI with ``twine upload dist/*``

8. For `conda-forge <https://github.com/conda-forge/imod-feedstock>`_, a PR
6. For `conda-forge <https://github.com/conda-forge/imod-feedstock>`_, a PR
will be created automatically. If the requirements are up to date in
`meta.yaml
<https://github.com/conda-forge/imod-feedstock/blob/master/recipe/meta.yaml>`_
Expand Down
9 changes: 1 addition & 8 deletions imod/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from importlib.metadata import PackageNotFoundError, distribution

# exports
from imod import (
couplers,
Expand All @@ -17,9 +15,4 @@
)
from imod.formats import gen, idf, ipf, prj, rasterio

# version
try:
__version__ = distribution(__name__).version
except PackageNotFoundError:
# package is not installed
pass
__version__ = "0.15.1"
Loading