Skip to content

Commit fa47689

Browse files
author
Bastien Gautier
committed
🎉 First commit
0 parents  commit fa47689

File tree

11 files changed

+205
-0
lines changed

11 files changed

+205
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# See here for image contents:
2+
ARG VARIANT="3.11-bullseye"
3+
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
4+
5+
WORKDIR /workspaces/app
6+
ARG WORKSPACE_FOLDER="/workspaces/app"
7+
8+
# Install program dependencies:
9+
10+
RUN mkdir /tmp/config_container
11+
12+
COPY /.devcontainer/install-deps.sh /tmp/config_container/install-deps.sh
13+
RUN chmod +x /tmp/config_container/install-deps.sh
14+
RUN /tmp/config_container/install-deps.sh
15+
16+
RUN rm -rvf /tmp/config_container
17+
18+
# Create virtual environment:
19+
20+
VOLUME $WORKSPACE_FOLDER/.venv
21+
22+
ENV VIRTUAL_ENV=$WORKSPACE_FOLDER/.venv
23+
RUN python3 -m venv $VIRTUAL_ENV
24+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
25+
26+
# Install python dependencies:
27+
28+
RUN mkdir /tmp/config_container
29+
30+
COPY /requirements-dev.txt /tmp/config_container/requirements-dev.txt
31+
COPY /requirements.txt /tmp/config_container/requirements-all.txt
32+
33+
RUN pip install --upgrade pip
34+
RUN pip install -r /tmp/config_container/requirements-dev.txt
35+
RUN pip install -r /tmp/config_container/requirements-all.txt
36+
37+
RUN rm -rvf /tmp/config_container

.devcontainer/devcontainer.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/python-3
3+
{
4+
"name": "Python 3",
5+
"workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/app,type=bind",
6+
"workspaceFolder": "/workspaces/app",
7+
"build": {
8+
"dockerfile": "Dockerfile",
9+
"context": "..",
10+
"args": {
11+
// Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6
12+
// Append -bullseye or -buster to pin to an OS version.
13+
// Use -bullseye variants on local on arm64/Apple Silicon.
14+
"VARIANT": "3.11-bullseye",
15+
// Options
16+
"NODE_VERSION": "lts/*"
17+
}
18+
},
19+
// Configure tool-specific properties.
20+
"customizations": {
21+
// Configure properties specific to VS Code.
22+
"vscode": {
23+
// Add the IDs of extensions you want installed when the container is created.
24+
"extensions": [
25+
"ms-python.python",
26+
"ms-python.vscode-pylance"
27+
]
28+
}
29+
},
30+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
31+
// "forwardPorts": [],
32+
// Use 'postCreateCommand' to run commands after the container is created.
33+
// "postCreateCommand": "pip3 install --user -r requirements.txt",
34+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
35+
"remoteUser": "vscode"
36+
}

.devcontainer/install-deps.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
sudo apt-get update
4+
sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install vim

.gitignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
.DS_Store
2+
.huskyrc.json
3+
out
4+
log.log
5+
**/node_modules
6+
*.pyc
7+
*.vsix
8+
**/.vscode/.ropeproject/**
9+
**/testFiles/**/.cache/**
10+
*.noseids
11+
.nyc_output
12+
.vscode-test
13+
__pycache__
14+
npm-debug.log
15+
**/.mypy_cache/**
16+
!yarn.lock
17+
coverage/
18+
cucumber-report.json
19+
**/.vscode-test/**
20+
**/.vscode test/**
21+
**/.vscode-smoke/**
22+
**/.venv*/
23+
port.txt
24+
precommit.hook
25+
pythonFiles/lib/**
26+
debug_coverage*/**
27+
languageServer/**
28+
languageServer.*/**
29+
bin/**
30+
obj/**
31+
.pytest_cache
32+
tmp/**
33+
.python-version
34+
.vs/
35+
test-results*.xml
36+
xunit-test-results.xml
37+
build/ci/performance/performance-results.json
38+
!build/
39+
debug*.log
40+
debugpy*.log
41+
pydevd*.log
42+
nodeLanguageServer/**
43+
nodeLanguageServer.*/**
44+
dist/**
45+
# translation files
46+
*.xlf
47+
*.nls.*.json
48+
*.i18n.json

.vscode/extensions.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"recommendations": [
3+
"njpwerner.autodocstring",
4+
"vscode-icons-team.vscode-icons",
5+
"mohsen1.prettify-json",
6+
"ms-python.vscode-pylance",
7+
"njqdev.vscode-python-typehint",
8+
"Gruntfuggly.todo-tree"
9+
]
10+
}

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Python : Current file",
9+
"type": "python",
10+
"request": "launch",
11+
"program": "${file}",
12+
"console": "integratedTerminal"
13+
}
14+
]
15+
}

.vscode/settings.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"debug.internalConsoleOptions": "neverOpen",
3+
"python.terminal.activateEnvironment": true,
4+
"python.defaultInterpreterPath": "/workspaces/app/.venv/bin/python",
5+
"python.linting.pylamaEnabled": false,
6+
"python.linting.pylamaPath": "/workspaces/app/.venv/bin/pylama",
7+
"python.linting.mypyEnabled": false,
8+
"python.linting.mypyArgs": [],
9+
"python.linting.mypyPath": "/workspaces/app/.venv/bin/mypy",
10+
"python.linting.pylintEnabled": true,
11+
"python.linting.pylintPath": "/workspaces/app/.venv/bin/pylint",
12+
"python.linting.enabled": true,
13+
"python.formatting.provider": "yapf",
14+
"python.formatting.yapfPath": "/workspaces/app/.venv/bin/yapf",
15+
"editor.formatOnSave": true,
16+
"files.trimTrailingWhitespace": true,
17+
"files.trimFinalNewlines": true,
18+
"files.insertFinalNewline": true,
19+
"files.eol": "\n"
20+
}

main.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""..."""
2+
3+
import pandas as pd
4+
5+
ssss: str = 'RRR'
6+
7+
notes = {
8+
"Mathématiques": 19,
9+
"Français": 12,
10+
"Dessin": 15
11+
}
12+
ser: "pd.Series[str]" = pd.Series(notes, index=["Mathématiques", "Français", "Sciences Physiques", "Dessin"])
13+
14+
print(str(ser))

requirements-dev.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
pylama
2+
pylint
3+
mypy
4+
yapf

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pandas

0 commit comments

Comments
 (0)