Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand contributing page with advices #69

Closed
wants to merge 1 commit into from

Conversation

edoput
Copy link
Contributor

@edoput edoput commented May 11, 2017

This information provides instructions on how to configure the development environment and what are the tools to check new work and generate documentation

As it was difficult to start contributing this may be of interest to other contributors

@coveralls
Copy link

coveralls commented May 11, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 2559f2d on EdoPut:expand-contributing into 9e58e6b on openwisp:master.

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good! I think your workflow can improve even more. Check out my inline comments.


virtualenv env
source env/bin/activate
python setup.py install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python setup.py develop

It installs the current source code without moving it to the env directory, it's very handy for development

source env/bin/activate
python setup.py install

Pre Commit Niceties
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here it would be better Style guide enforcement

Pre Commit Niceties
-------------------

Install ``flake8`` to check for common pitfalls that may have your contribution stopped
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also isort.

.. code-block:: shell

source env/bin/activate
pip install flake8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pip install requirements-test.txt

contains both isort and flake8

source env/bin/activate
pip install flake8

Please use ``runflake8`` before committing your work and opening a pull request
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The full command is:

./runflake8 && ./runisort

It would be better to list it in its own code block

Please use ``runflake8`` before committing your work and opening a pull request

.. note::
To speed things up you can add your virtual environment directory to the list of the excluded directories in the ``runflake8`` script
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be even better to use virtualenvwrapper which wouldn't give you this additional problem. Check it out.

Virtualenv management and creation would then become:

# create virtualenv
mkvirtualenv --python=python3 netjsonconfig
# activate virtualenv
workon netjsonconfig
# deactivate virtualenv
deactivate
# remove virtualenv
rmvirtualenv netjsonconfig

I leave it up to you to change the text to suggest mkvirtualenv or leave it as it is now.

@edoput edoput force-pushed the expand-contributing branch from 2559f2d to 78256af Compare May 15, 2017 09:38
@coveralls
Copy link

coveralls commented May 15, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 78256af on EdoPut:expand-contributing into 9e58e6b on openwisp:master.

@edoput
Copy link
Contributor Author

edoput commented May 15, 2017

I mentioned virtualenvwrapper but the development workflow is too personal to require something from a contributor, I left a note to say it's a nicer option to use

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

nemesifier added a commit that referenced this pull request May 15, 2017
@edoput edoput deleted the expand-contributing branch July 7, 2017 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants