Skip to the content.

Contributing

You can contribute at will, you will always be welcome. But we have some rules to be followed so that everyone is well received by everyone and that everyone can contribute in a happy way :smiley:.

Add/Update Features:

You looked at the application and thought of some features that should be added to the project ? :open_mouth:

So you have two steps to follow:

Creating an issue

On the project page, you can click on the Issues button and anew issue button will appear on the page, then just select and follow the following steps:

Clone the repository

On the home page of the repository there is a Fork button. When you click, just wait to complete the fork. Then it will create the repository in your account and now just clone in your machine, this:

git clone https://github.com/<name_user>/PyElit

When finished, you will have the repository on your computer and then just open in your preferred editor and make your changes.

Before creating your branch for your development:

git checkout -b <name_branch>

For the name of the branch use the number of the issue to facilitate, ex: issue_17.

And now can begin the development :smiley: .

When you have finished making your changes, you should commit your changes, but first:

git add .

The above command will prepare all modified files to be committed, going through all the changes that were made by you where you will decide if the change will be added(you must be inside the project folder to use the command). Now just commit the changes:

git commit -m "<Your_message>"

Remember to use clear messages. If what you’re solving already has an issue open, reference issue in the commit. Ex: git commit -m "#17 - Add contributing.md"

And finally, you will submit the changes to the remote repository:

git push --set-upstream origin <name_branch>

This is only the first time that you will have to submit a new branch to the remote repository, next times, just:

git push

But that will only appear in your fork, the official repository will not have its changes now what ? :confused:

Calm down, now the Pull Request or PR comes to help

Contribute to implementation:

After having forked and clone the project, choose your favorite text editor. Now it’s time to code.

But calm there, first of all, you should choose an issue you want to work with. If the issue is about functionality that does not exist, you should create and say you’re working on it, case it exists, you must say that you intend to work on the issue. And after doing that, now you are ready to code.

Understanding the folders:

The project is in the folder pyelit.

It has the texts used to train the topic modeling.

How to run the application:

We use the pipenv for better dependencies management. So you need to install first of all:

$ pip install pipenv

Now you should activate the virtualenv(here will be installed all the used libraries):

$ pipenv shell

Now you need to install the model pt-br of spacy:

$ python -m spacy download pt_core_news_sm

And you’re done, you’re ready to start development.

NOTE: Run the above command inside the project folder.

Run the tests:

$ pytest --disable-warnings

Entering the pattern:

We have chosen to follow the PEP 8 standard. For this install the extension of Python to VSCode. Another solution is to use the pycodestyle.

Pycodestyle:

It is already a dev-package in the project.

With the virtualenv activated, you can run the pycodestyle:

##

Performing a Pull Request - PR

On the page of your fork will appear a message in yellow requesting that you do open Pull Request to the original repository. By clicking will open a page for you to fill in the information about your PR.