Skip to content

Commit e165875

Browse files
Add contributing documentation
1 parent cd74c41 commit e165875

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

docs/contributing.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Contributing
2+
3+
Everyone is welcome to contribute to `django-commons-playground`. We strictly
4+
enforce our [Code of Conduct](../CODE_OF_CONDUCT.md), so please review it before
5+
contributing.
6+
7+
## Getting started
8+
9+
1. [Fork the repository](https://github.com/django-commons/django-commons-playground/fork)
10+
2. Clone your fork of the repository `git clone [email protected]:[YOUR_USERNAME_HERE]/django-commons-playground.git && cd django-commons-playground`
11+
3. Create a venv and activate it `python -m venv venv && source venv/bin/activate`
12+
4. Create a feature branch for your work `git checkout -b relevant-branch-name-here`
13+
5. Implement your changes, run the tests and make a commit to your branch
14+
6. Push your branch to GitHub `git push origin relevant-branch-name-here`
15+
7. Create a [PR on the upstream repo (this repo)](https://github.com/django-commons/django-commons-playground/pulls)
16+
17+
## Architecture
18+
19+
The django-commons-playground is a collection of utility functions with a
20+
playground theme. The purpose is to serve as an example to inbound repositories.
21+
Because of that the documentation, pre-commit configuration and GitHub actions
22+
are the most important aspects of the project. The code itself is secondary.
23+
24+
## Running the tests
25+
26+
```shell
27+
python3 -m unittest
28+
```
29+
30+
Nothing special here!
31+
32+
## Releasing
33+
34+
The repo is configured to [automatically release to PyPI](https://github.com/django-commons/django-commons-playground/blob/main/.github/workflows/release.yml)
35+
when a new tag is pushed to GitHub. This makes use of [PyPI's trusted publishers](https://docs.pypi.org/trusted-publishers/).
36+
37+
### Manual releases
38+
39+
In the case a manual release is necessary, you'll need to use [Twine](https://github.com/pypa/twine) and [Build](https://github.com/pypa/build).
40+
41+
```shell
42+
# Install packaging dependencies
43+
python3 -m pip install -U twine build
44+
# Build the project
45+
python3 -m build
46+
# Release to test PyPI
47+
python3 -m twine upload --repository testpypi dist/*
48+
# Release to PyPI
49+
python3 -m twine upload dist/*
50+
```

0 commit comments

Comments
 (0)