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

Tickets/preops 3763 #35

Merged
merged 5 commits into from
Oct 11, 2023
Merged

Tickets/preops 3763 #35

merged 5 commits into from
Oct 11, 2023

Conversation

emanehab99
Copy link
Collaborator

Tests were failing because for some reason some bokeh models are owned by multiple documents. This happens when scheduler dashboard and prenight dashboard both run in tests. Resetting bokeh output before and after tests fixes the issue

@emanehab99 emanehab99 requested review from alserene and ehneilsen and removed request for alserene October 9, 2023 10:13
@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Attention: 18 lines in your changes are missing coverage. Please review.

Comparison is base (284673b) 12.04% compared to head (fca5856) 12.41%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #35      +/-   ##
==========================================
+ Coverage   12.04%   12.41%   +0.36%     
==========================================
  Files          39       39              
  Lines        3071     3078       +7     
  Branches      467      466       -1     
==========================================
+ Hits          370      382      +12     
+ Misses       2692     2687       -5     
  Partials        9        9              
Files Coverage Δ
tests/test_scheduler_dashboard.py 97.64% <100.00%> (+8.89%) ⬆️
schedview/app/scheduler_dashboard/__init__.py 0.00% <0.00%> (ø)
...iew/app/scheduler_dashboard/scheduler_dashboard.py 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@ehneilsen ehneilsen left a comment

Choose a reason for hiding this comment

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

Mostly, this looks good! I just have a few minor stylistic requests.

First, there are some public functions that do not have docstrings. In general, a function should either have a docstring, or marked as private (have a preceeding underscore), or both.

Second, some of the docstrings that are there have their summary sentences on a different line from the opening tripple quote. This messes up some of the doc extraction tools. See https://developer.lsst.io/python/numpydoc.html .

Finally, there are still a few extraneous "print" statements in there, obviously included for debugging. If they should be there long term, they should probably be logging messages instead.

In each of these cases, I just marked one example with a comment, but there are multiple instances of each.

tests/test_scheduler_dashboard.py Outdated Show resolved Hide resolved
schedview/app/scheduler_dashboard/scheduler_dashboard.py Outdated Show resolved Hide resolved
schedview/app/scheduler_dashboard/scheduler_dashboard.py Outdated Show resolved Hide resolved
schedview/app/scheduler_dashboard/scheduler_dashboard.py Outdated Show resolved Hide resolved
@emanehab99 emanehab99 requested a review from ehneilsen October 10, 2023 00:14
@ehneilsen
Copy link
Collaborator

Can you do a rebase onto main and resolve the resultant merge conflicts?

@emanehab99
Copy link
Collaborator Author

emanehab99 commented Oct 11, 2023

Can you do a rebase onto main and resolve the resultant merge conflicts?

Comments addressed. It should be up to date now.

@emanehab99
Copy link
Collaborator Author

I'm not sure what the ticks and crosses next to commits mean. That's what I did to rebase the branch

git checkout main
git pull 
git checkout tickets/PREOPS-3763
git rebase main
git pull
git push

@timj
Copy link
Member

timj commented Oct 11, 2023

You made one mistake in:

git checkout main
git pull 
git checkout tickets/PREOPS-3763
git rebase main
git pull
git push

It should be:

git checkout main
git pull 
git checkout tickets/PREOPS-3763
git rebase main
git push -f

That git pull at the end forces a redownload of the original ticket branch and git makes a merge commit to deal with them being different commits because you had rebased locally.

The -f tells git that the local version is the proper one.

@emanehab99
Copy link
Collaborator Author

You made one mistake in:

git checkout main
git pull 
git checkout tickets/PREOPS-3763
git rebase main
git pull
git push

It should be:

git checkout main
git pull 
git checkout tickets/PREOPS-3763
git rebase main
git push -f

That git pull at the end forces a redownload of the original ticket branch and git makes a merge commit to deal with them being different commits because you had rebased locally.

The -f tells git that the local version is the proper one.

Thank you. I've done that now but I'm not happy with the commit history (repeating my commits multiple times). Is there a way to clean it?

@timj
Copy link
Member

timj commented Oct 11, 2023

You can do git rebase -i main and squash related commits.

@emanehab99
Copy link
Collaborator Author

You can do git rebase -i main and squash related commits.

That worked! Looks much better. Thank you so much :)

@emanehab99 emanehab99 merged commit 6fe190b into main Oct 11, 2023
6 checks passed
@rhiannonlynne rhiannonlynne deleted the tickets/PREOPS-3763 branch November 21, 2023 00:45
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.

3 participants