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

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

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

KJhellico
Copy link
Collaborator

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

  • 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

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

@KJhellico KJhellico requested a review from arkid15r March 31, 2023 12:15
@KJhellico
Copy link
Collaborator Author

KJhellico commented Mar 31, 2023

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. :(

@coveralls
Copy link

coveralls commented Mar 31, 2023

Coverage Status

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

Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

The code looks good! However, I have a doubt regarding the whole idea of adding regions/territories/etc (not a country per se) as top level entities. I would definitely like to hear other points of view on this. So I'm skipping this PR for now until we decide what our ultimate supported countries list looks like (UN members, all alpha-2 entities, other?).

I'd definitely accept all the tests thought :)

country = "GF"
subdivisions = []

def _populate(self, year: int) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd expect it to be done via init.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

country and subdivisions? Why?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No idea :)

The correct selection should have been the whole populate method (ln. 23-25). My goal was to suggest using init instead of populate as it doesn't seem you're doing actual populate method customization.

@mborsetti
Copy link
Contributor

mborsetti commented Apr 7, 2023

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.

@sonarcloud
Copy link

sonarcloud bot commented Oct 22, 2023

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

@arkid15r arkid15r changed the base branch from beta to dev February 19, 2024 18:47
@arkid15r arkid15r marked this pull request as draft September 2, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants