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

CMR-9845: Allow the tools and services to collection associations to use the generic association API. #2118

Merged
merged 5 commits into from
May 16, 2024

Conversation

eereiter
Copy link
Contributor

Overview

What is the feature/fix?

Allow the tools and services to collection associations to use the generic association API.

What is the Solution?

Allow the tools and services to collection associations to use the generic association API.

What areas of the application does this impact?

Tools and Services Associations

Checklist

  • [ x] I have updated/added unit and integration tests that prove my fix is effective or that my feature works
  • [ x] New and existing unit and int tests pass locally and remotely with my changes
  • [ x] I have removed unnecessary/dead code and imports in files I have changed
  • [ x] I have performed a self-review of my own code
  • [ x] I have commented my code, particularly in hard-to-understand areas
  • [ x] I have made corresponding changes to the documentation
  • [ x] My changes generate no new warnings
  • [ x] I have cleaned up integration tests by doing one or more of the following:
    • de-duped, consolidated, removed dead int tests
    • transformed applicable int tests into unit tests
    • refactored to reduce number of system state resets by updating fixtures (use-fixtures :each (ingest/reset-fixture {})) to be :once instead of :each

@eudoroolivares2016
Copy link
Contributor

eudoroolivares2016 commented May 15, 2024

Can we update on the https://cmr.earthdata.nasa.gov/search/site/docs/search/api.html#associate-any-concepts there is a note for It's worth noting that associations between collections and services/tools/variables cannot be made through the new association API because these associations require different business rules. to either remove or edit that paragraph with this?

EER - good catch - I have updated the documentation to remove services/tools/. the variable association still can't be made through this API - that is a different ticket.

@codecov-commenter
Copy link

codecov-commenter commented May 15, 2024

Codecov Report

Attention: Patch coverage is 21.31148% with 48 lines in your changes are missing coverage. Please review.

Project coverage is 57.74%. Comparing base (b9b874e) to head (5dda168).

Files Patch % Lines
...mr/search/services/generic_association_service.clj 12.76% 41 Missing ⚠️
...pp/src/cmr/search/services/association_service.clj 36.36% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2118      +/-   ##
==========================================
- Coverage   57.77%   57.74%   -0.03%     
==========================================
  Files        1044     1044              
  Lines       70356    70391      +35     
  Branches     1996     1989       -7     
==========================================
  Hits        40645    40645              
- Misses      27851    27892      +41     
+ Partials     1860     1854       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -25,8 +25,8 @@
(defn- context->user-id
"Returns user id of the token in the context. Throws an error if no token is provided"
[context]
(if-let [token (:token context)]
(util/lazy-get context :user-id)
Copy link
Contributor

Choose a reason for hiding this comment

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

Put this space back in, both branches of if should be at same indentation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@eereiter eereiter merged commit 6d12772 into master May 16, 2024
3 checks passed
@eereiter eereiter deleted the CMR-9845 branch May 16, 2024 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants