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

docs(algolia): add methods from backend pages to algolia index #9608

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

gforsyth
Copy link
Member

Description of changes

The backend-specific methods are added to the backend pages
programmatically using quarto. That seems to lead to them not showing
up in our Algolia search, because they aren't being scraped.

It's a little gross, but I've added in a section to our api docs
rendering scripts to also dump the corresponding records for each method
into a backend-specific json file during quarto rendering.

Then those backend-specific records files are loaded and added to the
Algolia index in upload-algolia-api.py

Issues closed

Resolves #9600

@gforsyth gforsyth force-pushed the algolia_backend_docs branch 2 times, most recently from 79892d8 to 50ac036 Compare July 16, 2024 15:41
Copy link
Member

@cpcloud cpcloud left a comment

Choose a reason for hiding this comment

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

Seems fine to me! I guess we should be careful about moving Backend classes around now to avoid breaking the index, but that seems low risk given that they haven't moved for a very long time.

@gforsyth gforsyth force-pushed the algolia_backend_docs branch from 50ac036 to c840ca5 Compare July 16, 2024 15:41
for record_json in glob.glob("docs/backends/*.json"):
with open(record_json) as f:
records = json.load(f)
index.save_objects(records)
Copy link
Member

Choose a reason for hiding this comment

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

How expensive are these calls? Is it worth trying to make a single call?

Copy link
Member

Choose a reason for hiding this comment

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

If there's any effort required, I'd say let's leave it until we notice a massive slowdown caused by this (which may never actually occur!)

Copy link
Member Author

Choose a reason for hiding this comment

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

nah, pretty easy to smoosh them together

The backend-specific methods are added to the backend pages
programmatically using `quarto`.  That seems to lead to them not showing
up in our Algolia search, because they aren't being scraped.

It's a little gross, but I've added in a section to our api docs
rendering scripts to also dump the corresponding records for each method
into a backend-specific json file during `quarto` rendering.

Then those backend-specific records files are loaded and added to the
Algolia index in `upload-algolia-api.py`
@gforsyth gforsyth force-pushed the algolia_backend_docs branch from c840ca5 to 3db807c Compare July 16, 2024 16:01
@gforsyth gforsyth merged commit c098c70 into ibis-project:main Jul 16, 2024
95 checks passed
@gforsyth gforsyth deleted the algolia_backend_docs branch July 16, 2024 19:43
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.

docs: missing to_parquet() docs
2 participants