arXiv / arxiv-submission-ui

User interface of NG submit system.
MIT License
2 stars 6 forks source link

ARXIVNG-1082 Upload integration #28

Closed erickpeirson closed 6 years ago

erickpeirson commented 6 years ago

There is plenty more work to do on the upload UI, but this delivers an MVP for uploading files and displaying errors. Let's surface any glaring UI issues, but queue them for separate tickets to avoid blocking.

Holding off on writing any tests for the upload controller until we're happy with the overall behavior.

To try it out, you'll need to run the filemanager service. I've pushed an rc0 image for use here:

docker run -it -e "JWT_SECRET=foosecret" -p 8001:8000 arxiv/filemanager:0.1rc0

Then run the submission UI with:

CSRF_SECRET=csrfbarsecret CLASSIC_DATABASE_URI=sqlite:///foo.db \
  FILE_MANAGER_ENDPOINT=http://localhost:8001/filemanager/api \
  FLASK_APP=app.py FLASK_DEBUG=1 \
  JWT_SECRET=foosecret \
  pipenv run flask run

See README.md for details on generating an auth token.

erickpeirson commented 6 years ago

@eawoods @JaimieMurdock Ok, pardon all of the post-PR updates. I think I've ironed out the tests and linting issues. Going to stop here, and leave additional fixes/improvements for separate PRs.

image

erickpeirson commented 6 years ago

Going ahead with the merge, to keep rolling

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 253


Changes Missing Coverage Covered Lines Changed/Added Lines %
submit/controllers/util.py 9 10 90.0%
submit/factory.py 1 3 33.33%
submit/config.py 0 8 0.0%
submit/domain.py 56 75 74.67%
submit/filters.py 7 32 21.88%
submit/services/filemanager.py 36 61 59.02%
submit/routes/ui.py 19 44 43.18%
submit/controllers/upload.py 58 122 47.54%
<!-- Total: 195 364 53.57% -->
Files with Coverage Reduction New Missed Lines %
submit/factory.py 1 47.37%
submit/controllers/util.py 1 79.8%
submit/services/filemanager.py 26 51.35%
<!-- Total: 28 -->
Totals Coverage Status
Change from base Build 207: -8.5%
Covered Lines: 841
Relevant Lines: 1251

💛 - Coveralls