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

2024-04-11-Release #192

Merged
merged 6 commits into from
Apr 10, 2024
Merged

2024-04-11-Release #192

merged 6 commits into from
Apr 10, 2024

Conversation

TDeSain
Copy link
Contributor

@TDeSain TDeSain commented Apr 10, 2024

No description provided.

Luke Sikina and others added 6 commits February 9, 2024 12:37
- If a uuid does not match a query, instead search for common area UUID
- If we have a collision, I'm buying a lottery ticket
* Update key length handling in limitKeySize

The limitKeySize method in the VisualizationUtil class has been updated to ensure key uniqueness when keys exceed a certain length. A more robust method of shortening the keys has been implemented: if the key is longer than 45 characters, it is cut off and replaced with "..." and additional characters are appended to ensure uniqueness if needed. This helps limit key size while preserving uniqueness.

* Add VisualizationUtilTests and refine key shortening logic

Added a new test class, VisualizationUtilTests to validate the functionality of the VisualizationUtil class. Adjusted the 'limitKeySize' method to ensure key uniqueness when keys are shortened to a maximum length of 45 characters. If shortened keys are not unique, additional trailing characters are included until uniqueness is achieved.

* Add check on length before substring

* Update pic-sure-util/src/main/java/edu/harvard/dbmi/avillach/util/VisualizationUtil.java

* Update pic-sure-util/src/main/java/edu/harvard/dbmi/avillach/util/VisualizationUtil.java

* Update pic-sure-util/src/main/java/edu/harvard/dbmi/avillach/util/VisualizationUtil.java

* Update pic-sure-resources/pic-sure-visualization-resource/src/test/java/edu/harvard/hms/dbmi/avillach/resource/visualization/service/VisualizationUtilTests.java

Co-authored-by: Luke Sikina <lucas.sikina@gmail.com>

* Fix import for modified unit test

* Refactor and add test cases for key size limiting function

Refactors existing code by simplifying key size limiting logic in VisualizationUtil and added several new unit tests to ensure its correct behavior with different input scenarios including long keys, empty maps, null maps, and uniqueness near middle.

* Update null handling in VisualizationUtil's limitKeySize

Changed the handling of null input in VisualizationUtil's limitKeySize from returning a new HashMap to throwing an IllegalArgumentException. Also, updated the corresponding test to check for this exception instead of comparing with an empty map.

---------

