You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+79-13Lines changed: 79 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,22 +2,20 @@
2
2
3
3
Hi, to start, you need the following installed on your system.
4
4
5
-
1.[Git](https://git-scm.com/)
6
-
2.[Python](https://www.python.org/) v3.8 or later and
7
-
3.[PDM](https://pdm-project.org/en/stable/) for easy dependency management.
8
-
4. (Optional/Recommended) NodeJS for type checking.
9
-
5. (Optional/Recommended) [mise](https://github.com/jdx/mise) to manage multiple versions of Python, NodeJS etc.
10
-
11
-
12
-
First [fork](https://github.com/python-validators/validators/fork) this repository. Then clone it to your system. Then install development dependencies.
5
+
1.[Git](https://git-scm.com)
6
+
2.[Python](https://www.python.org) v3.8 or later
7
+
3.[PDM](https://pdm-project.org) for easy dependency management
8
+
4. (Optional/Recommended) NodeJS for type checking
9
+
5. (Optional/Recommended) [mise](https://github.com/jdx/mise) to manage multiple versions of Python & NodeJS.
13
10
11
+
First [fork this repository](https://github.com/python-validators/validators/fork). Clone it to your system. Install development dependencies.
@@ -30,6 +28,74 @@ $ . ./.venv/bin/activate # replace `/bin/` with `/Scripts/` if you're on Windows
30
28
$ tox
31
29
```
32
30
33
-
Create a git branch. You can now make changes to the source code. If needed, test your change by running `pytest`. Commit, push and create a pull request.
31
+
Create a git branch. You can now make changes to the source code. If needed, test your change by running `tox`. Commit, push and create a pull request.
34
32
35
33
If you're in doubt feel free to start a discussion [here](https://github.com/python-validators/validators/discussions). Thanks for taking interest in this library.
34
+
35
+
## Documentation
36
+
37
+
> Documentation is extracted from the source code. Please follow [Google's Python Doc Style](https://google.github.io/styleguide/pyguide.html).
38
+
39
+
If you're adding/removing a module, you must update the `nav` key in `mkdocs.yml`.
40
+
Then export documentation as follows:
41
+
42
+
```sh
43
+
$ . ./.venv/bin/activate
44
+
# generate documentation
45
+
$ python package/export TYPE # where TYPE is any of `doc`, `man` or `web`.
46
+
47
+
# doc - generates docs found here: https://yozachar.github.io/pyvalidators
> You must be familiar with [semantic versioning](https://semver.org) and [Python packaging](https://packaging.python.org).
67
+
68
+
1. Take a look at the [`CHANGES.md`](CHANGES.md). They are generated with [GitHub's releaser](https://github.com/python-validators/validators/releases/new), and then modified.
69
+
2. Update the changelog. Version number must be updated in both [`SECURITY.md`](SECURITY.md) and [`src/validators/__init__.py`](src/validators/__init__.py).
70
+
3. The final merge commit on the upstream (ie. this repo) is tagged.
71
+
72
+
```sh
73
+
# syncing with upstream
74
+
$ git pull upstream master
75
+
$ git push
76
+
# tagging that final merge commit before release
77
+
$ GIT_COMMITTER_DATE=$(git log -n1 --pretty=%aD) git tag -a -m "vMAJOR.MINOR.PATCH" vMAJOR.MINOR.PATCH
78
+
# pushing tag to remote
79
+
$ git push --tag
80
+
$ git push upstream --tag
81
+
```
82
+
83
+
4. To update versioned docs, you must track the `gh-pages` onto a local branch. `git checkout --track upstream/gh-pages`, once.
84
+
5. Checkout to the tag you want to include in the versioned documentation `git checkout TAG_NAME`.
85
+
6. Then using [`mike`](https://github.com/jimporter/mike) (which is already a dev dependency) run `mike deploy -p -u VERSION stable`.
86
+
7. Or use `mike deploy -p -u dev master`, which will deploy docs in the CURRENT commit as the `latest` documentation.
87
+
8. Run `./package/roll.sh` (or `./package/roll.ps1`) to generate both sdist and bdist.
88
+
9. Install [`twine`](https://pypi.org/project/twine) using [`pipx`](https://pipx.pypa.io) to upload package to PyPI.
89
+
90
+
```sh
91
+
# publishing
92
+
$ twine check dist/*
93
+
$ twine upload dist/*
94
+
```
95
+
96
+
10. Create a GitHub release with the contents from the [changelog](CHANGES.md). Upload the wheel from `dist/` along with the shasum file generated with:
0 commit comments