<?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: Nyar</title>
    <description>The latest articles on DEV Community by Nyar (@nyartech_).</description>
    <link>https://dev.to/nyartech_</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%2F899401%2Fbbdb70d2-15ca-47c6-b7c3-e50596e99aeb.jpg</url>
      <title>DEV Community: Nyar</title>
      <link>https://dev.to/nyartech_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nyartech_"/>
    <language>en</language>
    <item>
      <title>Use pipenv to create a bug-free virtual environment</title>
      <dc:creator>Nyar</dc:creator>
      <pubDate>Fri, 26 Aug 2022 10:59:00 +0000</pubDate>
      <link>https://dev.to/nyartech_/use-pipenv-to-create-a-bug-free-virtual-environment-54i2</link>
      <guid>https://dev.to/nyartech_/use-pipenv-to-create-a-bug-free-virtual-environment-54i2</guid>
      <description>&lt;p&gt;Dependency bugs can be quite annoying. You have to keep upgrading and downgrading dependency versions in case of a conflict. This takes a lot of time away from your development process. Why not use &lt;strong&gt;pipenv&lt;/strong&gt; to avoid this?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pipenv&lt;/strong&gt; is a comprehensive programming tool that is now replacing pip and virtualenv. It's used to automatically set up and manage python virtual environments.&lt;/p&gt;

&lt;p&gt;In this article, you will learn what pipenv is, and how to set up and use it to manage your python environment.&lt;/p&gt;

&lt;p&gt;Prerequisites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You have python3 installed (preferably python3.7- python 3.9)&lt;/li&gt;
&lt;li&gt;You have pip3 installed&lt;/li&gt;
&lt;li&gt;You have prior knowledge of setting up  applications using python django framework&lt;/li&gt;
&lt;li&gt;You must be familiar with python environment set-up using pip&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What is pipenv
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Pipenv&lt;/strong&gt; is a dependency manager for python project environments. &lt;strong&gt;Pipenv&lt;/strong&gt; enables easy and quick setup of virtual environments. It efficiently handles the addition and removal of dependency packages. &lt;strong&gt;Pipenv&lt;/strong&gt; combines the power of &lt;strong&gt;pip&lt;/strong&gt;,&lt;strong&gt;pipfile&lt;/strong&gt; and &lt;strong&gt;virtualenv&lt;/strong&gt; to reduce dependency clash by a big percentage.&lt;/p&gt;

&lt;p&gt;Some of the advantages of using &lt;strong&gt;pipenv&lt;/strong&gt; are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installs packages without versions, therefore reducing conflict when handling different versions of dependencies.&lt;/li&gt;
&lt;li&gt;Combines pip and virtual environment, so you no longer use them separately.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Eliminates requirements.txt -which can be hard to manage. Instead, &lt;strong&gt;pipenv&lt;/strong&gt; creates Pipfile to track dependencies and Pipfile.lock to produce deterministic builds.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enables quick and easy setup of virtual environments.&lt;br&gt;
Now that you have seen the benefits of using &lt;strong&gt;pipenv&lt;/strong&gt; to set up our virtual environment, how about we do it practically?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Follow the following steps to install and create your virtual environment using &lt;strong&gt;pipenv&lt;/strong&gt;:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Install pipenv
&lt;/h2&gt;

&lt;p&gt;Install &lt;strong&gt;pipenv&lt;/strong&gt; using any of these three  commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo apt install pipenv
$ pip install pipenv
$ pip install --user pipenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A successful installation will show the &lt;strong&gt;pipenv&lt;/strong&gt; version on the command line as shown below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--b117o9X2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l3ni4k543v3zzx5e0ksd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b117o9X2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l3ni4k543v3zzx5e0ksd.png" alt="succesfull pipenv installation" width="845" height="334"&gt;&lt;/a&gt;&lt;br&gt;
Congrats! you have successfully installed pipenv. Next, you will activate the virtual environment.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Activate the virtual environment
&lt;/h2&gt;

&lt;p&gt;Since &lt;strong&gt;pipenv&lt;/strong&gt; manages dependencies inside each project, you need to activate your environment inside your project folder. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cd pipenv-test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once in the folder, you can activate your virtual environment using the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ pipenv install requests
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Pipenv install requests&lt;/strong&gt; enables &lt;strong&gt;pipenv&lt;/strong&gt; to fetch components of the request library such as the Pipfile and the Pipfile. lock that manages the virtual environment.&lt;/p&gt;

&lt;p&gt;A successful installation of requests is  as illustrated below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FhNqCtsg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/haf72343b38ex8ey5pws.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FhNqCtsg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/haf72343b38ex8ey5pws.png" alt="pipenv installs requests" width="880" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Pipfile stores all installed dependencies. Open the  Pipfile on your code editor.  It will look similar to the image shown below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xJxYnZST--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/chjud1fnkprc3yasxskl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xJxYnZST--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/chjud1fnkprc3yasxskl.png" alt="pipfile" width="880" height="316"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, you enter the &lt;strong&gt;pipenv&lt;/strong&gt; shell where you run the activated virtual environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Activate pipenv shell
&lt;/h2&gt;

&lt;p&gt;Run &lt;strong&gt;pipenv&lt;/strong&gt; shell to enter the &lt;strong&gt;pipenv&lt;/strong&gt; virtual environment. This will start up the virtual environment under which our application will run. It will appear as illustrated below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ pipenv shell
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do you notice the changes on your command line after running &lt;strong&gt;pipenv&lt;/strong&gt; shell? A virtual environment created in the name of your project appears in brackets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KuzMXH-n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1661440855680/qefaIS8e5.png%2520align%3D%2522left%2522" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KuzMXH-n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1661440855680/qefaIS8e5.png%2520align%3D%2522left%2522" alt="pipenv creates virtual environment" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This indicates your environment is live. Now you can go ahead and install your dependencies. Remember for every dependency you install, it appears in the Pipefile.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Now that you have seen how to install and set up &lt;strong&gt;pipenv&lt;/strong&gt; to manage your virtual environments, go ahead and realize its benefits. This will reduce the amount of time spent dealing with dependency clashes. For more information on &lt;strong&gt;pipenv&lt;/strong&gt; and how to handle error messages please visit &lt;a href="https://pipenv.pypa.io/en/latest/#install-pipenv-today"&gt;pipenv.pypa&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

</description>
      <category>python</category>
      <category>django</category>
      <category>pip</category>
    </item>
    <item>
      <title>My First Open Source Contribution;Why You Should Get Involved</title>
      <dc:creator>Nyar</dc:creator>
      <pubDate>Fri, 05 Aug 2022 07:50:00 +0000</pubDate>
      <link>https://dev.to/nyartech_/my-first-open-source-contributionwhy-you-should-get-involved-16cl</link>
      <guid>https://dev.to/nyartech_/my-first-open-source-contributionwhy-you-should-get-involved-16cl</guid>
      <description>&lt;p&gt;My first open-source contribution was successfully merged yesterday and I can't sit still. Although it took a week of back and forth to make corrections, I am grateful to have my contribution added to the &lt;a href="https://github.com/asyncapi/spec-json-schemas"&gt;AsyncAPIGitHub&lt;/a&gt; repository.&lt;/p&gt;

&lt;p&gt;For anyone not familiar with the term,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;open-source refers to something people can modify and share because its design is publicly accessible. Open-source projects, products, or initiatives embrace and celebrate principles of open exchange, collaborative participation, rapid prototyping, transparency, meritocracy, and community-oriented development.~&lt;a href="https://opensource.com/resources/what-open-source"&gt;Opensource.com&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Before I share my experience, I would like to list some of the benefits I realized since starting with open-source:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Learnt  more git Commands like &lt;em&gt;fork&lt;/em&gt;,&lt;em&gt;rebase&lt;/em&gt;,&lt;em&gt;upstream&lt;/em&gt;,&lt;em&gt;issue&lt;/em&gt;- You don't know git until you  do opensource &lt;/li&gt;
&lt;li&gt;I can add the project to my resume&lt;/li&gt;
&lt;li&gt;I improved my tech skills by studying other people's codes&lt;/li&gt;
&lt;li&gt;my confidence as a developer skyrocketed and I look forward to doing more projects
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cLvczuZw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ve7mt64cfgabh4ok5kh0.jpg" alt="Image of lady wearing you can do anything T-shirt" width="880" height="880"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  My experience
&lt;/h3&gt;

&lt;p&gt;I  have heard a lot of conversations about open-source contributions and its benefits but I didn't know where to start. So when I came across the AsyncAPI team on &lt;a href="https://twitter.com/AsyncAPISpec"&gt;Twitter&lt;/a&gt; asking for contributors to the API, I immediately slid into their slack channel-literally!&lt;/p&gt;

