Commit Graph

46 Commits

Author SHA1 Message Date
f79be86361
templates/index.html: Use Bootstrap form components 2021-03-13 13:50:46 +02:00
3715c5e976
Use new commit for csv-metadata-quality
This one doesn't treat the fixing of invalid multi-value separators
as "unsafe".
2021-03-13 13:02:47 +02:00
8603ec4bca
main.py: Rework command line args
Turns out we only need to use sys.argv when we were trying to run
the csv-metadata-quality module directly in Python by importing it.
2021-03-13 12:52:22 +02:00
0471820f3a
main.py: Actually use sys.argv
I set this but never actually passed it to the subprocess. Now I'm
wondering if I actually need it, or if that was just when I was tr-
ying to import the csv-metadata-quality module?
2021-03-13 12:49:01 +02:00
f1de00d7ca
Regenerate requirements
Generated using poetry:

  $ poetry export --without-hashes -f requirements.txt > requirements.txt
  $ poetry export --without-hashes --dev -f requirements.txt > requirements-dev.txt
2021-03-12 23:11:33 +02:00
31e699bb8b
poetry.lock: Sync lockfile 2021-03-12 23:10:55 +02:00
982b47459c
Use gunicorn to run on Google App Engine
See: https://cloud.google.com/appengine/docs/flexible/python/quickstart
2021-03-12 23:10:29 +02:00
38ace23f97
.gitignore: Add __pycache__ 2021-03-12 23:09:29 +02:00
e5f57802f3
Don't ignore uploads directory
We're using /tmp now since we apparently can't create and upload to
arbitrary directories on Google App Engine (?).
2021-03-12 23:08:28 +02:00
69abc3d764
Add downloading of cleaned CSV file 2021-03-12 23:00:48 +02:00
37cee1d3f0
Add configuration for isort
See: https://sourcery.ai/blog/python-best-practices/
2021-03-12 22:59:57 +02:00
126bf74ea0
main.py: Remove comments 2021-03-12 21:28:24 +02:00
54ea340b80
poetry.lock: Run poetry update 2021-03-12 21:24:51 +02:00
75c5e48aa3
templates/header.html: Link to home in navbar 2021-03-12 21:24:31 +02:00
4de4388b1e
Encode filenames to base64 and change URL to /result 2021-03-12 21:22:03 +02:00
032fa5f2e7
pyproject.toml: Use default csv-metadata-quality release
Now that we are just running the command line version via a Python
subprocess we don't have to do anything special.
2021-03-12 21:18:50 +02:00
633fb8419a
Regenerate requirements.txt
Generated using poetry:

  $ poetry export --without-hashes -f requirements.txt > requirements.txt
  $ poetry export --without-hashes --dev -f requirements.txt > requirements-dev.txt
2021-03-12 19:43:06 +02:00
c1d79c147c
poetry.lock: Update lockfile 2021-03-12 19:41:39 +02:00
477b5bcd42
Regenerate static assets 2021-03-12 19:40:49 +02:00
e13d63bf6b
Major refactor
Refactor the templates to include a header, use csv-metadata-quality
in a subshell instead of trying to import and pass args to it (which
I actually managed to do, but then trying to capture the output was
an issue), and use ansi2html to prepare the CLI output as the HTML.
2021-03-12 19:14:49 +02:00
ed747b2cef
templates/footer.html: Add link to csv-metadata-quality on GitHub 2021-03-12 19:07:29 +02:00
1f2589f35c
templates/footer.html: Retab 2021-03-12 19:06:52 +02:00
f1060e79b8
pyproject.toml: Use the web branch of csv-metadata-quality
I'm still trying to figure out what modifications we need to make
to the standalone command line tool to use it here from Flask.
2021-03-12 19:03:51 +02:00
1a92b99c68
templates: Reduce top margin 2021-03-11 22:54:46 +02:00
18643ca1ae
Regenerate requirements.txt
Generated using poetry:

  $ poetry export --without-hashes -f requirements.txt > requirements.txt
2021-03-11 22:49:52 +02:00
0eeea43f17
Use csv-metadata-quality 0.4.6-dev 2021-03-11 22:49:01 +02:00
0136d99046
Add route for processing the input file 2021-03-11 22:42:59 +02:00
207d5af64a
Split index.html template into header, index, and footer 2021-03-11 22:41:22 +02:00
08b83caeb4
.gcloudignore: Ignore some local files 2021-03-11 21:15:39 +02:00
4f1d6fad38
main.py: Import csv_metadata_quality
Now I understand how I can use this, for example to print the vers-
ion of the CLI tool in the HTML template.
2021-03-11 20:29:43 +02:00
ee54096561
templates/index.html: Improve layout
Based on the Bootstrap v5.0-beta2 sticky footer example.

See: https://getbootstrap.com/docs/5.0/examples/sticky-footer/
2021-03-11 20:28:42 +02:00
7e14635b99
.gitignore: Ignore node_modules 2021-03-11 20:27:32 +02:00
14d592d0ea
Build Bootstrap v5.0-beta2 CSS 2021-03-11 20:26:33 +02:00
0a8096788d
templates/index.html: More boilerplate 2021-03-11 17:59:51 +02:00
5086ea2376
templates/index.html: Use url_for to get CSS
This is apparently the way you do it in Flask.
2021-03-11 17:55:19 +02:00
b11296cb9c
Add style
This is just to see how it works on in Flask and Google App Engine,
later I'll do a proper layout.
2021-03-11 16:28:48 +02:00
d204c23b93
main.py: Try to upload to /tmp
Creating and uploading to an "uploads" directory works locally, but
on Google App Engine I get an HTTP 500. Let's try uploading to /tmp.
2021-03-11 16:06:33 +02:00
b3e66e1a8f
Add .gitignore 2021-03-11 15:56:56 +02:00
81b5206e97
Add simple HTML template with file upload
Code taken from the following blog posts:
  - https://pythonbasics.org/flask-upload-file
  - https://blog.miguelgrinberg.com/post/handling-file-uploads-with-flask
2021-03-11 15:55:58 +02:00
482cd25182
Add .gcloudignore
Something added by gcloud.
2021-03-11 14:38:03 +02:00
2a5f612fe9
Add main.py
Following basic Flask on Google App Engine tutorial:

https://realpython.com/python-web-applications/#build-a-basic-python-web-application
2021-03-11 14:32:50 +02:00
b04b441c3f
Add ipython to dev dependencies 2021-03-11 14:06:05 +02:00
446ef95519
Generate requirements.txt
Generated using poetry:

  $ poetry export --without-hashes -f requirements.txt > requirements.txt
2021-03-11 13:51:25 +02:00
2509655807
app.yaml: Add runtime for Google App Engine
Currently 3.9 is in preview so I'll use 3.8.

See: https://cloud.google.com/appengine/docs/standard/python3/runtime
2021-03-11 13:49:53 +02:00
a2126d6f3c
LICENSE.txt: Add copy of AGPLv3.0 license text
From: https://www.gnu.org/licenses/agpl-3.0.txt
2021-03-11 13:47:30 +02:00
a7be9ff1b7
Initial project creation with poetry init 2021-03-11 13:47:06 +02:00