gtfs_df 0.6.0 → 0.6.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: c7c1d87e57bbb44ceb4ce8112da7172c5a8c76f8e88d3b1e8fbb610aad850cf3
4
- data.tar.gz: 6a1b68dfc723d3c70b779687a70100b735c9a57e91603b302685318660473c66
3
+ metadata.gz: 9db3a2b1829e87ae837133265aa0192585dc7fb7476646e634887652c7771e02
4
+ data.tar.gz: c8b5a84c802897dfcd291acd45deaee4798fa34c8de71ac5436a00fe9025fe19
5
5
  SHA512:
6
- metadata.gz: 85684d79eac1479bac56995cd00a4d22106e5247979e2b54b07dee0d2b1948c4e86bf005be674b57656c0a9c14acf731a11d17163edde72d0302561a2d489159
7
- data.tar.gz: 7033b279730614870ff8710e51b29ff20f2b399aff9cd1b13a8a2a3202940a88221d9f0edc5dc82a5c3593c9f2314fdc6082fd8c89673f8ec956ba9eada11e2a
6
+ metadata.gz: 0d6f0d3af6c79ab6bb3b7e1b19aa14bf531665b19284f42b5e0b3658e2686314a8f4875d04cac1ca66c02597b8ff50455bfdf55bcd8093fd1171dd02651926c8
7
+ data.tar.gz: 9d105caf14ef7ad8597910efdf8786d8238ef3b5e440651dc01d00f321f1face713c959bc367a21b394f97b32dc4a86958a76ce68561824bd665321475d0b4cf
data/CHANGELOG.md CHANGED
@@ -1,59 +1,141 @@
1
- ## [0.6.0] - 2025-12-09
2
- ### Fixed
1
+ ## [0.6.1] - 2025-12-12
3
2
 
4
- - visit nodes multiple times
3
+ ### 🐛 Bug Fixes
4
+
5
+ - Parse whitespace in column headers
6
+
7
+ ### 📚 Documentation
8
+
9
+ - Badges
10
+
11
+ ### ⚙️ Miscellaneous Tasks
12
+
13
+ - Update devenv
14
+ - Drop custom changelog parsing
15
+ ## [0.6.0] - 2025-12-10
16
+
17
+ ### 🐛 Bug Fixes
18
+
19
+ - Visit nodes multiple times
20
+
21
+ ### ⚙️ Miscellaneous Tasks
22
+
23
+ - Bump version to 0.6.0
5
24
  ## [0.5.0] - 2025-12-08
6
25
 
7
- ### Added
26
+ ### 🚀 Features
8
27
 
9
- - add Feed#filter filter_only_children param
28
+ - [**breaking**] Add Feed#filter filter_only_children param
10
29
 
11
- ### Maintenance
30
+ ### ⚙️ Miscellaneous Tasks
12
31
 
13
- - arrange edges so parent is always first
14
- - build directed graph
15
- - allow ! in commit messages
32
+ - Arrange edges so parent is always first
33
+ - Build directed graph
34
+ - Allow ! in commit messages
35
+ - Bump version to 0.5.0
16
36
  ## [0.4.1] - 2025-12-05
17
37
 
18
- ### Added
38
+ ### 🚀 Features
19
39
 
20
- - handle extra whitespace in csvs
40
+ - Handle extra whitespace in csvs
21
41
 
22
- ### Maintenance
42
+ ### ⚙️ Miscellaneous Tasks
23
43
 
24
- - remove unused initializer format
44
+ - Remove unreleased section
45
+ - Remove unused initializer format
46
+ - Bump version to 0.4.1
25
47
  ## [0.4.0] - 2025-12-04
26
48
 
27
- ### Added
28
-
29
- - allow setting maintain_trip_dependencies=false
49
+ ### 🚀 Features
30
50
 
31
- ### Fixed
51
+ - Allow setting maintain_trip_dependencies=false
32
52
 
33
- - parse stop_lat as float
34
- - add missing agency -> fare_attributes edge
35
- - allow null for fare_rules
53
+ ### 🐛 Bug Fixes
36
54
 
37
- ### Maintenance
55
+ - Parse stop_lat as float
56
+ - Add missing agency -> fare_attributes edge
57
+ - Allow null for fare_rules
38
58
 
