Permalink
Browse files

Refactoring

  • Loading branch information...
AndreaCensi committed Oct 16, 2018
1 parent 44ce7c1 commit 3c0fe716de1b72281a67f7d839a7c6a479dd6888
Showing with 1,328 additions and 1,104 deletions.
  1. +2 −2 book/software_devel/00_part_development.md
  2. +5 −0 book/software_devel/05_devel_environment/00_part_devel_env.md
  3. +3 −0 book/software_devel/05_devel_environment/20_IDEs.md
  4. +3 −0 book/software_devel/05_devel_environment/30_shells.md
  5. +3 −0 book/software_devel/05_devel_environment/40_makefiles.md
  6. +5 −0 book/software_devel/06_git_for_devel/00_part_devel_env.md
  7. +5 −0 book/software_devel/07_python_basics/00_part_python_prog.md
  8. +0 −22 book/software_devel/{10_python → 07_python_basics}/05_python_devel_basics.md
  9. +11 −16 book/software_devel/{10_python → 07_python_basics}/07_code_conventions.md
  10. +3 −7 book/software_devel/{10_python/06_yaml.md → 07_python_basics/10_yaml.md}
  11. +14 −0 book/software_devel/07_python_basics/45_ipython.md
  12. 0 book/software_devel/08_python_basics_exercises/00_part_python_ex.md
  13. +1 −0 book/software_devel/10_docker/00_part_docker.md
  14. +0 −8 book/software_devel/{99_docker → 10_docker}/01_docker.md
  15. 0 book/software_devel/{99_docker → 10_docker}/02_getting_started.md
  16. +7 −0 book/software_devel/10_docker/50_troubleshooting.md
  17. 0 book/software_devel/{99_docker → 10_docker}/pics/docker_cloud_autobuild.png
  18. 0 book/software_devel/{99_docker → 10_docker}/pics/docker_diagram.svg
  19. 0 book/software_devel/{99_docker → 10_docker}/pics/docker_hub_autobuild.png
  20. 0 book/software_devel/{99_docker → 10_docker}/pics/docker_logo.png
  21. 0 book/software_devel/{99_docker → 10_docker}/pics/docker_registry.png
  22. 0 book/software_devel/{99_docker → 10_docker}/pics/picam-container.png
  23. 0 book/software_devel/{99_docker → 10_docker}/pics/portainer.png
  24. 0 book/software_devel/{99_docker → 10_docker}/pics/portainer_duckieshell.png
  25. 0 book/software_devel/{99_docker → 10_docker}/pics/repository_links.png
  26. 0 book/software_devel/{99_docker → 10_docker}/pics/rqt_dep_joystick.png
  27. 0 book/software_devel/{99_docker → 10_docker}/pics/rqt_graph_joystick.png
  28. +0 −1 book/software_devel/10_python/00_part_python_prog.md
  29. +0 −180 book/software_devel/10_python/10_duckietown_configuration.md
  30. +0 −58 book/software_devel/10_python/45_makefiles.md
  31. +0 −62 book/software_devel/10_python/50_jupyter.md
  32. +0 −35 book/software_devel/10_python/70_conforming_ROS_package.md
  33. +0 −52 book/software_devel/10_python/97_road_release.md
  34. +3 −0 book/software_devel/11_docker_exercises/00_part_docker.md
  35. +3 −0 book/software_devel/12_writing_programs_that_work/00_part_creating.md
  36. 0 book/software_devel/{10_python/90_unit_tests.md → 12_writing_programs_that_work/10_unit_tests.md}
  37. 0 .../96_continuous_integration.md → 12_writing_programs_that_work/26_ci/26_continuous_integration.md}
  38. 0 book/software_devel/{10_python → 12_writing_programs_that_work/26_ci}/actual_bug-resized-1024.jpg
  39. 0 book/software_devel/{10_python → 12_writing_programs_that_work/26_ci}/checks-done.png
  40. 0 book/software_devel/{10_python → 12_writing_programs_that_work/26_ci}/checks-failure.png
  41. 0 book/software_devel/{10_python → 12_writing_programs_that_work/26_ci}/checks-in-progress.png
  42. 0 book/software_devel/{10_python → 12_writing_programs_that_work/26_ci}/circleci-screenshot.png
  43. 0 book/software_devel/{10_python → 12_writing_programs_that_work/26_ci}/compare-and-pull.png
  44. 0 book/software_devel/{10_python → 12_writing_programs_that_work/26_ci}/compare.png
  45. 0 book/software_devel/{10_python → 12_writing_programs_that_work/26_ci}/green-dot.png
  46. 0 book/software_devel/{10_python → 12_writing_programs_that_work/26_ci}/merge-failed.png
  47. 0 book/software_devel/{10_python → 12_writing_programs_that_work/26_ci}/squash.png
  48. +11 −7 book/software_devel/{10_python → 12_writing_programs_that_work}/85_bug_squashing_guide.md
  49. +3 −0 book/software_devel/12_writing_programs_that_work/actual_bug-resized-1024.jpg
  50. 0 book/software_devel/{10_python → 12_writing_programs_that_work}/actual_bug.jpg
  51. +0 −3 book/software_devel/20_dt-shell/00_part_dt-shell.md
  52. +0 −41 book/software_devel/20_dt-shell/01_intro.md
  53. +0 −64 book/software_devel/20_dt-shell/20_commands.md
  54. +0 −198 book/software_devel/20_dt-shell/30_custom_commands.md
  55. +0 −9 book/software_devel/20_dt-shell/99_troubleshooting.md
  56. +4 −0 book/software_devel/23_working_with_images/00_part_working_with_images.md
  57. 0 book/software_devel/{10_python → 23_working_with_images}/80_duckietown_utils.md
  58. +4 −0 book/software_devel/24_working_with_images_exercises/00_part_exercises_images.md
  59. +67 −0 book/software_devel/24_working_with_images_exercises/10_exercise_image_ops.md
  60. +123 −0 book/software_devel/24_working_with_images_exercises/11_exercise_image_ops_adult.md
  61. +3 −0 book/software_devel/24_working_with_images_exercises/image-ops/image-ops-flip.jpg
  62. +3 −0 book/software_devel/24_working_with_images_exercises/image-ops/image-ops-original.jpg
  63. +3 −0 book/software_devel/24_working_with_images_exercises/image-ops/image-ops-side.jpg
  64. +1 −0 book/software_devel/35_ros/00_part_creating.md
  65. +1 −0 book/software_devel/35_ros/10_ros_logs.md
  66. 0 book/software_devel/{10_python → 35_ros}/15_node_configuration.md
  67. 0 book/software_devel/{10_python → 35_ros}/45-ROS-pkg_name.md
  68. +4 −0 book/software_devel/36_ros_exercises/00_part_exercises_images.md
  69. +93 −0 book/software_devel/36_ros_exercises/25_exercise_ros_logs.md
  70. +54 −0 book/software_devel/36_ros_exercises/26_exercise_bag_decimate.md
  71. +58 −0 book/software_devel/36_ros_exercises/26_exercise_bag_thumbnails.md
  72. +74 −0 book/software_devel/36_ros_exercises/28_exercise_img_instagram.md
  73. +49 −0 book/software_devel/36_ros_exercises/29_exercise_bag_instagram.md
  74. +45 −0 book/software_devel/36_ros_exercises/30_exercise_live_instagram.md
  75. +410 −0 book/software_devel/36_ros_exercises/40_exercise_image_pipeline.md
  76. +250 −0 book/software_devel/36_ros_exercises/40_exercise_image_pipeline_adult.md.old
  77. +0 −1 book/software_devel/99_docker/00_part_docker.md
  78. +0 −338 book/software_devel/99_docker/03_easy_logs.md
@@ -1,5 +1,5 @@
# Software development guide {#book:sw-development status=ready}
# Duckietown Software development guide {#book:sw-development status=ready}
Maintainer: Andrea Censi
This part is about how to develop software for the Duckiebot.
This part is about how to develop software in Duckietown
@@ -0,0 +1,5 @@
# Development environment {#part:devel-env status=draft}
This part describes how to set up a proper development environment, including ergonomics.
@@ -0,0 +1,3 @@
# IDEs {#IDEs status=draft}
TODO: to write
@@ -0,0 +1,3 @@
# Shells {#shells status=draft}
TODO: to write
@@ -0,0 +1,3 @@
# Using Makefiles {#using-makefiles status=draft}
TODO: to write
@@ -0,0 +1,5 @@
# Git for development {#part:git-devel status=draft}
TODO: to write
@@ -0,0 +1,5 @@
# Python programming basics {#part:sw-devel-python status=ready}
This part describes the basics of Python programming and some of the
conventions for Duckietown.
@@ -37,28 +37,6 @@ TODO: how to catch and re-raise
TODO: to write
## Downloading resources
Use this recipe if you need to download things:
from duckietown_utils.download import download_if_not_exist
url = 'https://www.dropbox.com/s/bzezpw8ivlfu4b0/frame0002.jpg?dl=0'
f = 'local.jpg'
download_if_not_exist(url, f)
(Do not commit JPGs and other binary data to the `Software` repository.)
TODO: actually use `urls.yaml`
## IPython
How to enter IPython:
from IPython import embed()
a = 10
embed() # enters interactive mode
## Idioms
@@ -10,9 +10,7 @@ Never use tabs in Python files.
The tab characters are evil in Python code. Please be *very* careful in changing them.
Do *not* use a tool to do it (e.g. "Convert tabs to spaces"); it will get it wrong.
Better: checked by `what-the-duck`.
### Spaces
Indentation is 4 spaces.
@@ -21,15 +19,11 @@ Indentation is 4 spaces.
Lines should be below 85 characters.
Better: `what-the-duck` report those above 100 characters.
This is just a symptom of a bigger problem.
The problem here is that you do not do how to program well,
Long lines are a symptom of a bigger problem. The problem here is that you do not do how to program well,
therefore you create programs with longer lines.
Do not go and try to shorten the lines; the line length is just the symptom.
Rather, ask somebody to take a look at the code and tell you how to make it better.
Do not go and try to shorten the lines; the line length is just the symptom. Rather, ask somebody to take a look at the code and tell you how to make it better.
### The encoding line
@@ -57,22 +51,23 @@ Comments, better:
# This is my long comment
from std_msgs.msg import String
## Logging {status=draft}
## Logging
<!--
For logging, import this logger:
from duckietown_utils import logger
-->
TODO: to write
## Exceptions {status=draft}
DTConfigException
## Exceptions {status=draft}
raise_wrapped
compact = True
TODO: to write
## Scripts {status=draft}
## Script entry points {status=draft}
def summary():
@@ -5,19 +5,15 @@ in Duckietown.
## Pointers to documentation
TODO: to write pointers
TODO: to write
## Editing YAML files
TODO: to write pointers
TODO: to write
## Reading and writing YAML files in Python
TODO: the yaml library
TODO: the ruamel.yaml library
## Duckietown wrapping API
TODO: to write
@@ -0,0 +1,14 @@
# IPython {#python-devel-ipython status=draft}
TODO: to write
## IPython
How to enter IPython:
from IPython import embed()
a = 10
embed() # enters interactive mode
@@ -0,0 +1 @@
# Basic Docker development {#part:docker-devel status=ready}
@@ -296,11 +296,3 @@ Docker Cloud is integrated with the Docker Hub (and may one day replace it). Bui
<img src="pics/docker_cloud_autobuild.png"/>
<figcaption>Docker Cloud allows a longer build timeout, and has more sophisticated build configuration features.</figcaption>
</figure>
## Troubleshooting{#sec-docker-troubleshooting}
Symptom: `E: Failed to fetch http://packages.ros.org/ros/ubuntu/dists/xenial/main/binary-amd64/Packages Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device) [IP: 64.50.233.100 80]`
Note: Only happens in Mac since Docker is actually running VM with a fixed size
Resolution: Increase the size of your Disk image: Docker -> Preferences -> Disk and increase the slider and hit apply.
@@ -0,0 +1,7 @@
# Troubleshooting {#docker-troubleshooting status=ready}
Symptom: `E: Failed to fetch http://packages.ros.org/ros/ubuntu/dists/xenial/main/binary-amd64/Packages Error writing to output file - write (28: No space left on device) Error writing to file - write (28: No space left on device) [IP: 64.50.233.100 80]`
Note: Only happens in Mac since Docker is actually running VM with a fixed size
Resolution: Increase the size of your Disk image: Docker -> Preferences -> Disk and increase the slider and hit apply.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 3c0fe71

Please sign in to comment.