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

Support for Washington, DC #747

Closed
3 of 4 tasks
liamnorm opened this issue Apr 23, 2021 · 13 comments
Closed
3 of 4 tasks

Support for Washington, DC #747

liamnorm opened this issue Apr 23, 2021 · 13 comments
Assignees
Labels
coverage 🗺️ This is related to the geographic areas supported. enhancement 🏗️ A functional improvement.

Comments

@liamnorm
Copy link

liamnorm commented Apr 23, 2021

Acknowledgments
Please check the following boxes with an x if they apply:

  • The feature I want to propose would be useful for the majority of users, not only for me personally.
  • I am aware that Transportr is mostly developed by one person in their unpaid spare time.
  • If I want to add support for a new region or country, I checked that this is already available in public-transport-enabler and know the process described on the Transportr homepage.
  • I can help myself to get this feature implemented or know someone who wants to do it.

Is your feature request related to a problem? Please describe.
Support for Washington, DC isn't present.

Describe the solution you'd like
We'd like to connect the Navitia data for 'us-dc' to Transportr so that DC will be supported.
We'd like to figure out a way to set up a development environment where we can test additions we make.

Describe alternatives you've considered
We've made a fork of public-transport-enabler and attempted to mimic the process for adding other cities, but we are unsure of how to test these changes.

Additional context
Two other high school students and I are looking to add support for the Washington, DC area.
We are able to open this repo in Android Studio, but we are unsure how to connect the public-transport-enabler library so that we can test our changes.

@liamnorm liamnorm added the enhancement 🏗️ A functional improvement. label Apr 23, 2021
@jelkner
Copy link

jelkner commented Apr 30, 2021

Dear Transportr development team,

I am the teacher of the three very bright, highly motivated students who are working on this as their end of year project. They only have 7 weeks until graduation, at which point they will move on to other things in their lives. I am so hoping they will hear back from you before time runs out. It would be wonderful if we could get support for our DC metro region added to Transportr.

Jeff Elkner
Arlington Career Center
Arlington, Virginia

@grote
Copy link
Owner

grote commented Apr 30, 2021

@jelkner nice of you to step in here. Please note that people working on Transportr do so in their free time (which is usually rare) and receive no compensation from the Arlington Career Center.

@liamnorm you can replace the PTE library that Transportr uses with your own for testing. It is defined here: https://github.com/grote/Transportr/blob/90c1dd301e22207a17f86d617b1dca368a2ed21b/app/build.gradle
If it works all fine, you can submit it to the PTE staging project used by Transportr or directly to upstream.

@jelkner
Copy link

jelkner commented May 1, 2021

@grote I fully understand and greatly appreciate the volunteer nature of your work on this project, for which you have my deep gratitude. Sad that we don't live in a more democratic world in which the means of social reproduction could be used in the interest of people and the planet instead of mega profits for tech oligarchs. Oh well. It is true that I get paid as a teacher by the Arlington Career Center, but guiding students toward free software projects like Transportr is something I do as a volunteer on my own limited time too. I only assumed that since you have given so much labor of love to this project, you must care about its continued growth and impact. I thought that a little effort now would pay off, since I know from experience that the window of opportunity here will close if we don't grab hold of it. Thanks for your reply to @liamnorm!

@ialokim
Copy link
Collaborator

ialokim commented May 1, 2021

Wow, let's get philosophical here :D

Just a quick addition: If you already successfully tested the new provider inside your fork of the PTE library as described in it's readme (you will need a Navitia key for this), then feel free to proceed to submit a PR it to the PTE staging project and to upstream PTE. Until your changes are merged, you can replace the PTE library as pointed out by @grote and already prepare a PR similar to #644: You need to add the network in TransportNetworks.kt, strings (name/description) and a logo (both in svg and in android xml format).

@liamnorm
Copy link
Author

liamnorm commented May 5, 2021

I see that the PTE library is implemented here:

implementation('com.gitlab.opentransitmap:public-transport-enabler:af50a14c') {
...
}

So I made a fork of this library and substituted opentransitmap for liamn (my Gitlab username):

implementation('com.gitlab.liamn:public-transport-enabler:af50a14c') {
...
}

It all worked fine and I could run the app and access the library.
I made a commit with some changes I wanted to test by running the app (on main). I tried to change the hash code to my most recent commit to see my changes reflected.

implementation('com.gitlab.liamn:public-transport-enabler:327caa16') {
...
}

I got this:
Screen Shot 2021-05-05 at 3 10 05 PM

So, I'm wondering what the significance of that hash code is, and what I can do to make changes and see them reflected.

@ialokim
Copy link
Collaborator

ialokim commented May 5, 2021

The changes to build.gradle that you performed look good. We depend on jitpack.io to build the library for the use within Transportr. It seems the build fails for this commit - see https://gitlab.com/liamn/public-transport-enabler/-/jobs/1239270445.

You can view the build generated by jitpack for your repo over here: https://jitpack.io/#com.gitlab.liamn.public-transport-enabler/

@liamnorm
Copy link
Author

I have made changes to public-transport-enabler. The changes are in gitlab.com/liamn/public-transport-enabler on the washingtondc branch. Now, how do I get my changes to show up in the gitlab.com/opentransitmap/public-transport-enabler repo?

@ialokim
Copy link
Collaborator

ialokim commented May 12, 2021

Just open a merge request over there :)

@liamnorm
Copy link
Author

I made a merge request, @ialokim @grote, maybe you or someone you know could look at the request :) Thank you.
https://gitlab.com/opentransitmap/public-transport-enabler/-/merge_requests

@ialokim ialokim added the coverage 🗺️ This is related to the geographic areas supported. label May 21, 2021
@liamnorm
Copy link
Author

In the dependency verifications (witness.gradle), there is a line that reads:
'com.gitlab.opentransitmap:public-transport-enabler:af50a14c:public-transport-enabler-af50a14c.jar:d14f3ba2102650938b10d981d3a11465af25d11b7f6b8794a11504dfbde850dc',
which uses the hash of the commit af50a14c in the repo.

To use the version with DC, it would need to change to 35c48292.
'com.gitlab.opentransitmap:public-transport-enabler:35c48292:public-transport-enabler-35c48292.jar:XXXXXXXXXXXXXXXXXXX',

Here I'm using X's for filler. How do I know what goes in place of those X's?

@ialokim
Copy link
Collaborator

ialokim commented May 26, 2021

You can simply run ./update-dependency-pinning.sh after updating the library version in app/build.gradle (this works on Linux).

@liamnorm
Copy link
Author

liamnorm commented Jun 3, 2021

Great, I have just made a pull request. Thank you for all your help!

@ialokim
Copy link
Collaborator

ialokim commented Oct 7, 2023

Unfortunately, Navitia stopped serving data for Washington, DC. See #877 (comment)

@ialokim ialokim closed this as completed Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coverage 🗺️ This is related to the geographic areas supported. enhancement 🏗️ A functional improvement.
Projects
None yet
Development

No branches or pull requests

4 participants