Skip to content

Commit f221c38

Browse files
authored
Merge pull request #2049 from kbwestfall/versioning
Adds description of new versioning approach
2 parents 86e6f65 + ccd034f commit f221c38

File tree

3 files changed

+143
-95
lines changed

3 files changed

+143
-95
lines changed

README.rst

Lines changed: 66 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,41 @@ PypeIt |forks| |stars|
5252

5353
PypeIt (pronounced "pipe it") is a Python package for semi-automated reduction
5454
of astronomical spectroscopic data. Its algorithms build on decades-long
55-
development of previous data reduction pipelines by the developers. The
56-
reduction procedure - including a complete list of the input parameters and
57-
available functionality - is provided by our `online documentation
55+
development of previous data reduction pipelines by the developers.
56+
57+
**For a complete description of PypeIt**, please see our `online documentation
5858
<https://pypeit.readthedocs.io/en/stable/>`__.
5959

60+
----
61+
62+
.. _readme_usage:
63+
64+
Installation and Usage
65+
++++++++++++++++++++++
66+
67+
Detailed installation instructions can be found `here
68+
<https://pypeit.readthedocs.io/en/stable/installing.html>`__. Briefly, after
69+
creating a fresh python environment, simply type:
70+
71+
.. code-block:: bash
72+
73+
pip install pypeit
74+
6075
PypeIt is designed to be used by both advanced spectroscopists with prior data
6176
reduction expertise and astronomers with no prior experience of data reduction.
6277
It is highly configurable and designed to be applied to any standard
6378
slit-imaging spectrograph, including long-slit, multi-slit, as well as
64-
cross-dispersed echelle spectra. **The spectrographs that PypeIt can be used
65-
with are listed** `here
79+
cross-dispersed echelle spectra.
80+
81+
**The spectrographs that PypeIt supports are listed** `here
6682
<https://pypeit.readthedocs.io/en/stable/spectrographs/spectrographs.html>`__.
6783
Specifically, look `here
6884
<https://pypeit.readthedocs.io/en/stable/spectrographs/spectrographs.html#instrument-specific-details>`__
6985
for useful information about reducing data with certain instruments.
7086

71-
In addition to our primary code base, we maintain an extensive `development
72-
suite <https://github.com/pypeit/PypeIt-development-suite>`__ primarily used to
87+
**Example data sets**: In addition to our primary code base, we maintain an
88+
extensive `development suite
89+
<https://github.com/pypeit/PypeIt-development-suite>`__ primarily used to
7390
perform multiple layers of code testing, from basic unit tests to full
7491
end-to-end tests of all our command-line scripts. **If you are new to PypeIt**,
7592
you are encouraged to learn how to use the code by finding and experimenting
@@ -81,22 +98,40 @@ by instrument and configuration) of `this shared Google Drive folder
8198

8299
.. _community:
83100

84-
Community
85-
+++++++++
101+
Community and Communication
102+
+++++++++++++++++++++++++++
86103

87-
As a project, PypeIt is committed to fostering a welcoming, diverse, and
88-
inclusive community. As a member of this community you are expected to read and
89-
follow our `Code of Conduct
104+
**Code of Conduct**: As a project, PypeIt is committed to fostering a
105+
welcoming, diverse, and inclusive community. As a member of this community you
106+
are expected to read and follow our `Code of Conduct
90107
<https://pypeit.readthedocs.io/en/stable/codeconduct.html>`__.
91108

92-
Along with our extensive `online documentation
93-
<https://pypeit.readthedocs.io/en/stable/>`__, we encourage the PypeIt user
94-
base to communicate via our `PypeIt Users Slack <https://pypeit-users.slack.com>`__.
95-
All are welcome to join using `this invitation link <https://join.slack.com/t/pypeit-users/shared_invite/zt-3cderhn4g-XgFzv6mBWqxtVXKudc8W0w>`__.
96-
97-
If you find a bug (particularly one that is experienced by others in the Users
98-
Slack) or have a feature request, please `submit a GitHub issue
99-
<https://github.com/pypeit/PypeIt/issues>`__.
109+
**Documentation**: We maintain extensive `online documentation
110+
<https://pypeit.readthedocs.io/en/stable/>`__ that provides usage tutorials and
111+
describes the PypeIt code, reduction and processing procedures, and output data
112+
models.
113+
114+
**Real-time Communication**: We strongly encourage users to join
115+
our `PypeIt Users Slack <https://pypeit-users.slack.com>`__. Developers are
116+
available to answer questions and help troubleshoot issues. All are welcome to
117+
join using `this invitation link
118+
<https://join.slack.com/t/pypeit-users/shared_invite/zt-3cderhn4g-XgFzv6mBWqxtVXKudc8W0w>`__;
119+
please let us know (by submitting a GitHub issue) if the invitation link has
120+
expired. Please make sure to read the `guidelines
121+
<https://docs.google.com/document/d/1Jo83RKstE8DaHxDCsGxsM3DC7sl153Hq9UGN3Piapuc/edit?usp=sharing>`__
122+
before posting your question; the guidelines are also linked in the description
123+
of the ``#guidelines`` channel.
124+
125+
**Bug Reports and Feature Requests**: If you encounter a bug, please first check
126+
if this could be caused by user error; be sure to consult the online
127+
documentation and post about your issue in the Users Slack (see above). If the
128+
problem persists (particularly if it is also experienced by other users),
129+
please `submit a GitHub issue <https://github.com/pypeit/PypeIt/issues>`__.
130+
When submitting the issue, please provide as much information as possible. If
131+
you haven't already, we may ask you to join the Users Slack for more efficient
132+
communication about the issue. Finally, you are also encouraged to `submit a
133+
GitHub issue <https://github.com/pypeit/PypeIt/issues>`__ if you have a specific
134+
feature request.
100135

