From 18a4516361d79d7fd6578cca176d466be8b87df5 Mon Sep 17 00:00:00 2001 From: Ryan Volz Date: Mon, 11 Aug 2025 18:33:55 -0400 Subject: [PATCH 1/3] CI: set permission to write contents to fix tarball upload to release --- .github/workflows/cd.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 88119e6..b53c41a 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -13,6 +13,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: + contents: write + env: # Many color libraries just need this to be set to any value, but at least # one distinguishes color depth, where "3" -> "256-bit color". From 5db6d1b549c0c2d75cf10ef9dd12f0c7630ec2c2 Mon Sep 17 00:00:00 2001 From: Ryan Volz Date: Mon, 8 Sep 2025 13:28:22 -0400 Subject: [PATCH 2/3] mirror: Fix ignore_existing=True for Digital Metadata files Previously, ignore_existing=True would ignore all existing Digital Metadata files, which would skip mirroring the most recent file(s) containing metadata that still applies through forward-fill logic. This modifies the ignore_existing=True behavior to *not* ignore the latest existing Digital Metadata files. --- python/digital_rf/mirror.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/python/digital_rf/mirror.py b/python/digital_rf/mirror.py index 8f1a946..a034b96 100644 --- a/python/digital_rf/mirror.py +++ b/python/digital_rf/mirror.py @@ -365,6 +365,26 @@ def start(self): include_dmd_properties=False, ) paths = chain(paths, more_paths) + elif self.include_dmd: + # mirror dmd files that still apply currently (most recent) + # do this by setting starttime to max possible (or endtime) which + # through forward-fill logic of DMD matching will get the last files + if self.endtime is not None: + lasttime = self.endtime + else: + lasttime = datetime.datetime.max.replace( + tzinfo=datetime.timezone.utc + ) + more_paths = list_drf.ilsdrf( + self.src, + starttime=lasttime, + endtime=self.endtime, + include_drf=False, + include_dmd=self.include_dmd, + include_drf_properties=False, + include_dmd_properties=False, + ) + paths = chain(paths, more_paths) # add events for existing files, skipping observer and event queue # and dispatching directly so we can dispatch from this thread From e2facaf82a89bfb4abc1b20067f03bda6b2fce62 Mon Sep 17 00:00:00 2001 From: Ryan Volz Date: Mon, 8 Sep 2025 13:37:02 -0400 Subject: [PATCH 3/3] Add news --- news/fix_ignore_existing.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 news/fix_ignore_existing.rst diff --git a/news/fix_ignore_existing.rst b/news/fix_ignore_existing.rst new file mode 100644 index 0000000..52ac7d9 --- /dev/null +++ b/news/fix_ignore_existing.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* Fix ignore_existing=True when mirroring Digital Metadata files. Previously, ignore_existing=True would ignore all existing Digital Metadata files, which would skip mirroring the most recent file(s) containing metadata that still applies through forward-fill logic. This modifies the ignore_existing=True behavior to *not* ignore the latest existing Digital Metadata files. + +**Security:** + +*