Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Quarto GHA Workflow Runner committed Oct 4, 2024
1 parent 7ff6f89 commit 0c47415
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8cba712b
ef1b4c86
32 changes: 32 additions & 0 deletions 03_testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,37 @@ <h2 class="smaller anchored" data-anchor-id="profiling---output">Profiling - <em
18 240227 437538803.0 1821.4 2.5 points[j], points[j + 1] = points[j + 1], points[j]
19 1 500.0 500.0 0.0 return points</code></pre>
</section>
<section id="makefiles" class="level2 smaller">
<h2 class="smaller anchored" data-anchor-id="makefiles">Makefiles</h2>
<div class="incremental">
<ul class="incremental">
<li>Makefiles simplify running complex commands.</li>
<li>They act as a single source of truth for how to run your tools.</li>
<li>Self documenting, making it easier to onboard new team members.</li>
<li>Run ‘make &lt;command&gt;’ to run a command from the Makefile.</li>
<li>On Linux by default, for Windows install with <a href="https://www.msys2.org/">MSYS2</a> or <a href="https://chocolatey.org/">Chocolatey</a> (or use WSL).</li>
</ul>
</div>
<p>. . .</p>
<p>Example</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>Makefile</strong></pre>
</div>
<div class="sourceCode" id="cb19" data-filename="Makefile"><pre class="sourceCode numberSource makefile number-lines code-with-copy"><code class="sourceCode makefile"><span id="cb19-1"><a href="#cb19-1"></a><span class="dt">LIB</span> <span class="ch">=</span><span class="st"> my_library</span></span>
<span id="cb19-2"><a href="#cb19-2"></a></span>
<span id="cb19-3"><a href="#cb19-3"></a><span class="dv">check:</span><span class="dt"> lint typecheck test</span></span>
<span id="cb19-4"><a href="#cb19-4"></a></span>
<span id="cb19-5"><a href="#cb19-5"></a><span class="dv">lint:</span></span>
<span id="cb19-6"><a href="#cb19-6"></a><span class="er"> </span>ruff check <span class="ch">$(</span><span class="dt">LIB</span><span class="ch">)</span></span>
<span id="cb19-7"><a href="#cb19-7"></a></span>
<span id="cb19-8"><a href="#cb19-8"></a><span class="dv">format:</span></span>
<span id="cb19-9"><a href="#cb19-9"></a><span class="er"> </span>ruff format <span class="ch">$(</span><span class="dt">LIB</span><span class="ch">)</span></span>
<span id="cb19-10"><a href="#cb19-10"></a></span>
<span id="cb19-11"><a href="#cb19-11"></a><span class="dv">test:</span></span>
<span id="cb19-12"><a href="#cb19-12"></a><span class="er"> </span>pytest --disable-warnings</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</section>
<section id="summary" class="level2 smaller">
<h2 class="smaller anchored" data-anchor-id="summary">Summary</h2>
<div class="incremental">
Expand All @@ -612,6 +643,7 @@ <h2 class="smaller anchored" data-anchor-id="summary">Summary</h2>
<li><strong>Ruff</strong> is a fast linter that checks for common errors and style issues.</li>
<li><strong>Ruff</strong> is also an automatic code formatter that enforces a consistent style.</li>
<li>Profiling is a way to measure the performance of your code.</li>
<li><strong>Makefiles</strong> simplify project related commands for everyone.</li>
</ul>
</div>

Expand Down
33 changes: 33 additions & 0 deletions 03_testing_slides.html
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,38 @@ <h2>Profiling - <em>output</em></h2>
19 1 500.0 500.0 0.0 return points</code></pre>
</div>
</section>
<section id="makefiles" class="slide level2 smaller">
<h2>Makefiles</h2>
<div>
<ul>
<li class="fragment">Makefiles simplify running complex commands.</li>
<li class="fragment">They act as a single source of truth for how to run your tools.</li>
<li class="fragment">Self documenting, making it easier to onboard new team members.</li>
<li class="fragment">Run ‘make &lt;command&gt;’ to run a command from the Makefile.</li>
<li class="fragment">On Linux by default, for Windows install with <a href="https://www.msys2.org/">MSYS2</a> or <a href="https://chocolatey.org/">Chocolatey</a> (or use WSL).</li>
</ul>
</div>
<div class="fragment">
<p>Example</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>Makefile</strong></pre>
</div>
<div class="sourceCode" id="cb19" data-filename="Makefile" data-code-line-numbers="|1|5-6|8-9|11-12|3|"><pre class="sourceCode numberSource makefile number-lines code-with-copy"><code class="sourceCode makefile"><span id="cb19-1"><a></a><span class="dt">LIB</span> <span class="ch">=</span><span class="st"> my_library</span></span>
<span id="cb19-2"><a></a></span>
<span id="cb19-3"><a></a><span class="dv">check:</span><span class="dt"> lint typecheck test</span></span>
<span id="cb19-4"><a></a></span>
<span id="cb19-5"><a></a><span class="dv">lint:</span></span>
<span id="cb19-6"><a></a><span class="er"> </span>ruff check <span class="ch">$(</span><span class="dt">LIB</span><span class="ch">)</span></span>
<span id="cb19-7"><a></a></span>
<span id="cb19-8"><a></a><span class="dv">format:</span></span>
<span id="cb19-9"><a></a><span class="er"> </span>ruff format <span class="ch">$(</span><span class="dt">LIB</span><span class="ch">)</span></span>
<span id="cb19-10"><a></a></span>
<span id="cb19-11"><a></a><span class="dv">test:</span></span>
<span id="cb19-12"><a></a><span class="er"> </span>pytest --disable-warnings</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</div>
</section>
<section id="summary" class="slide level2 smaller">
<h2>Summary</h2>
<div>
Expand All @@ -893,6 +925,7 @@ <h2>Summary</h2>
<li class="fragment"><strong>Ruff</strong> is a fast linter that checks for common errors and style issues.</li>
<li class="fragment"><strong>Ruff</strong> is also an automatic code formatter that enforces a consistent style.</li>
<li class="fragment">Profiling is a way to measure the performance of your code.</li>
<li class="fragment"><strong>Makefiles</strong> simplify project related commands for everyone.</li>
</ul>
</div>

Expand Down
18 changes: 16 additions & 2 deletions search.json
Original file line number Diff line number Diff line change
Expand Up @@ -2372,12 +2372,19 @@
"section": "Profiling - output",
"text": "Profiling - output\nInvoking the jupyter magic command lprun with:\n\nfunction to profile - top_neighbors\ncode to run - main()\n\n%lprun -f top_neighbors main()\n\n\nLine # Hits Time Per Hit % Time Line Contents\n==============================================================\n 3 def top_neighbors(points, radius=\"0.1\"):\n 4 \"\"\"Don't use this function, it's only purpose is to be profiled.\"\"\"\n 5 1 2800.0 2800.0 0.0 n = len(points)\n 6 1 353300.0 353300.0 0.0 idx = np.array([int(x) for x in str.split(\"0 \"* n)])\n 7 \n 8 1001 345100.0 344.8 0.0 for i in range(n):\n 9 1001000 378191701.0 377.8 2.2 for j in range(n):\n 10 1000000 328387205.0 328.4 1.9 if i != j:\n 11 999000 1e+10 14473.0 83.8 d = np.sqrt(np.sum((points[i] - points[j])**2))\n 12 999000 933778605.0 934.7 5.4 if d &lt; float(radius): \n 13 28952 57010001.0 1969.1 0.3 idx[i] += 1\n 14 1001 367100.0 366.7 0.0 for i in range(n):\n 15 500500 144295203.0 288.3 0.8 for j in range(n - i - 1):\n 16 499500 302166901.0 604.9 1.8 if idx[j] &lt; idx[j + 1]:\n 17 240227 212070500.0 882.8 1.2 idx[j], idx[j + 1] = idx[j + 1], idx[j]\n 18 240227 437538803.0 1821.4 2.5 points[j], points[j + 1] = points[j + 1], points[j]\n 19 1 500.0 500.0 0.0 return points"
},
{
"objectID": "03_testing_slides.html#makefiles",
"href": "03_testing_slides.html#makefiles",
"title": "Testing, linting and formatting",
"section": "Makefiles",
"text": "Makefiles\n\n\nMakefiles simplify running complex commands.\nThey act as a single source of truth for how to run your tools.\nSelf documenting, making it easier to onboard new team members.\nRun ‘make &lt;command&gt;’ to run a command from the Makefile.\nOn Linux by default, for Windows install with MSYS2 or Chocolatey (or use WSL).\n\n\n\nExample\n\n\nMakefile\n\nLIB = my_library\n\ncheck: lint typecheck test\n\nlint:\n ruff check $(LIB)\n\nformat:\n ruff format $(LIB)\n\ntest:\n pytest --disable-warnings"
},
{
"objectID": "03_testing_slides.html#summary",
"href": "03_testing_slides.html#summary",
"title": "Testing, linting and formatting",
"section": "Summary",
"text": "Summary\n\n\nTesting is a way to verify that your code is working as expected.\nUnit tests are small, isolated tests that verify a single logical concept in your code.\nRegression tests are used to verify that your code is still working after changes.\nIntegration tests are used to verify that your code works with other code.\nExceptions are a way to handle errors in your code.\nWarnings are a way to alert users of your code to potential issues or usage errors.\nLinting is a way to check your code for common errors and style issues.\nRuff is a fast linter that checks for common errors and style issues.\nRuff is also an automatic code formatter that enforces a consistent style.\nProfiling is a way to measure the performance of your code.\n\n\n\n\n\n\nPython package development"
"text": "Summary\n\n\nTesting is a way to verify that your code is working as expected.\nUnit tests are small, isolated tests that verify a single logical concept in your code.\nRegression tests are used to verify that your code is still working after changes.\nIntegration tests are used to verify that your code works with other code.\nExceptions are a way to handle errors in your code.\nWarnings are a way to alert users of your code to potential issues or usage errors.\nLinting is a way to check your code for common errors and style issues.\nRuff is a fast linter that checks for common errors and style issues.\nRuff is also an automatic code formatter that enforces a consistent style.\nProfiling is a way to measure the performance of your code.\nMakefiles simplify project related commands for everyone.\n\n\n\n\n\n\nPython package development"
},
{
"objectID": "03_testing.html",
Expand Down Expand Up @@ -2582,12 +2589,19 @@
"section": "Profiling - output",
"text": "Profiling - output\nInvoking the jupyter magic command lprun with:\n\nfunction to profile - top_neighbors\ncode to run - main()\n\n%lprun -f top_neighbors main()\n. . .\n\nLine # Hits Time Per Hit % Time Line Contents\n==============================================================\n 3 def top_neighbors(points, radius=\"0.1\"):\n 4 \"\"\"Don't use this function, it's only purpose is to be profiled.\"\"\"\n 5 1 2800.0 2800.0 0.0 n = len(points)\n 6 1 353300.0 353300.0 0.0 idx = np.array([int(x) for x in str.split(\"0 \"* n)])\n 7 \n 8 1001 345100.0 344.8 0.0 for i in range(n):\n 9 1001000 378191701.0 377.8 2.2 for j in range(n):\n 10 1000000 328387205.0 328.4 1.9 if i != j:\n 11 999000 1e+10 14473.0 83.8 d = np.sqrt(np.sum((points[i] - points[j])**2))\n 12 999000 933778605.0 934.7 5.4 if d &lt; float(radius): \n 13 28952 57010001.0 1969.1 0.3 idx[i] += 1\n 14 1001 367100.0 366.7 0.0 for i in range(n):\n 15 500500 144295203.0 288.3 0.8 for j in range(n - i - 1):\n 16 499500 302166901.0 604.9 1.8 if idx[j] &lt; idx[j + 1]:\n 17 240227 212070500.0 882.8 1.2 idx[j], idx[j + 1] = idx[j + 1], idx[j]\n 18 240227 437538803.0 1821.4 2.5 points[j], points[j + 1] = points[j + 1], points[j]\n 19 1 500.0 500.0 0.0 return points"
},
{
"objectID": "03_testing.html#makefiles",
"href": "03_testing.html#makefiles",
"title": "Testing, linting and formatting",
"section": "Makefiles",
"text": "Makefiles\n\n\nMakefiles simplify running complex commands.\nThey act as a single source of truth for how to run your tools.\nSelf documenting, making it easier to onboard new team members.\nRun ‘make &lt;command&gt;’ to run a command from the Makefile.\nOn Linux by default, for Windows install with MSYS2 or Chocolatey (or use WSL).\n\n\n. . .\nExample\n\n\nMakefile\n\nLIB = my_library\n\ncheck: lint typecheck test\n\nlint:\n ruff check $(LIB)\n\nformat:\n ruff format $(LIB)\n\ntest:\n pytest --disable-warnings"
},
{
"objectID": "03_testing.html#summary",
"href": "03_testing.html#summary",
"title": "Testing, linting and formatting",
"section": "Summary",
"text": "Summary\n\n\nTesting is a way to verify that your code is working as expected.\nUnit tests are small, isolated tests that verify a single logical concept in your code.\nRegression tests are used to verify that your code is still working after changes.\nIntegration tests are used to verify that your code works with other code.\nExceptions are a way to handle errors in your code.\nWarnings are a way to alert users of your code to potential issues or usage errors.\nLinting is a way to check your code for common errors and style issues.\nRuff is a fast linter that checks for common errors and style issues.\nRuff is also an automatic code formatter that enforces a consistent style.\nProfiling is a way to measure the performance of your code."
"text": "Summary\n\n\nTesting is a way to verify that your code is working as expected.\nUnit tests are small, isolated tests that verify a single logical concept in your code.\nRegression tests are used to verify that your code is still working after changes.\nIntegration tests are used to verify that your code works with other code.\nExceptions are a way to handle errors in your code.\nWarnings are a way to alert users of your code to potential issues or usage errors.\nLinting is a way to check your code for common errors and style issues.\nRuff is a fast linter that checks for common errors and style issues.\nRuff is also an automatic code formatter that enforces a consistent style.\nProfiling is a way to measure the performance of your code.\nMakefiles simplify project related commands for everyone."
},
{
"objectID": "01_version_control_slides.html#why-use-version-control",
Expand Down
Loading

0 comments on commit 0c47415

Please sign in to comment.