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-41606: Option to output pipetask report info to command line #277

Merged
merged 2 commits into from Mar 14, 2024

Conversation

eigerx
Copy link
Contributor

@eigerx eigerx commented Dec 6, 2023

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

Attention: Patch coverage is 93.02326% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 87.44%. Comparing base (1ce94f1) to head (39d2baa).

Files Patch % Lines
python/lsst/ctrl/mpexec/cli/script/report.py 90.90% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #277      +/-   ##
==========================================
+ Coverage   87.40%   87.44%   +0.03%     
==========================================
  Files          49       49              
  Lines        4431     4469      +38     
  Branches      764      771       +7     
==========================================
+ Hits         3873     3908      +35     
- Misses        406      408       +2     
- Partials      152      153       +1     

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

@eigerx
Copy link
Contributor Author

eigerx commented Feb 22, 2024

It looks like the mypy failure is due to ctrl_mpexec not knowing about the added option (human-readable) in the corresponding branch of pipe_base. This passes on Jenkins: https://rubin-ci.slac.stanford.edu/blue/organizations/jenkins/stack-os-matrix/detail/stack-os-matrix/739/pipeline

@timj
Copy link
Member

timj commented Feb 22, 2024

@eigerx fix mypy by temporarily editing requirements.txt to use the ticket branch rather than main.

requirements.txt Outdated
git+https://github.com/lsst/pex_config@main#egg=lsst-pex-config
sqlalchemy
types-psutil
types-psycopg2
Copy link
Member

@timj timj Feb 23, 2024

Choose a reason for hiding this comment

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

FYI types go in a file called types.txt and not in requirements.txt. The mypy action looks in a special place because they aren't real requirements.

I'm a bit confused about the psutil one since psutil is only used by test code and so shouldn't get involved in mypy (it also is in the wrong place in pyproject.toml -- looks like it's been in the wrong place since the beginning so not related to this PR). Also, psycopg2 is not used anywhere in ctrl_mpexec so maybe I need to look at the mypy error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AH, ok. I will move these edits to types.txt. I googled the mypy error and the first suggestion I tried was mypy --install-types and those were what it installed. They didn't end up resulting in a "pass" from mypy here, though. The other suggested line, python3 -m pip install types-PyYAML, did work, and that was what installed types-PyYAML. So, I'll do a hard reset and move that line to types.txt. Thank you for the help!!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@timj it looks like that worked! Thanks for the linting help :)

Copy link

@kherner kherner left a comment

Choose a reason for hiding this comment

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

The new code itself generally looks OK; I would guess it wouldn't be that hard to figure out the testing complaints with a few additions (i.e. a lot of it could probably be fixed with one or two calls). We can talk about that next week though.

requirements.txt Outdated
@@ -6,6 +6,6 @@ networkx
git+https://github.com/lsst/resources@main#egg=lsst-resources
git+https://github.com/lsst/daf_butler@main#egg=lsst-daf-butler
git+https://github.com/lsst/utils@main#egg=lsst-utils
git+https://github.com/lsst/pipe_base@main#egg=lsst-pipe-base
git+https://github.com/lsst/pipe_base@tickets/DM-41606#egg=lsst-pipe-base
Copy link

Choose a reason for hiding this comment

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

Also here don't forget to change it back when merging.

Copy link
Member

Choose a reason for hiding this comment

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

There is a GitHub action that prevents merging unless this has been removed.

--------
lsst.pipe.base.QuantumGraphExecutionReport.make_reports : Making reports.
lsst.pipe.base.QuantumGraphExecutionReport.write_summary_yaml : Summaries.
butler_config : `str`
Copy link

Choose a reason for hiding this comment

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

The indenting looks a little funny here relative to the old doc string, like it's an extra 4 spaces over.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed. I'm kind of surprised that the numpydoc validator doesn't spot this -- maybe I've missed some configuration setting for numpydoc. velin (which you have to install from pypi) does notice and fix it.


import yaml
Copy link

Choose a reason for hiding this comment

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

Switch the blank line order here. See PEP8 for import format.

Copy link
Member

Choose a reason for hiding this comment

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

We use isort and black for formatting so I think this is right. pprint is part of core python and yaml is not so a line separates them.


import yaml
from astropy.table import Table
from lsst.daf.butler import Butler
Copy link

Choose a reason for hiding this comment

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

Probably should be a blank line between the astropy and Butler imports too, if you're being a format stickler.

Copy link
Member

Choose a reason for hiding this comment

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

isort won't allow that.

Copy link

@kherner kherner left a comment

Choose a reason for hiding this comment

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

The changes to increase the test coverage look good.

@eigerx eigerx merged commit a2f6597 into main Mar 14, 2024
15 checks passed
@eigerx eigerx deleted the tickets/DM-41606 branch March 14, 2024 00:22
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

3 participants