Skip to content

Code Coverage & Bug Fixes#17

Merged
ModernMAK merged 21 commits intomainfrom
coverage
Mar 23, 2025
Merged

Code Coverage & Bug Fixes#17
ModernMAK merged 21 commits intomainfrom
coverage

Conversation

@ModernMAK
Copy link
Member

@ModernMAK ModernMAK commented Mar 23, 2025

  • Dev: Removed MyPy pre-commit
  • Dev: Added coverage to pyproject.toml
  • Feature: LogSetupOptions to configure how to setup CLI logging when using run_with
  • Feature: argparse path validators now exposed for child CLI plugins
  • Fix: CLI logging will now attempt to remove added handlers; preventing extra handlers from staying alive in library CLI calls
  • Fix: Handle division by zero when ZLibFileReader's padding is zero-length
  • Dev: Code coverage via pytests; many cases simply check that the code runs without erring, failure cases should be added as needed

Noticed pytest will create multiple loggers for command line run

This might be a bug with reopening loggers?

Further testing might be needed

In any case, to override logging behaviour when using in-library scripts, we can now pass a logger instance which will be used over the logging options in the command
disable mypy pre-commit

PRs should check mypy, commits should just 'work' to avoid hassle when saving work and moving between workstations
LogSetupOptions.use_root toggles between the root logger and the relic.cli logger

LogSetupOptions.add_handlers will not add a handlers to the cli logger

Neither of these flags are used IFF the logger is manually passed in
Rush job, should have split into separate PR
@ModernMAK ModernMAK marked this pull request as ready for review March 23, 2025 09:26
@ModernMAK ModernMAK merged commit e870908 into main Mar 23, 2025
31 checks passed
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.

1 participant

Comments