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

DM-43389: Add option to disable loading diaForcedSource history #197

Merged
merged 1 commit into from Mar 20, 2024

Conversation

isullivan
Copy link
Contributor

This is a debugging-only option. I elected to pass doLoadForcedSources in to LoadDiaCatalogsTask.run() rather than set it as a config of the subtask, thinking that it would be easier to remove in the future this way. I would welcome alternate suggestions!

Copy link
Contributor

@parejkoj parejkoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of comments about docstrings, but otherwise I think this is ok. I do wish there was a way to test it in this code, instead of relying on ap_verify, but I'm not sure there's a good way to do that.

Raises
------
RuntimeError
If the Database query failed to load DiaObjects
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If the Database query failed to load DiaObjects
Raised if the Database query failed to load DiaObjects.

@@ -79,6 +82,11 @@ def run(self, exposure, apdb):
exposure padded by ``pixelMargin``. DataFrame is indexed by
``diaObjectId``, ``band``, ``diaSourceId`` columns.
(`pandas.DataFrame`)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Returns block above this is missing diaForcedSources.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha. That's been missing for a while... I'll add it.

Comment on lines +250 to +255
doc="Load forced DiaSource history from the APDB?"
"This should only be turned off for debugging purposes.",
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this docstring should say something about how this was added to let us turn off forced sources for performance reasons? Maybe something like this?

Suggested change
doc="Load forced DiaSource history from the APDB?"
"This should only be turned off for debugging purposes.",
)
doc="Load forced DiaSource history from the APDB?"
" This should only be turned off for debugging purposes."
" Added to allow disabling forced sources for performance reasons during the ops rehearsal.",
)

Comment on lines +70 to +71
Load forced DiaSource history from the APDB?
This should only be turned off for debugging purposes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same note as above with the config docstring.

@isullivan isullivan merged commit 7f82fda into main Mar 20, 2024
2 checks passed
@isullivan isullivan deleted the tickets/DM-43389 branch March 20, 2024 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants