Skip to content
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
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ Install from pypi::

pip install allantools

Latest version + examples, tests, test data, iPython notebooks : clone from github, then install ::
Latest version + examples, tests, test data, iPython notebooks : clone from github, then from the cloned repository install ::

python setup.py install
pip install .

(see `python setup.py --help install` for install options)
(see `pip install -h` for install options)

These commands should be run as root for system-wide installation, or
you can use the `--user` option to install for your account only.
Exact command names may vary depending on your OS / package manager / target python version.
Exact command names may vary depending on your OS / package manager / target python version. If command `pip` is not available or does not install the package in the expected python version, `python -m pip install .` is equivalent.

Basic usage
-----------
Expand Down
15 changes: 12 additions & 3 deletions docs/dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@ Here follows an un-ordered to do list:
Make sure your patch does not break any of the tests, and does not
significantly reduce the readability of the code.


Hatch environment
-----------------

Current version of pyproject.toml supposes the use of `hatch` for developping the package.
Optional dependencies needed for development (e.g. `numpydoc`, `pytest`) are only installed if the `dev` environment is invoked, e.g. `hatch -e dev shell`.

Documentation generation
------------------------
See /docs for documentation in sphinx format. On Ubuntu this requires
the **python-sphinx** and **python-numpydoc** packages.
See /docs for documentation in sphinx format. This requires
the **sphinx**, **sphinx-rtd-theme** and **numpydoc** packages (they should be installed automatically if you are using the `dev` environment from `hatch`, but can also be installed by your distribution manager if you prefer, e.g `apt install python3-sphinx sphinx-rtd-theme-common python3-numpydoc` on Ubuntu).
html/pdf documentation using sphinx can be built locally with::

/docs$ make html
Expand All @@ -55,6 +62,8 @@ reason are marked 'fails'. To run all tests::

$ py.test

You can also use `hatch test`.

To exclude known failing tests::

$ py.test -m "not fails" --durations=10
Expand Down Expand Up @@ -94,7 +103,7 @@ Creating a source distribution

::

python setup.py sdist
hatch build sdist

This creates a package in dist/
Testing the source distribution. The install takes a long time while
Expand Down
11 changes: 8 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ version = "2024.06"
dependencies = [
"numpy",
"scipy>=1.6.0",
"numpydoc",
"matplotlib",
"pytest",
]
requires-python = ">=3.8"
authors = [
Expand All @@ -34,7 +32,14 @@ exclude = [
"experimental/*",
]

[project.optional-dependencies]
[tool.hatch.envs.dev]
extra-dependencies = [
"sphinx",
"sphinx-rtd-theme",
"numpydoc",
"pytest",
"coverage",
]

[project.urls]
Homepage = "https://github.com/aewallin/allantools"
Expand Down