feat: add MartialArt provider with names#1549
Conversation
- Created MartialArt provider in `net.datafaker.providers.sport` - Added `martialart()` accessor in SportProviders interface - Registered YAML resource file `martial_art.yml` with martial art names and origins - Updated EnFile to include "martial_art.yml" - Implemented unit tests in `MartialArtTest` for name and origin resolution
PR Summary
|
|
To address the build failure: |
| * <p>Contributed by Paulo Cunha</p> | ||
| * | ||
| * @see <a href="https://github.com/paulofranklins2/">https://github.com/paulofranklins2/</a> | ||
| * @see <a href="https://www.linkedin.com/in/paulofranklins2/">https://www.linkedin.com/in/paulofranklins2/</a> |
There was a problem hiding this comment.
You have a typo here, your LinkedIn is https://www.linkedin.com/in/paulofranklins/, without the 2 :)
There was a problem hiding this comment.
thank you good catch.
| return getProvider(Volleyball.class, Volleyball::new); | ||
| } | ||
|
|
||
| default MartialArt martialart() { |
There was a problem hiding this comment.
We'd like to have the methods here alphabetically sorted please.
There was a problem hiding this comment.
Shouldn't we use camelCase in method name?
I mean, "martialart " -> "martialArt".
There was a problem hiding this comment.
Sorted.
Renamed, good catch.
| - "Kajukenbo" | ||
| - "Shootfighting" | ||
| - "LINE" | ||
| origin: |
There was a problem hiding this comment.
I'm not sure if we really need an origin, it's hardly different than the Country.name() right? For example, there's also Dutch kickboxing, which could work well with Country.name().
Note: I don't have too many concerns about having this list here, I'm just thinking out loud a little.
refactor: correct method name for martialArt provider Fix: update contributor link - Fixed duplicate and incorrectly named `martialart()` method in `SportProviders.java`. - Updated contributor LinkedIn link in `MartialArt.java` Javadoc. refactor: remove unused origin() method from MartialArt provider - Removed origin() method from MartialArt.java as it was not needed - Updated class Javadoc to reflect single method purpose
|
Still needs the aforementioned spotless apply |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1549 +/- ##
============================================
+ Coverage 92.36% 92.40% +0.03%
- Complexity 3285 3289 +4
============================================
Files 326 327 +1
Lines 6474 6478 +4
Branches 630 630
============================================
+ Hits 5980 5986 +6
+ Misses 339 338 -1
+ Partials 155 154 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
net.datafaker.providers.sportmartialart()accessor in SportProviders interfacemartial_art.ymlwith martial art namesMartialArtTestfor name