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

Added support for PostGIS #5

Merged
merged 3 commits into from Dec 13, 2018
Merged

Added support for PostGIS #5

merged 3 commits into from Dec 13, 2018

Conversation

clintonb
Copy link
Member

@clintonb clintonb commented Dec 12, 2018

Based on #6 (Docker base image changes)

@r-b-g-b
Copy link
Collaborator

r-b-g-b commented Dec 12, 2018

This still gives me an error. From the docker logs:

woeip.app | django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried "gdal", "GDAL", "gdal2.2.0", "gdal2.1.0", "gdal2.0.0", "gdal1.11.0", "gdal1.10.0", "gdal1.9.0"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.

Perhaps this is why you went with #6 . I was thinking the same.

@clintonb
Copy link
Member Author

#6 is due to the increased build times and failures related to using an Alpine-based image.

@r-b-g-b
Copy link
Collaborator

r-b-g-b commented Dec 12, 2018

This works for me. I can at least follow the steps in the README to get the site running. Since there's not much there yet, all I tested was creating a super use and logging into the admin page, but that works. I say accept! Thanks @clintonb !

@r-b-g-b r-b-g-b self-requested a review December 12, 2018 07:13
Alpine builds break too frequently. While the image size may be smaller, the inconvenience is not worth the benefit.
@@ -20,7 +20,7 @@ docker.pull: ## Pull the Docker containers
docker-compose -f docker-compose.yml -f docker-compose.$*.yml restart

%.shell: ## Open a shell into the (local|production) app Docker container
docker-compose -f docker-compose.yml -f docker-compose.$*.yml exec app /bin/ash
docker-compose -f docker-compose.yml -f docker-compose.$*.yml exec app /bin/bash
Copy link
Member Author

Choose a reason for hiding this comment

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

I've moved this to #6.

@r-b-g-b
Copy link
Collaborator

r-b-g-b commented Dec 13, 2018

Failing the test for make quality.

ERROR: /home/robert/projects/woeip/woeip/apps/core/admin.py Imports are incorrectly sorted.

