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

Voi eScooter from raumobil API/Platform #17

Merged
merged 1 commit into from
Oct 6, 2023
Merged

Voi eScooter from raumobil API/Platform #17

merged 1 commit into from
Oct 6, 2023

Conversation

AbdullahiFatola
Copy link
Member

An Implementation of a new provider called VOI eScooter and the Data is available on raumobil GmbH API/Platform. Since the eScooters are free-floating and not station-based, the gbfs_transformer.py was modified aside the "BaseProvider" stated in the documentation.

Copy link
Collaborator

@hbruch hbruch left a comment

Choose a reason for hiding this comment

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

This PR would revert numerous changes in the main branch.

Did you start your developmet on the latest code version? If not, please rebase your changes to the current main branch and do a force push of branch voi-raumobil.

@AbdullahiFatola
Copy link
Member Author

This PR would revert numerous changes in the main branch.

Did you start your developmet on the latest code version? If not, please rebase your changes to the current main branch and do a force push of branch voi-raumobil.

Ok thanks, I will rebase the changes to the current main branch and repush to the voi-raumobil branch.

@AbdullahiFatola AbdullahiFatola force-pushed the voi-raumobil branch 3 times, most recently from 2e5fb42 to c0890dc Compare September 13, 2023 10:32
@AbdullahiFatola
Copy link
Member Author

This PR would revert numerous changes in the main branch.

Did you start your developmet on the latest code version? If not, please rebase your changes to the current main branch and do a force push of branch voi-raumobil.

The PR have now been rebased with the main branch and force-pushed back to voi-raumobil branch.

Copy link
Collaborator

@hbruch hbruch left a comment

Choose a reason for hiding this comment

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

I left some review comments which should be addressed before merging.

Before commiting, you should run

ruff --fix x2gbfs
black x2gbfs
 mypy x2gbfs

and fix remaining issues. I'll provide a Makefile and pre-commit hook in another PR, to have these validations run before commiting and assist in fixing them.

x2gbfs/gbfs/gbfs_transformer.py Outdated Show resolved Hide resolved
x2gbfs/gbfs/gbfs_transformer.py Outdated Show resolved Hide resolved
x2gbfs/providers/raumobil.py Outdated Show resolved Hide resolved
x2gbfs/providers/raumobil.py Outdated Show resolved Hide resolved
x2gbfs/providers/voi.py Outdated Show resolved Hide resolved
x2gbfs/providers/voi.py Outdated Show resolved Hide resolved
x2gbfs/x2gbfs.py Outdated Show resolved Hide resolved
x2gbfs/providers/voi.py Outdated Show resolved Hide resolved
x2gbfs/providers/voi.py Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@AbdullahiFatola AbdullahiFatola force-pushed the voi-raumobil branch 4 times, most recently from 0875239 to 5384e01 Compare September 15, 2023 11:11
@AbdullahiFatola
Copy link
Member Author

I left some review comments which should be addressed before merging.

Before commiting, you should run

ruff --fix x2gbfs
black x2gbfs
 mypy x2gbfs

and fix remaining issues. I'll provide a Makefile and pre-commit hook in another PR, to have these validations run before commiting and assist in fixing them.

Thank you. Base on your reviews, I have now amended the branch, validated the commits and pushed back to the branch, but mypy x2gbfs returns the follwing errors. How can this be resolved?

x2gbfs/x2gbfs/providers/voi.py:58: error: Item "None" of "Optional[Any]" has no attribute "get"
x2gbfs/x2gbfs/providers/voi.py:67: error: Item "None" of "Optional[Any]" has no attribute "get"
x2gbfs/x2gbfs/providers/voi.py:69: error: Item "None" of "Optional[Any]" has no attribute "get"
x2gbfs/x2gbfs/providers/voi.py:70: error: Item "None" of "Optional[Any]" has no attribute "get"
x2gbfs/x2gbfs/x2gbfs.py:9: error: Cannot find implementation or library stub for module named "decouple"
x2gbfs/x2gbfs/x2gbfs.py:9: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 5 errors in 2 files (checked 13 source files)

Copy link
Collaborator

@hbruch hbruch left a comment

Choose a reason for hiding this comment

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

Seems like the rebase did not work out well. This PR contains changess to a number of files which should not be affected.
Some linting issues should be fixed as well.

Dockerfile Outdated Show resolved Hide resolved
Copy link
Collaborator

@hbruch hbruch left a comment

Choose a reason for hiding this comment

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

I had a couple of remarks, that should be addressed.

I further suggest to wait with merging this PR, until credentials for the API are available and the provider can be tested against the real API.

config/voi-raumobil.json Show resolved Hide resolved
tests/gbfs/providers/voi_raumobil_mock.py Outdated Show resolved Hide resolved
x2gbfs/providers/voi_raumobil.py Outdated Show resolved Hide resolved
x2gbfs/providers/voi_raumobil.py Outdated Show resolved Hide resolved
x2gbfs/providers/voi_raumobil.py Outdated Show resolved Hide resolved
config/voi-raumobil.json Outdated Show resolved Hide resolved
config/voi-raumobil.json Outdated Show resolved Hide resolved
{
"feed_data": {
"system_information": {
"email": "[email protected]",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this should be voi's support email, not raumobil's.

Copy link
Member Author

Choose a reason for hiding this comment

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

Since we currently have no direct contact with VOI and do not know the support email, the email from raumobil was used pending the time we establish contact with VOI.
Raumobil also operates the API where we pull the data, or what do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be the contact email for users of the sharing service, not for feed integrators. https://www.voi.com/de/legal-notice/ provides a support email address which seems to be appropriate

x2gbfs/providers/voi_raumobil.py Outdated Show resolved Hide resolved
@AbdullahiFatola AbdullahiFatola force-pushed the voi-raumobil branch 2 times, most recently from 26fd8e9 to 4fee375 Compare September 25, 2023 08:28
@AbdullahiFatola
Copy link
Member Author

I had a couple of remarks, that should be addressed.

I further suggest to wait with merging this PR, until credentials for the API are available and the provider can be tested against the real API.

As already discussed in our meeting, the access credentials are available and have been tested with this PR.

@AbdullahiFatola AbdullahiFatola force-pushed the voi-raumobil branch 5 times, most recently from 51b9b7f to f7b3985 Compare September 29, 2023 14:23
"name": "voi scooter karlsruhe pricing plan",
"per_min_pricing": [
{
"interval": 60,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Spec says:

Interval in minutes at which the rate of this segment is either reapplied indefinitely, or up until (but not including) the end minute, if end is defined.

so interval should be 1

"currency": "EUR",
"description": "1 EURO + 0,22 EURO/Minute.",
"is_taxable": false,
"name": "voi scooter karlsruhe pricing plan",
Copy link
Collaborator

Choose a reason for hiding this comment

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

The pricing plan's name is potentially displayed. I suggest to label it in German, as feed language is specified i system_information as de.

Copy link
Collaborator

@hbruch hbruch left a comment

Choose a reason for hiding this comment

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

I suggest some final changes

@AbdullahiFatola
Copy link
Member Author

I suggest some final changes

The suggestions have now been implemented

@hbruch
Copy link
Collaborator

hbruch commented Oct 4, 2023

Could you rebase the branch on main, as it can't be merged due to conflicts

@AbdullahiFatola AbdullahiFatola force-pushed the voi-raumobil branch 2 times, most recently from 62fdd2d to 27bc53a Compare October 4, 2023 14:17
@AbdullahiFatola
Copy link
Member Author

Could you rebase the branch on main, as it can't be merged due to conflicts

It has now been rebased to main branch and it shows above "This branch has no conflicts with the base branch". I guess there is no more conflict.

Copy link
Collaborator

@hbruch hbruch left a comment

Choose a reason for hiding this comment

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

Thank you!

@hbruch hbruch merged commit eb5340d into main Oct 6, 2023
2 checks passed
@hbruch hbruch deleted the voi-raumobil branch October 30, 2023 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants