mcsinyx.github.io/gsoc2020/blog20200720.html

243 lines
13 KiB
HTML
Raw Normal View History

2020-09-30 18:45:15 +02:00
<!doctype html>
<html class="no-js">
<head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" />
<link rel="shortcut icon" href="../_static/favicon.ico"/><meta name="generator" content="sphinx-3.2.1, furo 2020.10.13.beta12"/>
2020-09-30 18:45:15 +02:00
<title>Ive Walked 500 Miles… - Raphael McSinyx</title>
<link id="pygments_dark_css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css" href="../_static/pygments_dark.css" />
<link rel="stylesheet" type="text/css" href="../_static/fab.css" />
<link rel="stylesheet" href="../_static/styles/default.css?f7f54af84c0cdf633e674bfe">
2020-09-30 18:45:15 +02:00
<link rel="stylesheet" href="../_static/pygments.css">
<link media="(prefers-color-scheme: dark)" rel="stylesheet" href="../_static/pygments_dark.css">
2020-09-30 18:45:15 +02:00
<style>
:root {
--color-code-background: #f8f8f8;
--color-code-foreground: black;
2020-08-26 11:29:49 +02:00
2020-09-30 18:45:15 +02:00
--color-brand-primary: #436e58;
--color-brand-content: #436e58;
}
@media (prefers-color-scheme: dark) {
:root {
--color-code-background: #202020;
--color-code-foreground: #d0d0d0;
}
}
2020-09-30 18:45:15 +02:00
</style>
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script><script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="../_static/scripts/main.js?f7f54af84c0cdf633e674bfe"></script></head>
2020-09-30 18:45:15 +02:00
<body dir="">
2020-08-26 11:29:49 +02:00
2020-09-30 18:45:15 +02:00
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
<symbol id="svg-toc" viewBox="0 0 24 24">
<title>Contents</title>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke-width="1.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
2020-09-30 18:45:15 +02:00
<path stroke="none" d="M0 0h24v24H0z"/>
<line x1="4" y1="6" x2="20" y2="6" />
<line x1="10" y1="12" x2="20" y2="12" />
<line x1="6" y1="18" x2="20" y2="18" />
</svg>
</symbol>
<symbol id="svg-menu" viewBox="0 0 24 24">
<title>Menu</title>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-menu">
<line x1="3" y1="12" x2="21" y2="12"></line>
<line x1="3" y1="6" x2="21" y2="6"></line>
<line x1="3" y1="18" x2="21" y2="18"></line>
</svg>
</symbol>
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
<title>Expand</title>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="feather feather-chevron-right">
<polyline points="9 18 15 12 9 6"></polyline>
</svg>
</symbol>
</svg>
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
<label class="overlay sidebar-overlay" for="__navigation"></label>
<label class="overlay toc-overlay" for="__toc"></label>
<div class="page">
<header class="mobile-header">
<label class="header-left nav-overlay-icon" for="__navigation">
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
</label>
<div class="header-center"><div class="brand">Raphael McSinyx</div></div>
<div class="header-right"></div>
</header>
<aside class="sidebar-drawer">
<div class="sidebar-container">
<div class="sidebar-sticky"><a class="sidebar-brand centered" href="../index.html">
<div class="sidebar-logo-container">
<img class="sidebar-logo" src="../_static/CnX.png" alt="Logo"/>
</div>
<span class="sidebar-brand-text">Raphael McSinyx</span>
</a><form class="sidebar-search-container" method="get" action="../search.html">
<input class="sidebar-search" placeholder="Search" name="q">
<input type="hidden" name="check_keywords" value="yes">
<input type="hidden" name="area" value="default">
</form><div class="sidebar-tree sidebar-scroll">
<ul>
2020-08-26 11:29:49 +02:00
<li class="toctree-l1"><a class="reference internal" href="../works.html">Free Software Works</a></li>
2020-09-30 18:45:15 +02:00
<li class="toctree-l1 has-children"><a class="reference internal" href="../life/index.html">Meatspace Adventures</a><input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" type="checkbox"/><label for="toctree-checkbox-1"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l2"><a class="reference internal" href="../life/2010.html">Why the Name?</a></li>
<li class="toctree-l2"><a class="reference internal" href="../life/2013.html">The Year after the Apocalypse</a></li>
<li class="toctree-l2"><a class="reference internal" href="../life/2020.html">The 2020 Experience</a></li>
2020-08-26 11:29:49 +02:00
</ul>
2020-09-30 18:45:15 +02:00
</li>
<li class="toctree-l1 has-children"><a class="reference internal" href="../math/index.html">Bootleg Lambda Calculus</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" type="checkbox"/><label for="toctree-checkbox-2"><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul>
<li class="toctree-l2"><a class="reference internal" href="../math/conseq.html">Infinite Sequences: A Case Study in Functional Python</a></li>
<li class="toctree-l2"><a class="reference internal" href="../math/system.html">System Cascade Connection</a></li>
</ul>
</li>
2020-08-26 11:29:49 +02:00
</ul>
2020-09-30 18:45:15 +02:00
</div>
2020-08-26 11:29:49 +02:00
</div>
2020-09-30 18:45:15 +02:00
</div>
</aside>
<main class="main">
<div class="content">
<article role="main">
<label class="toc-overlay-icon" for="__toc">
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
</label>
<div class="section" id="i-ve-walked-500-miles">
2020-08-26 11:29:49 +02:00
<h1>Ive Walked 500 Miles…<a class="headerlink" href="#i-ve-walked-500-miles" title="Permalink to this headline"></a></h1>
<blockquote class="epigraph">
<div><div class="line-block">
<div class="line">… and I would walk 500 more</div>
<div class="line">Just to be the man who walks a thousand miles</div>
<div class="line">To fall down at your door</div>
</div>
2020-09-30 18:45:15 +02:00
<img alt="../_images/500-miles.gif" src="../_images/500-miles.gif"/>
2020-08-30 18:04:26 +02:00
</div></blockquote>
2020-08-26 11:29:49 +02:00
<div class="section" id="the-main-road">
<h2>The Main Road<a class="headerlink" href="#the-main-road" title="Permalink to this headline"></a></h2>
<p>Hi, have you met <code class="docutils literal notranslate"><span class="pre">fast-deps</span></code>? Its (going to be) the name of <code class="docutils literal notranslate"><span class="pre">pip</span></code>s
experimental feature that may improve the speed of dependency resolution
of the new resolver. By avoid downloading whole wheels to just
obtain metadata, it is especially helpful when <code class="docutils literal notranslate"><span class="pre">pip</span></code> has to do
heavy backtracking to resolve conflicts.</p>
<p>Thanks to <a class="reference external" href="https://github.com/pypa/pip/pull/8532#discussion_r453990728">Chris Hunts review on GH-8537</a>,
my mentor Pradyun Gedam and I worked out a less hacky approach to inteject
the call to lazy wheel during the resolution process. A new PR <a class="reference external" href="https://github.com/pypa/pip/pull/8588">GH-8588</a>
was filed to implement it—I could have <em>just</em> worked on top of the old PR
and rebased, but my <code class="docutils literal notranslate"><span class="pre">git</span></code> skill is far from gud enough to confidently do it.</p>
<p>Testing this one has been a lot of fun though. At first, integration tests
were added as a rerun of the tests for the new resolver, with an additional flag
to use feature <code class="docutils literal notranslate"><span class="pre">fast-deps</span></code>. It indeed made me feel guilty towards <a class="reference external" href="https://travis-ci.com/">Travis</a>,
who has to work around 30 minutes more every run. Per Chris Hunts suggestion,
in the new PR, I instead write a few functional tests for the area relating
the most to the feature, namely <code class="docutils literal notranslate"><span class="pre">pip</span></code>s subcommands <code class="docutils literal notranslate"><span class="pre">wheel</span></code>,
<code class="docutils literal notranslate"><span class="pre">download</span></code> and <code class="docutils literal notranslate"><span class="pre">install</span></code>.</p>
<p>It was also suggested that a mock server with HTTP range requests support
might be better (in term of performance and reliablilty) than for testing.
However, <a class="reference external" href="https://github.com/pypa/pip/pull/8584#issuecomment-659227702">I have yet to be able to make Werkzeug do it</a>.</p>
<p>Why did I say Im half way there? With the parallel utilities merged and a way
to quickly get the list of distribution to be downloaded being really close,
what left is <em>only</em> to figure out a way to properly download them in parallel.
With no distribution to be added during the download progress, the model of this
2020-09-10 16:42:08 +02:00
will fit very well with the architecture in <a class="reference external" href="../_static/pip-parallel-dl.pdf">my original proposal</a>.
2020-08-26 11:29:49 +02:00
A batch downloader can be implemented to track the progress of each download
and thus report them cleanly as e.g. progress bar or percentage. This is
the part I am second-most excited about of my GSoC project this summer
(after the synchronization of downloads written in my proposal, which was then
superseded by <code class="docutils literal notranslate"><span class="pre">fast-deps</span></code>) and I cant wait to do it!</p>
</div>
<div class="section" id="the-side-quests">
<h2>The Side Quests<a class="headerlink" href="#the-side-quests" title="Permalink to this headline"></a></h2>
<p>As usual, I make sure that I complete every side quest I see during the journey:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/pypa/pip/pull/8568">GH-8568</a>: Declare constants in <code class="docutils literal notranslate"><span class="pre">configuration.py</span></code> as such</p></li>
<li><p><a class="reference external" href="https://github.com/pypa/pip/pull/8571">GH-8571</a>: Clean up <code class="docutils literal notranslate"><span class="pre">Configuration.unset_value</span></code>
and nit the class <code class="docutils literal notranslate"><span class="pre">__init__</span></code></p></li>
<li><p><a class="reference external" href="https://github.com/pypa/pip/pull/8578">GH-8578</a>: Allow verbose/quite level
to be specified via config file and env var</p></li>
<li><p><a class="reference external" href="https://github.com/pypa/pip/pull/8599">GH-8599</a>: Replace tabs by spaces for consistency</p></li>
</ul>
</div>
<div class="section" id="snap-back-to-reality">
<h2>Snap Back to Reality<a class="headerlink" href="#snap-back-to-reality" title="Permalink to this headline"></a></h2>
<p>A bit about me, I actually walked 500 meters earlier today to a bank
and walked 500 more to another to prepare my Visa card for purchasing
the upcoming Pinephone prototype. Its one of the first smartphones
to fully support a GNU/Linux distribution, where one can run desktop apps
(including proper terminals) as well as traditional services like SSH,
HTTP server and IPFS node because why not? Just a few hours ago,
I pre-ordered the <a class="reference external" href="https://postmarketos.org/blog/2020/07/15/pinephone-ce-preorder/">postmarketOS community edition</a> with additional hardware
for convergence.</p>
<p>If you did not come here for a Pinephone ad, please take my apologies though d-;
and to ones reading this, I hope you all can become the person who walks
a thousand miles to fall down at the door opening to all
what you ever wished for!</p>
</div>
</div>
2020-09-30 18:45:15 +02:00
</article>
<footer>
<div class="related-pages">
2020-08-26 11:29:49 +02:00
</div>
2020-09-30 18:45:15 +02:00
<div class="related-information">
<span class="copyright">Copyright &copy; 2018-2020, Nguyễn Gia Phong</span> |
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using
<a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
<a href="https://github.com/pradyunsg/furo">Furo theme</a>.
</div>
</footer>
</div>
<aside class="toc-drawer">
2020-08-26 11:29:49 +02:00
2020-09-30 18:45:15 +02:00
<div class="toc-sticky toc-scroll">
<div class="toc-title-container">
<span class="toc-title">
Contents
</span>
</div>
<div class="toc-tree">
<ul>
<li><a class="reference internal" href="#">Ive Walked 500 Miles…</a><ul>
<li><a class="reference internal" href="#the-main-road">The Main Road</a></li>
<li><a class="reference internal" href="#the-side-quests">The Side Quests</a></li>
<li><a class="reference internal" href="#snap-back-to-reality">Snap Back to Reality</a></li>
</ul>
</li>
</ul>
</div>
</div>
2020-08-26 11:29:49 +02:00
2020-09-30 18:45:15 +02:00
</aside>
</main>
</div>
2020-08-26 11:29:49 +02:00
</body>
</html>