&lt;p&gt;I went ahead to announce my availability and was soon assisted by one of the maintainers(the team that runs the project) to find a project that suited my skill set.&lt;/p&gt;

&lt;p&gt;I was given the &lt;a href="https://github.com/asyncapi/community/blob/master/git-workflow.md"&gt;contributors guide.&lt;/a&gt;. This document contains simple instructions on how to contribute to the project. It includes instructions on how to fork, clone, work on the issue and merge your fork to the upstream repo (repository) so that maintainers can review it.  &lt;/p&gt;

&lt;p&gt;These instructions are especially useful for contributors to understand the workflow and minimize conflict/clashing with the main project repository. If you don't adhere to these contributors' guidelines your pull request will be uneventfully closed! Which is highly embarrassing! &lt;/p&gt;

&lt;p&gt;It's scary at first, but once you learn the procedures, it's easy to work with.&lt;br&gt;&lt;br&gt;
So I went ahead and set up my contributors' repository by forking, cloning the repository to my local machine, and working on the issue I had picked. &lt;/p&gt;

&lt;p&gt;Once done, I followed the guide to &lt;em&gt;push&lt;/em&gt; to my forked repository -which is connected to the upstream repository, to make a &lt;a href="https://gitential.com/pull-requests-and-code-reviews/"&gt;PR&lt;/a&gt; (pull request). A PR alerts the maintainers to review your branch and suggest changes before merging. &lt;br&gt;
 This diagram illustrates the process clearly;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HOc4prRY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vdlstf77zvi82k7p3duq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HOc4prRY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vdlstf77zvi82k7p3duq.png" alt="Image of Pull request flow " width="880" height="476"&gt;&lt;/a&gt;Source:&lt;a href="https://haksung.gitbook.io/oss/github/pull-request"&gt;gitbook.io &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After reviewing my PR, the maintainers suggested that I make changes to the document. Which I quickly did and made another commit. When the final review was done and all maintainers were okay with it, my PR was merged.:-)&lt;/p&gt;

&lt;p&gt;Not only was it a sign of relief but also a boost of confidence. Now I look forward to contributing more to the AsyncAPI initiative and also being involved in other open-source projects. Next, I let you know &lt;strong&gt;where&lt;/strong&gt; and **how **to identify a good open-source project worth contributing to. &lt;/p&gt;

&lt;h3&gt;
  
  
  Where to find an open-source project
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/search"&gt;GitHubsearch&lt;/a&gt; -find open-source projects on GitHub&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.firsttimersonly.com/"&gt;https://www.firsttimersonly.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://opensourcefriday.com/"&gt;https://opensourcefriday.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://up-for-grabs.net/#/"&gt;https://up-for-grabs.net/#/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Twitter -Search for projects on Twitter using a #opensource hashtag&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Things to look out for :
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Is the project active on GitHub?-check when the last commit or PR was made. If it's more than 3 months don't bother&lt;/li&gt;
&lt;li&gt;Does it have a license?-Should have an MIT license&lt;/li&gt;
&lt;li&gt;Does it have contributors guidelines? Should be a file on the root folder of the main repo&lt;/li&gt;
&lt;li&gt;Does it have an active community on social media community e.g on slack, Discord, or Twitter where you can communicate with other contributors?&lt;/li&gt;
&lt;li&gt;Are the maintainers active? Check how long they take to respond to pull requests &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I had a great time contributing to my first open-source projects. I am sure you will too. These projects enable you to showcase your skills, learn from others and meet amazing people. You will gain a community, what do you have to loose?&lt;/p&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://opensource.com/resources/what-open-source"&gt;Opensource.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://zaycodes.hashnode.dev/a-z-of-open-source-for-beginners-cl5t5wg8n08wyscnvdeeg7fkq"&gt;zaycodes.hashnode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/asyncapi/community/blob/master/git-workflow.md"&gt;ASyncAPI&lt;/a&gt; initiative&lt;/li&gt;
&lt;li&gt;&lt;a href="https://haksung.gitbook.io/oss/github/pull-request"&gt; gitbook.io &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://education.github.com/git-cheat-sheet-education.pdf"&gt;Git cheat sheet&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>opensource</category>
      <category>github</category>
    </item>
  </channel>
</rss>
