Skip to content

Remove backend repos #555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ updates:
directory: "/stac_fastapi/api"
schedule:
interval: weekly
- package-ecosystem: pip
directory: "/stac_fastapi/api"
schedule:
interval: weekly
- package-ecosystem: pip
directory: "/stac_fastapi/types"
schedule:
Expand All @@ -24,11 +20,3 @@ updates:
directory: "/stac_fastapi/extensions"
schedule:
interval: weekly
- package-ecosystem: pip
directory: "/stac_fastapi/pgstac"
schedule:
interval: weekly
- package-ecosystem: pip
directory: "/stac_fastapi/sqlalchemy"
schedule:
interval: weekly
116 changes: 2 additions & 114 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ jobs:
python -m pip install pre-commit
pre-commit run --all-files

- name: Install pipenv
run: |
python -m pip install --upgrade pipenv wheel

- name: Install types
run: |
pip install ./stac_fastapi/types[dev]
Expand All @@ -69,118 +65,10 @@ jobs:
run: |
pip install ./stac_fastapi/extensions[dev]

- name: Install sqlalchemy stac-fastapi
run: |
pip install ./stac_fastapi/sqlalchemy[dev,server]

- name: Install pgstac stac-fastapi
run: |
pip install ./stac_fastapi/pgstac[dev,server]

- name: Run migration
run: |
cd stac_fastapi/sqlalchemy && alembic upgrade head
env:
POSTGRES_USER: username
POSTGRES_PASS: password
POSTGRES_DBNAME: postgis
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432

- name: Run test suite
run: |
cd stac_fastapi/api && pipenv run pytest -svvv
env:
ENVIRONMENT: testing

- name: Run test suite
run: |
cd stac_fastapi/types && pipenv run pytest -svvv
env:
ENVIRONMENT: testing

- name: Run test suite
run: |
cd stac_fastapi/sqlalchemy && pipenv run pytest -svvv
env:
ENVIRONMENT: testing
POSTGRES_USER: username
POSTGRES_PASS: password
POSTGRES_DBNAME: postgis
POSTGRES_HOST_READER: localhost
POSTGRES_HOST_WRITER: localhost
POSTGRES_PORT: 5432

- name: Run test suite
run: |
cd stac_fastapi/pgstac && pipenv run pytest -svvv
- name: Test
run: pytest -svvv
env:
ENVIRONMENT: testing
POSTGRES_USER: username
POSTGRES_PASS: password
POSTGRES_DBNAME: postgis
POSTGRES_HOST_READER: localhost
POSTGRES_HOST_WRITER: localhost
POSTGRES_PORT: 5432

validate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
backend: ["sqlalchemy", "pgstac"]
services:
pgstac:
image: ghcr.io/stac-utils/pgstac:v0.7.1
env:
POSTGRES_USER: username
POSTGRES_PASSWORD: password
POSTGRES_DB: postgis
PGUSER: username
PGPASSWORD: password
PGDATABASE: postgis
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--log-driver none
ports:
- 5432:5432
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
cache: pip
cache-dependency-path: stac_fastapi/pgstac/setup.cfg
- name: Install stac-fastapi and stac-api-validator
run: pip install ./stac_fastapi/api ./stac_fastapi/types ./stac_fastapi/${{ matrix.backend }}[server] stac-api-validator==0.4.1
- name: Run migration
if: ${{ matrix.backend == 'sqlalchemy' }}
run: cd stac_fastapi/sqlalchemy && alembic upgrade head
env:
POSTGRES_USER: username
POSTGRES_PASS: password
POSTGRES_DBNAME: postgis
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
- name: Load data and validate
run: python -m stac_fastapi.${{ matrix.backend }}.app & ./scripts/wait-for-it.sh localhost:8080 && python ./scripts/ingest_joplin.py http://localhost:8080 && ./scripts/validate http://localhost:8080
env:
POSTGRES_USER: username
POSTGRES_PASS: password
POSTGRES_DBNAME: postgis
POSTGRES_HOST_READER: localhost
POSTGRES_HOST_WRITER: localhost
POSTGRES_PORT: 5432
PGUSER: username
PGPASSWORD: password
PGDATABASE: postgis
APP_HOST: 0.0.0.0
APP_PORT: 8080

