From affe4d45aa0b3b3179113c1c37bf666d4013278b Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 5 Apr 2016 13:51:45 +0800 Subject: [PATCH] ship examples with package --- .gitignore | 10 +++++----- MANIFEST.in | 1 + .../examples}/artiq_ipython_notebook.ipynb | 0 {examples => artiq/examples}/fit_image.py | 0 {examples => artiq/examples}/master/device_db.pyon | 2 +- .../examples}/master/repository/arguments_demo.py | 0 .../repository/coredevice_examples/pdq2_simple.py | 0 .../repository/coredevice_examples/photon_histogram.py | 0 .../repository/coredevice_examples/simple/ad5360.py | 0 .../coredevice_examples/simple/blink_forever.py | 0 .../repository/coredevice_examples/simple/dds_test.py | 0 .../repository/coredevice_examples/simple/handover.py | 0 .../coredevice_examples/simple/mandelbrot.py | 0 .../master/repository/coredevice_examples/tdr.py | 0 .../master/repository/coredevice_examples/transport.py | 0 .../master/repository/flopping_f_simulation.py | 0 .../examples}/master/repository/histograms.py | 0 .../examples}/master/repository/remote_exec_demo.py | 0 .../master/repository/remote_exec_processing.py | 0 .../examples}/master/repository/run_forever.py | 0 .../examples}/master/repository/speed_benchmark.py | 0 .../master/repository/utilities/dds_setter.py | 0 .../master/repository/utilities/terminate_all.py | 0 {examples => artiq/examples}/remote_exec_controller.py | 0 {examples => artiq/examples}/sim/al_spectroscopy.py | 0 {examples => artiq/examples}/sim/device_db.pyon | 0 {examples => artiq/examples}/sim/simple_simulation.py | 0 doc/manual/faq.rst | 9 +++++++++ 28 files changed, 16 insertions(+), 6 deletions(-) rename {examples => artiq/examples}/artiq_ipython_notebook.ipynb (100%) rename {examples => artiq/examples}/fit_image.py (100%) rename {examples => artiq/examples}/master/device_db.pyon (98%) rename {examples => artiq/examples}/master/repository/arguments_demo.py (100%) rename {examples => artiq/examples}/master/repository/coredevice_examples/pdq2_simple.py (100%) rename {examples => artiq/examples}/master/repository/coredevice_examples/photon_histogram.py (100%) rename {examples => artiq/examples}/master/repository/coredevice_examples/simple/ad5360.py (100%) rename {examples => artiq/examples}/master/repository/coredevice_examples/simple/blink_forever.py (100%) rename {examples => artiq/examples}/master/repository/coredevice_examples/simple/dds_test.py (100%) rename {examples => artiq/examples}/master/repository/coredevice_examples/simple/handover.py (100%) rename {examples => artiq/examples}/master/repository/coredevice_examples/simple/mandelbrot.py (100%) rename {examples => artiq/examples}/master/repository/coredevice_examples/tdr.py (100%) rename {examples => artiq/examples}/master/repository/coredevice_examples/transport.py (100%) rename {examples => artiq/examples}/master/repository/flopping_f_simulation.py (100%) rename {examples => artiq/examples}/master/repository/histograms.py (100%) rename {examples => artiq/examples}/master/repository/remote_exec_demo.py (100%) rename {examples => artiq/examples}/master/repository/remote_exec_processing.py (100%) rename {examples => artiq/examples}/master/repository/run_forever.py (100%) rename {examples => artiq/examples}/master/repository/speed_benchmark.py (100%) rename {examples => artiq/examples}/master/repository/utilities/dds_setter.py (100%) rename {examples => artiq/examples}/master/repository/utilities/terminate_all.py (100%) rename {examples => artiq/examples}/remote_exec_controller.py (100%) rename {examples => artiq/examples}/sim/al_spectroscopy.py (100%) rename {examples => artiq/examples}/sim/device_db.pyon (100%) rename {examples => artiq/examples}/sim/simple_simulation.py (100%) diff --git a/.gitignore b/.gitignore index c85718ce8..7f4156d25 100644 --- a/.gitignore +++ b/.gitignore @@ -18,11 +18,11 @@ __pycache__/ /artiq/test/results /artiq/test/h5types.h5 -/examples/master/results -/examples/master/last_rid.pyon -/examples/master/dataset_db.pyon -/examples/sim/results -/examples/sim/dataset_db.pyon +/artiq/examples/master/results +/artiq/examples/master/last_rid.pyon +/artiq/examples/master/dataset_db.pyon +/artiq/examples/sim/results +/artiq/examples/sim/dataset_db.pyon # recommended location for testbed /run diff --git a/MANIFEST.in b/MANIFEST.in index 62b13bec3..4a36d3b1f 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ graft artiq/runtime +graft artiq/examples include artiq/gui/logo.svg include versioneer.py include artiq/_version.py diff --git a/examples/artiq_ipython_notebook.ipynb b/artiq/examples/artiq_ipython_notebook.ipynb similarity index 100% rename from examples/artiq_ipython_notebook.ipynb rename to artiq/examples/artiq_ipython_notebook.ipynb diff --git a/examples/fit_image.py b/artiq/examples/fit_image.py similarity index 100% rename from examples/fit_image.py rename to artiq/examples/fit_image.py diff --git a/examples/master/device_db.pyon b/artiq/examples/master/device_db.pyon similarity index 98% rename from examples/master/device_db.pyon rename to artiq/examples/master/device_db.pyon index 873971327..ad1c51416 100644 --- a/examples/master/device_db.pyon +++ b/artiq/examples/master/device_db.pyon @@ -204,7 +204,7 @@ "host": "::1", "port": 6283, "target_name": "camera_sim", - "command": "./remote_exec_controller.py" + "command": "python3.5 -m artiq.examples.remote_exec_controller" }, "camera_sim_rexec": { "type": "controller_aux_target", diff --git a/examples/master/repository/arguments_demo.py b/artiq/examples/master/repository/arguments_demo.py similarity index 100% rename from examples/master/repository/arguments_demo.py rename to artiq/examples/master/repository/arguments_demo.py diff --git a/examples/master/repository/coredevice_examples/pdq2_simple.py b/artiq/examples/master/repository/coredevice_examples/pdq2_simple.py similarity index 100% rename from examples/master/repository/coredevice_examples/pdq2_simple.py rename to artiq/examples/master/repository/coredevice_examples/pdq2_simple.py diff --git a/examples/master/repository/coredevice_examples/photon_histogram.py b/artiq/examples/master/repository/coredevice_examples/photon_histogram.py similarity index 100% rename from examples/master/repository/coredevice_examples/photon_histogram.py rename to artiq/examples/master/repository/coredevice_examples/photon_histogram.py diff --git a/examples/master/repository/coredevice_examples/simple/ad5360.py b/artiq/examples/master/repository/coredevice_examples/simple/ad5360.py similarity index 100% rename from examples/master/repository/coredevice_examples/simple/ad5360.py rename to artiq/examples/master/repository/coredevice_examples/simple/ad5360.py diff --git a/examples/master/repository/coredevice_examples/simple/blink_forever.py b/artiq/examples/master/repository/coredevice_examples/simple/blink_forever.py similarity index 100% rename from examples/master/repository/coredevice_examples/simple/blink_forever.py rename to artiq/examples/master/repository/coredevice_examples/simple/blink_forever.py diff --git a/examples/master/repository/coredevice_examples/simple/dds_test.py b/artiq/examples/master/repository/coredevice_examples/simple/dds_test.py similarity index 100% rename from examples/master/repository/coredevice_examples/simple/dds_test.py rename to artiq/examples/master/repository/coredevice_examples/simple/dds_test.py diff --git a/examples/master/repository/coredevice_examples/simple/handover.py b/artiq/examples/master/repository/coredevice_examples/simple/handover.py similarity index 100% rename from examples/master/repository/coredevice_examples/simple/handover.py rename to artiq/examples/master/repository/coredevice_examples/simple/handover.py diff --git a/examples/master/repository/coredevice_examples/simple/mandelbrot.py b/artiq/examples/master/repository/coredevice_examples/simple/mandelbrot.py similarity index 100% rename from examples/master/repository/coredevice_examples/simple/mandelbrot.py rename to artiq/examples/master/repository/coredevice_examples/simple/mandelbrot.py diff --git a/examples/master/repository/coredevice_examples/tdr.py b/artiq/examples/master/repository/coredevice_examples/tdr.py similarity index 100% rename from examples/master/repository/coredevice_examples/tdr.py rename to artiq/examples/master/repository/coredevice_examples/tdr.py diff --git a/examples/master/repository/coredevice_examples/transport.py b/artiq/examples/master/repository/coredevice_examples/transport.py similarity index 100% rename from examples/master/repository/coredevice_examples/transport.py rename to artiq/examples/master/repository/coredevice_examples/transport.py diff --git a/examples/master/repository/flopping_f_simulation.py b/artiq/examples/master/repository/flopping_f_simulation.py similarity index 100% rename from examples/master/repository/flopping_f_simulation.py rename to artiq/examples/master/repository/flopping_f_simulation.py diff --git a/examples/master/repository/histograms.py b/artiq/examples/master/repository/histograms.py similarity index 100% rename from examples/master/repository/histograms.py rename to artiq/examples/master/repository/histograms.py diff --git a/examples/master/repository/remote_exec_demo.py b/artiq/examples/master/repository/remote_exec_demo.py similarity index 100% rename from examples/master/repository/remote_exec_demo.py rename to artiq/examples/master/repository/remote_exec_demo.py diff --git a/examples/master/repository/remote_exec_processing.py b/artiq/examples/master/repository/remote_exec_processing.py similarity index 100% rename from examples/master/repository/remote_exec_processing.py rename to artiq/examples/master/repository/remote_exec_processing.py diff --git a/examples/master/repository/run_forever.py b/artiq/examples/master/repository/run_forever.py similarity index 100% rename from examples/master/repository/run_forever.py rename to artiq/examples/master/repository/run_forever.py diff --git a/examples/master/repository/speed_benchmark.py b/artiq/examples/master/repository/speed_benchmark.py similarity index 100% rename from examples/master/repository/speed_benchmark.py rename to artiq/examples/master/repository/speed_benchmark.py diff --git a/examples/master/repository/utilities/dds_setter.py b/artiq/examples/master/repository/utilities/dds_setter.py similarity index 100% rename from examples/master/repository/utilities/dds_setter.py rename to artiq/examples/master/repository/utilities/dds_setter.py diff --git a/examples/master/repository/utilities/terminate_all.py b/artiq/examples/master/repository/utilities/terminate_all.py similarity index 100% rename from examples/master/repository/utilities/terminate_all.py rename to artiq/examples/master/repository/utilities/terminate_all.py diff --git a/examples/remote_exec_controller.py b/artiq/examples/remote_exec_controller.py similarity index 100% rename from examples/remote_exec_controller.py rename to artiq/examples/remote_exec_controller.py diff --git a/examples/sim/al_spectroscopy.py b/artiq/examples/sim/al_spectroscopy.py similarity index 100% rename from examples/sim/al_spectroscopy.py rename to artiq/examples/sim/al_spectroscopy.py diff --git a/examples/sim/device_db.pyon b/artiq/examples/sim/device_db.pyon similarity index 100% rename from examples/sim/device_db.pyon rename to artiq/examples/sim/device_db.pyon diff --git a/examples/sim/simple_simulation.py b/artiq/examples/sim/simple_simulation.py similarity index 100% rename from examples/sim/simple_simulation.py rename to artiq/examples/sim/simple_simulation.py diff --git a/doc/manual/faq.rst b/doc/manual/faq.rst index 4c40ffdea..f3be0d69b 100644 --- a/doc/manual/faq.rst +++ b/doc/manual/faq.rst @@ -6,6 +6,15 @@ FAQ How do I ... ============ +find ARTIQ examples? +-------------------- + +The examples are installed in the ``examples`` folder of the ARTIQ package. You can find where the ARTIQ package is installed on your machine with: :: + + python3.5 -c "import artiq; print(artiq.__path__[0])" + +Copy the ``examples`` folder from that path into your home/user directory, and start experimenting! + prevent my first RTIO command from causing an underflow? --------------------------------------------------------