-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python black formatting; flake8 on everything
- Loading branch information
1 parent
9027c0f
commit 1ce43db
Showing
111 changed files
with
6,377 additions
and
4,331 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
[flake8] | ||
# E203: Whitespace before ':'. | ||
# H101: Use TODO(NAME) | ||
# W503: line break before binary operator. | ||
ignore = E203, H101, W503 | ||
max-line-length = 140 | ||
exclude = | ||
geoapi/migrations/ | ||
exclude = | ||
geoapi/models/__init__.py | ||
geoapi/tasks/__init__.py | ||
geoapi/schemas/__init__.py | ||
# Files below are tied with https://jira.tacc.utexas.edu/browse/DES-2267 | ||
geoapi/initdb.py | ||
geoapi/utils/streetview.py | ||
geoapi/services/streetview.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ name: CI | |
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: [main] | ||
pull_request: | ||
branches: [ '**' ] | ||
branches: ["**"] | ||
jobs: | ||
Linting: | ||
runs-on: ubuntu-latest | ||
|
@@ -14,10 +14,14 @@ jobs: | |
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- name: Install flake8 | ||
run: pip install flake8 | ||
- name: Install flake8 and black | ||
run: pip install flake8 black | ||
- name: Run flake8 | ||
run: flake8 geoapi | ||
- name: Formatting with black | ||
run: | | ||
black --check . | ||
Geoapi_Unit_Tests: | ||
runs-on: ubuntu-latest | ||
env: | ||
|
@@ -31,40 +35,40 @@ jobs: | |
POSTGRES_PASSWORD: dev | ||
POSTGRES_DB: test | ||
ports: | ||
- 5432:5432 | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- name: Install ffmpeg | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ffmpeg | ||
- name: Setup Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.8.3 | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pypoetry/virtualenvs | ||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-poetry- | ||
- name: Install Python Packages | ||
run: | | ||
cd devops | ||
poetry install | ||
- name: Run server-side unit tests | ||
run: | | ||
cd devops | ||
poetry run pytest ../geoapi | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- name: Install ffmpeg | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ffmpeg | ||
- name: Setup Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.8.3 | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pypoetry/virtualenvs | ||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-poetry- | ||
- name: Install Python Packages | ||
run: | | ||
cd devops | ||
poetry install | ||
- name: Run server-side unit tests | ||
run: | | ||
cd devops | ||
poetry run pytest ../geoapi | ||
Workers_Unit_Tests: | ||
runs-on: ubuntu-latest | ||
services: | ||
|
@@ -82,15 +86,15 @@ jobs: | |
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: docker/login-action@v1 | ||
with: | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
username: ${{ secrets.DOCKER_USER }} | ||
- name: Build worker image | ||
run: | | ||
docker pull taccaci/geoapi-workers:latest | ||
docker build --cache-from taccaci/geoapi-workers:latest -t taccaci/geoapi-workers:latest -f devops/Dockerfile.worker . | ||
- name: Run worker test | ||
run: | | ||
docker run --network="host" -e APP_ENV='testing' -e DB_HOST='localhost' taccaci/geoapi-workers:latest pytest -m "worker" | ||
- uses: actions/checkout@v3 | ||
- uses: docker/login-action@v1 | ||
with: | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
username: ${{ secrets.DOCKER_USER }} | ||
- name: Build worker image | ||
run: | | ||
docker pull taccaci/geoapi-workers:latest | ||
docker build --cache-from taccaci/geoapi-workers:latest -t taccaci/geoapi-workers:latest -f devops/Dockerfile.worker . | ||
- name: Run worker test | ||
run: | | ||
docker run --network="host" -e APP_ENV='testing' -e DB_HOST='localhost' taccaci/geoapi-workers:latest pytest -m "worker" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,3 +133,5 @@ client/swagger-codegen/ | |
|
||
# celerybeat schedule files | ||
celerybeat-schedule.* | ||
|
||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.