101136
----
102137

@@ -133,16 +168,20 @@ Team <https://pypeit.readthedocs.io/en/stable/team.html>`__ listing.
133168
Citation
134169
++++++++
135170

136-
If you use PypeIt in your research, please cite the following publications
137-
(we provide the relevant `BibTeX entries
138-
<https://pypeit.readthedocs.io/en/stable/index.html#pypeit-bibtex-entries>`__
139-
for your convenience):
171+
If you use PypeIt in your research, please cite the following two publications:
140172

141173
- Prochaska et al. (2020, JOSS): `arXiv <https://ui.adsabs.harvard.edu/abs/2020arXiv200506505P/abstract>`__, `JOSS <https://joss.theoj.org/papers/10.21105/joss.02308>`__
142-
- Prochaska et al. (2020, Zenodo): `Zenodo <https://ui.adsabs.harvard.edu/abs/2020zndo...3743493P/abstract>`__
174+
- Prochaska et al. (2020, Zenodo): `Zenodo <https://zenodo.org/records/17244617>`__
175+
176+
We provide the relevant `BibTeX entries
177+
<https://pypeit.readthedocs.io/en/stable/index.html#pypeit-bibtex-entries>`__
178+
for your convenience. Note that the Zenodo BibTex entry is for version 1.0.0 of
179+
the code; however, the Zenodo DOI is updated with each release of PypeIt. When
180+
you cite the Zenodo entry, you are encouraged to cite the specific PypeIt
181+
version you used! You are also encouraged to explicitly note the specific
182+
PypeIt version used (e.g., 1.17.3) in the article text.
143183

144-
You are also encouraged to note the specific version of the code you have used
145-
(e.g., 1.17.3). If there is no place to include the relevant citations in the
184+
If there is no place to include the relevant citations in the
146185
text of the publication, please include the following acknowledgement (provided
147186
in latex and using the provided `BibTeX entries
148187
<https://pypeit.readthedocs.io/en/stable/index.html#pypeit-bibtex-entries>`__):

doc/index.rst

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,6 @@ PypeIt BibTeX Entries
99

1010
.. code-block:: latex
1111

