-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add pydantic/ipyautoui aperture settings #154
Add pydantic/ipyautoui aperture settings #154
Conversation
This is used for the aperture settings fields to ensure a lower bound in the UI.
35a36c0
to
105041b
Compare
de64722
to
086c579
Compare
...move the plot update to a separate method
@JuanCab -- I think this is ready for a look. Not sure about the whole approach of making a separate settings module, but at least it would keep things organized. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good as a means of getting the aperture settings read in and passed to the photometry. There are some places where I noted possible tweaks to the documentation, but otherwise it's mostly me just asking questions of why you made a choice or confirming my understanding of the function/class behavior.
stellarphot/settings/models.py
Outdated
|
||
from enum import Enum | ||
|
||
from astropy import units as un |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a complaint, just curious why you switched to units as un
instead of units as u
, which seems more conventional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😬 the typing expansion program changes u
to you
so I used un
. I can change that....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not to be difficult, but can we be consistent and use u
for astropy.units
?
from .models import * | ||
from .views import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just so you know, ruff really hates * on imports (and PEP8 isn't terribly pleased with it either). I am wondering if despite the pain we should be explicit with the function imports. I know __all__
is controlling this to some extent, but I wonder if linters are happier in part because they know where to look for class/function definitions in these cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK; I had thought this was the one case it was OK to get the namespace the way you want it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if you can fix astropy.units
in models.py
to be addressed as u
(for consistency with the rest of the code we use), this can be merged.
stellarphot/settings/models.py
Outdated
|
||
from enum import Enum | ||
|
||
from astropy import units as un |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not to be difficult, but can we be consistent and use u
for astropy.units
?
Done for real this time -- actually, I removed the import because it and the aperture units thing were not the way to go. I'll stick to |
3c2ff78
to
56ece82
Compare
This makes the aperture settings a pydantic model in prep for making all settings saveable.
To do before this is ready for review: