nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: Unidata/siphon
Pull request #173 (2017-12-01 21:35:52)

Change line 44 to include 0123 for day instead of 012
Fixes issue #172 so that filter_time_nearest searches for days 30 and 31 work properly.

CLAassistant: [![CLA assistant check](https://cla-assistant.io/pull/badge/not_signed)](https://cla-assistant.io/Unidata/siphon?pullRequest=173) <br/>Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our [Contributor License Agreement](https://cla-assistant.io/Unidata/siphon?pullRequest=173) before we can accept your contribution.<br/><hr/>**Pete Pokrandt** seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please [add the email address used for this commit to your account](https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user/#commits-are-not-linked-to-any-user).<br/><sub>You have signed the CLA already but the status is still pending? Let us [recheck](https://cla-assistant.io/check/Unidata/siphon?pullRequest=173) it.</sub>
pjpokran: Apparently I commited this with the wrong email address.. Not sure how to get around that.. I signed the CLA with my github account, but that's associated with a different email than what I commited the change with.. How can I fix this?
dopplershift: Try running this:
```
git commit --amend --author="Author Name <email@address.com>"
```
Then do:

```
git push —-force
```

Patch:
diff --git a/siphon/catalog.py b/siphon/catalog.py
index 2ef9eb4f..4f158c5f 100644
--- a/siphon/catalog.py
+++ b/siphon/catalog.py
@@ -41,7 +41,7 @@ class IndexableMapping(OrderedDict):
 class DatasetCollection(IndexableMapping):
     """Extend ``IndexableMapping`` to allow datetime-based filter queries."""
 
-    default_regex = re.compile(r'(?P<year>\d{4})(?P<month>[01]\d)(?P<day>[012]\d)_'
+    default_regex = re.compile(r'(?P<year>\d{4})(?P<month>[01]\d)(?P<day>[0123]\d)_'
                                r'(?P<hour>[012]\d)(?P<minute>[0-5]\d)')
 
     def _get_datasets_with_times(self, regex):


Test patch:
diff --git a/siphon/tests/test_catalog.py b/siphon/tests/test_catalog.py
index 0d850299..e1418c65 100644
--- a/siphon/tests/test_catalog.py
+++ b/siphon/tests/test_catalog.py
@@ -175,6 +175,16 @@ def test_datasets_nearest_time():
     assert nearest.title == 'NAM_CONUS_20km_noaaport_20150528_1800.grib1'
 
 
+@recorder.use_cassette('top_level_20km_rap_catalog')
+def test_datasets_nearest_time_30():
+    """Test getting dataset by time; check for a day in the 30s (#gh-173)."""
+    url = ('http://thredds.ucar.edu/thredds/catalog/grib/NCEP/NAM/'
+           'CONUS_20km/noaaport/catalog.xml')
+    cat = TDSCatalog(url)
+    nearest = cat.catalog_refs.filter_time_nearest(datetime(2015, 5, 30, 11))
+    assert nearest.title == 'NAM_CONUS_20km_noaaport_20150530_1200.grib1'
+
+
 @recorder.use_cassette('top_level_20km_rap_catalog')
 def test_datasets_nearest_time_raises():
     """Test getting dataset by time using filenames."""