Skip to content

Commit 94e7f38

Browse files
authored
Merge pull request #1172 from CodeForPhilly/staging
Weekly PR from Staging to Main
2 parents 413ca96 + b8cb94d commit 94e7f38

38 files changed

+817
-684
lines changed

.eslintrc.json

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ updates:
1818
directory: '/'
1919
schedule:
2020
interval: 'weekly'
21+
ignore:
22+
-depedency-name: 'next'
23+
-dependency-name: 'react'
24+
-dependency-name: 'react-dom'
25+
-dependency-name: 'tailwindcss'
2126
target-branch: 'staging'
2227
commit-message:
2328
prefix: 'deps'

.github/workflows/pr_checks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: PR Checks
22

33
on:
4-
push:
4+
pull_request:
55
branches:
66
- staging
77

.github/workflows/pr_checks_backend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ jobs:
8888
- name: Run Ruff Formatter in Docker
8989
run: |
9090
cd data
91-
docker compose run --rm formatter
91+
docker compose run --rm formatter sh -c "pip install ruff && ruff format --check --exclude '/usr/src/app/awkde/'"
9292
9393
run-linter:
9494
runs-on: ubuntu-latest

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
run: npm ci
2626

2727
- name: Create Tag
28-
uses: cycjimmy/semantic-release-action@v4.1.1
28+
uses: cycjimmy/semantic-release-action@v4.2.0
2929
env:
3030
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3131

@@ -48,7 +48,7 @@ jobs:
4848
4949
- name: Publish release notes
5050
if: steps.get_version.outputs.version != ''
51-
uses: actions/github-script@v6
51+
uses: actions/github-script@v7
5252
env:
5353
NEW_VERSION: ${{ steps.get_version.outputs.version }}
5454
with:

CHANGELOG.md

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,45 @@
22

33
### Bug Fixes
44

