diff --git a/README.md b/README.md index 36cbabb..d044e8d 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ See 👖 [Conformal Tights](https://github.com/superlinear-ai/conformal-tights) ## 🎁 Features -- 🧑‍💻 Quick and reproducible development environments with VS Code's [Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers), PyCharm's [Docker Compose interpreter](https://www.jetbrains.com/help/pycharm/using-docker-compose-as-a-remote-interpreter.html#docker-compose-remote), and [GitHub Codespaces](https://github.com/features/codespaces) +- 🧑‍💻 Quick and reproducible development environments with VS Code's [Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers), PyCharm's [Dev Containers](https://www.jetbrains.com/help/pycharm/start-dev-container-inside-ide.html), and [GitHub Codespaces](https://github.com/features/codespaces) - 🌈 Cross-platform support for Linux, macOS (Apple silicon and Intel), and Windows - 🐚 Modern shell prompt with [Starship](https://github.com/starship/starship) - 📦 Packaging and dependency management with [Poetry](https://github.com/python-poetry/poetry) diff --git a/{{ cookiecutter.__project_name_kebab_case }}/.devcontainer/devcontainer.json b/{{ cookiecutter.__project_name_kebab_case }}/.devcontainer/devcontainer.json index 0937b17..89938c3 100644 --- a/{{ cookiecutter.__project_name_kebab_case }}/.devcontainer/devcontainer.json +++ b/{{ cookiecutter.__project_name_kebab_case }}/.devcontainer/devcontainer.json @@ -7,6 +7,12 @@ "overrideCommand": true, "postStartCommand": "cp --update /opt/build/poetry/poetry.lock /workspaces/${localWorkspaceFolderBasename}/ && mkdir -p /workspaces/${localWorkspaceFolderBasename}/.git/hooks/ && cp --update /opt/build/git/* /workspaces/${localWorkspaceFolderBasename}/.git/hooks/", "customizations": { + "jetbrains": { + "backend": "PyCharm", + "plugins": [ + "com.github.copilot" + ] + }, "vscode": { "extensions": [ "charliermarsh.ruff", diff --git a/{{ cookiecutter.__project_name_kebab_case }}/Dockerfile b/{{ cookiecutter.__project_name_kebab_case }}/Dockerfile index 88aa063..fe17421 100644 --- a/{{ cookiecutter.__project_name_kebab_case }}/Dockerfile +++ b/{{ cookiecutter.__project_name_kebab_case }}/Dockerfile @@ -66,12 +66,13 @@ RUN --mount=type=cache,uid=$UID,gid=$GID,target=/home/user/.cache/pypoetry/ \ FROM poetry AS dev -# Install development tools: curl, git, gpg, ssh, starship, sudo, vim, and zsh. +# Install development tools: curl, git, gpg, nodejs, ssh, starship, sudo, vim, and zsh. USER root RUN --mount=type=cache,target=/var/cache/apt/ \ --mount=type=cache,target=/var/lib/apt/ \ + curl -fsSL https://deb.nodesource.com/setup_current.x | bash - && apt-get update && \ - apt-get install --no-install-recommends --yes curl git gnupg ssh sudo vim zsh && \ + apt-get install --no-install-recommends --yes curl git gnupg nodejs ssh sudo vim zsh && \ sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- "--yes" && \ usermod --shell /usr/bin/zsh user && \ echo 'user ALL=(root) NOPASSWD:ALL' > /etc/sudoers.d/user && chmod 0440 /etc/sudoers.d/user diff --git a/{{ cookiecutter.__project_name_kebab_case }}/README.md b/{{ cookiecutter.__project_name_kebab_case }}/README.md index 7934394..a19fca4 100644 --- a/{{ cookiecutter.__project_name_kebab_case }}/README.md +++ b/{{ cookiecutter.__project_name_kebab_case }}/README.md @@ -149,9 +149,9 @@ The following development environments are supported: {% if cookiecutter.continuous_integration == "GitHub" %} 1. ⭐️ _GitHub Codespaces_: click on _Code_ and select _Create codespace_ to start a Dev Container with [GitHub Codespaces](https://github.com/features/codespaces). {%- endif %} -1. ⭐️ _Dev Container (with container volume)_: click on [Open in Dev Containers](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url={{ cookiecutter.project_url.replace("https://", "git@").replace(".com/", ".com:") if cookiecutter.private_package_repository_url else cookiecutter.project_url }}) to clone this repository in a container volume and create a Dev Container with VS Code. -1. _Dev Container_: clone this repository, open it with VS Code, and run Ctrl/⌘ + + P → _Dev Containers: Reopen in Container_. -1. _PyCharm_: clone this repository, open it with PyCharm, and [configure Docker Compose as a remote interpreter](https://www.jetbrains.com/help/pycharm/using-docker-compose-as-a-remote-interpreter.html#docker-compose-remote) with the `dev` service. +1. ⭐️ _VS Code Dev Container (with container volume)_: click on [Open in Dev Containers](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url={{ cookiecutter.project_url.replace("https://", "git@").replace(".com/", ".com:") if cookiecutter.private_package_repository_url else cookiecutter.project_url }}) to clone this repository in a container volume and create a Dev Container with VS Code. +1. _VS Code Dev Container_: clone this repository, open it with VS Code, and run Ctrl/⌘ + + P → _Dev Containers: Reopen in Container_. +1. _PyCharm Dev Container_: clone this repository, open it with PyCharm, [create a Dev Container with Mount Sources](https://www.jetbrains.com/help/pycharm/start-dev-container-inside-ide.html), and [configure an existing Python interpreter](https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html#widget) at `/opt/{{ cookiecutter.__project_name_kebab_case }}-env/bin/python`. 1. _Terminal_: clone this repository, open it with your terminal, and run `docker compose up --detach dev` to start a Dev Container in the background, and then run `docker compose exec dev zsh` to open a shell prompt in the Dev Container.