-
Notifications
You must be signed in to change notification settings - Fork 7
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
Mock bustime server #30
Open
its-all-waves
wants to merge
11
commits into
codefornola:main
Choose a base branch
from
its-all-waves:mock-bustime-server
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Mock bustime server #30
its-all-waves
wants to merge
11
commits into
codefornola:main
from
its-all-waves:mock-bustime-server
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tions; add: DEV env var and DEV mode to main.go; - rename Config.Url to .BaseUrl as it was causing confusion in Scraper.fetch(), where we compute the complete url with params, etc - use the mock bustime server when in DEV mode in ./main.go - fix log typo in VehicleBroadcaster.Start()
…ar in Scraper.fetch()
…e nil repsonse error check to before nil response.Body check
its-all-waves
force-pushed
the
mock-bustime-server
branch
from
November 27, 2024 17:05
baa2d07
to
27faea6
Compare
vipyne
reviewed
Nov 28, 2024
vipyne
reviewed
Nov 28, 2024
vipyne
reviewed
Nov 28, 2024
vipyne
reviewed
Nov 28, 2024
…'; remove: log 'Scraper' response; change: run in dev mode with 'make dev' (no more '...DEV=1'; remove: unused vars from Makefile
vipyne
reviewed
Nov 28, 2024
vipyne
reviewed
Nov 28, 2024
… mock server log more explicit
its-all-waves
force-pushed
the
mock-bustime-server
branch
from
November 30, 2024 14:56
c86485c
to
a5fa848
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Mock Bustime Server
Address issue #29.
With the addition of a mock server to provide vehicle data, the API key is no longer needed for development, making contributing possible for many more people.
Changes
Config.Url
to.BaseUrl
as it was causing confusion inScraper.fetch()
, where we compute the complete URL with query params.VehicleBroadcaster.Start()
Scraper.fetch()
Bug
There is a bug, which I imagine affects the production version, as well. Currently, if the mock server is killed, the main server panics. I will make a separate PR for this once this one is accepted. EDIT: This has been fixed in another branch. Awaiting acceptance of this PR.
Future Improvements
It might be cool to have the mock server cycle through several different responses so we can see vehicle movement on the frontend in dev mode. Currently, vehicles appear stationary.
Thanks @vipyne for pairing up with me on this! Thanks @codingMustache for the mock data!