Skip to content

Commit 34e075d

Browse files
committed
cleanup root dir
1 parent 13f19b2 commit 34e075d

File tree

267 files changed

+400
-15438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

267 files changed

+400
-15438
lines changed

.gitignore

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,21 @@ target/
99
*.odp#
1010
*.egg-info
1111
*.pyc
12-
open-codegen/opengen/icasadi/extern/Makefile
12+
python/opengen/icasadi/extern/Makefile
1313
virt
1414
data
1515
my_optimizers
1616
.python_test_build
1717
dist/
1818

1919
# Python tests create this folder:
20-
open-codegen/opengen/.python_test_build/
20+
python/.python_test_build/
21+
python/.python_test_build_ocp/
22+
python/.pytest_cache/
23+
python/build/
24+
python/dist/
25+
python/htmlcov/
26+
python/opengen.egg-info/
2127

2228
# Haphazard files:
2329
__main.rs
@@ -26,31 +32,31 @@ design/open-interfaces.jpeg
2632
design/open-interfaces.odp
2733
design/open-interfaces.png
2834
main.rs
29-
open-codegen/run/
30-
open-codegen/venv*
35+
python/run/
36+
python/venv*
3137

3238

3339
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
3440
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
35-
/Cargo.lock
41+
/rust/Cargo.lock
3642
open-clib/Cargo.lock
3743

3844
# These are backup files generated by rustfmt
3945
*.rs.bk
4046

4147
# Docusaurus website (autogenerated files)
42-
/website/i18n/
43-
/website/node_modules/
44-
/website/yarn.lock
45-
/website/build/
46-
/website/.docusaurus/
47-
!/website/pages/
48-
!/website/static/
49-
!/website/*.js
50-
!/website/blog/
51-
!/website/core/Footer.js
52-
!/website/README.md
53-
!/website/publish.sh
48+
/docs/website/i18n/
49+
/docs/website/node_modules/
50+
/docs/website/yarn.lock
51+
/docs/website/build/
52+
/docs/website/.docusaurus/
53+
!/docs/website/pages/
54+
!/docs/website/static/
55+
!/docs/website/*.js
56+
!/docs/website/blog/
57+
!/docs/website/core/Footer.js
58+
!/docs/website/README.md
59+
!/docs/website/publish.sh
5460

5561
# icasadi external files
5662
/icasadi/extern/
@@ -59,7 +65,7 @@ open-clib/Cargo.lock
5965
/.vscode/
6066

6167
# Main file
62-
/src/main.rs
68+
/rust/src/main.rs
6369

6470
# Autogenerated files (builds)
6571
/autogenerated_*

Cargo.toml

Lines changed: 0 additions & 142 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ OpEn allows application developers and researchers to focus on the challenges of
6666
### Embedded applications
6767
OpEn can run on embedded devices; here we see it running on an intel Atom for the autonomous navigation of a lab-scale micro aerial vehicle - the controller runs at **20Hz** using only **15%** CPU!
6868

69-
<img src="https://raw.githubusercontent.com/alphaville/optimization-engine/master/website/static/img/e8f236af8d38.gif" alt="Fast NMPC of MAV" width="55%"/>
69+
<img src="https://raw.githubusercontent.com/alphaville/optimization-engine/master/docs/website/static/img/e8f236af8d38.gif" alt="Fast NMPC of MAV" width="55%"/>
7070

7171

7272
## Optimal Control
@@ -196,7 +196,7 @@ let status = optimizer.solve(&mut u)?;
196196
```
197197

198198
See the dedicated [Rust documentation](https://alphaville.github.io/optimization-engine/docs/openrust-basic) for a full introduction and more complete examples.
199-
See more Rust examples [here](examples).
199+
See more Rust examples [here](rust/examples).
200200

201201
## Check out next...
202202

ci/script.sh

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
#!/bin/bash
22
set -euxo pipefail
33

4+
# To use locally, from the root directory and from a bash shell...
5+
#
6+
# 1. To run the core Python tests:
7+
# ci/script.sh python-tests
8+
#
9+
# 2. To run the Python OCP tests:
10+
# ci/script.sh ocp-tests
11+
#
12+
# 3. To run the Python ROS2 tests:
13+
# ci/script.sh ros2-tests
14+
415
SKIP_RPI_TEST="${SKIP_RPI_TEST:-0}"
16+
DO_DOCKER="${DO_DOCKER:-0}"
517
TASK="${1:-all-python-tests}"
618

719
function run_clippy_test() {
@@ -25,7 +37,7 @@ function run_clippy_test() {
2537
}
2638

2739
setup_python_test_env() {
28-
cd open-codegen
40+
cd python
2941
export PYTHONPATH=.
3042

3143
python -m venv venv
@@ -106,36 +118,37 @@ test_docker() {
106118
}
107119

108120
main() {
109-
if [ $DO_DOCKER -eq 0 ]; then
110-
case "$TASK" in
111-
python-tests)
112-
echo "Running Python tests and generated Clippy tests"
113-
setup_python_test_env
114-
run_python_core_tests
115-
;;
116-
ros2-tests)
117-
echo "Running ROS2 Python tests"
118-
setup_python_test_env
119-
run_python_ros2_tests
120-
;;
121-
ocp-tests)
122-
echo "Running OCP Python tests"
123-
setup_python_test_env
124-
run_python_ocp_tests
125-
;;
126-
all-python-tests)
127-
echo "Running Python tests, generated Clippy tests, and OCP tests"
128-
all_python_tests
129-
;;
130-
*)
131-
echo "Unknown task: $TASK"
132-
exit 1
133-
;;
134-
esac
135-
else
121+
if [ "$DO_DOCKER" -ne 0 ]; then
136122
echo "Building Docker image"
137123
test_docker
124+
return
138125
fi
126+
127+
case "$TASK" in
128+
python-tests)
129+
echo "Running Python tests and generated Clippy tests"
130+
setup_python_test_env
131+
run_python_core_tests
132+
;;
133+
ros2-tests)
134+
echo "Running ROS2 Python tests"
135+
setup_python_test_env
136+
run_python_ros2_tests
137+
;;
138+
ocp-tests)
139+
echo "Running OCP Python tests"
140+
setup_python_test_env
141+
run_python_ocp_tests
142+
;;
143+
all-python-tests)
144+
echo "Running Python tests, generated Clippy tests, and OCP tests"
145+
all_python_tests
146+
;;
147+
*)
148+
echo "Unknown task: $TASK"
149+
exit 1
150+
;;
151+
esac
139152
}
140153

141154
main

ci/sphinx-documentation.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pip install sphinx
2727
pip install sphinx-rtd-theme
2828

2929
# Install opengen
30-
pushd open-codegen
30+
pushd python
3131
pip install .
3232
popd # back to $GITHUB_WORKSPACE
3333

@@ -48,11 +48,11 @@ git checkout $current_branch
4848
# Build the docs
4949
rm -rf sphinx
5050
mkdir -p sphinx
51-
pushd sphinx-dox
52-
sphinx-apidoc -o ./source/ ../open-codegen/opengen
51+
pushd docs/sphinx
52+
sphinx-apidoc -o ./source/ ../../python/opengen
5353
echo Last updated: $(date -u) >> source/index.rst; sed '$d' source/index.rst; # update date at the end of file
5454
make html || :
55-
cp -r build/html/ ../sphinx
55+
cp -r build/html/ ../../sphinx
5656
git checkout source/index.rst # no need to commit this
5757
popd # back to $GITHUB_WORKSPACE
5858

examples/README.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)