gtfs_df 0.6.0 → 0.6.2
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 +4 -4
- data/CHANGELOG.md +120 -32
- data/README.md +2 -0
- data/cliff.toml +92 -0
- data/devenv.lock +14 -14
- data/devenv.nix +3 -1
- data/lib/gtfs_df/base_gtfs_table.rb +3 -2
- data/lib/gtfs_df/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d7fd255d96a4b0990822cfe16cbbbeaa958b6b05f0df9fe149442ace3731034b
|
|
4
|
+
data.tar.gz: 98d5d680a0c2dd8bcec10168d8cb08639c25b90a830bfb65f597aa229bd2fd5c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 72f6480afb171feffe387f02d069ee935e2373068099598b54789c6fe60982021a34d929b53e9509e0a478335f0a76fa2678cd2d71247e96a2c8394587f9f925
|
|
7
|
+
data.tar.gz: 4153e5271961917a7cff004795c239daea3c9b31069500b3c376295821d250ea5dd85fa848276a06a9881e544d14ffcd798371304eeb576a5c49042d0f615fc3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,59 +1,147 @@
|
|
|
1
|
-
## [0.6.
|
|
2
|
-
### Fixed
|
|
1
|
+
## [0.6.2] - 2025-12-15
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
### 🐛 Bug Fixes
|
|
4
|
+
|
|
5
|
+
- Permit non UTF-8 characters
|
|
6
|
+
## [0.6.1] - 2025-12-12
|
|
7
|
+
|
|
8
|
+
### 🐛 Bug Fixes
|
|
9
|
+
|
|
10
|
+
- Parse whitespace in column headers
|
|
11
|
+
|
|
12
|
+
### 📚 Documentation
|
|
13
|
+
|
|
14
|
+
- Badges
|
|
15
|
+
|
|
16
|
+
### ⚙️ Miscellaneous Tasks
|
|
17
|
+
|
|
18
|
+
- Update devenv
|
|
19
|
+
- Drop custom changelog parsing
|
|
20
|
+
- Bump version to 0.6.1
|
|
21
|
+
## [0.6.0] - 2025-12-10
|
|
22
|
+
|
|
23
|
+
### 🐛 Bug Fixes
|
|
24
|
+
|
|
25
|
+
- Visit nodes multiple times
|
|
26
|
+
|
|
27
|
+
### ⚙️ Miscellaneous Tasks
|
|
28
|
+
|
|
29
|
+
- Bump version to 0.6.0
|
|
5
30
|
## [0.5.0] - 2025-12-08
|
|
6
31
|
|
|
7
|
-
###
|
|
32
|
+
### 🚀 Features
|
|
8
33
|
|
|
9
|
-
-
|
|
34
|
+
- [**breaking**] Add Feed#filter filter_only_children param
|
|
10
35
|
|
|
11
|
-
###
|
|
36
|
+
### ⚙️ Miscellaneous Tasks
|
|
12
37
|
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
38
|
+
- Arrange edges so parent is always first
|
|
39
|
+
- Build directed graph
|
|
40
|
+
- Allow ! in commit messages
|
|
41
|
+
- Bump version to 0.5.0
|
|
16
42
|
## [0.4.1] - 2025-12-05
|
|
17
43
|
|
|
18
|
-
###
|
|
44
|
+
### 🚀 Features
|
|
19
45
|
|
|
20
|
-
-
|
|
46
|
+
- Handle extra whitespace in csvs
|
|
21
47
|
|
|
22
|
-
###
|
|
48
|
+
### ⚙️ Miscellaneous Tasks
|
|
23
49
|
|
|
24
|
-
-
|
|
50
|
+
- Remove unreleased section
|
|
51
|
+
- Remove unused initializer format
|
|
52
|
+
- Bump version to 0.4.1
|
|
25
53
|
## [0.4.0] - 2025-12-04
|
|
26
54
|
|
|
27
|
-
###
|
|
55
|
+
### 🚀 Features
|
|
28
56
|
|
|
29
|
-
-
|
|
57
|
+
- Allow setting maintain_trip_dependencies=false
|
|
30
58
|
|
|
31
|
-
###
|
|
59
|
+
### 🐛 Bug Fixes
|
|
32
60
|
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
61
|
+
- Parse stop_lat as float
|
|
62
|
+
- Add missing agency -> fare_attributes edge
|
|
63
|
+
- Allow null for fare_rules
|
|
36
64
|
|
|
37
|
-
###
|
|
38
|
-
|
|
39
|
-
- provide accessor for gtfs_files (utility)
|
|
40
|
-
- add yard docs
|
|
65
|
+
### ⚙️ Miscellaneous Tasks
|
|
41
66
|
|
|
67
|
+
- Provide accessor for gtfs_files (utility)
|
|
68
|
+
- Add yard docs
|
|
69
|
+
- Bump version to 0.4.0
|
|
42
70
|
## [0.3.0] - 2025-12-04
|
|
43
71
|
|
|
44
|
-
###
|
|
72
|
+
### 🚀 Features
|
|
73
|
+
|
|
74
|
+
- Keep parent stations linked to used stops
|
|
75
|
+
|
|
76
|
+
### 🐛 Bug Fixes
|
|
77
|
+
|
|
78
|
+
- Handle null values
|
|
79
|
+
- Update lock on version bump
|
|
80
|
+
|
|
81
|
+
### ⚙️ Miscellaneous Tasks
|
|
82
|
+
|
|
83
|
+
- Reuse load_from_dir logic in reader
|
|
84
|
+
- Clean up unused method + better comments
|
|
85
|
+
- Autopublish on release tag push
|
|
86
|
+
- Automate release script
|
|
87
|
+
- Release tag script
|
|
88
|
+
- Bump version to 0.3.0
|
|
89
|
+
## [0.2.0] - 2025-12-01
|
|
90
|
+
|
|
91
|
+
### 🚀 Features
|
|
92
|
+
|
|
93
|
+
- Add Reader.load_from_dir
|
|
94
|
+
|
|
95
|
+
### 🐛 Bug Fixes
|
|
96
|
+
|
|
97
|
+
- Require correct entrypoint
|
|
98
|
+
- Cascade empty view filters
|
|
99
|
+
- Handle parsing when cols size = schema size
|
|
100
|
+
- Parse extraneous columns as strings
|
|
101
|
+
- Cascade changes reliably
|
|
102
|
+
- Filter with trips as atomic unit
|
|
103
|
+
- Remove nonexistent booking_rule association
|
|
104
|
+
- Add empty string to null vals
|
|
105
|
+
|
|
106
|
+
### 📚 Documentation
|
|
107
|
+
|
|
108
|
+
- Include processing time
|
|
109
|
+
- Update gem name
|
|
110
|
+
|
|
111
|
+
### ⚙️ Miscellaneous Tasks
|
|
112
|
+
|
|
113
|
+
- Add byebug gem
|
|
114
|
+
- Include byebug in spec_helper.rb
|
|
115
|
+
- Rearrange filter specs
|
|
116
|
+
- Add pending specs for expected behaviors
|
|
117
|
+
- [**breaking**] Removes duplicate load_from_dir method (use reader instead)
|
|
118
|
+
- Mutate for both filter! and prune!
|
|
119
|
+
- Tag version 0.2.0
|
|
120
|
+
## [0.1.1] - 2025-11-12
|
|
121
|
+
|
|
122
|
+
### 🐛 Bug Fixes
|
|
123
|
+
|
|
124
|
+
- Release workflow
|
|
45
125
|
|
|
46
|
-
|
|
126
|
+
### ⚙️ Miscellaneous Tasks
|
|
47
127
|
|
|
48
|
-
|
|
128
|
+
- Rename namespace to follow ruby conventions
|
|
129
|
+
- Bump version
|
|
130
|
+
- Remove broken release flow
|
|
131
|
+
- Clarify gem status
|
|
132
|
+
- Republish version
|
|
133
|
+
## [0.1.0] - 2025-11-12
|
|
49
134
|
|
|
50
|
-
|
|
51
|
-
- update lock on version bump
|
|
135
|
+
### 📚 Documentation
|
|
52
136
|
|
|
53
|
-
|
|
137
|
+
- Readme and gemspec details
|
|
138
|
+
- Time parsing to-do
|
|
54
139
|
|
|
55
|
-
|
|
56
|
-
- clean up unused method + better comments
|
|
57
|
-
## [0.1.0] - 2025-11-10
|
|
140
|
+
### ⚙️ Miscellaneous Tasks
|
|
58
141
|
|
|
142
|
+
- Initial commit
|
|
143
|
+
- Make the lock platform agnostic
|
|
144
|
+
- Validate commit messages
|
|
145
|
+
- Run spec and standard steps separately
|
|
146
|
+
- Release flow
|
|
59
147
|
- Initial release
|
data/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# ruby-gtfs-df
|
|
2
2
|
|
|
3
|
+
[](https://github.com/davidmh/ruby-gtfs-df/actions/workflows/tests.yml) [](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":
|
|
6
|
+
"lastModified": 1765397744,
|
|
7
7
|
"owner": "cachix",
|
|
8
8
|
"repo": "devenv",
|
|
9
|
-
"rev": "
|
|
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":
|
|
22
|
+
"lastModified": 1765121682,
|
|
23
23
|
"owner": "edolstra",
|
|
24
24
|
"repo": "flake-compat",
|
|
25
|
-
"rev": "
|
|
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":
|
|
37
|
+
"lastModified": 1765121682,
|
|
38
38
|
"owner": "edolstra",
|
|
39
39
|
"repo": "flake-compat",
|
|
40
|
-
"rev": "
|
|
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":
|
|
75
|
+
"lastModified": 1765404074,
|
|
76
76
|
"owner": "cachix",
|
|
77
77
|
"repo": "git-hooks.nix",
|
|
78
|
-
"rev": "
|
|
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":
|
|
95
|
+
"lastModified": 1762808025,
|
|
96
96
|
"owner": "hercules-ci",
|
|
97
97
|
"repo": "gitignore.nix",
|
|
98
|
-
"rev": "
|
|
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":
|
|
109
|
+
"lastModified": 1764580874,
|
|
110
110
|
"owner": "cachix",
|
|
111
111
|
"repo": "devenv-nixpkgs",
|
|
112
|
-
"rev": "
|
|
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":
|
|
131
|
+
"lastModified": 1765345660,
|
|
132
132
|
"owner": "bobvanderlinden",
|
|
133
133
|
"repo": "nixpkgs-ruby",
|
|
134
|
-
"rev": "
|
|
134
|
+
"rev": "35e7b0919db2859f4022d1aa00b9c01253be1bce",
|
|
135
135
|
"type": "github"
|
|
136
136
|
},
|
|
137
137
|
"original": {
|
data/devenv.nix
CHANGED
|
@@ -12,9 +12,10 @@ module GtfsDf
|
|
|
12
12
|
elsif input.is_a?(String)
|
|
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
|
-
df = Polars.read_csv(input, infer_schema_length: 0)
|
|
16
|
-
|
|
15
|
+
df = Polars.read_csv(input, infer_schema_length: 0, encoding: "utf8-lossy")
|
|
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
|
data/lib/gtfs_df/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.6.2
|
|
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
|