-
Notifications
You must be signed in to change notification settings - Fork 11
v1.1.0 #38
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
v1.1.0 #38
Conversation
- remove python 2.7 support - add type hints - better comments - passing tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request (v1.1.0) prepares the library for Python 3.8+ by removing Python 2.7 support, adding type hints throughout the codebase, and refactoring various components including C library loading and documentation.
- Updated type annotations and formatting for improved readability and reliability
- Refactored the ctypes library loading logic and removed legacy modules (e.g., sysutils)
- Enhanced CI integration with GitHub Actions and updated documentation/examples
Reviewed Changes
Copilot reviewed 25 out of 28 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/ (various) | Updated test definitions and formatting |
| tasks.py, geosupport/sysutils.py | Removed legacy code |
| setup.py, geosupport/*, geosupport/config.py | Added type hints, logging, and refactored library loading |
| examples/, docs/, README.md | Updated formatting and documentation for clarity and style |
| .github/workflows/ci.yml | Added CI pipeline steps using GitHub Actions |
Files not reviewed (3)
- .devcontainer/Dockerfile: Language not supported
- .devcontainer/devcontainer.json: Language not supported
- appveyor/build.ps1: Language not supported
geosupport/geosupport.py
Outdated
| GEOLIB: Any = None | ||
|
|
Copilot
AI
Mar 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of a global variable 'GEOLIB' may lead to race conditions in multi-threaded or multi-instance scenarios. It is recommended to encapsulate the loaded library within the Geosupport class instance to improve thread safety.
| GEOLIB: Any = None | |
| # GEOLIB: Any = None |
geosupport/error.py
Outdated
| def __init__(self, message: str, result: Dict[str, Any] = {}) -> None: | ||
| super(GeosupportError, self).__init__(message) | ||
| self.result = result |
Copilot
AI
Mar 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a mutable default argument (an empty dict) in the constructor may lead to unexpected behavior. It is recommended to use a default value of None and then assign an empty dict inside the method.
| def __init__(self, message: str, result: Dict[str, Any] = {}) -> None: | |
| super(GeosupportError, self).__init__(message) | |
| self.result = result | |
| def __init__(self, message: str, result: Dict[str, Any] = None) -> None: | |
| super(GeosupportError, self).__init__(message) | |
| self.result = result if result is not None else {} |
Uh oh!
There was an error while loading. Please reload this page.