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

Add Lookup and misc updates. #14

Merged
merged 1 commit into from
Jun 4, 2024
Merged

Conversation

Carreau
Copy link
Collaborator

@Carreau Carreau commented Jun 3, 2024

No description provided.

@Carreau
Copy link
Collaborator Author

Carreau commented Jun 3, 2024

cc @rossbar

@Carreau
Copy link
Collaborator Author

Carreau commented Jun 3, 2024

and @tupui

@Carreau Carreau force-pushed the lookup branch 2 times, most recently from b547fa5 to 626aa65 Compare June 3, 2024 18:18
@tupui
Copy link

tupui commented Jun 3, 2024

Cool thanks 😃

if len(sys.argv) < 2:
sys.exit("Usage: python -m intersphinx_registry.lookup [packages...]")

packages = set(sys.argv[1:])
Copy link
Contributor

Choose a reason for hiding this comment

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

set will not respect order so it might be better to explicitly iterate?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, but get_intersphinx_mapping takes a set and mypy complains otherwise.

I don't think it will be used much with many packages, so I think we can have the order random for now and figure out if we want a stable order.

Copy link

Choose a reason for hiding this comment

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

It might actually be worth limiting it to one library at a time - if you had multiple .inv files in the same pager it might be harder to figure out which :external library to map back to. FWIW I think the python -m sphinx.ext.intersphinx lookup only supports one-at-a-time.

]


import logging as _logging
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

move logging to the top.

    python -m intersphinx_registry.lookup [package names]

Not direction -m intersphinx_registry in case we want to add
functionalities later.
@Carreau
Copy link
Collaborator Author

Carreau commented Jun 3, 2024

Ok, it can only lookup one for now.

@Carreau Carreau merged commit 341ccbd into Quansight-Labs:main Jun 4, 2024
1 check passed
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.

4 participants