---

title: Create software releases


keywords: fastai
sidebar: home_sidebar

summary: "API for auto-generated tagged releases, and release notes (from GitHub issues)"
description: "API for auto-generated tagged releases, and release notes (from GitHub issues)"
nb_path: "00_core.ipynb"
---
<!--

#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: 00_core.ipynb
# command to build the docs after a change: nbdev_build_docs

-->

<div class="container" id="notebook-container">
        
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="find_config" class="doc_header"><code>find_config</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/core.py#L21" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>find_config</code>(<strong><code>cfg_name</code></strong>=<em><code>'settings.ini'</code></em>)</p>
</blockquote>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h2 id="FastRelease" class="doc_header"><code>class</code> <code>FastRelease</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/core.py#L48" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>FastRelease</code>(<strong><code>owner</code></strong>=<em><code>None</code></em>, <strong><code>repo</code></strong>=<em><code>None</code></em>, <strong><code>token</code></strong>=<em><code>None</code></em>, <strong>**<code>groups</code></strong>)</p>
</blockquote>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>To create a markdown changelog, first create a <a href="/core.html#FastRelease"><code>FastRelease</code></a> object, optionally passing a mapping from GitHub labels to markdown titles. Put your github token in a file named <code>token</code> at the root of your repo.  <a href="/core.html#FastRelease"><code>FastRelease</code></a> attempts to fetch values for arguments from the following locations if not supplied:</p>
<ul>
<li><strong>owner:</strong> fetched from the field <code>user</code> in <code>settings.ini</code>.  This is the owner name of the repository on GitHub. For example for the repo <code>fastai/fastcore</code> the owner would be <code>fastai</code>.</li>
<li><strong>repo:</strong> fetched from the field <code>lib_name</code> in <code>settings.ini</code>.  This is the name of the repository on GitHub.  For example for the repo <code>fastai/fastcore</code> the owner would be <code>fastcore</code>.</li>
<li><strong>token:</strong> fetched from a file named <code>token</code> at the root of your repo.  Creating a token is discussed in <a href="https://fastrelease.fast.ai/#Set-up">the setup</a> section.</li>
<li><strong>groups:</strong> (optional) fetched from the field <code>label_groups</code> in <code>settings.ini</code>, which is a JSON string.  This is a mapping from label names to titles in your release notes. If not specified, this defaults to:</li>
</ul>
<div class="highlight"><pre><span></span><span class="p">{</span><span class="s2">&quot;breaking&quot;</span><span class="p">:</span> <span class="s2">&quot;Breaking Changes&quot;</span><span class="p">,</span> <span class="s2">&quot;enhancement&quot;</span><span class="p">:</span><span class="s2">&quot;New Features&quot;</span><span class="p">,</span> <span class="s2">&quot;bug&quot;</span><span class="p">:</span><span class="s2">&quot;Bugs Squashed&quot;</span><span class="p">}</span>
</pre></div>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">rel</span> <span class="o">=</span> <span class="n">FastRelease</span><span class="p">()</span>
</pre></div>

    </div>
</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="FastRelease.changelog" class="doc_header"><code>FastRelease.changelog</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/core.py#L68" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>FastRelease.changelog</code>(<strong><code>debug</code></strong>=<em><code>False</code></em>)</p>
</blockquote>
<p>Create the CHANGELOG.md file, or return the proposed text if <code>debug</code> is <code>True</code></p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>All relevant pull requests and issues are fetched from the GitHub API, and are categorized according to a user-supplied mapping from labels to markdown headings.</p>

</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span> 
</pre></div>

    </div>
</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="FastRelease.release" class="doc_header"><code>FastRelease.release</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/core.py#L83" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>FastRelease.release</code>()</p>
</blockquote>
<p>Tag and create a release in GitHub for the current version</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>This uses the version information from your <code>settings.ini</code>.</p>

</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="CLI-functions">CLI functions<a class="anchor-link" href="#CLI-functions"> </a></h2>
</div>
</div>
</div>
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="fastrelease_changelog" class="doc_header"><code>fastrelease_changelog</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/core.py#L98" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>fastrelease_changelog</code>(<strong><code>debug</code></strong>:"Print info to be added to CHANGELOG, instead of updating file"=<em><code>False</code></em>)</p>
</blockquote>
<p>Create a CHANGELOG.md file from closed and labeled GitHub issues</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="fastrelease_release" class="doc_header"><code>fastrelease_release</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/core.py#L104" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>fastrelease_release</code>(<strong><code>token</code></strong>:"Optional GitHub token (otherwise <code>token</code> file is used)"=<em><code>None</code></em>)</p>
</blockquote>
<p>Tag and create a release in GitHub for the current version</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="fastrelease" class="doc_header"><code>fastrelease</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/core.py#L111" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>fastrelease</code>(<strong><code>debug</code></strong>:"Print info to be added to CHANGELOG, instead of updating file"=<em><code>False</code></em>, <strong><code>token</code></strong>:"Optional GitHub token (otherwise <code>token</code> file is used)"=<em><code>None</code></em>)</p>
</blockquote>
<p>Calls <a href="/core.html#fastrelease_changelog"><code>fastrelease_changelog</code></a>, lets you edit the result, then pushes to git and calls <a href="/core.html#fastrelease_release"><code>fastrelease_release</code></a></p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="bump_version" class="doc_header"><code>bump_version</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/core.py#L126" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>bump_version</code>(<strong><code>version</code></strong>, <strong><code>part</code></strong>=<em><code>2</code></em>)</p>
</blockquote>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">test_eq</span><span class="p">(</span><span class="n">bump_version</span><span class="p">(</span><span class="s1">&#39;0.1.1&#39;</span>   <span class="p">),</span> <span class="s1">&#39;0.1.2&#39;</span><span class="p">)</span>
<span class="n">test_eq</span><span class="p">(</span><span class="n">bump_version</span><span class="p">(</span><span class="s1">&#39;0.1.1&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="s1">&#39;0.2.0&#39;</span><span class="p">)</span>
</pre></div>

    </div>
</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h4 id="fastrelease_bump_version" class="doc_header"><code>fastrelease_bump_version</code><a href="https://github.com/fastai/fastrelease/tree/master/fastrelease/core.py#L133" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>fastrelease_bump_version</code>(<strong><code>part</code></strong>:"Part of version to bump"=<em><code>2</code></em>)</p>
</blockquote>
<p>Increment version in <code>settings.py</code> by one</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

</div>
 

