Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/poetry installer #97

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,6 @@ dmypy.json

# Temporary Files
tmp

# pyenv
.python-version
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
* Prerequisites
* Python 3.6 +

Manage FastAPI can be installed by running
Manage FastAPI can be installed by running

```python
pip install manage-fastapi
pip install manage-fastapi
```


Expand All @@ -69,7 +69,7 @@ fastapi startproject [name] --interactive

## Command line options 🧰

Manage FastAPI provides three different commands.
Manage FastAPI provides three different commands.

You can list them with

Expand Down
2 changes: 1 addition & 1 deletion manage_fastapi/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def camel_to_snake(text: str) -> str:

def question(choices: EnumType) -> questionary.Question:
prompt = camel_to_snake(choices.__name__).replace("_", " ") # type: ignore
return questionary.select(f"Select the {prompt}: ", choices=list(choices))
return questionary.select(f"Select the {prompt}: ", choices=[choices])


def binary_question(option: str) -> questionary.Question:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ENV PYTHONPATH "${PYTHONPATH}:/"
ENV PORT=8000
{% if cookiecutter.packaging == "poetry" %}
# Install Poetry
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && \
RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/opt/poetry python && \
cd /usr/local/bin && \
ln -s /opt/poetry/bin/poetry && \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New installer changes the way Poetry is installed (it's similar to how pipx does it), so this probably won't work as intended

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean on new Apple chips also ?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The installer is cross-platform

poetry config virtualenvs.create false
Expand Down