Skip to content

Commit

Permalink
commit remaining
Browse files Browse the repository at this point in the history
  • Loading branch information
sean committed Apr 3, 2024
1 parent 7bd68ac commit 92531d9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
21 changes: 13 additions & 8 deletions openeo_fastapi/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,33 +84,38 @@ def new(path):
raise ValueError("Provided path does not exist.")
else:
path = Path(fs.get_mapper("").root)



openeo_dir = path / "openeo_api"
db_dir = openeo_dir / "psql"
init_file = openeo_dir / "__init__.py"
app_file = openeo_dir / "app.py"
revise_file = openeo_dir / "revise.py"


alembic_dir = db_dir / "alembic"
alembic_models = db_dir / "models.py"
alembic_ini = db_dir / "alembic.ini"

fs.mkdir(openeo_dir)

db_dir = openeo_dir / "psql"
fs.mkdir(db_dir)

alembic_dir = db_dir / "alembic"
fs.mkdir(alembic_dir)

alembic_models = db_dir / "models.py"

fs.touch(alembic_models)
with fs.open(alembic_models, 'w') as f:
f.write(get_models_template())

alembic_ini = db_dir / "alembic.ini"
alembic_cfg = Config(alembic_ini)

command.init(
alembic_cfg,
directory=alembic_dir
)

init_file = openeo_dir / "__init__.py"
fs.touch(init_file)

app_file = openeo_dir / "app.py"
fs.touch(app_file)
with fs.open(app_file, 'w') as f:
f.write(get_app_template())
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openeo-fastapi"
version = "2024.3.2"
version = "2024.4.1"
description = "FastApi implementation conforming to the OpenEO Api specification."
authors = ["Sean Hoyal <sean.hoyal@external.eodc.eu>"]
readme = "README.md"
Expand Down Expand Up @@ -49,6 +49,7 @@ pytest-cov = "^4.0.0"
pytest-asyncio = "^0.23.0"
aioresponses = "^0.7.5"
pytest-postgresql = ">=4.1.1"
sphinx = "7.2.6"

[tool.poetry.scripts]
openeo_fastapi = "openeo_fastapi.cli:cli"
Expand Down

0 comments on commit 92531d9

Please sign in to comment.