Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

feature: make run-app command an entrypoint #243

Closed
peterschutt opened this issue Jan 14, 2023 · 3 comments
Closed

feature: make run-app command an entrypoint #243

peterschutt opened this issue Jan 14, 2023 · 3 comments

Comments

@peterschutt
Copy link
Member

No description provided.

@gazorby
Copy link
Collaborator

gazorby commented Jan 16, 2023

Seems great! So something like poetry run run-app would works out of the box?

@peterschutt
Copy link
Member Author

That's the plan at least. I gave it a quick go before and it didn't work like I thought (hoped) it would with an editable install locally.

In downstream apps I've been putting this in pyproject:

[tool.poetry.scripts]
run-app = "starlite_saqlalchemy.scripts:run_app"

It also could be a CLI feature, ssqa run or something like that, and we tie it in with #221

@peterschutt
Copy link
Member Author

Turns out this was simple, I was just missing the correct group name before.

[tool.poetry.plugins."console_scripts"]
run-app = "starlite_saqlalchemy.scripts:run_app"

With that, I can call run-app in downstream app and it runs that function as a script 👍

peterschutt added a commit that referenced this issue Jan 16, 2023
With starlite-saqlalchemy installed, calling `run-app` will execute
`starlite_saqlalchemy.scripts.run_app()`.

Closes #243
peterschutt added a commit that referenced this issue Jan 16, 2023
With starlite-saqlalchemy installed, calling `run-app` will execute
`starlite_saqlalchemy.scripts.run_app()`.

Closes #243
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants