-
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
Pulling feat/feature-annotation into develop #390
Open
github-actions
wants to merge
44
commits into
develop
Choose a base branch
from
feat/feature-annotation
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
…lity and access to new features The changes include updating the versions of several dependencies, including `go-genproto` and `grpc`, to their latest releases. Additionally, the Go version is updated to 1.22.5, which provides improvements and new features.
The UniqueModel function is now more flexible and reusable as it can handle any type of comparable data, not just AnnoDoc, and uses a more idiomatic way of keeping track of seen items.
Updating go-genproto to the latest version ensures the application has the latest features and bug fixes, improving overall stability and security.
…ity by adding line breaks
Implementing a new data model for organisms to store and manage relevant information, including creation and update timestamps, creator and updater details, and taxonomic classification.
Define an interface for accessing organism data to improve data encapsulation and allow for easier switching between different data sources.
The new type is introduced to define the ArangoDB collection for storing organisms, making the code more organized and easier to maintain.
Implementing the organism repository allows for interaction with the organism collection in the ArangoDB database, enabling data storage and retrieval for organisms.
The constants are grouped together in a single const block to improve code organization and readability.
Allow users to configure the collection name for storing organisms in arangodb.
Implementing the organism repository interface allows for a standardized way of interacting with the organism data, making the code more maintainable and scalable. The added methods provide basic CRUD operations and listing functionality, although they are currently not implemented, they serve as a foundation for future development.
The OrganismDoc struct now has a corresponding JSON schema definition, which provides a clear specification of its structure and validation rules, ensuring data consistency and integrity.
Improve data consistency by enforcing a strict schema validation on the organism collection, preventing invalid data from being stored.
The application now has a specific error type for handling cases when an organism is not found, allowing for more precise error handling and better error messages.
…m by id The GetOrganism function is now implemented to fetch an organism document from the database by its id, handling both successful retrieval and potential errors, including the case when the organism is not found.
Adding a new query to fetch an organization by its genus and species, allowing for more specific data retrieval.
The GetOrganismByName method is now implemented to retrieve an organism by its genus and species, allowing for more specific queries and improving the overall functionality of the organism repository.
The bind variables are now defined inline, reducing unnecessary variable declarations, and the doc variable is declared closer to its usage, improving code readability.
…yName functions The functions GetOrganism and GetOrganismByName now have comments describing their purpose, parameters, return values, and possible errors, making the code more understandable and easier to use.
The google.golang.org/protobuf version is updated to v1.36.2 to ensure compatibility and security.
…definitions The AddOrganism and EditOrganism functions are updated to use the NewOrganism and OrganismUpdate definitions from the dictybaseapis/organism proto package, improving consistency and enabling better validation and serialization of organism data.
…nism documents The AddOrganism function is now implemented to create new organism documents in the database, allowing for the storage of organism data.
Prevent adding duplicate organisms by checking for existing organisms before creation.
…ism by id The RemoveOrganism function now checks if the organism exists before attempting to delete it, returning a custom error if not found, and handles any errors that occur during the deletion process.
… documents The EditOrganism function is now implemented to update organism documents in the ArangoDB repository, allowing for changes to attributes such as abbreviation, common name, species, and genus, and also updates the updated_at and updated_by fields.
Implementing a query to retrieve the list of organizations from the specified collection.
…sms from database The ListOrganisms method is now implemented, allowing retrieval of organisms from the database, and the method signature is updated to remove unused parameters, improving code simplicity and readability.
…isms collection The ClearOrganisms method is now implemented to clear the organisms collection by truncating it, which allows for efficient removal of all organisms data.
add(organism_test.go): create test file for organism repository The required fields in the organism schema are updated to only include "genus" and "species", making "created_by" optional. A new test file is added for the organism repository to ensure its methods are properly tested.
Implementing unit tests for the AddOrganism method to ensure correct functionality and error handling, covering various test cases such as successful addition and minimal required attributes.
The test checks that adding the same organism twice returns an error with the expected message, ensuring the repository correctly handles duplicate organisms.
Adding test coverage for getting an organism by key to ensure data consistency and error handling.
The test covers two scenarios: successfully retrieving an organism by name and handling the case when the organism is not found, ensuring the repository behaves as expected in both situations.
The test setup is simplified by removing redundant functions and adding a new test for editing organisms. This change improves the organization and readability of the test code, making it easier to maintain and extend.
…reaks The code is refactored to improve readability by adding line breaks, making the code more consistent and easier to understand. This change does not affect the functionality of the code.
The test helpers are being moved to a separate file to improve organization and readability of the test code. This change makes it easier to maintain and update the tests in the future.
…oval The test covers two scenarios: successful removal of an existing organism and attempted removal of a non-existent organism, ensuring the correct error handling in both cases.
The application now has a specific error type for list not found errors, allowing for more precise error handling and better error messages.
…tNotFoundError The error type is updated to better reflect its purpose, providing a more accurate and consistent error handling experience.
New test organisms are being added to improve test coverage and data variety, allowing for more comprehensive testing of organism-related functionality.
Adding a test to verify the functionality of listing organisms from the repository, ensuring correct results and error handling.
…ms function Adding a new test case ensures the ClearOrganisms function works correctly by verifying that organisms are properly added, cleared, and that the expected errors are returned when trying to retrieve cleared organisms.
Implementing a data model for feature annotations to store and manage relevant data in a structured way.
Implementing the FeatureAnnotationRepository interface allows for accessing and managing feature annotation data from its data sources, enabling CRUD operations and database handler retrieval.
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.
No description provided.