-
Notifications
You must be signed in to change notification settings - Fork 111
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
NF: Rudimentary web-face for datasets.datalad.org #541
Conversation
datalad ls -w results in filesystem traversal at mentioned location. stores data in list with a flat sublist of files, directories per git/annex submodule. can handle recursive case too. Next: format to json for web UI consumption
reduce code in fsmodel class by inheriting from dsmodel fix bugs in list flattening date not working, parent submodule incorrect after first, symlink unicode coercion error in non datalad modules
modify DsModel for usability in FsModel after inheritance work on issue datalad#520
prints json as it computes each directory node information. not storing json in variable/memory as expect a lot of files in annex. this json is to be consumed by the web UI for the datasets. refer issue datalad#520.
Current coverage is 86.81% (diff: 87.84%)@@ master #541 diff @@
==========================================
Files 198 198
Lines 17887 18199 +312
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 15521 15799 +278
- Misses 2366 2400 +34
Partials 0 0
|
return -1 | ||
|
||
@property | ||
def _type(self): |
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.
Convention is to append _ as a suffix, not as a prefix if just need to avoid collision with the built in defs
Add DOC-strings to _ls_web class, follow convention Based on comments on pull#541
use dicts to allow json.dumps to handle conversion to json refactor to traverse complete directory tree only once improve node names using leaf_node function remove redundant parent repo extraction code
Each subdirectory has a json containing the metadata on files etc available in that subdirectory only, no deeper standardizes json to simplify rendering dirs for website
adds search for file at each directory level, adds css styling based on file/folder type(i.e annex, git etc) uses datatables library for rendering json as table and dir traversal
if ( data.type == 'dir' ) { | ||
$('td', row).eq(0).addClass('dir'); | ||
$('td', row).eq(1).addClass('dir'); | ||
$('td', row).eq(2).addClass('dir'); |
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.
Duplication is evil ;-)
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.
Yeah, i know! 😁
I'm going to clean all this up soon.
Any live example to see? |
no need to unwrap each submodule before passing to fs_traverse ignored index.html, ignore root's parent for web publish
handle GET parameters in URL to specify directory to load useful for adding permalink feature remove local assets, caching should take care of asset load speed
290b55e
to
af0ad24
Compare
8 similar comments
Add test to ensure replace when existing=replace resolves datalad#732
5 similar comments
replaced with #738 |
currently datalad ls -w results in filesystem traversal at
mentioned location. stores data in list with a flat
sublist of files, directories per git/annex submodule.
can handle recursive case too.
Next: create model, that can by passed to the json formatter
ToDo: create json formatter, create web UI renderer based on json
This is for the NF #520