skinkie / reference

Personal repository where I collect working examples to understand inner workings while building PyNeTExConv
GNU Affero General Public License v3.0
1 stars 1 forks source link

blablacar gtfs missing calender after conversion #126

Open ue71603 opened 1 month ago

ue71603 commented 1 month ago

Is one part of the problems in https://github.com/skinkie/reference/issues/122 blablacar.zip

 {
    "block": "blablacar",
    "url":"",
    "description":"Blablacar data",
    "scripts": [
        {"script": "clean_tmp", "args": "%%dir%%"},
        {"script": "gtfs_import_to_db.py", "args": "./aux_test_input/blablacar.zip %%dir%%/gtfs-import.duckdb --log=%%log%% "},
        {"script": "gtfs_convert_to_db.py", "args": "--log=%%log%% %%dir%%/gtfs-import.duckdb %%dir%%/netex-import.duckdb"},
        {"script": "epip_db_to_db.py", "args": "--log=%%log%% %%dir%%/netex-import.duckdb %%dir%%/netex-database.duckdb"},
        {"script": "epip_db_to_xml.py", "args": "--log=%%log%% %%dir%%/netex-import.duckdb %%dir%%/netex-database.duckdb %%dir%%/%%block%%-netex.xml"},
        {"script": "aux_assertions.py", "args": "--log=%%log%% ./aux_test_input/blablacar-assertions.txt %%dir%%/%%block%%-netex.xml"},
        {"script": "aux_netex_stats.py", "args": "--log=%%log%% %%dir%%/%%block%%-netex.xml"},
        {"script": "netex_to_db.py", "args": "--log=%%log%% %%dir%%/%%block%%-netex.xml %%dir%%/netex-database.duckdb"},
        {"script": "netex_db_to_gtfs.py", "args": "--log=%%log%% %%dir%%/netex-database.duckdb %%dir%%/%%block%%-gtfs.zip"},
        {"script": "aux_gtfs_check.py", "args": "--log=%%log%% %%dir%%/%%block%%-gtfs.zip"},
        {"script": "gtfs_show_map.py", "args": "--log=%%log%% --limitation 100 %%dir%%/%%block%%-gtfs.zip %%dir%%/%%block%%-map.html"}
        ]
  },

the resulting gtfs does not contain. the two calender files. image

skinkie commented 1 month ago

My guestimate is that this is caused by not resolving DayType (since they are part under the ServiceCalendar). This should be resolved when 'embedded' will be able to redirect those queries towards the first class object hosting it. I think we could then practically go for an xpath query on the primary object and as a generator return the deserialised objects under it.

skinkie commented 1 month ago

@ue71603 this should be fixed.