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

JP-3471 improve Step.spec attribute formating in docs #8101

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

braingram
Copy link
Collaborator

@braingram braingram commented Nov 29, 2023

Resolves JP-3471

Closes #8085

This PR adds a custom AttributeDocumenter subclass to control the formatting of the long Step.spec string in the sphinx documentation.

For one example see the OutlierDetectionStep spec:
https://jwst-pipeline.readthedocs.io/en/latest/api/jwst.outlier_detection.OutlierDetectionStep.html#jwst.outlier_detection.OutlierDetectionStep.spec

and with this PR:
https://jwst-pipeline--8101.org.readthedocs.build/en/8101/api/jwst.outlier_detection.OutlierDetectionStep.html#jwst.outlier_detection.OutlierDetectionStep.spec

To update the formatting outside of api a few uses of automodule are replaced with automodapi:

One change to the code was necessary (adding an __all__ to jwst/tweakreg/astrometric_utils.py to allow automodapi to pick up the documentation for TIMEOUT see: https://jwst-pipeline--8101.org.readthedocs.build/en/8101/jwst/tweakreg/astrometric_utils.html#variables).

Checklist for maintainers

  • added entry in CHANGES.rst within the relevant release section
  • updated or added relevant tests
  • updated relevant documentation
  • added relevant milestone
  • added relevant label(s)
  • ran regression tests, post a link to the Jenkins job below.
    How to run regression tests on a PR
  • Make sure the JIRA ticket is resolved properly

Copy link

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2b36da4) 75.92% compared to head (7b5be8a) 75.93%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8101   +/-   ##
=======================================
  Coverage   75.92%   75.93%           
=======================================
  Files         459      459           
  Lines       37615    37616    +1     
=======================================
+ Hits        28561    28562    +1     
  Misses       9054     9054           
Flag Coverage Δ *Carryforward flag
nightly 77.37% <ø> (ø) Carriedforward from c340825

*This pull request uses carry forward flags. Click here to find out more.

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

@braingram braingram changed the title hide Step.spec attribute in docs improve Step.spec attribute formating in docs Nov 29, 2023
@braingram braingram changed the title improve Step.spec attribute formating in docs JP-3471 improve Step.spec attribute formating in docs Nov 29, 2023
@braingram braingram marked this pull request as ready for review November 29, 2023 17:50
@braingram braingram requested a review from a team as a code owner November 29, 2023 17:50
this allows for improved Step.spec formatting
and makes the auto-generated docs more consistent
@braingram braingram requested a review from mcara November 29, 2023 19:16
Copy link
Member

@mcara mcara left a comment

Choose a reason for hiding this comment

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

Oh wow! I am impressed!

@hbushouse
Copy link
Collaborator

Wow, the docs now look great! Nice job.

But what's causing all the CI tests to fail in the jwst/tweakreg/tests/test_amutils.py test module?

@hbushouse hbushouse added this to the Build 10.1 milestone Nov 30, 2023
@hbushouse hbushouse mentioned this pull request Nov 30, 2023
7 tasks
@braingram braingram closed this Nov 30, 2023
@braingram braingram reopened this Nov 30, 2023
@braingram
Copy link
Collaborator Author

Thanks for pointing that out!
I also saw a SSL warning in the logs so I'm thinking the service where the catalogs are downloaded from dropped the ball (perhaps due to the other network issues yesterday).
I didn't see those failures in earlier runs or locally. I closed and reopened this to trigger the CI.

Copy link
Collaborator

@hbushouse hbushouse left a comment

Choose a reason for hiding this comment

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

OK, looks good now.

@hbushouse hbushouse merged commit 4304fe9 into spacetelescope:master Nov 30, 2023
@braingram braingram deleted the spec_docs branch November 30, 2023 14:55
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.

Atributes documenation in most steps appear garbled
3 participants