-
Notifications
You must be signed in to change notification settings - Fork 43
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
How to test a new FileSystem implementation? #117
Comments
So the simplest way of getting started is: Add a simple custom implementation: # upath/implementations/ssh.py
from upath.core import UPath
class SSHPath(UPath):
pass register that implementation: # add to known_implementations
# https://github.com/fsspec/universal_pathlib/blob/e999d11250942cd7279fe9d699d0afcdba5dd8a6/upath/registry.py#L20
"ssh": "upath.implementations.ssh.SSHPath", Create import pytest
from upath import UPath
from upath.implementations.ssh import SSHPath
from ..cases import BaseTests
class TestSSHPath(BaseTests):
@pytest.fixture(autouse=True)
def path(self, local_testdir): # fixme: this might need a fixture to spawn an ssh server for testing
path = ... # fixme: create your ssh:// base urlpath for tests
self.path = UPath(path)
self.prepare_file_system()
def test_is_SSHPath(self):
assert isinstance(self.path, SSHPath) If tests fail, you can work on fixing them by overriding custom methods in Thanks for wanting to contribute ❤️ Cheers, |
And forgot:
Yes! That's correct |
Thank you for the pointers! I'm unable to work on this for the next 2 or 3 weeks, but I definitely want to give it a go afterwards. |
I've started working on this (link to fork). Seems to (mostly) work out of the box, with only 4 tests failing. I may be able to dedicate some more time to it later this week to fix those and then open a PR. |
Hi, I've been using sshfs recently and it seems to work great with UPath.
However, UPath raises a warning as
sshfs
has not been tested to work with it.And I think that's fair. While the basic stuff I've been doing works great, I think it would be good to ensure that all functionality is working.
I'd love to help address this and would appreciate some guidance.
Concretely, I have two questions:
setup.cfg
under[options.extras_require]
atdev =
, is that correct?The text was updated successfully, but these errors were encountered: