@@ -69,7 +69,49 @@ Guides](https://google.github.io/styleguide/) in your code, particularly the
6969
7070# ## Development and testing
7171
72- Do your work and ` git commit` your changes to your branch as needed.
72+ Before you begin developing ReCirq experiments and modules, we recommend you
73+ first create a virtual Python environment. You can use either Python' s built-in
74+ [`venv`](https://docs.python.org/3/library/venv.html) module or another tool
75+ that you are comfortable with.
76+
77+ Then, in that virtual environment, install the ReCirq dependencies using `pip`:
78+
79+ ```shell
80+ pip install -r requirements.txt
81+ ```
82+
83+ You _may_ need to install additional requirements, depending on the ReCirq
84+ experiment you want to work on. These additional requirements will be in a
85+ file named `extra-requirements.txt` in the experiment' s subdirectory under
86+ ` recirq/` . For example, if you were working with ` recirq/optimize` , you would
87+ need to install its extra dependencies like this:
88+
89+ ` ` ` shell
90+ pip install -r recirq/optimize/extra-requirements.txt
91+ ` ` `
92+
93+ Finally, if you are going to edit any of the Jupyter notebooks, install the
94+ additional requirements needed to run the notebook format checks:
95+
96+ ` ` ` shell
97+ pip install -r dev_tools/requirements/deps/tensorflow-docs.txt
98+ ` ` `
99+
100+ Once the environment is set up, you can do your work and ` git commit` your
101+ changes to your branch as needed.
102+
103+ To test notebooks for proper formatting and other issues, run the following
104+ command:
105+
106+ ` ` ` shell
107+ dev_tools/nbformat
108+ ` ` `
109+
110+ To test your code, run
111+
112+ ` ` ` shell
113+ pytest recirq
114+ ` ` `
73115
74116# ## Pull requests and code reviews
75117
0 commit comments