Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data classes #56

Merged
merged 2 commits into from
Mar 5, 2024
Merged

Data classes #56

merged 2 commits into from
Mar 5, 2024

Conversation

astronomerritt
Copy link
Collaborator

Fixes #54.

  • All DataSchema child classes are now Python dataclasses, with their attributes initialised with empty defaults.
  • Docstrings have been updated explaining each attribute. I pulled the descriptions directly from https://dm.lsst.org/sdm_schemas/browser/dp03.html.

Fixes #55.

  • I am no longer storing the SQL query and the AstroPy data table on the DataSchema objects. Because that would be silly.

Additional changes:

  • I made a tiny change so that mjd is instead being stored as midpointMjdTai to bring it in line with the DiaSource table column heading.
  • Corrected some docstrings.

Review Checklist for Source Code Changes

  • Does pip install still work?
  • Have you written a unit test for any new functions?
  • Do all the units tests run successfully?
  • Does adler run successfully on a test set of input files/databases?
  • Have you used black on the files you have updated to confirm python programming style guide enforcement?

@astronomerritt astronomerritt requested a review from jrob93 March 1, 2024 12:59
@astronomerritt astronomerritt merged commit 1b9e784 into main Mar 5, 2024
6 checks passed
@astronomerritt astronomerritt deleted the data_classes branch March 5, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants