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

Lebovits/fix backend issues #708

Merged
merged 10 commits into from
Jul 18, 2024
Merged

Lebovits/fix backend issues #708

merged 10 commits into from
Jul 18, 2024

Conversation

nlebovits
Copy link
Collaborator

No description provided.

Copy link

vercel bot commented Jun 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vacant-lots-proj ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 18, 2024 7:23am

@zigouras
Copy link
Collaborator

@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.

Copy link
Collaborator

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.

Copy link
Collaborator

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?

#### PostgreSQL
```sh
POSTGRES_PASSWORD=a-strong-password-here
VACANT_LOTS_DB=postgresql://postgres:${POSTGRES_PASSWORD}@localhost/vacantlotdb
Copy link
Collaborator

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


```sh
POSTGRES_PASSWORD=a-strong-password-here
VACANT_LOTS_DB=postgresql://postgres:${POSTGRES_PASSWORD}@localhost/vacantlotdb
Copy link
Collaborator

Choose a reason for hiding this comment

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

add port here too

Copy link
Collaborator

@zigouras zigouras left a 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.
Copy link
Collaborator

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.


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.
Copy link
Collaborator

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.
Copy link
Collaborator

Choose a reason for hiding this comment

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

keep this section.


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
Copy link
Collaborator

@zigouras zigouras Jul 17, 2024

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.

2. When this has finished, also run:

```sh
docker-compose build postgres
Copy link
Collaborator

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
Copy link
Collaborator

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.

@@ -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"
Copy link
Collaborator

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.

@CodeWritingCow CodeWritingCow added documentation Improvements or additions to documentation backend merge conflict labels Jul 18, 2024
@CodeWritingCow
Copy link
Collaborator

@nlebovits PR has merge conflicts with a couple files. Can you resolve them? Thanks!

@nlebovits nlebovits merged commit 53eadf8 into staging Jul 18, 2024
2 of 3 checks passed
nlebovits added a commit that referenced this pull request Jul 18, 2024
* 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]>
@nlebovits nlebovits deleted the lebovits/fix-backend-issues branch July 18, 2024 07:29
nlebovits added a commit that referenced this pull request Jul 18, 2024
* 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]>
nlebovits added a commit that referenced this pull request Jul 18, 2024
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend documentation Improvements or additions to documentation merge conflict
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants