Skip to content

Latest commit

 

History

History
172 lines (124 loc) · 4.79 KB

CONTRIBUTING.md

File metadata and controls

172 lines (124 loc) · 4.79 KB

Contributing to Pycln project

A big welcome for considering contributing to make the project better! Have you read the entire user documentation yet?

Code of Conduct

Everyone participating in the Pycln project, and in particular in the issue tracker, and pull requests is expected to treat other people with respect. By participating and contributing to this project, you agree to uphold our Code of Conduct.

General guidelines

Contributions are made to this repo via Issues and Pull Requests (PRs). A few general guidelines that cover both:

  • Search for existing Issues and PRs before creating your own.
  • We work hard to make sure issues are handled in a timely manner but, depending on the impact, it could take a while to investigate the root cause. A friendly ping in the comment thread to the submitter or a contributor can help draw attention if your issue is blocking.

Issue

Issues should be used to report a bug, add a new feature, or discuss potential changes.

If you find an issue that addresses the problem you're having, please add your own reproduction information to the existing issue rather than creating a new one. Adding a reaction can also help us indicating that a particular problem is affecting more than just the reporter.

Good first issues are the issues that you can quickly solve, we recommend you take a look: Good first issues.

Pull Request (PR)

PRs to our project are always welcome and can be a quick way to get your fix or improvement slated for the next release. In general, PRs should:

  • Only contain changes related to a certain issue/feature.
  • Add or edit our tests suite for fixed or changed functionality (if a test suite already exists).
  • Include documentation on our README.

In case the problem was very clear, you can create a PR directly without opening an issue.

Technicalities

In general, we follow the "fork-and-pull" Git workflow:

  1. Fork the repository to your own Github account.
  2. Clone the project to your machine.
  3. Create a branch locally.
  4. Commit changes to the branch.
  5. Follow any formatting and testing guidelines specific to this repo.
  6. Push changes to your fork.
  7. Open a PR in our repository.

Detailed steps are demonstrated below:

Fork Repository

Click to fork Pycln.

Clone Repository

  1. Clone the forked Pycln repo:
    $ git clone https://github.com/<USERNAME>/pycln.git
  2. CD into it:
    $ cd pycln

Setup Branch

Create a branch locally:

$ git checkout -b {branch_name}

Install Pycln Development Requirements

  • Install:
    $ ./scripts/dev-install.sh
  • Uninstall (optional after finishing):
    $ ./scripts/dev-uninstall.sh

Testing

After finishing, you should run the tests by the following command:

$ ./scripts/tests_runner.sh

Hint: any Pytest arg can be passed directly, for example:

$ ./scripts/tests_runner.sh -vv -k TestClassName

Finally, Put Your Signature

After adding a new feature or fixing a bug please:

FAQ

How To Update My Local Forked Repository?

  1. Add the remote (the original Pycln repo) and call it upstream:
    $ git remote add upstream https://github.com/hadialqattan/pycln.git
  2. Fetch the latests from the upstream:
    $ git fetch upstream  # or git fetch --all
  3. Integrate your changes with the fetched data:
    $ git rebase upstream/master
  4. Push your updates to the remote repository. You may need to force the push with --force:
    $ git push origin {branch_name} --force

How Can I See My Doc Updates Locally?

Once you have npm installed:

  1. Install docsify-cli via npm globally:

    $ npm i docsify-cli -g
  2. On the Pycln root directory run:

    $ docsify serve docs/ --open

How Can I Run Pycln Scripts Using Windows?

License

Pycln is MIT licensed, as found in the LICENSE file.