-
Notifications
You must be signed in to change notification settings - Fork 56
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
ENH: Extension chapter - catalog content #917
ENH: Extension chapter - catalog content #917
Conversation
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 a wonderful addition to the handbook. Thx much!
I left a few comment re fit with the rest of the book and in particular a printed version.
:notes: Let's test the installation and look at the help information | ||
|
||
$ datalad catalog --help |
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.
In the printed book, this will be multiple (physical) pages of help output. I suspect that it is not needed to include this in full. You could consider adding a :lines: field to pick a meaningful, short snippted (e.g.
:lines: 1, 24-50`, numbers are random).
:notes: We can inspect the catalog's content with the tree command | ||
|
||
$ tree data-cat |
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.
I think the output could be trimmed here too (the main aspect is the set of subdirectories, not the files). In addition, consider adding a :linereplace:
expression to remove the version numbers that will change all the time.
"type": "file" | ||
"dataset_id": "abcd", | ||
"dataset_version": "1234", |
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.
There might be value in using an ID and version that are structurally identical to the real things (a UUID and a Git SHA). Doesn't add much weight, and would match the actual appearance of a real catalog better. Maybe?
$ cat data-cat/metadata/abcd/1234/217/17d85bd1b1526b7e463279763cdb0.json | jq . | ||
|
||
$ cat data-cat/metadata/abcd/1234/10f/7898cf7fc3465f078a67e15124c72.json | jq . |
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.
Also here it would be nice to trim the output to the essential bits.
``dataset_id`` and ``dataset_version`` by appending them to the URL in the format: | ||
|
||
<catalog-url>/#/dataset/<dataset_id>/<dataset_version>. |
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.
Mark up as code?
.. figure:: ../artwork/src/catalog/catalog_step_dataset.png | ||
|
||
The is the dataset view, with the subdatasets tab (auto-)selected. |
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.
The is the dataset view, with the subdatasets tab (auto-)selected. | |
This is the dataset view, with the subdatasets tab (auto-)selected. |
?
:notes: Get the custom logo | ||
|
||
$ wget -O datalad_logo_funky.svg https://raw.githubusercontent.com/datalad/tutorials/5e5fc0a4761248e5cedbc491c357d423d14a2b21/notebooks/catalog_tutorials/test_data/datalad_logo_funky.svg |
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.
Consider add -q
. The timestamps and download performance stats will be different on each run.
One more note: I think we use American not English throughout the handbook, so it would be great to turn all those |
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.
Thank you! I had fixed a few typos and a bit of formatting locally, but I don't have permission to push into your branch :/ I pushed cc810aa1 into a branch in this repo, though, so if you fetch origin
you could cherry-pick it, if you want.
You asked...
We haven't quite succeeded in building the advanced part of the book on appveyor - until then, its good that you committed the snippets. Once the beyond basics are build non-locally as well, you still can create the code snippets yourself and commit them, or take them from the appveyor diff and commit them - whichever is easier.
The Appveyor environment installs jq so it should be available for formatting. :) |
Thanks for the reviews!! @adswa I couldn't find that specific commit, so it's not included. I added you as a collaborator to my forked repo if you want to push there, or otherwise add it after merge? |
Whoops sorry its 5db52ec |
I had already fixed some of those in a previous commit and didn't want to deal with conflicts, so just added a new one with the rest of the tweaks. Thanks! |
Step one of the merge - let's get it into the extension_chapter branch. Thanks much for your work on this, @jsheunis! |
This PR:
extension-chaptor
branch of thebook
repo, i.e. PR to update New Advanced chapter on Extensions #883datalad-catalog
to therequirements-devel.txt
filerst
fileI am unsure about two things:
jq
for easy json formatting in shell outputs, which I currently do. This is fine if I generate the code snippets locally and commit to the PR (which I did), but I'm not sure how this will flow during the automated CI build. It's easy to update these lines of code though, I just need to find an alternative for formatting the outputs.