-
Notifications
You must be signed in to change notification settings - Fork 2
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
Document program architecture #166
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #166 +/- ##
==========================================
+ Coverage 47.08% 47.30% +0.21%
==========================================
Files 27 27
Lines 3859 3854 -5
==========================================
+ Hits 1817 1823 +6
+ Misses 2042 2031 -11 ☔ View full report in Codecov by Sentry. |
f3df216
to
5e7c8a4
Compare
@yarikoptic I feel that this could use more details, but I'm not sure what. What do you want/need to see in this document? |
@yarikoptic Ping. |
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 this is very nice and informative. Left a few more questions to clarify. Follow up with more details on zarr man could be done separately.
doc/architecture.md
Outdated
> A new architecture is currently being planned for the code. See [issue | ||
> #67](https://github.com/dandi/dandidav/issues/67) for more information. | ||
|
||
This document is best augmented by the doc comments in the `dandidav` source. |
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 am not entirely sure that "doc comments" are in this context... so it should not be a PR changing this file?
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.
Doc comments are the documentation for the code's API, embedded in the source as triple-slashed comments (example) — like Python's docstrings, but using comments instead.
Also, by "augmented," I meant "To get more information about dandidav
, read the documentation in the source," not "If you want to add to this document, add to the documentation in the source instead."
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've reworded this section in f8355a5.
doc/architecture.md
Outdated
following inside a clone of this repository: | ||
|
||
```console | ||
cargo doc --open --document-private-items --no-deps |
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 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.
You're looking at (the top page of) the rendered documentation for the source code. It's not supposed to contain an overview or dedicated architecture description (that's what this document is for). The descriptions shown for each item are the rendered doc comments.
doc/architecture.md
Outdated
present in all other responses. | ||
|
||
- If any error occurs during the processing of a request, it will almost always | ||
"bubble up" to `DandiDav::handle_request()`, which will log the error and |
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.
"bubble up" to `DandiDav::handle_request()`, which will log the error and | |
"bubble up" to [`DandiDav::handle_request()`][handle-request], which will log the error and |
for convenience since we already have this hyperlink
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.
Done in 4b8db19.
doc/architecture.md
Outdated
the mirror at <https://datasets.datalad.org/dandi/zarr-manifests/>. It is the | ||
data source for the `/zarrs/` hierarchy served by `dandidav`. | ||
|
||
See the documentation for the `dandidav::zarrman` module for more information. |
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.
it is not really descriptive there ATM. Would be nice to get (follow up PR) some brief similar description for operations on zarrs.
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.
Expanded in bb682a1.
|
||
- Making calls to a `DandiClient` or `ZarrManClient` instance as | ||
appropriate to fetch information about the given resource and possibly | ||
its child resources |
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.
IIRC our endpoints for under zarr operations under /dandisets/
as within the .zarr
assets were notably slower than operation on zarrs under /zarrs/
. Is there any caching done/worth doing here to avoid redoing some splitting/decision making?
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 is no caching at the moment, but see #6.
doc/architecture.md
Outdated
redirect to the Archive API download URL. Unfortunately, certain WebDAV | ||
clients (i.e., [davfs2](https://savannah.nongnu.org/bugs/?65376)) do not | ||
support WebDAV servers that return redirects to other redirects, so the | ||
`--prefer-s3-redirects` CLI option was added to `dandidav` to instead |
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.
is that the option we use on our https://webdav.dandiarchive.org/ ? worth making explicit note here.
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.
Done in 4b8db19.
usually the blob ID and not user-friendly. Hence, by default, a `GET` | ||
request to `dandidav` for a blob asset will be responded to with a | ||
redirect to the Archive API download URL. Unfortunately, certain WebDAV | ||
clients (i.e., [davfs2](https://savannah.nongnu.org/bugs/?65376)) do not |
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.
isn't there also performance benefit from going directly to S3 in case of heavy (non-zarr) filetree hierarchies?
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 doubt there's much benefit. The Archive download URLs refer to assets by ID rather than by path, so it should be a simple lookup on the Archive's end. The cost to dandidav
is the same regardless of which download URL type it's returning.
Also, the `--document-private-items` option is already implied for binaries.
@yarikoptic Ping. |
I have skimmed briefly through changes etc, IMHO it is worth merging and then if anything to extend/fixup - we could do it later. |
Part of #148.