Skip to content

Commit 47ec767

Browse files
committed
deploy: 5a440a1
1 parent 3aa2fca commit 47ec767

File tree

8 files changed

+211
-155
lines changed

8 files changed

+211
-155
lines changed
Binary file not shown.

.doctrees/environment.pickle

18.6 KB
Binary file not shown.

_sources/community/developers/new_releases.md.txt

+30-5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The `X`, `Y`, and `Z` values should be integers corresponding to the new version
1212
Releases will be made ad-hoc as bug-fixes and new features become available.
1313
When releasing a new version of a BrainGlobe repository, we also need to update the website, the metapackage, and any other tools that depend on that repository accordingly.
1414
This means we will typically create at least three dependent PRs;
15+
1516
- One in the repository itself (containing the bugfix or new feature we'd like to release)
1617
- One in the [website repository](https://github.com/brainglobe/brainglobe.github.io) (to update documentation if necessary)
1718
- One for each repository that depends on the updated tool, to bump the dependency version
@@ -21,6 +22,31 @@ We should cross-link the latter to the website update, and release all affected
2122
Ideally, updates and releases should be made in an order that [follows the dependency tree](<project:repositories/brainglobe-meta/index.md#dependency-tree>) - starting with our lower level tools, than their dependents, then dependents of those dependents, and so on.
2223
The meta-package itself will always be the last by this convention.
2324

25+
### Example, highlighting pinning from below
26+
27+
It should be noted that our convention is to pin all our dependencies from below.
28+
This allows us to minimise the number of new releases we have to make when updating one of our tools that several others depend on.
29+
As such, when a package has a new release, only tools that depend on that package *that rely on the new features / structure* need to receive their own version bump (and thus a PR in the chain described above).
30+
31+
For example, suppose we have package `BG-A` at version `v1.0.0` which provides three features; `F1.foo`, `F1.bar`, and `F2`.
32+
Then we have packages:
33+
34+
- `BG-B`, version `v1.2.0`, that uses `F1.foo`,
35+
- `BG-C`, version `v1.5.0`, that uses `F1.bar`,
36+
- `BG-D`, version `v1.7.0`, that uses `F2`.
37+
38+
Let's pretend that update `v1.1.0` to `BG-A` is going to re-write `F1.foo` to be more efficient (but keep the name), move `F1.bar` to `F2.bar`, and not change `F2`.
39+
In this case, the PR chain would consist of:
40+
41+
- `BG-B` needs a new version (say `v1.2.1`), with the `BG-A` dependency pinned to `>=1.1.0`. This is so that the new `F1.foo` is used when `BG-A` is fetched by pip/conda.
42+
- `BG-C` needs a new version (say `v1.6.0`), with the `BG-A` dependency pinned to `>=1.1.0` too. This is because version `v1.1.0` of `BG-A` is incompatible with `v1.0.0`. If we don't release a new `BG-C` version with this change, a user could `pip install BG-C`, have `BG-A` `v1.1.0` fetched as part of the dependency resolution, then would encounter an error whenever they tried to use `BG-C` since `F1.bar` would be unavailable (it's now `F2.bar`).
43+
- `BG-D` doesn't need any new releases, since `F2` has not been affected by the `v1.1.0` update to `BG-A`.
44+
- The metapackage then needs a new version which pins:
45+
- `BG-A >= v1.1.0`
46+
- `BG-B >= v1.2.1`
47+
- `BG-C >= v1.6.0`
48+
- `BG-D >= v1.7.0` (no change)
49+
2450
## Triggering a new release
2551

2652
The steps for triggering a new release are:
@@ -55,7 +81,7 @@ if you want to annotate the tag; which is useful for tagging single-commit hotfi
5581

5682
Once you have created the tag, you can `git push --tags` back to the main repository to trigger the release workflow.
5783
**However** you still need to create release notes using the GitHub UI as described in [the section above](#triggering-a-new-release).
58-
You will need to select the tag you just pushed, rather than creating a new tag, when you start drafting the release notes.
84+
You will need to select the tag you just pushed, rather than creating a new tag, when you start drafting the release notes.
5985

6086
### Failed workflows
6187

@@ -71,11 +97,10 @@ In the event that the release workflows fails after publishing a release, you wi
7197
A number of BrainGlobe packages are also available through `conda-forge`, providing an alternative installation method to `pip`.
7298
Each package available in this way has a feedstock repository, usually at the GitHub repository:
7399

74-
```
100+
```sh
75101
conda-forge/<package-name>-feedstock
76102
```
77103

78-
79104
These feedstocks are linked to their `PyPI` counterparts - when a new version comes available on `PyPI`, the `conda-forge` admin bot should open a PR in the feedstock repository which will update the version of the package available through `conda`.
80105
These PRs must be approved by one of the feedstock maintainers before they are merged in.
81106

@@ -95,5 +120,5 @@ The basic functionality of these workflows use the [neuroinformatics-unit](https
95120
1. Check the package manifest
96121
1. Run the package tests
97122

98-
These checks are run against _all_ PRs opened against the repository, and on the `main` branch when they are merged in.
99-
When a tag in the `vX.Y.Z` format is pushed to `main`, these checks are run again and _if they are successful_ the workflow will build the source distribution and upload this to `PyPI`.
123+
These checks are run against *all* PRs opened against the repository, and on the `main` branch when they are merged in.
124+
When a tag in the `vX.Y.Z` format is pushed to `main`, these checks are run again and *if they are successful* the workflow will build the source distribution and upload this to `PyPI`.

community/developers/new_releases.html

+33-2
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,34 @@ <h2>Coordinating releases with the documentation and the metapackage<a class="he
613613
<p>We should cross-link the latter to the website update, and release all affected packages to PyPI (and conda if appropriate) once they are all merged into <code class="docutils literal notranslate"><span class="pre">main</span></code>.
614614
Ideally, updates and releases should be made in an order that <a class="reference internal" href="repositories/brainglobe-meta/index.html#id1"><span class="std std-ref">follows the dependency tree</span></a> - starting with our lower level tools, than their dependents, then dependents of those dependents, and so on.
615615
The meta-package itself will always be the last by this convention.</p>
616+
<section id="example-highlighting-pinning-from-below">
617+
<h3>Example, highlighting pinning from below<a class="headerlink" href="#example-highlighting-pinning-from-below" title="Link to this heading">#</a></h3>
618+
<p>It should be noted that our convention is to pin all our dependencies from below.
619+
This allows us to minimise the number of new releases we have to make when updating one of our tools that several others depend on.
620+
As such, when a package has a new release, only tools that depend on that package <em>that rely on the new features / structure</em> need to receive their own version bump (and thus a PR in the chain described above).</p>
621+
<p>For example, suppose we have package <code class="docutils literal notranslate"><span class="pre">BG-A</span></code> at version <code class="docutils literal notranslate"><span class="pre">v1.0.0</span></code> which provides three features; <code class="docutils literal notranslate"><span class="pre">F1.foo</span></code>, <code class="docutils literal notranslate"><span class="pre">F1.bar</span></code>, and <code class="docutils literal notranslate"><span class="pre">F2</span></code>.
622+
Then we have packages:</p>
623+
<ul class="simple">
624+
<li><p><code class="docutils literal notranslate"><span class="pre">BG-B</span></code>, version <code class="docutils literal notranslate"><span class="pre">v1.2.0</span></code>, that uses <code class="docutils literal notranslate"><span class="pre">F1.foo</span></code>,</p></li>
625+
<li><p><code class="docutils literal notranslate"><span class="pre">BG-C</span></code>, version <code class="docutils literal notranslate"><span class="pre">v1.5.0</span></code>, that uses <code class="docutils literal notranslate"><span class="pre">F1.bar</span></code>,</p></li>
626+
<li><p><code class="docutils literal notranslate"><span class="pre">BG-D</span></code>, version <code class="docutils literal notranslate"><span class="pre">v1.7.0</span></code>, that uses <code class="docutils literal notranslate"><span class="pre">F2</span></code>.</p></li>
627+
</ul>
628+
<p>Let’s pretend that update <code class="docutils literal notranslate"><span class="pre">v1.1.0</span></code> to <code class="docutils literal notranslate"><span class="pre">BG-A</span></code> is going to re-write <code class="docutils literal notranslate"><span class="pre">F1.foo</span></code> to be more efficient (but keep the name), move <code class="docutils literal notranslate"><span class="pre">F1.bar</span></code> to <code class="docutils literal notranslate"><span class="pre">F2.bar</span></code>, and not change <code class="docutils literal notranslate"><span class="pre">F2</span></code>.
629+
In this case, the PR chain would consist of:</p>
630+
<ul class="simple">
631+
<li><p><code class="docutils literal notranslate"><span class="pre">BG-B</span></code> needs a new version (say <code class="docutils literal notranslate"><span class="pre">v1.2.1</span></code>), with the <code class="docutils literal notranslate"><span class="pre">BG-A</span></code> dependency pinned to <code class="docutils literal notranslate"><span class="pre">&gt;=1.1.0</span></code>. This is so that the new <code class="docutils literal notranslate"><span class="pre">F1.foo</span></code> is used when <code class="docutils literal notranslate"><span class="pre">BG-A</span></code> is fetched by pip/conda.</p></li>
632+
<li><p><code class="docutils literal notranslate"><span class="pre">BG-C</span></code> needs a new version (say <code class="docutils literal notranslate"><span class="pre">v1.6.0</span></code>), with the <code class="docutils literal notranslate"><span class="pre">BG-A</span></code> dependency pinned to <code class="docutils literal notranslate"><span class="pre">&gt;=1.1.0</span></code> too. This is because version <code class="docutils literal notranslate"><span class="pre">v1.1.0</span></code> of <code class="docutils literal notranslate"><span class="pre">BG-A</span></code> is incompatible with <code class="docutils literal notranslate"><span class="pre">v1.0.0</span></code>. If we don’t release a new <code class="docutils literal notranslate"><span class="pre">BG-C</span></code> version with this change, a user could <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">BG-C</span></code>, have <code class="docutils literal notranslate"><span class="pre">BG-A</span></code> <code class="docutils literal notranslate"><span class="pre">v1.1.0</span></code> fetched as part of the dependency resolution, then would encounter an error whenever they tried to use <code class="docutils literal notranslate"><span class="pre">BG-C</span></code> since <code class="docutils literal notranslate"><span class="pre">F1.bar</span></code> would be unavailable (it’s now <code class="docutils literal notranslate"><span class="pre">F2.bar</span></code>).</p></li>
633+
<li><p><code class="docutils literal notranslate"><span class="pre">BG-D</span></code> doesn’t need any new releases, since <code class="docutils literal notranslate"><span class="pre">F2</span></code> has not been affected by the <code class="docutils literal notranslate"><span class="pre">v1.1.0</span></code> update to <code class="docutils literal notranslate"><span class="pre">BG-A</span></code>.</p></li>
634+
<li><p>The metapackage then needs a new version which pins:</p>
635+
<ul>
636+
<li><p><code class="docutils literal notranslate"><span class="pre">BG-A</span> <span class="pre">&gt;=</span> <span class="pre">v1.1.0</span></code></p></li>
637+
<li><p><code class="docutils literal notranslate"><span class="pre">BG-B</span> <span class="pre">&gt;=</span> <span class="pre">v1.2.1</span></code></p></li>
638+
<li><p><code class="docutils literal notranslate"><span class="pre">BG-C</span> <span class="pre">&gt;=</span> <span class="pre">v1.6.0</span></code></p></li>
639+
<li><p><code class="docutils literal notranslate"><span class="pre">BG-D</span> <span class="pre">&gt;=</span> <span class="pre">v1.7.0</span></code> (no change)</p></li>
640+
</ul>
641+
</li>
642+
</ul>
643+
</section>
616644
</section>
617645
<section id="triggering-a-new-release">
618646
<h2>Triggering a new release<a class="headerlink" href="#triggering-a-new-release" title="Link to this heading">#</a></h2>
@@ -658,7 +686,7 @@ <h3>Failed workflows<a class="headerlink" href="#failed-workflows" title="Link t
658686
<h3><code class="docutils literal notranslate"><span class="pre">conda-forge</span></code> feedstocks<a class="headerlink" href="#conda-forge-feedstocks" title="Link to this heading">#</a></h3>
659687
<p>A number of BrainGlobe packages are also available through <code class="docutils literal notranslate"><span class="pre">conda-forge</span></code>, providing an alternative installation method to <code class="docutils literal notranslate"><span class="pre">pip</span></code>.
660688
Each package available in this way has a feedstock repository, usually at the GitHub repository:</p>
661-
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">conda</span><span class="o">-</span><span class="n">forge</span><span class="o">/&lt;</span><span class="n">package</span><span class="o">-</span><span class="n">name</span><span class="o">&gt;-</span><span class="n">feedstock</span>
689+
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>conda-forge/&lt;package-name&gt;-feedstock
662690
</pre></div>
663691
</div>
664692
<p>These feedstocks are linked to their <code class="docutils literal notranslate"><span class="pre">PyPI</span></code> counterparts - when a new version comes available on <code class="docutils literal notranslate"><span class="pre">PyPI</span></code>, the <code class="docutils literal notranslate"><span class="pre">conda-forge</span></code> admin bot should open a PR in the feedstock repository which will update the version of the package available through <code class="docutils literal notranslate"><span class="pre">conda</span></code>.
@@ -736,7 +764,10 @@ <h2>Workflow for publishing new releases<a class="headerlink" href="#workflow-fo
736764
</div>
737765
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
738766
<ul class="visible nav section-nav flex-column">
739-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#coordinating-releases-with-the-documentation-and-the-metapackage">Coordinating releases with the documentation and the metapackage</a></li>
767+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#coordinating-releases-with-the-documentation-and-the-metapackage">Coordinating releases with the documentation and the metapackage</a><ul class="nav section-nav flex-column">
768+
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#example-highlighting-pinning-from-below">Example, highlighting pinning from below</a></li>
769+
</ul>
770+
</li>
740771
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#triggering-a-new-release">Triggering a new release</a><ul class="nav section-nav flex-column">
741772
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#on-the-command-line">On the command line</a></li>
742773
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#failed-workflows">Failed workflows</a></li>

objects.inv

39 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)