-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Decoupling dvcignore and fs #5812
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
Changes from all commits
4539448
37d835b
e903ad6
ddabe4b
08f2af6
579df8b
0a14199
5da4476
96f5c60
fb2baab
948e8f2
9291261
bed503d
ff3a647
ecb3def
3335f44
0228218
efd422f
049576a
87fa570
50c41d9
dcb6060
550ed53
d2a39f6
e2c63b1
0235086
7b1813a
264f791
f8e0e59
09fe320
d54edee
7a38d12
a55517a
6dab04b
2cfc1a6
583b366
2971123
17bb445
7d394d4
d569ba1
adc3e87
b2086ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -124,7 +124,8 @@ def relpath(self): | |
| return relpath(self.path) | ||
|
|
||
| def exists(self): | ||
| return self.repo.fs.exists(self.path) | ||
| is_ignored = self.repo.dvcignore.is_ignored_file(self.path) | ||
| return self.repo.fs.exists(self.path) and not is_ignored | ||
|
Comment on lines
+127
to
+128
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Love how we now use |
||
|
|
||
| def _is_git_ignored(self): | ||
| return is_git_ignored(self.repo, self.path) | ||
|
|
@@ -144,8 +145,10 @@ def _load(self): | |
| # 3. path doesn't represent a regular file | ||
| # 4. when the file is git ignored | ||
| if not self.exists(): | ||
| is_ignored = self.repo.fs.exists(self.path, use_dvcignore=False) | ||
| raise StageFileDoesNotExistError(self.path, dvc_ignored=is_ignored) | ||
| dvc_ignored = self.repo.dvcignore.is_ignored_file(self.path) | ||
| raise StageFileDoesNotExistError( | ||
| self.path, dvc_ignored=dvc_ignored | ||
| ) | ||
|
|
||
| self._verify_filename() | ||
| if not self.repo.fs.isfile(self.path): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,7 +53,7 @@ class AzureAuthError(DvcException): | |
| pass | ||
|
|
||
|
|
||
| class AzureFileSystem(FSSpecWrapper): | ||
| class AzureFileSystem(FSSpecWrapper): # pylint:disable=abstract-method | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a less dangerous way: you could add EDIT: on the other hand we've been using it in other FileSystems for awhile 🙁 |
||
| scheme = Schemes.AZURE | ||
| PATH_CLS = CloudURLInfo | ||
| PARAM_CHECKSUM = "etag" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.