image-matching-models icon indicating copy to clipboard operation
image-matching-models copied to clipboard

Tests/Formatting/Linting

Open isaaccorley opened this issue 11 months ago • 3 comments

This repo needs some tests for style and that each model still works (make sure urls aren't down, models still load, etc.). I recommend ruff for formatting/linting and pytest.

Any interest in me adding these?

isaaccorley avatar Jan 05 '25 01:01 isaaccorley

I agree with all of this. We are using black for linting, and had some internal discussions about moving to ruff. @gmberton has been leading that effort and may have some thoughts.

The tests you mentioned would be very welcome. I do not have a lot of experience with pytest but would be happy to learn. We have some basic, self run tests via benchmark.py --task test to make sure the kpts produce correct homographies (w/in some margin of error).

Perhaps we could add GH Actions as well so these are run automatically?

alexstoken avatar Jan 05 '25 02:01 alexstoken

Agree on all you both said. It would be good to add test, as the current ones can surely be improved. I also don't have experience with pytest so @isaaccorley your help would be more than welcome. And we're probably switching to ruff within one or two weeks, so probably we'll ditch black. Another thing where we might need some help/guidance is proper versioning of the repo, for now we are not doing any of that

gmberton avatar Jan 05 '25 03:01 gmberton

Cool yeah I'll work on adding some github actions similar to those used in TorchGeo.

I transitioned from black/isort/flake8/pyupgrade to ruff recently and never looked back. It simplifies a lot of config setup in pyproject.toml also.

isaaccorley avatar Jan 05 '25 03:01 isaaccorley