Skip to content

Commit 31b1dbf

Browse files
committed
add pre-commit and CI config
1 parent e7e7922 commit 31b1dbf

8 files changed

Lines changed: 52 additions & 11 deletions

File tree

.github/workflows/build_wheels.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build Wheels
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build_wheels:
10+
name: Build wheels on ${{ matrix.os }}
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest]
15+
steps:
16+
- name: Check out repository code
17+
uses: actions/checkout@v5
18+
- name: Build wheels
19+
uses: pypa/cibuildwheel@v3.3.0
20+
- uses: actions/upload-artifact@v4
21+
with:
22+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
23+
path: ./wheelhouse/*.whl

.pre-commit-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v6.0.0
4+
hooks:
5+
- id: check-toml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
- repo: https://github.com/psf/black
9+
rev: 22.10.0
10+
hooks:
11+
- id: black

plannerarena/app.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,10 @@ def data():
118118
ui.update_nav_panel("navbar", "database", "show")
119119
ui.update_navset("navbar", "database")
120120
ui.notification_show(
121-
"No default database found. Upload a database first.", duration=5, type="warning"
122-
)
121+
"No default database found. Upload a database first.",
122+
duration=5,
123+
type="warning",
124+
)
123125
return load_database(DATABASE)
124126
return load_database(file[0]["datapath"])
125127

@@ -136,9 +138,12 @@ def _():
136138
regression_server("regression", data)
137139
database_info_server("database_info", data)
138140

141+
139142
# create the Shiny app. The shiny command line app looks for this variable
140143
app = App(app_ui, app_server, static_assets=ASSET_DIR)
141144

145+
142146
def run():
143147
from shiny._main import run_app
148+
144149
run_app(app, host="127.0.0.1", port=8888)

plannerarena/database.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ def database_info_ui():
107107
def database_info_server(
108108
input: Inputs, output: Outputs, session: Session, data: reactive.Value
109109
):
110-
111110
@output
112111
@render.data_frame
113112
def benchmark_info():

plannerarena/www/help.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ The ompl_benchmark_statistics.py script can produce a series of plots from a dat
224224
- *date:* the date on which the experiment was performed.
225225
- *seed:* the random seed used.
226226
- *setup:* a string containing a “print-out” of all the settings of the SimpleSetup object used during benchmarking.
227-
227+
228228
Any additional columns are assumed to be numeric values corresponding to experimental hyperparameters. This can be useful to show planner performance as a function of, e.g., number of revolute joints for a parametric robot arm or number of obstacles in parametric environment. Planner Arena will show a selection widget for each hyperparameter. The user can choose to (1) aggregate planner runs over all hyperparameter values, (2) show performance separated out by hyperparameter value, or (3) show performance for one selected hyperparameter value.
229229
- **plannerConfigs**. There are a number of planner types (such as PRM and RRT), but each planner can typically be configured with a number of parameters. A planner configuration refers to a planner type with specific parameter settings. The `plannerConfigs` table contains the following information:
230230
- *id:* an ID used in the `runs` table to denote that a given planner configuration was used for a run.
@@ -238,8 +238,8 @@ The ompl_benchmark_statistics.py script can produce a series of plots from a dat
238238
- *id:* ID of the run
239239
- *experimentid:* ID of the experiment to which this run belonged.
240240
- *plannerid:* ID of the planner configuration used for this run.
241-
242-
In addition, there will be many benchmark statistics. None are *required*, but the OMPL planners all report the properties described above such as time, memory, solution length, simplification time, etc. It is possible that not all planners report the same properties. In that case, planners that do not report such properties will have NULL values in the corresponding fields. Users can programmatically define new properties that can get logged for each run in OMPL.
241+
242+
In addition, there will be many benchmark statistics. None are *required*, but the OMPL planners all report the properties described above such as time, memory, solution length, simplification time, etc. It is possible that not all planners report the same properties. In that case, planners that do not report such properties will have NULL values in the corresponding fields. Users can programmatically define new properties that can get logged for each run in OMPL.
243243
- **progress**. Some planners (such as RRT*) can also periodically report properties *during* a run. This can be useful to analyze the convergence or growth rate. The `progress` table contains the following information:
244244
- *runid:* the ID of the run for which progress data was tracked.
245245
- *time:* the time (in sec.) at which the property was measured.
@@ -248,6 +248,5 @@ The ompl_benchmark_statistics.py script can produce a series of plots from a dat
248248
- *iterations:* the number of iterations.
249249
- *collision_checks:* the number of collision checks (or, more precisely, the number state validator calls).
250250
- *best_cost:* the cost of the best solution found so far.
251-
251+
252252
As with run properties, users can programmatically define their own progress properties that will be logged during each run of a planner.
253-

plannerarena/www/plannerarena.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,4 @@ label[disabled] {
169169
.navbar:not(.fixed-bottom):not(.navbar-fixed-bottom):not(.navbar-fixed-bottom)+div>.tab-content>.tab-pane {
170170
--bslib-navbar-margin: 0px;
171171
margin-top: var(--bslib-navbar-margin);
172-
}
172+
}

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,8 @@ requires = ["setuptools >= 77.0.3"]
4242
build-backend = "setuptools.build_meta"
4343

4444
[tool.setuptools.package-data]
45-
plannerarena = ["www/ga.js", "www/help.md", "www/plannerarena.css"]
45+
plannerarena = ["www/ga.js", "www/help.md", "www/plannerarena.css"]
46+
47+
[tool.cibuildwheel]
48+
build-verbosity = 1
49+
skip = ""

shiny-server.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ server {
77
log_dir /var/log/shiny-server;
88
directory_index off;
99
}
10-
}
10+
}

0 commit comments

Comments
 (0)