Skip to content

Commit

Permalink
refactor: migrate repository to uv & simplify Pyodide build (#899)
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-gy authored Nov 17, 2024
1 parent 90d6798 commit 493757c
Show file tree
Hide file tree
Showing 44 changed files with 3,720 additions and 7,045 deletions.
98 changes: 49 additions & 49 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,58 +8,58 @@
"dockerFile": "../Dockerfile",

"features": {
// Allow using Docker from inside the container on GitHub Codespaces
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"installZsh": true,
"upgradePackages": true,
"dockerVersion": "latest",
"enableNonRootDocker": true,
"moby": true
},
// Allow opening the codespace in a local editor through SSH
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
}
},
// Allow using Docker from inside the container on GitHub Codespaces
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"installZsh": true,
"upgradePackages": true,
"dockerVersion": "latest",
"enableNonRootDocker": true,
"moby": true
},
// Allow opening the codespace in a local editor through SSH
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
}
},

// Use this environment variable if you need to bind mount your local source code into a new container.
"remoteEnv": {
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
},
// Use this environment variable if you need to bind mount your local source code into a new container.
"remoteEnv": {
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
},

// Adding default settings
"settings": {
"python.pythonPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.linting.flake8Enabled": true,
"python.formatting.provider": "black",
"python.testing.pytestEnabled": true,
"python.autoComplete.extraPaths": [
"/usr/local/lib/python3.11/site-packages"
],
"editor.tabSize": 4,
"editor.detectIndentation": false,
"editor.wordWrap": "on",
"editor.minimap.enabled": true,
"editor.renderWhitespace": "all",
"editor.formatOnSave": true
},
"customizations": {
"vscode": {
// Adding default settings
"settings": {
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.linting.flake8Enabled": true,
"python.formatting.provider": "black",
"python.testing.pytestEnabled": true,
"editor.tabSize": 4,
"editor.detectIndentation": false,
"editor.wordWrap": "on",
"editor.minimap.enabled": true,
"editor.renderWhitespace": "all",
"editor.formatOnSave": true
},

// Defining handy Python extensions
"extensions": [
"abelcour.asp-syntax-highlight",
"charliermarsh.ruff",
"GitHub.copilot",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"ms-toolsai.jupyter-keymap",
"ms-toolsai.jupyter-renderers",
"ms-vscode.makefile-tools",
"njpwerner.autodocstring",
"VisualStudioExptTeam.vscodeintellicode"
],
// Defining handy Python extensions
"extensions": [
"abelcour.asp-syntax-highlight",
"charliermarsh.ruff",
"GitHub.copilot",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"ms-toolsai.jupyter-keymap",
"ms-toolsai.jupyter-renderers",
"ms-vscode.makefile-tools",
"njpwerner.autodocstring",
"VisualStudioExptTeam.vscodeintellicode"
]
}
},

// Making ports available locally for
// [Codespaces SSH, Jupyter Book, FastAPI, Jupyter, Pyodide Console, JupyterLite]
Expand Down
10 changes: 9 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# General Python Cache
__pycache__

# Virtualenv
.venv
venv

# mypy
.mypy_cache/
.dmypy.json
Expand All @@ -18,9 +22,13 @@ dmypy.json
# temporary files
**/_tmp/*

# PyCharm
# IDE files
.idea
.vscode

.ruff_cache
.DS_Store
.dockerignore

# GitHub files
.github
Loading

0 comments on commit 493757c

Please sign in to comment.