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 GitHubPath #155

Closed
wants to merge 1 commit into from
Closed

Add GitHubPath #155

wants to merge 1 commit into from

Conversation

juftin
Copy link
Contributor

@juftin juftin commented Oct 12, 2023

This PR adds an implementation of UPath for fsspec's GithubFileSystem

Resolves #154

@juftin
Copy link
Contributor Author

juftin commented Oct 12, 2023

There are failing unit tests to address still, a lot of them come down to the fsspec GihubFilesystem being read only (I think 🤔 ). I'll continue to look into them but wanted to get this work out as an example.

@ap--
Copy link
Collaborator

ap-- commented Oct 13, 2023

Thank you for the PR!

To disable the write tests, you can do it similar to how we handle the http filesystem tests. Just skip the write tests:

@pytest.mark.skip
def test_mkdir(self):
pass
@pytest.mark.skip
def test_mkdir_exists_ok_false(self):
pass
@pytest.mark.skip
def test_mkdir_exists_ok_true(self):
pass
@pytest.mark.skip
def test_mkdir_parents_true_exists_ok_true(self):
pass
@pytest.mark.skip
def test_mkdir_parents_true_exists_ok_false(self):
pass
@pytest.mark.skip
def test_makedirs_exist_ok_true(self):
pass
@pytest.mark.skip
def test_makedirs_exist_ok_false(self):
pass
@pytest.mark.skip
def test_touch_unlink(self):
pass
@pytest.mark.skip
def test_write_bytes(self, pathlib_base):
pass
@pytest.mark.skip
def test_write_text(self, pathlib_base):
pass

@ap--
Copy link
Collaborator

ap-- commented Oct 13, 2023

Hmm and regarding the file access tests:

I wonder if we should add the test files to this repo, so that the base tests can be identical.

maybe under upath/tests/data/

ap-- added a commit that referenced this pull request Feb 8, 2024
Co-authored-by: juftin <juftin@juftin.com>
Co-authored-by: ap-- <andreas@poehlmann.io>
@ap--
Copy link
Collaborator

ap-- commented Feb 8, 2024

I took your PR and ported it to the newer UPath implementation here: 8314a65

Thanks again for your contribution 🙏 ❤️

@ap-- ap-- closed this Feb 8, 2024
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.

GitHubPath not working after 0.1.0
2 participants