Skip to content

Commit

Permalink
update fastapi requirement (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago authored Jan 14, 2021
1 parent faf1e0e commit 7356df9
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 31 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## 0.1.0 (TBD)

* update FastAPI requirements

## 0.1.0a14 (2021-01-05)

* add `rio_tiler.errors.MissingBands` in known errors.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COPY README.md /app/README.md
COPY titiler/ /app/titiler/
COPY setup.py /app/setup.py

RUN pip install -e /app/.["server"] --no-cache-dir
RUN pip install -e /app/. --no-cache-dir

ENV MODULE_NAME titiler.main
ENV VARIABLE_NAME app
21 changes: 4 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ Note: This project is the descendant of [`cogeo-tiler`](https://github.com/devel
$ pip install -U pip

# From Pypi
$ pip install titiler["server"]
$ pip install titiler

# Or from sources
$ git clone https://github.com/developmentseed/titiler.git
$ cd titiler && pip install -e .["server"]
$ cd titiler && pip install -e .
```

Launch Application
Expand Down Expand Up @@ -121,21 +121,8 @@ titiler/ - titiler python module.
├── errors.py - API custom error handling.
├── main.py - FastAPI application creation and configuration.
├── settings.py - application configuration.
├── utils.py - utility functions.
stack/
├── app.py - AWS Stack definition (vpc, cluster, ecs, alb ...)
├── config.py - Optional parameters for the stack definition [EDIT THIS]
Dockerfiles/
├── Dockerfile - Dockerfile to build the ECS service image.
├── lambda.package - Dockerfile to build the Lambda service package.
├── lambda.container - Dockerfile to build the Lambda service container.
lambda/
│ └── handler.py - Mangum adaptor for AWS Lambda.
docs/ - Project documentation.
└── utils.py - utility functions.
```

## Contribution & Development
Expand Down
2 changes: 1 addition & 1 deletion deployment/AWS/lambda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ RUN cd /var/task && find . -type d -a -name '__pycache__' -print0 | xargs -0 rm
RUN cd /var/task && find . -type f -a -name '*.py' -print0 | xargs -0 rm -f
RUN find /var/task -type d -a -name 'tests' -print0 | xargs -0 rm -rf
RUN rm -rdf /var/task/numpy/doc/
RUN rm -rdf /var/task/stack
RUN rm -rdf /var/task/uvicorn

COPY lambda/handler.py /var/task/handler.py
14 changes: 4 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@
long_description = f.read()

inst_reqs = [
# There is a breaking change in starlette 0.14 which is not compatible with fastapi 0.61
# Fastapi requires 0.13.6 but brotli-asgi ask for >=0.13.4 which results in starlette 0.14 being installed
# we put fastapi as the first requirement to make sure starlette version is define by fastapi.
"fastapi~=0.61",
"fastapi[all]",
"brotli-asgi>=1.0.0",
"email-validator",
"jinja2",
"python-dotenv",
"morecantile",
"rio-cogeo",
"rio-cogeo>=2.1,<2.2",
"rio-tiler>=2.0.0rc4,<2.1",
"cogeo-mosaic>=3.0.0b1,<3.1",
"rasterio",
Expand All @@ -26,7 +21,6 @@
]
extra_reqs = {
"dev": ["pytest", "pytest-cov", "pytest-asyncio", "pre-commit", "requests"],
"server": ["uvicorn"],
"test": ["pytest", "pytest-cov", "pytest-asyncio", "requests"],
"docs": ["nbconvert", "mkdocs", "mkdocs-material", "mkdocs-jupyter", "pygments"],
}
Expand All @@ -47,12 +41,12 @@
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
keywords="COG STAC MosaicJSON FastAPI Serverless",
keywords="COG STAC MosaicJSON FastAPI",
author=u"Vincent Sarago",
author_email="[email protected]",
url="https://github.com/developmentseed/titiler",
license="MIT",
packages=find_packages(exclude=["tests*", "stack"]),
packages=find_packages(exclude=["tests*"]),
package_data={"titiler": ["templates/*.html", "templates/*.xml"]},
include_package_data=True,
zip_safe=False,
Expand Down
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ envlist = py36,py37,py38
extras = test
commands=
python -m pytest --cov titiler --cov-report xml --cov-report term-missing --ignore=venv
deps=
numpy

# Release tooling
[testenv:build]
Expand Down

0 comments on commit 7356df9

Please sign in to comment.