test-docs:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy_mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
stac_fastapi/api \
stac_fastapi/types \
stac_fastapi/extensions \
stac_fastapi/sqlalchemy
python -m pip install mkdocs mkdocs-material pdocs

- name: update API docs
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/packages.yml

This file was deleted.

109 changes: 53 additions & 56 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,57 +1,54 @@
repos:
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
language_version: python3.8
-
repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
args: ['--safe']
language_version: python3.8
-
repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
language_version: python3.8
args: [
# E501 let black handle all line length decisions
# W503 black conflicts with "line break before operator" rule
# E203 black conflicts with "whitespace before ':'" rule
'--ignore=E501,W503,E203,C901']
-
repo: https://github.com/chewse/pre-commit-mirrors-pydocstyle
# 2.1.1
rev: v2.1.1
hooks:
- id: pydocstyle
language_version: python3.8
exclude: '.*(test|alembic|scripts).*'
args: [
# Check for docstring presence only
'--select=D1',

]
# Don't require docstrings for tests
# '--match=(?!test).*\.py']
# -
# repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.770
# hooks:
# - id: mypy
# language_version: python3.8
# args: [--no-strict-optional, --ignore-missing-imports]
-
repo: https://github.com/PyCQA/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
language_version: python3.8
exclude: '.*(test|alembic|scripts).*'
#args: [
# Don't require docstrings for tests
#'--match=(?!test|alembic|scripts).*\.py',
#]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
language_version: python3.8
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
args: ["--safe"]
language_version: python3.8
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
language_version: python3.8
args: [
# E501 let black handle all line length decisions
# W503 black conflicts with "line break before operator" rule
# E203 black conflicts with "whitespace before ':'" rule
"--ignore=E501,W503,E203,C901",
]
- repo: https://github.com/chewse/pre-commit-mirrors-pydocstyle
# 2.1.1
rev: v2.1.1
hooks:
- id: pydocstyle
language_version: python3.8
exclude: ".*(test|alembic|scripts).*"
args:
[
# Check for docstring presence only
"--select=D1",
]
# Don't require docstrings for tests
# '--match=(?!test).*\.py']
# -
# repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.770
# hooks:
# - id: mypy
# language_version: python3.8
# args: [--no-strict-optional, --ignore-missing-imports]
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
language_version: python3.8
exclude: ".*(test|alembic|scripts).*"
#args: [
# Don't require docstrings for tests
#'--match=(?!test|alembic|scripts).*\.py',
#]
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

* Default branch to **main** ([#544](https://github.com/stac-utils/stac-fastapi/pull/544))

### Removed

* Backends ([#555](https://github.com/stac-utils/stac-fastapi/pull/555))
* **stac-fastapi-pgstac**: <https://github.com/stac-utils/stac-fastapi-pgstac>
* **stac-fastapi-sqlalchemy**: <https://github.com/stac-utils/stac-fastapi-sqlalchemy>

### Fixed

* Use `V()` instead of f-strings for pgstac queries ([#554](https://github.com/stac-utils/stac-fastapi/pull/554))
Expand Down
4 changes: 1 addition & 3 deletions docker/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@ COPY . /app

RUN pip install -e ./stac_fastapi/types[dev] && \
pip install -e ./stac_fastapi/api[dev] && \
pip install -e ./stac_fastapi/extensions[dev] && \
pip install -e ./stac_fastapi/sqlalchemy[dev,server] && \
pip install -e ./stac_fastapi/pgstac[dev,server]
pip install -e ./stac_fastapi/extensions[dev]
15 changes: 7 additions & 8 deletions docker/Dockerfile.docs → Dockerfile.docs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ WORKDIR /opt/src
RUN python -m pip install \
stac_fastapi/api \
stac_fastapi/types \
stac_fastapi/extensions \
stac_fastapi/sqlalchemy
stac_fastapi/extensions

CMD ["pdocs", \
"as_markdown", \
"--output_dir", \
"docs/api/", \
"--exclude_source", \
"--overwrite", \
"stac_fastapi"]
"as_markdown", \
"--output_dir", \
"docs/api/", \
"--exclude_source", \
"--overwrite", \
"stac_fastapi"]
Loading