Sitemap
Marble kusanele Mpofu

Marble kusanele Mpofu

Data Scientist || i write all things Data Science related, machine learning, Natural language Processing. Let my tales ignite empowerment within you.

Your first pull request for MDF

3 min readJan 6, 2023

--

I assume by now you know what MDF is. In this article I am going to take you though the steps you need to take from cloning the MDF repo into your local machine, Creating a virtual environment, tools and dependencies you need to install and finally creating your first pull request.

Source: mdf git hub repo

Disclaimer: “ This is what worked for me on my windows 11 system. The information below is only based on my opinion and experiences. There could be better ways of achieving this more easy and efficient. Kindly do your own research before committing to this.”

MDF Project

Make a special directory for your projects, you do not want to look for it in places you don't know because you are not really sure where you have it installed. ( ask me , I now know better 😁)
Now that you have created your project directory , go inside that directory , Make a sub directory that will later on host the python version specific for this project.

Press enter or click to view image in full size
image by me

In this example the directory where you are going to install python is called “Python_version_for_mdf”
Navigate to python.org and search for python 3.9 and download it. Follow these instructions carefully because we do not want to interfere with another python version you might already have installed.

Press enter or click to view image in full size
Image by me

Do not Add python to Path, This will interfere with the python version you already have installed on your system.
Press customize Installation

Get Marble kusanele Mpofu’s stories in your inbox

Join Medium for free to get updates from this writer.

Press next.
When prompted for the python location. Choose the one you created above . Eg

image by me

finalize the installation

Installing tools and dependences

To install MDF plus all of the modules required for the export/import interfaces enter the command

pip install .[all]

Cloning MDF into your local machine

To clone mdf locally use the command

git clone https://github.com/ModECI/MDF.git
Press enter or click to view image in full size
Image By Me

Creating a virtual environment

Python virtual environments give you the ability to isolate your Python development projects from your system installed Python and other Python environments. Meaning , you can have different versions of python installed in your system for different projects. This gives you full control of your project and makes it easily reproducible. My project mate, Monsurat explains more about virtual environment here.

Go to the CMD (command line) and navigate to your project directory.
Enter the path to our python (the one you just installed)
eg

c:user/user/desktop/Mdf_proj>c:user/user/desktop/Mdf_proj/Python_version_for_mdf/python -m venv mdf_env

The virtual Environment is called mdf_env in this case. To activate and deactivate the environment , use these 2 commands respectively.

my_env\scripts\activate
deactivate

After you have made changes to the project and ready to push

Make sure you are pushing to the correct branch.
eg:

git checkout github_sub_branch_name

Using pip install pre-commit and pre-commit run --all-files at the top level MDF directory, this should change all the relevant files to the correct formatting before you commit, and when you do commit the tests should pass. read more

Congratulations , you have made your first contribution to MDF.I did not want this article to be too long. I hope it helps you. Thank you for taking your precious time to read this.

Happy open source contributions

--

--

Marble kusanele Mpofu
Marble kusanele Mpofu

Written by Marble kusanele Mpofu

Data Scientist || i write all things Data Science related, machine learning, Natural language Processing. Let my tales ignite empowerment within you.