Skip to content

Commit 011061e

Browse files
github-actions[bot]grahamalamanlebovitscfreedmanadamzev
authored
Weekly PR from Staging to Main (#1186)
* feat: Unvendor awkde * chore: Remove unused dev dependencies and pin versions * chore: Alphabatize backend dependencies * chore: Pin backend dependencies to minor versions * Basic technologies documentation (#1184) Add in additional documentation about different technologies used in the project for reference for newcomers. Can continue to flush it out as our pipeline gets more settled. --------- Co-authored-by: Graham Beckley <[email protected]> Co-authored-by: Nissim Lebovits <[email protected]> Co-authored-by: Collum Freedman <[email protected]> Co-authored-by: Adam Levin <[email protected]>
1 parent 94e7f38 commit 011061e

36 files changed

+3069
-5524
lines changed

.github/workflows/pr_checks_backend.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ jobs:
6868
echo "Using Python: $(which python)"
6969
pipenv --python $(which python) install --dev
7070
71-
- name: Install awkde
72-
working-directory: data/src/awkde
73-
run: pipenv run pip install .
74-
7571
- name: Run Pytest
7672
working-directory: data/src
7773
run: PYTHONPATH=$PYTHONPATH:. pipenv run pytest

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ data/src/app/service-account-key.json
6060
# compiled python files
6161
*.pyc
6262

63-
# awkde build files
64-
data/src/awkde/build/
65-
tmp/
63+
tmp/
64+
65+
# Local python development files
66+
.python-version

.pre-commit-config.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ repos:
99
language: python
1010
types_or: [python, pyi, jupyter]
1111
files: \.py$
12-
exclude: ^data/src/awkde/
1312

1413
# Ruff for Python formatting
1514
- id: ruff-format
@@ -18,7 +17,6 @@ repos:
1817
language: python
1918
types_or: [python, pyi, jupyter]
2019
files: \.py$
21-
exclude: ^data/src/awkde/
2220

2321
# Dependency checks for Python
2422
- id: check-python-dependencies
@@ -35,14 +33,13 @@ repos:
3533
radon hal {} -s | awk "/effort/ { if (\$3 > 2000) print FILENAME \": High Halstead effort:\" \$3 }"'
3634
language: system
3735
files: \.py$
38-
exclude: ^data/src/awkde/
3936

4037
- repo: https://github.com/jendrikseipp/vulture
4138
rev: 'v2.3' # or any later Vulture version
4239
hooks:
4340
- id: vulture
4441
name: vulture (Dead code detection)
45-
entry: vulture data/ --exclude=data/src/awkde
42+
entry: vulture data/
4643
language: python
4744
types: [python]
4845
files: ^data/

data/Dockerfile

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ ENV GDAL_CONFIG=/usr/bin/gdal-config
2929
# Install Pipenv
3030
RUN pip install pipenv
3131

32-
# update pipfile
33-
RUN pipenv lock
34-
3532
# Copy the Pipfile and Pipfile.lock from the src directory
3633
COPY src/Pipfile src/Pipfile.lock ./
3734

35+
# update pipfile
36+
RUN pipenv lock
37+
3838
# Install the dependencies from Pipfile
3939
RUN pipenv install --deploy --ignore-pipfile
4040

@@ -44,17 +44,9 @@ RUN git clone https://github.com/felt/tippecanoe.git \
4444
&& make \
4545
&& make install
4646

47-
# Copy the src directory (including awkde)
47+
# Copy the src directory
4848
COPY src/ .
4949

50-
# Install awkde within the Pipenv environment
51-
# Assuming awkde is located in /usr/src/app/awkde
52-
WORKDIR /usr/src/app/awkde
53-
RUN pipenv run pip install .
54-
55-
# Change back to the original working directory
56-
WORKDIR /usr/src/app
57-
5850
# Use Pipenv to run the script
5951
# Adjust the path to your main Python script if needed
6052
CMD ["pipenv", "run", "python", "./script.py"]

data/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ services:
2626
context: .
2727
volumes:
2828
- ./src:/usr/src/app
29-
command: sh -c "pip install ruff && ruff format --exclude '/usr/src/app/awkde/'"
29+
command: sh -c "pip install ruff && ruff format"
3030
network_mode: 'host'
3131

3232
linter:
3333
build:
3434
context: .
3535
volumes:
3636
- ./src:/usr/src/app
37-
command: sh -c "pip install ruff && ruff check --fix --exclude '/usr/src/app/awkde/'"
37+
command: sh -c "pip install ruff && ruff check --fix"
3838
network_mode: 'host'
3939

4040
streetview:

data/pyproject.toml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,14 @@
1-
[tool.pylint]
2-
ignore = ["awkde/"]
3-
output-format = "colorized,parseable"
4-
5-
[tool.pylint.'MESSAGES CONTROL']
6-
disable = ["all"]
7-
enable = ["duplicate-code"]
8-
91
[tool.vulture]
10-
exclude = ["awkde/"]
112
make_whitelist = true
123
# min_confidence = 80
134
sort_by_size = true
145

156
[tool.mypy]
167
ignore_missing_imports = true
17-
exclude = 'awkde/'
188

199
[tool.ruff]
2010
# Exclude a variety of commonly ignored directories, plus our own
2111
exclude = [
22-
"awkde/",
2312
".bzr",
2413
".direnv",
2514
".eggs",

data/src/Pipfile

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,38 @@ verify_ssl = true
44
name = "pypi"
55

66
[packages]
7-
jupyter = "*"
8-
requests = "*"
9-
pandas = "==2.2.2"
7+
awkde = { git = 'https://github.com/mennthor/awkde.git', ref = '5b601fe4d92229d5deb8737fd121dce193bac552' }
8+
esridump = "~=1.13.0"
9+
fiona = "~=1.10.1"
10+
future = "~=1.0.0"
11+
geoalchemy2 = "~=0.16.0"
1012
geopandas = "==1.0.1"
11-
shapely = "*"
12-
matplotlib = "*"
13-
rasterio = "*"
14-
scikit-learn = "*"
15-
mapclassify = "*"
16-
fiona = "*"
17-
esridump = "*"
18-
sqlalchemy = "*"
19-
psycopg2-binary = "*"
20-
mapbox = "*"
21-
google-cloud-storage = "*"
13+
google-cloud-storage = "~=2.19.0"
14+
jenkspy = "~=0.4.1"
15+
jupyter = "~=1.1.1"
16+
libpysal = "~=4.12.1"
17+
mapbox = "~=0.18.1"
18+
mapclassify = "~=2.8.1"
19+
matplotlib = "~=3.9.3"
20+
networkx = "~=3.4.2"
21+
pandas = "==2.2.2"
22+
psycopg2-binary = "~=2.9.10"
23+
pyarrow = "~=18.1.0"
2224
pydantic = "==2.8.2"
23-
future = "*"
24-
slack-sdk = "*"
25-
networkx = "*"
26-
libpysal = "*"
27-
jenkspy = "*"
28-
pyarrow = "*"
29-
tqdm = "*"
30-
geoalchemy2 ="*"
25+
rasterio = "~=1.4.3"
26+
requests = "~=2.32.3"
27+
scikit-learn = "~=1.6.0"
28+
shapely = "~=2.0.6"
29+
slack-sdk = "~=3.33.5"
30+
sqlalchemy = "~=2.0.36"
31+
tqdm = "~=4.67.1"
32+
3133

3234
[dev-packages]
33-
black = "*"
34-
pytest = "*"
35-
vulture = "*"
36-
pylint = "*"
37-
radon = "*"
38-
ruff = "*"
35+
pytest = "~=8.3.4"
36+
vulture = "~=2.14"
37+
radon = "~=6.0.1"
38+
ruff = "~=0.8.2"
3939

4040
[requires]
4141
python_version = "3.11"

0 commit comments

Comments
 (0)