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

Add Hypothesis tests #179

Closed
cleder opened this issue Oct 28, 2023 · 10 comments · Fixed by #215
Closed

Add Hypothesis tests #179

cleder opened this issue Oct 28, 2023 · 10 comments · Fixed by #215

Comments

@cleder
Copy link
Owner

cleder commented Oct 28, 2023

Test pygeoif against these strategies, repr and geometry.wkt are Encode/Decode invariant

The strategies should be similar to hypothesis-geojson, but one should be able to create coordinates for any given CRS (SRS) with EPSG 4326 as a predefined shortcut

@bpshaver
Copy link
Contributor

bpshaver commented Nov 5, 2023

I'm interested in this issue. Is there a contribution guide? Should I work from the develop branch?

@cleder
Copy link
Owner Author

cleder commented Nov 5, 2023

No guideline, sorry. Fork, and make your PR against develop

@cleder
Copy link
Owner Author

cleder commented Nov 5, 2023

Commit often, commit early, make a draft PR while you are still working on it, so I can give you some pointers ;-)

@cleder
Copy link
Owner Author

cleder commented Nov 5, 2023

After you cloned your fork, cd into the directory and

python3 -m venv .venv
source .venv/bin/activate
pip install -e  '.[dev]'
pre-commit install

@bpshaver
Copy link
Contributor

bpshaver commented Nov 5, 2023

Sounds good. I'm more of a pyenv guy myself.

@cleder
Copy link
Owner Author

cleder commented Nov 5, 2023

I am more of a minimalist 😄

@bpshaver
Copy link
Contributor

bpshaver commented Nov 5, 2023

Draft PR here:

#186

Just adding the Hypothesis dependency and making a small start checking for encode/decode invariance with Point.

I'm not super familiar with different spatial reference systems. Do you have in mind that these strategies would generate different values depending on the SRS provided?

Happy to take the conversation there.

@cleder
Copy link
Owner Author

cleder commented Nov 25, 2023

Another approach may be using hypothesis-jsonschema and the geo-json schema of The GeoJSON Format

@cleder
Copy link
Owner Author

cleder commented Nov 30, 2023

Are you still working on this, or did you loose interest?

@bpshaver
Copy link
Contributor

Didn't lose interest, just lost time. I will budget time for this tomorrow.

@cleder cleder linked a pull request Mar 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants