-
Notifications
You must be signed in to change notification settings - Fork 280
PoC: Tap 14 #2114
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
Closed
Closed
PoC: Tap 14 #2114
Changes from 29 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
ce67fe4
Made the sample test repository
abs007 c8c3bb5
Updated spec versions inside 2.0.0
abs007 2d830a0
Updated the directory structure
abs007 1c507c3
Reverted to 6e20c31
abs007 ffbf4c4
Added the metadata under the newly created TAP 14 folder
abs007 66b52f8
Updated test_updater_ng.py file
abs007 99a454e
Updated the test_updater_ng.py file
abs007 3b2e29b
Updated updater.py
abs007 f95fdb5
New client updation logic along with tests. Also some test file changes
abs007 8567160
Updated test functionality and code structure
abs007 a70cc48
Updated updater.py
abs007 04231c1
Worked on reviews
abs007 e3fda3d
Used the black formatter on updater.py
abs007 5814a2c
Some more changes to updater.py and test_updater_ng.py
abs007 cf3d41c
Rename TAP 14 directory 1.0.0 -> 1
mnm678 e0ddd4a
TAP 14 fix tests
mnm678 3c7be68
fix lint
mnm678 78f5bfc
fix isort
mnm678 d3b1493
fix style issues
mnm678 d65640b
fix lint warnings
mnm678 250740d
Add TAP 14 integration tests
mnm678 1e7da4c
Update supported-versions.json to match TAP
mnm678 2842d05
add tap 14 root update order
mnm678 08b0c23
fix lint
mnm678 fa75d78
fix lint
mnm678 fd3d4d7
fix pylint errors
mnm678 2d6847c
lint
mnm678 851b2d6
clean up tests
mnm678 76567c6
simplify and refactor spec version checks
mnm678 515b4f2
Move repository supported-versions to root
mnm678 df2ecd4
Fix typs
mnm678 6b7cf5d
list -> List for python < 3.9
mnm678 f57bac7
fix pylint errors
mnm678 4ffba95
lint fix
mnm678 81c9718
use supported_versions fields for root update
mnm678 db67863
format tests
mnm678 4b5bf7e
remove flag not supported in python < 3.8
mnm678 a2e58e2
clarify partition
mnm678 e77f033
Add feature to supported versions
mnm678 d491d46
fix lint
mnm678 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -205,10 +205,15 @@ def _fetch(self, url: str) -> Iterator[bytes]: | |
if path.startswith("/metadata/") and path.endswith(".json"): | ||
# figure out rolename and version | ||
ver_and_name = path[len("/metadata/") :][: -len(".json")] | ||
# inside a version folder | ||
if "/" in ver_and_name: | ||
ver_and_name = ver_and_name.split("/")[1] | ||
version_str, _, role = ver_and_name.partition(".") | ||
# root is always version-prefixed while timestamp is always NOT | ||
if role == Root.type or ( | ||
self.root.consistent_snapshot and ver_and_name != Timestamp.type | ||
self.root.consistent_snapshot | ||
and ver_and_name != Timestamp.type | ||
and ver_and_name != "supported-versions" | ||
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. This isn't a thing anymore, right? |
||
): | ||
version: Optional[int] = int(version_str) | ||
else: | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if there's multiple nested folders?
ver_and_name = "/foo/bar.json"
I like
For making intent a little clearer there.
You can also
assert len(ver_and_name.split("/") <= 2