12-
@ARTICLE{pypeit:joss_arXiv,
13-
author = {{Prochaska}, J. Xavier and {Hennawi}, Joseph F. and {Westfall}, Kyle B. and
14-
{Cooke}, Ryan J. and {Wang}, Feige and {Hsyu}, Tiffany and
15-
{Davies}, Frederick B. and {Farina}, Emanuele Paolo},
16-
title = "{PypeIt: The Python Spectroscopic Data Reduction Pipeline}",
17-
journal = {arXiv e-prints},
18-
keywords = {Astrophysics - Instrumentation and Methods for Astrophysics},
19-
year = 2020,
20-
month = may,
21-
eid = {arXiv:2005.06505},
22-
pages = {arXiv:2005.06505},
23-
archivePrefix = {arXiv},
24-
eprint = {2005.06505},
25-
primaryClass = {astro-ph.IM},
26-
adsurl = {https://ui.adsabs.harvard.edu/abs/2020arXiv200506505P},
27-
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
28-
}
29-
3012
@article{pypeit:joss_pub,
3113
doi = {10.21105/joss.02308},
3214
url = {https://doi.org/10.21105/joss.02308},

doc/installing.rst

Lines changed: 77 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -182,44 +182,8 @@ PypeIt, upgrading the package should simply be a matter of executing:
182182
183183
If this causes problems (*e.g.*, a new PypeIt script is unavailable or you
184184
encounter script errors), first try uninstalling (``pip uninstall pypeit``) and
185-
then reinstalling. There are two important things to keep in mind when
186-
upgrading:
187-
188-
- **PypeIt datamodels are not necessarily backwards-compatible.** This means
189-
that, *e.g.*, ``pypeit_show_2dspec`` may fault when trying to view
190-
``spec2d*`` files produced with your existing PypeIt version after upgrading
191-
to a new version. **The best approach is to always re-reduce data you're
192-
still working with anytime you update PypeIt.**
193-
194-
- **Cached files are version-specific.** Every time you upgrade pypeit, we
195-
recommend deleting your existing cache and starting fresh! See
196-
:ref:`view-cache`. The only caveat to this is if you are actively using
197-
multiple versions of PypeIt, meaning you will still be using old versions of
198-
the cached files. Otherwise, you will end up with multiple versions of the
199-
same file on disk. **Importantly**, the code also considers local files you
200-
have installed (using, e.g., ``pypeit_install_linelist``) to be version
201-
specific. If you have installed such files, you will need to re-install them
202-
*after* upgrading.
203-
204-
If you have locally installed files, your upgrade may look something like this:
205-
206-
.. code-block:: console
207-
208-
# Check the cache contents
209-
pypeit_clean_cache -l
210-
# Delete everything
211-
pypeit_clean_cache --clear
212-
# Upgrade pypeit
213-
pip install pypeit --upgrade
214-
# Reinstall your local line lists
215-
pypeit_install_linelist /path/to/my/linelists/*_lines.dat
216-
217-
.. note::
218-
219-
If you find particular data files useful for your reductions, please
220-
consider issuing a PR to include them file in the PypeIt repository. This
221-
helps the community, and it means you'll avoid these upgrading
222-
complications.
185+
then reinstalling. Also note that not all PypeIt versions are
186+
backwards-compatible; see :ref:`versioning`.
223187

224188
.. _m1_macs:
225189

@@ -236,7 +200,7 @@ installation options are welcome; please `Submit an issue`_.
236200
Installation on Windows
237201
-----------------------
238202

239-
Generally speaking, we encounter most installation issues on Windows users.
203+
Generally speaking, we encounter most installation issues for Windows users.
240204

241205
An alternative for running under Windows is to install the `Windows Subsystem
242206
for Linux (WSL) <https://learn.microsoft.com/en-us/windows/wsl/install>`_. This
@@ -267,6 +231,69 @@ options for the ``python.exe`` and ``python3.exe`` executables.
267231

268232
----
269233

234+
.. _versioning:
235+
236+
Versioning
237+
==========
238+
239+
Traditionally, we provided no guarantee that *any* PypeIt version was backwards
240+
compatible. However, as of version 2.0.0, PypeIt uses `Semantic Versioning
241+
<https://packaging.python.org/en/latest/discussions/versioning/>`__. This
242+
approach uses three version categories --- *major*, *minor*, and *patch* ---
243+
where releases that increment the *major* version number are *not* backwards
244+
compatible. We expect the most common reason for incrementing the *major*
245+
version number will be because of a backwards-incompatible change to either the
246+
input configuration files (like the ``*.pypeit`` file) or the data models of the
247+
primary output products.
248+
249+
.. important::
250+
251+
When possible, we **always** recommend you use the most recent version of
252+
PypeIt and reprocess data as necessary. The code is always improving, not
253+
just in functionality but also in robustness of data reduction and
254+
processing.
255+
256+
Beyond this, we emphasize two important considerations regarding PypeIt versioning:
257+
258+
- **Backwards-incompatible changes to datamodels can break simple viewing
259+
scripts.** For example, ``pypeit_show_2dspec`` may fault when trying to view
260+
``spec2d*`` files produced using a version of PypeIt that is not backwards
261+
compatible with your current version. You can always maintain multiple python
262+
environments with different PypeIt versions installed or reprocess data with
263+
your currently installed PypeIt version.
264+
265+
- **Cached files are version-specific.** Every time you upgrade PypeIt, we
266+
recommend deleting your existing cache and starting fresh! See
267+
:ref:`view-cache`. The only caveat to this is if you are actively using
268+
multiple versions of PypeIt (in different environments), meaning you will
269+
still be using old versions of the cached files. Otherwise, you will end up
270+
with multiple versions of the same file on disk. **Importantly**, the code
271+
also considers local files you have installed (using, e.g.,
272+
``pypeit_install_linelist``) to be version specific. If you have installed
273+
such files, you will need to re-install them *after* upgrading.
274+
275+
If you have locally installed files, your upgrade may look something like
276+
this:
277+
278+
.. code-block:: console
279+
280+
# Check the cache contents
281+
pypeit_clean_cache -l
282+
# Delete everything
283+
pypeit_clean_cache --clear
284+
# Upgrade pypeit
285+
pip install pypeit --upgrade
286+
# Reinstall your local line lists
287+
pypeit_install_linelist /path/to/my/linelists/*_lines.dat
288+
289+
.. note::
290+
291+
If you find particular data files useful for your reductions, please
292+
consider issuing a PR to include them in the PypeIt repository. This helps
293+
the community, and it means you'll avoid these upgrading complications.
294+
295+
----
296+
270297
.. _data_installation:
271298

272299
Additional Data and the PypeIt Cache
@@ -322,7 +349,7 @@ cache. To list the cache contents, use the ``-l`` option:
322349
github 1.15.1 tests solution_arrays.npz
323350
324351
Note that the files hosted on GitHub will be specific to a branch or version of
325-
PypeIt. **Every time you upgrade pypeit, we recommend deleting your existing
352+
PypeIt. **Every time you upgrade PypeIt, we recommend deleting your existing
326353
cache and starting fresh!**
327354

328355
**Local files** that have been installed into the cache (e.g., using
@@ -428,7 +455,7 @@ can be included in the PypeIt repository.
428455

429456
Because PypeIt uses the cache system to manage the local files, it will
430457
associate each file with the version of the code used to install it in the
431-
cache. Every time you upgrade your pypeit version, you should delete the
458+
cache. Every time you upgrade your PypeIt version, you should delete the
432459
local files from the cache (this will not remove the local file itself) and
433460
re-install them using the upgraded version of PypeIt. See :ref:`view-cache`
434461
and :ref:`upgrade`.
@@ -510,7 +537,7 @@ Python (see :ref:`dependencies`):
510537
* `PySide <https://wiki.qt.io/Qt_for_Python>`_
511538

512539
At least one of those bindings must be installed for the interactive GUIs to
513-
work. By default ``pypeit`` will install ``pyqt6``. Other backends can be used
540+
work. By default PypeIt will install ``pyqt6``. Other backends can be used
514541
by installing them manually via ``pip`` or ``conda`` and then setting the ``QT_API``
515542
environment variable. See the `QtPy documentation <https://github.com/spyder-ide/qtpy>`_
516543
for more details.
@@ -603,7 +630,7 @@ spectrum from the Shane/KAST spectrograph at Lick Observatory.
603630
Troubleshooting
604631
===============
605632

606-
If you have trouble installing pypeit, you're encouraged to join our `PypeIt
633+
If you have trouble installing PypeIt, you're encouraged to join our `PypeIt
607634
Users Slack <https://pypeit-users.slack.com>`__ using `this invitation
608635
link <invite_>`_ and post your issue to the ``#installing`` channel. Below is an
609636
incomplete list of issues that users have reported in the past. In addition to
@@ -612,7 +639,7 @@ let us know if these suggestions do not work for you.*
612639

613640
----
614641

615-
**I am trying to install pypeit for the first time and it fails!**: The root
642+
**I am trying to install PypeIt for the first time and it fails!**: The root
616643
problem of this can be system dependent:
617644

618645
- First, *always* make sure you install the code into a fresh environment.
@@ -629,23 +656,23 @@ problem of this can be system dependent:
629656

630657
----
631658

632-
**I am trying to upgrade pypeit and it fails!**: First try uninstalling your
633-
current pypeit version:
659+
**I am trying to upgrade PypeIt and it fails!**: First try uninstalling your
660+
current PypeIt version:
634661

635662
.. code-block:: bash
636663
637664
pip uninstall pypeit
638665
639666
Then reinstall it. If that also fails, try creating a fresh environment and
640-
reinstalling pypeit in that new environment.
667+
reinstalling PypeIt in that new environment.
641668

642669
----
643670

644671
**The installation process succeeded, but the code is faulting!**: This could
645672
be for a few reasons:
646673

647-
- Recall that pypeit isn't necessarily backwards compatible. If you've
648-
upgraded pypeit and tried to use it with data that was reduced by a previous
674+
- Recall that PypeIt isn't necessarily backwards compatible. If you've
675+
upgraded PypeIt and tried to use it with data that was reduced by a previous
649676
version, the fault may because of changes between versions. You will either
650677
need to revert to your previous version or reprocess the data.
651678

@@ -680,6 +707,6 @@ Slack. However, here are a few things to note and/or try:
680707
- And, of course, the code will have bugs. If you find one, the more
681708
information you provide the developers, the easier it will be for us to track
682709
down the issue. Valuable information includes your OS, OS version, python
683-
version, pypeit version, and the full Traceback provided with the error. QA
710+
version, PypeIt version, and the full Traceback provided with the error. QA
684711
plots and ``ginga`` screen grabs that illustrate the issue are also very
685712
helpful!

0 commit comments

Comments
 (0)