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

Fix up docs linking #1499

Merged
merged 3 commits into from
Jan 21, 2025
Merged

Fix up docs linking #1499

merged 3 commits into from
Jan 21, 2025

Conversation

jsignell
Copy link
Member

@jsignell jsignell commented Jan 21, 2025

Related Issue(s):

Description:

That was a real slog. Yeesh. At least it encouraged me to add some more docs for .ext 🤷🏻

PR Checklist:

  • Pre-commit hooks and tests pass (run scripts/test)
  • Documentation has been updated to reflect changes, if applicable
  • This PR maintains or improves overall codebase code coverage.
  • Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.

.. automodule:: pystac.asset
:members:
:undoc-members:
:exclude-members: Asset
Copy link
Member Author

Choose a reason for hiding this comment

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

This pattern makes it so you can have the Asset indexed as pystac.Asset and the rest of the module as pystac.asset.whatever

("py:class", "Datetime"),
("py:class", "L"),
("py:class", "pystac.summaries.T"),
("py:class", "HREF"), # this one partially works
Copy link
Member Author

Choose a reason for hiding this comment

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

this was killing me. It works in some cases but not others. It was incredibly frustrating to try to figure out and in the end I gave up.

@@ -418,7 +418,7 @@ def sort_function(links: list[Link]) -> list[Link]:
)

children = map(
lambda x: cast(Union[pystac.Catalog, pystac.Collection], x),
lambda x: cast(pystac.Catalog | pystac.Collection, x),
Copy link
Member Author

Choose a reason for hiding this comment

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

I probably shouldn't have done this replace Union with | in this PR. Sorry.

@@ -26,6 +25,8 @@
from pystac.serialization.identify import STACJSONDescription, STACVersionID
from pystac.utils import get_required, map_opt

#: Generalized version of :class:`~pystac.Item`, :class:`~pystac.Asset`,
#: :class:`~pystac.ItemAssetDefinition` or :class:`~pystac.extensions.raster.RasterBand`
Copy link
Member Author

Choose a reason for hiding this comment

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

These make the TypeVars almost work in a normal way.

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.44%. Comparing base (312a081) to head (85efc57).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1499   +/-   ##
=======================================
  Coverage   91.44%   91.44%           
=======================================
  Files          54       54           
  Lines        7501     7505    +4     
  Branches      906      906           
=======================================
+ Hits         6859     6863    +4     
  Misses        457      457           
  Partials      185      185           

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

Copy link
Member

@gadomski gadomski left a comment

Choose a reason for hiding this comment

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

Dang, @jsignell, doin' work. I gave it the once-over ... didn't check every link, but those are easy to fix later if we missed something. <3 thanks for this.

@jsignell jsignell added this pull request to the merge queue Jan 21, 2025
Merged via the queue into stac-utils:main with commit bc5eae4 Jan 21, 2025
23 checks passed
@jsignell jsignell deleted the doc-links branch January 21, 2025 22:24
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.

Fix broken documentation links
2 participants