fabi321 / dvblive

Python-Wrapper for TRIAS
1 stars 0 forks source link

Missing instructions on how to use this repository #1

Open 1Maxnet1 opened 2 years ago

1Maxnet1 commented 2 years ago

Hi,

found your repo, as I was interested in communicating with a TRIAS-API in python. I wanted to give it a try, but wasn't able to figure out, how to properly use it. Could you add some information on how to use this repo to the Readme? I would be interested to contribute as well.

Best regards

fabi321 commented 2 years ago

It was never intended to be used for any other api other than the one from the VVO. If you want to, you can configure the url in Classes/Utilities/request.py:url. Running it is possible by running main.py. However this is running really slow, even with my efforts to parallelize it. Maintaining this is a mess due to me trying to do it in parallel.

fabi321 commented 2 years ago

Python is just not an ideal language for processing large amounts of data within python. https://github.com/fabi321/pytrias/commit/61ece37c85c232d26eb2844ff4e72e9284de57ab is the latest commit before the ZODB infection of the codebase, that tried to do parallel processing, without any effect. If you want to go on, I recommend to build up on this commit.

1Maxnet1 commented 2 years ago

Thanks for the fast reply. I will have a closer look. Do I understand it right, that from your side there are no ambitions to further develop or maintain it?

fabi321 commented 2 years ago

Not really. It has been tailored to a very specific use case: collect stations and delay data and put it int an json file. It was never intended to be a general python api. I don't really have any ambitions on mainaining it, however I'm open to help you on getting your own library on track.

fabi321 commented 2 years ago

Adding insult to injury, the actual data extraction in this project is based on xpaths for specific problems. So there is no simple way of transforming it into an general use python api

fabi321 commented 2 years ago

I gave the idea of building a new library a second thought, and while still not really having a general picture of how such a library could look like, I'm certainly interested in either helping to do it or eventually even doing it myself. I also came to the conclusion, that python is not the ideal language for doing the heavy lifting, and i thus lean towards building it as a dual language library, with rust (my second language of choice) doing the actual work, and a python wrapper around it.

1Maxnet1 commented 2 years ago

I saw you created a new repository for the dual-language setup, which seems interesting to me. Sadly I don't have any prior knowledge in Rust and therefore can't help you on that part, without the need to learn Rust before.

1Maxnet1 commented 2 years ago

Hi, just wanted to let you know, that I now started some development of a pure python based implementation of a trias- library. The source code can be found here: https://gitlab.com/motis-datagon/trias-py . If you have any feedback or want to contribute you are welcome to do so.

Regarding the original issue: You might want to mark this repository as archived, to show that development stopped and is continued in your other repository.