Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Navitia Costa Rica provider. #146

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jamescr
Copy link
Contributor

@jamescr jamescr commented Feb 21, 2017

The Navitia server running is a locally installed version. This provider shares data from the Costa Rica Inter urban Train Network (Incofer Tren Urbano) and hopefully will be added to Transport soon. :-)

*/
public class CostaRicaProviderLiveTest extends AbstractNavitiaProviderLiveTest {
public CostaRicaProviderLiveTest() {
super(new CostaRicaProvider(secretProperty("navitia.authorization")));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If your server requires authorization (does it?), it is probably different from the one of the official navitia server, right? So in that case this should probably use a different secret variable here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This server does not require authorization and I don't think will be massively used. I think I could change the code, from "navitia.authorization" to null.

Also given that the server is administrated by a public university, no one disagree to keep it without authorization. Do you recommend to add the authorization?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally don't like API secrets embedded in the source code. They are not secure anyway and don't work well with reproducible free software.

However, my point here was that this code above will attempt to use the secret property from the official navitia server. So it should either be removed or changed. Since your server doesn't require authorization, I'd just remove it. The live tests continue to work then, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have removed it. Thanks.

The tests continue working without the secrets.

@jamescr
Copy link
Contributor Author

jamescr commented Aug 9, 2017

As testing feedback, I used this PR code to generate a public-transport-enabler library, that later i used to compile Transportr (v1.1.8).

Some screenshots of the app using the Costa Rica provider:

2017-08-09-08-56-43

2017-08-09-08-57-04

2017-08-09-08-57-18

2017-08-09-08-57-40

@grote
Copy link
Contributor

grote commented Sep 4, 2017

@jamescr do you have any students or other people using this regularly who can attest to the quality, so it can be included in PTE? If I understand correctly, such third-party attestations will help @schildbach whether to merge or not.

@Sufrostico
Copy link

I tested this apk version, And it's working pretty good

@grote grote mentioned this pull request Oct 16, 2017
@schildbach schildbach added enhancement navitia issue concerning AbstractNavitiaProvider, its implementations or the Navitia.io API labels Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement navitia issue concerning AbstractNavitiaProvider, its implementations or the Navitia.io API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants