Skip to content

Commit 3e920cd

Browse files
authored
Docstrings (#48)
* Add doc auto generate from docstrings (use numpy style) * Add python formatter * Add devcontainer config
1 parent 02915ff commit 3e920cd

File tree

15 files changed

+678
-362
lines changed

15 files changed

+678
-362
lines changed

.devcontainer/devcontainer.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose
3+
{
4+
"name": "cart-pole",
5+
6+
// Update the 'dockerComposeFile' list if you have more compose files or use different names.
7+
// The .devcontainer/docker-compose.yml file contains any overrides you need/want to make.
8+
"dockerComposeFile": ["../docker-compose.yaml"],
9+
10+
// The 'service' property is the name of the service for the container that VS Code should
11+
// use. Update this value and .devcontainer/docker-compose.yml to the real service name.
12+
"service": "cartpole",
13+
14+
// The optional 'workspaceFolder' property is the path VS Code should open by default when
15+
// connected. This is typically a file mount in .devcontainer/docker-compose.yml
16+
"workspaceFolder": "/cartpole"
17+
18+
// Features to add to the dev container. More info: https://containers.dev/features.
19+
// "features": {},
20+
21+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
22+
// "forwardPorts": [],
23+
24+
// Uncomment the next line if you want start specific services in your Docker Compose config.
25+
// "runServices": [],
26+
27+
// Uncomment the next line if you want to keep your containers running after VS Code shuts down.
28+
// "shutdownAction": "none",
29+
30+
// Uncomment the next line to run commands after the container is created.
31+
// "postCreateCommand": "cat /etc/os-release",
32+
33+
// Configure tool-specific properties.
34+
"customizations": {
35+
"vscode": {
36+
"extensions": [
37+
"ms-python.python",
38+
"ms-python.vscode-pylance",
39+
"charliermarsh.ruff",
40+
"yzhang.markdown-all-in-one"
41+
]
42+
}
43+
}
44+
45+
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
46+
// "remoteUser": "cartpole"
47+
}

.devcontainer/docker-compose.yml

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

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ RUN apt update -q \
1212
&& apt install -yq --no-install-recommends \
1313
build-essential \
1414
coinor-libipopt-dev \
15+
git \
1516
python3 \
1617
python3-dev \
1718
python3-pip \

cartpole/__init__.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,3 @@
33
from cartpole.common import CartPoleBase, Config, Error, State, Target, Limits, Parameters
44
from cartpole.eval import find_parameters
55
from cartpole.simulator import Simulator, SimulatorInfo
6-
7-
8-
# We suggest to use loging in following way:
9-
# import cartpole.log as log
10-
#
11-
# log.setup(log_path='evaluation_example.mcap')
12-
# log.info('hello world!')
13-
# ...
14-
# log.close()
15-
16-
17-

0 commit comments

Comments
 (0)