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

edge cases section in CONTRIBUTING.md #84

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
4. We determine the `ci_artifacts-ubuntu-latest-py312_sgeop-latest` data as the "truth."
5. After comparison of the current "known" data with new data from (3.), if new data is "truthier," update your PR with the new "known" data.

## Handling Edge Cases in Testing

Edge cases will crop up in full-scale FUA testing that we can ignore (following a thorough investigation – e.g. [`sgeop#77`](https://github.com/uscuni/sgeop/issues/77)) during testing. Once it is determined the geometry in question is not caused by a bug on our end, it can be added to the `KNOWN_BAD_GEOMS` collection in `tests/conftest.py`. This collection is a dictionary keyed by `<NAME>_CODE` of the city/FUA where the values are lists of index locations of simplified edges that can be ignored if they fail equality testing. As an example, see our initial "bad" geometries [here](https://github.com/uscuni/sgeop/blob/1be6b44b1a06d52453ecbaee205ae649101c4ea4/sgeop/tests/conftest.py#L25-L39), which were due to a variant number of coordinates in those resultant simplified edges created by [different versions of `shapely`](https://github.com/uscuni/sgeop/pull/67#issuecomment-2457333724).

## Code Structure

Code should be linted and formatted via `ruff`. With the [`.pre-commit` hooks](https://github.com/uscuni/sgeop/blob/main/.pre-commit-config.yaml) we have code in commits will be formatted and linted automatically once [`pre-commit` is installed](https://pre-commit.com/#installation).