-
Notifications
You must be signed in to change notification settings - Fork 3
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
http API #327
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #327 +/- ##
==========================================
- Coverage 59.69% 55.67% -4.02%
==========================================
Files 29 31 +2
Lines 4364 4688 +324
Branches 498 505 +7
==========================================
+ Hits 2605 2610 +5
- Misses 1261 1573 +312
- Partials 498 505 +7 ☔ View full report in Codecov by Sentry. |
Great, I'll review this ASAP. |
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.
OK, this is really brillant. I've tested it on my local copy of the community-archive. I could not test the multiple-version feature, as the local copy of course has only the latest versions.
I left some comments about a more efficient implementation of getArchiveByName
which would make prepPacs
redundant. And I noticed a redundant test file. I mark this as "Comments", but I'm happy to approve it once you've checked those.
I know you've warned me about the hard-coded archive names in ServerHTML.hs
. Now that I see them I must admit that I'm getting a slight cringe-feeling about having them in. I get it, and for pragmatic reasons I think maybe this is OK for now.
I have a suggestion to fix this, but I admit that it might be too much work for now, so maybe we can put that for the future:
The serve
command could take an optional flag archivesFile
, which would replace the current -d arch_name=path
syntax by a TSV file. In that file, we could accept two basic columns, which is archive name and path, and then additional optional columns indicating a brief description for the website and github links and stuff. So this file could like this:
community-archive /path/to/pca "Poseidon Community Archive" "Poseidon Community Archive (PCA) with per-paper packages and genotype data as published." "https://github.com/poseidon-framework/community-archive"
aadr-archive /path/to/paa "Poseidon AADR Archive" "Poseidon AADR Archive (PAA) with a structurally unified version of the AADR dataset repackaged in the Poseidon package format." "https://github.com/poseidon-framework/aadr-archive"
and maybe even additional columns to track whatever the server outputs specifically for the hard-coded names.
Again, I think I can't do this right now, as there are too many more important things, but this is a direction that I would prefer over the hard-coding. If you decide you also can't do it, then I suggest we leave it as is and move this comment into another github issue and tag it with "for the future" or so.
Thanks for the review! The idea to extend/replace Please note that I'm on holiday next week and will only come back to this afterwards. But feel free to make the requested chances yourself, if you feel like it. I think we should then host this version on the test server first, to involve @TCLamnidis, @93Boy, and @Kavlahkaff in the testing process. |
Adjusted server archive config system on top of #327
OK - the test server is now running the first draft of the data explorer: http://server.poseidon-adna.org:3000/explorer I would like to merge this asap, so please tell me only about bugs in this PR. Any feature requests should go here: #333 Note that this test-sever version hides download links, because the test server traditionally doesn't include .zip archives. |
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.
Very nice. I tried it out and I'm quite pleased. I had a rough look again through the code, but in the end I already reviewed all of this last time and in the other PR that was merged in. So from my side this is good to go!
OK - thanks! Will merge and instate this version as the main server one. |
Started to play with a server-rendered data explorer webpage.