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

[Delivers #158623810] Challenge 2 completed and hosted on heroku #3

Merged
merged 90 commits into from
Jun 28, 2018

Conversation

JoshuaOndieki
Copy link
Owner

@JoshuaOndieki JoshuaOndieki commented Jun 26, 2018

What does this PR do?
Completes challenge 2 with working endpoints.

Description of Task to be completed
Add working and tested endpoints as required in challenge 2.

Endpoints created and tested?

EndPoint Functionality
POST /api/v1/rides Creates a new ride
GET /api/v1/rides Fetches all available rides
GET /api/v1/rides/<rideId> Fetches a single ride
POST /api/v1/auth/rides/<rideId>/requests Creates a ride request

Tasks achieved in this PR

  • Endpoint for creating rides
  • Endpoint for fetching all rides
  • Endpoint for fetching a single ride
  • Endpoint for creating ride requests

How should this be manually tested?

  • Clone this repo using git clone https://github.com/JoshuaOndieki/ridemyway-api.git
  • Check the ReadMe for instructions on setting up the project.
  • git checkout develop
  • Run nosetests --with-coverage --cover-package=ridemyway to see the tests pass and coverage

Background Context?
My approach assumes no users and therefore rides can be created and requests made without user interaction.

Resources & Libs
This Pivotal Tracker board was used to plan and manage the tasks.

rename  test_does_not_fetch_single_ride_that_does_not_exist to test_does_not_fetch_ride_that_does_not_exist
[Finishes #158592619]
[Finishes #158592679]
…7497

[Chore #158607497] Setup flask restful
@codeclimate
Copy link

codeclimate bot commented Jun 26, 2018

Code Climate has analyzed commit a21ef67 and detected 0 issues on this pull request.

View more on Code Climate.

Repository owner deleted a comment Jun 28, 2018
Repository owner deleted a comment Jun 28, 2018
Repository owner deleted a comment Jun 28, 2018
Repository owner deleted a comment Jun 28, 2018
@coveralls
Copy link

Pull Request Test Coverage Report for Build 102

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+23.1%) to 95.327%

Totals Coverage Status
Change from base Build 1: 23.1%
Covered Lines: 306
Relevant Lines: 321

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 28, 2018

Pull Request Test Coverage Report for Build 121

  • 282 of 295 (95.59%) changed or added relevant lines in 14 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+23.6%) to 95.793%

Changes Missing Coverage Covered Lines Changed/Added Lines %
ridemyway/tests/test_ride_request.py 20 21 95.24%
ridemyway/controllers/ride_controller.py 39 40 97.5%
ridemyway/tests/test_fetch_rides.py 29 30 96.67%
ridemyway/tests/test_create_ride.py 36 37 97.3%
ridemyway/init.py 5 7 71.43%
ridemyway/resources.py 40 43 93.02%
ridemyway/controllers/ride_request_controller.py 16 20 80.0%
Totals Coverage Status
Change from base Build 1: 23.6%
Covered Lines: 296
Relevant Lines: 309

💛 - Coveralls

from .response import Response


def create_ride(**kwargs):
Copy link

Choose a reason for hiding this comment

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

Function create_ride has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.

Controls all CRUD operations of the Request object.
"""

def create_request(self, **kwargs):
Copy link

Choose a reason for hiding this comment

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

Function create_request has 27 lines of code (exceeds 25 allowed). Consider refactoring.

Repository owner deleted a comment Jun 28, 2018
Repository owner deleted a comment Jun 28, 2018
Repository owner deleted a comment Jun 28, 2018
Repository owner deleted a comment Jun 28, 2018
Repository owner deleted a comment Jun 28, 2018
Repository owner deleted a comment Jun 28, 2018
Controls all CRUD operations of the Request object.
"""

def create_request(self, **kwargs):
Copy link

Choose a reason for hiding this comment

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

Function create_request has 26 lines of code (exceeds 25 allowed). Consider refactoring.

@xcixor
Copy link

xcixor commented Jun 28, 2018

Good job

@JoshuaOndieki JoshuaOndieki merged commit b7fa821 into master Jun 28, 2018
@JoshuaOndieki JoshuaOndieki changed the title [Delivers #158623810] Challenge 2 completed and hosted on heroku [WIP] [Delivers #158623810] Challenge 2 completed and hosted on heroku Jul 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deploying These changes are going to be deployed and therefore need attention Feedback Wanted Requesting for feedback from peers and the Github community at large
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants