<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Agriya Khetarpal</title>
    <description>The latest articles on DEV Community by Agriya Khetarpal (@agriyakhetarpal).</description>
    <link>https://dev.to/agriyakhetarpal</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F957493%2F692ed62e-043e-40bd-8566-51e5629df321.jpg</url>
      <title>DEV Community: Agriya Khetarpal</title>
      <link>https://dev.to/agriyakhetarpal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/agriyakhetarpal"/>
    <language>en</language>
    <item>
      <title>GSoC 2023 @ PyBaMM, NumFOCUS: Weeks 7 and 8</title>
      <dc:creator>Agriya Khetarpal</dc:creator>
      <pubDate>Mon, 31 Jul 2023 00:00:00 +0000</pubDate>
      <link>https://dev.to/agriyakhetarpal/gsoc-2023-pybamm-numfocus-weeks-7-and-8-1obd</link>
      <guid>https://dev.to/agriyakhetarpal/gsoc-2023-pybamm-numfocus-weeks-7-and-8-1obd</guid>
      <description>&lt;p&gt;Hi there! This is the fifth blog in a series of seven blogs that document my journey of my Google Summer of Code project under the NumFOCUS umbrella organisation where I aim to improve the documentation infrastructure for PyBaMM, a Python package for working with physics-based battery models.&lt;/p&gt;




&lt;h2&gt;
  
  
  A summary of the tasks I completed
&lt;/h2&gt;

&lt;p&gt;I am continuing to work on adding quality-of-life improvements to the documentation and also to refine it, i.e., to consolidate all its parts in one place so that it is more readable and maintainable for core users and developers respectively.&lt;/p&gt;

