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

Store points from service requests #79

Merged
merged 10 commits into from
Aug 20, 2018
Merged

Conversation

hampelm
Copy link
Contributor

@hampelm hampelm commented Aug 19, 2018

Progress on #75:

  • Adds PostGIS dependency
  • Add an indexed geometry column to service_requests
  • Parse and store the geometry when it exists

README.md Outdated

### Application Setup

1. Install ruby gem dependencies: `bundle install`
2. Create the databases and load schema and seeds: `bin/rails db:setup`
3. Run the tests: `bin/rspec`
4. Run the server: `bin/rails server`, and visit the web-browser: [`http://localhost:3000`](http://localhost:3000)
5. Load cities: `rake cities:load`
6. Load service requests: `rake cities:service_requests`
Copy link
Owner

Choose a reason for hiding this comment

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

These lines should be unnecessary when running db:setup so far as it will load cities and generate fake service requests. Perhaps the better improvement would be to make a section in the readme that differentiates between “developing with fake data” and “running it for reals”

@@ -19,6 +22,7 @@
'description' => description,
'status' => status,
'requested_datetime' => requested_datetime.iso8601,
'geometry' => geometry,
Copy link
Owner

Choose a reason for hiding this comment

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

The raw_data block should represent only what the Open311 api returns. This should be lat and lon. Then the subsequent test will be correct because it will test that
the raw_data setter assigns the geometry correctly.

Copy link
Owner

Choose a reason for hiding this comment

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

This still needs to be resolved so it matches what would come back from an open311 api endpoint. It should be instead:

raw_data do
  {
    # ...
    'lat' => lat,
    'long' => long,
  }
end

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah! I think I misunderstood how raw_data works. Hopefully good now.

@bensheldon bensheldon temporarily deployed to open311status-pr-79 August 20, 2018 16:29 Inactive
@bensheldon bensheldon temporarily deployed to open311status-pr-79 August 20, 2018 16:43 Inactive
@@ -20,3 +20,4 @@ staging:
production:
database: open311status_production
<<: *defaults
url: <%= ENV.fetch("DATABASE_URL", "").gsub(/postgres/, 'postgis') %>
Copy link
Owner

Choose a reason for hiding this comment

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

@bensheldon bensheldon merged commit 345723e into bensheldon:master Aug 20, 2018
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