choose editor and configure devcontainer

This commit is contained in:
Matteo Savini 2023-03-17 11:13:27 +01:00
parent b7942bb265
commit b181eb1d81
4 changed files with 12 additions and 10 deletions

View File

@ -43,8 +43,9 @@ SUPPORTED_COMBINATIONS = [
{"open_source_license": "Not open source"}, {"open_source_license": "Not open source"},
{"windows": "y"}, {"windows": "y"},
{"windows": "n"}, {"windows": "n"},
{"use_pycharm": "y"}, {"editor": "None"},
{"use_pycharm": "n"}, {"editor": "PyCharm"},
{"editor": "VS Code"},
{"use_docker": "y"}, {"use_docker": "y"},
{"use_docker": "n"}, {"use_docker": "n"},
{"postgresql_version": "14"}, {"postgresql_version": "14"},
@ -312,15 +313,16 @@ def test_error_if_incompatible(cookies, context, invalid_context):
@pytest.mark.parametrize( @pytest.mark.parametrize(
["use_pycharm", "pycharm_docs_exist"], ["editor", "pycharm_docs_exist"],
[ [
("n", False), ("None", False),
("y", True), ("PyCharm", True),
("VS Code", False),
], ],
) )
def test_pycharm_docs_removed(cookies, context, use_pycharm, pycharm_docs_exist): def test_pycharm_docs_removed(cookies, context, editor, pycharm_docs_exist):
""".""" """."""
context.update({"use_pycharm": use_pycharm}) context.update({"editor": editor})
result = cookies.bake(extra_context=context) result = cookies.bake(extra_context=context)
with open(f"{result.project_path}/docs/index.rst") as f: with open(f"{result.project_path}/docs/index.rst") as f:

View File

@ -165,7 +165,7 @@ typings/
.history/ .history/
{% if cookiecutter.use_pycharm == 'y' -%} {% if cookiecutter.editor == 'PyCharm' -%}
# Provided default Pycharm Run/Debug Configurations should be tracked by git # Provided default Pycharm Run/Debug Configurations should be tracked by git
# In case of local modifications made by Pycharm, use update-index command # In case of local modifications made by Pycharm, use update-index command
# for each changed file, like this: # for each changed file, like this:

View File

@ -35,7 +35,7 @@ ENV BUILD_ENV ${BUILD_ENVIRONMENT}
WORKDIR ${APP_HOME} WORKDIR ${APP_HOME}
{% if cookiecutter.docker == "y" %} {% if cookiecutter.use_docker == "y" %}
# devcontainer dependencies and utils # devcontainer dependencies and utils
RUN apt-get update && apt-get install --no-install-recommends -y \ RUN apt-get update && apt-get install --no-install-recommends -y \
sudo git bash-completion nano sudo git bash-completion nano

View File

@ -10,7 +10,7 @@ Welcome to {{ cookiecutter.project_name }}'s documentation!
:maxdepth: 2 :maxdepth: 2
:caption: Contents: :caption: Contents:
howto{% if cookiecutter.use_pycharm == 'y' %} howto{% if cookiecutter.editor == 'PyCharm' %}
pycharm/configuration{% endif %} pycharm/configuration{% endif %}
users users