-
Notifications
You must be signed in to change notification settings - Fork 3
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/expand corpus model #1226
Merged
Merged
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
add function to save all fields
load corpora with yarn start-back
add verbose option to save_corpus
add language code validator
add fieldsets to model
add test for corpus saving output
use callable for default empty list
include serialisers for languages and category fields flatten Corpus and CorpusConfiguration into a single JSON remove old serialisation code
corpora are active iff they have a configuration object
lukavdplas
added
code quality
code & performance improvements that do not affect user functionality
corpus
changes to corpus definitions or new corpora
affects-deployment
changes that require an update in the deployment module
labels
Aug 9, 2023
BeritJanssen
reviewed
Aug 9, 2023
BeritJanssen
reviewed
Aug 9, 2023
BeritJanssen
approved these changes
Aug 9, 2023
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.
Nice move towards administration of corpora in the admin interface. The only small request I have is renaming the functions starting with _try
to something that is more explicit about conditions and handling of failure of these attempts.
This was referenced Sep 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-deployment
changes that require an update in the deployment module
code quality
code & performance improvements that do not affect user functionality
corpus
changes to corpus definitions or new corpora
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.
This is a partial implementation of the steps I suggest here. The major changes are:
/api/corpus/
request.The intention here is that the expanded database model can also be filled through another method (e.g. a yaml/json file or a form). As a side benefit, it also makes it easier to do validation.
This change affects the deployment and development workflow. In deployment, the
loadcorpora
command needs to be added to the startup script. In development, the command is included inyarn start-back
. However, when you change a python corpus definition, you will need to restart the server or runloadcorpora
manually to see the changes in the interface.The PR includes a documentation file which may be a good place to start review.