-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/load local content #24
Conversation
Update file exclusion pattern for egg-info folders.
Clarify error message for existing path in create_directory method of the FileRepository class.
Correct error message formatting in FileRepository.
Update Python version and pylint configuration.
Update Develop chore commits
Update from Develop
…albo/GOES-DL into feature/load-local-content
Remove redundant type annotations for improved readability. These types can be inferred by the linters and type checkers.
Change return type of `Downloader.get_files()` to None.
Update Python requirement to 3.9 and add package data for type hints.
Reviewer's Guide by SourceryThis pull request introduces a new feature to support local data sources by adding the DatasourceLocal class. It updates test functions to include local data source testing, refactors downloader methods for clarity, improves error handling in file repository utilities, and updates project configuration to support Python 3.9 and include type information. Sequence diagram for local file retrieval processsequenceDiagram
participant C as Client
participant DL as DatasourceLocal
participant FR as FileRepository
participant R as Repository
C->>DL: download_file(file_path)
DL->>FR: read_file(file_path)
FR-->>DL: file content (bytes)
DL->>R: add_item(file_path, content)
DL-->>C: DownloadStatus
Class diagram showing the new DatasourceLocal and its relationshipsclassDiagram
class DatasourceBase {
+download_file(file_path: str) DownloadStatus
+listdir(dir_path: str) list[str]
}
class DatasourceLocal {
+source: FileRepository
+download_file(file_path: str) DownloadStatus
+listdir(dir_path: str) list[str]
-_retrieve_file(file_path: str) bytes
}
class FileRepository {
+base_directory: Path
+create_directory(directory: str|Path)
+delete_directory(directory: str|Path)
+list_files(directory: str|Path) list[str]
+read_file(file_path: str|Path) bytes
}
DatasourceBase <|-- DatasourceLocal
DatasourceLocal *-- FileRepository : uses
note for DatasourceLocal "New class for handling local data sources"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Here's the code health analysis summary for commits Analysis Summary
|
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.
Hey @wvenialbo - I've reviewed your changes - here's some feedback:
Overall Comments:
- The docstring for get_files() still indicates it returns list[str] but the function now returns None. Please update the docstring to reflect this breaking change.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary by Sourcery
Add support for local data sources by introducing the DatasourceLocal class, enabling the handling of local files and directories. Update test functions to include testing for local data sources and adjust the Python version requirement to 3.9. Enhance package configuration to include new package data.
New Features:
Enhancements:
Build: