-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from lsst/tickets/DM-43586
DM-43586: Add versioning to the fits module
- Loading branch information
Showing
7 changed files
with
220 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Checklist | ||
|
||
- [ ] ran Jenkins | ||
- [ ] added a release note for user-visible changes to `doc/changes` | ||
- [ ] updated the FILE_FORMAT_VERSION number correctly (if `python/lsst/cell_coadds/_fits.py` was modified) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Allowed `inputs` argument when constructing a `SingleCellCoadd` instance to be any iterable, not just a frozenset. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Included information about `day_obs` and `physical_filter` in `ObservationIdentifiers` so those metadata are available when reading a file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Started including a semantic version number for the file format. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Recording Changes | ||
================= | ||
|
||
This directory contains "news fragments" which are small files containing text that will be integrated into release notes. | ||
The files can be in restructured text format or plain text. | ||
|
||
Each file should be named like ``<JIRA TICKET>.<TYPE>`` with a file extension defining the markup format. | ||
The ``<TYPE>`` should be one of: | ||
|
||
* ``feature``: New feature | ||
* ``bugfix``: A bug fix. | ||
* ``api``: An API change. | ||
* ``perf``: A performance enhancement. | ||
* ``doc``: A documentation improvement. | ||
* ``removal``: An API removal or deprecation. | ||
* ``other``: Other Changes and Additions of interest to general users. | ||
* ``misc``: Changes that are of minor interest. | ||
|
||
An example file name would therefore look like ``DM-30291.misc.rst``. | ||
|
||
You can test how the content will be integrated into the release notes by running ``towncrier --draft --version=V.vv``. | ||
``towncrier`` can be installed from PyPI or conda-forge. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# This file is part of cell_coadds. | ||
# | ||
# Developed for the LSST Data Management System. | ||
# This product includes software developed by the LSST Project | ||
# (https://www.lsst.org). | ||
# See the COPYRIGHT file at the top-level directory of this distribution | ||
# for details of code ownership. | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
import unittest | ||
|
||
import lsst.utils.tests | ||
from lsst.cell_coadds import CellCoaddFitsReader | ||
from lsst.cell_coadds._fits import FILE_FORMAT_VERSION | ||
|
||
|
||
class FitsTestCase(lsst.utils.tests.TestCase): | ||
"""Class for testing FITS specific aspects. | ||
Some FITS specific aspects are also implemented in test_coadds.py | ||
""" | ||
|
||
def test_read_compatibility(self): | ||
"""Test that the isCompatibleWith method works.""" | ||
self.assertTrue(CellCoaddFitsReader.isCompatibleWith("0.1")) | ||
self.assertFalse(CellCoaddFitsReader.isCompatibleWith("12345.67")) | ||
|
||
# Check that the reader is compatible with itself. | ||
self.assertTrue(CellCoaddFitsReader.isCompatibleWith(FILE_FORMAT_VERSION)) | ||
|
||
|
||
class TestMemory(lsst.utils.tests.MemoryTestCase): | ||
"""Check for resource/memory leaks.""" | ||
|
||
|
||
def setup_module(module): # noqa: D103 | ||
lsst.utils.tests.init() | ||
|
||
|
||
if __name__ == "__main__": | ||
lsst.utils.tests.init() | ||
unittest.main() |