39
- - provide accessor for gtfs_files (utility)
40
- - add yard docs
59
+ ### ⚙️ Miscellaneous Tasks
41
60
 
61
+ - Provide accessor for gtfs_files (utility)
62
+ - Add yard docs
63
+ - Bump version to 0.4.0
42
64
  ## [0.3.0] - 2025-12-04
43
65
 
44
- ### Added
66
+ ### 🚀 Features
67
+
68
+ - Keep parent stations linked to used stops
69
+
70
+ ### 🐛 Bug Fixes
71
+
72
+ - Handle null values
73
+ - Update lock on version bump
74
+
75
+ ### ⚙️ Miscellaneous Tasks
76
+
77
+ - Reuse load_from_dir logic in reader
78
+ - Clean up unused method + better comments
79
+ - Autopublish on release tag push
80
+ - Automate release script
81
+ - Release tag script
82
+ - Bump version to 0.3.0
83
+ ## [0.2.0] - 2025-12-01
84
+
85
+ ### 🚀 Features
86
+
87
+ - Add Reader.load_from_dir
88
+
89
+ ### 🐛 Bug Fixes
90
+
91
+ - Require correct entrypoint
92
+ - Cascade empty view filters
93
+ - Handle parsing when cols size = schema size
94
+ - Parse extraneous columns as strings
95
+ - Cascade changes reliably
96
+ - Filter with trips as atomic unit
97
+ - Remove nonexistent booking_rule association
98
+ - Add empty string to null vals
99
+
100
+ ### 📚 Documentation
101
+
102
+ - Include processing time
103
+ - Update gem name
104
+
105
+ ### ⚙️ Miscellaneous Tasks
106
+
107
+ - Add byebug gem
108
+ - Include byebug in spec_helper.rb
109
+ - Rearrange filter specs
110
+ - Add pending specs for expected behaviors
111
+ - [**breaking**] Removes duplicate load_from_dir method (use reader instead)
112
+ - Mutate for both filter! and prune!
113
+ - Tag version 0.2.0
114
+ ## [0.1.1] - 2025-11-12
115
+
116
+ ### 🐛 Bug Fixes
117
+
118
+ - Release workflow
45
119
 
46
- - keep parent stations linked to used stops
120
+ ### ⚙️ Miscellaneous Tasks
47
121
 
48
- ### Fixed
122
+ - Rename namespace to follow ruby conventions
123
+ - Bump version
124
+ - Remove broken release flow
125
+ - Clarify gem status
126
+ - Republish version
127
+ ## [0.1.0] - 2025-11-12
49
128
 
50
- - handle null values
51
- - update lock on version bump
129
+ ### 📚 Documentation
52
130
 
53
- ### Maintenance
131
+ - Readme and gemspec details
132
+ - Time parsing to-do
54
133
 
55
- - reuse load_from_dir logic in reader
56
- - clean up unused method + better comments
57
- ## [0.1.0] - 2025-11-10
134
+ ### ⚙️ Miscellaneous Tasks
58
135
 
136
+ - Initial commit
137
+ - Make the lock platform agnostic
138
+ - Validate commit messages
139
+ - Run spec and standard steps separately
140
+ - Release flow
59
141
  - Initial release
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # ruby-gtfs-df
2
2
 