&lt;p&gt;With the main requirements of my project and all of the stretch goals associated with it complete, my project is nearing its twilight phase. Therefore, we have decided to create a template for PyBaMM-based projects that will be available for the battery community to make the process of packaging and distributing code much easier, more details below:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Algolia docsearch (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3159"&gt;pybamm-team/PyBaMM #3159&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Generate teams (&lt;a href="https://github.com/pybamm-team/pybamm.org/pull/31"&gt;pybamm-team/pybamm.org #31&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Accessibility improvements (&lt;a href="https://github.com/pybamm-team/pybamm.org/pull/32"&gt;pybamm-team/pybamm.org #32&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Generate teams in the CI (&lt;a href="https://github.com/pybamm-team/pybamm.org/pull/34"&gt;pybamm-team/pybamm.org #34&lt;/a&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Some other, shorter PRs that I opened for minor fixes and improvements:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Configure versions.json and remove the version switcher dropdown (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3108"&gt;pybamm-team/PyBaMM #3108&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Ensure setup-python outputs are always included in &lt;code&gt;nox&lt;/code&gt; cache keys (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3157"&gt;pybamm-team/PyBaMM #3157&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Restructure notebook galleries (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3167"&gt;pybamm-team/PyBaMM #3167&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Enable downloadable PDF, EPUB, and zipped HTML formats on Read the Docs (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3182"&gt;pybamm-team/PyBaMM #3182&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Add docstrings for &lt;code&gt;nox&lt;/code&gt; sessions (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3183"&gt;pybamm-team/PyBaMM #3183&lt;/a&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The website is at the verge of its completion at the time of writing, and will be showcased officially to the battery community soon!&lt;/p&gt;




&lt;h2&gt;
  
  
  Algolia DocSearch v3
&lt;/h2&gt;

&lt;p&gt;We recently applied for Algolia's search-as-you-type service that is available for eligible open-source projects and technical blogs. It replaces the older, slower search available via the PyData Sphinx Theme and Sphinx.&lt;/p&gt;

&lt;p&gt;Try it out on the &lt;a href="https://docs.pybamm.org/"&gt;latest PyBaMM documentation website&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1684222979008507904-738" src="https://platform.twitter.com/embed/Tweet.html?id=1684222979008507904"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1684222979008507904-738');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1684222979008507904&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;h2&gt;
  
  
  Generating a page highlighting the team members and contributors
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Truly, recognising the work of everyone who contributed to PyBaMM is the insignia of legends.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I added a teams page on the PyBaMM website at &lt;a href="https://pybamm.org/teams/"&gt;https://pybamm.org/teams/&lt;/a&gt;. It lists the maintainers, emeritus maintainers, maintainer trainees, and contributors one after the other. The &lt;code&gt;scripts/generate_teams.py&lt;/code&gt; file, also linked against the target &lt;code&gt;make teams&lt;/code&gt;, when run, gets data from the GitHub API and adds details about the teams in their respective HTML pages.&lt;/p&gt;

&lt;p&gt;I also added a simple workflow to accompany this script; it runs this script set according to a CRON job weekly with GitHub Actions, automatically creates a pull request if there are changes, and asks for reviews from the four maintainers of the repository.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5PqC618t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vgcgkkhsiop9w2xeljdo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5PqC618t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vgcgkkhsiop9w2xeljdo.png" alt="PyBaMM teams page" width="800" height="1227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; PyBaMM follows the all-contributors specification to recognise contributions beyond code (bug reports, documentation, fiscal sponsorships, et cetera). To see the full list of contributors, see the &lt;a href="https://github.com/pybamm-team/PyBaMM#-contributors"&gt;Contributors section in the PyBaMM repository README&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up a new project: &lt;code&gt;pybamm-cookiecutter&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;The mentors and I have decided to implement a standardised template for projects that use PyBaMM. This template is intended to be used with projects that use PyBaMM and serve as an educational resource as well.&lt;/p&gt;

&lt;p&gt;Once completed, this template can be used with standard templating engines such as &lt;code&gt;cookiecutter&lt;/code&gt; and &lt;code&gt;cruft&lt;/code&gt;, and possibly &lt;code&gt;copier&lt;/code&gt; in the future. This way, people can distribute Jupyter notebooks as examples, utility functions and custom source code that build upon PyBaMM as a dependency, scripts for code releases for a preprint or a paper that uses PyBaMM in a collaborative academic setting, and much more.&lt;/p&gt;

&lt;p&gt;The build-backends that are to be supported are &lt;code&gt;hatch&lt;/code&gt;, &lt;code&gt;flit&lt;/code&gt;. Support for the backends &lt;code&gt;setuptools621&lt;/code&gt; and &lt;code&gt;setuptools&lt;/code&gt; is also planned. The repository will remain opinionated and will also support adding custom tools such as the PyBaMM's favourite pre-commit hooks, such as &lt;code&gt;ruff&lt;/code&gt;, &lt;code&gt;black&lt;/code&gt;, and &lt;code&gt;nbQA&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Optionally, users of the template will also be able to load data through &lt;code&gt;python-dotenv&lt;/code&gt; and a &lt;code&gt;.env&lt;/code&gt; file in the root directory that will containing the path to data-related files, which will serve the purpose of keeping code and data separate.&lt;/p&gt;

&lt;p&gt;Last but surely not the least, this will provide a unified method for adding third-party parameter sets through a combination of a &lt;code&gt;parameters/&lt;/code&gt; folder and entry points in &lt;code&gt;pyproject.toml&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Please feel free to comment on the &lt;a href="https://github.com/pybamm-team/pybamm-cookiecutter/issues/1"&gt;issue thread in the &lt;code&gt;pybamm-cookiecutter&lt;/code&gt; repository&lt;/a&gt; and share your thoughts. Keep watching this space for more updates!&lt;/p&gt;




&lt;h2&gt;
  
  
  Stay tuned
&lt;/h2&gt;

&lt;p&gt;I will be posting these blogs fortnightly as a part of my GSoC project. Thoughts, comments, constructive criticism, and insights will be greatly appreciated. See you soon on the next one! For updates, please follow me on my social media handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/agriyakhetarpal"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/agriyakhetarpal"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/in/agriyakhetarpal"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>gsoc</category>
      <category>python</category>
      <category>opensource</category>
    </item>
    <item>
      <title>GSoC 2023 @ PyBaMM, NumFOCUS: Weeks 5 and 6</title>
      <dc:creator>Agriya Khetarpal</dc:creator>
      <pubDate>Thu, 13 Jul 2023 22:12:58 +0000</pubDate>
      <link>https://dev.to/agriyakhetarpal/gsoc-2023-pybamm-numfocus-weeks-5-and-6-533n</link>
      <guid>https://dev.to/agriyakhetarpal/gsoc-2023-pybamm-numfocus-weeks-5-and-6-533n</guid>
      <description>&lt;p&gt;Hi there! This is the fourth blog in a series of seven blogs that document my journey of my Google Summer of Code project under the NumFOCUS umbrella organisation where I aim to improve the documentation infrastructure for PyBaMM, a Python package for working with physics-based battery models.&lt;/p&gt;




&lt;h2&gt;
  
  
  A summary of the tasks I completed
&lt;/h2&gt;

&lt;p&gt;I am continuing to work on adding quality-of-life improvements to the documentation and also to refine it, i.e., to consolidate all its parts in one place so that it is more readable and maintainable for core users and developers respectively.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use &lt;code&gt;nbsphinx&lt;/code&gt; to embed Jupyter notebooks (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3043"&gt;pybamm-team/PyBaMM #3043&lt;/a&gt;) was now merged. &lt;/li&gt;
&lt;li&gt;Display when pages were last updated in the docs (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3089"&gt;pybamm-team/PyBaMM #3089&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Enable multithreaded documentation builds (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3097"&gt;pybamm-team/PyBaMM #3097&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Add an option to download Jupyter notebooks from readthedocs (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3076"&gt;pybamm-team/PyBaMM #3076&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Add floating window tooltips for cross-references in the docs (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3083"&gt;pybamm-team/PyBaMM #3083&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Generate inheritance diagrams for models and submodels in the documentation (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3074"&gt;pybamm-team/PyBaMM #3074&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Cache &lt;code&gt;nox&lt;/code&gt; environments and refactor unit tests in CI (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3079"&gt;#3079&lt;/a&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;PyBaMM also recently migrated from the DSL-based &lt;code&gt;tox&lt;/code&gt; to the Python-based (infrastrucure-as-code) &lt;code&gt;nox&lt;/code&gt; for running the test suite, thanks to my brilliant GSoC workmate Arjun. Many improvements to the testing infrastructure are planned, and I took on the task for one of them (more to come in the future!). I like this article titled &lt;a href="https://hynek.me/articles/why-i-like-nox/"&gt;&lt;strong&gt;Why I Like Nox&lt;/strong&gt;&lt;/a&gt; by the PSF Fellow Hynek Schlawack, that somewhat echoes the sentiment of why we decided to switch to it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Some PRs in the &lt;a href="https://pybamm.org"&gt;pybamm.org&lt;/a&gt; website &lt;a href="//github.com/pybamm-team/pybamm.org"&gt;repository&lt;/a&gt; that I opened, which will be completed in the coming weeks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Generate teams (&lt;a href="https://github.com/pybamm-team/pybamm.org/pull/31"&gt;pybamm-team/pybamm.org #31&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Accessibility improvements (&lt;a href="https://github.com/pybamm-team/pybamm.org/pull/32"&gt;pybamm-team/pybamm.org #32&lt;/a&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The website is at the verge of its completion and will be showcased to the battery community and ecosystem soon!&lt;/p&gt;




&lt;h2&gt;
  
  
  Gorgeous galleries for notebooks
&lt;/h2&gt;

&lt;p&gt;In an attempt to incorporate the notebooks in the documentation, I had previously started adding the notebooks to the documentation. All the notebooks have been ported now and can be viewed on the &lt;a href="https://docs.pybamm.org/en/latest/source/examples/notebooks/index.html"&gt;Example Notebooks page&lt;/a&gt; in the PyBaMM documentation.&lt;/p&gt;

&lt;p&gt;I also configured the &lt;a href="https://sphinx-gallery.github.io/stable/index.html"&gt;&lt;code&gt;sphinx-gallery&lt;/code&gt;&lt;/a&gt; extension to generate thumbnails for each notebook. See it in action below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DZCkg7GE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qzub3t5kfjwibs6lc3qb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DZCkg7GE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qzub3t5kfjwibs6lc3qb.png" alt="A white and black mixture of how the Jupyter notebook thumbnails look, this shows the Plotting, Solvers, and Spatial Methods notebooks" width="800" height="858"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All the notebooks can be accessed through Google Colab as before. The example scripts will be ported in the coming weeks in order to finalise the thumbnails.&lt;/p&gt;

&lt;h2&gt;
  
  
  Download the notebooks at ease
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;nbsphinx&lt;/code&gt; extension also includes support for prologues and epilogues, i.e., text that can be embedded at the Sphinx builder runtime at either the top or the bottom of a particular page—in this case, the notebooks pages. I added an &lt;code&gt;nbsphinx_prolog&lt;/code&gt; configuration value in &lt;code&gt;docs/source/conf.py&lt;/code&gt; (the Sphinx configuration file) in this manner:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;nbsphinx_prolog&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s"&gt;"""

{% set readthedocs_download_url =
'https://docs.pybamm.org/en/latest/' %}

{% set doc_path = env.doc2path(env.docname, base=None) %}

.. raw:: html

    &amp;lt;div class="admonition tip"&amp;gt;
        &amp;lt;p class="admonition-title"&amp;gt;
            Tip
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
            You may
            &amp;lt;a href="{{ readthedocs_download_url | e }}{{ doc_path | e }}"
            target="_blank" download&amp;gt;
            download this notebook&amp;lt;/a&amp;gt; and run it offline.
        &amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;

"""&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The combination of raw HTML and Jinja templating, indubitably, allows us to do many useful things with Sphinx. Users can use the aforementioned &lt;em&gt;Open in Colab&lt;/em&gt; button as well to run the notebooks in the browser.&lt;/p&gt;

&lt;p&gt;Here is an image of the admonition note in action:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iBv9rmRb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wclwim0auxpb2g9xtxkw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iBv9rmRb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wclwim0auxpb2g9xtxkw.png" alt="An admonition note at the top of the Jelly roll model Jupyter notebook page, which contains a Google Colab badge and a download link" width="800" height="798"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It can be tried on any of the notebooks on the &lt;a href="https://docs.pybamm.org/en/latest/source/examples/notebooks/index.html"&gt;Example Notebooks page&lt;/a&gt; in the documentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version control history for the documentation pages
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;...so that one can know when they messed things up, or when an archaic and unkempt API description was last taken care of. Essentially the &lt;code&gt;git blame&lt;/code&gt; for documentation hosted on Read the Docs.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I added the &lt;code&gt;sphinx-last-updated-by-git&lt;/code&gt; extension and configured it to be in the end of the footer for each page using the &lt;code&gt;html_theme_options&lt;/code&gt; configuration value. The doctests did create some errors because GitHub Actions does not clone the PyBaMM repository to its full depth; it only pulls the latest 50 commits in its checkout step. A similar issue occurred on Read the Docs as well, which was ultimately fixed by adding a custom build command for the &lt;code&gt;post-checkout&lt;/code&gt; step. This way, a complete rendition of the &lt;code&gt;Git&lt;/code&gt; version control  history is downloaded while hosting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Speeding up the documentation builds
&lt;/h2&gt;

&lt;p&gt;Now that the &lt;a href="https://github.com/spatialaudio/nbsphinx"&gt;&lt;code&gt;nbsphinx&lt;/code&gt;&lt;/a&gt; PR was merged, the &lt;code&gt;sphinx-build&lt;/code&gt; commands for the documentation were between 1.5x–2x slower, which subsequently became a menace when building the documentation locally and while running the doctests. The reason behind this was that &lt;code&gt;nbsphinx&lt;/code&gt; was re-building all the notebooks pages and uses &lt;a href="https://pandoc.org"&gt;&lt;code&gt;Pandoc&lt;/code&gt;&lt;/a&gt; under the hood to convert cell-based Markdown to &lt;code&gt;.rst&lt;/code&gt; formats. We had decided not to use the other notebooks rendering solution, i.e., a rival project called &lt;a href="https://github.com/executablebooks/MyST-NB"&gt;&lt;code&gt;MyST-NB&lt;/code&gt;&lt;/a&gt;, because it was not compatible with &lt;code&gt;sphinx-gallery&lt;/code&gt;. Its advantage would have been that it has native caching by default and would not slow down the documentation builds by a significant amount. &lt;/p&gt;

&lt;p&gt;In a short PR, eventually enabled multithreading for building the documentation using the &lt;code&gt;-j auto&lt;/code&gt; flag in SPHINXOPTS, and the results bestowed, to my delight, much faster build times (~40%)! The time came down from the previous ~3.5 minutes to ~2 minutes. Please see the mentioned issue above for more details.&lt;/p&gt;

&lt;h2&gt;
  
  
  Traversing the maze of PyBaMM's many, many battery models with inheritance diagrams
&lt;/h2&gt;

&lt;p&gt;PyBaMM comes with an extensive library of models and submodels, such as the Doyle-Fuller-Newmann model, the Single Particle Model, lead-acid models, submodels for oxygen diffusion, particle cracking models, and many more. It is often difficult for inexperienced users who might still be learning the ropes of how to use PyBaMM effectively. To tackle this issue, I wrote a simple Sphinx extension and added it to the &lt;code&gt;docs/sphinxext&lt;/code&gt; folder. It relies on appending and/or inserting particular lines of code through the &lt;code&gt;sphinx.ext.autodoc&lt;/code&gt; extension, which provides functionality to include documentation for classes and methods by extracting their docstrings. &lt;/p&gt;

&lt;p&gt;I used a dropdown from the &lt;code&gt;sphinx-design&lt;/code&gt; extension to make the inheritance diagram collapsible upon request and through the click of a button. The extension uses &lt;code&gt;graphviz&lt;/code&gt; and &lt;code&gt;sphinx.ext.inheritance_diagram&lt;/code&gt; as dependencies to create the diagram and can be configured in &lt;code&gt;conf.py&lt;/code&gt;. Currently, the extension creates these plots in &lt;code&gt;.PNG&lt;/code&gt; format for the models and the submodels.&lt;/p&gt;

&lt;p&gt;Here is an example for the Many Particle Model (MPM):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u_Sa1B4e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w3g87qiyg815l1ehwahp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u_Sa1B4e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w3g87qiyg815l1ehwahp.png" alt="API documentation for the Many Particle Model, which shows its inheritance diagram, expanded" width="800" height="973"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Floating-window tooltips for hyperlinks in the documentation
&lt;/h2&gt;

&lt;p&gt;It is also necessary to sometimes have a quick look at a particular parameter for a method or a class, but one does not want to search for it and go to the results. To enhance the productivity for PyBaMM users and developers, I added and configured a Sphinx extension &lt;code&gt;sphinx-hoverxref&lt;/code&gt;, which adds tooltips that can be viewed upon hovering on a particular link within the &lt;em&gt;same&lt;/em&gt; tab. See it in action below in the Interpolant class in PyBaMM, which is used heavily in the expression tree and its operators:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7G-FzaiE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/saqyqfhg2hn6h2cp7umv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7G-FzaiE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/saqyqfhg2hn6h2cp7umv.png" alt="Floating-window tooltip is visible for the Symbol class, on the same page as the Interpolant class in the Expression Tree API documentation" width="800" height="679"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Tasks to focus on in the coming weeks
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Implement a &lt;code&gt;search-as-you-type&lt;/code&gt; feature for the hosted documentation for relatively faster search results in comparison to the default JavaScript-based search engine&lt;/li&gt;
&lt;li&gt;Make the documentation more maintainable using &lt;code&gt;sphinx.ext.autosummary&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Stay tuned
&lt;/h2&gt;

&lt;p&gt;I will be posting these blogs fortnightly as a part of my GSoC project. Thoughts, comments, constructive criticism, and insights will be greatly appreciated. See you soon on the next one! For updates, please follow me on my social media handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/agriyakhetarpal"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/agriyakhetarpal"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/in/agriyakhetarpal"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>gsoc</category>
      <category>python</category>
      <category>opensource</category>
    </item>
    <item>
      <title>GSoC 2023 @ PyBaMM, NumFOCUS: Weeks 3 and 4</title>
      <dc:creator>Agriya Khetarpal</dc:creator>
      <pubDate>Thu, 13 Jul 2023 22:11:08 +0000</pubDate>
      <link>https://dev.to/agriyakhetarpal/gsoc-2023-pybamm-numfocus-weeks-3-and-4-1mdm</link>
      <guid>https://dev.to/agriyakhetarpal/gsoc-2023-pybamm-numfocus-weeks-3-and-4-1mdm</guid>
      <description>&lt;p&gt;Hi there! This is the third blog in a series of seven blogs that document my journey of my Google Summer of Code project under the NumFOCUS umbrella organisation where I aim to improve the documentation infrastructure for PyBaMM, a Python package for physics-based battery models.&lt;/p&gt;




&lt;h2&gt;
  
  
  A summary of the tasks I completed
&lt;/h2&gt;

&lt;p&gt;With my GSoC project now in full swing and the website almost complete, I ventured into the foray of improving the documentation infrastructure for PyBaMM as well. You may read the API documentation and the user guide for getting started with PyBaMM at &lt;a href="https://pybamm.readthedocs.io"&gt;https://pybamm.readthedocs.io&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In these weeks, I opened many issues and PRs, listed as follows. These involved working not only with the documentation but other infrastructure-related quality of life improvements too!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Restructure pages on the navigation bar and reformat contents (&lt;a href="https://github.com/pybamm-team/pybamm.org/pull/22"&gt;pybamm-team/pybamm.org #22&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Reformat news to be single-page only (&lt;a href="https://dev.toReformat%20news%20to%20be%20single-page%20only%20#24"&gt;pybamm-team/pybamm.org #24&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Add inline-tabs for Sphinx docs (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3022"&gt;pybamm-team/PyBaMM #3022&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;sphinxcontrib-bibtex&lt;/code&gt; for citing references in docs (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3034"&gt;pybamm-team/PyBaMM #3034&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;nbsphinx&lt;/code&gt; to embed Jupyter notebooks (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3043"&gt;pybamm-team/PyBaMM #3043&lt;/a&gt;) — this is currently not merged at the time of writing, though I am glad that I was able to make it work, since this was also one of the stretch goals of my project!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Other small contributions, related to repository infrastructure and maintenance:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use Python 3.11 for generating coverage in CI (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3016"&gt;pybamm-team/PyBaMM #3016&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Remove backport &lt;code&gt;importlib_metadata&lt;/code&gt; from required dependencies (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3050"&gt;pybamm-team/PyBaMM #3050&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;[Bug]: Conversion to scalars for arrays with ndim&amp;gt;0: NumPy 1.25 deprecation (Python 3.9–3.11)(&lt;a href="https://github.com/pybamm-team/PyBaMM/issues/3052"&gt;pybamm-team/PyBaMM #3052&lt;/a&gt;) and its corresponding PR: Extract single element from np.ndarray when converting to scalar (&lt;a href="https://github.com/pybamm-team/PyBaMM/pull/3055"&gt;pybamm-team/PyBaMM #3055&lt;/a&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Inline-tabs for Sphinx
&lt;/h2&gt;

&lt;p&gt;This was a short PR to add the &lt;code&gt;sphinx-inline-tabs&lt;/code&gt; extension. It removes redundancy for code blocks and those sections across the documentation and makes them much neater than before to the users' eyes:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Nioi2Psq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/19s3g4po687hneza4rf3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Nioi2Psq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/19s3g4po687hneza4rf3.png" alt=" raw `sphinx-inline-tabs` endraw  in action" width="800" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You may view other examples of the extension in action on the &lt;a href="https://docs.pybamm.org/en/latest/source/user_guide/installation/index.html"&gt;PyBaMM Installation guide(s)&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keeping in-line textual citations in the documentation instead of hard-coding them
&lt;/h2&gt;

&lt;p&gt;PyBaMM has a &lt;code&gt;Citations&lt;/code&gt; class which reads information from a &lt;code&gt;CITATIONS.bib&lt;/code&gt; file to register citations when users run a particular simulation and use certain models and solvers. Similarly, PyBaMM also offers a variety of common parameter sets referenced from values in papers over the past two decades of research and beyond. They were hard-coded in the docstrings for the model classes and the &lt;code&gt;parameters.rst&lt;/code&gt; file, which made the citations prone to mistakes, spelling errors, and even validation errors in case a reference is not formatted correctly. &lt;/p&gt;

&lt;p&gt;With the &lt;code&gt;sphinxcontrib-bibtex&lt;/code&gt; extension; I was able to parse the &lt;code&gt;CITATIONS.bib&lt;/code&gt; file to extract references from it, and then use the directives provided, such as &lt;code&gt;:footcite:t:&lt;/code&gt; and &lt;code&gt;.. footbibliography::&lt;/code&gt; to display all references on a page programmatically. This serves the purpose of automation: I also added BibTeX references to some missing papers in this PR. An example of how the textual citation references look like is shown below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Rs6AnYPv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vtf2pjxjjg0ubzal2isy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rs6AnYPv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vtf2pjxjjg0ubzal2isy.png" alt="Image description" width="800" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;More examples can be viewed at the &lt;a href="https://docs.pybamm.org/en/latest/source/api/parameters/parameter_sets.html"&gt;Parameter Sets page in the PyBaMM documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Galleries are always pretty, whether for Dadaist art... or for Jupyter notebooks
&lt;/h2&gt;

&lt;p&gt;Insipired by the &lt;a href="https://scikit-learn.org/stable/auto_examples/index.html"&gt;&lt;code&gt;scikit-learn&lt;/code&gt; documentation&lt;/a&gt;, we decided to embed a gallery for PyBaMM's myriads of Jupyter notebooks that contain examples, beginner tutorials, advanced examples, model demonstrations, and more. This was particularly challenging because Sphinx still does not support relative links in the table of contents (the &lt;code&gt;.. toctree::&lt;/code&gt; directive), so the only options were to either use a cumbersome &lt;code&gt;nbsphinx-link&lt;/code&gt; extension along with &lt;code&gt;nbsphinx&lt;/code&gt;, or to move all the example notebooks from the &lt;code&gt;examples/&lt;/code&gt; folder in the root directory to the &lt;code&gt;docs/source/examples/&lt;/code&gt; directory. PyBaMM also uses Sphinx-based doctests, which also started failing due to errors in how the Markdown contents inside &lt;code&gt;.ipynb&lt;/code&gt; notebooks are formatted—fixing them also took some time, since some notebooks had widgets, which caused a frozen module error with Python 3.11 and the doctests continued to run indefinitely in a PR for five hours and counting!&lt;/p&gt;

&lt;p&gt;There were also other problems, such as the MathJax rendering for the model equations going haywire in many a location in likewise many a notebook when building the documentation—which were fixed via an agnostic syntax style for how equations are displayed, rather than KaTeX.&lt;/p&gt;

&lt;p&gt;Watch out for the next blog to see the result and the forthcoming troubles (of course)!&lt;/p&gt;

&lt;h2&gt;
  
  
  Tasks to focus on in the coming weeks
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Further improvements to the documentation infrastructure in general&lt;/li&gt;
&lt;li&gt;Getting the revamped PyBaMM website (&lt;a href="https://pybamm.org"&gt;https://pybamm.org&lt;/a&gt;) ready to be shown to the world&lt;/li&gt;
&lt;li&gt;Embedding the PyBaMM example scripts in the documentation&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Stay tuned
&lt;/h2&gt;

&lt;p&gt;I will be posting these blogs fortnightly as a part of my GSoC project. Thoughts, comments, constructive criticism, and insights will be greatly appreciated. See you soon on the next one! For updates, please follow me on my social media handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/agriyakhetarpal"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/agriyakhetarpal"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/in/agriyakhetarpal"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>gsoc</category>
      <category>python</category>
      <category>opensource</category>
    </item>
    <item>
      <title>GSoC 2023 @ PyBaMM, NumFOCUS: Weeks 1 and 2</title>
      <dc:creator>Agriya Khetarpal</dc:creator>
      <pubDate>Thu, 13 Jul 2023 22:08:03 +0000</pubDate>
      <link>https://dev.to/agriyakhetarpal/gsoc-2023-pybamm-numfocus-weeks-1-and-2-3mi4</link>
      <guid>https://dev.to/agriyakhetarpal/gsoc-2023-pybamm-numfocus-weeks-1-and-2-3mi4</guid>
      <description>&lt;p&gt;Hi there! This is the second blog in a series of seven blogs that document my journey of my Google Summer of Code project under the NumFOCUS umbrella organisation where I aim to improve the documentation infrastructure for PyBaMM, a Python package for working with physics-based battery models.&lt;/p&gt;




&lt;h2&gt;
  
  
  A summary of the tasks I completed
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Use &lt;code&gt;Lychee&lt;/code&gt; to check for broken links (&lt;a href="https://github.com/pybamm-team/pybamm.org/pull/3"&gt;#3&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;pre-commit&lt;/code&gt; support (&lt;a href="https://github.com/pybamm-team/pybamm.org/pull/4"&gt;#4&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Improvements to &lt;code&gt;pre-commit&lt;/code&gt; (&lt;a href="https://github.com/pybamm-team/pybamm.org/pull/5"&gt;#5&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Netlify deployment infrastructure (&lt;a href="https://github.com/pybamm-team/pybamm.org/pull/8"&gt;#8&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Add news pages from PyBaMM blogspot (&lt;a href="https://github.com/pybamm-team/pybamm.org/pull/10"&gt;#10&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Custom PyBaMM 404 page (&lt;a href="https://github.com/pybamm-team/pybamm.org/pull/12"&gt;#12&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Favicon for PyBaMM (&lt;a href="https://github.com/pybamm-team/pybamm.org/pull/14"&gt;#14&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Donations and sponsors (&lt;a href="https://github.com/pybamm-team/pybamm.org/pull/16"&gt;#16&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Twitter feed, institutional partners, and about PyBaMM (&lt;a href="https://github.com/pybamm-team/pybamm.org/pull/19"&gt;#19&lt;/a&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I have started a summary issue to keep track of my progress, which I will be editing on a regular basis. Please feel free to suggest an improvement in the &lt;a href="https://github.com/pybamm-team/pybamm.org/issues/6"&gt;summary issue thread&lt;/a&gt; and I will be glad to look into it!&lt;/p&gt;

&lt;h2&gt;
  
  
  Building blocks: the initial infrastructure for the new &lt;a href="//pybamm.org"&gt;pybamm.org&lt;/a&gt; website
&lt;/h2&gt;

&lt;p&gt;We started the project by creating a &lt;a href="https://github.com/pybamm-team/pybamm.org"&gt;repository&lt;/a&gt; for the website in the &lt;a href="https://github.com/pybamm-team"&gt;pybamm-team&lt;/a&gt; organisation. To set up the website itself, we planned to use the &lt;a href="https://theme.scientific-python.org"&gt;Scientific Python Hugo theme&lt;/a&gt;; also used by &lt;a href="https://numpy.org"&gt;NumPy&lt;/a&gt; and &lt;a href="https://scipy.org"&gt;SciPy&lt;/a&gt;, and by some other Python projects in the &lt;a href="https://scientific-python.org/"&gt;Scientific Python community&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To host the website, we preferred Netlify to GitHub Pages owing to the fact that it would be easier to see collaborative previews on changes made via pull requests. The development version of the website can be accessed at &lt;a href="https://pybamm-developer-preview.netlify.app/"&gt;https://pybamm-developer-preview.netlify.app/&lt;/a&gt;. Please feel free to &lt;a href="https://github.com/pybamm-team/pybamm.org/issues"&gt;open an issue&lt;/a&gt; if you see something broken!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qcBpBejb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/agoyc825yabb72xceqg5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qcBpBejb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/agoyc825yabb72xceqg5.png" alt="A screengrab of the PyBaMM website" width="800" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The war against broken links: validating and checking them with a workflow
&lt;/h2&gt;

&lt;p&gt;I also added my favourite link checker (&lt;a href="https://github.com/lycheeverse/lychee"&gt;Lychee&lt;/a&gt; in a GitHub Action to check for broken links and. It is incredibly fast and written in Rust — which is also the reason it is one of my favourites! It also serves as a personal reminder to learn Rust some day. The &lt;a href="https://github.com/pybamm-team/pybamm.org/actions/workflows/links.yml"&gt;workflow&lt;/a&gt; currently runs as a CRON job at 0300 hours UTC scheduled daily. The link checker also has features such as excluding selected links or status codes, adding user agents, and an option to enable caching.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;pre-commit&lt;/code&gt; hooks are cool!
&lt;/h2&gt;

&lt;p&gt;I added pre-commit hooks for developers to use, such as &lt;a href="https://astral.sh/ruff"&gt;&lt;code&gt;ruff&lt;/code&gt;&lt;/a&gt;—an extremely fast Python linter written in Rust, &lt;code&gt;black&lt;/code&gt; as an autoformatter, &lt;code&gt;codespell&lt;/code&gt; to fix common spelling errors and some other pre-commit hooks to remove trailing whitespaces and lint Markdown files. This way, developers working on the website locally can run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pre-commit &lt;span class="nb"&gt;install
&lt;/span&gt;pre-commit run &lt;span class="nt"&gt;--all-files&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to fix all the files with the pre-commit hooks before committing, or let &lt;code&gt;git&lt;/code&gt; do it for them.&lt;/p&gt;

&lt;p&gt;In addition, we enabled support for the &lt;a href="https://pre-commit.ci"&gt;pre-commit.ci&lt;/a&gt; bot to automatically perform these operations wherever possible on pull requests and commits.&lt;/p&gt;

&lt;h2&gt;
  
  
  For every piece of art, there is another that does it better
&lt;/h2&gt;

&lt;p&gt;I ported over many pages and items from the previous PyBaMM website, redesigning and editing them as neccessary:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Donations page for enlisting sponsorships and ways to contribute PyBaMM fiscally&lt;/li&gt;
&lt;li&gt;Blogs by the PyBaMM team, in a newsroom page (&lt;a href="https://pybamm.org/news/"&gt;https://pybamm.org/news/&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;A custom 404 page&lt;/li&gt;
&lt;li&gt;A favicon for the website, which is essentially the PyBaMM logo&lt;/li&gt;
&lt;li&gt;A Twitter feed for PyBaMM, and&lt;/li&gt;
&lt;li&gt;The home page and other pages, which contain training material and institutional partners&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Tasks to focus on in the coming weeks
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Improving the structure for the newly-set-up PyBaMM website and reordering certain pages&lt;/li&gt;
&lt;li&gt;Adding over the remaining pages, and &lt;/li&gt;
&lt;li&gt;Making sure the website adheres to the W3C Web Content Accessibility Guidelines specification&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Stay tuned
&lt;/h2&gt;

&lt;p&gt;I will be posting these blogs fortnightly as a part of my GSoC project. Thoughts, comments, constructive criticism, and insights will be greatly appreciated. See you soon on the next one! For updates, please follow me on my social media handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/agriyakhetarpal"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/agriyakhetarpal"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/in/agriyakhetarpal"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>gsoc</category>
      <category>python</category>
      <category>opensource</category>
    </item>
    <item>
      <title>GSoC 2023 @ PyBaMM, NumFOCUS: Community Bonding</title>
      <dc:creator>Agriya Khetarpal</dc:creator>
      <pubDate>Mon, 29 May 2023 00:00:00 +0000</pubDate>
      <link>https://dev.to/agriyakhetarpal/gsoc-2023-pybamm-numfocus-community-bonding-2m9k</link>
      <guid>https://dev.to/agriyakhetarpal/gsoc-2023-pybamm-numfocus-community-bonding-2m9k</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Hi there! This is the first blog in a series of seven blogs that I will be writing to document my journey as I cruise through the coding period of the Google Summer of Code (GSoC) 2023 open-source programme. I will be working with PyBaMM under the NumFOCUS umbrella for the next twelve weeks to improve its &lt;a href="https://summerofcode.withgoogle.com/programs/2023/projects/DdcerdTx"&gt;documentation infrastructure&lt;/a&gt; and to revamp its website available at &lt;a href="https://www.pybamm.org/"&gt;pybamm.org&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  About PyBaMM
&lt;/h2&gt;

&lt;p&gt;PyBaMM (Python Battery Mathematical Modelling) is an open-source Python package for running battery simulations with a mission to accelerate and partake in cutting-edge battery modelling research. It comes with a library of popular battery models and parameter sets, specialised tools for visualisations and interpretability, and a suite of incredibly fast and robust solvers to solve electrochemical differential algebraic equations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kCiOjIS1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f40wv7k7dwulfle14gm0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kCiOjIS1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f40wv7k7dwulfle14gm0.png" alt="The PyBaMM logo in standard Python blue and yellow colours displaying a pack of batteries" width="800" height="267"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h6&gt;
  
  
  The PyBaMM logo in standard Python blue and yellow colours displaying a pack of batteries
&lt;/h6&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;PyBaMM is supported by institutional partners such as the Faraday Institution and is sponsored by NumFOCUS since 2022, in a mission to advance open science by means of industry-wide and academic collaborative practices. &lt;/p&gt;

&lt;p&gt;This is a long-size project offered by PyBaMM, and I will be working over the course of 350 hours.&lt;/p&gt;




&lt;h2&gt;
  
  
  My journey so far
&lt;/h2&gt;

&lt;p&gt;This section describes how I came to be associated with PyBaMM since the beginning to the end of the Community Bonding period.&lt;/p&gt;

&lt;h3&gt;
  
  
  Interests
&lt;/h3&gt;

&lt;p&gt;I was scourging through issues while contributing to Hacktoberfest last year, and PyBaMM caught my eye–an open-source project in Python for scientific research! I had always loved my readings of  electrochemistry in high school: I quickly submitted a pull request then to drop support for Python 3.7.&lt;/p&gt;

&lt;h3&gt;
  
  
  Contributing
&lt;/h3&gt;

&lt;p&gt;I followed with more pull requests for short fixes in the documentation, a pull request to introduce helper functions in order to autogenerate docstrings, a newer link checker in the CI, and more. I do not possess an understanding of battery physics; however, I continued pushing changes wherever I could. Most of my contributions were for quality-of-life improvements, and I followed suit by joining the PyBaMM Slack organisation looking for chances to help out and learn as much as I can. My fear of large codebases has subsided ever since and I can say that I am familiar with PyBaMM's workflows and how they all integrate together with each other on pull requests, releases, nightly runs, benchmarks, and more.&lt;/p&gt;

&lt;h3&gt;
  
  
  GSoC 2023: Community Bonding
&lt;/h3&gt;

&lt;p&gt;In almost as if a recognition for my efforts, I have been selected as a GSoC student this year and I am elated to be mentored by two of the PyBaMM maintainers &lt;a href="https://sites.google.com/view/valentinsulzer"&gt;Valentin Sulzer&lt;/a&gt; and &lt;a href="//saransh-cpp.github.io"&gt;Saransh Chopra&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The Community Bonding period ended on 28 May, 2023, culminating with an invitation to join PyBaMM's GitHub organisation as a member. &lt;/p&gt;




&lt;h2&gt;
  
  
  Footnotes
&lt;/h2&gt;

&lt;p&gt;I am eager to start working as soon as possible and get my hands dirty on some code! I would also love to build a substantial sense of camaraderie with my mentors and the PyBaMM developers over the course of the next twelve weeks.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;A link to my GSoC proposal: &lt;a href="https://docs.google.com/document/d/1JDLxmU8Qou9i38vJrJ-HmG-89xTMcF9CoRbu9tHz-3Q/edit?usp=sharing"&gt;[PyBaMM] – Documentation (GSoC 2023)&lt;/a&gt;, and &lt;a href="https://summerofcode.withgoogle.com/programs/2023/projects/DdcerdTx"&gt;my GSoC project on the Google Summer of Code website&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Stay tuned
&lt;/h2&gt;

&lt;p&gt;I will be posting these blogs fortnightly as a part of my GSoC project. Thoughts, comments, constructive criticism, and insights will be greatly appreciated. See you soon on the next one! For updates, please follow me on my social media handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/agriyakhetarpal"&gt;Twitter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/agriyakhetarpal"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/in/agriyakhetarpal"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>gsoc</category>
      <category>python</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
