Welcome to MicroProjects.
Thanks for taking time to contribute to MicroProjects! To streamline the process of contributing, we have some guidelines that you should follow. This guideline is steered towards begineers to Open Source.
This guide is broken in sections, so you can skip some preliminary stuff if you are already familiar with them.
This guide assumes that you are already familiar with Python, know how to install packages from PyPI and have a working git.
First, you need to get the source-code on your local machine (or favourite cloud Application).
- Go to the fork page of MicroProjects, uncheck
Copy the main branch onlyand then click Create fork.

- This will bring you to forked repository, copy the URL of this repository.

- Open the Terminal (Git Bash or WSL or PowerShell on Windows, any Terminal on MacOS/Linux/BSD), navigate to the directory (or Folder) where you want to clone and write
git clone URL. For me, it isgit clone https://github.com/Nyx-50/MicroProjects. - Install Python dependencies listed in
requirements.txt - Open the directory named
MicroProjectsin your favourite code editor. For VS Code, it iscode MicroProjects.
Next identify a problem worth solving and open an issue (or feature request). This Codecademy - YouTube video may help visual listeners.
Then open an issue. Make sure to add enough information about bug/feature and respond to queries of other in respectful manner.
If you can fix the already opened issues or add some new features, claim the issue explicitly. If you see that some issue is stale, you can also re-claim that issue or collaborate on that issue.
If you want to add a new MicroProject or want someelse to add a new MicroProject, then write a comprehensive Project Proposal. We will try our best to add that MicroProject ASAP.
After claiming the issue, write the code. You have to follow certain conventions while coding.
- The coding style is as detailed by PEP 8 – Style Guide for Python Code. I use ruff as Python formatter.
- Use function and variable type annonatation as detailed in PEP 484 – Type Hints
- Use docstring documentation for all functions. Use
Attributesfor class,ParametersandReturnsby function. Follow the style as inngitMicroProject. - Add clear tests using pytests, tests edge-cases and other behaviour. Make sure to write tests for exported functions, its okay to fail tests during development cycle.
As MicroProjects is shipped as a Python Package, there are two ways to test it.
Use this to test overall CLI behaviour.
- Install using pip in editable form for debugging or testing purpose using
pip install -e .in MicroProjects root directory. - In terminal, use the provided command to run the setup. You can find the CLI command in respective
READMEandpyproject.tomlunder[project.scripts]. - To test the CLI behaviour and expected output, we use check50. See the Installation, Developing locally and Getting started with Python checks.
Use this to test individual function.
After you have made your changes, open a Pull Request and be helpful.
- Commit your changes by
git commit -am "A helpful message here." - Push your changes to GitHub by
git push. - Open the forked GitHub and click Contribute then click Open Pull Request.

- Add a helpful title, Use Closing keywords in the description to automatically close issues. Then click Create pull Request.

- A merge request have been opened, respond to the reviews of your PR and wait for some Maintainer to Merge your Pull Request.
And that was all it takes to contribute to Open Source.