Repository: vacanza/python-holidays

Issue:
Ireland considering UK as base class and hence not being a country itself
Issue also opened here:
home-assistant/core#67542

Looks like Ireland is being considered as being part of the UK which is wrong as not all the holidays in the UK exist, or necessarily exist in Ireland.

Take a reference on this comment: https://github.com/home-assistant/core/issues/67542#issuecomment-1058079650


Discussion:
It seems that problem can be:
https://github.com/dr-prodigy/python-holidays/blob/f4a03e69907b0bf0249e18c263968b5fbfc6c0ba/holidays/utils.py#L229

and:
https://github.com/dr-prodigy/python-holidays/blob/f4a03e69907b0bf0249e18c263968b5fbfc6c0ba/holidays/countries/ireland.py#L25
My comment goes in the original issue matter in HA forum, that Ireland seems not to be one of the `list_supported_countries`, but if you want to discuss other topic here just ignore my comment.
I don't fully understand the last part, but yeah, basically the intended discussion here (at least for me) is to be able to use again Ireland as a country in Home Assistant, not interested in politics :)

Let me know if I should change something on the details so it's clearer.
IMHO the issue subject must reflect what the problem is.
The most info you can include (besides point to another place) will make easier to maintainers to understand the problem and can be easy to them to fix.

IMHO the actual redaction seems to argue about a different matter.
Sure, sorry about that, I'll try to do my best, but as I mentioned in the other issue, I'm not fully aware of this library hence the ask for a recommendation of what to explain here... 

Feel free to suggest any other changes or whatever is needed to get this properly explained
I'd humbly suggest that you don't inherit the class for one country from another - perhaps you need to audit the codebase to ensure this problem isn't going to manifest for some other country class as well.
regardless of the political aspect of this - there are a lot of assumptions that things are going to match and that changes are only going to be additive etc etc
(I do have some experience of this as developer and maintainer of the pear/php equivalent -  https://pear.php.net/package/Date_Holidays )

Indeed, and the following is a good example of the dfferences:

17th March 2022 - St. Patricks's day Bank Holiday in Ireland and Northern Ireland only.
18th March 2022 - Day of Remembrance and Recognition Bank Holiday in Ireland only.


Resolving patch:
diff --git a/holidays/countries/ireland.py b/holidays/countries/ireland.py
--- a/holidays/countries/ireland.py
+++ b/holidays/countries/ireland.py
@@ -16,20 +16,37 @@
 from dateutil.easter import easter
 from dateutil.relativedelta import relativedelta as rd, MO
 
-from holidays.constants import MAR, MAY, JUN, AUG, OCT, DEC
+from holidays.constants import FEB, MAR, MAY, JUN, AUG, OCT, DEC
 from holidays.constants import MON, TUE, WED, THU, FRI, SAT, SUN, WEEKEND
 from holidays.holiday_base import HolidayBase
-from .united_kingdom import UnitedKingdom
 
+class Ireland(HolidayBase):
+    """
+    Official holidays in Ireland, as declared in the Citizen's Information
+    bulletin:
+    https://www.citizensinformation.ie/en/employment/employment_rights_and_conditions/leave_and_holidays/public_holidays_in_ireland.html
+    """
 
-class Ireland(UnitedKingdom):
     country = "IE"
+    subdivisions = []
 
     def __init__(self, **kwargs):
         HolidayBase.__init__(self, **kwargs)
 
-    def _country_specific(self, year):
-        # Ireland exclusive holidays
+    def _populate(self, year):
+        self[date(year, JAN, 1)] = "New Year's Day"
+
+        # St. Brigid's Day
+        if year >= 2023:
+            dt = date(year, FEB, 1)
+            self[dt] = "St. Brigid's Day"
+
+            if self.observed and dt.weekday() != FRI:
+                self[date(year, FEB, 1) + rd(weekday=MO)] = "St. Brigid's Day (Observed)"
+
+        # One-off day of rememberance and recognition
+        if year == 2022:
+            self[date(year, MAR, 18)] = "Day of Rememberance and Recognition"
 
         # St. Patrick's Day
         name = "St. Patrick's Day"
@@ -40,7 +57,7 @@ def _country_specific(self, year):
         # Easter Monday
         self[easter(year) + rd(weekday=MO)] = "Easter Monday"
 
-        # May Day bank holiday (first Monday in May)
+        # May bank holiday (first Monday in May)
         if year >= 1978:
             name = "May Day"
             if year == 1995:
@@ -66,18 +83,24 @@ def _country_specific(self, year):
         self[date(year, JUN, 1) + rd(weekday=MO)] = "June Bank Holiday"
 
         # Summer bank holiday (first Monday in August)
-        self[date(year, AUG, 1) + rd(weekday=MO)] = "Summer Bank Holiday"
+        self[date(year, AUG, 1) + rd(weekday=MO)] = "August Bank Holiday"
 
         # October Bank Holiday (last Monday in October)
         self[date(year, OCT, 31) + rd(weekday=MO(-1))] = "October Bank Holiday"
 
+        # Christmas Day
+        name = "Christmas Day"
+        self[date(year, DEC, 25)] = "Christmas Day"
+        if self.observed and date(year, DEC, 25).weekday() in WEEKEND:
+            self[date(year, DEC, 25) + rd(weekday=MON)] = name + " (Observed)"
+
         # St. Stephen's Day
         name = "St. Stephen's Day"
         self[date(year, DEC, 26)] = name
         if self.observed and date(year, DEC, 26).weekday() == SAT:
-            self[date(year, DEC, 28)] = name + " (Observed)"
+            self[date(year, DEC, 26) + rd(weekday=MON)] = name + " (Observed)"
         elif self.observed and date(year, DEC, 26).weekday() == SUN:
-            self[date(year, DEC, 28)] = name + " (Observed)"
+            self[date(year, DEC, 26) + rd(weekday=TUE)] = name + " (Observed)"
 
 
 class IE(Ireland):


Test patch: