Skip to content
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
wants to merge 44 commits into
base: develop
Choose a base branch
from

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Jan 9, 2025

No description provided.

…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.
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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant