Skip to content

Commit

Permalink
refactor into book subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
RussTedrake committed Dec 23, 2023
1 parent 8e724fd commit 1d4923e
Show file tree
Hide file tree
Showing 343 changed files with 1,313 additions and 246 deletions.
4 changes: 2 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ build --action_env=GRB_LICENSE_FILE
# Location of the MOSEK license file, typically named "mosek.lic"
build --action_env=MOSEKLM_LICENSE_FILE

build --coverage_report_generator=//htmlbook/tools/coverage:coverage_report_generator
build --coverage_support=//htmlbook/tools/coverage:coverage_support
build --coverage_report_generator=//book/htmlbook/tools/coverage:coverage_report_generator
build --coverage_support=//book/htmlbook/tools/coverage:coverage_support
build --enable_platform_specific_config=yes

build --incompatible_disable_target_provider_fields=yes
Expand Down
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ trim_trailing_whitespace = false

[*.py]
indent_size = 4
max_line_length = 79
max_line_length = 88
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[submodule "htmlbook"]
path = htmlbook
path = book/htmlbook
url = https://github.com/RussTedrake/htmlbook
[submodule "data"]
path = data
path = book/data
url = https://github.com/RussTedrake/underactuated-data
shallow = True
7 changes: 0 additions & 7 deletions .yapfignore

This file was deleted.

150 changes: 0 additions & 150 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,161 +4,11 @@
# Copyright 2020 Massachusetts Institute of Technology.
# Licensed under the BSD 3-Clause License. See LICENSE.TXT for details.

load("//htmlbook/tools/html:defs.bzl", "rt_html_test")
load("//htmlbook/tools/jupyter:defs.bzl", "rt_ipynb_test")
load("//htmlbook/tools/tidy:def.bzl", "html_tidy_test")

exports_files(
["LICENSE.TXT"],
visibility = ["//visibility:public"],
)

exports_files(
["setup.cfg"],
visibility = ["//:__subpackages__"],
)

filegroup(
name = "html",
srcs = glob([
"*.html",
"*.html.in",
]),
visibility = ["//:__subpackages__"],
)

html_tidy_test(
name = "html_tidy",
srcs = [":html"],
config = ".tidy.config",
)

rt_html_test(
srcs = ["intro.html"],
)

rt_html_test(
srcs = ["pend.html"],
)

rt_html_test(
srcs = ["acrobot.html"],
)

rt_html_test(
srcs = ["simple_legs.html"],
)

rt_html_test(
srcs = ["humanoids.html"],
)

rt_html_test(
srcs = ["stochastic.html"],
)
rt_ipynb_test(
name = "stochastic",
srcs = ["stochastic.ipynb"],
deps = ["//underactuated"],
)

rt_html_test(
srcs = ["dp.html"],
)

rt_html_test(
srcs = ["lqr.html"],
)

rt_html_test(
srcs = ["lyapunov.html"],
)

rt_html_test(
srcs = ["trajopt.html"],
)

rt_html_test(
srcs = ["planning.html"],
)

rt_html_test(
srcs = ["feedback_motion_planning.html"],
)

rt_html_test(
srcs = ["policy_search.html"],
)

rt_html_test(
srcs = ["robust.html"],
)

rt_html_test(
srcs = ["output_feedback.html"],
)

rt_html_test(
srcs = ["limit_cycles.html"],
)
rt_ipynb_test(
name = "limit_cycles",
srcs = ["limit_cycles.ipynb"],
deps = ["//underactuated"],
)

rt_html_test(
srcs = ["contact.html"],
)

rt_html_test(
srcs = ["sysid.html"],
)

rt_html_test(
srcs = ["state_estimation.html"],
)

rt_html_test(
srcs = ["rl_policy_search.html"],
)

rt_html_test(
srcs = ["drake.html"],
)

rt_html_test(
srcs = ["multibody.html"],
)

rt_ipynb_test(
name = "multibody",
srcs = ["multibody.ipynb"],
)

rt_html_test(
srcs = ["optimization.html"],
)
rt_ipynb_test(
name = "optimization",
srcs = ["optimization.ipynb"],
)


rt_html_test(
srcs = ["playbook.html"],
)

rt_html_test(
srcs = ["misc.html"],
)

filegroup(
name = "chapters",
srcs = ["chapters.json"],
visibility = ["//visibility:public"],
)

