<?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: Anderson Bravalheri</title>
    <description>The latest articles on DEV Community by Anderson Bravalheri (@abravalheri).</description>
    <link>https://dev.to/abravalheri</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%2F125952%2F7bb5666c-556b-4b96-bafc-f4293d16c422.jpg</url>
      <title>DEV Community: Anderson Bravalheri</title>
      <link>https://dev.to/abravalheri</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abravalheri"/>
    <language>en</language>
    <item>
      <title>PyScaffold 4.0 is here 🔥</title>
      <dc:creator>Anderson Bravalheri</dc:creator>
      <pubDate>Thu, 04 Mar 2021 23:04:25 +0000</pubDate>
      <link>https://dev.to/abravalheri/pyscaffold-4-0-is-here-2p13</link>
      <guid>https://dev.to/abravalheri/pyscaffold-4-0-is-here-2p13</guid>
      <description>&lt;p&gt;It has been a long journey since PyScaffold v3 was released and a lot of things happened in the Python community especially regarding the packaging ecosystem...&lt;/p&gt;

&lt;p&gt;We saw emerging a huge effort to standardise the build process and metadata with &lt;a href="https://www.python.org/dev/peps/pep-0517/"&gt;PEP 517&lt;/a&gt; and &lt;a href="https://www.python.org/dev/peps/pep-0518/"&gt;PEP 518&lt;/a&gt;, a tendency to avoid &lt;code&gt;pkg_resources&lt;/code&gt; (in favour of &lt;a href="https://packaging.python.org/guides/packaging-namespace-packages/#native-namespace-packages"&gt;native namespaces with PEP 420&lt;/a&gt;, &lt;a href="https://docs.python.org/3/library/importlib.html#module-importlib.resources"&gt;&lt;code&gt;importlib.resources&lt;/code&gt;&lt;/a&gt; and &lt;a href="https://docs.python.org/3/library/importlib.metadata.html"&gt;&lt;code&gt;importlib.metadata&lt;/code&gt;&lt;/a&gt;) and of course the deprecation of Python version 2. Moreover, having Python 3.6 as the lowest version officially supported by Python's core team, changed the way developers write their code:  a bunch of new features are now available, allowing us to be more expressive and succinct (&lt;em&gt;don't tell me you don't like to use &lt;a href="https://www.python.org/dev/peps/pep-0498/"&gt;f-strings&lt;/a&gt;&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;As a result, the PyScaffold team decided to expand our previous ideas for improvements and also incorporate these changes within the ecosystem into a new, &lt;em&gt;super cool&lt;/em&gt;, version of PyScaffold. So here I am, proud to officially announce the final release of &lt;a href="https://pyscaffold.org/en/v4.0/"&gt;PyScaffold v4&lt;/a&gt; - now available in &lt;a href="https://pypi.org/project/PyScaffold/4.0"&gt;PyPI&lt;/a&gt; 🥳🎉&lt;/p&gt;

&lt;p&gt;The complete list of changes introduced in this version is available at the &lt;a href="https://pyscaffold.org/en/latest/changelog.html"&gt;official website&lt;/a&gt; together with a more &lt;a href="https://pyscaffold.org/en/latest/features.html"&gt;detailed description of all the features&lt;/a&gt;, but I will try to summarise below some highlights of this release.&lt;/p&gt;

&lt;h1&gt;
  
  
  New Defaults
&lt;/h1&gt;

&lt;p&gt;As a response to &lt;a href="https://www.python.org/dev/peps/pep-0517/"&gt;PEP 517&lt;/a&gt; and &lt;a href="https://www.python.org/dev/peps/pep-0518/"&gt;PEP 518&lt;/a&gt;, PyScaffold v4 will automatically generate a &lt;code&gt;pyproject.toml&lt;/code&gt; in the root of your repository. As a consequence, most of the tools in Python's build ecosystem will assume the distribution should be built in isolation (think of it as creating a virtual environment just for running &lt;code&gt;python setup.py&lt;/code&gt;). In general, this change should reduce the chances of things going wrong and improve reproducibility, but it can also mean that you need to adapt a little bit your workflow.&lt;/p&gt;

&lt;p&gt;To ease this transition, we are including by default a &lt;code&gt;tox.ini&lt;/code&gt; in the root of your project, pre-configured with a lot of common tasks. If you have &lt;code&gt;tox&lt;/code&gt; installed in your machine, you will be able to run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tox &lt;span class="nt"&gt;-e&lt;/span&gt; docs  &lt;span class="c"&gt;# to build your documentation&lt;/span&gt;
tox &lt;span class="nt"&gt;-e&lt;/span&gt; build  &lt;span class="c"&gt;# to build your package distribution&lt;/span&gt;
tox &lt;span class="nt"&gt;-e&lt;/span&gt; publish  &lt;span class="c"&gt;# to test your project uploads correctly in test.pypi.org&lt;/span&gt;
tox &lt;span class="nt"&gt;-e&lt;/span&gt; publish &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nt"&gt;--repository&lt;/span&gt; pypi  &lt;span class="c"&gt;# to release your package to PyPI&lt;/span&gt;
tox &lt;span class="nt"&gt;-av&lt;/span&gt;  &lt;span class="c"&gt;# to list all the tasks available&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is meant to be a replacement for deprecated &lt;code&gt;setup.py&lt;/code&gt; commands such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python setup.py docs
python setup.py tests
&lt;span class="c"&gt;# etc ...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We also are recommending using &lt;code&gt;pip install .&lt;/code&gt; and &lt;code&gt;pip install -e .&lt;/code&gt; instead of &lt;code&gt;python setup.py install&lt;/code&gt; and &lt;code&gt;python setup.py develop&lt;/code&gt;. In the future, it is very likely that running &lt;code&gt;setup.py&lt;/code&gt; directly will be deprecated by &lt;code&gt;setuptools&lt;/code&gt;, so we might as well start to get used to an interface that is unlikely to change.&lt;/p&gt;

&lt;h1&gt;
  
  
  Experimental and Exciting Features
&lt;/h1&gt;

&lt;h2&gt;
  
  
  &lt;a href="https://pyscaffold.org/en/latest/index.html"&gt;Interactive Mode&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Have you ever tried to use a CLI tool for the first time, or after a long period without using it, and faced a situation that forced you to go back and forth between typing your command and reading the &lt;code&gt;--help&lt;/code&gt; text? It is usually not a great experience, especially when you have many options...&lt;/p&gt;

&lt;p&gt;A few programs try to solve this problem by providing something called &lt;em&gt;"interactive mode"&lt;/em&gt;, which, most of the time, corresponds to a bunch of questions being prompted at the terminal. While this method is fine and familiar for most developers, it can get very tiring if the tool asks you more than 7 questions... and choosing by accident the wrong option in the last question, well, then you are going to hate having to reply to the same questions all over again...&lt;/p&gt;

&lt;p&gt;Thus, we are trying something different in v4. When you activate the interactive mode with the &lt;code&gt;-i&lt;/code&gt; or &lt;code&gt;--interactive&lt;/code&gt; flags, PyScaffold will open your favourite text editor (the one you specify with the &lt;code&gt;EDITOR&lt;/code&gt; environment variable), with an "editable version" of the &lt;code&gt;--help&lt;/code&gt; text. A bit unusual right? But don't worry, it works very similarly to interactive rebases with &lt;a href="https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History"&gt;git&lt;/a&gt;, i.e. you can comment options out by preceding the line with an &lt;code&gt;#&lt;/code&gt; symbol, edit the values for the options (as shown in the example below), save and close the file then just wait for PyScaffold to run. This is how it looks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  myproject
    &lt;span class="c"&gt;# path where to generate/update project&lt;/span&gt;


&lt;span class="c"&gt;# --name myproject&lt;/span&gt;
    &lt;span class="c"&gt;# (or alternatively: -n)&lt;/span&gt;
    &lt;span class="c"&gt;# installable name (as in `pip install`/PyPI, default: basename of&lt;/span&gt;
    &lt;span class="c"&gt;# PROJECT_PATH)&lt;/span&gt;


&lt;span class="c"&gt;# --package myproject&lt;/span&gt;
    &lt;span class="c"&gt;# (or alternatively: -p)&lt;/span&gt;
    &lt;span class="c"&gt;# package name (as in `import`, default: NAME)&lt;/span&gt;


 &lt;span class="nt"&gt;--description&lt;/span&gt; &lt;span class="s1"&gt;'Add a short description here!'&lt;/span&gt;
    &lt;span class="c"&gt;# (or alternatively: -d)&lt;/span&gt;
    &lt;span class="c"&gt;# package description&lt;/span&gt;

&lt;span class="c"&gt;# etc ...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;a href="https://pyscaffold.org/en/latest/features.html#easy-updating"&gt;Dynamically adapting to your workflow&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;One of the nice things about PyScaffold is that you can mix and match many tools according to your workflow. For example, if you like to run some quick tasks like linting or formatting the code before committing your changes, just add &lt;code&gt;--pre-commit&lt;/code&gt; when generating your project with &lt;code&gt;putup&lt;/code&gt; and PyScaffold will configure your project to use &lt;a href="https://pre-commit.com/"&gt;&lt;code&gt;pre-commit&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In v4, we took that to a new level. Now you can dynamically update your project to include the supported tools, so you can gradually evolve and adapt your workflow.&lt;/p&gt;

&lt;p&gt;Consider, for example, you have a project generated by PyScaffold, if at any point you decide to start testing it in &lt;a href="//cirrus-ci.com/"&gt;Cirrus CI&lt;/a&gt;, just &lt;code&gt;cd&lt;/code&gt; into your project root folder and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;putup &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--update&lt;/span&gt; &lt;span class="nt"&gt;--cirrus&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;a href="https://pyscaffold.org/en/latest/configuration.html#pyscaffold-s-own-configuration"&gt;Saving your favourite configuration&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;We all have favourites, right? And I guess after a while using PyScaffold you might tend to repeat a series of flags to express your preferences (like &lt;code&gt;--pre-commit&lt;/code&gt;, &lt;code&gt;--licence GPL-3.0&lt;/code&gt;, etc...). With &lt;code&gt;v4&lt;/code&gt; you can avoid retyping those options by saving a default configuration.&lt;/p&gt;

&lt;p&gt;For example, if you create a new project by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;putup myproject &lt;span class="nt"&gt;--pre-commit&lt;/span&gt; &lt;span class="nt"&gt;--cirrus&lt;/span&gt; &lt;span class="nt"&gt;--licence&lt;/span&gt; GPL-3.0 &lt;span class="nt"&gt;--save-config&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next time you create a project with &lt;code&gt;putup&lt;/code&gt;, the &lt;code&gt;--pre-commit&lt;/code&gt;, &lt;code&gt;--cirrus&lt;/code&gt; and &lt;code&gt;--licence GPL-3.0&lt;/code&gt; options will be automatically applied, without the need of typing it again.&lt;/p&gt;




&lt;p&gt;We hope PyScaffold users will find v4 easier to work with. We also invite everyone to have a look at the official extensions in our &lt;a href="https://github.com/pyscaffold"&gt;GitHub organisation&lt;/a&gt;, and if you are a bit more courageous, to have a look at our &lt;a href="https://pyscaffold.org/en/latest/extensions.html"&gt;extensions guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In this release we offer a packaging experience up to date with the latest best practices and standardisation in the Python ecosystem, while maintaining the best backward compatibility possible. That is the spirit we plan to bring forward in the next releases.&lt;/p&gt;

&lt;p&gt;I hope you all stay productive and have fun! 😉&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Anderson Bravalheri &amp;amp; Florian Wilhelm&lt;/em&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  What is PyScaffold?
&lt;/h1&gt;

&lt;p&gt;PyScaffold is the tool of choice for bootstrapping high quality Python packages, ready to be shared on &lt;a href="https://pypi.org"&gt;PyPI&lt;/a&gt; and installable via &lt;a href="https://pip.pypa.io/"&gt;pip&lt;/a&gt;. It is easy to use and encourages the adoption of the best tools and practices of the Python ecosystem, helping you and your team to stay sane, happy, and productive. The best part? It is stable and has been used by thousands of developers for over half a decade!&lt;/p&gt;

&lt;h1&gt;
  
  
  Why PyScaffold?
&lt;/h1&gt;

&lt;p&gt;PyScaffold was created in 2014 and therefore is stable and battle tested, but yet constantly evolving to support its users' needs and the latest standards of the Python community.&lt;/p&gt;

&lt;p&gt;With PyScaffold you can jump start your Python development with an incredibly smart project template, perfected throughout years of serious usage, that promotes the best practices in the Python ecosystem and ships with ready-to-use configuration for all the tools needed by the vast majority of Python developers.&lt;/p&gt;

&lt;p&gt;If you are still not convinced, have a look on &lt;a href="https://pyscaffold.org/en/latest/reasons.html"&gt;these other reasons&lt;/a&gt; and the extensive list of &lt;a href="https://pyscaffold.org/en/latest/features.html#features"&gt;PyScaffold's features&lt;/a&gt;. And if you are curious, checkout &lt;a href="https://github.com/pyscaffold/pyscaffold-demo"&gt;our demo project&lt;/a&gt;, or &lt;a href="https://pyscaffold.org/en/latest/install.html#installation"&gt;install PyScaffold&lt;/a&gt; and type &lt;code&gt;putup -h&lt;/code&gt; to &lt;a href="https://pyscaffold.org/en/latest/index.html#quickstart"&gt;get started&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Feedback
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Issues and bugs:
&lt;a href="https://https://github.com/pyscaffold/pyscaffold/issues"&gt;https://https://github.com/pyscaffold/pyscaffold/issues&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Discussion, suggestions, questions: &lt;a href="https://github.com/pyscaffold/pyscaffold/discussions"&gt;https://github.com/pyscaffold/pyscaffold/discussions&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>packaging</category>
      <category>opensource</category>
      <category>news</category>
    </item>
    <item>
      <title>The first release candidate of PyScaffold 4.0 just arrived!🎉 </title>
      <dc:creator>Anderson Bravalheri</dc:creator>
      <pubDate>Wed, 13 Jan 2021 12:52:06 +0000</pubDate>
      <link>https://dev.to/abravalheri/the-first-release-candidate-of-pyscaffold-4-0-just-arrived-5ecp</link>
      <guid>https://dev.to/abravalheri/the-first-release-candidate-of-pyscaffold-4-0-just-arrived-5ecp</guid>
      <description>&lt;p&gt;We are excited to announce that the first Release Candidate for &lt;a href="https://pyscaffold.org/en/latest/"&gt;PyScaffold v4&lt;/a&gt; has launched and is now available in &lt;a href="https://pypi.org/project/PyScaffold/4.0rc1/"&gt;PyPI&lt;/a&gt;. We invite everyone in the Python community to install it via &lt;code&gt;pip install pyscaffold==4.0rc1&lt;/code&gt; and share your thoughts.&lt;/p&gt;

&lt;p&gt;This new release candidate has a ton of &lt;a href="https://pyscaffold.org/en/latest/changelog.html"&gt;new features&lt;/a&gt; including our new &lt;em&gt;interactive mode&lt;/em&gt; (&lt;code&gt;-i&lt;/code&gt; in the CLI) and the new &lt;em&gt;&lt;a href="https://pyscaffold.org/en/latest/configuration.html#default-cfg"&gt;experimental configuration&lt;/a&gt;&lt;/em&gt; that allow you to save your favourite options to be automatically applied to all projects.&lt;/p&gt;

&lt;p&gt;It does not matter if you are new to Python or an experienced developer, if you have an existing project or are starting a new one, the newest version of PyScaffold should make it even easier to get your Python package ready and published.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is PyScaffold?
&lt;/h1&gt;

&lt;p&gt;PyScaffold is the tool of choice for bootstrapping high quality Python packages, ready to be shared on &lt;a href="https://pypi.org"&gt;PyPI&lt;/a&gt; and installable via &lt;a href="https://pip.pypa.io/"&gt;pip&lt;/a&gt;. It is easy to use and encourages the adoption of the best tools and practices of the Python ecosystem, helping you and your team to stay sane, happy and productive. The best part? It is stable and has been used by thousands of developers for over half a decade!&lt;/p&gt;

&lt;h1&gt;
  
  
  Why PyScaffold?
&lt;/h1&gt;

&lt;p&gt;PyScaffold was created in 2014 and therefore is stable and battle tested, but yet constantly evolving to support its users needs and the latest standards of the Python community.&lt;/p&gt;

&lt;p&gt;With PyScaffold you can jump start your Python development with an incredibly smart project template, perfected throughout years of serious usage, that promotes the best practices in the Python ecosystem and ships with ready-to-use configuration for all the tools needed by the vast majority of Python developers.&lt;/p&gt;

&lt;p&gt;If you are still not convinced have a look on &lt;a href="https://pyscaffold.org/en/latest/reasons.html"&gt;these other reasons&lt;/a&gt; and the extensive list of &lt;a href="https://pyscaffold.org/en/latest/features.html#features"&gt;PyScaffold's features&lt;/a&gt;. And if you are curious, checkout &lt;a href="https://github.com/pyscaffold/pyscaffold-demo"&gt;our demo project&lt;/a&gt;, or &lt;a href="https://pyscaffold.org/en/latest/install.html#installation"&gt;install PyScaffold&lt;/a&gt; and type &lt;code&gt;putup -h&lt;/code&gt; to &lt;a href="https://pyscaffold.org/en/latest/index.html#quickstart"&gt;get started&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Feedback
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Issues and bugs:
&lt;a href="https://https://github.com/pyscaffold/pyscaffold/issues"&gt;https://https://github.com/pyscaffold/pyscaffold/issues&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Discussion, suggestions, questions: &lt;a href="https://github.com/pyscaffold/pyscaffold/discussions"&gt;https://github.com/pyscaffold/pyscaffold/discussions&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>python</category>
      <category>packaging</category>
      <category>opensource</category>
      <category>news</category>
    </item>
  </channel>
</rss>
