Merged
Conversation
Migrates from direct GitHub API usage to a pluggable storage backend for handling core and signature files. This allows for greater flexibility in storage options and simplifies the publishing process. Removes direct dependency on GitHub API for file storage within the `init_db` management command and `Publish` API view. It introduces a `GitHubStorage` class that implements Django's storage API, enabling local caching and easier management of file uploads. The changes include updates to models, serializers, and templates to reflect the shift to file-based storage rather than URLs. Fixes fusesoc#17
Moves core file storage to a pluggable backend system, allowing for different storage mechanisms (e.g., GitHub, local file system). This change decouples the core directory from GitHub-specific storage, making the system more flexible and testable. It also removes the direct dependency on the GitHub API within the publish and get core endpoints. The changes include: - Introducing a `GitHubStorage` class that inherits from Django's `Storage` class, handling file operations on GitHub. - Modifying the `publish` and `get_core` API views to use Django's storage API instead of directly interacting with GitHub. - Adding a management command to initialize the database from the storage backend. - Replacing core_url with core_file in the CorePackage model and related tests. - Adding tests for the new storage backend. Fixes fusesoc#17
7f83c7c to
2bf2856
Compare
2bf2856 to
711894a
Compare
Contributor
|
Looks perfectly fine to me. Thanks. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Abstracts core file storage to allow pluggable backends. This change enables the use of different storage solutions for core files, such as local storage or cloud storage, by implementing a storage backend system.
Key changes include:
CoreSerializerand related views to handle file uploads using Django's storage API instead of URLs.GitHubStorageclass that implements theStorageinterface to interact with GitHub repositories.Fixes #17