# Some methods look for this file to find the root directory.
filegroup(
name = "workspace",
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
workspace(name = "underactuated")

load(
"//htmlbook/tools:repositories.bzl",
"//book/htmlbook/tools:repositories.bzl",
"rt_dependencies",
"rt_toolchains",
)
Expand All @@ -27,11 +27,11 @@ pip_install(
requirements = "//:requirements-bazel.txt",
)

load("//htmlbook/tools/buildifier:repositories.bzl", "buildifier_dependencies")
load("//book/htmlbook/tools/buildifier:repositories.bzl", "buildifier_dependencies")

buildifier_dependencies()

load("//htmlbook/tools/tidy:repositories.bzl", "tidy_dependencies")
load("//book/htmlbook/tools/tidy:repositories.bzl", "tidy_dependencies")

tidy_dependencies()

Expand Down
File renamed without changes.
File renamed without changes.
165 changes: 165 additions & 0 deletions book/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# -*- mode: python -*-
# vi: set ft=python :

# Copyright 2020 Massachusetts Institute of Technology.
# Licensed under the BSD 3-Clause License. See LICENSE.TXT for details.

load("//book/htmlbook/tools/html:defs.bzl", "rt_html_test")
load("//book/htmlbook/tools/jupyter:defs.bzl", "rt_ipynb_test")
load("//book/htmlbook/tools/tidy:def.bzl", "html_tidy_test")

filegroup(
name = "html",
srcs = glob([
"*.html",
"*.html.in",
]),
visibility = ["//:__subpackages__"],
)

html_tidy_test(
name = "html_tidy",
srcs = [":html"],
config = ".tidy.config",
)

rt_html_test(
srcs = ["intro.html"],
data = [
"//book/data:double_pendulum_passive.html",
],
)

rt_html_test(
srcs = ["pend.html"],
)

rt_html_test(
srcs = ["acrobot.html"],
data = [
"//book/data:quadrotor2d_lqr.html",
],
)

rt_html_test(
srcs = ["simple_legs.html"],
)

rt_html_test(
srcs = ["humanoids.html"],
)

rt_html_test(
srcs = ["stochastic.html"],
)
rt_ipynb_test(
name = "stochastic",
srcs = ["stochastic.ipynb"],
deps = ["//underactuated"],
)

rt_html_test(
srcs = ["dp.html"],
data = [
"//book/data:grid_world.html",
],
)

rt_html_test(
srcs = ["lqr.html"],
)

rt_html_test(
srcs = ["lyapunov.html"],
)

rt_html_test(
srcs = ["trajopt.html"],
)

rt_html_test(
srcs = ["planning.html"],
data = [
"//book/figures:rrt_voronoi.swf",
],
)

rt_html_test(
srcs = ["feedback_motion_planning.html"],
)

rt_html_test(
srcs = ["policy_search.html"],
data = [
"//book/policy_search:pl_inequality.py",
],
)

rt_html_test(
srcs = ["robust.html"],
)

rt_html_test(
srcs = ["output_feedback.html"],
)

rt_html_test(
srcs = ["limit_cycles.html"],
)
rt_ipynb_test(
name = "limit_cycles",
srcs = ["limit_cycles.ipynb"],
deps = ["//underactuated"],
)

rt_html_test(
srcs = ["contact.html"],
)

rt_html_test(
srcs = ["sysid.html"],
)

rt_html_test(
srcs = ["state_estimation.html"],
)

rt_html_test(
srcs = ["rl_policy_search.html"],
)

rt_html_test(
srcs = ["drake.html"],
)

rt_html_test(
srcs = ["multibody.html"],
)

rt_ipynb_test(
name = "multibody",
srcs = ["multibody.ipynb"],
)

rt_html_test(
srcs = ["optimization.html"],
)
rt_ipynb_test(
name = "optimization",
srcs = ["optimization.ipynb"],
)


rt_html_test(
srcs = ["playbook.html"],
)

rt_html_test(
srcs = ["misc.html"],
)

filegroup(
name = "chapters",
srcs = ["chapters.json"],
visibility = ["//visibility:public"],
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion acrobot/BUILD.bazel → book/acrobot/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Copyright 2020-2022 Massachusetts Institute of Technology.
# Licensed under the BSD 3-Clause License. See LICENSE.TXT for details.

load("//htmlbook/tools/jupyter:defs.bzl", "rt_ipynb_test")
load("//book/htmlbook/tools/jupyter:defs.bzl", "rt_ipynb_test")

rt_ipynb_test(
name = "acrobot",
Expand Down
File renamed without changes.
Loading

0 comments on commit 1d4923e

Please sign in to comment.