From 59922ba8771d1eb3c7caf855e3b14608b7eec1c3 Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Mon, 11 Mar 2024 00:06:12 +0800 Subject: [PATCH 1/4] reorg files, setup --- MANIFEST.in | 2 ++ Makefile | 3 --- README.md | 2 +- dockerfiles/Dockerfile.dev.mongo | 2 +- stac_fastapi/mongo/setup.py => setup.py | 3 ++- stac_fastapi/{mongo => }/README.md | 0 stac_fastapi/mongo/{stac_fastapi/mongo => }/__init__.py | 0 stac_fastapi/mongo/{stac_fastapi/mongo => }/app.py | 0 stac_fastapi/mongo/{stac_fastapi/mongo => }/config.py | 0 stac_fastapi/mongo/{stac_fastapi/mongo => }/database_logic.py | 0 stac_fastapi/mongo/setup.cfg | 2 -- stac_fastapi/mongo/stac_fastapi/mongo/version.py | 2 -- stac_fastapi/mongo/{stac_fastapi/mongo => }/utilities.py | 0 stac_fastapi/{mongo => }/pytest.ini | 0 14 files changed, 6 insertions(+), 10 deletions(-) create mode 100644 MANIFEST.in rename stac_fastapi/mongo/setup.py => setup.py (95%) rename stac_fastapi/{mongo => }/README.md (100%) rename stac_fastapi/mongo/{stac_fastapi/mongo => }/__init__.py (100%) rename stac_fastapi/mongo/{stac_fastapi/mongo => }/app.py (100%) rename stac_fastapi/mongo/{stac_fastapi/mongo => }/config.py (100%) rename stac_fastapi/mongo/{stac_fastapi/mongo => }/database_logic.py (100%) delete mode 100644 stac_fastapi/mongo/setup.cfg delete mode 100644 stac_fastapi/mongo/stac_fastapi/mongo/version.py rename stac_fastapi/mongo/{stac_fastapi/mongo => }/utilities.py (100%) rename stac_fastapi/{mongo => }/pytest.ini (100%) diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..29176f2 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +prune stac_fastapi/tests +prune data_loader \ No newline at end of file diff --git a/Makefile b/Makefile index 7467eb8..3e881fe 100644 --- a/Makefile +++ b/Makefile @@ -58,9 +58,6 @@ run-database-mongo: .PHONY: pybase-install pybase-install: pip install wheel && \ - pip install -e ./stac_fastapi/api[dev] && \ - pip install -e ./stac_fastapi/types[dev] && \ - pip install -e ./stac_fastapi/extensions[dev] && \ pip install -e ./stac_fastapi/core .PHONY: install-mongo diff --git a/README.md b/README.md index 1097e6d..ed337d5 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ pip install stac_fastapi.mongo To install the classes in your local Python env, run: ```shell -pip install -e 'stac_fastapi/mongo[dev]' +pip install -e .[dev] ``` diff --git a/dockerfiles/Dockerfile.dev.mongo b/dockerfiles/Dockerfile.dev.mongo index 4f43aba..d63496e 100644 --- a/dockerfiles/Dockerfile.dev.mongo +++ b/dockerfiles/Dockerfile.dev.mongo @@ -15,4 +15,4 @@ WORKDIR /app COPY . /app -RUN pip install --no-cache-dir -e ./stac_fastapi/mongo[dev,server] +RUN pip install --no-cache-dir -e .[dev,server] diff --git a/stac_fastapi/mongo/setup.py b/setup.py similarity index 95% rename from stac_fastapi/mongo/setup.py rename to setup.py index f425c79..cdf68af 100644 --- a/stac_fastapi/mongo/setup.py +++ b/setup.py @@ -29,6 +29,7 @@ setup( name="stac-fastapi.mongo", + version="3.0.0", description="Mongodb stac-fastapi backend.", long_description=desc, long_description_content_type="text/markdown", @@ -45,7 +46,7 @@ ], url="https://github.com/Healy-Hyperspatial/stac-fastapi-mongo", license="MIT", - packages=find_namespace_packages(), + packages = find_namespace_packages(), zip_safe=False, install_requires=install_requires, extras_require=extra_reqs, diff --git a/stac_fastapi/mongo/README.md b/stac_fastapi/README.md similarity index 100% rename from stac_fastapi/mongo/README.md rename to stac_fastapi/README.md diff --git a/stac_fastapi/mongo/stac_fastapi/mongo/__init__.py b/stac_fastapi/mongo/__init__.py similarity index 100% rename from stac_fastapi/mongo/stac_fastapi/mongo/__init__.py rename to stac_fastapi/mongo/__init__.py diff --git a/stac_fastapi/mongo/stac_fastapi/mongo/app.py b/stac_fastapi/mongo/app.py similarity index 100% rename from stac_fastapi/mongo/stac_fastapi/mongo/app.py rename to stac_fastapi/mongo/app.py diff --git a/stac_fastapi/mongo/stac_fastapi/mongo/config.py b/stac_fastapi/mongo/config.py similarity index 100% rename from stac_fastapi/mongo/stac_fastapi/mongo/config.py rename to stac_fastapi/mongo/config.py diff --git a/stac_fastapi/mongo/stac_fastapi/mongo/database_logic.py b/stac_fastapi/mongo/database_logic.py similarity index 100% rename from stac_fastapi/mongo/stac_fastapi/mongo/database_logic.py rename to stac_fastapi/mongo/database_logic.py diff --git a/stac_fastapi/mongo/setup.cfg b/stac_fastapi/mongo/setup.cfg deleted file mode 100644 index a234c94..0000000 --- a/stac_fastapi/mongo/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[metadata] -version = attr: stac_fastapi.mongo.version.__version__ diff --git a/stac_fastapi/mongo/stac_fastapi/mongo/version.py b/stac_fastapi/mongo/stac_fastapi/mongo/version.py deleted file mode 100644 index e0db94f..0000000 --- a/stac_fastapi/mongo/stac_fastapi/mongo/version.py +++ /dev/null @@ -1,2 +0,0 @@ -"""library version.""" -__version__ = "3.0.0" diff --git a/stac_fastapi/mongo/stac_fastapi/mongo/utilities.py b/stac_fastapi/mongo/utilities.py similarity index 100% rename from stac_fastapi/mongo/stac_fastapi/mongo/utilities.py rename to stac_fastapi/mongo/utilities.py diff --git a/stac_fastapi/mongo/pytest.ini b/stac_fastapi/pytest.ini similarity index 100% rename from stac_fastapi/mongo/pytest.ini rename to stac_fastapi/pytest.ini From a0feb91351e9b056620cefd8949150e28ee0b581 Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Mon, 11 Mar 2024 00:07:39 +0800 Subject: [PATCH 2/4] pre-commit --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index cdf68af..78c7998 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ ], url="https://github.com/Healy-Hyperspatial/stac-fastapi-mongo", license="MIT", - packages = find_namespace_packages(), + packages=find_namespace_packages(), zip_safe=False, install_requires=install_requires, extras_require=extra_reqs, From f69e62ec1acf24b37e4717bc41643cf040d3163e Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Mon, 11 Mar 2024 00:11:20 +0800 Subject: [PATCH 3/4] update workflow --- .github/workflows/cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 0eeab10..a6b3d97 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -47,7 +47,7 @@ jobs: - name: Install stac-fastapi-mongo run: | - pip install ./stac_fastapi/mongo[dev,server] + pip install .[dev,server] - name: Run test suite against Mongo run: | From 7bab2326a192dd4ecc452fac0ba0ac2812a255bc Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Mon, 11 Mar 2024 00:14:24 +0800 Subject: [PATCH 4/4] update deploy dockerfile --- dockerfiles/Dockerfile.deploy.mongo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/Dockerfile.deploy.mongo b/dockerfiles/Dockerfile.deploy.mongo index d0d95df..b1c2428 100644 --- a/dockerfiles/Dockerfile.deploy.mongo +++ b/dockerfiles/Dockerfile.deploy.mongo @@ -12,7 +12,7 @@ WORKDIR /app COPY . /app -RUN pip install --no-cache-dir ./stac_fastapi/mongo[server] +RUN pip install --no-cache-dir .[server] EXPOSE 8080