-
Couldn't load subscription status.
- Fork 1
Feature/fileinput class for alto #258
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
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #258 +/- ##
===========================================
- Coverage 99.40% 99.29% -0.12%
===========================================
Files 24 26 +2
Lines 1012 1135 +123
Branches 28 37 +9
===========================================
+ Hits 1006 1127 +121
- Misses 2 4 +2
Partials 4 4 🚀 New features to boost your workflow:
|
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.
I expect some of this logic to change a fair bit when we integrate the xml parsing, but I think it would be helpful to merge this in as an initial implementation to build on.
I'd like to keep the validation issue open because that's one of the pieces I expect to change most. We didn't discuss specifics, but I think we can be a bit more forgiving. I would propose the following:
- non-xml files are ignored (but logged - maybe info)
- non-alto xml files are ignored (but log a warning)
- error if no alto xml files are found in the zipfile
I also think we won't need to iterate over the files twice, the parsing should also handle the validation piece you're doing now - i.e., if we attempt to open a non-alto file as our alto xml object, then the object should raise an exception that we can catch and report here in the input class.
Co-authored-by: Rebecca Sutton Koeser <rlskoeser@users.noreply.github.com>
Thank you for suggesting this. I’ve added them as a note in the validation issue and will address them. |
Associated Issue(s): #250 #253 #256
Changes in this PR
Notes
Corpus Buildernotebook’s upload control: it draws allowed extensions straight from the backend input classes (filetypes=FileInput.supported_types()), and because our ALTOInput subclass now declares the.zipfile type, the widget already accepts zip uploads. Also tested uploading a zip in the UI, which worked. So Make Marimo Corpus Builder notebook accept zipfile input #256 can be closed.