Skip to content

Latest commit

 

History

History
62 lines (46 loc) · 1.99 KB

CONTRIBUTING.md

File metadata and controls

62 lines (46 loc) · 1.99 KB

Contributing to pyaww

First, thanks for taking the time to consider contributing! ❤️ All contributions are welcomed and encouraged.

Contributing

  1. Create an issue and assign it to yourself.
  2. Fork the repository.
  3. Locally clone your fork,
git clone https://github.com/yourname/pyaww
cd pyaww
  1. Commit your changes,
git add pyaww/x.py
git commit -m "[feat] add support for y in method z"
  1. Create/update the tests if needed (look at tests/README.md), commit them as well,
git add tests/test_x.py
git commit -m "[test] create test for parameter y in method z"

Please look at the following git guide for commits.

  1. Push your changes via git push -u origin branch.
  2. Create a PR, with a good description on the changes you've made.

General Guidelines

  • Follow the PEP8 rules.
  • Use Google-style docstrings.
  • You must format your code using black.
  • You must sort imports using isort.
  • You must run tests using pytest before creating a pull request.
  • Your code must be typehinted. Look into pyright or pylance type checkers if you do not have one.
  • Write clean and efficient code.
  • Create/update tests.

How to run the tests?

  1. Install the pytest, pytest-asyncio and the python-dotenv library.
  2. Navigate to pyaww/tests/assets and create .env. It should contain:
USERNAME=USERNAME
AUTH=TOKEN
STARTED_CONSOLE=ID

To properly test the module, use a "fresh account". Just create an alternative account, make & start a console and you're good to go!

  1. Ensure your CWD is pyaww and not pyaww/tests or similar.
  2. Run py -m pytest -s.
  3. Fix if anything is wrong, if not, your tests are fine.