-
Notifications
You must be signed in to change notification settings - Fork 65
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
Lebovits/fix backend issues #708
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@nlebovits it looks like you pushed a new Pipfile and Pipefile.lock into the data/ dir. Our normal files are in data/src and should remain unchanged. I think you can remove those files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these instructions are inaccurate and a repetition of what is in the rest of the document. I don't think the document is long enough to begin with to need a 'TLDR' section. Maybe you could use ChatGPT to generate a summary of this file, but as this new section stands now, I don't find it too useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HI @zigouras, can you point out which instructions might be inaccurate in this PR?
docs/SETUP/BACK_END.md
Outdated
#### PostgreSQL | ||
```sh | ||
POSTGRES_PASSWORD=a-strong-password-here | ||
VACANT_LOTS_DB=postgresql://postgres:${POSTGRES_PASSWORD}@localhost/vacantlotdb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be this for new port, see latest doc in staging
VACANT_LOTS_DB=postgresql://postgres:${POSTGRES_PASSWORD}@localhost:5433/vacantlotdb
docs/SETUP/BACK_END.md
Outdated
|
||
```sh | ||
POSTGRES_PASSWORD=a-strong-password-here | ||
VACANT_LOTS_DB=postgresql://postgres:${POSTGRES_PASSWORD}@localhost/vacantlotdb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add port here too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nissim I think this looks good except you need to add the new port 5433 to the example postgres urls, see my comments.
|
||
For Mac and Linux, you can permanently store the environmental variables in your command line shell's configuration file, e.g. `~/.bashrc`, `~/.bash_profile`, `~/.zshrc` or `~/.profile`. Add a line `export VAR_NAME=VALUE` in your file and run `source file` to read it in when newly created. Any new shells will automatically have the new environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section should be left in. It is convenient to have shell variables for some users.
docs/SETUP/BACK_END.md
Outdated
|
||
For Windows, you can set environmental variables under System -> Advanced or you can download a terminal emulator such as [Git Bash](https://gitforwindows.org/) and follow the instructions for Mac and Linux above. A terminal emulator is reccommended. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep this section.
|
||
All of your local environmental variables will be passed through to docker-compose so if you have them locally you should not have to hard-code them as indicated below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep this section.
docs/SETUP/BACK_END.md
Outdated
|
||
The python script loads the tiles to Google Cloud as `vacant_properties_tiles_staging.pmtiles`. You can check this tileset by changing the config setting on the frontend `useStagingTiles` to `true`. If the tiles look OK, manually change the name in Google Cloud to remove the `_staging` and archive the previous copy. | ||
|
||
#### Google Streetview | ||
|
||
To update streetview images, after running the full data script run: | ||
|
||
``` | ||
```sh | ||
docker-compose run streetview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change all mentions of docker-compose
to docker compose
since the former has been deprecated.
docs/SETUP/BACK_END.md
Outdated
2. When this has finished, also run: | ||
|
||
```sh | ||
docker-compose build postgres |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker compose build
should build all the containers, including postgres
but I understand your experience was different so I guess we can leave this in.
|
||
1. The first time you set up your backend, or any time either of the two Docker files change, build the Docker services by running: | ||
|
||
```sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good use of sh
formatting so they get the convenience of the copy button.
data/src/classes/diff_report.py
Outdated
@@ -48,7 +48,7 @@ def __init__(self, timestamp_string: str = None): | |||
""" | |||
self.diff_tables = self._list_diff_tables() | |||
self.timestamp_string = timestamp_string | |||
self.report: str = "The back-end data has been fully refreshed. Here is the diff report on " + len(self.diff_tables) + " key tables.\nLegend: table A = new data, table B = old data.\n\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this file. This change has already been included with another and merging will not be automatic.
@nlebovits PR has merge conflicts with a couple files. Can you resolve them? Thanks! |
* make rake icon white under drak mode * use default color theme * use ButtonText for street view icon * add dependabot yml to keep ghactions, npm. and pip dependencies up to date * get pr_checks_backend.yml working (#756) * Set up pr_checks_backend.yml to run black formatter * Also run flake8 linting * Check if main docker container builds correctly * Check if postgres container runs correctly * update vscode/settings.json to match formatting + linting * Lebovits/issu643 add frontend formatting check (#752) * add formatting + linting checks to front end workflows * have checks run on PRs to staging, not main * Lebovits/fix backend issues (#708) * Fix issue with pipfile creation in docker * Update + organize back end docs --------- Co-authored-by: klaus <[email protected]> Co-authored-by: Gary Pang <[email protected]>
* make rake icon white under drak mode * use default color theme * use ButtonText for street view icon * add dependabot yml to keep ghactions, npm. and pip dependencies up to date * get pr_checks_backend.yml working (#756) * Set up pr_checks_backend.yml to run black formatter * Also run flake8 linting * Check if main docker container builds correctly * Check if postgres container runs correctly * update vscode/settings.json to match formatting + linting * Lebovits/issu643 add frontend formatting check (#752) * add formatting + linting checks to front end workflows * have checks run on PRs to staging, not main * Lebovits/fix backend issues (#708) * Fix issue with pipfile creation in docker * Update + organize back end docs --------- Co-authored-by: klaus <[email protected]> Co-authored-by: Gary Pang <[email protected]>
* Merge staging to main (#760) * make rake icon white under drak mode * use default color theme * use ButtonText for street view icon * add dependabot yml to keep ghactions, npm. and pip dependencies up to date * get pr_checks_backend.yml working (#756) * Set up pr_checks_backend.yml to run black formatter * Also run flake8 linting * Check if main docker container builds correctly * Check if postgres container runs correctly * update vscode/settings.json to match formatting + linting * Lebovits/issu643 add frontend formatting check (#752) * add formatting + linting checks to front end workflows * have checks run on PRs to staging, not main * Lebovits/fix backend issues (#708) * Fix issue with pipfile creation in docker * Update + organize back end docs --------- Co-authored-by: klaus <[email protected]> Co-authored-by: Gary Pang <[email protected]> * Staging (#768) * make rake icon white under drak mode * use default color theme * use ButtonText for street view icon * add dependabot yml to keep ghactions, npm. and pip dependencies up to date * get pr_checks_backend.yml working (#756) * Set up pr_checks_backend.yml to run black formatter * Also run flake8 linting * Check if main docker container builds correctly * Check if postgres container runs correctly * update vscode/settings.json to match formatting + linting * Lebovits/issu643 add frontend formatting check (#752) * add formatting + linting checks to front end workflows * have checks run on PRs to staging, not main * Lebovits/fix backend issues (#708) * Fix issue with pipfile creation in docker * Update + organize back end docs --------- Co-authored-by: klaus <[email protected]> Co-authored-by: Gary Pang <[email protected]> * make rake icon white under drak mode * use default color theme --------- Co-authored-by: klaus <[email protected]> Co-authored-by: Gary Pang <[email protected]>
No description provided.