Compare commits

...

3 commits

Author SHA1 Message Date
4eeaa4f603 add scheduled tests
Some checks failed
check code / check-code-py310 (push) Waiting to run
check code / check-code-py311 (push) Waiting to run
check code / check-docs (push) Successful in 6s
check code / scan-code-py311 (push) Has been cancelled
check code / check-code-py38 (push) Has been cancelled
check code / check-code-py39 (push) Has been cancelled
2024-02-01 15:52:39 +01:00
0e8f3768c2 update changelog 2024-02-01 15:52:39 +01:00
1f73c306bd fix release notes action 2024-02-01 15:52:39 +01:00
3 changed files with 216 additions and 179 deletions

View file

@ -30,11 +30,14 @@ jobs:
- name: build package - name: build package
run: hatch build --clean run: hatch build --clean
- name: create release notes
run: bash get_release_notes.sh latest
- name: read changelog - name: read changelog
id: changelog id: changelog
uses: juliangruber/read-file-action@v1 uses: juliangruber/read-file-action@v1
with: with:
path: ./CHANGELOG.md path: ./RELEASENOTES.md
- name: create gitea release - name: create gitea release
uses: https://gitea.com/actions/release-action@main uses: https://gitea.com/actions/release-action@main

View file

@ -0,0 +1,20 @@
name: run scheduled tests
on:
issue_comment:
schedule:
- cron: "0 20 * * 6"
jobs:
check-code-py311:
runs-on: python311
steps:
- name: checkout code
uses: actions/checkout@v3
- name: install hatch
run: pip install -U hatch
- name: run tests
run: hatch run default:test

View file

