Page MenuHomeSoftware Heritage

T293 - Add relative directory browsing view
ClosedPublic

Authored by jbertran on May 3 2016, 12:07 PM.

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jbertran retitled this revision from to T293 - Add relative directory browsing view.
jbertran updated this object.
jbertran edited the test plan for this revision. (Show Details)
jbertran added reviewers: ardumont, zack.
zack removed a reviewer: zack.

A couple of minor points that could be changed, but I've only looked at details.
@ardumont: can you have a look at the rest?

swh/web/ui/tests/views/test_browse.py
343 ↗(On Diff #57)

what does a print() do in a test case?
please remove it

swh/web/ui/views/browse.py
212–213 ↗(On Diff #57)

two minor points here:

  • "entrypath" could really be called "path", as there is no ambiguity
  • do we really need two separate routes? can't <path:path> default to None, and be tested in the remainder of the code if it is None or not to disambiguate? (note: I'm not sure of the answer w.r.t. werkzeug's semantics, but it's worth checking)
swh/web/ui/views/browse.py
212–213 ↗(On Diff #57)

From testing it with the /directory/ route commented out in favor of the /directory/<path>/ route, this actually breaks both routes - I suspect this is because the separating '/'s are necessary.

zack added inline comments.
swh/web/ui/views/browse.py
212–213 ↗(On Diff #57)

Gah. OK, never mind then.

In D22#313, @zack wrote:

A couple of minor points that could be changed, but I've only looked at details.
@ardumont: can you have a look at the rest?

yes, i will

swh/web/ui/tests/views/test_browse.py
345 ↗(On Diff #57)

It's a path to a 'file' here ^^

383 ↗(On Diff #57)

It's path to a dir here ^^.

jbertran edited edge metadata.
  • browse test: remove print, fix testing get request paths to match
  • /directory/ browsing view: rename entrypath parameter to path
ardumont edited edge metadata.
This revision is now accepted and ready to land.May 3 2016, 3:29 PM
jbertran edited edge metadata.
  • .gitignore: now ignoring emacs temp files
  • service: lookup_directory_with_path raises a NotFoundExc the entry
  • browsing view: add /browse/directory/<sha1_git>/[<path>/] to the
  • browse test: remove print, fix testing get request paths to match
  • /directory/ browsing view: rename entrypath parameter to path
This revision now requires review to proceed.May 3 2016, 3:52 PM
ardumont edited edge metadata.
This revision is now accepted and ready to land.May 3 2016, 3:54 PM
This revision was automatically updated to reflect the committed changes.
zack changed the visibility from "All Users" to "Public (No Login Required)".