-
Notifications
You must be signed in to change notification settings - Fork 92
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
Fix package browsing #29
Conversation
Add a type-key to the top-level to make it a “GROUP” node to fix package browsing.
True, we could do that, but we'd break existing packages. Are we still early enough that that's a better option? |
Probably fine to break... Though you could do both, and add a TODO to remove the code that adds the key when reading the package. |
@@ -315,6 +316,7 @@ def _add_to_contents(self, fullname, objhash, ext, path, target): | |||
leaf = ipath.pop() | |||
|
|||
ptr = contents | |||
ptr.setdefault(TYPE_KEY, NodeType.GROUP.value) |
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.
Why not just make sure get_contents
always returns a dict with the key? If the package doesn't have any objects, this won't run, right?
quilt/tools/store.py
Outdated
@@ -129,6 +129,8 @@ def get_contents(self): | |||
try: | |||
with open(self._path, 'r') as contents_file: | |||
contents = json.load(contents_file) | |||
# Make the top-level a GROUP node | |||
contents[TYPE_KEY] = NodeType.GROUP.value |
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.
Just move this to the end of the function, before return
- I think that should take care of everything?
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.
Looks fine - just remove the no-longer-needed (I think?) call further down.
@@ -315,6 +316,7 @@ def _add_to_contents(self, fullname, objhash, ext, path, target): | |||
leaf = ipath.pop() | |||
|
|||
ptr = contents | |||
ptr.setdefault(TYPE_KEY, NodeType.GROUP.value) |
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.
This is unnecessary now, right?
* master: Update dependency vega to ^5.9.0 (#34) Update babel monorepo to ^7.7.5 (#31) Update dependency eslint-plugin-redux-saga to ^1.1.3 (#32) Update dependency terser-webpack-plugin to ^1.4.2 (#33) Update dependency @sentry/browser to ^5.10.1 (#27) Update dependency fetch-mock to ^8.0.1 (#28) Update dependency use-debounce to ^3.3.0 (#29) Update dependency react-app-polyfill to ^1.0.5 (#30) Update mui monorepo to ^4.7.1 (#25) Update dependency css-loader to ^3.2.1 (#21) Update dependency use-debounce to ^3.2.0 (#24) Update dependency eslint to ^6.7.2 (#22) Update dependency eslint-plugin-react to ^7.17.0 (#23) Update dependency aws-sdk to ^2.582.0 (#1) Update dependency style-loader to ^1.0.1 Update dependency lint-staged to ^9.5.0 Update dependency coveralls to ^3.0.9 Update dependency connected-react-router to ^6.6.1 Update renovate.json
* master: (48 commits) Better package list ux pt. 1: larger hit area (whole tile) (#1439) Fix interrupted downloads causing corrupted manifests (#1438) Fixed missing @ for decorator (#1441) PyPi improvements - VERSION file and CircleCi support for alpha releases (#1427) Fix Telemetry double counting (#1426) preview bio files as plain text (#1435) Link to open data (#1434) Update dependency @material-ui/core to ^4.7.2 (#37) Update dependency @babel/preset-env to ^7.7.6 (#38) Update dependency eslint-import-resolver-webpack to ^0.12.0 (#39) Update dependency vega to ^5.9.0 (#34) Update babel monorepo to ^7.7.5 (#31) Update dependency eslint-plugin-redux-saga to ^1.1.3 (#32) Update dependency terser-webpack-plugin to ^1.4.2 (#33) Update dependency @sentry/browser to ^5.10.1 (#27) Update dependency fetch-mock to ^8.0.1 (#28) Update dependency use-debounce to ^3.3.0 (#29) Update dependency react-app-polyfill to ^1.0.5 (#30) Update mui monorepo to ^4.7.1 (#25) Update dependency css-loader to ^3.2.1 (#21) ...
Make the top-level of contents a group node.