@ -7,458 +7,472 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [Unreleased]
- Add support for more sites - Add support for more sites
## [2.4.0] - 2024-02-01
### Fixed
- Some issues with Python3.8 compatibility
### Changed
- Moved build system from woodpecker-ci to gitea actions
- Updated some dependencies
- Updated the docker image
- Switched from formatter/linter `black` to `ruff`
- Switches typing from `pyright` to `mypy`
## [2.3.1] - 2023-03-12 ## [2.3.1] - 2023-03-12
### Added ### Added
- Added TypedDicts for type checkers and type annotation - Added TypedDicts for type checkers and type annotation
### Fixed ### Fixed
- Fixed some typos in the README - Fixed some typos in the README
### Changed ### Changed
- Switched from pylint/pylama/isort/autoflake to ruff - Switched from pylint/pylama/isort/autoflake to ruff
- Switched from mypy to pyright and added strict type checking - Switched from mypy to pyright and added strict type checking
- Updated the api template - Updated the api template
## [2.3.0] - 2023-02-15 ## [2.3.0] - 2023-02-15
### Added ### Added
- Metadata is now added to each chapter. Schema - Metadata is now added to each chapter. Schema
standard: [https://anansi-project.github.io/docs/comicinfo/schemas/v2.0](https://anansi-project.github.io/docs/comicinfo/schemas/v2.0) standard: [https://anansi-project.github.io/docs/comicinfo/schemas/v2.0](https://anansi-project.github.io/docs/comicinfo/schemas/v2.0)
- Added `xmltodict` as a package requirement - Added `xmltodict` as a package requirement
- Cache now also saves the manga title - Cache now also saves the manga title
- New tests - New tests
- More typo annotations for function, compatible with python3.8 - More typo annotations for function, compatible with python3.8
- File format checker if you use the MangaDLP class directly - File format checker if you use the MangaDLP class directly
### Fixed ### Fixed
- API template typos - API template typos
- Some useless type annotations - Some useless type annotations
### Changed ### Changed
- Simplified the chapter info generation - Simplified the chapter info generation
- Updated the license year - Updated the license year
- Updated the API template - Updated the API template
- Updated the API detection and removed it from the MangaDLP class - Updated the API detection and removed it from the MangaDLP class
## [2.2.20] - 2023-02-12 ## [2.2.20] - 2023-02-12
### Fixed ### Fixed
- Script now doesn't exit if multiple mangas were requested and one had an error - Script now doesn't exit if multiple mangas were requested and one had an error
## [2.2.19] - 2023-02-11 ## [2.2.19] - 2023-02-11
### Added ### Added
- First version of the chapter cache (very basic functionality) - First version of the chapter cache (very basic functionality)
### Fixed ### Fixed
- Fixed all exception re-raises to include the original stack trace - Fixed all exception re-raises to include the original stack trace
### Changed ### Changed
- Simplified chapter download loop - Simplified chapter download loop
## [2.2.18] - 2023-01-21 ## [2.2.18] - 2023-01-21
### Fixed ### Fixed
- Fixed manga titles on non english language - Fixed manga titles on non english language
- Fixed title & filename fixing to not use `ascii` but `uft8` - Fixed title & filename fixing to not use `ascii` but `uft8`
### Added ### Added
- Fallback title to english of none was found in requested language - Fallback title to english of none was found in requested language
- More debug logs - More debug logs
- More tests - More tests
### Changed ### Changed
- Now uses the first found alt-title. Before it was the last - Now uses the first found alt-title. Before it was the last
- Removed `sys.exit` in the api - Removed `sys.exit` in the api
## [2.2.17] - 2023-01-15 ## [2.2.17] - 2023-01-15
### Fixed ### Fixed
- Set a timeout of 10 seconds for the api requests - Set a timeout of 10 seconds for the api requests
### Added ### Added
- `--name-format` and `--name-format-none` flags to add a custom naming scheme for the downloaded files. See - `--name-format` and `--name-format-none` flags to add a custom naming scheme for the downloaded files. See
docs: https://manga-dlp.ivn.sh/download/ docs: https://manga-dlp.ivn.sh/download/
- More debug log messages - More debug log messages
- More tests for the custom naming scheme - More tests for the custom naming scheme
- More type hints - More type hints
### Changed ### Changed
- Make `--format` a `click.Choice` option - Make `--format` a `click.Choice` option
- In the `--format` option the leading dot is now invalid. `--format .cbz` -> `--format cbz` - In the `--format` option the leading dot is now invalid. `--format .cbz` -> `--format cbz`
- Changed empty values from the api from None to an empty string - Changed empty values from the api from None to an empty string
- Minor code readability improvements - Minor code readability improvements
## [2.2.16] - 2022-12-30 ## [2.2.16] - 2022-12-30
### Fixed ### Fixed
- Log level is now fixed and should not default to 0 - Log level is now fixed and should not default to 0
- Docker schedule should now work again - Docker schedule should now work again
### Changed ### Changed
- Integrate logging logs to loguru via custom sink - Integrate logging logs to loguru via custom sink
- Simplify docker shell scripts - Simplify docker shell scripts
## [2.2.15] - 2022-12-29 ## [2.2.15] - 2022-12-29
### Added ### Added
- `--warn` and `--loglevel` flags - `--warn` and `--loglevel` flags
### Removed ### Removed
- Remove `--lean` and `--verbose` flags and remove custom log levels - Remove `--lean` and `--verbose` flags and remove custom log levels
### Changed ### Changed
- Move from standard library logging to [loguru](https://loguru.readthedocs.io/en/stable/index.html) - Move from standard library logging to [loguru](https://loguru.readthedocs.io/en/stable/index.html)
- Move from standard library argparse to [click](https://click.palletsprojects.com/en/8.1.x/) - Move from standard library argparse to [click](https://click.palletsprojects.com/en/8.1.x/)
## [2.2.14] - 2022-10-06 ## [2.2.14] - 2022-10-06
### Changed ### Changed
- Changed logging format to ISO 8601 - Changed logging format to ISO 8601
- Small logging corrections - Small logging corrections
## [2.2.13] - 2022-08-15 ## [2.2.13] - 2022-08-15
### Added ### Added
- Option to run custom hooks before and after each chapter/manga download - Option to run custom hooks before and after each chapter/manga download
- _Tests for the new hooks_ - _Tests for the new hooks_
- _Docs for the new hooks_ - _Docs for the new hooks_
- _Tests for mkdocs generation_ - _Tests for mkdocs generation_
### Changed ### Changed
- Verbose and Debug logging now have a space as a seperator between log level-name and log-level - Verbose and Debug logging now have a space as a seperator between log level-name and log-level
- APIs now have an attribute with their name (for the hooks) - `api.api_name` - APIs now have an attribute with their name (for the hooks) - `api.api_name`
- Docs moved to Cloudflare pages (generated with mkdocs) - Docs moved to Cloudflare pages (generated with mkdocs)
## [2.1.12] - 2022-07-25 ## [2.1.12] - 2022-07-25
### Fixed ### Fixed
- Image publishing with `hatch` on pypi should now work again - Image publishing with `hatch` on pypi should now work again
- The schedule fixer for the new `.sh` schedule should now work correctly - The schedule fixer for the new `.sh` schedule should now work correctly
### Added ### Added
- More CI tests: `pylint`, `pylama` and `autoflake` - More CI tests: `pylint`, `pylama` and `autoflake`
- New function in `get_release_notes.sh` to get the latest version - New function in `get_release_notes.sh` to get the latest version
- Docstrings for `MangaDLP` and the api module `Mangadex` - Docstrings for `MangaDLP` and the api module `Mangadex`
### Changed ### Changed
- CI workflow is now faster and runs natively on arm64 (before it was buildx/emulation) - CI workflow is now faster and runs natively on arm64 (before it was buildx/emulation)
- `Pylint`/`pylama` code improvements - `Pylint`/`pylama` code improvements
- Version management is now done with `hatch` (in `__about__.py`) - Version management is now done with `hatch` (in `__about__.py`)
## [2.1.11] - 2022-07-18 ## [2.1.11] - 2022-07-18
### Fixed ### Fixed
- The `--read` option now filters empty lines, so it will not generate an error anymore - The `--read` option now filters empty lines, so it will not generate an error anymore
- An error which was caused by the interactive input method when you did not specify a chapter or to list them - An error which was caused by the interactive input method when you did not specify a chapter or to list them
- Some typos - Some typos
### Added ### Added
- Options to configure the default schedule in the docker container via environment variables - Options to configure the default schedule in the docker container via environment variables
- Section the the docker [README.md](docker/README.md) for the new environment variables - Section the the docker [README.md](docker/README.md) for the new environment variables
- `autoflake` test in `justfile` - `autoflake` test in `justfile`
- Some more things which get logged - Some more things which get logged
### Changed ### Changed
- **BREAKING**: renamed the default schedule from `daily` to `daily.sh`. Don't forget to fix your bind-mounts to - **BREAKING**: renamed the default schedule from `daily` to `daily.sh`. Don't forget to fix your bind-mounts to
overwrite overwrite
the default schedule the default schedule
- Added the `.sh` suffix to the s6 init scripts for better compatibility - Added the `.sh` suffix to the s6 init scripts for better compatibility
- Adjusted the new logging implementation. It shows now more info about the module the log is from, and some other - Adjusted the new logging implementation. It shows now more info about the module the log is from, and some other
improvements improvements
## [2.1.10] - 2022-07-14 ## [2.1.10] - 2022-07-14
### Fixed ### Fixed
- Removed some unused files - Removed some unused files
### Added ### Added
- `logger.py` for all log related settings and functions - `logger.py` for all log related settings and functions
### Changed ### Changed
- Logging of output. The script now uses the `logging` library - Logging of output. The script now uses the `logging` library
## [2.1.9] - 2022-06-26 ## [2.1.9] - 2022-06-26
### Fixed ### Fixed
- Timeouts in tests, due to api limitations. Now added a wait time between tests - Timeouts in tests, due to api limitations. Now added a wait time between tests
- Pytest path - Pytest path
### Added ### Added
- `--lean` flag for less output - `--lean` flag for less output
- [justfile](https://github.com/casey/just) for setting up a dev environment and testing the code - [justfile](https://github.com/casey/just) for setting up a dev environment and testing the code
- [asdf](https://github.com/asdf-vm/asdf) for version management - [asdf](https://github.com/asdf-vm/asdf) for version management
- Dev requirements in [contrib/requirements_dev.txt](contrib/requirements_dev.txt) - Dev requirements in [contrib/requirements_dev.txt](contrib/requirements_dev.txt)
- `README` in [contrib](contrib) - `README` in [contrib](contrib)
### Changed ### Changed
- Handling of verbosity and logging. Now there are 4 types of verbosity: `normal`, `lean`, `verbose` and `debug` - Handling of verbosity and logging. Now there are 4 types of verbosity: `normal`, `lean`, `verbose` and `debug`
- CI/CD pipeline for testing and releases - CI/CD pipeline for testing and releases
- Coverage testing now also done with `tox` - Coverage testing now also done with `tox`
- Default verbosity of docker container is now `--lean` - Default verbosity of docker container is now `--lean`
- Reorganised [pyproject.toml](pyproject.toml) - Reorganised [pyproject.toml](pyproject.toml)
## [2.1.8] - 2022-06-22 ## [2.1.8] - 2022-06-22
### Fixed ### Fixed
- Interactive input - Interactive input
## [2.1.7] - 2022-06-22 ## [2.1.7] - 2022-06-22
### Added ### Added
- tox version testing - tox version testing
- New pre-release tests - New pre-release tests
- Build info's with hatch - Build info's with hatch
- [Pypi](https://pypi.org/project/manga-dlp/) build with hatch - [Pypi](https://pypi.org/project/manga-dlp/) build with hatch
- Pypi section in `README.md` - Pypi section in `README.md`
- [Snyk](https://app.snyk.io/org/olofvndrhr-t6h/project/aae9609d-a4e4-41f8-b1ac-f2561b2ad4e3) test results - [Snyk](https://app.snyk.io/org/olofvndrhr-t6h/project/aae9609d-a4e4-41f8-b1ac-f2561b2ad4e3) test results
in `README.md` in `README.md`
### Changed ### Changed
- Moved code from `manga-dlp.py` to `input.py` for uniformity - Moved code from `manga-dlp.py` to `input.py` for uniformity
- The default entrypoint is now `mangadlp.input:main` - The default entrypoint is now `mangadlp.input:main`
## [2.1.6] - 2022-06-21 ## [2.1.6] - 2022-06-21
### Fixed ### Fixed
- Docker labels are now working - Docker labels are now working
- Global variables are now fully uppercase - Global variables are now fully uppercase
- Some errors with static types - Some errors with static types
### Added ### Added
- bump2version config for releases - bump2version config for releases
- More tests with: `mypy` and `isort` - More tests with: `mypy` and `isort`
- New issue templates - New issue templates
### Changed ### Changed
- Release workflow now is based on configuration files - Release workflow now is based on configuration files
- Switched from `setup.py` to `pyproject.toml` - Switched from `setup.py` to `pyproject.toml`
- `README.md` now has sorted badges - `README.md` now has sorted badges
- Imports are now sorted with `isort` - Imports are now sorted with `isort`
- Static types are now checked with `mypy` - Static types are now checked with `mypy`
- Release note generation is now simplified - Release note generation is now simplified
## [2.1.5] - 2022-06-18 ## [2.1.5] - 2022-06-18
### Fixed ### Fixed
- Image names now have a suffix, as some comic readers have problems with no - Image names now have a suffix, as some comic readers have problems with no
suffix [fixes issue #2] suffix [fixes issue #2]
### Added ### Added
- `--format` section in the README - `--format` section in the README
## [2.1.4] - 2022-05-29 ## [2.1.4] - 2022-05-29
### Fixed ### Fixed
- Docker container now works again - Docker container now works again
- Fixed cron in docker container - Fixed cron in docker container
### Changed ### Changed
- Docker container scheduling is now more practical - Docker container scheduling is now more practical
## [2.1.3] - 2022-05-29 ## [2.1.3] - 2022-05-29
### Fixed ### Fixed
- Error-chapters and skipped-chapters list are now shown again - Error-chapters and skipped-chapters list are now shown again
- The Interactive input version now matches `--version` - The Interactive input version now matches `--version`
### Added ### Added
- Ability to list chapters with interactive input - Ability to list chapters with interactive input
### Changed ### Changed
- Replace `exit()` with `sys.exit()` - Replace `exit()` with `sys.exit()`
- Renamed class methods to not look like dunder methods - Renamed class methods to not look like dunder methods
- Script execution moved from `os.system()` to `subprocess.call()` - Script execution moved from `os.system()` to `subprocess.call()`
## [2.1.2] - 2022-05-20 ## [2.1.2] - 2022-05-20
### Fixed ### Fixed
- List chapters when none were specified - List chapters when none were specified
- Typos - Typos
### Added ### Added
- Ability to download whole volumes - Ability to download whole volumes
### Changed ### Changed
- Moved processing of list with links to input.py - Moved processing of list with links to input.py
- Updated README for volume and chapter selection - Updated README for volume and chapter selection
## [2.1.1] - 2022-05-18 ## [2.1.1] - 2022-05-18
### Fixed ### Fixed
- Progress bar on verbose output - Progress bar on verbose output
- Sonarqube link for CI - Sonarqube link for CI
- A few typos - A few typos
- Removed unnecessary escapes from file rename regex - Removed unnecessary escapes from file rename regex
### Added ### Added
- API template - API template
### Changed ### Changed
- Updated docker baseimage - Updated docker baseimage
- Rewrote app.py to a class - Rewrote app.py to a class
## [2.1.0] - 2022-05-16 ## [2.1.0] - 2022-05-16
### Fixed ### Fixed
- Detection of files. Now it will skip them again - Detection of files. Now it will skip them again
### Added ### Added
- Ability to save the chapters as pdf (only on amd64/x86) - Ability to save the chapters as pdf (only on amd64/x86)
- New output formats: rar, zip - New output formats: rar, zip
- Progress bar to show image download - Progress bar to show image download
- Interactive input if no command line flags are given - Interactive input if no command line flags are given
- Better KeyboardInterrupt handling - Better KeyboardInterrupt handling
- Better error handling - Better error handling
- Removed duplicate code - Removed duplicate code
### Changed ### Changed
- How the variables are used inside the script - How the variables are used inside the script
- Variables have now the same name as in other scripts (mostly) - Variables have now the same name as in other scripts (mostly)
- Better retrying when a task fails - Better retrying when a task fails
## [2.0.8] - 2022-05-13 ## [2.0.8] - 2022-05-13
### Changed ### Changed
- Rewrote parts of script to be easier to maintain - Rewrote parts of script to be easier to maintain
- Moved the input script to the base folder - Moved the input script to the base folder
- Moved all arguments to a class - Moved all arguments to a class
- Docker container creation - Docker container creation
## [2.0.7] - 2022-05-13 ## [2.0.7] - 2022-05-13
### Changed ### Changed
- Changed CI/CD Platform from Drone-CI to Woodpecker-CI - Changed CI/CD Platform from Drone-CI to Woodpecker-CI
- Release title is now only the version - Release title is now only the version
## [2.0.6] - 2022-05-11 ## [2.0.6] - 2022-05-11
### Fixed ### Fixed
- Filenames on windows (ntfs). Removed double quote from file and folder names - Filenames on windows (ntfs). Removed double quote from file and folder names
## [2.0.5] - 2022-05-11 ## [2.0.5] - 2022-05-11
### Fixed ### Fixed
- Better error handling on "KeyboardInterrupt" - Better error handling on "KeyboardInterrupt"
- Release notes now fixed - Release notes now fixed
### Added ### Added
- New test cases - New test cases
## [2.0.4] - 2022-05-10 ## [2.0.4] - 2022-05-10
### Added ### Added
- New test cases for more coverage - New test cases for more coverage
- Github release - Github release
- Updated docker baseimage - Updated docker baseimage
## [2.0.3] - 2022-05-10 ## [2.0.3] - 2022-05-10
### Fixed ### Fixed
- Test cases now work again - Test cases now work again
- Sonarqube settings - Sonarqube settings
### Added ### Added
- Coverage report in sonarqube - Coverage report in sonarqube
- Gitea release - Gitea release
## [2.0.2] - 2022-05-09 ## [2.0.2] - 2022-05-09
### Fixed ### Fixed
- Restart failed api requests - Restart failed api requests
- Added wait time for image gathering, as to stop api rate limiting from mangadex - Added wait time for image gathering, as to stop api rate limiting from mangadex
- "--wait" options now works properly again - "--wait" options now works properly again
## [2.0.1] - 2022-05-09 ## [2.0.1] - 2022-05-09
### Fixed ### Fixed
- Regex for removing illegal characters in the filenames now doesn't remove quotes - Regex for removing illegal characters in the filenames now doesn't remove quotes
- Updated docker baseimage and fixed the mangadlp tag in it - Updated docker baseimage and fixed the mangadlp tag in it
- Update license for 2022 - Update license for 2022
### Added ### Added
- Quick start section in README - Quick start section in README
- Preperation for pypi - Preperation for pypi
## [2.0.0] - 2022-05-09 ## [2.0.0] - 2022-05-09
### Fixed ### Fixed
- Support for new mangadex api - Support for new mangadex api
### Changed ### Changed
- Code is now formatted with [black](https://github.com/psf/black) - Code is now formatted with [black](https://github.com/psf/black)
- Now also supports just the uuid for managex (not a full link) - Now also supports just the uuid for managex (not a full link)