Skip to content

Latest commit

 

History

History
101 lines (79 loc) · 3.17 KB

CONTRIBUTING.rst

File metadata and controls

101 lines (79 loc) · 3.17 KB

Butch - The free Batch interpreter's contributing guide

Prerequisites

  1. GPG key associated with your GitHub account (how)
  2. CLA signed

How to sign CLA

  1. Fork the repository
  2. Clone the fork locally - git clone https://github.com/<you>/Butch
  3. Visit the CLA.rst document in the repository
  4. Read the document
  5. Add a row with your data
  6. Commit the changes and sign the commit (git commit -m "message" --gpg-sign)
  7. Push the changes to your fork
  8. Open a pull request in Butch repository

Create a development environment

For Butch it's okay just to use a virtualenv package, however if you prefer, feel free to utilize Docker to separate the environment completely from the system and just mount the files/folders from the cloned repository.

Linux and MacOS

  1. cd <cloned-repo>
  2. python -m virtualenv ~/env_butch
  3. source ~/env_butch/bin/activate
  4. pip install --editable .[dev]
  5. python test.py

If you use ZSH shell add double quotes to escape brackets pip install --editable ."[dev]"

Windows

  1. cd <cloned-repo>
  2. python -m virtualenv %USERPROFILE%\env_butch
  3. %USERPROFILE%\env_butch\bin\activate
  4. pip install --editable .[dev]
  5. python test.py

Modify some files and open a pull request

  1. Modify a file
  2. Add a file with changes - git add <file>
  3. Check the style by running - python style.py
  4. Commit the changes using - git commit -m "message" --gpg-sign
  5. Verify the commit(s) are changed with - git log --show-signature
  6. Push the changes to your fork - git push
  7. Navigate to https://github.com/KeyWeeUsr/Butch/pulls
  8. Create a new pull request (don't forget to describe your changes)
  9. Wait for review (adjust after review if necessary)
  10. Wait for the merge

Commit naming guide

Use these tags for small/atomic commits to distinguish between various code patches:

  • [INIT] - the first commit in the repo
  • [CLA] - CLA related commits (signing, merging)
  • [ADD] - new features, files, etc
  • [FIX] - fixing a bug or incorrectly implemented behavior
  • [DEL] - only removing line(s)/file(s)
  • [REF] - patches related to large code or behavior refactoring that might break compatibility
  • [SUB] - git submodule related changes

Examples:

[INIT] Add initial empty commit
[CLA] <username> signed
[ADD] Add new CLI option --option
[FIX] Fix passing incorrect arguments to function
[DEL] Remove deprecated code
[REF] Split single large file into package/modules
[SUB] Add submodule for X