Skip to content

WIP: Add multiple files support #127

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

Merged
merged 14 commits into from
Aug 20, 2020
Merged

WIP: Add multiple files support #127

merged 14 commits into from
Aug 20, 2020

Conversation

yammesicka
Copy link
Member

Solves #125

* Stop flake8 messages about asserts
* Add hash to each solution for comparision
* Further enhance the migration script
* Create upload model
* Make the view work again (with single file)
* Fix minor bug in the notification's HTML
@lgtm-com
Copy link

lgtm-com bot commented Aug 17, 2020

This pull request introduces 3 alerts when merging edc0af7 into 5ae871d - view on LGTM.com

new alerts:

  • 3 for Unused import

@lgtm-com
Copy link

lgtm-com bot commented Aug 17, 2020

This pull request introduces 2 alerts when merging 8758eb7 into 5ae871d - view on LGTM.com

new alerts:

  • 2 for Unused import

- Add tree view for files in HTML
- Change font CSS to work with our file view
- Add zip extractor
- Better error handling
for cls in self.__class__.__subclasses__():
logger.debug(f'Trying extractor: {cls.__name__}')
extractor = cls(to_extract=self.to_extract)
if extractor.can_extract():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • what happens when multiple extractors can extract? you will continue to get (solution_id, files) on the same file and you may encounter a weird behavior where for (solution_id, files) in extractor: will give you duplicates.

  • another thing, i think it will be best if we could have a log entry saying "i couldn't extract this: {filename}"

my suggestion is to do something like:

for cls ....:
    if extractor.can_extract():
        for ...
            yield ...
       return
    logger.warning(f"couldn't find extractor for {self.to_extract}")

@yammesicka yammesicka merged commit 4a686d1 into master Aug 20, 2020
@yammesicka
Copy link
Member Author

yammesicka commented Aug 20, 2020

Solved #125.

@yammesicka yammesicka deleted the multiple-files-support branch September 28, 2020 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants