gtfs_df 0.11.0 โ†’ 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3258de8699df9b1e0eb934b3edab17a0381536dbdf7bde0275f375854392478d
4
- data.tar.gz: c67a356c1fca9818b89a936dac816826f4a00b50b990d352d59d96d1231a4104
3
+ metadata.gz: 70a7d05d5600baac0b36b21d0ebdd8fd0719cfe572844e44ae710c25fbf353f8
4
+ data.tar.gz: df2b5f47cd19bfe213644dcda42b22778acf98d8f104bf71c4e231eaa4860bba
5
5
  SHA512:
6
- metadata.gz: 881cf6027f5e68eda3916153889ac96f27f992ac411564a5232ae6b409b2488d41b596bcc23a6a4492c0a9fc2fce471986dd5ce07ede354a87a4b21033e0d4c8
7
- data.tar.gz: 6f68989b3220ba20c6fc185560f0fedda797d4f0e06735a3c366f1722ecf6ce9fa35698716c0f339852202ceda7b9f4c8ef13fcb95b3e185a83202755d84f00e
6
+ metadata.gz: ee94819792b5c1389783a7844ce23af40de13264c5c069e608ae9c2383254c3fdcdc09915f5c33348d204675e5e373f8c26b039ff97144be37721aa7f4bc1b49
7
+ data.tar.gz: 28f28bb69a62738c817dafbc36c756a96f56f9f96d4d587aab2b9dffa8df5b6948b25d6b024e70856639cc2a97c75c49ff510bb7695c825f54405bf23701582d
data/CHANGELOG.md CHANGED
@@ -1,8 +1,19 @@
1
+ ## [0.11.1] - 2026-04-28
2
+
3
+ ### ๐Ÿ› Bug Fixes
4
+
5
+ - Account for unreferenced calendar entries
6
+
7
+ ### ๐Ÿงช Testing
8
+
9
+ - Validate filtering from feed with empty calendar
10
+ - Validate unreferenced calendar dates
1
11
  ## [0.11.0] - 2026-03-30
2
12
 
3
13
  ### โš™๏ธ Miscellaneous Tasks
4
14
 
5
15
  - [**breaking**] Update ruby-polars dependency
16
+ - Bump version to 0.11.0
6
17
  ## [0.10.2] - 2026-03-20
7
18
 
8
19
  ### ๐Ÿ› Bug Fixes
data/lib/gtfs_df/feed.rb CHANGED
@@ -432,21 +432,22 @@ module GtfsDf
432
432
  # union semantics across those two parents (a trip is valid if it appears in
433
433
  # either).
434
434
  #
435
- # Here we accumulate valid service_ids across calendar/calendar_dates, but only
436
- # within the pool of trips that are already reachable from structural parents.
435
+ # Accumulate service_ids from each calendar source, then apply the filter.
436
+ # If the filter results in 0 trips, we continue accumulating to allow the next
437
+ # calendar edge to add valid service_ids. This handles feeds where
438
+ # calendar.txt has unreferenced service_ids but all trips use
439
+ # calendar_dates.txt service_ids.
437
440
  accumulated_service_ids = Polars.concat([accumulated_service_ids, valid_values]).unique
438
-
439
- # Determine the base pool of trips:
440
- # - If we've already restricted trips via structural parents (routes,
441
- # stop_times, shapes, etc), use that as the base.
442
- # - Otherwise, like when filtering directly on trips, use the current
443
- # trips dataframe.
444
441
  trips_base_df ||= filtered[child_node.fetch(:file)]
445
442
  next unless trips_base_df && trips_base_df.height > 0
446
443
 
447
- filtered[child_node.fetch(:file)] = trips_base_df.filter(
444
+ filtered_trips = trips_base_df.filter(
448
445
  Polars.col("service_id").is_in(accumulated_service_ids.implode)
449
446
  )
447
+
448
+ if filtered_trips.height > 0
449
+ filtered[child_node.fetch(:file)] = filtered_trips
450
+ end
450
451
  else
451
452
  # Original single-edge logic for all other nodes
452
453
  before = child_df.height
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GtfsDf
4
- VERSION = "0.11.0"
4
+ VERSION = "0.11.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtfs_df
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Mejorado