Skip to content

Commit 3e43789

Browse files
author
pyocd-bot
committed
Deploying to main from @ pyocd/pyocd-website-source@6fc9417 🚀
1 parent e97c989 commit 3e43789

File tree

2 files changed

+62
-23
lines changed

2 files changed

+62
-23
lines changed

docs/developers_guide.html

Lines changed: 47 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,13 @@ <h5 class="sidebar-header">On this page</h5>
203203

204204
<h2 id="setup">Setup</h2>
205205

206+
<div class="alert alert-info">
207+
Please familiarise yourself with the [contributing guide](https://github.com/pyocd/pyOCD/blob/main/CONTRIBUTING.md)
208+
before beginning any development on pyOCD or related projects.
209+
</div>
210+
206211
<p>PyOCD developers are strongly recommended to setup a working environment using either
207-
<a href="https://virtualenv.pypa.io/en/latest/">virtualenv</a> or the built-in <code class="highlighter-rouge">venv</code> module (only use of virtualenv is shown
212+
<a href="https://virtualenv.pypa.io/en/latest/">virtualenv</a> or the built-in <code class="highlighter-rouge">venv</code> module (only use of <code class="highlighter-rouge">venv</code> is shown
208213
below, but the two are equivalent). After cloning the code, you can setup a virtualenv and install the pyOCD
209214
dependencies for the current platform by following the detailed steps below.</p>
210215

@@ -218,7 +223,6 @@ <h2 id="setup">Setup</h2>
218223
</ul>
219224
</li>
220225
<li><a href="https://git-scm.com/downloads">Install Git</a>. Add to PATH.</li>
221-
<li><a href="https://virtualenv.pypa.io/en/latest/">Install virtualenv</a> in your global Python installation, eg: <code class="highlighter-rouge">pip install virtualenv</code>. Not needed if using the built-in <code class="highlighter-rouge">venv</code> module.</li>
222226
<li><a href="https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm">Install GNU Arm Embedded toolchain</a>.
223227
This provides <code class="highlighter-rouge">arm-none-eabi-gdb</code> used for testing the gdbserver. Add to PATH.</li>
224228
</ul>
@@ -229,7 +233,7 @@ <h2 id="steps">Steps</h2>
229233

230234
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ git clone https://github.com/pyocd/pyOCD
231235
$ cd pyOCD
232-
$ virtualenv venv
236+
$ python3 -m venv venv
233237
</code></pre></div></div>
234238

235239
<p><strong>Step 2.</strong> Activate virtual environment</p>
@@ -239,23 +243,37 @@ <h2 id="steps">Steps</h2>
239243

240244
<p>Linux or Mac:</p>
241245
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ source venv/bin/activate
242-
$ pip install -e .[test]
243246
</code></pre></div></div>
244247

245248
<p>Windows:</p>
246249
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ venv\Scripts\activate
247-
$ pip install -e .[test]
248250
</code></pre></div></div>
249251

250-
<p><strong>Step 3.</strong> Develop</p>
252+
<p><strong>Step 3.</strong> Install editable pyOCD</p>
253+
254+
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ pip install -e .[test]
255+
</code></pre></div></div>
256+
257+
<p>If you switch branches, you may need to reinstall.</p>
258+
259+
<p>Because the <code class="highlighter-rouge">develop</code> branch doesn’t have version tags except older tags from the <code class="highlighter-rouge">develop</code> branch point,
260+
the version number of pyOCD might be significantly out of date. If this is an issue, you can override the
261+
version by setting the <code class="highlighter-rouge">SETUPTOOLS_SCM_PRETEND_VERSION</code> environmment variable to the desired version number
262+
(without a “v” prefix).</p>
263+
264+
<p><strong>Step 4.</strong> Develop</p>
251265

252266
<p>See the <a href="/docs/adding_new_targets.html">porting guide</a> for how to add new devices. Of course, we welcome
253267
all improvements and changes. See the <a href="https://github.com/pyocd/pyOCD/blob/main/CONTRIBUTING.md">contributor statement</a> for some guidelines.</p>
254268

255-
<p>Normally you should work from the <code class="highlighter-rouge">develop</code> branch. See the <a href="#branch-configuration-policy">branch policy</a> below for
256-
more information about branches.</p>
269+
<p>See the <a href="#branch-configuration-policy">branch policy</a> below for details about branches and which branch you should
270+
work from.</p>
257271

258-
<p><strong>Step 4.</strong> Test</p>
272+
<p>If you’d like suggestions for something to work on, from small to large, the
273+
<a href="https://join.slack.com/t/pyocd/shared_invite/zt-wmy3zvg5-nRLj1GBWYh708TVfIx9Llg">Slack</a> workspace is a great
274+
way to engage with the community and maintainers.</p>
275+
276+
<p><strong>Step 5.</strong> Test</p>
259277

260278
<p>To run the unit tests, you can execute the following.</p>
261279

@@ -274,25 +292,39 @@ <h2 id="steps">Steps</h2>
274292
$ python ./automated_test.py
275293
</code></pre></div></div>
276294

277-
<p><strong>Step 5.</strong> Pull request</p>
295+
<p><strong>Step 6.</strong> Pull request</p>
278296

279297
<p>Once you are satisfied with your changes and all automated tests pass, please create a
280-
<a href="https://github.com/pyocd/pyOCD/pull/new/develop">new pull request</a> against the <code class="highlighter-rouge">develop</code> branch on GitHub to share your work.</p>
298+
<a href="https://github.com/pyocd/pyOCD/pull/new">new pull request</a> on GitHub to share your work. Please see below for
299+
which branch to target.</p>
281300

282-
<p>Pull requests should be made after a changeset is <a href="https://www.atlassian.com/git/tutorials/merging-vs-rebasing/workflow-walkthrough">rebased onto <code class="highlighter-rouge">develop</code></a>.</p>
301+
<p>Pull requests should be made after a changeset is
302+
<a href="https://www.atlassian.com/git/tutorials/merging-vs-rebasing/workflow-walkthrough">rebased</a>.</p>
283303

284304
<h2 id="branch-configuration-policy">Branch configuration policy</h2>
285305

286306
<p>There are two primary branches:</p>
287307

288308
<ul>
289-
<li><code class="highlighter-rouge">main</code>: Stable branch reflecting the most recent release.</li>
290-
<li><code class="highlighter-rouge">develop</code>: Active development branch for the next version. Merged into <code class="highlighter-rouge">main</code> at release time.</li>
309+
<li><code class="highlighter-rouge">main</code>: Stable branch reflecting the most recent release. May contain bug fixes not yet released, but no new
310+
feature commits are allowed.</li>
311+
<li><code class="highlighter-rouge">develop</code>: Active development branch for the next minor version. Merged into <code class="highlighter-rouge">main</code> at release time.</li>
291312
</ul>
292313

293314
<p>There may be other development branches present to host long term development of major new features and backwards incompatible changes, such as API changes.</p>
294315

295-
<p>Changes should generally be made against the <code class="highlighter-rouge">develop</code> branch.</p>
316+
<p>The branch that your changes should be made against depends on the type and complexity of the changes:</p>
317+
318+
<ul>
319+
<li>Only a bug fix: please target <code class="highlighter-rouge">main</code>.</li>
320+
<li>Any other changes, or a mix of changes: target the <code class="highlighter-rouge">develop</code> branch. This is also a good choice if you aren’t sure.</li>
321+
</ul>
322+
323+
<p>Maintainers will cherry-pick commits between <code class="highlighter-rouge">main</code> and <code class="highlighter-rouge">develop</code> as necessary to keep fixes in sync.</p>
324+
325+
<p>If you have any questions about how best to submit changes or the branch policy, please ask in the
326+
<a href="https://join.slack.com/t/pyocd/shared_invite/zt-wmy3zvg5-nRLj1GBWYh708TVfIx9Llg">Slack</a> workspace or
327+
<a href="https://github.com/pyocd/pyOCD/discussions">GitHub Discussions</a>. We’ll be happy to help.</p>
296328

297329

298330
</div>

docs/installing.html

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -204,28 +204,31 @@ <h5 class="sidebar-header">On this page</h5>
204204
<p>PyOCD requires <a href="https://python.org/">Python</a> 3.6 or later, and a recent version of <a href="https://libusb.info/">libusb</a>. It runs on macOS,
205205
Linux, FreeBSD, and Windows platforms.</p>
206206

207-
<p>The latest stable version of pyOCD may be installed via <a href="https://pip.pypa.io/en/stable/index.html">pip</a>
207+
<p>The latest stable version of pyOCD may be installed or upgraded via <a href="https://pip.pypa.io/en/stable/index.html">pip</a>
208208
as follows:</p>
209209

210210
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ python3 -mpip install -U pyocd
211211
</code></pre></div></div>
212212

213213
<p><em>Note: depending on your system, you may need to use <code class="highlighter-rouge">python</code> instead of <code class="highlighter-rouge">python3</code>.</em></p>
214214

215-
<p>The latest pyOCD package is available <a href="https://pypi.python.org/pypi/pyOCD/">on PyPI</a> as well as
216-
<a href="https://github.com/pyocd/pyOCD/releases">on GitHub</a>.</p>
215+
<p>The latest pyOCD package is available <a href="https://pypi.python.org/pypi/pyOCD/">on PyPI</a>. The
216+
<a href="https://github.com/pyocd/pyOCD/releases">GitHub releases</a> page details changes between versions.</p>
217217

218-
<p>To install the latest prerelease version from the HEAD of the master branch, you can do
218+
<p>To install the latest prerelease version from the HEAD of the <code class="highlighter-rouge">develop</code> branch, you can do
219219
the following:</p>
220220

221-
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ python3 -mpip install --pre -U git+https://github.com/pyocd/pyOCD.git
221+
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ python3 -mpip install --pre -U git+https://github.com/pyocd/pyOCD.git@develop
222222
</code></pre></div></div>
223223

224224
<p>You can also install directly from the source by cloning the git repository and running:</p>
225225

226-
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ python3 setup.py install
226+
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ python3 -mpip install .
227227
</code></pre></div></div>
228228

229+
<p>See the <a href="/docs/developers_guide.html">developer’s guide</a> for more about setting up a development
230+
environment for pyOCD.</p>
231+
229232
<p>Note that, depending on your operating system, you may run into permissions issues running these commands.
230233
You have a few options here:</p>
231234

@@ -241,6 +244,10 @@ <h5 class="sidebar-header">On this page</h5>
241244
<p>For notes about installing and using on non-x86 systems such as Raspberry Pi, see the
242245
<a href="/docs/installing_on_non_x86.html">relevant documentation</a>.</p>
243246

247+
<p>(Note: Installing by running <code class="highlighter-rouge">setup.py</code> directly is deprecated since pyOCD migrated to PEP 517 based packaging.
248+
In many cases it will not work at all. Installing with pip or another standards-compliant tool is the only
249+
supported method.)</p>
250+
244251
<h2 id="libusb-installation">libusb installation</h2>
245252

246253
<p><a href="https://github.com/pyusb/pyusb">pyusb</a> and its backend library <a href="https://libusb.info/">libusb</a> are
@@ -266,8 +273,8 @@ <h2 id="udev-rules-on-linux">udev rules on Linux</h2>
266273
highly discouraged. (You should <em>never</em> run pyOCD as root on any OS.)</p>
267274

268275
<p>To help with this, example udev rules files are included with pyOCD in the
269-
<a href="https://github.com/pyocd/pyOCD/tree/master/udev">udev</a> folder. The
270-
<a href="https://github.com/pyocd/pyOCD/tree/master/udev/README.md">readme</a> in this folder has detailed
276+
<a href="https://github.com/pyocd/pyOCD/tree/main/udev">udev</a> folder. The
277+
<a href="https://github.com/pyocd/pyOCD/tree/main/udev/README.md">readme</a> in this folder has detailed
271278
instructions.</p>
272279

273280
<h2 id="target-support">Target support</h2>

0 commit comments

Comments
 (0)