A big welcome for considering contributing to make the project better! Have you read the entire user documentation yet?
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.
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.
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.
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.
In general, we follow the "fork-and-pull" Git workflow:
- Fork the repository to your own Github account.
- Clone the project to your machine.
- Create a branch locally.
- Commit changes to the branch.
- Follow any formatting and testing guidelines specific to this repo.
- Push changes to your fork.
- Open a PR in our repository.
Detailed steps are demonstrated below:
- Clone the forked Pycln repo:
$ git clone https://github.com/<USERNAME>/pycln.git
- CD into it:
$ cd pycln
Create a branch locally:
$ git checkout -b {branch_name}
- Install:
$ ./scripts/dev-install.sh
- Uninstall (optional after finishing):
$ ./scripts/dev-uninstall.sh
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
After adding a new feature or fixing a bug please:
- Report your changes to CHANGELOG.md.
- Write your name, GitHub username, and email on the AUTHORS.md file.
- Add the remote (the original Pycln repo) and call it
upstream
:$ git remote add upstream https://github.com/hadialqattan/pycln.git
- Fetch the latests from the
upstream
:$ git fetch upstream # or git fetch --all
- Integrate your changes with the fetched data:
$ git rebase upstream/master
- Push your updates to the remote repository. You may need to force the push with
--force
:$ git push origin {branch_name} --force
Once you have npm installed:
-
Install docsify-cli via npm globally:
$ npm i docsify-cli -g
-
On the Pycln root directory run:
$ docsify serve docs/ --open
- You can install Git for Windows to use the bash emulator.
- Or install Windows Subsystem for Linux (WSL).
- Or you can perform any script manually by convering it to a Windows commands.
Pycln is MIT licensed, as found in the LICENSE file.