-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* config: Add codespaces config w/ Python versions * Update Dockerfile to install poetry and tox * docs: Add instructions for using a Codespace * adds Pytest as a dev dependency * Install poetry/tox globally * config: Run poetry install after devcontainer blds * Symlink python & python3 commands to python3.12
- Loading branch information
1 parent
20c5d58
commit d3b836a
Showing
6 changed files
with
171 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu-20.04 | ||
|
||
# Install all Python versions supported by EDGAR | ||
RUN apt-get update && apt-get install -y \ | ||
software-properties-common \ | ||
&& add-apt-repository ppa:deadsnakes/ppa \ | ||
&& apt-get update && apt-get install -y \ | ||
python3.9 python3.9-dev python3.9-venv \ | ||
python3.10 python3.10-dev python3.10-venv \ | ||
python3.11 python3.11-dev python3.11-venv \ | ||
python3.12 python3.12-dev python3.12-venv curl | ||
|
||
# This installs pip for the primary version of Python we'll use | ||
# for development | ||
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 | ||
|
||
# Set default python executable for when users run python or python3 | ||
# on the command line | ||
RUN ln -sf /usr/bin/python3.12 /usr/bin/python | ||
RUN ln -sf /usr/bin/python3.12 /usr/bin/python3 | ||
|
||
# Install pipx, poetry, and tox | ||
RUN python -m pip install --upgrade pip \ | ||
&& python -m pip install pipx \ | ||
&& python -m pipx ensurepath \ | ||
&& pipx install --global poetry tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "Edgar Dev Container", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"python.defaultInterpreterPath": "/usr/bin/python3.12" | ||
}, | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"ms-python.debugpy", | ||
"ms-azuretools.vscode-docker", | ||
"mechatroner.rainbow-csv" | ||
] | ||
} | ||
}, | ||
"postCreateCommand": "poetry install" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters