Closed SnehaHS65 closed 3 weeks ago
The changes involve renaming the LetterSoundCorrespondence
entity to LetterSound
across various files in the project. This includes updating method signatures, import statements, class properties, and database migration scripts. The purpose is to have a clearer and more concise naming structure within the data model and related functionalities, reflected consistently throughout the application.
Files/Modules | Change Summary |
---|---|
.../LetterSoundContributionEventDao.java |
Updated method signatures and imports from LetterSoundCorrespondence to LetterSound . |
.../LetterSoundContributionEventDaoJpa.java |
Altered parameter type in readAll method from LetterSoundCorrespondence to LetterSound . |
.../LetterSoundDaoJpa.java |
Updated class and method signatures to work with LetterSound instead of LetterSoundCorrespondence . |
.../LetterSoundPeerReviewEventDaoJpa.java |
Changed method signatures to use LetterSound instead of LetterSoundCorrespondence . |
.../StringToLetterSoundCorrespondenceConverter.java |
Updated class to work with LetterSound instead of LetterSoundCorrespondence . |
.../Word.java |
Changed class property and related methods to use LetterSound instead of LetterSoundCorrespondence . |
.../LetterSoundCorrespondenceContributionEvent.java |
Modified import and property type from LetterSoundCorrespondence to LetterSound . |
.../JpaToGsonConverter.java |
Renamed LetterSoundCorrespondence to LetterSound in imports and method signatures. |
.../LetterSoundCorrespondenceUsageCountScheduler.java |
Replaced references to LetterSoundCorrespondence with LetterSound in method loops. |
.../SoundUsageCountScheduler.java |
Updated import and loop iteration to use LetterSound instead of LetterSoundCorrespondence . |
.../CsvContentExtractionHelper.java |
Modified returning types and method signatures from LetterSoundCorrespondence to LetterSound . |
.../DbContentImportHelper.java |
Replaced LetterSoundCorrespondence with LetterSound in method signatures and imports. |
.../LetterSoundCreateController.java , .../LetterSoundEditController.java , |
Updated import and parameter references from LetterSoundCorrespondence to LetterSound . |
.../LetterSoundPeerReviewEventCreateController.java |
Changed import and variable types from LetterSoundCorrespondence to LetterSound . |
.../WordCreateController.java , .../WordEditController.java |
Updated import statements and variable types to use LetterSound instead of LetterSoundCorrespondence . |
.../WordCsvExportController.java |
Modified import and loop variable types from LetterSoundCorrespondence to LetterSound . |
.../jpa-schema-export.sql |
Renamed tables related to LetterSoundCorrespondence to LetterSound , updated foreign key constraints. |
.../2002133.sql |
Introduced a migration script to rename LetterSoundCorrespondence table to LetterSound . |
LetterSoundCorrespondence
to LetterSound
throughout the codebase.Common learnings
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```src/main/java/ai/elimu/model/contributor/LetterSoundCorrespondenceContributionEvent.java (1)
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```src/main/java/ai/elimu/logic/converters/StringToLetterSoundCorrespondenceConverter.java (1)
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java (1)
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```src/main/java/ai/elimu/dao/LetterSoundPeerReviewEventDao.java (1)
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```src/main/java/ai/elimu/dao/jpa/LetterSoundDaoJpa.java (1)
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```src/main/java/ai/elimu/model/content/Word.java (1)
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```src/main/java/ai/elimu/tasks/SoundUsageCountScheduler.java (1)
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```src/main/java/ai/elimu/dao/jpa/LetterSoundContributionEventDaoJpa.java (1)
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```src/main/java/ai/elimu/tasks/LetterSoundCorrespondenceUsageCountScheduler.java (1)
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```src/main/java/ai/elimu/dao/jpa/LetterSoundPeerReviewEventDaoJpa.java (1)
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```src/main/java/ai/elimu/web/content/word/WordCsvExportController.java (1)
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```src/main/java/ai/elimu/web/content/peer_review/LetterSoundPeerReviewEventCreateController.java (1)
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```src/main/java/ai/elimu/web/content/letter_sound/LetterSoundCreateController.java (1)
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```src/main/java/ai/elimu/web/content/letter_sound/LetterSoundEditController.java (1)
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```src/main/java/ai/elimu/web/content/word/WordEditController.java (1)
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```src/main/java/ai/elimu/rest/v2/JpaToGsonConverter.java (1)
``` Learnt from: venkatesh2k3 PR: elimu-ai/webapp#1682 File: src/main/java/ai/elimu/dao/LetterSoundContributionEventDao.java:13-13 Timestamp: 2024-07-06T17:37:44.413Z Learning: In the `LetterSoundContributionEventDao.java` file, the method signatures should use `LetterSoundContributionEvent` instead of `LetterSoundCorrespondenceContributionEvent` to maintain consistency with the renaming of entities. ```
src/main/java/ai/elimu/dao/jpa/LetterSoundDaoJpa.java (4)
`3-3`: **Import statement approved.** The import statement for `LetterSound` is correctly added. --- `12-12`: **Class declaration approved.** The class now correctly extends `GenericDaoJpa`. --- `32-37`: **Method `readAllOrderedByUsage` approved.** The method correctly uses `LetterSound` and the query is consistent with the new entity name. --- `41-46`: **Method `readAllOrderedByLettersLength` approved.** The method correctly uses `LetterSound` and the query is consistent with the new entity name. src/main/java/ai/elimu/tasks/SoundUsageCountScheduler.java (1)
`9-9`: **Import statement approved.** The import statement for `LetterSound` is correctly added.src/main/java/ai/elimu/dao/jpa/LetterSoundContributionEventDaoJpa.java (1)
`3-3`: **Import statement approved.** The import statement for `LetterSound` is correctly added.src/main/java/ai/elimu/tasks/LetterSoundCorrespondenceUsageCountScheduler.java (1)
`6-7`: **LGTM! Import statement is correct.** The import statement for `LetterSound` is necessary and correctly added.src/main/java/ai/elimu/web/content/peer_review/LetterSoundPeerReviewEventCreateController.java (1)
`7-7`: **Import statement approved.** The import statement for `LetterSound` is correct.src/main/java/ai/elimu/web/content/letter_sound/LetterSoundCreateController.java (3)
`11-11`: **Import statement approved.** The import statement for `LetterSound` is correct. --- `54-54`: **Variable declaration approved.** The variable `letterSound` has been correctly updated to reflect the new entity name. --- `72-72`: **Method parameter approved.** The method parameter `letterSound` has been correctly updated to reflect the new entity name.src/main/java/ai/elimu/web/content/letter_sound/LetterSoundEditController.java (2)
`6-6`: **Import statement approved.** The import statement for `LetterSound` is correct. --- `88-88`: **Method parameter approved.** The method parameter `letterSound` has been correctly updated to reflect the new entity name.src/main/java/ai/elimu/web/content/word/WordCreateController.java (3)
`17-17`: **Import statement approved.** The import statement for `LetterSound` is correct. --- `246-246`: **Variable declaration approved.** The variable `letterSoundCorrespondences` has been correctly updated to reflect the new entity name. --- `253-253`: **Loop variable approved.** The loop variable `letterSoundCorrespondence` has been correctly updated to reflect the new entity name.src/main/java/ai/elimu/web/content/word/WordEditController.java (2)
`7-7`: **Import statement updated correctly.** The import statement has been updated to reflect the renaming of `LetterSoundCorrespondence` to `LetterSound`. --- `18-18`: **Import statement updated correctly.** The import statement has been updated to reflect the renaming of `LetterSoundCorrespondence` to `LetterSound`.src/main/java/ai/elimu/rest/v2/JpaToGsonConverter.java (2)
`8-8`: **Import statement updated correctly.** The import statement has been updated to reflect the renaming of `LetterSoundCorrespondence` to `LetterSound`. --- `85-85`: **Method signature updated correctly.** The method signature has been updated to reflect the renaming of `LetterSoundCorrespondence` to `LetterSound`.src/main/java/ai/elimu/util/csv/CsvContentExtractionHelper.java (2)
`7-7`: **Import statement updated correctly.** The import statement has been updated to reflect the renaming of `LetterSoundCorrespondence` to `LetterSound`. --- `8-8`: **Import statement updated correctly.** The import statement has been updated to reflect the renaming of `LetterSoundCorrespondence` to `LetterSound`.src/main/resources/META-INF/jpa-schema-export.sql (17)
`58-58`: **Table name updated correctly.** The table name has been updated to reflect the renaming of `LetterSoundCorrespondence` to `LetterSound`. --- `60-60`: **Table name updated correctly.** The table name has been updated to reflect the renaming of `LetterSoundCorrespondence_Letter` to `LetterSound_Letter`. --- `62-62`: **Table name updated correctly.** The table name has been updated to reflect the renaming of `LetterSoundCorrespondence_Sound` to `LetterSound_Sound`. --- `64-64`: **Table name updated correctly.** The table name has been updated to reflect the renaming of `LetterSoundCorrespondenceContributionEvent` to `LetterSoundContributionEvent`. --- `70-70`: **Table name updated correctly.** The table name has been updated to reflect the renaming of `LetterSoundCorrespondencePeerReviewEvent` to `LetterSoundPeerReviewEvent`. --- `116-116`: **Table name updated correctly.** The table name has been updated to reflect the renaming of `Word_LetterSoundCorrespondence` to `Word_LetterSound`. --- `386-386`: **Table creation statement updated correctly.** The table creation statement has been updated to reflect the renaming of `LetterSoundCorrespondence` to `LetterSound`. --- `396-400`: **Table creation statement updated correctly.** The table creation statement has been updated to reflect the renaming of `LetterSoundCorrespondence_Letter` to `LetterSound_Letter`. --- `403-408`: **Table creation statement updated correctly.** The table creation statement has been updated to reflect the renaming of `LetterSoundCorrespondence_Sound` to `LetterSound_Sound`. --- `410-419`: **Table creation statement updated correctly.** The table creation statement has been updated to reflect the renaming of `LetterSoundCorrespondenceContributionEvent` to `LetterSoundContributionEvent`. --- `445-454`: **Table creation statement updated correctly.** The table creation statement has been updated to reflect the renaming of `LetterSoundCorrespondencePeerReviewEvent` to `LetterSoundPeerReviewEvent`. --- `920-928`: **Foreign key constraint updated correctly.** The foreign key constraint has been updated to reflect the renaming of `LetterSoundCorrespondence_Letter` to `LetterSound_Letter`. --- `930-938`: **Foreign key constraint updated correctly.** The foreign key constraint has been updated to reflect the renaming of `LetterSoundCorrespondence_Sound` to `LetterSound_Sound`. --- `940-948`: **Foreign key constraint updated correctly.** The foreign key constraint has been updated to reflect the renaming of `LetterSoundCorrespondenceContributionEvent` to `LetterSoundContributionEvent`. --- `970-978`: **Foreign key constraint updated correctly.** The foreign key constraint has been updated to reflect the renaming of `LetterSoundCorrespondencePeerReviewEvent` to `LetterSoundPeerReviewEvent`. --- `1140-1143`: **Foreign key constraint updated correctly.** The foreign key constraint has been updated to reflect the renaming of `Word_LetterSoundCorrespondence` to `Word_LetterSound`. --- `1145-1146`: **Foreign key constraint updated correctly.** The foreign key constraint has been updated to reflect the renaming of `Word_LetterSoundCorrespondence` to `Word_LetterSound`.
Attention: Patch coverage is 9.37500%
with 29 lines
in your changes missing coverage. Please review.
Project coverage is 15.03%. Comparing base (
b5eb83a
) to head (6e9c8b4
). Report is 8 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@venkatesh2k3 , I have changed in all the java files as you mentioned, should I change in webapp folder(in jsp files) as well? Let me know and I can commit
@jo-elimu , Can you review the latest commit now, I refactored LetterSoundCorrespondence.java
to LetterSound.java
, ran this command mvn jetty:run
, included jpa-schema-export.sql
in the PR and also added DB script for the same.
Hi @jo-elimu , @nya-elimu , @venkatesh2k3 , can you please look at the latest changes that I did to rename LetterSoundCorrespondence to LetterSound. This is the first PR to just rename the LetterSoundCorrespondence database table as suggested by @jo-elimu. If you approve this, I can raise one more PR for renaming the LetterSoundCorrespondence_id references.
Hi @jo-elimu , @nya-elimu , @venkatesh2k3 , can you please look at the latest changes that I did to rename LetterSoundCorrespondence to LetterSound. This is the first PR to just rename the LetterSoundCorrespondence database table as suggested by @jo-elimu. If you approve this, I can raise one more PR for renaming the LetterSoundCorrespondence_id references.
@SnehaHS65 If you look at your changes in jpa-schema-export.sql
, you'll see that it contains around 16 changes, and these 16 changes would also have to be included in the DB migration script.
This is why I suggested above that we split #1677 into smaller pull requests to make each database migration less complicated.
I've created an example here: https://github.com/elimu-ai/webapp/pull/1713. This pull request only makes one small change (renaming from Word#letterSoundCorrespondences
to Word#letterSounds
). After merging that PR, we can perform a release and verify that the migration script runs without errors. If so, we can move on to another small part of the issue.
Hi @jo-elimu , @nya-elimu , @venkatesh2k3 , can you please look at the latest changes that I did to rename LetterSoundCorrespondence to LetterSound. This is the first PR to just rename the LetterSoundCorrespondence database table as suggested by @jo-elimu. If you approve this, I can raise one more PR for renaming the LetterSoundCorrespondence_id references.
@SnehaHS65 If you look at your changes in
jpa-schema-export.sql
, you'll see that it contains around 16 changes, and these 16 changes would also have to be included in the DB migration script.This is why I suggested above that we split #1677 into smaller pull requests to make each database migration less complicated.
I've created an example here: #1713. This pull request only makes one small change (renaming from
Word#letterSoundCorrespondences
toWord#letterSounds
). After merging that PR, we can perform a release and verify that the migration script runs without errors. If so, we can move on to another small part of the issue.
@jo-elimu ,So there are ContributionEvent and PeerReviewEvent which uses this letterSoundCorrespondence, I will now only edit for ContributionEvent first and commit?
@jo-elimu ,So there are ContributionEvent and PeerReviewEvent which uses this letterSoundCorrespondence, I will now only edit for ContributionEvent first and commit?
@SnehaHS65 Yes, that's right 🙂
I suggest you close this pull request, and open a new pull request only for renaming the LetterSoundCorrespondenceContributionEvent
class. And remember to include the DB migration script as well (see similar example in 2004010.sql
).
So in total we'll end up with 6 smaller PRs for closing #1677.
This pull request addresses issue #1677 by renaming the class LetterSoundCorrespondence to LetterSound and updating all references throughout the codebase.