Skip to content

Conversation

@khsrali
Copy link
Contributor

@khsrali khsrali commented Oct 7, 2025

When using the search bar, all un-related api results is shown and makes it incredibly difficult to fetch the result of actual documentation.

image

I first, aimed to remove api-doc from the search results. But sphinx doesn't allow it. I struggled two hours with no success.
@edan-bainglass also looked up these references:
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_search_scorer
https://docs.readthedocs.com/dev/latest/search-integration.html

Unfortunately it seems not doable. Or requires two days of work to make it.
We suggest to drop api-auto-docs for now, as an urgent solution. If one finds a solution in future they can safely revert this PR/commit.

@khsrali khsrali requested a review from edan-bainglass October 7, 2025 13:36
@khsrali
Copy link
Contributor Author

khsrali commented Oct 7, 2025

Houston, We Have a Problem!
all the cross references fail, now.. because api is overly referenced elsewhere 😭

@GeigerJ2
Copy link
Contributor

GeigerJ2 commented Oct 7, 2025

Classic example of "should be quick" :/ good luck with this, guys, you will need it :D

@danielhollas
Copy link
Collaborator

danielhollas commented Oct 7, 2025

@khsrali @edan-bainglass have you seen this page? https://docs.readthedocs.com/platform/stable/config-file/v2.html#search

It looks like the ranking needs to be configured in the .readthedocs.yml. We actually already have a negative rank for apidoc, but I think the path is wrong.

reference/apidoc/*: -7

Can you try changing reference/apidoc/* to reference/api/*?

See also discussion in the original PR at #4217

@danielhollas
Copy link
Collaborator

Can you try changing reference/apidoc/* to reference/api/*?

Sorry, I was wrong. But I think it's still worth investigating if the existing configuration can be fixed I think.

@mbercx
Copy link
Member

mbercx commented Oct 9, 2025

@khsrali you inspired me: aiidateam/aiida-quantumespresso#1186

(along with the AutoAPI docs failing again on a totally random PR: aiidateam/aiida-quantumespresso#1185)

Re the references: I've "fixed" the issue by simply adding a line to the nitpick_ignore_regex in my conf.py:

nitpick_ignore_regex = [
    ...
    (r'py:.*', r'aiida_quantumespresso.*'),
]

@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.28%. Comparing base (cfbbd68) to head (9d46775).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7056      +/-   ##
==========================================
- Coverage   79.29%   79.28%   -0.00%     
==========================================
  Files         566      566              
  Lines       43847    43847              
==========================================
- Hits        34763    34760       -3     
- Misses       9084     9087       +3     

☔ 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.

@khsrali
Copy link
Contributor Author

khsrali commented Oct 17, 2025

image

The results already has improved quite a lot without autodoc.
If @edan-bainglass agrees, I'd say let's merge this for now.

@edan-bainglass
Copy link
Member

@khsrali have you looked into @danielhollas's suggestion? #7056 (comment)

@khsrali
Copy link
Contributor Author

khsrali commented Oct 17, 2025

@edan-bainglass

reference/apidoc/ is the correct path. I tried to reduce the score from -7 to even lower numbers, but it didn't help.

@edan-bainglass
Copy link
Member

reference/apidoc/ is the correct path. I tried to reduce the score from -7 to even lower numbers, but it didn't help.

Okay. Sorry, I don't have time to check this. @danielhollas seems to think this is the right path. Maybe have a look at the referenced PR for inspiration. If all else fails, you can proceed with this one. I'll approve now.

Copy link
Member

@edan-bainglass edan-bainglass left a comment

Choose a reason for hiding this comment

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

LGTM!

@khsrali khsrali merged commit 0d002ad into aiidateam:main Oct 17, 2025
3 checks passed
@khsrali khsrali deleted the docs/api-search branch October 17, 2025 13:04
mbercx added a commit to mbercx/aiida-quantumespresso that referenced this pull request Oct 23, 2025
The `aiida-core` AutoAPI docs have been (temporarily) disabled in:

aiidateam/aiida-core#7056

Since we still have several intersphinx references to the `aiida-core` AutoAPI docs,
our build started failing on RTD. Here we ignore any issues with missing `aiida-core`
references by adding a broad regex to the `nitpick_ignore_regex`.

We could also remove the references, but we haven't settled yet on whether to
reintroduce the AutoAPI docs in the future (also for this package).
mbercx added a commit to aiidateam/aiida-quantumespresso that referenced this pull request Oct 23, 2025
The `aiida-core` AutoAPI docs have been (temporarily) disabled in:

aiidateam/aiida-core#7056

Since we still have several intersphinx references to the `aiida-core` AutoAPI docs,
our build started failing on RTD. Here we ignore any issues with missing `aiida-core`
references by adding a broad regex to the `nitpick_ignore_regex`.

We could also remove the references, but we haven't settled yet on whether to
reintroduce the AutoAPI docs in the future (also for this package).
mbercx added a commit to aiidateam/aiida-quantumespresso that referenced this pull request Oct 23, 2025
The `aiida-core` AutoAPI docs have been (temporarily) disabled in:

aiidateam/aiida-core#7056

Since we still have several intersphinx references to the `aiida-core` AutoAPI docs,
our build started failing on RTD. Here we ignore any issues with missing `aiida-core`
references by adding a broad regex to the `nitpick_ignore_regex`.

We could also remove the references, but we haven't settled yet on whether to
reintroduce the AutoAPI docs in the future (also for this package).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants