Skip to content

Commit 4690800

Browse files
committed
[skip ci] update readme with information on how to release to PyPI
1 parent e5ae1be commit 4690800

1 file changed

Lines changed: 33 additions & 10 deletions

File tree

README.md

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<img src="docs/img/zodipy_logo.png" width="350">
32

43
[![astropy](https://img.shields.io/badge/powered%20by-AstroPy-orange.svg)](http://www.astropy.org/)
@@ -13,19 +12,19 @@
1312
[![ascl:2306.012](https://img.shields.io/badge/ascl-2306.012-blue.svg?colorB=262255)](https://ascl.net/2306.012)
1413
[![DOI](https://zenodo.org/badge/394929213.svg)](https://zenodo.org/doi/10.5281/zenodo.10999611)
1514
[![DOI](https://joss.theoj.org/papers/10.21105/joss.06648/status.svg)](https://doi.org/10.21105/joss.06648)
16-
---
17-
1815

16+
---
1917

2018
ZodiPy is an [Astropy affiliated](https://www.astropy.org/affiliated/#affiliated-package-list) package for simulating zodiacal light in intensity for arbitrary solar system observers.
2119

2220
![plot](docs/img/zodipy_map.png)
2321

24-
2522
## Documentation
23+
2624
See the [documentation](https://cosmoglobe.github.io/zodipy/) for a list of supported zodiacal light models and examples of how to use ZodiPy.
2725

2826
## A simple example
27+
2928
```python
3029
import astropy.units as u
3130
from astropy.coordinates import SkyCoord
@@ -50,65 +49,89 @@ print(emission)
5049
```
5150

5251
## Related scientific papers
52+
5353
See [CITATION](https://github.com/Cosmoglobe/zodipy/blob/main/CITATION.bib)
54-
- [Cosmoglobe: Simulating zodiacal emission with ZodiPy (San et al. 2022)](https://arxiv.org/abs/2205.12962).
55-
- [ZodiPy: A Python package for zodiacal light simulations (San 2024)](https://joss.theoj.org/papers/10.21105/joss.06648#).
5654

55+
- [Cosmoglobe: Simulating zodiacal emission with ZodiPy (San et al. 2022)](https://arxiv.org/abs/2205.12962).
56+
- [ZodiPy: A Python package for zodiacal light simulations (San 2024)](https://joss.theoj.org/papers/10.21105/joss.06648#).
5757

5858
## Install
59+
5960
ZodiPy is installed with pip
61+
6062
```bash
6163
pip install zodipy
6264
```
6365

6466
## Dependencies
67+
6568
ZodiPy supports all Python versions >= 3.9, and has the following dependencies:
69+
6670
- [Astropy](https://www.astropy.org/) (>=5.0.1)
6771
- [NumPy](https://numpy.org/)
6872
- [jplephem](https://pypi.org/project/jplephem/)
6973
- [SciPy](https://scipy.org/)
7074

7175
## For developers
76+
7277
### Poetry
73-
ZodiPy uses [Poetry](https://python-poetry.org/) for development. To build and commit to the repository with the existing pre-commit setup, developers need to have Poetry (>= 1.8.0) installed. See the Poetry [documentation](https://python-poetry.org/docs/) for installation guide.
78+
79+
ZodiPy uses [Poetry](https://python-poetry.org/) for development. To build and commit to the repository with the existing pre-commit setup, developers need to have Poetry (>= 1.8.0) installed. See the Poetry [documentation](https://python-poetry.org/docs/) for installation guide.
7480

7581
After poetry has been installed, developers should create a new virtual environment and run the following in the root of the ZodiPy repositry
82+
7683
```
7784
poetry install
7885
```
86+
7987
This will download all dependencies (including dev)from `pyproject.toml`, and `poetry.lock`.
8088

8189
### Tests, linting and formatting, and building documentation
90+
8291
The following tools should be run from the root of the repository with no errors. (These are ran automatically as part of the CI workflows on GitHub, but should be tested locally first)
8392

8493
#### pytest
94+
8595
Testing is done with [pytest](https://docs.pytest.org/en/8.0.x/). To run the tests, run the following command from the repository root
96+
8697
```bash
8798
pytest
88-
```
99+
```
100+
89101
#### ruff
102+
90103
Formating and linting is done with [ruff](https://github.com/astral-sh/ruff). To format and lint, run the following command from the repository root
104+
91105
```bash
92106
ruff check
93107
ruff format
94-
```
108+
```
109+
95110
#### mypy
111+
96112
ZodiPy is fully typed. We use [mypy](https://mypy-lang.org/) as a static type checker. To type check, run the following command from the repositry root
97113

98114
```bash
99115
mypy zodipy/
100116
```
117+
101118
Remeber to add tests when implementing new features to maintain a high code coverage.
102119

103120
#### MkDocs
121+
104122
We use [MkDocs](https://www.mkdocs.org/) to create our documentation. To serve the docs locally on you machine, run the following from the repositry root
123+
105124
```bash
106125
mkdocs serve
107126
```
108127

128+
### Releasing to PyPI
129+
130+
To release a new package to PyPI, simply create a [new release](https://github.com/Cosmoglobe/zodipy/releases). Be sure to have bumped the version appropriatly in pyproject.toml beforehand.
131+
109132
## Funding
110-
This work has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No 776282 (COMPET-4; BeyondPlanck), 772253 (ERC; bits2cosmology) and 819478 (ERC; Cosmoglobe).
111133

134+
This work has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreements No 776282 (COMPET-4; BeyondPlanck), 772253 (ERC; bits2cosmology) and 819478 (ERC; Cosmoglobe).
112135

113136
<div style="display: flex; flex-direction: row; justify-content: space-evenly">
114137
<img style="width: 49%; height: auto; max-width: 500px; align-self: center" src="https://user-images.githubusercontent.com/28634670/170697040-d5ec2935-29d0-4847-8999-9bc4eaa59e56.jpeg">

0 commit comments

Comments
 (0)