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

Added data extracts to avoid creating tasks with no features #41

Merged
merged 6 commits into from
Jul 12, 2024

Conversation

Sujanadh
Copy link
Contributor

Issue:

Updates:

This PR now avoids creating tasks with no features in them when the AOI is splitted using the split_by_square algorithm.

  • Data extracts are now passed to the logic in order to check if a task has any features in it or not. In case a task does not have osm features inside it , it won't be appended to the list of tasks generated by the algorithm.

@Sujanadh Sujanadh requested a review from spwoodcock July 11, 2024 04:05
@Sujanadh Sujanadh self-assigned this Jul 11, 2024
@spwoodcock
Copy link
Member

The split by square tests are failing as I assume they need the data extract passed to them.

Once fixed, I will merge and create a new release, then update fmtm-splitter on hotosm/fmtm#1642 👍

@spwoodcock
Copy link
Member

Nice work by the way 😄

@Sujanadh
Copy link
Contributor Author

These pre-commit hooks aren't being installed on my system, failing every time.

@spwoodcock
Copy link
Member

No worries about the failing pre-commit tests here! They are failures linting the additional SQL files in the repo - I should set an exclusion 👍

To install the pre-commit hooks so they always run on the repo locally:

pip install pre-commit
pre-commit install

The hooks will run every time you try to commit and not allow you to commit if there are failures.
If you need to commit anyway despite errors, use the --no-verify flag:

git commit -m "fix: some fix" --no-verify

@spwoodcock spwoodcock merged commit b7cc8cd into main Jul 12, 2024
4 of 5 checks passed
@spwoodcock spwoodcock deleted the fix/split-by-square branch July 12, 2024 08:52
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.

Creating task areas with no features should not be possible
2 participants