<?xml version="1.0" encoding="utf-8"?> 
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us">
    <generator uri="https://gohugo.io/" version="0.152.2">Hugo</generator><title type="html"><![CDATA[Cookie on Blog]]></title>
    
    
    
            <link href="https://blog.scientific-python.org/tags/cookie/" rel="alternate" type="text/html" title="html" />
            <link href="https://blog.scientific-python.org/tags/cookie/atom.xml" rel="self" type="application/atom" title="atom" />
    <updated>2026-04-04T04:32:36+00:00</updated>
    
    
    
    
        <id>https://blog.scientific-python.org/tags/cookie/</id>
    
        
        <entry>
            <title type="html"><![CDATA[The Scientific Python Development Guide]]></title>
            <link href="https://blog.scientific-python.org/scientific-python/dev-summit-1-development-guide/?utm_source=atom_feed" rel="alternate" type="text/html" />
            
                <link href="https://blog.scientific-python.org/scientific-python/scientific-python-project/?utm_source=atom_feed" rel="related" type="text/html" title="Scientific Python: Community developed, community owned" />
                <link href="https://blog.scientific-python.org/matplotlib/how-to-create-custom-tables/?utm_source=atom_feed" rel="related" type="text/html" title="How to create custom tables" />
                <link href="https://blog.scientific-python.org/matplotlib/visualising-usage-using-batteries/?utm_source=atom_feed" rel="related" type="text/html" title="Battery Charts - Visualise usage rates &amp; more" />
                <link href="https://blog.scientific-python.org/matplotlib/python-graph-gallery.com/?utm_source=atom_feed" rel="related" type="text/html" title="The Python Graph Gallery: hundreds of python charts with reproducible code." />
                <link href="https://blog.scientific-python.org/matplotlib/stellar-chart-alternative-radar-chart/?utm_source=atom_feed" rel="related" type="text/html" title="Stellar Chart, a Type of Chart to Be on Your Radar" />
            
                <id>https://blog.scientific-python.org/scientific-python/dev-summit-1-development-guide/</id>
            
            
            <published>2023-08-26T12:00:00-05:00</published>
            <updated>2023-08-26T12:00:00-05:00</updated>
            
            
            <content type="html"><![CDATA[<blockquote>Introducing the Scientific Python Development Guide!</blockquote><p>One outcome of the
<a href="https://scientific-python.org/summits/developer/2023/">2023 Scientific Python Developer Summit</a>
was the <a href="https://learn.scientific-python.org/development">Scientific Python Development Guide</a>, a comprehensive guide to modern
Python package development, complete with a <a href="https://github.com/scientific-python/cookie">new project template</a>
supporting 10+ build backends and a <a href="https://learn.scientific-python.org/development/guides/repo-review">WebAssembly-powered checker</a>
with checks linked to the guide. The guide covers topics like <a href="https://learn.scientific-python.org/development/guides/packaging-simple/">modern</a>,
<a href="https://learn.scientific-python.org/development/guides/packaging-compiled/">compiled</a>, and <a href="https://learn.scientific-python.org/development/guides/packaging-classic/">classic</a> packaging, <a href="https://learn.scientific-python.org/development/guides/style/">style</a> checks, <a href="https://learn.scientific-python.org/development/guides/mypy/">type
checking</a>, <a href="https://learn.scientific-python.org/development/guides/docs/">docs</a>, <a href="https://learn.scientific-python.org/development/guides/tasks/">task runners</a>, <a href="https://learn.scientific-python.org/development/guides/gha-basic/">CI</a>, <a href="https://learn.scientific-python.org/development/guides/pytest/">tests</a>,
and much more! There also are sections of <a href="https://learn.scientific-python.org/development/tutorials/">tutorials</a>, <a href="https://learn.scientific-python.org/development/principles/">principles</a>, and
some common <a href="https://learn.scientific-python.org/development/patterns/">patterns</a>.</p>
<p>This guide (along with cookie &amp; repo-review) started in <a href="https://scikit-hep.org">Scikit-HEP</a> in 2020.
During the summit, it was merged with the <a href="https://nsls-ii.github.io/">NSLS-II</a> guidelines, which provided
the basis for the <a href="https://learn.scientific-python.org/development/principles/">principles</a> section. I&rsquo;d like to thank and acknowledge Dan
Allan and Gregory Lee for working tirelessly during the summit to rework,
rewrite, merge, and fix the guide, including writing most of the <a href="https://learn.scientific-python.org/development/tutorials/">tutorials</a>
pages and first <a href="https://learn.scientific-python.org/development/patterns/">patterns</a> page, and rewriting the <a href="https://learn.scientific-python.org/development/tutorials/dev-environment/">environment</a> page as a
tutorial.</p>
<h2 id="the-guide">The guide<a class="headerlink" href="#the-guide" title="Link to this heading">#</a></h2>
<p>The core of the project is the guide, which is comprised of four sections:</p>
<ul>
<li><a href="https://learn.scientific-python.org/development/tutorials/">Tutorials</a>: How to go from &ldquo;research&rdquo; code to a basic package, for
beginning readers.</li>
<li><a href="https://learn.scientific-python.org/development/guides/">Topical guides</a>: The core of the guide, for intermediate to advanced
readers.</li>
<li><a href="https://learn.scientific-python.org/development/principles/">Principles</a>: Some general principles from the <a href="https://nsls-ii.github.io/">NSLS-II</a> guide.</li>
<li><a href="https://learn.scientific-python.org/development/patterns/">Patterns</a>: Recipes for common situations. Three pages are there now;
<a href="https://learn.scientific-python.org/development/patterns/data-files/">including data</a>, <a href="https://learn.scientific-python.org/development/patterns/backports/">backports</a>, and <a href="https://learn.scientific-python.org/development/patterns/exports/">exports</a>.</li>
</ul>
<p>From the original <a href="https://scikit-hep.org/developer">Scikit-HEP dev pages</a>, a lot was added:</p>
<ul>
<li>Brand new guide page on documentation, along with new <a href="https://learn.scientific-python.org/development/guides/repo-review">sp-repo-review</a> checks to
help with readthedocs.</li>
<li>A compiled projects page! Finally! With <a href="https://scikit-build-core.readthedocs.io">scikit-build-core</a>,
<a href="https://meson-python.readthedocs.io">meson-python</a>, and <a href="https://www.maturin.rs">maturin</a>. The page shows real outputs from the
<a href="https://www.cookiecutter.io">cookiecutter</a>, kept in sync with <a href="https://nedbatchelder.com/code/cog">cog</a> (a huge benefit of using a single
repo for all three components!)</li>
<li>Big update to <a href="https://learn.scientific-python.org/development/guides/gha-basic/">GHA CI page</a> including a section on Composite
Actions given at the Dev summit.</li>
<li>CLI entry points are now included.</li>
<li>Python 3.12 support added, Python 3.7 dropped.</li>
<li>New <a href="https://learn.scientific-python.org/development/guides/repo-review">sp-repo-review</a> badges throughout (more on that later!)</li>
<li>Updates for <a href="https://beta.ruff.rs">Ruff</a>&rsquo;s move and support for requires-python.</li>
<li>Lots of additions for GitHub Actions.</li>
</ul>
<p>The infrastructure was updated too:</p>
<ul>
<li>Using latest Jekyll (version 4) and latest Just the Docs theme. More colorful
callout boxes. Plugins are used now.</li>
<li>Live PR preview (provided by probably the world’s first readthedocs Jekyll
build!). Developed with the Zarr developers during the summit.</li>
<li>Better advertising for <a href="https://github.com/scientific-python/cookie">cookie</a> and <a href="https://learn.scientific-python.org/development/guides/repo-review">sp-repo-review</a> on the index page(s).</li>
<li>Auto bump and auto-sync CI jobs.</li>
</ul>
<h2 id="cookie">Cookie<a class="headerlink" href="#cookie" title="Link to this heading">#</a></h2>
<p>We also did something I&rsquo;ve wanted to do for a long time: the guide, the
cookiecutter template, and the checks are all in a single repo! The repo is
<a href="https://github.com/scientific-python/cookie">scientific-python/cookie</a>, which is the moved <code>scikit-hep/cookie</code> (the
old URL for cookiecutter still works!).</p>
<p>Cookie is a new project template supporting multiple backends (including
compiled ones), kept in sync with the dev guide. We recommend starting with
the dev guide and setting up your first package by hand, so that you understand
what each part is for, but once you&rsquo;ve done that, <a href="https://github.com/scientific-python/cookie">cookie</a> allows you to get
started on a new project in seconds.</p>
<p>A lot of work went into <a href="https://github.com/scientific-python/cookie">cookie</a>, too!</p>
<ul>
<li>Generalized defaults. We still have special integration if someone sets the
org to <code>scikit-hep</code>; the same integration can be offered to other orgs.</li>
<li>All custom hooks removed; standard jinja now used throughout templates. Using
cookiecutter computed variables idiom too. Windows still fully supported and
tested. Adding new choices is much easier now.</li>
<li>Added cruft (a cookiecutter updater) testing.</li>
<li>Dual-supporting <a href="https://copier.readthedocs.io">copier</a> now too, a <a href="https://www.cookiecutter.io">cookiecutter</a> replacement with a huge
CLI improvement (and also supports updating). Might be the first project to
support both at the same time. CI (or <a href="https://nox.thea.codes">nox</a> locally) checks to ensure
generation is identical. Much better interface with copier, including
validation, descriptive text, arrow selection, etc.</li>
<li>Improved CLI experience even if using cookiecutter (like no longer requesting
current year).</li>
<li>Reworked docs template.</li>
<li>Support for cookiecutter 2.2 pretty descriptions (added about four hours after
cookiecutter 2.2.0 was released) and cookiecutter 2.2.3 choice descriptions.</li>
<li>GitLab CI support when not targeting github.com URLs (added by Giordon Stark).</li>
<li>Support for selecting VCS or classic versioning.</li>
</ul>
<h2 id="repo-review">Repo-review<a class="headerlink" href="#repo-review" title="Link to this heading">#</a></h2>
<p>See the <a href="https://iscinumpy.dev/post/repo-review/">introduction to repo-review</a>
for information about this one!</p>
<p>Along with this was probably the biggest change, one requested by several people
at the summit: <a href="https://github.com/scientific-python/repo-review">scientific-python/repo-review</a> (was
<code>scikit-hep/repo-review</code>) is now a completely general framework for implementing
checks in Python 3.10+. The checks have been moved to <code>sp-repo-review</code>, which is
now part of scientific-python/cookie. There are too many changes to list here,
so just the key ones in 0.6, 0.7, 0.8, 0.9, and 0.10:</p>
<ul>
<li>Extensive, beautiful <a href="https://repo-review.readthedocs.io">documentation</a> for
check authors at (used to help guide the new docs guide page &amp; template
update!)</li>
<li>Support for four output formats, <a href="https://rich.readthedocs.io">rich</a> (improved), svg, json (new), html
(new).</li>
<li>Support for listing all checks.</li>
<li>GitHub Actions support with HTML step summary, <a href="https://pre-commit.com">pre-commit</a> support.</li>
<li>Generalized topological sorting to fixtures, dynamic fixtures.</li>
<li>Dynamic check selection (via fixtures! Basically everything is powered by
fixtures now.)</li>
<li>URL support in all output formats (including the terminal and WebApp!)</li>
<li>Support for package not at root of repo.</li>
<li>Support for running on a remote repo from the command line.</li>
<li>Support for select/ignore config in <code>pyproject.toml</code> or command line.</li>
<li>Pretty printed and controllable sorting for families.</li>
<li>Supports running from Python, including inside a readme with something like
cog.</li>
<li>Support for dynamic family descriptions (such as to output build system and
licence used).</li>
<li>Support for limiting the output to just errors or errors and skips.</li>
<li>Support for running on multiple repos at once, with output tailored to
multiple repos. Also supports passing <code>pyproject.toml</code> path instead to make
running on mixed repos easier.</li>
<li>Support for linting <code>[tool.repo-review]</code> with <a href="https://validate-pyproject.readthedocs.io">validate-pyproject</a>.</li>
</ul>
<p>The
<a href="https://repo-review.readthedocs.io/en/latest/changelog.html">full changelog</a>
has more - you can even see the 10 beta releases in-between 0.6.x and 0.7.0
where a lot of this refactoring work was happening. If you have configuration
you’d like to write check for, feel free to write a plugin!</p>
<p><a href="https://validate-pyproject.readthedocs.io">validate-pyproject</a> 0.14 has added support for being used as a repo-review
plugin, so you can validate <code>pyproject.toml</code> files with repo-review! This lints
<code>[project]</code> and <code>[build-system]</code> tables, <code>[tool.setuptools]</code>, and other tools
via plugins. <a href="https://scikit-build-core.readthedocs.io">Scikit-build-core</a> 0.5 can be used as a validate-project plugin
to lint <code>[tool.scikit-build]</code>. Repo-review has a plugin for
<code>[tool.repo-review]</code>.</p>
<h2 id="sp-repo-review">sp-repo-review<a class="headerlink" href="#sp-repo-review" title="Link to this heading">#</a></h2>
<p>Finally, <a href="https://learn.scientific-python.org/development/guides/repo-review">sp-repo-review</a> contains the previous repo-review plugins with checks:</p>
<ul>
<li>Fully cross-linked with the development guide. Every check has a URL that
points to a matching badge inside the development guide where the thing the
check is looking for is being discussed!</li>
<li>Full list of checks (including URLs), produced by cog, in
<a href="https://pypi.org/p/sp-repo-review">readme</a>.</li>
<li>Also ships with GitHub Action and <a href="https://pre-commit.com">pre-commit</a> checks</li>
<li>Released (in sync with cookie &amp; guide, as they are in the same repo) as
CalVer,
<a href="https://github.com/scientific-python/cookie/releases">with release notes</a>.</li>
<li>Split CI that selects just want to run based on changed files, with green
checkmark that respects skips (based on the excellent contrition to
pypa/build).</li>
</ul>
<!-- prettier-ignore-start -->
<figure class="align-default" id="id000">
<img src="cibw_example.png" alt="Image of sp-repo-review showing checks" class="align-center" width="60%">



<figcaption>
<p><span class="caption-text">Running sp-repo-review on cibuildwheel</span>
</figcaption>
</figure>

<!-- prettier-ignore-end -->
<h2 id="using-the-guide">Using the guide<a class="headerlink" href="#using-the-guide" title="Link to this heading">#</a></h2>
<p>If you have a guide, we&rsquo;d like for you to compare it with the Scientific Python
Development Guide, and see if we are missing anything - bring it to our
attention, and maybe we can add it. And then you can link to the centrally
maintained guide instead of manually maintaining a complete custom guide. See
<a href="https://scikit-hep.org/developer">scikit-hep/developer</a> for an example; many pages now point at this guide.
We can also provide org integrations for <a href="https://github.com/scientific-python/cookie">cookie</a>, providing some
customizations when a user targets your org (targeting <code>scikit-hep</code> will add a
badge).</p>]]></content>
            
                 
                    
                 
                    
                         
                        
                            
                             
                                <category scheme="taxonomy:Tags" term="tutorials" label="tutorials" />
                             
                                <category scheme="taxonomy:Tags" term="cookie" label="cookie" />
                             
                                <category scheme="taxonomy:Tags" term="scientific-python" label="scientific-python" />
                             
                                <category scheme="taxonomy:Tags" term="summit" label="summit" />
                            
                        
                    
                
            
        </entry>
    
</feed>
