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

DOC: hyperlink registry #442

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

raybellwaves
Copy link
Contributor

@raybellwaves raybellwaves commented Oct 8, 2020

I test locally later.

You can add a rtd build check using the site (click button at botton of image)
Screenshot from 2020-10-08 08-00-05

@raybellwaves raybellwaves marked this pull request as draft October 8, 2020 12:01
@raybellwaves raybellwaves marked this pull request as ready for review October 8, 2020 19:31
@raybellwaves
Copy link
Contributor Author

couldn't get the hyperlink to work. I belive because https://filesystem-spec.readthedocs.io/en/latest/_modules/fsspec/registry.html isn't part of the API.

@martindurant
Copy link
Member

Feel free to add it. The registry could probably do with more work to include searching for entrypoints anyway.

@raybellwaves
Copy link
Contributor Author

bit unsure where to put it. Dropped it in Built-in Implementations but not sure if autofunction is appropriate. The hyperlink works but it's not very useful. Ideally want to show the dict when you click on the hyperlink from the home page

"file": {"class": "fsspec.implementations.local.LocalFileSystem"},
    "memory": {"class": "fsspec.implementations.memory.MemoryFileSystem"},
    "dropbox": {
        "class": "dropboxdrivefs.DropboxDriveFileSystem",
        "err": (
            'DropboxFileSystem requires "dropboxdrivefs",'
            '"requests" and "dropbox" to be installed'
        ),
    },
...

Screenshot from 2020-10-08 21-05-36

@martindurant
Copy link
Member

A couple of possible solutions for directly including the dictionary: https://stackoverflow.com/questions/27875455/displaying-dictionary-data-in-sphinx-documentation/29789910

@martindurant
Copy link
Member

(ping)

@@ -55,7 +55,7 @@ The current list of known implementations can be found as follows
known_implementations

These are only imported on request, which may fail if a required dependency is missing. The dictionary
``fsspec.registry`` contains all imported implementations, and can be mutated by user code, if necessary.
:py:class:`fsspec.registry.known_implementations` contains all imported implementations, and can be mutated by user code, if necessary.
Copy link
Member

Choose a reason for hiding this comment

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

Actually, on second reading, this is wrong. fsspec.registry is indeed the set of classes that have been used so far: the values are python class objects. known_implementations is a dictionary where the values are dictionaries of import details, location of the class and reasonable error messages - it serves as the source of the classes for registry via fsspec.get_filesystem_class, but you could edit either one at runtime.

@martindurant
Copy link
Member

Sorry, this seems to have got lost. Still interested?

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.

2 participants