Skip to main content

CONTRIBUTING.md

1# CONTRIBUTING
3You can set up a local development environment by cloning the repo and installing dependencies:
5```shell
6git clone https://github.com/alexwlchan/javascript-data-files.git
7cd javascript-data-files
8python3 -m venv .venv
9source .venv/bin/activate
10pip install -e .
11```
13If you want to run tests, install the dev dependencies and run the tests:
15```shell
16# Activate the virtualenv and install dev dependencies
17source .venv/bin/activate
18pip install -r dev_requirements.txt
20# Check formatting
21ruff check .
22ruff format --check .
24# Check docstrings
25interrogate -vv
27# Check types
28mypy src tests
30# Run tests
31coverage run -m pytest tests
32coverage report
33```
35To make changes:
371. Create a new branch
382. Push your changes to GitHub
393. Open a pull request
404. Fix any issues flagged by GitHub Actions (including tests, code linting, and type checking)
416. Merge it!
43To create a new version on PyPI:
451. Update the version in `src/javascript_data_files/__init__.py`
462. Add release notes in `CHANGELOG.md` and push a new tag to GitHub
473. Deploy the release using twine:
49 ```console
50 $ python3 -m build
51 $ python3 -m twine upload dist/* --username=__token__
52 ```
54 You will need [a PyPI API token](https://pypi.org/help/#apitoken) to publish packages.