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

DXCDT-376: Preserve keywords function #745

Merged
merged 19 commits into from
Feb 21, 2023

Conversation

willvedd
Copy link
Contributor

@willvedd willvedd commented Feb 14, 2023

🔧 Changes

Building off of the previous PRs for keyword preservation (#736, #738, #740, #741, #744), this PR introduces the preserveKeywords function. This is the highest-order function of this feature and the one that will ultimately be integrated into the export process. As the name suggests, it preserves keywords when provided local assets, remote assets and keyword mappings. The result is an altered copy of the remote assets with the keywords appropriately replaced.

📚 References

Related Issues:

🔬 Testing

Added relevant unit tests.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@willvedd willvedd changed the base branch from master to DXCDT-374-keyword-preservation-update-field-by-address February 14, 2023 22:29
Comment on lines 24 to +27
export const getPreservableFieldsFromAssets = (
asset: any,
address: string,
keywordMappings: KeywordMappings
asset: object,
keywordMappings: KeywordMappings,
address = ''
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Re-ordering the arguments, particularly making keywordMappings second to be more consistent with the other functions of that file.

@codecov-commenter
Copy link

Codecov Report

Base: 83.86% // Head: 83.93% // Increases project coverage by +0.07% 🎉

Coverage data is based on head (8b235ed) compared to base (fbd6156).
Patch coverage: 94.73% of modified lines in pull request are covered.

Additional details and impacted files
@@                                    Coverage Diff                                     @@
##           DXCDT-374-keyword-preservation-update-field-by-address     #745      +/-   ##
==========================================================================================
+ Coverage                                                   83.86%   83.93%   +0.07%     
==========================================================================================
  Files                                                         115      115              
  Lines                                                        3445     3462      +17     
  Branches                                                      647      650       +3     
==========================================================================================
+ Hits                                                         2889     2906      +17     
  Misses                                                        324      324              
  Partials                                                      232      232              
Impacted Files Coverage Δ
src/keywordPreservation.ts 97.46% <94.73%> (+0.69%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@willvedd willvedd marked this pull request as ready for review February 21, 2023 18:18
@willvedd willvedd requested a review from a team as a code owner February 21, 2023 18:18
Base automatically changed from DXCDT-374-keyword-preservation-update-field-by-address to master February 21, 2023 22:24
@willvedd willvedd enabled auto-merge (squash) February 21, 2023 22:41
@willvedd willvedd merged commit 75787a7 into master Feb 21, 2023
@willvedd willvedd deleted the DXCDT-376-preserve-keywords-function branch February 21, 2023 23:02
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.

3 participants