diff --git a/CHANGES.md b/CHANGES.md index fc21500f3..7f3d673b7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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. diff --git a/Dockerfile b/Dockerfile index 5a2f949e4..481bb6d90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/README.md b/README.md index c7b8f4b4d..ed3e0c452 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/deployment/AWS/lambda/Dockerfile b/deployment/AWS/lambda/Dockerfile index dcf697e54..8fb92d454 100644 --- a/deployment/AWS/lambda/Dockerfile +++ b/deployment/AWS/lambda/Dockerfile @@ -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 diff --git a/setup.py b/setup.py index fa56817aa..926ced9be 100644 --- a/setup.py +++ b/setup.py @@ -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", @@ -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"], } @@ -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="vincent@developmentseed.org", 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, diff --git a/tox.ini b/tox.ini index 6f107e0b6..1ba94ddf5 100644 --- a/tox.ini +++ b/tox.ini @@ -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]