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

feat: Added MapEnumValueAttribute and support for explicit enum value mapping #468

Merged
merged 23 commits into from
Jun 6, 2023

Conversation

peteraritchie
Copy link
Contributor

@peteraritchie peteraritchie commented May 29, 2023

Added MapEnumValueAttribute and support for explicit enum value mapping

Description

Fixes #336

Checklist

  • The existing code style is followed
  • The commit message follows our guidelines
  • Performed a self-review of my code
  • Hard-to-understand areas of my code are commented
  • The documentation is updated (as applicable)
  • Unit tests are added/updated
  • Integration tests are added/updated (as applicable, especially if feature/bug depends on roslyn or framework version in use)

@peteraritchie peteraritchie changed the title Added MapEnumValueAttribute and support for explicit enum value mapping feat: Added MapEnumValueAttribute and support for explicit enum value mapping May 30, 2023
Copy link
Contributor

@latonz latonz left a comment

Choose a reason for hiding this comment

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

Thank you for this great contribution! 🚀 I appreciate your effort in working on this issue.

I added my review comments. Feel free to challenge any feedback provided.
FYI: Until your first contribution to this organization is merged, I need to manually approve pipeline runs...

Once you've made the necessary adjustments, feel free to ping me for another review. Keep up the good work!

docs/docs/02-configuration/04-enum.mdx Outdated Show resolved Hide resolved
src/Riok.Mapperly.Abstractions/MapEnumValueAttribute.cs Outdated Show resolved Hide resolved
src/Riok.Mapperly.Abstractions/PublicAPI.Unshipped.txt Outdated Show resolved Hide resolved
docs/docs/02-configuration/04-enum.mdx Outdated Show resolved Hide resolved
test/Riok.Mapperly.IntegrationTests/Mapper/TestMapper.cs Outdated Show resolved Hide resolved
test/Riok.Mapperly.Tests/Mapping/EnumTest.cs Show resolved Hide resolved
test/Riok.Mapperly.Tests/Mapping/EnumTest.cs Show resolved Hide resolved
test/Riok.Mapperly.Tests/Mapping/EnumTest.cs Outdated Show resolved Hide resolved
peteraritchie and others added 13 commits May 30, 2023 12:13
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 3.0.3 to 3.2.0.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](actions/setup-dotnet@v3.0.3...v3.2.0)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [Verify.XUnit](https://github.com/VerifyTests/Verify) from 20.0.0 to 20.3.0.
- [Release notes](https://github.com/VerifyTests/Verify/releases)
- [Commits](VerifyTests/Verify@20.0.0...20.3.0)

---
updated-dependencies:
- dependency-name: Verify.XUnit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Copy link
Contributor

@latonz latonz left a comment

Choose a reason for hiding this comment

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

Thank you for the updates 😊
Sorry I only caught some review feedbacks on this second review...

@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Merging #468 (2e4fc79) into main (b17f666) will increase coverage by 0.33%.
The diff coverage is 94.17%.

@@            Coverage Diff             @@
##             main     #468      +/-   ##
==========================================
+ Coverage   92.08%   92.41%   +0.33%     
==========================================
  Files         135      141       +6     
  Lines        4282     4496     +214     
  Branches      591      574      -17     
==========================================
+ Hits         3943     4155     +212     
- Misses        225      227       +2     
  Partials      114      114              
Impacted Files Coverage Δ
...iok.Mapperly.Abstractions/MapEnumValueAttribute.cs 0.00% <0.00%> (ø)
...scriptors/InlineExpressionMappingBuilderContext.cs 95.12% <ø> (ø)
...appingBodyBuilders/UserMethodMappingBodyBuilder.cs 90.47% <ø> (ø)
...Riok.Mapperly/Descriptors/MappingBuilderContext.cs 98.14% <ø> (ø)
...erly/Descriptors/MappingBuilders/MappingBuilder.cs 100.00% <ø> (ø)
src/Riok.Mapperly/Descriptors/MappingCollection.cs 100.00% <ø> (ø)
...iok.Mapperly/Descriptors/Mappings/MethodMapping.cs 95.00% <ø> (ø)
...Mappings/UserDefinedExistingTargetMethodMapping.cs 87.17% <ø> (ø)
...serMappings/UserDefinedNewInstanceMethodMapping.cs 100.00% <ø> (ø)
...pings/UserMappings/UserImplementedMethodMapping.cs 90.90% <ø> (ø)
... and 33 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

latonz
latonz previously approved these changes Jun 1, 2023
@latonz
Copy link
Contributor

latonz commented Jun 2, 2023

@peteraritchie the integration test snapshots for older frameworks have some differences which need to be fixed before merging. You can download the received snapshots of the github action here: artifact verify-test-results.

@latonz
Copy link
Contributor

latonz commented Jun 6, 2023

@peteraritchie Thank you for the updates 😊 Could you rebase onto main? And then we are ready to merge 🎉

@latonz latonz merged commit 64e6c9d into riok:main Jun 6, 2023
14 checks passed
@tore-hammervoll
Copy link

Any chance of getting this out soon in a new prerelease 2.9.0-next.2?

I'm currently migrating from AutoMapper and have a need for this. I'd like to test this as soon as possible.

@latonz
Copy link
Contributor

latonz commented Jun 9, 2023

@tore-hammervoll-spv we plan to release 2.9.0-next.2 next week.

@github-actions
Copy link

🎉 This PR is included in version 2.9.0-next.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@latonz latonz added this to the v2.9.0 milestone Jun 14, 2023
@github-actions
Copy link

github-actions bot commented Aug 7, 2023

🎉 This PR is included in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Explicit enum value mapping
3 participants