improve: security, deps, quality, tests, docs#208
Merged
Conversation
Contributor
ozcan-durak
commented
Apr 28, 2026
- Move Sentry DSN to env vars (MAPILIO_KIT_SENTRY_DSN, opt-in)
- Add MAPILIO_KIT_DISABLE_TELEMETRY opt-out + configurable sample rates
- Update security-critical deps (certifi, idna, urllib3, charset-normalizer)
- Replace distutils.LooseVersion with packaging.version.Version
- Bump Python requirement 3.6 -> 3.8
- Resolve version.py TODO, bump 3.0.5 -> 3.0.6
- Add pyproject.toml (ruff/black/pytest/coverage) + pre-commit hooks
- Add 48 unit tests covering point/utilities/error/sentry-init
- Add tests CI workflow (Python 3.9-3.12)
- New docs: CLI.md, CONFIGURATION.md, ARCHITECTURE.md
- Rewrite CONTRIBUTING.md, add docs links + Development section to README
added 3 commits
April 28, 2026 11:10
- Move Sentry DSN to env vars (MAPILIO_KIT_SENTRY_DSN, opt-in) - Add MAPILIO_KIT_DISABLE_TELEMETRY opt-out + configurable sample rates - Update security-critical deps (certifi, idna, urllib3, charset-normalizer) - Replace distutils.LooseVersion with packaging.version.Version - Bump Python requirement 3.6 -> 3.8 - Resolve version.py TODO, bump 3.0.5 -> 3.0.6 - Add pyproject.toml (ruff/black/pytest/coverage) + pre-commit hooks - Add 48 unit tests covering point/utilities/error/sentry-init - Add tests CI workflow (Python 3.9-3.12) - New docs: CLI.md, CONFIGURATION.md, ARCHITECTURE.md - Rewrite CONTRIBUTING.md, add docs links + Development section to README
…components import - calculate_chunk_size: previously raised UnboundLocalError when video_size was below the threshold; now always returns a positive int. Extract DEFAULT_CHUNK_FRAMES and LARGE_VIDEO_CHUNK_FRAMES constants for clarity. - get_exiftool_specific_feature: 'raise f"..."' is invalid in Python 3 and would itself crash with TypeError. Replaced with a proper RuntimeError chained from the original TypeError. - mapilio_kit/components/__init__.py used to eagerly import general_arguments and edit_config. Those re-exports were unused; removing them drops importing any component submodule from ~267 ms / 444 modules to ~12 ms / 57 modules (~23x faster, ~7.8x fewer modules) and lets unit tests run without stubbing the entire pipeline. - 4 new regression tests for calculate_chunk_size; full suite now 52 passing.
doctor: health-check the local environment - Verifies Python version, ffmpeg/exiftool availability + version, free disk space, Mapilio credential state, telemetry config, and platform details. Each check is a pure function with injectable dependencies for hermetic unit tests. - Output as colored text (default), plain text (--no-color), or JSON (--json). Exit 0/1/2 distinguishes OK/WARN/FAIL; --strict makes warnings fatal. validate: pre-flight EXIF/GPS scan - Walks an image directory read-only and reports missing GPS, invalid coordinates, missing timestamps, duplicate captures, suspicious (0,0) coords, and large GPS / time gaps. Configurable thresholds via --max_gps_gap_meters / --max_time_gap_seconds. - Text or --json output, --strict for non-zero exit on warnings. Wiring & tests: - Both commands registered in FUNCTION_MAP and base/__init__.py - arguments.general_arguments now skips forcing import_path on commands that manage their own arguments - 43 new tests across tests/test_doctor.py and tests/test_validator.py - README, docs/CLI.md, docs/ARCHITECTURE.md updated Full suite: 95 passing.
sezerbozbiyik
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.