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

Sync outdated developer API docs, add check in CI #1525

Merged
merged 11 commits into from
Jul 9, 2024

Conversation

victorlin
Copy link
Member

@victorlin victorlin commented Jul 3, 2024

Description of proposed changes

Related issue(s)

Checklist

  • Automated checks pass
  • Check fails if an existing doc is removed (example: 696284c)
  • Check if you need to add a changelog message
  • Check if you need to add tests
  • Check if you need to update docs

@victorlin victorlin self-assigned this Jul 3, 2024
@victorlin victorlin force-pushed the victorlin/docs-generation branch 3 times, most recently from 0123691 to 4c5aa46 Compare July 3, 2024 21:58
@victorlin victorlin changed the title Check developer API docs in CI Sync outdated developer API docs, add check in CI Jul 3, 2024
@victorlin victorlin mentioned this pull request Jul 3, 2024
5 tasks
@victorlin victorlin marked this pull request as ready for review July 3, 2024 22:08
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.69%. Comparing base (d33556c) to head (696284c).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1525      +/-   ##
==========================================
+ Coverage   69.63%   69.69%   +0.05%     
==========================================
  Files          74       74              
  Lines        7812     7827      +15     
  Branches     1910     1914       +4     
==========================================
+ Hits         5440     5455      +15     
  Misses       2086     2086              
  Partials      286      286              

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

Reflects the public/developer split from a single Python API.
This makes it easier to understand what's going on.
Command from dev docs:

    sphinx-apidoc \
      --force \
      --module-first \
      --separate \
      --no-toc \
      --output-dir docs/api/developer \
      augur
Warnings were:

    augur/curate/__init__.py:docstring of augur.curate.create_shared_parser:5: WARNING: Inline literal start-string without end-string.
    augur/curate/__init__.py:docstring of augur.curate.create_shared_parser:5: WARNING: Inline literal start-string without end-string.

It took some searching¹ + trial and error to figure out the fix.

¹ <sphinx-doc/sphinx#9140 (comment)>
Warnings were:

    augur/curate/apply_geolocation_rules.py:docstring of augur.curate.apply_geolocation_rules.load_geolocation_rules:9: WARNING: Definition list ends without a blank line; unexpected unindent.
    augur/curate/apply_geolocation_rules.py:docstring of augur.curate.apply_geolocation_rules.load_geolocation_rules:10: WARNING: Definition list ends without a blank line; unexpected unindent.
    augur/curate/apply_geolocation_rules.py:docstring of augur.curate.apply_geolocation_rules.load_geolocation_rules:11: WARNING: Definition list ends without a blank line; unexpected unindent.
    augur/curate/apply_geolocation_rules.py:docstring of augur.curate.apply_geolocation_rules.load_geolocation_rules:12: WARNING: Definition list ends without a blank line; unexpected unindent.
Warnings were:

    <unknown>:1: WARNING: py:class reference target not found: argparse._SubParsersAction
    <unknown>:1: WARNING: py:class reference target not found: argparse._SubParsersAction
These files are not referenced by the auto-generated docs.
Since augur.io is in both the public and developer APIs, only one can be
used for cross referencing meaning the other must have `:noindex:`.

Ideally the developer API docs would have `:noindex:` so the public API
docs can list all exported functions on its index page. However,
regenerating the developer API docs using sphinx-apidoc will remove the
`:noindex:` so that's not a direct option without digging further.
@victorlin victorlin merged commit 25be480 into master Jul 9, 2024
23 checks passed
@victorlin victorlin deleted the victorlin/docs-generation branch July 9, 2024 00:39
@victorlin
Copy link
Member Author

Merged without review per Slack message

jameshadfield added a commit that referenced this pull request Jul 10, 2024
Following instructions in `DEV_DOCS.md` and the (forthcoming) PR
<https://github.com/nextstrain/augur/pull/1527/files>.

These docs were missed during development of the rename command
<#1506> as that predated the CI
checks added in <#1525>
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.

1 participant