summaryrefslogtreecommitdiffstatshomepage
path: root/tests (unfollow)
Commit message (Collapse)AuthorLines
3 daysAdd remaining association count sort optionsWolfgang Müller-1/+74
Now that we have all association counts mapped to their respective models we can easily allow sorting on them as well.
3 daysAdd filter for association countsWolfgang Müller-23/+76
This will replace the old 'empty' filter on comic associations and introduce a generic way of matching against association counts, along with support for different operators like 'greater than' or 'lower than'. Models that did not previously have a way of matching against their associates (like filtering for Artists that have N comics associated with them) now gain that functionality. For now the frontend keeps the simpler approach of allowing the user to only filter for empty associations, but we nonetheless need to adjust the 'empty' field to instead be linked to the new 'count' field.
2025-01-19backend: Add basic statistics query endpointWolfgang Müller-0/+106
For now we simply collect totals for all scrapers, models, and comic associations. These should be sufficient to compile some basic but still interesting statistics.
2025-01-16backend/plugins: Add scraper for info.yaml from schale.networkWolfgang Müller-0/+88
2024-11-15backend/lint: Do not shadow certain builtinsWolfgang Müller-17/+17
This commit enables ruff's flake8-builtin linter that emits warnings when builtin functions are shadowed. This is useful for builtins like "dict", "list", or "str" which we use often. Given the nature of this program we historically rely a lot on the usage of "id", "hash", and "filter" as variable names which also shadow Python builtins. For now let's ignore those, we have not used any of them in our code and the impact to the codebase would be considerable. This might be revisited in the future.
2024-11-15backend/plugins: Throw error if E-Hentai response is missing 'gmetadata'Wolfgang Müller-0/+16
It might be that we get a valid (maybe empty) response from the API, in which case we do not want to simply crash because we expect the 'gmetadata' field in the response. Instead, throw a proper ScrapeError for it.
2024-11-15backend/tests: Add tests for the E-Hentai APIWolfgang Müller-0/+140
2024-11-15backend/tests: Add tests for the anchira scraperWolfgang Müller-0/+107
2024-11-15backend/tests: Remove unneeded parameter in test_gallery_dlWolfgang Müller-1/+1
2024-11-15backend/plugins: Have exhentai assume no censorship for non-hWolfgang Müller-2/+5
Non-H usually has nothing to censor, so this should be a safe default. We have not come across anything where this would have been a false positive.
2024-11-14backend/tests: Add tests for gallery_dl scrapersWolfgang Müller-0/+646
2024-11-14backend/scraper: Have collect() ignore None resultsWolfgang Müller-0/+15
If a parser function returned None we yield it regardless, even though it won't have any impact further down the line. Instead clean up the collect() stream as early as possible.
2024-11-14backend/tests: Add test for open_archive_fileWolfgang Müller-1/+40
2024-11-14backend/scraper: Add parser methods for LanguageWolfgang Müller-0/+33
We can expect a number of scraper sources to either give languages as ISO 639-3 or as their English name, so it makes sense to implement a simple parser method on our side.
2024-11-14backend/lint: Format overlong lineWolfgang Müller-1/+3
2024-11-14backend/lint: Implement flake8-simplify suggestionsWolfgang Müller-13/+12
2024-11-14backend/lint: Fix import formattingWolfgang Müller-16/+35