python-holidays icon indicating copy to clipboard operation
python-holidays copied to clipboard

Add ISO 3166-1 for overseas departments and regions of France

Open KJhellico opened this issue 2 years ago • 4 comments

Proposed change

This PR implements ISO 3166-1 country entries for overseas departments and regions of France that have officially assigned their own country codes:

  • Saint Barthélemy
  • French Guiana
  • Guadeloupe
  • Saint Martin
  • Martinique
  • New Caledonia
  • French Polynesia
  • Saint Pierre and Miquelon
  • Réunion
  • French Southern Territories
  • Wallis and Futuna
  • Mayotte

Type of change

  • [x] New country/market holidays support (thank you!)
  • [ ] Supported country/market holidays update (calendar discrepancy fix, localization)
  • [ ] Existing code/test/process quality improvement (best practice, cleanup, refactoring, optimization)
  • [ ] Dependency upgrade (version update)
  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [ ] Breaking change (a code change causing existing functionality to break)
  • [ ] New feature (new python-holidays functionality in general)

Checklist

  • [x] I've followed the contributing guidelines
  • [x] This PR is filed against beta branch of the repository
  • [x] This PR doesn't contain any merge conflicts and has clean commit history
  • [x] The code style looks good (make pre-commit)
  • [x] I've added tests to verify that the new code works and all tests pass locally (make test, make tox)
  • [x] The related documentation has been added/updated (check off the box for free if no updates is required)

KJhellico avatar Mar 31 '23 12:03 KJhellico

I'd like to localize these countries using the France localization (without creating separate files for each country), but I don't know how to do it. :(

KJhellico avatar Mar 31 '23 12:03 KJhellico

Coverage Status

Coverage: 99.934% (+0.001%) from 99.933% when pulling bd155c2679dc13db2817cf112f40638fcc53acee on KJhellico:add-fr-overseas into 635a97f0732e626e0aec331e230412360cbd8058 on dr-prodigy:beta.

coveralls avatar Mar 31 '23 12:03 coveralls

My thought is that if a country, sovereign state, or dependent territory qualifies under the rules of the International Organization for Standardization, which consists of 167 countries, to have its own code and therefore for the Internet Assigned Numbers Authority to assign it a unique country code top-level domain (ccTLD), then this library should provide holidays for it.

More pragmatically, I don't think that it would be good for this project to be involved in the political activity of arbitrating which country, sovereign state, or dependent territory gets to have coverage here and which one does not, with the messiness of coming up with new rules, and in effect creating a non-standard classification apart from the already well-established ISO/IANA one.

In my own opinion sticking to the global and widely recognized standards of ISO and IANA is the fairest and most expedient way to provide holiday coverage, as well as the most useful to developers.

@arkid15r I urge you to accept this PR and push it once ready.

mborsetti avatar Apr 07 '23 01:04 mborsetti

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Oct 22 '23 20:10 sonarqubecloud[bot]