isort, as I just learned, checks the order of python imports (dannnng, I'm into it tho). What's the preferred way to settle this? Manually run isort on the code and commit whatever changes it makes?

@r-b-g-b
Copy link
Collaborator

r-b-g-b commented Dec 13, 2018

Huh, it still failed. Strangely runningthe same version of isort==4.3.4 from host machine and in the docker container leads to different suggestions. Even same hashes in Pipfile.lock. There doesn't appear to be an .isort.cfg file in either, so no chance to differ there. I'll keep looking into it.

@clintonb
Copy link
Member Author

There is no issue with the imports. Your commit breaks the import sortings. The issues with the build are related to memory usage, hence exit code 137.

@TangoYankee TangoYankee merged commit bd1e613 into master Dec 13, 2018
@clintonb
Copy link
Member Author

The team can proceed with developing. This change should not hold anyone back from basic model creation. I can’t dig into this later this evening.

@clintonb
Copy link
Member Author

And...@TangoYankee just broke the build by merging this.

@clintonb
Copy link
Member Author

Please don’t merge if the build is broken. The purpose of the CI build is to block bad code from landing on master.

@clintonb
Copy link
Member Author

@TangoYankee please open a PR to revert commit cf91d49

@r-b-g-b
Copy link
Collaborator

r-b-g-b commented Dec 13, 2018

Sorry should have checked before committing. How do you know how to interpret that 137 exit code?

@clintonb
Copy link
Member Author

@r-b-g-b https://travis-ci.org/openoakland/woeip/builds/466868706#L917

I searched on Google for error code 137.

@clintonb clintonb deleted the clintonb/postgis branch December 13, 2018 06:02
TangoYankee added a commit that referenced this pull request Dec 13, 2018
This reverts commit bd1e613, reversing
changes made to 68b04f8.
TangoYankee added a commit that referenced this pull request Dec 13, 2018
Revert "Merge pull request #5 from openoakland/clintonb/postgis"
@clintonb clintonb mentioned this pull request Dec 13, 2018
TangoYankee added a commit that referenced this pull request Jul 4, 2019
* BUG: local setup used postgres, switch to mdillon/postgis

* MAINT: Alphabetize docker-compose elements

* Updated Travis scripts

- We now pull images prior to building. This helps avoid wasting time completely rebuilding the app container.
- Added test to ensure migrations have been generated, and run properly.
- We wait for the database to become available before running Django management commands

* WIP: Add database to the app (#11)

* Database schema added to models.py + admin interface
* Added factories for testing

And many others

* Add S3 storage

* Added env vars to prod docker-compose, made s3 storage optional

* add migration

* Update how storage settings are handled by default

* Added joiner scripts

* Update requirements

* Tests dustrak joiner, load dustrak accepts file handles

* Tests for dustrak joiner functionality, add timezones to factories

* Added test data files for dustrak joiner

* Use pytest fixtures to avoid code duplication

* address pylint W0621, remove extra save, test database save on values

* edit test_save docstring

* remove pytest fixture. remove suppression of pylint warnings (#18)

* Basic session upload form with user login

* Upload joins air and GPS files and saves Data entries

* Docstring to upload view

* Informative error message when dustrak of GPS file cannot be parsed

* Refactor dustrak load and join functions (#22)

Loaders take file contents as inputs, joiner takes pandas DataFrames

* Added choices attribute to unit field under sensor

* Added changes mentioned in PR such as the correct formats and micrograms charset

* Fixed migration issue and changed micro to non pep-8 form

* Fixed u error

* Fixed quality errors

* Fixed whitespace error

* refractor r-b-g-b/upload-form

* light linting

* Added lat/lon to unit_choices dropdown

* Fixed quality error

* replace files with upload

* Changed dropdown latitude/longitude to latlong

* Changed latitude/longitude to latlong

* Added migration file

* Changed latitude/longitude

* Added migrations

* general package update

* R b g b/schema rework (#26)

* Reset migrations, edit model and factory
* Reflect schema changes in tests
* Use faker to make latlong, test factories
* Removed unused DataFactory

* rebase and reorder imports

* TODOs from linting messages and a code review

* additional TODO messages, for forms and views

* light edits to comments and implement @login_required

* Removed unneeded error messages and redundant redirects in views. Included model calls in try-catch. Suggested removal of hardcoding sensor values.

* Use current versions of dustrak and gps loaders in upload view

* test_dustrak should simulate binary file re-encoded as utf-8

* Remove unused imports

* Remove one more

* remove todos and place them in github issues

* make database errors in views more specific

* address code review

* add a user input for timezone. pass to view

* add i18n to handle language code

* combine form classes into one. add logging line

* exit code earlier. narrow which errors are caught

* Update issue templates

Create issues templates

* Added hints to help with local file logging

* Added numpy to Pipfile

* contributing documents (#60)

* contributing documents

* remove contributing frontmatter

* links

fix hyperlinks

* resolve concerns from code review

* rename custom to app (#73)

* Updated text under Organizations and Project Description. (#72)

* correct import of Foundation 6 CDN (#75)

* Using latest version of Debian as Docker base

Jessie is EOL. Rather than pinning to a specific version of Debian, we will use the latest version. None of our code is OS-dependent, so this should not be an issue.

Fixes #77

* Updated the Issues section of the contribution.md.

* Navigation Bar (#80)

* correct import of Foundation 6 CDN

* create a responsive navigation bar

* add custom styling to navigation bar

* enlarge nav font

* remove commented code

* navigation bar

* Organize technical docs (#82)

* Swap email contact. Add testing to workflow (#86)

* Issues #83 and #84. Swap email contact. Add testing to feature request template and contributing.md

* remove errant carrot from email address in contrib

* redirect index url to upload page (#85)

* redirect index url to upload page

* give upload page the root url. delete template and url for index page

* delete index view

* Signin page styling (#87)

* localize button styling to top bar, customize proportions and colors of sign in form

* refactor to foundation grid. add toggle password

* Ty/minimum custom styling (#93)

* remove most custom styling. adjust header tags for accessibility. Adjust grid of signin page

* adjust password labels

* fix navigation header typo

* Password management: reset and change (#100)

* localize button styling to top bar, customize proportions and colors of sign in form

* refactor to foundation grid. add toggle password

* Ty/minimum custom styling (#93)

* remove most custom styling. adjust header tags for accessibility. Adjust grid of signin page

* adjust password labels

* fix navigation header typo

* change login form label from "username" to "password"

* link and style templates to change and reset user passwords

* hard code localhost in email. make contractions full words

* consistent nav capitalization

* Added visual style guide link.

* Copy changes

Readme copy changes to spotlight contributing options per #105; contributing.md copy changes to simplify and clarify per #105, and make headers consistently sentence case.

* Added Python 3.0 clarification

Ibid.

* Use markdown for readme formatting

* Bump django from 2.1.7 to 2.1.9 (#110)

Bumps [django](https://github.com/django/django) from 2.1.7 to 2.1.9.
- [Release notes](https://github.com/django/django/releases)
- [Commits](django/django@2.1.7...2.1.9)

Signed-off-by: dependabot[bot] <support@github.com>

* Upload files to database, no drag and drop (#109)

* one field for each type of file

* modify database

* separate the upload of csv and gps data. modify views and database accordingly

* documenting, linting, testing

* changes from code review (#111)

* create mulitple returns from view, disable no-else-return (#112)

* update pipfile to new django version

* Update contributing.md

* Delete settings.json

* Update contributing.md
@exchrotek exchrotek mentioned this pull request Mar 2, 2022
6 tasks
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.

None yet

3 participants