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

Sync release with master #183

Closed
wants to merge 3 commits into from
Closed

Sync release with master #183

wants to merge 3 commits into from

Conversation

Luke-Sikina
Copy link
Member

No description provided.

Luke Sikina and others added 2 commits February 21, 2024 14:33
- 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>
@Luke-Sikina Luke-Sikina changed the title Why do I need to do this Sync release with master Feb 23, 2024
## Features

- **Search by CA ID**
  - Enabled search functionality by common area (CA) ID in addition to the existing uuid-based query system, enhancing the platform's search capabilities and covering more use cases.

## Bugs

- **Visualization Fixes**
  - Resolved an issue where the Open Access StatViz did not display the "Other" category, ensuring complete data visualization.
  - Addressed a bug in the resources table by removing an obsolete stack column, improving data management and presentation consistency.

## Enhancements

- **Key Length Handling in Visualization**
  - Improved the `limitKeySize` method in `VisualizationUtil` to ensure key uniqueness while handling keys longer than 45 characters, enhancing data integrity in visualizations.
  - Added `VisualizationUtilTests` to validate the functionality and adjustments made to the key shortening logic, ensuring robustness and accuracy.
  - Refined empty return conditions in `DataProcessingService` to better account for data scenarios where min and max values are 0, optimizing data processing logic.

- **Persistence and Resource Management**
  - Added `persistence.xml` to the visualization resource to resolve startup errors related to persistence unit injection, ensuring the smooth operation of visualization resources.
@Gcolon021
Copy link
Contributor

@Luke-Sikina I just merged these branches.

@Gcolon021
Copy link
Contributor

DECLINED

@Gcolon021 Gcolon021 closed this Mar 13, 2024
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.

2 participants