You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
21
19
22
20

23
21
24
-
25
22
## Documentation
23
+
26
24
See the [documentation](https://cosmoglobe.github.io/zodipy/) for a list of supported zodiacal light models and examples of how to use ZodiPy.
27
25
28
26
## A simple example
27
+
29
28
```python
30
29
import astropy.units as u
31
30
from astropy.coordinates import SkyCoord
@@ -50,65 +49,89 @@ print(emission)
50
49
```
51
50
52
51
## Related scientific papers
52
+
53
53
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#).
56
54
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#).
57
57
58
58
## Install
59
+
59
60
ZodiPy is installed with pip
61
+
60
62
```bash
61
63
pip install zodipy
62
64
```
63
65
64
66
## Dependencies
67
+
65
68
ZodiPy supports all Python versions >= 3.9, and has the following dependencies:
69
+
66
70
-[Astropy](https://www.astropy.org/) (>=5.0.1)
67
71
-[NumPy](https://numpy.org/)
68
72
-[jplephem](https://pypi.org/project/jplephem/)
69
73
-[SciPy](https://scipy.org/)
70
74
71
75
## For developers
76
+
72
77
### 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.
74
80
75
81
After poetry has been installed, developers should create a new virtual environment and run the following in the root of the ZodiPy repositry
82
+
76
83
```
77
84
poetry install
78
85
```
86
+
79
87
This will download all dependencies (including dev)from `pyproject.toml`, and `poetry.lock`.
80
88
81
89
### Tests, linting and formatting, and building documentation
90
+
82
91
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)
83
92
84
93
#### pytest
94
+
85
95
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
+
86
97
```bash
87
98
pytest
88
-
```
99
+
```
100
+
89
101
#### ruff
102
+
90
103
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
+
91
105
```bash
92
106
ruff check
93
107
ruff format
94
-
```
108
+
```
109
+
95
110
#### mypy
111
+
96
112
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
97
113
98
114
```bash
99
115
mypy zodipy/
100
116
```
117
+
101
118
Remeber to add tests when implementing new features to maintain a high code coverage.
102
119
103
120
#### MkDocs
121
+
104
122
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
+
105
124
```bash
106
125
mkdocs serve
107
126
```
108
127
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
+
109
132
## 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).
111
133
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).
0 commit comments