3
+ [![Tests](https://github.com/davidmh/ruby-gtfs-df/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/davidmh/ruby-gtfs-df/actions/workflows/tests.yml) [![Gem Version](https://badge.fury.io/rb/gtfs_df.svg)](https://badge.fury.io/rb/gtfs_df)
4
+
3
5
  A ruby gem to manipulate [GTFS] feeds using DataFrames using [Polars] ([ruby-polars])
4
6
 
5
7
  This project was created to bring the power of [partridge] to ruby.
data/cliff.toml ADDED
@@ -0,0 +1,92 @@
1
+ # git-cliff ~ configuration file
2
+ # https://git-cliff.org/docs/configuration
3
+
4
+
5
+ [changelog]
6
+ # A Tera template to be rendered for each release in the changelog.
7
+ # See https://keats.github.io/tera/docs/#introduction
8
+ body = """
9
+ {% if version %}\
10
+ ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
11
+ {% else %}\
12
+ ## [unreleased]
13
+ {% endif %}\
14
+ {% for group, commits in commits | group_by(attribute="group") %}
15
+ ### {{ group | striptags | trim | upper_first }}
16
+ {% for commit in commits %}
17
+ - {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
18
+ {% if commit.breaking %}[**breaking**] {% endif %}\
19
+ {{ commit.message | upper_first }}\
20
+ {% endfor %}
21
+ {% endfor %}
22
+ """
23
+ # Remove leading and trailing whitespaces from the changelog's body.
24
+ trim = true
25
+ # Render body even when there are no releases to process.
26
+ render_always = true
27
+ # An array of regex based postprocessors to modify the changelog.
28
+ postprocessors = [
29
+ # Replace the placeholder <REPO> with a URL.
30
+ #{ pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" },
31
+ ]
32
+ # render body even when there are no releases to process
33
+ # render_always = true
34
+ # output file path
35
+ # output = "test.md"
36
+
37
+ [git]
38
+ # Parse commits according to the conventional commits specification.
39
+ # See https://www.conventionalcommits.org
40
+ conventional_commits = true
41
+ # Exclude commits that do not match the conventional commits specification.
42
+ filter_unconventional = true
43
+ # Require all commits to be conventional.
44
+ # Takes precedence over filter_unconventional.
45
+ require_conventional = false
46
+ # Split commits on newlines, treating each line as an individual commit.
47
+ split_commits = false
48
+ # An array of regex based parsers to modify commit messages prior to further processing.
49
+ commit_preprocessors = [
50
+ # Replace issue numbers with link templates to be updated in `changelog.postprocessors`.
51
+ #{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
52
+ # Check spelling of the commit message using https://github.com/crate-ci/typos.
53
+ # If the spelling is incorrect, it will be fixed automatically.
54
+ #{ pattern = '.*', replace_command = 'typos --write-changes -' },
55
+ ]
56
+ # Prevent commits that are breaking from being excluded by commit parsers.
57
+ protect_breaking_commits = false
58
+ # An array of regex based parsers for extracting data from the commit message.
59
+ # Assigns commits to groups.
60
+ # Optionally sets the commit's scope and can decide to exclude commits from further processing.
61
+ commit_parsers = [
62
+ { message = "^feat", group = "<!-- 0 -->🚀 Features" },
63
+ { message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
64
+ { message = "^doc", group = "<!-- 3 -->📚 Documentation" },
65
+ { message = "^perf", group = "<!-- 4 -->⚡ Performance" },
66
+ { message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
67
+ { message = "^style", group = "<!-- 5 -->🎨 Styling" },
68
+ { message = "^test", group = "<!-- 6 -->🧪 Testing" },
69
+ { message = "^chore\\(release\\): prepare for", skip = true },
70
+ { message = "^chore\\(deps.*\\)", skip = true },
71
+ { message = "^chore\\(pr\\)", skip = true },
72
+ { message = "^chore\\(pull\\)", skip = true },
73
+ { message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
74
+ { body = ".*security", group = "<!-- 8 -->🛡️ Security" },
75
+ { message = "^revert", group = "<!-- 9 -->◀️ Revert" },
76
+ { message = ".*", group = "<!-- 10 -->💼 Other" },
77
+ ]
78
+ # Exclude commits that are not matched by any commit parser.
79
+ filter_commits = false
80
+ # An array of link parsers for extracting external references, and turning them into URLs, using regex.
81
+ link_parsers = []
82
+ # Include only the tags that belong to the current branch.
83
+ use_branch_tags = false
84
+ # Order releases topologically instead of chronologically.
85
+ topo_order = false
86
+ # Order releases topologically instead of chronologically.
87
+ topo_order_commits = true
88
+ # Order of commits in each group/release within the changelog.
89
+ # Allowed values: newest, oldest
90
+ sort_commits = "oldest"
91
+ # Process submodules commits
92
+ recurse_submodules = false
data/devenv.lock CHANGED
@@ -3,10 +3,10 @@
3
3
  "devenv": {
4
4
  "locked": {
5
5
  "dir": "src/modules",
6
- "lastModified": 1761427990,
6
+ "lastModified": 1765397744,
7
7
  "owner": "cachix",
8
8
  "repo": "devenv",
9
- "rev": "7419c04fc798d5d5918413d4cb6c8629f9d4e8a3",
9
+ "rev": "fd121886248781fee8546e4b6edc6d27e1d4efd5",
10
10
  "type": "github"
11
11
  },
12
12
  "original": {
@@ -19,10 +19,10 @@
19
19
  "flake-compat": {
20
20
  "flake": false,
21
21
  "locked": {
22
- "lastModified": 1747046372,
22
+ "lastModified": 1765121682,
23
23
  "owner": "edolstra",
24
24
  "repo": "flake-compat",
25
- "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
25
+ "rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3",
26
26
  "type": "github"
27
27
  },
28
28
  "original": {
@@ -34,10 +34,10 @@
34
34
  "flake-compat_2": {
35
35
  "flake": false,
36
36
  "locked": {
37
- "lastModified": 1747046372,
37
+ "lastModified": 1765121682,
38
38
  "owner": "edolstra",
39
39
  "repo": "flake-compat",
40
- "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
40
+ "rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3",
41
41
  "type": "github"
42
42
  },
43
43
  "original": {
@@ -72,10 +72,10 @@
72
72
  ]
73
73
  },
74
74
  "locked": {
75
- "lastModified": 1760663237,
75
+ "lastModified": 1765404074,
76
76
  "owner": "cachix",
77
77
  "repo": "git-hooks.nix",
78
- "rev": "ca5b894d3e3e151ffc1db040b6ce4dcc75d31c37",
78
+ "rev": "2d6f58930fbcd82f6f9fd59fb6d13e37684ca529",
79
79
  "type": "github"
80
80
  },
81
81
  "original": {
@@ -92,10 +92,10 @@
92
92
  ]
93
93
  },
94
94
  "locked": {
95
- "lastModified": 1709087332,
95
+ "lastModified": 1762808025,
96
96
  "owner": "hercules-ci",
97
97
  "repo": "gitignore.nix",
98
- "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
98
+ "rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
99
99
  "type": "github"
100
100
  },
101
101
  "original": {
@@ -106,10 +106,10 @@
106
106
  },
107
107
  "nixpkgs": {
108
108
  "locked": {
109
- "lastModified": 1758532697,
109
+ "lastModified": 1764580874,
110
110
  "owner": "cachix",
111
111
  "repo": "devenv-nixpkgs",
112
- "rev": "207a4cb0e1253c7658c6736becc6eb9cace1f25f",
112
+ "rev": "dcf61356c3ab25f1362b4a4428a6d871e84f1d1d",
113
113
  "type": "github"
114
114
  },
115
115
  "original": {
@@ -128,10 +128,10 @@
128
128
  ]
129
129
  },
130
130
  "locked": {
131
- "lastModified": 1759902829,
131
+ "lastModified": 1765345660,
132
132
  "owner": "bobvanderlinden",
133
133
  "repo": "nixpkgs-ruby",
134
- "rev": "5fba6c022a63f1e76dee4da71edddad8959f088a",
134
+ "rev": "35e7b0919db2859f4022d1aa00b9c01253be1bce",
135
135
  "type": "github"
136
136
  },
137
137
  "original": {
data/devenv.nix CHANGED
@@ -7,7 +7,9 @@
7
7
  bundler.enable = false;
8
8
  };
9
9
 
10
- pre-commit.hooks = {
10
+ git-hooks.hooks = {
11
11
  conform.enable = true;
12
12
  };
13
+
14
+ packages = with pkgs; [ git-cliff ];
13
15
  }
@@ -13,8 +13,9 @@ module GtfsDf
13
13
  # TODO: use `infer_schema: false` instead of `infer_schema_length` after polars release:
14
14
  # https://github.com/ankane/ruby-polars/blob/master/CHANGELOG.md#100-unreleased
15
15
  df = Polars.read_csv(input, infer_schema_length: 0)
16
- dtypes = self.class::SCHEMA.slice(*df.columns)
16
+ .rename(->(col) { col.strip })
17
17
 
18
+ dtypes = self.class::SCHEMA.slice(*df.columns)
18
19
  df
19
20
  .with_columns(dtypes.keys.map do |col|
20
21
  stripped = Polars.col(col).str.strip
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GtfsDf
4
- VERSION = "0.6.0"
4
+ VERSION = "0.6.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.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Mejorado
@@ -71,6 +71,7 @@ files:
71
71
  - LICENSE.txt
72
72
  - README.md
73
73
  - Rakefile
74
+ - cliff.toml
74
75
  - devenv.lock
75
76
  - devenv.nix
76
77
  - devenv.yaml