nebius/SWE-bench-extra huggingface dataset:
Repository: dr-prodigy/python-holidays

Issue:
HolidayBase::pop_named won't remove holiday by a partial name
```
  File ".../home-assistant-core/venv/lib/python3.10/site-packages/holidays/holiday_base.py", line 825, in pop_named
    holiday_names.remove(name)
ValueError: list.remove(x): x not in list
```

Comments:

Patch:
diff --git a/CHANGES b/CHANGES
index 38bd8937..04d3b680 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,10 @@
+Version 0.27.1
+==============
+
+Released June 21, 2023
+
+- Fix HolidayBase::pop_named partial holiday names removal (#1325 by @arkid15r)
+
 Version 0.27
 ============
 
diff --git a/holidays/__init__.py b/holidays/__init__.py
index 12bda76a..02182bc9 100644
--- a/holidays/__init__.py
+++ b/holidays/__init__.py
@@ -14,7 +14,7 @@ from holidays.holiday_base import *
 from holidays.registry import EntityLoader
 from holidays.utils import *
 
-__version__ = "0.27"
+__version__ = "0.27.1"
 
 
 EntityLoader.load("countries", globals())
diff --git a/holidays/holiday_base.py b/holidays/holiday_base.py
index 5c568e22..c25cf69c 100644
--- a/holidays/holiday_base.py
+++ b/holidays/holiday_base.py
@@ -822,7 +822,13 @@ class HolidayBase(Dict[date, str]):
 
             # Keep the rest of holidays falling on the same date.
             if not use_exact_name:
-                holiday_names.remove(name)
+                name_lower = name.lower()
+                holiday_names = [
+                    holiday_name
+                    for holiday_name in holiday_names
+                    if name_lower not in holiday_name.lower()
+                ]
+
                 if len(holiday_names) > 0:
                     self[dt] = HOLIDAY_NAME_DELIMITER.join(holiday_names)
 
diff --git a/setup.cfg b/setup.cfg
index 4c1e185c..f0505dea 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -37,7 +37,7 @@ python_requires = >=3.7
 include_package_data = True
 
 [bumpversion]
-current_version = 0.27
+current_version = 0.27.1
 
 [flake8]
 extend-ignore = F821


Test patch:
diff --git a/tests/test_holiday_base.py b/tests/test_holiday_base.py
index c57af796..bfe86e01 100644
--- a/tests/test_holiday_base.py
+++ b/tests/test_holiday_base.py
@@ -156,6 +156,16 @@ class TestBasics(unittest.TestCase):
         self.holidays.pop_named(holiday_name_2)
         self.assertNotIn(dt, self.holidays)
 
+    def test_pop_named_partial(self):
+        self.assertIn(date(2014, 1, 1), self.holidays)
+        dts = self.holidays.pop_named("N")
+        for dt in dts:
+            self.assertNotIn(dt, self.holidays)
+        self.assertRaises(
+            KeyError,
+            lambda: self.holidays.pop_named("New Year"),
+        )
+
     def test_pop_named_exception(self):
         self.assertRaises(
             KeyError,
Repository: dr-prodigy/python-holidays

Issue:
October 25 is no longer holiday in Spain Prov=PV
I'm using the WORKDAY integration of Home Assistant to obtain a binary sensor for workdays.
AFAIK python-holidays is being used "under the hood" in this integration
Yesterday October 25th was wrongly marked as holiday.
It's not holiday since 2014.

More info (sorry, in spanish): [https://es.wikipedia.org/wiki/D%C3%ADa_del_Pa%C3%ADs_Vasco#Creaci%C3%B3n_y_desaparici%C3%B3n_de_la_festividad]

Comments:

Patch:
diff --git a/holidays/countries/spain.py b/holidays/countries/spain.py
index 6b2c8dd0..3fd94870 100644
--- a/holidays/countries/spain.py
+++ b/holidays/countries/spain.py
@@ -185,7 +185,10 @@ class Spain(HolidayBase):
             elif self.prov == "NC":
                 self._is_observed(date(year, SEP, 27), "Día de Navarra")
             elif self.prov == "PV":
-                self._is_observed(date(year, OCT, 25), "Día del Páis Vasco")
+                if 2011 <= year <= 2013:
+                    self._is_observed(
+                        date(year, OCT, 25), "Día del Páis Vasco"
+                    )
             elif self.prov == "RI":
                 self._is_observed(date(year, JUN, 9), "Día de La Rioja")
 


Test patch:
diff --git a/test/countries/test_spain.py b/test/countries/test_spain.py
index 6108ad57..822ced95 100644
--- a/test/countries/test_spain.py
+++ b/test/countries/test_spain.py
@@ -84,7 +84,6 @@ class TestSpain(unittest.TestCase):
             (9, 11): ["CT"],
             (9, 27): ["NC"],
             (10, 9): ["VC"],
-            (10, 25): ["PV"],
         }
         for prov, prov_holidays in self.prov_holidays.items():
             for year in range(2010, 2025):
@@ -142,3 +141,11 @@ class TestSpain(unittest.TestCase):
                         date(year, *fest_day) in prov_holidays,
                         prov in fest_prov,
                     )
+
+    def test_change_of_province_specific_days(self):
+        prov_holidays = self.prov_holidays["PV"]
+        self.assertNotIn(date(2010, 10, 25), prov_holidays)
+        self.assertIn(date(2011, 10, 25), prov_holidays)
+        self.assertIn(date(2012, 10, 25), prov_holidays)
+        self.assertIn(date(2013, 10, 25), prov_holidays)
+        self.assertNotIn(date(2014, 10, 25), prov_holidays)
Repository: dr-prodigy/python-holidays

Issue:
DeprecationWarning upon "import holidays" in version 0.17
The implementation of deprecating the Swaziland calendar contains a bug. Just importing the holidays package is enough to fire the `DeprecationWarning`.

**Steps to reproduce (in bash):**

```bash
# Setup
python -m venv demo
source demo/bin/activate
pip install --upgrade pip

# Bad version
pip install holidays==0.17

# Expose bug
python -W error::DeprecationWarning -c 'import holidays'

# Workoround
pip uninstall -y holidays
pip install holidays!=0.17
python -W error::DeprecationWarning -c 'import holidays'

# Cleanup
deactivate
rm -rf demo
```

**Expected behavior:**

The `DeprecationWarning` should only fire when the user constructs an instance of the `Swaziland` or a subclass.


Comments:

Patch:
diff --git a/holidays/countries/eswatini.py b/holidays/countries/eswatini.py
index 00ca75bf..798bd495 100644
--- a/holidays/countries/eswatini.py
+++ b/holidays/countries/eswatini.py
@@ -80,11 +80,13 @@ class Eswatini(HolidayBase):
 
 
 class Swaziland(Eswatini):
-    warnings.warn(
-        "Swaziland is deprecated, use Eswatini instead.",
-        DeprecationWarning,
-    )
-    pass
+    def __init__(self, *args, **kwargs) -> None:
+        warnings.warn(
+            "Swaziland is deprecated, use Eswatini instead.",
+            DeprecationWarning,
+        )
+
+        super().__init__(*args, **kwargs)
 
 
 class SZ(Eswatini):


Test patch:
diff --git a/test/countries/test_eswatini.py b/test/countries/test_eswatini.py
index 29d3d34e..038c2b92 100644
--- a/test/countries/test_eswatini.py
+++ b/test/countries/test_eswatini.py
@@ -10,6 +10,7 @@
 #  License: MIT (see LICENSE file)
 
 import unittest
+import warnings
 from datetime import date
 
 import holidays
@@ -59,3 +60,12 @@ class TestEswatini(unittest.TestCase):
         self.assertIn(date(2021, 4, 26), self.holidays)
         self.assertIn(date(2021, 12, 27), self.holidays)
         self.assertIn(date(2023, 1, 2), self.holidays)
+
+    def test_swaziland_deprecation_warning(self):
+        warnings.simplefilter("default")
+        with self.assertWarns(Warning):
+            holidays.Swaziland()
+
+        warnings.simplefilter("error")
+        with self.assertRaises(Warning):
+            holidays.Swaziland()
Repository: duartegroup/autodE

Issue:
TSguess.from_species does not inherit solvent

Comments:

Patch:
diff --git a/autode/transition_states/ts_guess.py b/autode/transition_states/ts_guess.py
index 97df5f5..3516d20 100644
--- a/autode/transition_states/ts_guess.py
+++ b/autode/transition_states/ts_guess.py
@@ -136,10 +136,13 @@ class TSguess(TSbase):
             (autode.transition_states.ts_guess.TSguess): TS guess
         """
 
-        ts_guess = cls(atoms=species.atoms,
-                       charge=species.charge,
-                       mult=species.mult,
-                       name=f'ts_guess_{species.name}')
+        ts_guess = cls(
+            atoms=species.atoms,
+            charge=species.charge,
+            mult=species.mult,
+            name=f'ts_guess_{species.name}',
+            solvent_name=None if species.solvent is None else species.solvent.name
+        )
 
         return ts_guess
 


Test patch:
diff --git a/tests/test_ts/test_ts_guess.py b/tests/test_ts/test_ts_guess.py
new file mode 100644
index 0000000..9f90d45
--- /dev/null
+++ b/tests/test_ts/test_ts_guess.py
@@ -0,0 +1,12 @@
+from autode.atoms import Atom
+from autode.species.molecule import Molecule
+from autode.transition_states.ts_guess import TSguess
+
+
+def test_that_a_molecules_solvent_is_inherited():
+
+    mol = Molecule(atoms=[Atom("H")], mult=2, solvent_name="water")
+    assert mol.solvent.smiles == "O"
+
+    ts_guess = TSguess.from_species(mol)
+    assert ts_guess.solvent.smiles == "O"
Repository: duartegroup/autodE

Issue:
Throw useful exception if `ade.Config.ts_template_folder_path = ""`

Comments:

Patch:
diff --git a/autode/__init__.py b/autode/__init__.py
index eff4ba3..0a1dd63 100644
--- a/autode/__init__.py
+++ b/autode/__init__.py
@@ -38,7 +38,7 @@ Bumping the version number requires following the release proceedure:
   - Merge when tests pass
 """
 
-__version__ = "1.3.3"
+__version__ = "1.3.4"
 
 
 __all__ = [
diff --git a/autode/transition_states/templates.py b/autode/transition_states/templates.py
index 3bea0e8..5bb77e1 100644
--- a/autode/transition_states/templates.py
+++ b/autode/transition_states/templates.py
@@ -38,6 +38,11 @@ def get_ts_template_folder_path(folder_path):
 
     logger.info("Folder path is not set – TS templates in the default path")
 
+    if Config.ts_template_folder_path == "":
+        raise ValueError(
+            "Cannot set ts_template_folder_path to an empty string"
+        )
+
     if Config.ts_template_folder_path is not None:
         logger.info("Configuration ts_template_folder_path is set")
         return Config.ts_template_folder_path
diff --git a/doc/changelog.rst b/doc/changelog.rst
index 8376c45..3097412 100644
--- a/doc/changelog.rst
+++ b/doc/changelog.rst
@@ -1,6 +1,26 @@
 Changelog
 =========
 
+1.3.4
+--------
+----------
+
+Feature additions.
+
+Usability improvements/Changes
+******************************
+* Throw useful exception for invalid :code:`ade.Config.ts_template_folder_path`
+
+
+Functionality improvements
+**************************
+- 
+
+Bug Fixes
+*********
+-
+
+
 1.3.3
 --------
 ----------
diff --git a/setup.py b/setup.py
index b8206c6..ddfe8d1 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ extensions = [
 
 setup(
     name="autode",
-    version="1.3.3",
+    version="1.3.4",
     python_requires=">3.7",
     packages=[
         "autode",


Test patch:
diff --git a/tests/test_config.py b/tests/test_config.py
index a0791d2..338a22a 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -5,6 +5,7 @@ from autode.config import Config
 from autode.values import Allocation, Distance
 from autode.wrappers.keywords import KeywordsSet
 from autode.wrappers.keywords import Keywords
+from autode.transition_states.templates import get_ts_template_folder_path
 
 
 def test_config():
@@ -76,3 +77,13 @@ def test_step_size_setter():
     # Setting in Bohr should convert to angstroms
     _config.max_step_size = Distance(0.2, units="a0")
     assert np.isclose(_config.max_step_size.to("ang"), 0.1, atol=0.02)
+
+
+def test_invalid_get_ts_template_folder_path():
+
+    Config.ts_template_folder_path = ""
+
+    with pytest.raises(ValueError):
+        _ = get_ts_template_folder_path(None)
+
+    Config.ts_template_folder_path = None