Code Monkey home page Code Monkey logo

sweater_weather's Issues

Story 2 Refactor

Check and refactor:

  • that rubrics are met
  • test completion
  • code quality
  • sad path where needed

  • email already in use

Roadtrip Request Sad Path

Blank destination and blank origin tests are passing with correct http message but they are not working in postman.

  • Fix sad path origin blank
  • Fix sad path destination blank

Sad path for impossible trips

If we attempt to the the trip duration for a destination overseas we should get trip not possible by car.

  • Add sad path for trips that are not possible.

example: origin: 'New York, NY', destination: 'London, UK'

API endpoints with screenshots

List the endpoints with text code sample - like in the instructions - with succinct description:

  • Forecast
  • Background Image
  • User Registration
  • User Login
  • Road trip

User registration

Create

  • Users request spec
  • Users routes
  • Users controller
    • Users create
      • Create user
      • Render json
        • json body
        • status 201
  • User database
  • Registration serializer

Story 1a Refactor

Check and refactor:

  • that rubrics are met
  • test completion
  • code quality
  • sad path where needed

Specifications

Display specs in more detail.
What ruby and rails version, what gems. Add brief tag next to each gem to say what the gem does - short sentence. what APIs did I use.

  • Ruby, Rails version
  • Gems list
    • gems have succinct description.
  • APIs list.
    • titles are links to the apis developers' page

Story 3 Refactor

Check and refactor:

  • that rubrics are met
  • test completion
  • code quality
  • sad path where needed

Road trip facade

The facade will run:

  • MapService.get_route(origin, destination) to get the trip duration
  • Calculate ETA (estimated time of arrival) using Time.now as starting point (self.find_eta)
  • MapService.get_coordinates(location) to get the coordinates to obtain the weather at ETA
  • Create new instance of RoadTrip with trip_data
    @user.roadtrips.create(origin: route.origin, destination: route.destination, duration: route.duration, temperature: destination_weather.temp, description: destination_weather.description)

User Login

Story 3

User Login

  • A successful request returns the user’s api key.
  • An unsuccessful request returns an appropriate 400-level status code and body with a description of why the request wasn’t successful
    Potential reasons a request would fail:
    • credentials are bad
    • empty field

Request:

$ POST /api/v1/sessions
Content-Type: application/json
Accept: application/json

{
  "email": "[email protected]",
  "password": "password"
}

Upgrade image querying capabilities

Upgrade image querying to include other params to have a more specific picture

  • Can query for 'morning', 'afternoon', 'evening'
  • Can query for things like 'skyline', 'parks', etc

Note:
Nov/13/2020. Most apis I find return a lot of bad images that wouldn't be relevant to query.
For example 'denver evening snow' gets me a chicago picture, or someone swimming butterfly...

Story 4 Refactor

Check and refactor:

  • that rubrics are met
  • test completion
  • code quality
  • sad path where needed

Sad path for image querying

Add sad path for image querying. If no images are returned a json with a body message "no images available for this query' is returned along with the appropriate status (406? or 204?)

  • There is sad path for no image available
  • Tests updated for sad path.

Road trip routes and controller

Create road trip routes and controller

  • Create road_trip routes

  • Create road_trip_controller, action 'create'

    • create action happy path
    • create action sad path

Install Gems and configure

Gems

Install gems:

General

  • faraday
  • figaro
  • jsonapi-serializer
  • rack-cors

Development

Test

  • capybara
  • factory_bot_rails
  • faker
  • launchy
  • pry
  • rspec-rails. Configure.
  • simplecov. Configure.
  • shoulda-matchers. Configure.
  • webmock
  • vcr. Configure.

Development

  • rubocop. Configure.

Table of content

Create a table of content with links to each H2 heading

  • includes each heading
  • completed

1a. Retrieve weather for a city

Requirements:

  • Endpoint needs to use the city and state from the GET request’s query parameter and send it to MapQuest’s Geocoding API to retrieve the latitude and longitude for the city.

    • Use of the MapQuest’s Geocoding API is a hard requirement.
  • Retrieve forecast data from the OpenWeather One Call API using the latitude and longitude from MapQuest.

  • Testing should look for more than just the presence of attribute fields in the response.

    • Testing should also determine which fields should NOT be present. (don’t send unnecessary data)

Store city/state coordinates query to the database.

Create table 'locations'
city --> string
state --> string
lat --> numeric
lng --> numeric

When a query is made we check first whether the city/state combination exist in the database. If it does we use those coordinates. If it doesn't we get them making the api call to mapquest and then we create a new location object and save it to the database for future use.

Overview

Write overview to about the project

  • Explains what the app does.
  • Explains what learning objectives are
  • Reference to Turing's project instruction's and rubric.

1b. Background Image for the City

  • Implement a new API service to use the name of the city to get the URL of an appropriate background image.
  • Give picture credit if the provide it requires it.

Extension:

  • Determine the time of day and current weather and include that in your search; for example, searching for “denver evening snow” might return a far more interesting result

Create road_trip model and spec

  • Create model specs validations and relationships
    road_trip belongs to user, a user has_many road_trips
  • Create a road_trip model to store trip data in the database
    table road_trips
    rails g migration CreateRoadTrips user:references origin destination duration temperature description

Installation instructions

Explain how to fork, clone, basic installation including gems and how to run the tests.

  • Explanation on how to fork
  • Explanation on how to clone
  • Explanation on how to do the basic installation
    • rails db:{create,migrate}
    • Gemfile: Rspec -> rails generate rspec:install (config brief explanation? ref to docs?)
    • Gemfile: Figaro -> bundle exec figaro install (config brief explanation? ref to docs?)
    • Gemfile: All other gems
  • Explanation on how to run the tests

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.