Skip to content

Commit 849a348

Browse files
authored
Merge pull request #1177 from grahamalama/unvendor-awkde
feat: Unvendor awkde
2 parents 19e9b8f + 9664614 commit 849a348

34 files changed

+113
-2496
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: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +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/
6563
tmp/
6664

6765
# Local python development files
68-
.python-version
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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
[tool.vulture]
2-
exclude = ["awkde/"]
32
make_whitelist = true
43
# min_confidence = 80
54
sort_by_size = true
65

76
[tool.mypy]
87
ignore_missing_imports = true
9-
exclude = 'awkde/'
108

119
[tool.ruff]
1210
# Exclude a variety of commonly ignored directories, plus our own
1311
exclude = [
14-
"awkde/",
1512
".bzr",
1613
".direnv",
1714
".eggs",

data/src/Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ verify_ssl = true
44
name = "pypi"
55

66
[packages]
7+
awkde = { git = 'https://github.com/mennthor/awkde.git', ref = '5b601fe4d92229d5deb8737fd121dce193bac552' }
78
esridump = "~=1.13.0"
89
fiona = "~=1.10.1"
910
future = "~=1.0.0"

data/src/Pipfile.lock

Lines changed: 104 additions & 92 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

data/src/awkde/LICENSE

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

data/src/awkde/README.md

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

0 commit comments

Comments
 (0)