-
Notifications
You must be signed in to change notification settings - Fork 3
Fix Sweeper truncating entire layer #147
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
10b66bd
wip: fixing delete
jacobdadams b0edf26
wip: more work in progress
jacobdadams d03b032
chore: copilot instructions
jacobdadams 9e69654
fix: delete dupes in chunks to limit sql length, use select for delete
jacobdadams 731d118
chore(tests): fix ruff errors
jacobdadams 7bea497
chore: suggestions from copilot review
jacobdadams 689d4e1
chore: Add an OID selection check to safeguard delete
jacobdadams f7f613e
Update tests/test_duplicates.py
jacobdadams 41715a0
Update tests/test_duplicates.py
jacobdadams aac15b5
fix(tests): resolve ruff F821 errors for DuplicateTest in test_duplic…
Copilot 5b4e75c
chore: PR suggestion
jacobdadams File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # GitHub Copilot Instructions | ||
|
|
||
| ## General Guidelines | ||
|
|
||
| - Prefer to return early from functions to reduce nesting and improve code readability. | ||
| - Always follow good security practices | ||
| - Use f-strings for string formatting | ||
| - Use logging instead of print statements | ||
| - Follow the DRY principle (Don't Repeat Yourself) | ||
| - Use pathlib for all file operations | ||
| - Follow defensive programming practices | ||
| - Validate all function inputs | ||
| - Handle exceptions gracefully | ||
| - Use retry logic for any network calls | ||
| - Add a new line before return statements in functions | ||
| - Use list/dict/set comprehensions where appropriate | ||
| - Avoid using wildcard imports (e.g., from module import *) | ||
| - Use context managers for file operations (e.g., with open(...) as f:) | ||
| - Prefer using built-in functions and libraries over custom implementations when possible | ||
| - Prefer smaller, focused functions that do one thing well rather than large, monolithic functions | ||
|
|
||
| ## Commit Message Format | ||
|
|
||
| All commits must follow the <a href="https://www.conventionalcommits.org/">Conventional Commits</a> format using the Angular preset. | ||
|
|
||
| For detailed guidelines on commit types, scopes, and formatting rules, see the <a href="https://github.com/agrc/release-composite-action/blob/main/README.md#commits">release-composite-action README</a>. | ||
|
|
||
| ## Code Style and Conventions | ||
|
|
||
| ### Python Style | ||
| - Line length: 120 characters (configured in ruff) | ||
| - Indentation: 4 spaces for Python files | ||
| - Use type hints for all new work | ||
| - Follow PEP 8 conventions | ||
| - Follow ruff style guide and linting rules | ||
| - Use pylint disable comments sparingly and only when necessary (e.g., `# pylint: disable=invalid-name`) | ||
|
|
||
| ### Documentation | ||
| - Use docstrings for all classes and public methods | ||
| - Follow NumPy/SciPy docstring format with sections: | ||
| - Brief description | ||
| - `Attributes` for class attributes | ||
| - `Parameters` for method parameters | ||
| - `Returns` for return values | ||
| - `Methods` for public methods in class docstrings | ||
|
|
||
| ## Testing Guidelines | ||
|
|
||
| - Unit tests are required, and are required to pass before PR | ||
| - Mock external services | ||
| - Test both success and failure paths | ||
| - Verify warning messages for invalid configurations | ||
| - Code coverage should be maintained at a high level (tracked via codecov) | ||
| - Test names should be descriptive and follow the pattern `test_<method_name>_<expected_behavior>` | ||
|
|
||
| ## Code Quality | ||
|
|
||
| - Run `ruff` for linting before committing | ||
| - Maintain test coverage (tracked via codecov) | ||
| - Follow existing patterns in the codebase | ||
| - Keep methods focused and single-purpose | ||
| - Use static methods when methods don't need instance state |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,24 @@ | ||
| { | ||
| // Use IntelliSense to learn about possible attributes. | ||
| // Hover to view descriptions of existing attributes. | ||
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
| { | ||
| "name": "Python Debugger: Module", | ||
| "type": "debugpy", | ||
| "request": "launch", | ||
| "module": "sweeper", | ||
| "args": [ | ||
| "sweep", | ||
| "--workspace", | ||
| "C:\\temp\\locators.gdb" | ||
| ], | ||
| "cwd": "${workspaceFolder}" | ||
| } | ||
| ] | ||
| // Use IntelliSense to learn about possible attributes. | ||
| // Hover to view descriptions of existing attributes. | ||
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
| "version": "0.2.0", | ||
| "configurations": [ | ||
|
|
||
| { | ||
| "name": "Python Debugger: Module", | ||
| "type": "debugpy", | ||
| "request": "launch", | ||
| "module": "sweeper.__main__", | ||
| "args": [ | ||
| "sweep", | ||
| "duplicates", | ||
| "--workspace=C:\\temp\\sweeper_test\\Pre1978.gdb", | ||
| "--table-name=DAQPre1978LeadInHomes", | ||
| "--try-fix", | ||
| "--verbose", | ||
| "--save-report=C:\\temp\\sweeper_test\\" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.