Skip to content

Ensure that the tittle id is unique on the with different subcommand#62

Open
ice-tong wants to merge 2 commits intosphinx-doc:mainfrom
ice-tong:main
Open

Ensure that the tittle id is unique on the with different subcommand#62
ice-tong wants to merge 2 commits intosphinx-doc:mainfrom
ice-tong:main

Conversation

@ice-tong
Copy link
Copy Markdown

@ice-tong ice-tong commented Aug 15, 2024

Motivation

I found the URL hash property of the rendered action group tittle could be repeat conflict in one page. The following is a pseudo example to reproduce:

# xxx-cli
Some introduction of `xxx-cli` here...

## xxx-cli subcommand1
Some introduction of `xxx-cli subcommand1` here...
:::{eval-rst}
.. argparse::
   :module: xxx.cli
   :func: get_parser
   :prog: xxx-cli
   :path: subcommand1
:::

## xxx-cli subcommand2
Some introduction of `xxx-cli subcommand2` here...
:::{eval-rst}
.. argparse::
   :module: xxx.cli
   :func: get_parser
   :prog: xxx-cli
   :path: subcommand2
:::

Modification

  • sphinxarg/ext.py
    • Add the data['name'] to the title_as_id.
  • test/test_default_html.py
    • Update the unit test of subcommand.

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 15, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@2a2a202). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #62   +/-   ##
=======================================
  Coverage        ?   47.07%           
=======================================
  Files           ?       12           
  Lines           ?      958           
  Branches        ?      227           
=======================================
  Hits            ?      451           
  Misses          ?      467           
  Partials        ?       40           
Flag Coverage Δ
unittests 47.07% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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