Skip to content

Conversation

@cjfuller
Copy link
Collaborator

This imports the original parameters file from https://github.com/sohamazing/image-stitcher with some modifications and cleanup.

Modifications include:

  • using pydantic for JSON parsing and validation rather than doing it manually
  • converting the output format and scan pattern to enums
  • doing some type annotation syntax updates for the newer syntax
  • removed the to/from dict methods (I don't think these were used outside of the serialization code that's been replaced with pydantic)

I also added a couple very basic tests to ensure we're running the parsing code and the serialization format round-trips.

Tested by:

  • ./dev/autofix_lint.sh
  • ./dev/format.sh
  • ./dev/type_check.sh
  • uv run python -m image_stitcher.parameters_test

This imports the original parameters file from https://github.com/sohamazing/image-stitcher with some modifications and cleanup.

Modifications include:
- using pydantic for JSON parsing and validation rather than doing it
  manually
- converting the output format and scan pattern to enums
- doing some type annotation syntax updates for the newer syntax
- removed the to/from dict methods (I don't think these were used
  outside of the serialization code that's been replaced with pydantic)

I also added a couple very basic tests to ensure we're running the
parsing code and the serialization format round-trips.

Tested by:
- `./dev/autofix_lint.sh`
- `./dev/format.sh`
- `./dev/type_check.sh`
- `uv run python -m image_stitcher.parameters_test`
@cjfuller cjfuller requested a review from hongquanli January 14, 2025 00:22
@cjfuller cjfuller merged commit 06c96bb into main Jan 14, 2025
@cjfuller cjfuller deleted the colin/parameters branch January 14, 2025 00:23
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.

2 participants