Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests and package for GCP generation and project structure #2

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

nilssonjacob
Copy link

Unit tests and package for generating and handling ground control points.
Also added github action that runs tests.

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, just a couple of questions for now after a quick review.

Regarding the styling, it would we nice to use ruff, maybe with these settings?
https://github.com/pytroll/satpy/blob/main/pyproject.toml#L135C1-L138C86

And for running all this automatically, pre-commit is a good tool too.

@@ -0,0 +1 @@
'''Main package file for georeferencer.'''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double quotes please :)

import numpy as np
from scipy import ndimage

#Image downsampling
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment should be removed and included into the docstring instead.

Comment on lines +201 to +202
# Only one maximum per group should be selected
assert result == [(1, 1), (1, 3), (3, 1), (3, 3)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand here: shouldn't be only one result?

assert result == [(2, 2)]

def test_thin_gcp_candidates_multiple_maxima():
# Case where multiple maxima exist in a group
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a docstring.

@@ -0,0 +1,243 @@
#import georeferencer.gcp_generation as gcp_gen
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#import georeferencer.gcp_generation as gcp_gen

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