5-
* **572:** fix webpack warnings + fix linting issues ([#574](https://github.com/jinks145/clean-and-green-philly/issues/574)) ([fbfd459](https://github.com/jinks145/clean-and-green-philly/commit/fbfd459ba147e51a2fd54bee61d5ca63fb74eb98))
6-
* Add focus styling to header links ([a99065c](https://github.com/jinks145/clean-and-green-philly/commit/a99065cba1607b981702e7aa7e654f24c108ad6e))
7-
* Add href to dropdown items to increase link size ([2eb4667](https://github.com/jinks145/clean-and-green-philly/commit/2eb4667e7b68f45489c51ea10aa7d15afd2a3c77))
8-
* closing tooltip popup on map closes property details ([432e8c0](https://github.com/jinks145/clean-and-green-philly/commit/432e8c0a14e1e9cfa199b030019c0730a24741c6))
9-
* correct the scrolling on the map page ([a850237](https://github.com/jinks145/clean-and-green-philly/commit/a8502372e243057e2b06559cb042d94ea894415a))
10-
* Remove nested link and button ([d93e8bd](https://github.com/jinks145/clean-and-green-philly/commit/d93e8bd52d80cd8d5b1a30910aaa4b168a11b57a))
11-
* Update footer markup structure for accessibility ([d5c2a33](https://github.com/jinks145/clean-and-green-philly/commit/d5c2a334f0e5c297f117dca5dc2972b56d7b3542))
12-
5+
- **572:** fix webpack warnings + fix linting issues ([#574](https://github.com/jinks145/clean-and-green-philly/issues/574)) ([fbfd459](https://github.com/jinks145/clean-and-green-philly/commit/fbfd459ba147e51a2fd54bee61d5ca63fb74eb98))
6+
- Add focus styling to header links ([a99065c](https://github.com/jinks145/clean-and-green-philly/commit/a99065cba1607b981702e7aa7e654f24c108ad6e))
7+
- Add href to dropdown items to increase link size ([2eb4667](https://github.com/jinks145/clean-and-green-philly/commit/2eb4667e7b68f45489c51ea10aa7d15afd2a3c77))
8+
- closing tooltip popup on map closes property details ([432e8c0](https://github.com/jinks145/clean-and-green-philly/commit/432e8c0a14e1e9cfa199b030019c0730a24741c6))
9+
- correct the scrolling on the map page ([a850237](https://github.com/jinks145/clean-and-green-philly/commit/a8502372e243057e2b06559cb042d94ea894415a))
10+
- Remove nested link and button ([d93e8bd](https://github.com/jinks145/clean-and-green-philly/commit/d93e8bd52d80cd8d5b1a30910aaa4b168a11b57a))
11+
- Update footer markup structure for accessibility ([d5c2a33](https://github.com/jinks145/clean-and-green-philly/commit/d5c2a334f0e5c297f117dca5dc2972b56d7b3542))
1312

1413
### Features
1514

16-
* **247:** make the mapbox legend more legible ([bcf6915](https://github.com/jinks145/clean-and-green-philly/commit/bcf691566fc26e834547a43efd863de58abdf3d4))
17-
* **293:** sort features by priority of high, medium, low ([8cd1058](https://github.com/jinks145/clean-and-green-philly/commit/8cd105872feb0065aa3d207d42dc5df76ef63dbc))
18-
* **305:** expand the header width of single property table ([b25261e](https://github.com/jinks145/clean-and-green-philly/commit/b25261e5d9e26bdbd9694aa03b4964771528dd3b))
19-
* **395:** add white background to backbutton bar ([a65f052](https://github.com/jinks145/clean-and-green-philly/commit/a65f052ca2e5c0eac2737f85b4997af6e993f750))
20-
* **395:** make property selection back button sticky ([6601201](https://github.com/jinks145/clean-and-green-philly/commit/6601201fcf943f8e64a1341327095e9b7edc6b08))
21-
* **457:** add filter count to button ([b35145a](https://github.com/jinks145/clean-and-green-philly/commit/b35145a1df5f2995294f829e0b7cde20ba0e0f29))
22-
* **535:** add close download view button ([#579](https://github.com/jinks145/clean-and-green-philly/issues/579)) ([9bd2c53](https://github.com/jinks145/clean-and-green-philly/commit/9bd2c53aa3b49da8136fa6e7e850c4dc4d5e2d74))
23-
* **544:** adjust remove property section ([#580](https://github.com/jinks145/clean-and-green-philly/issues/580)) ([900af8e](https://github.com/jinks145/clean-and-green-philly/commit/900af8e6fbfc89bd4ed83b17c9eed0a1d5a3de3b))
24-
* **568:** restyle the property table ([#577](https://github.com/jinks145/clean-and-green-philly/issues/577)) ([2c8cc92](https://github.com/jinks145/clean-and-green-philly/commit/2c8cc92b7f28aecdbe65412476691baa50254292))
25-
* Add arrow icon to link ([6bce3fa](https://github.com/jinks145/clean-and-green-philly/commit/6bce3fa84ad9827f2117a2d51ed2f2665e83481b))
26-
* Add content to sidebar ([23d5c52](https://github.com/jinks145/clean-and-green-philly/commit/23d5c52c3fcd1eb1eff902e7d1fd37ab2fe41b6d))
27-
* Add council district ([e576218](https://github.com/jinks145/clean-and-green-philly/commit/e5762185840f0bbc2289fede8481f5b39a16087d))
28-
* Add extra data to single detail page ([48e34fe](https://github.com/jinks145/clean-and-green-philly/commit/48e34fe0a6317fc8fc0f1f5e745dd165000d437f))
29-
* Add font ([c1a8b93](https://github.com/jinks145/clean-and-green-philly/commit/c1a8b93561dfc67c8eed31b3c8befa2b8ae984ec))
30-
* Add font to map ([1491518](https://github.com/jinks145/clean-and-green-philly/commit/14915180857a482a25d96f9f45f7c838082e2d71))
31-
* Add font to search field ([3b08069](https://github.com/jinks145/clean-and-green-philly/commit/3b080690ba92007545467bc2ce4bf3bcad26c899))
32-
* Add info cards ([8170944](https://github.com/jinks145/clean-and-green-philly/commit/8170944fdb8d8be36af062012967323047bda748))
33-
* Add missing data and atlas link; style table ([8c260d4](https://github.com/jinks145/clean-and-green-philly/commit/8c260d48e015ed6c8c29cc10b8936753cc013ff0))
34-
* Add percentage, update column widths ([41caf77](https://github.com/jinks145/clean-and-green-philly/commit/41caf77c55eb0a6336abc80047ed83584d250a64))
35-
* Add priority color square ([ad5a9fa](https://github.com/jinks145/clean-and-green-philly/commit/ad5a9faff3b9596256e680b3d6d95c54caefc7a7))
36-
* add redirect from map to find-properties ([439ed6c](https://github.com/jinks145/clean-and-green-philly/commit/439ed6c7291251aed9751431cd5bdc2fa6883a15))
37-
* Add row scope ([f945979](https://github.com/jinks145/clean-and-green-philly/commit/f945979edaee2ad5a003a5b5560a89cc25717f3b))
38-
* Add spacing below Back button ([7de48c5](https://github.com/jinks145/clean-and-green-philly/commit/7de48c50f177c0275cebac0a4a7d9dfce8d2cd2c))
39-
* Address a few more links ([b3b6733](https://github.com/jinks145/clean-and-green-philly/commit/b3b673375f1472f15d80bffeff378c973d6cb49d))
40-
* Adjust table per requirements ([36e6cfa](https://github.com/jinks145/clean-and-green-philly/commit/36e6cfa5934defadcf1a8b8ad1c09ffe609d0ec5))
41-
* Change Find Properties and Learn More to links ([1de0b47](https://github.com/jinks145/clean-and-green-philly/commit/1de0b474811ab2d4281d94c6a9d5882a8ebb0c13))
42-
* Close sidebar if clicking on empty map ([612117d](https://github.com/jinks145/clean-and-green-philly/commit/612117d6c54bc62baaae4f773013e196232c2dba))
43-
* Navigate to map on click; show popups ([183b6a2](https://github.com/jinks145/clean-and-green-philly/commit/183b6a224d651726a6e465d7c9549ef437626f9e))
44-
* Open sidebar from map ([5474367](https://github.com/jinks145/clean-and-green-philly/commit/54743673e99ffd6b939009ad54e4d0a4252ba044))
45-
* Pass selected property to map view ([663f142](https://github.com/jinks145/clean-and-green-philly/commit/663f14236ccb9246efa8882c0dfa44e8cbcba0f7))
46-
* underline links ([5f23d09](https://github.com/jinks145/clean-and-green-philly/commit/5f23d09da9a7258b284ccfef54b1be0ee2a8e1f8))
47-
* Update aria label and role ([765e5a4](https://github.com/jinks145/clean-and-green-philly/commit/765e5a4fef1941e93815ae4789093e047183101c))
15+
- **247:** make the mapbox legend more legible ([bcf6915](https://github.com/jinks145/clean-and-green-philly/commit/bcf691566fc26e834547a43efd863de58abdf3d4))
16+
- **293:** sort features by priority of high, medium, low ([8cd1058](https://github.com/jinks145/clean-and-green-philly/commit/8cd105872feb0065aa3d207d42dc5df76ef63dbc))
17+
- **305:** expand the header width of single property table ([b25261e](https://github.com/jinks145/clean-and-green-philly/commit/b25261e5d9e26bdbd9694aa03b4964771528dd3b))
18+
- **395:** add white background to backbutton bar ([a65f052](https://github.com/jinks145/clean-and-green-philly/commit/a65f052ca2e5c0eac2737f85b4997af6e993f750))
19+
- **395:** make property selection back button sticky ([6601201](https://github.com/jinks145/clean-and-green-philly/commit/6601201fcf943f8e64a1341327095e9b7edc6b08))
20+
- **457:** add filter count to button ([b35145a](https://github.com/jinks145/clean-and-green-philly/commit/b35145a1df5f2995294f829e0b7cde20ba0e0f29))
21+
- **535:** add close download view button ([#579](https://github.com/jinks145/clean-and-green-philly/issues/579)) ([9bd2c53](https://github.com/jinks145/clean-and-green-philly/commit/9bd2c53aa3b49da8136fa6e7e850c4dc4d5e2d74))
22+
- **544:** adjust remove property section ([#580](https://github.com/jinks145/clean-and-green-philly/issues/580)) ([900af8e](https://github.com/jinks145/clean-and-green-philly/commit/900af8e6fbfc89bd4ed83b17c9eed0a1d5a3de3b))
23+
- **568:** restyle the property table ([#577](https://github.com/jinks145/clean-and-green-philly/issues/577)) ([2c8cc92](https://github.com/jinks145/clean-and-green-philly/commit/2c8cc92b7f28aecdbe65412476691baa50254292))
24+
- Add arrow icon to link ([6bce3fa](https://github.com/jinks145/clean-and-green-philly/commit/6bce3fa84ad9827f2117a2d51ed2f2665e83481b))
25+
- Add content to sidebar ([23d5c52](https://github.com/jinks145/clean-and-green-philly/commit/23d5c52c3fcd1eb1eff902e7d1fd37ab2fe41b6d))
26+
- Add council district ([e576218](https://github.com/jinks145/clean-and-green-philly/commit/e5762185840f0bbc2289fede8481f5b39a16087d))
27+
- Add extra data to single detail page ([48e34fe](https://github.com/jinks145/clean-and-green-philly/commit/48e34fe0a6317fc8fc0f1f5e745dd165000d437f))
28+
- Add font ([c1a8b93](https://github.com/jinks145/clean-and-green-philly/commit/c1a8b93561dfc67c8eed31b3c8befa2b8ae984ec))
29+
- Add font to map ([1491518](https://github.com/jinks145/clean-and-green-philly/commit/14915180857a482a25d96f9f45f7c838082e2d71))
30+
- Add font to search field ([3b08069](https://github.com/jinks145/clean-and-green-philly/commit/3b080690ba92007545467bc2ce4bf3bcad26c899))
31+
- Add info cards ([8170944](https://github.com/jinks145/clean-and-green-philly/commit/8170944fdb8d8be36af062012967323047bda748))
32+
- Add missing data and atlas link; style table ([8c260d4](https://github.com/jinks145/clean-and-green-philly/commit/8c260d48e015ed6c8c29cc10b8936753cc013ff0))
33+
- Add percentage, update column widths ([41caf77](https://github.com/jinks145/clean-and-green-philly/commit/41caf77c55eb0a6336abc80047ed83584d250a64))
34+
- Add priority color square ([ad5a9fa](https://github.com/jinks145/clean-and-green-philly/commit/ad5a9faff3b9596256e680b3d6d95c54caefc7a7))
35+
- add redirect from map to find-properties ([439ed6c](https://github.com/jinks145/clean-and-green-philly/commit/439ed6c7291251aed9751431cd5bdc2fa6883a15))
36+
- Add row scope ([f945979](https://github.com/jinks145/clean-and-green-philly/commit/f945979edaee2ad5a003a5b5560a89cc25717f3b))
37+
- Add spacing below Back button ([7de48c5](https://github.com/jinks145/clean-and-green-philly/commit/7de48c50f177c0275cebac0a4a7d9dfce8d2cd2c))
38+
- Address a few more links ([b3b6733](https://github.com/jinks145/clean-and-green-philly/commit/b3b673375f1472f15d80bffeff378c973d6cb49d))
39+
- Adjust table per requirements ([36e6cfa](https://github.com/jinks145/clean-and-green-philly/commit/36e6cfa5934defadcf1a8b8ad1c09ffe609d0ec5))
40+
- Change Find Properties and Learn More to links ([1de0b47](https://github.com/jinks145/clean-and-green-philly/commit/1de0b474811ab2d4281d94c6a9d5882a8ebb0c13))
41+
- Close sidebar if clicking on empty map ([612117d](https://github.com/jinks145/clean-and-green-philly/commit/612117d6c54bc62baaae4f773013e196232c2dba))
42+
- Navigate to map on click; show popups ([183b6a2](https://github.com/jinks145/clean-and-green-philly/commit/183b6a224d651726a6e465d7c9549ef437626f9e))
43+
- Open sidebar from map ([5474367](https://github.com/jinks145/clean-and-green-philly/commit/54743673e99ffd6b939009ad54e4d0a4252ba044))
44+
- Pass selected property to map view ([663f142](https://github.com/jinks145/clean-and-green-philly/commit/663f14236ccb9246efa8882c0dfa44e8cbcba0f7))
45+
- underline links ([5f23d09](https://github.com/jinks145/clean-and-green-philly/commit/5f23d09da9a7258b284ccfef54b1be0ee2a8e1f8))
46+
- Update aria label and role ([765e5a4](https://github.com/jinks145/clean-and-green-philly/commit/765e5a4fef1941e93815ae4789093e047183101c))

data/src/classes/backup_archive_database.py

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
from datetime import datetime, timedelta
55

66
import sqlalchemy as sa
7-
from config.config import log_level, max_backup_schema_days, tiles_file_id_prefix, tile_file_backup_directory
7+
from config.config import (
8+
log_level,
9+
max_backup_schema_days,
10+
tiles_file_id_prefix,
11+
tile_file_backup_directory,
12+
)
813
from config.psql import conn, local_engine, url
914
from data_utils.utils import mask_password
1015
from sqlalchemy import inspect
@@ -39,13 +44,15 @@ def backup_schema(self):
3944
"pg_dump "
4045
+ url
4146
+ " -s --schema public | "
42-
+ " sed 's/public/" + backup_schema_name + "/g'"
47+
+ " sed 's/public/"
48+
+ backup_schema_name
49+
+ "/g'"
4350
+ " | sed 's/"
4451
+ backup_schema_name
4552
+ ".geometry/public.geometry/' | sed 's/"
4653
+ backup_schema_name
4754
+ ".spatial_ref_sys/public.spatial_ref_sys/'"
48-
+ " | sed 's/backup__/public_/g'" # ppr_properties.public_name column needs to be restored.
55+
+ " | sed 's/backup__/public_/g'" # ppr_properties.public_name column needs to be restored.
4956
+ " | psql -v ON_ERROR_STOP=1 "
5057
+ url
5158
+ " > /dev/null "
@@ -109,24 +116,25 @@ def prune_old_archives(self):
109116
conn.execute(sa.DDL(sql))
110117

111118
def is_backup_schema_exists(self) -> bool:
112-
""" whether the backup schema exists
119+
"""whether the backup schema exists
113120
114121
Returns:
115122
bool: whether true
116-
"""
123+
"""
117124
return backup_schema_name in inspect(local_engine).get_schema_names()
118-
125+
119126
def backup_tiles_file(self):
120-
"""backup the main tiles file to a timestamped copy in the backup/ folder in GCP
121-
"""
127+
"""backup the main tiles file to a timestamped copy in the backup/ folder in GCP"""
122128
bucket = google_cloud_bucket()
123129
count: int = 0
124130
for blob in bucket.list_blobs(prefix=tiles_file_id_prefix):
125-
suffix: str = '_' + self.timestamp_string
131+
suffix: str = "_" + self.timestamp_string
126132
name, ext = os.path.splitext(blob.name)
127-
backup_file_name: str = tile_file_backup_directory + "/" + name + suffix + ext
133+
backup_file_name: str = (
134+
tile_file_backup_directory + "/" + name + suffix + ext
135+
)
128136
log.debug(backup_file_name)
129-
bucket.copy_blob(blob,destination_bucket=bucket,new_name=backup_file_name)
137+
bucket.copy_blob(blob, destination_bucket=bucket, new_name=backup_file_name)
130138
count += 1
131139
if count == 0:
132140
log.warning("No files were found to back up.")

0 commit comments

Comments
 (0)