Thank you for considering contributing to pyserde!
- Describe what you expected to happen.
- If possible, include a minimal reproducible example to help us identify the issue. This also helps check that the issue is not with your own code.
- Describe what actually happened. Include the full traceback if there was an exception.
- List your Python and pyserde versions. If possible, check if this issue is already fixed in the repository.
- pyserde uses black to autoformat your code. This should be done for you as a git pre-commit hook, which gets installed when you run
make setup
but you can do it manually viamake fmt
ormake check
. - Include tests if your patch is supposed to solve a bug, and explain clearly under which circumstances the bug happens. Make sure the test fails without your patch.
- Include a string like “Fixes #123” in your commit message (where 123 is the issue you fixed). See Closing issues using keywords.
-
Download and install the latest version of git.
-
Configure git with your username and email:
git config --global user.name 'your name' git config --global user.email 'your email'
-
Make sure you have a GitHub account.
-
Fork pyserde to your GitHub account by clicking the Fork button.
-
Clone your GitHub fork locally:
git clone https://github.com/{your-github-username}/pyserde cd pyserde
-
Add the main repository as a remote to update later:
git remote add upstream https://github.com/yukinarit/pyserde git fetch upstream
-
Install Poetry (used for dependency management and packaging):
For macOS / Linux / WSL
curl -sSL https://install.python-poetry.org/ | python -
For Windows Powershell
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/main/get-poetry.py -UseBasicParsing).Content | python -
-
Run setup script:
make setup
- Create a branch to identify the issue you would like to work on:
git checkout -b your-branch-name origin/main
- Using your favorite editor, make your changes, committing as you go.
- Include tests that cover any code changes you make. Make sure the test fails without your patch. Run the tests via
make test
. - Push your commits to GitHub and create a pull request by using:
git push --set-upstream origin your-branch-name
pyserde uses the following tools. mypy and pyright are enabled for /examples
directory at the moment.
- black
- pyright
- ruff
- mypy
If pre-commit is configured, black
, pyright
and ruff
are automatically triggered when making a git commit. If you want to run mypy, run
make check # this also runs black, pyright and ruff
or
mypy .