Clean date function for TargetExtra#30
Open
brendanrmills wants to merge 4 commits intoTOMToolkit:mainfrom
Open
Clean date function for TargetExtra#30brendanrmills wants to merge 4 commits intoTOMToolkit:mainfrom
brendanrmills wants to merge 4 commits intoTOMToolkit:mainfrom
Conversation
Collaborator
|
Hi @brendanrmills -- many thanks for checking, and for the update! Actually, it's been a while I did not run a query -- but the team should resume soon on using the module for follow-up, so we will inspect carefully and add new features that we recently discussed. |
tom_fink/tests/tests.py
Outdated
| from tom_fink.fink import FinkBroker | ||
| # from tom_fink.fink import FinkQueryForm, FinkBroker | ||
|
|
||
| test_alert1 = {, |
Collaborator
There was a problem hiding this comment.
Typo: there should not be comma here
Contributor
|
@brendanrmills and @JulienPeloton Is this PR still live? |
|
Please merge this PR if there are no conflicts |
Collaborator
|
I would be tempted to merge the changes. However the CI is failing, and the fail happens early, at the metadata generation for the package: I would log the error, and investigate in a separate branch. |
40 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed that if you wanted to save the contents of an alert into a bunch of TargetExtra objects to keep track of the parameters, the TargetExtra class would throw a RuntimeWarning
/home/bmills/bmillsWork/tom_test/new_venv/lib/python3.9/site-packages/django/db/models/fields/__init__.py:1534: RuntimeWarning:DateTimeField TargetExtra.time_value received a naive datetime (2018-07-07 08:25:56.001000) while time zone support is active.This was because TargetExtra casts the date as a datetime but it is common for django projects to require timezone information. This was fixed by adding a
clean_date()method that just appends' UTC'to the end of the firstdate and lastdate. I also wrote a small testing function to verify this.