Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/staging' into AZBL/665-make-be…
Browse files Browse the repository at this point in the history
…fore-and-after-text-on-image-actual-text
  • Loading branch information
AZBL committed Sep 24, 2024
2 parents 539356d + 149a4de commit 1b8dfdc
Show file tree
Hide file tree
Showing 8 changed files with 6,960 additions and 5,277 deletions.
70 changes: 55 additions & 15 deletions .github/workflows/pr_checks_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ on:
- 'data/**'
- 'Dockerfile-pg'
- 'init_pg.sql'
- 'docker-compose.yml'
- 'docker compose.yml'
workflow_dispatch:

jobs:
build:
setup:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -30,49 +29,90 @@ jobs:
with:
python-version: '3.11.4'

run-formatter:
runs-on: ubuntu-latest
needs: setup
continue-on-error: true

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Run Ruff Formatter in Docker
run: |
cd data
docker-compose run --rm formatter
continue-on-error: true
docker compose run --rm formatter
run-linter:
runs-on: ubuntu-latest
needs: setup
continue-on-error: true

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Run Ruff Linter in Docker
run: |
cd data
docker-compose run --rm linter
continue-on-error: true
docker compose run --rm linter
build-project:
runs-on: ubuntu-latest
needs: setup

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build vacant-lots-proj
run: |
cd data
docker-compose build vacant-lots-proj
docker compose build vacant-lots-proj
- name: Build data-fetcher
run: |
cd data
docker-compose build data-fetcher
run-services:
runs-on: ubuntu-latest
needs: build-project

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Run all services
run: |
cd data
docker-compose up -d
docker compose up -d
check-build-status:
runs-on: ubuntu-latest
needs: run-services

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Check build status
if: failure()
run: |
echo "One or more services failed to build and run."
exit 1
- name: Report success
if: success()
run: echo "All services built and ran successfully."

check-lint-format-status:
runs-on: ubuntu-latest
needs: [run-formatter, run-linter]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Check formatter and linter status
if: failure()
run: |
echo "Formatting or linting issues found. Please fix the issues."
exit 1
- name: Formatter and linter success
if: success()
run: echo "Formatting and linting passed successfully."
4 changes: 2 additions & 2 deletions data/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ services:
context: .
volumes:
- ./src:/usr/src/app
command: sh -c "pip install ruff && ruff /usr/src/app --fix --exclude '/usr/src/app/data/src/awkde/'"
command: sh -c "pip install ruff && ruff format --exclude '/usr/src/app/awkde/'"
network_mode: 'host'

linter:
build:
context: .
volumes:
- ./src:/usr/src/app
command: sh -c "pip install ruff && ruff check /usr/src/app --exclude '/usr/src/app/data/src/awkde/'"
command: sh -c "pip install ruff && ruff check --fix --exclude '/usr/src/app/awkde/'"
network_mode: 'host'

streetview:
Expand Down
1 change: 1 addition & 0 deletions data/src/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ networkx = "*"
libpysal = "*"
jenkspy = "*"
pyarrow = "*"
tqdm = "*"

[dev-packages]

Expand Down
Loading

0 comments on commit 1b8dfdc

Please sign in to comment.