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

[WIP] Update Bias Monitor to use Django DB Models #1503

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

bsunnquist
Copy link
Collaborator

This PR updates the Bias Monitor and bias plots to work with the new django databases.

@pep8speaks
Copy link

pep8speaks commented Feb 28, 2024

Hello @bsunnquist, Thank you for updating !

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated at 2024-11-19 14:48:36 UTC

from bokeh.models.layouts import Tabs, TabPanel
from bokeh.plotting import figure, output_file, save
from bokeh.resources import CDN
from datetime import datetime, timedelta
from datetime import datetime
Copy link
Collaborator

Choose a reason for hiding this comment

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

Repeated import of datetime

self.trending_data['uncal_filename'] = uncal_basename

# Add a column of expstart values that are datetime objects
format_data = "%Y-%m-%dT%H:%M:%S.%f"
Copy link
Collaborator

Choose a reason for hiding this comment

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

If there are complaints in the log about missing timezone info, you could update the strings and use the %z option in strptime. For this to work, the strings would have to change to be e.g. '2021-09-01 15:27:05.004573 +0000'

self.latest_data = pd.DataFrame.from_dict(tmp_data, orient='index').transpose()

# Add a column of expstart values that are datetime objects
format_data = "%Y-%m-%dT%H:%M:%S.%f"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here, if the log complains about a lack of timezone info

@mfixstsci
Copy link
Collaborator

@bsunnquist I went ahead and fixed the conflict and merged in develop. We still need to get #1498 in first, we are working on that but I would like to test this one while we are working out the kinks on the test server for #1498

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants