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

Ca 294 refactor library management #321

Merged
merged 96 commits into from
May 16, 2024

Conversation

monsieurswag
Copy link
Contributor

No description provided.

@monsieurswag monsieurswag marked this pull request as draft April 24, 2024 14:54
@monsieurswag
Copy link
Contributor Author

There are a lot of remaining things to do.
Clean dead code, check that only users with the correct permission can create/read/delete the libraries they can access to, maybe improve the performances of some operations, add the scoring related library fields to the LibraryMixin, update the data-model.md file, and obviously check that nothing has been broken elsewhere in the app and fix some little bugs.
There is no translation for the moment in the frontend.
And there is some kind of bug when attempting to delete a custom loaded libraries.
Also when i upload a copy of an existing StoredLibrary the library is not stored (surely because the URN already exist in the database), but there is a "success" type of toast message in the frontend after the operation which is not normal.

It is discouraged to access the database during app initialization as the queries will run
during the startup of every management command, and can fail if migrations are pending.

https://docs.djangoproject.com/en/5.0/ref/applications/#django.apps.AppConfig.ready
Add unique_together constraint on urn, locale, version in LibraryMixin
Use proper type hints for Path objects
Return a StoredLibrary | None on library file storage methods
This prevents the annoying automatic scroll to the file input at the bottom of the
libraries store page
@monsieurswag monsieurswag marked this pull request as ready for review May 15, 2024 12:33
@monsieurswag monsieurswag marked this pull request as draft May 15, 2024 13:25
@monsieurswag monsieurswag marked this pull request as ready for review May 15, 2024 14:31
@monsieurswag monsieurswag force-pushed the CA-294-Refactor-library-management branch from 54a8ed5 to f3e56f5 Compare May 15, 2024 15:09
Copy link
Collaborator

@eric-intuitem eric-intuitem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost good! But the functional tests are broken.

Copy link
Collaborator

@eric-intuitem eric-intuitem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Huge step forward!

@eric-intuitem eric-intuitem merged commit 420c700 into main May 16, 2024
15 checks passed
@eric-intuitem eric-intuitem deleted the CA-294-Refactor-library-management branch May 16, 2024 18:51
@github-actions github-actions bot locked and limited conversation to collaborators May 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Be able to remove imported library (Framework, Matrix, etc.)
5 participants