simplify config, update guide

This commit is contained in:
David Lord 2023-04-13 09:44:00 -07:00
parent 1a3611cb6d
commit 0f73470123
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
4 changed files with 16 additions and 34 deletions

View file

@ -2,9 +2,6 @@
"name": "pallets/flask", "name": "pallets/flask",
"image": "mcr.microsoft.com/devcontainers/python:3", "image": "mcr.microsoft.com/devcontainers/python:3",
"customizations": { "customizations": {
"codespaces": {
"openFiles": []
},
"vscode": { "vscode": {
"settings": { "settings": {
"python.defaultInterpreterPath": "${workspaceFolder}/.venv", "python.defaultInterpreterPath": "${workspaceFolder}/.venv",
@ -12,10 +9,9 @@
"python.terminal.launchArgs": [ "python.terminal.launchArgs": [
"-X", "-X",
"dev" "dev"
], ]
"terminal.integrated.environmentChangesRelaunch": false
} }
} }
}, },
"onCreateCommand": "sudo chmod +x .devcontainer/on-create-command.sh && .devcontainer/on-create-command.sh" "onCreateCommand": ".devcontainer/on-create-command.sh"
} }

View file

@ -3,8 +3,7 @@ set -e
python3 -m venv .venv python3 -m venv .venv
. .venv/bin/activate . .venv/bin/activate
pip install --upgrade pip setuptools pip install -U pip setuptools wheel
pip install -r requirements/dev.txt && pip install -e . pip install -r requirements/dev.txt
pre-commit install pip install -e .
pre-commit install --install-hooks
sudo cp .devcontainer/welcome-message.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt

View file

@ -1,7 +0,0 @@
👋 Welcome to "Flask" in GitHub Codespaces!
🛠️ Your environment is setup with all the required dependencies and your fork has been added as a remote.
🚀 To start coding:
- make sure the virtualenv is activated by running `. .venv/bin/activate`
- run `git checkout -b your-branch-name origin/{main-or-latest-release}` to start working on a new feature or bug fix

View file

@ -70,23 +70,17 @@ Include the following in your patch:
First time setup using GitHub Codespaces First time setup using GitHub Codespaces
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
`GitHub Codespaces`_ allow you to create an instant and dedicated `GitHub Codespaces`_ creates a development environment that is already set up for the
development environment. Codespaces open by default in Visual Studio project. By default it opens in Visual Studio Code for the Web, but this can
Code for the Web, but also work in the desktop app. Codespaces created be changed in your GitHub profile settings to use Visual Studio Code or JetBrains
from Flask are configured with a `devcontainer`_ that installs required PyCharm on your local computer.
dependencies for you.
- Make sure you have a `GitHub account`_. - Make sure you have a `GitHub account`_.
- From the Flask repository page, click the green "Code" button and - From the project's repository page, click the green "Code" button and then "Create
then "Create codespace on main". codespace on main".
- Wait for the codespace to load and the ``postCreateCommand`` to - The codespace will be set up, then Visual Studio Code will open. However, you'll
finish running. need to wait a bit longer for the Python extension to be installed. You'll know it's
- Run the following command to activate the python virtualenv. ready when the terminal at the bottom shows that the virtualenv was activated.
.. code-block:: text
$ . .venv/bin/activate
- Check out a branch and `start coding`_. - Check out a branch and `start coding`_.
.. _GitHub Codespaces: https://docs.github.com/en/codespaces .. _GitHub Codespaces: https://docs.github.com/en/codespaces