Co-authored-by: Luke Sikina <lucas.sikina@gmail.com>
Adjusted the condition under which an empty HashMap is returned in the DataProcessingService. Now, an empty HashMap will only be returned when both the maximum and minimum values in the data are 0, and the number of bins is also 0. This change takes into account situations where the data contains values but the min and max are both 0.
* [ALS-5422] Add persistence.xml to visualization resource (#161) (#162)
The visualization resource is failing to start due to an error injecting persistence unit into CDI managed bean. It is unable to find a persistence unit named ''.

* ALS-5387: Remove stack from resources table
* ALS-5387: More robust implementation of feature

---------

Co-authored-by: Gcolon021 <34667267+Gcolon021@users.noreply.github.com>
Co-authored-by: GeorgeC <gcolon021@gmail.com>
The database contains both open and auth hpds even if it wasn't deployed. This means we attempt to check for a resource that doesn't exist. This results in our service always showing degraded.
Merging master into release branch.
@TDeSain TDeSain merged commit a5ae92b into master Apr 10, 2024
4 checks passed
TDeSain added a commit that referenced this pull request May 6, 2024
* 2024-04-11-Release (#192)

* [ALS-5827] Enable search by CA id

- If a uuid does not match a query, instead search for common area UUID
- If we have a collision, I'm buying a lottery ticket

* [ALS-5787] Open Access StatViz is not showing "Other" (#180)

* Update key length handling in limitKeySize

The limitKeySize method in the VisualizationUtil class has been updated to ensure key uniqueness when keys exceed a certain length. A more robust method of shortening the keys has been implemented: if the key is longer than 45 characters, it is cut off and replaced with "..." and additional characters are appended to ensure uniqueness if needed. This helps limit key size while preserving uniqueness.

* Add VisualizationUtilTests and refine key shortening logic

Added a new test class, VisualizationUtilTests to validate the functionality of the VisualizationUtil class. Adjusted the 'limitKeySize' method to ensure key uniqueness when keys are shortened to a maximum length of 45 characters. If shortened keys are not unique, additional trailing characters are included until uniqueness is achieved.

* Add check on length before substring

* Update pic-sure-util/src/main/java/edu/harvard/dbmi/avillach/util/VisualizationUtil.java

* Update pic-sure-util/src/main/java/edu/harvard/dbmi/avillach/util/VisualizationUtil.java

* Update pic-sure-util/src/main/java/edu/harvard/dbmi/avillach/util/VisualizationUtil.java

* Update pic-sure-resources/pic-sure-visualization-resource/src/test/java/edu/harvard/hms/dbmi/avillach/resource/visualization/service/VisualizationUtilTests.java

Co-authored-by: Luke Sikina <lucas.sikina@gmail.com>

* Fix import for modified unit test

* Refactor and add test cases for key size limiting function

Refactors existing code by simplifying key size limiting logic in VisualizationUtil and added several new unit tests to ensure its correct behavior with different input scenarios including long keys, empty maps, null maps, and uniqueness near middle.

* Update null handling in VisualizationUtil's limitKeySize

Changed the handling of null input in VisualizationUtil's limitKeySize from returning a new HashMap to throwing an IllegalArgumentException. Also, updated the corresponding test to check for this exception instead of comparing with an empty map.

---------

Co-authored-by: Luke Sikina <lucas.sikina@gmail.com>

* Refine the condition for empty return in DataProcessingService (#184)

Adjusted the condition under which an empty HashMap is returned in the DataProcessingService. Now, an empty HashMap will only be returned when both the maximum and minimum values in the data are 0, and the number of bins is also 0. This change takes into account situations where the data contains values but the min and max are both 0.

* ALS-5387: Remove stack from resources table (#186)

* [ALS-5422] Add persistence.xml to visualization resource (#161) (#162)
The visualization resource is failing to start due to an error injecting persistence unit into CDI managed bean. It is unable to find a persistence unit named ''.

* ALS-5387: Remove stack from resources table
* ALS-5387: More robust implementation of feature

---------

Co-authored-by: Gcolon021 <34667267+Gcolon021@users.noreply.github.com>
Co-authored-by: GeorgeC <gcolon021@gmail.com>

* [ALS-6222] Status endpoints now filters resources (#189)

The database contains both open and auth hpds even if it wasn't deployed. This means we attempt to check for a resource that doesn't exist. This results in our service always showing degraded.

---------

Co-authored-by: Luke Sikina <lucas.skina@gmail.com>
Co-authored-by: Gcolon021 <34667267+Gcolon021@users.noreply.github.com>
Co-authored-by: Luke Sikina <lucas.sikina@gmail.com>
Co-authored-by: ramari16 <ramari16@gmail.com>
Co-authored-by: GeorgeC <gcolon021@gmail.com>

* ALS-6375: Suppress showing user 0 results in open-pic-sure (#193)

---------

Co-authored-by: Luke Sikina <lucas.skina@gmail.com>
Co-authored-by: Gcolon021 <34667267+Gcolon021@users.noreply.github.com>
Co-authored-by: Luke Sikina <lucas.sikina@gmail.com>
Co-authored-by: ramari16 <ramari16@gmail.com>
Co-authored-by: GeorgeC <gcolon021@gmail.com>
TDeSain added a commit that referenced this pull request May 9, 2024
* [ALS-5827] Enable search by CA id

- If a uuid does not match a query, instead search for common area UUID
- If we have a collision, I'm buying a lottery ticket

* [ALS-5787] Open Access StatViz is not showing "Other" (#180)

* Update key length handling in limitKeySize

The limitKeySize method in the VisualizationUtil class has been updated to ensure key uniqueness when keys exceed a certain length. A more robust method of shortening the keys has been implemented: if the key is longer than 45 characters, it is cut off and replaced with "..." and additional characters are appended to ensure uniqueness if needed. This helps limit key size while preserving uniqueness.

* Add VisualizationUtilTests and refine key shortening logic

Added a new test class, VisualizationUtilTests to validate the functionality of the VisualizationUtil class. Adjusted the 'limitKeySize' method to ensure key uniqueness when keys are shortened to a maximum length of 45 characters. If shortened keys are not unique, additional trailing characters are included until uniqueness is achieved.

* Add check on length before substring

* Update pic-sure-util/src/main/java/edu/harvard/dbmi/avillach/util/VisualizationUtil.java

* Update pic-sure-util/src/main/java/edu/harvard/dbmi/avillach/util/VisualizationUtil.java

* Update pic-sure-util/src/main/java/edu/harvard/dbmi/avillach/util/VisualizationUtil.java

* Update pic-sure-resources/pic-sure-visualization-resource/src/test/java/edu/harvard/hms/dbmi/avillach/resource/visualization/service/VisualizationUtilTests.java

Co-authored-by: Luke Sikina <lucas.sikina@gmail.com>

* Fix import for modified unit test

* Refactor and add test cases for key size limiting function

Refactors existing code by simplifying key size limiting logic in VisualizationUtil and added several new unit tests to ensure its correct behavior with different input scenarios including long keys, empty maps, null maps, and uniqueness near middle.

* Update null handling in VisualizationUtil's limitKeySize

Changed the handling of null input in VisualizationUtil's limitKeySize from returning a new HashMap to throwing an IllegalArgumentException. Also, updated the corresponding test to check for this exception instead of comparing with an empty map.

---------

Co-authored-by: Luke Sikina <lucas.sikina@gmail.com>

* Refine the condition for empty return in DataProcessingService (#184)

Adjusted the condition under which an empty HashMap is returned in the DataProcessingService. Now, an empty HashMap will only be returned when both the maximum and minimum values in the data are 0, and the number of bins is also 0. This change takes into account situations where the data contains values but the min and max are both 0.

* ALS-5387: Remove stack from resources table (#186)

* [ALS-5422] Add persistence.xml to visualization resource (#161) (#162)
The visualization resource is failing to start due to an error injecting persistence unit into CDI managed bean. It is unable to find a persistence unit named ''.

* ALS-5387: Remove stack from resources table
* ALS-5387: More robust implementation of feature

---------

Co-authored-by: Gcolon021 <34667267+Gcolon021@users.noreply.github.com>
Co-authored-by: GeorgeC <gcolon021@gmail.com>

* [ALS-6222] Status endpoints now filters resources (#189)

The database contains both open and auth hpds even if it wasn't deployed. This means we attempt to check for a resource that doesn't exist. This results in our service always showing degraded.

* Sync changes between master and release branch (#194)

* 2024-04-11-Release (#192)

* [ALS-5827] Enable search by CA id

- If a uuid does not match a query, instead search for common area UUID
- If we have a collision, I'm buying a lottery ticket

* [ALS-5787] Open Access StatViz is not showing "Other" (#180)

* Update key length handling in limitKeySize

The limitKeySize method in the VisualizationUtil class has been updated to ensure key uniqueness when keys exceed a certain length. A more robust method of shortening the keys has been implemented: if the key is longer than 45 characters, it is cut off and replaced with "..." and additional characters are appended to ensure uniqueness if needed. This helps limit key size while preserving uniqueness.

* Add VisualizationUtilTests and refine key shortening logic

Added a new test class, VisualizationUtilTests to validate the functionality of the VisualizationUtil class. Adjusted the 'limitKeySize' method to ensure key uniqueness when keys are shortened to a maximum length of 45 characters. If shortened keys are not unique, additional trailing characters are included until uniqueness is achieved.

* Add check on length before substring

* Update pic-sure-util/src/main/java/edu/harvard/dbmi/avillach/util/VisualizationUtil.java

* Update pic-sure-util/src/main/java/edu/harvard/dbmi/avillach/util/VisualizationUtil.java

* Update pic-sure-util/src/main/java/edu/harvard/dbmi/avillach/util/VisualizationUtil.java

* Update pic-sure-resources/pic-sure-visualization-resource/src/test/java/edu/harvard/hms/dbmi/avillach/resource/visualization/service/VisualizationUtilTests.java

Co-authored-by: Luke Sikina <lucas.sikina@gmail.com>

* Fix import for modified unit test

* Refactor and add test cases for key size limiting function

Refactors existing code by simplifying key size limiting logic in VisualizationUtil and added several new unit tests to ensure its correct behavior with different input scenarios including long keys, empty maps, null maps, and uniqueness near middle.

* Update null handling in VisualizationUtil's limitKeySize

Changed the handling of null input in VisualizationUtil's limitKeySize from returning a new HashMap to throwing an IllegalArgumentException. Also, updated the corresponding test to check for this exception instead of comparing with an empty map.

---------

Co-authored-by: Luke Sikina <lucas.sikina@gmail.com>

* Refine the condition for empty return in DataProcessingService (#184)

Adjusted the condition under which an empty HashMap is returned in the DataProcessingService. Now, an empty HashMap will only be returned when both the maximum and minimum values in the data are 0, and the number of bins is also 0. This change takes into account situations where the data contains values but the min and max are both 0.

* ALS-5387: Remove stack from resources table (#186)

* [ALS-5422] Add persistence.xml to visualization resource (#161) (#162)
The visualization resource is failing to start due to an error injecting persistence unit into CDI managed bean. It is unable to find a persistence unit named ''.

* ALS-5387: Remove stack from resources table
* ALS-5387: More robust implementation of feature

---------

Co-authored-by: Gcolon021 <34667267+Gcolon021@users.noreply.github.com>
Co-authored-by: GeorgeC <gcolon021@gmail.com>

* [ALS-6222] Status endpoints now filters resources (#189)

The database contains both open and auth hpds even if it wasn't deployed. This means we attempt to check for a resource that doesn't exist. This results in our service always showing degraded.

---------

Co-authored-by: Luke Sikina <lucas.skina@gmail.com>
Co-authored-by: Gcolon021 <34667267+Gcolon021@users.noreply.github.com>
Co-authored-by: Luke Sikina <lucas.sikina@gmail.com>
Co-authored-by: ramari16 <ramari16@gmail.com>
Co-authored-by: GeorgeC <gcolon021@gmail.com>

* ALS-6375: Suppress showing user 0 results in open-pic-sure (#193)

---------

Co-authored-by: Luke Sikina <lucas.skina@gmail.com>
Co-authored-by: Gcolon021 <34667267+Gcolon021@users.noreply.github.com>
Co-authored-by: Luke Sikina <lucas.sikina@gmail.com>
Co-authored-by: ramari16 <ramari16@gmail.com>
Co-authored-by: GeorgeC <gcolon021@gmail.com>

---------

Co-authored-by: Luke Sikina <lucas.skina@gmail.com>
Co-authored-by: Gcolon021 <34667267+Gcolon021@users.noreply.github.com>
Co-authored-by: Luke Sikina <lucas.sikina@gmail.com>
Co-authored-by: ramari16 <ramari16@gmail.com>
Co-authored-by: GeorgeC <gcolon021@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants