Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBB committed Feb 7, 2024
1 parent b8bcfb9 commit dd03268
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 28 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ test: pytest
doc:
$(MAKE) -C doc html


# Build targets (used from CI)

sdist:
Expand Down
47 changes: 21 additions & 26 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,14 @@ environment for Splipy. Once installed, run the command::
in the root Splipy directory. This will install Splipy and its dependencies in a
virtual environment located in the ``.venv`` directory.

You should activate this virtual environment whenever you work on Splipy. The
makefile commands do not require it, but it's a good habit::

source .venv/bin/activate

To run the tests::

make pytest
make test


Installing
Expand All @@ -62,8 +67,9 @@ To install, use::

To generate a package (source distribution or wheel), use::

poetry build -f sdist
poetry build -f wheel
make sdist
make wheel
make build # both sdist and wheel

Don't upload wheels to PyPI manually. They are built by CI runners whenever a
new version is tagged (see below).
Expand All @@ -88,42 +94,31 @@ Tests

To run the tests, use::

make pytest
make test

For benchmarks::

make bench


Code analysis
-------------

You can use pylint3 to perform static code analysis on the module.
This can help identify bugs and give suggestions for improvements.

To install, use::

poetry run pip install pylint

To perform the code analysis, use::

poetry run pylint -d C --rcfile=pylint.cfg splipy/


Releasing
---------

To make a new release, it is recommended to install `bumpversion
<https://pypi.python.org/pypi/bumpversion>`_. To make a new release, run::
To make a new release, run the `bump-my-version` command::

bump-my-version --dry-run <part>

Where `<part>` is the part you want to bump: either `major`, `minor`, `patch`,
`pre_label` or `pre_number`.

bumpversion <type>
You can also specify the new version directly by using::

where `type` is one of `patch`, `minor` or `major`. This will up the version
number, create a commit and a tag. To push this to github, use::
bump-my-version --dry-run --new-version <new_version>

git push --tags
Once you are satisfied with the results, run the command without `--dry-run`.
We highly recommend to always use a dry run!

After that, CI should automatically build and deploy the packages to pyPi. It
After that, CI should automatically build and deploy the packages to PyPi. It
would be helpful to monitor the actions so that errors can be fixed quickly.


Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ build-backend = "poetry.core.masonry.api"
[tool.bumpversion]
current_version = "1.8.2"
allow_dirty = false
commit = false
tag = false
commit = true
tag = true
parse = """(?x)
(?P<major>[0-9]+)
\\.(?P<minor>[0-9]+)
Expand Down

0 comments on commit dd03268

Please sign in to comment.