ts-backend-check 1.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ts_backend_check-1.3.0/CONTRIBUTING.md +343 -0
- ts_backend_check-1.3.0/LICENSE.txt +674 -0
- ts_backend_check-1.3.0/MANIFEST.in +7 -0
- ts_backend_check-1.3.0/PKG-INFO +349 -0
- ts_backend_check-1.3.0/README.md +311 -0
- ts_backend_check-1.3.0/docs/Makefile +19 -0
- ts_backend_check-1.3.0/docs/make.bat +35 -0
- ts_backend_check-1.3.0/docs/requirements.txt +5 -0
- ts_backend_check-1.3.0/docs/source/_static/CHANGELOG.rst +119 -0
- ts_backend_check-1.3.0/docs/source/_static/CONTRIBUTING.rst +251 -0
- ts_backend_check-1.3.0/docs/source/_static/LICENSE.txt +674 -0
- ts_backend_check-1.3.0/docs/source/_static/TSBackendCheckFavicon.ico +0 -0
- ts_backend_check-1.3.0/docs/source/_static/TSBackendCheckLogo.png +0 -0
- ts_backend_check-1.3.0/docs/source/_static/custom.css +49 -0
- ts_backend_check-1.3.0/docs/source/_static/index.rst +0 -0
- ts_backend_check-1.3.0/docs/source/conf.py +195 -0
- ts_backend_check-1.3.0/docs/source/index.rst +128 -0
- ts_backend_check-1.3.0/docs/source/notes.rst +9 -0
- ts_backend_check-1.3.0/docs/source/ts_backend_check/checker.rst +8 -0
- ts_backend_check-1.3.0/docs/source/ts_backend_check/cli/generate_config_file.rst +8 -0
- ts_backend_check-1.3.0/docs/source/ts_backend_check/cli/generate_test_projects.rst +8 -0
- ts_backend_check-1.3.0/docs/source/ts_backend_check/cli/index.rst +13 -0
- ts_backend_check-1.3.0/docs/source/ts_backend_check/cli/main.rst +8 -0
- ts_backend_check-1.3.0/docs/source/ts_backend_check/cli/upgrade.rst +8 -0
- ts_backend_check-1.3.0/docs/source/ts_backend_check/cli/version.rst +8 -0
- ts_backend_check-1.3.0/docs/source/ts_backend_check/index.rst +17 -0
- ts_backend_check-1.3.0/docs/source/ts_backend_check/parsers/django_parser.rst +8 -0
- ts_backend_check-1.3.0/docs/source/ts_backend_check/parsers/index.rst +10 -0
- ts_backend_check-1.3.0/docs/source/ts_backend_check/parsers/typescript_parser.rst +8 -0
- ts_backend_check-1.3.0/docs/source/ts_backend_check/test_project/index.rst +9 -0
- ts_backend_check-1.3.0/docs/source/ts_backend_check/utils.rst +8 -0
- ts_backend_check-1.3.0/pyproject.toml +131 -0
- ts_backend_check-1.3.0/setup.cfg +4 -0
- ts_backend_check-1.3.0/src/i18n_check.egg-info/PKG-INFO +263 -0
- ts_backend_check-1.3.0/src/i18n_check.egg-info/SOURCES.txt +70 -0
- ts_backend_check-1.3.0/src/i18n_check.egg-info/dependency_links.txt +1 -0
- ts_backend_check-1.3.0/src/i18n_check.egg-info/entry_points.txt +2 -0
- ts_backend_check-1.3.0/src/i18n_check.egg-info/requires.txt +19 -0
- ts_backend_check-1.3.0/src/i18n_check.egg-info/top_level.txt +1 -0
- ts_backend_check-1.3.0/src/ts_backend_check/__init__.py +5 -0
- ts_backend_check-1.3.0/src/ts_backend_check/checker.py +343 -0
- ts_backend_check-1.3.0/src/ts_backend_check/cli/__init__.py +4 -0
- ts_backend_check-1.3.0/src/ts_backend_check/cli/generate_config_file.py +235 -0
- ts_backend_check-1.3.0/src/ts_backend_check/cli/generate_test_project.py +54 -0
- ts_backend_check-1.3.0/src/ts_backend_check/cli/main.py +307 -0
- ts_backend_check-1.3.0/src/ts_backend_check/cli/upgrade.py +91 -0
- ts_backend_check-1.3.0/src/ts_backend_check/cli/version.py +87 -0
- ts_backend_check-1.3.0/src/ts_backend_check/parsers/__init__.py +0 -0
- ts_backend_check-1.3.0/src/ts_backend_check/parsers/django_parser.py +128 -0
- ts_backend_check-1.3.0/src/ts_backend_check/parsers/typescript_parser.py +130 -0
- ts_backend_check-1.3.0/src/ts_backend_check/test_project/backend/models.py +31 -0
- ts_backend_check-1.3.0/src/ts_backend_check/test_project/frontend/invalid_interfaces.ts +21 -0
- ts_backend_check-1.3.0/src/ts_backend_check/test_project/frontend/valid_interfaces.ts +18 -0
- ts_backend_check-1.3.0/src/ts_backend_check/utils.py +63 -0
- ts_backend_check-1.3.0/src/ts_backend_check.egg-info/PKG-INFO +349 -0
- ts_backend_check-1.3.0/src/ts_backend_check.egg-info/SOURCES.txt +68 -0
- ts_backend_check-1.3.0/src/ts_backend_check.egg-info/dependency_links.txt +1 -0
- ts_backend_check-1.3.0/src/ts_backend_check.egg-info/entry_points.txt +2 -0
- ts_backend_check-1.3.0/src/ts_backend_check.egg-info/requires.txt +19 -0
- ts_backend_check-1.3.0/src/ts_backend_check.egg-info/top_level.txt +1 -0
- ts_backend_check-1.3.0/tests/cli/test_generate_config_file.py +289 -0
- ts_backend_check-1.3.0/tests/cli/test_generate_test_project.py +106 -0
- ts_backend_check-1.3.0/tests/cli/test_main.py +323 -0
- ts_backend_check-1.3.0/tests/cli/test_upgrade.py +276 -0
- ts_backend_check-1.3.0/tests/cli/test_version.py +95 -0
- ts_backend_check-1.3.0/tests/conftest.py +64 -0
- ts_backend_check-1.3.0/tests/parsers/test_django_parser.py +39 -0
- ts_backend_check-1.3.0/tests/parsers/test_typescript_parser.py +66 -0
- ts_backend_check-1.3.0/tests/test_checker.py +126 -0
- ts_backend_check-1.3.0/tests/test_utils.py +27 -0
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
# Contributing to ts-backend-check
|
|
2
|
+
|
|
3
|
+
Thank you for contributing to `ts-backend-check`!
|
|
4
|
+
|
|
5
|
+
Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved.
|
|
6
|
+
|
|
7
|
+
Following this guide helps to communicate that you respect the time of the developers managing and developing this open-source project. In return, and in accordance with this project's [code of conduct](https://github.com/activist-org/ts-backend-check/tree/main/.github/CODE_OF_CONDUCT.md), other contributors will reciprocate that respect in addressing your issue or assessing patches and features.
|
|
8
|
+
|
|
9
|
+
If you have questions or would like to communicate with the team, please [join us in our public Matrix chat rooms](https://matrix.to/#/#activist_community:matrix.org). We'd be happy to hear from you!
|
|
10
|
+
|
|
11
|
+
<a id="contents"></a>
|
|
12
|
+
|
|
13
|
+
## **Contents**
|
|
14
|
+
|
|
15
|
+
- [First steps as a contributor](#first-steps-)
|
|
16
|
+
- [Mentorship and growth](#mentorship-and-growth-)
|
|
17
|
+
- [Learning the tech stack](#learning-the-tech-stack-)
|
|
18
|
+
- [Development environment](#dev-env-)
|
|
19
|
+
- [Linting](#linting-)
|
|
20
|
+
- [Testing](#testing-)
|
|
21
|
+
- [Issues and projects](#issues-projects-)
|
|
22
|
+
- [Bug reports](#bug-reports-)
|
|
23
|
+
- [Feature requests](#feature-requests-)
|
|
24
|
+
- [Pull requests](#pull-requests-)
|
|
25
|
+
- [Documentation](#documentation)
|
|
26
|
+
|
|
27
|
+
<a id="first-steps-"></a>
|
|
28
|
+
|
|
29
|
+
## First steps as a contributor [`⇧`](#contents)
|
|
30
|
+
|
|
31
|
+
Thank you for your interest in contributing to activist community projects! We look forward to welcoming you :) The following are some suggested steps for people interested in joining our community:
|
|
32
|
+
|
|
33
|
+
- Please join the [public Matrix chat](https://matrix.to/#/#activist_community:matrix.org) to connect with the community
|
|
34
|
+
- [Matrix](https://matrix.org/) is a network for secure, decentralized communication
|
|
35
|
+
- We'd suggest that you use the [Element](https://element.io/) client and [Element X](https://element.io/app) for a mobile app
|
|
36
|
+
- The [General](https://matrix.to/#/!uIGQUxlCnEzrPiRsRw:matrix.org?via=matrix.org&via=effektio.org&via=acter.global) and [Development](https://matrix.to/#/!CRgLpGeOBNwxYCtqmK:matrix.org?via=matrix.org&via=acter.global&via=chat.0x7cd.xyz) channels would be great places to start!
|
|
37
|
+
- Feel free to introduce yourself and tell us what your interests are if you're comfortable :)
|
|
38
|
+
- Consider joining our [bi-weekly developer sync](https://etherpad.wikimedia.org/p/activist-dev-sync) — new joiners are always welcome!
|
|
39
|
+
|
|
40
|
+
<a id="mentorship-and-growth-"></a>
|
|
41
|
+
|
|
42
|
+
## Mentorship and growth [`⇧`](#contents)
|
|
43
|
+
|
|
44
|
+
Onboarding and mentoring new members are integral parts of any healthy open-source community. We need those who are onboarded to gain new skills and take on greater roles of triaging issues, reviewing contributions and maintaining the project. We also need them to help those who follow do the same. Please let us know if you have such goals and we'll work with you to achieve them.
|
|
45
|
+
|
|
46
|
+
The above includes expectations on the behavior of those who want to grow with us. Mentorship is earned, not given. Very bluntly, if all you want to do is send AI generated contributions, then you are not demonstrating an interest in growing your skills and it doesn't make sense for us to invest in your development. Continued constructive contributions, new open issues and communication that provides context for maintainers help us do our work immensely. We would be happy to help such community members expand their skills and take on further responsibilities!
|
|
47
|
+
|
|
48
|
+
<a id="learning-the-tech-stack-"></a>
|
|
49
|
+
|
|
50
|
+
## Learning the tech stack [`⇧`](#contents)
|
|
51
|
+
|
|
52
|
+
`ts-backend-check` is very open to contributions from people in the early stages of their coding journey! The following is a select list of documentation pages to help you understand the technologies we use.
|
|
53
|
+
|
|
54
|
+
<details><summary>Docs for those new to programming</summary>
|
|
55
|
+
<p>
|
|
56
|
+
|
|
57
|
+
- [Mozilla Developer Network Learning Area](https://developer.mozilla.org/en-US/docs/Learn)
|
|
58
|
+
- Doing MDN sections for HTML, CSS and JavaScript is the best ways to get into web development!
|
|
59
|
+
- [Open Source Guides](https://opensource.guide/)
|
|
60
|
+
- Guides from GitHub about open-source software including how to start and much more!
|
|
61
|
+
|
|
62
|
+
</p>
|
|
63
|
+
</details>
|
|
64
|
+
|
|
65
|
+
<details><summary>Python learning docs</summary>
|
|
66
|
+
<p>
|
|
67
|
+
|
|
68
|
+
- [Python getting started guide](https://docs.python.org/3/tutorial/introduction.html)
|
|
69
|
+
- [Python getting started resources](https://www.python.org/about/gettingstarted/)
|
|
70
|
+
|
|
71
|
+
</p>
|
|
72
|
+
</details>
|
|
73
|
+
|
|
74
|
+
<a id="dev-env-"></a>
|
|
75
|
+
|
|
76
|
+
## Development environment [`⇧`](#contents)
|
|
77
|
+
|
|
78
|
+
1. First and foremost, please see the suggested IDE setup in the dropdown below to make sure that your editor is ready for development.
|
|
79
|
+
|
|
80
|
+
> [!IMPORTANT]
|
|
81
|
+
>
|
|
82
|
+
> <details><summary>Suggested IDE setup</summary>
|
|
83
|
+
>
|
|
84
|
+
> <p>
|
|
85
|
+
>
|
|
86
|
+
> VS Code
|
|
87
|
+
>
|
|
88
|
+
> Install the following extensions:
|
|
89
|
+
>
|
|
90
|
+
> - [charliermarsh.ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff)
|
|
91
|
+
> - [streetsidesoftware.code-spell-checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker)
|
|
92
|
+
>
|
|
93
|
+
> </p>
|
|
94
|
+
> </details>
|
|
95
|
+
|
|
96
|
+
2. [Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the [ts-backend-check repo](https://github.com/activist-org/ts-backend-check), clone your fork, and configure the remotes:
|
|
97
|
+
|
|
98
|
+
> [!NOTE]
|
|
99
|
+
>
|
|
100
|
+
> <details><summary>Consider using SSH</summary>
|
|
101
|
+
>
|
|
102
|
+
> <p>
|
|
103
|
+
>
|
|
104
|
+
> Alternatively to using HTTPS as in the instructions below, consider SSH to interact with GitHub from the terminal. SSH allows you to connect without a user-pass authentication flow.
|
|
105
|
+
>
|
|
106
|
+
> To run git commands with SSH, remember then to substitute the HTTPS URL, `https://github.com/...`, with the SSH one, `git@github.com:...`.
|
|
107
|
+
>
|
|
108
|
+
> - e.g. Cloning now becomes `git clone git@github.com:<your-username>/ts-backend-check.git`
|
|
109
|
+
>
|
|
110
|
+
> GitHub also has their documentation on how to [Generate a new SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) 🔑
|
|
111
|
+
>
|
|
112
|
+
> </p>
|
|
113
|
+
> </details>
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Clone your fork of the repo into the current directory.
|
|
117
|
+
git clone https://github.com/<your-username>/ts-backend-check.git
|
|
118
|
+
# Navigate to the newly cloned directory.
|
|
119
|
+
cd ts-backend-check
|
|
120
|
+
# Assign the original repo to a remote called "upstream".
|
|
121
|
+
git remote add upstream https://github.com/activist-org/ts-backend-check.git
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
- Now, if you run `git remote -v` you should see two remote repositories named:
|
|
125
|
+
- `origin` (forked repository)
|
|
126
|
+
- `upstream` (`ts-backend-check` repository)
|
|
127
|
+
|
|
128
|
+
3. Install `uv` if you don't already have it by following the [official installation guide](https://docs.astral.sh/uv/getting-started/installation/).
|
|
129
|
+
|
|
130
|
+
4. Create a virtual environment for ts-backend-check (Python `>=3.12`), activate it and install dependencies:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
uv sync --all-extras # create .venv and install all dependencies from uv.lock
|
|
134
|
+
|
|
135
|
+
# Unix or macOS:
|
|
136
|
+
source .venv/bin/activate
|
|
137
|
+
|
|
138
|
+
# Windows:
|
|
139
|
+
.venv\Scripts\activate.bat # .venv\Scripts\activate.ps1 (PowerShell)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
> [!NOTE]
|
|
143
|
+
> If you change dependencies in `pyproject.toml`, regenerate the lock file with the following command:
|
|
144
|
+
>
|
|
145
|
+
> ```bash
|
|
146
|
+
> uv lock # refresh uv.lock for reproducible installs
|
|
147
|
+
> ```
|
|
148
|
+
|
|
149
|
+
After activating the virtual environment, set up [pre-commit](https://pre-commit.com/) by running:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
pre-commit install
|
|
153
|
+
# uv run pre-commit run --all-files # lint and fix common problems in the codebase
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
You're now ready to work on `ts-backend-check`!
|
|
157
|
+
|
|
158
|
+
> [!NOTE]
|
|
159
|
+
> Feel free to contact the team in the [Development room on Matrix](https://matrix.to/#/!CRgLpGeOBNwxYCtqmK:matrix.org?via=matrix.org&via=acter.global&via=chat.0x7cd.xyz) if you're having problems getting your environment setup!
|
|
160
|
+
|
|
161
|
+
<a id="linting-"></a>
|
|
162
|
+
|
|
163
|
+
## Linting [`⇧`](#contents)
|
|
164
|
+
|
|
165
|
+
[Ruff](https://github.com/astral-sh/ruff) is installed via the required packages to assure that errors are reported correctly. We'd also suggest that VS Code users install the [Ruff extension](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff).
|
|
166
|
+
|
|
167
|
+
<a id="testing-"></a>
|
|
168
|
+
|
|
169
|
+
## Testing [`⇧`](#contents)
|
|
170
|
+
|
|
171
|
+
Please run the following commands from the project root to test:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# Format the src directory, lint the code and run static type checks:
|
|
175
|
+
ruff format ./src
|
|
176
|
+
ruff check ./src
|
|
177
|
+
mypy ./src --config-file ./pyproject.toml
|
|
178
|
+
|
|
179
|
+
# Run tests:
|
|
180
|
+
pytest
|
|
181
|
+
|
|
182
|
+
# To run a specific test:
|
|
183
|
+
pytest path/to/test_file.py::test_function
|
|
184
|
+
|
|
185
|
+
# To run with a coverage report as is done in PRs:
|
|
186
|
+
pytest . --cov=src --cov-report=term-missing --cov-config=./pyproject.toml
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
<a id="issues-projects"></a>
|
|
190
|
+
|
|
191
|
+
## Issues and projects [`⇧`](#contents)
|
|
192
|
+
|
|
193
|
+
The [issue tracker for ts-backend-check](https://github.com/activist-org/ts-backend-check/issues) is the preferred channel for [bug reports](#bug-reports), [features requests](#feature-requests) and [submitting pull requests](#pull-requests). The activist community also organizes related issues into [projects](https://github.com/activist-org/ts-backend-check/projects).
|
|
194
|
+
|
|
195
|
+
<a name="bug-reports"></a>
|
|
196
|
+
|
|
197
|
+
## Bug reports [`⇧`](#contents)
|
|
198
|
+
|
|
199
|
+
A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports are extremely helpful — thank you!
|
|
200
|
+
|
|
201
|
+
Guidelines for bug reports:
|
|
202
|
+
|
|
203
|
+
1. **Use the GitHub issue search** to check if the issue has already been reported.
|
|
204
|
+
|
|
205
|
+
2. **Check if the issue has been fixed** by trying to reproduce it using the latest `main` or development branch in the repository.
|
|
206
|
+
|
|
207
|
+
3. **Isolate the problem** to make sure that the code in the repository is _definitely_ responsible for the issue.
|
|
208
|
+
|
|
209
|
+
**Great Bug Reports** tend to have:
|
|
210
|
+
|
|
211
|
+
- A quick summary
|
|
212
|
+
- Steps to reproduce
|
|
213
|
+
- What you expected would happen
|
|
214
|
+
- What actually happens
|
|
215
|
+
- Notes (why this might be happening, things tried that didn't work, etc)
|
|
216
|
+
|
|
217
|
+
To make the above steps easier, the `ts-backend-check` team asks that contributors report bugs using the [bug report template](https://github.com/activist-org/ts-backend-check/issues/new?assignees=&labels=bug&projects=activist-org%2F1&template=bug_report.yml), with these issues further being marked with the [`Bug`](https://github.com/activist-org/ts-backend-check/issues?q=is%3Aissue%20state%3Aopen%20type%3ABug) type.
|
|
218
|
+
|
|
219
|
+
Again, thank you for your time in reporting issues!
|
|
220
|
+
|
|
221
|
+
<a name="feature-requests-"></a>
|
|
222
|
+
|
|
223
|
+
## Feature requests [`⇧`](#contents)
|
|
224
|
+
|
|
225
|
+
Feature requests are more than welcome! Please take a moment to find out whether your idea fits with the scope and aims of the project. When making a suggestion, provide as much detail and context as possible, and further make clear the degree to which you would like to contribute in its development. Feature requests are marked with the [`Feature`](https://github.com/activist-org/ts-backend-check/issues?q=is%3Aissue%20state%3Aopen%20type%3AFeature) type in the [issues](https://github.com/activist-org/ts-backend-check/issues).
|
|
226
|
+
|
|
227
|
+
<a name="pull-requests-"></a>
|
|
228
|
+
|
|
229
|
+
## Pull requests [`⇧`](#contents)
|
|
230
|
+
|
|
231
|
+
Good pull requests — patches, improvements and new features — are the foundation of our community making `ts-backend-check`. They should remain focused in scope and avoid containing unrelated commits. Note that all contributions to this project will be made under [the specified license](LICENSE.txt) and should follow the coding indentation and style standards (contact us if unsure).
|
|
232
|
+
|
|
233
|
+
**Please ask first** before embarking on any significant pull request (implementing features, refactoring code, etc), otherwise you risk spending a lot of time working on something that the developers might not want to merge into the project. With that being said, major additions are very appreciated!
|
|
234
|
+
|
|
235
|
+
When making a contribution, adhering to the [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow) process is the best way to get your work merged:
|
|
236
|
+
|
|
237
|
+
1. If you cloned a while ago, get the latest changes from upstream:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
git checkout <dev-branch>
|
|
241
|
+
git pull upstream <dev-branch>
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
2. Create a new topic branch (off the main project development branch) to contain your feature, change, or fix:
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
git checkout -b <topic-branch-name>
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
3. Install [pre-commit](https://pre-commit.com/) to ensure that each of your commits is properly checked against our linter and formatters:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
# In the project root:
|
|
254
|
+
pre-commit install
|
|
255
|
+
|
|
256
|
+
# Then test the pre-commit hooks to see how it works:
|
|
257
|
+
pre-commit run --all-files
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
> [!NOTE]
|
|
261
|
+
> pre-commit is Python package that can be installed via pip or any other Python package manager. You can also find it in our [requirements-dev.txt](./requirements-dev.txt) file.
|
|
262
|
+
>
|
|
263
|
+
> ```bash
|
|
264
|
+
> pip install pre-commit
|
|
265
|
+
> ```
|
|
266
|
+
|
|
267
|
+
> [!NOTE]
|
|
268
|
+
> If you are having issues with pre-commit and want to send along your changes regardless, you can ignore the pre-commit hooks via the following:
|
|
269
|
+
>
|
|
270
|
+
> ```bash
|
|
271
|
+
> git commit --no-verify -m "COMMIT_MESSAGE"
|
|
272
|
+
> ```
|
|
273
|
+
|
|
274
|
+
4. Commit your changes in logical chunks, and please try to adhere to [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
|
|
275
|
+
|
|
276
|
+
> [!NOTE]
|
|
277
|
+
> The following are tools and methods to help you write good commit messages ✨
|
|
278
|
+
>
|
|
279
|
+
> - [commitlint](https://commitlint.io/) helps write [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
|
|
280
|
+
> - Git's [interactive rebase](https://docs.github.com/en/github/getting-started-with-github/about-git-rebase) cleans up commits
|
|
281
|
+
|
|
282
|
+
5. Locally merge (or rebase) the upstream development branch into your topic branch:
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
git pull --rebase upstream <dev-branch>
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
6. Push your topic branch up to your fork:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
git push origin <topic-branch-name>
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) with a clear title and description.
|
|
295
|
+
|
|
296
|
+
Thank you in advance for your contributions!
|
|
297
|
+
|
|
298
|
+
<a id="documentation"></a>
|
|
299
|
+
|
|
300
|
+
## Documentation [`⇧`](#contents)
|
|
301
|
+
|
|
302
|
+
The documentation for `ts-backend-check` can be found at [ts-backend-check.readthedocs.io](https://ts-backend-check.readthedocs.io/en/latest/). Documentation is an invaluable way to contribute to coding projects as it allows others to more easily understand the project structure and contribute. Issues related to documentation are marked with the [`documentation`](https://github.com/activist-org/ts-backend-check/labels/documentation) label.
|
|
303
|
+
|
|
304
|
+
### Function Docstrings
|
|
305
|
+
|
|
306
|
+
`ts-backend-check` generally follows [numpydoc conventions](https://numpydoc.readthedocs.io/en/latest/format.html) for documenting functions and Python code in general. Function docstrings should have the following format:
|
|
307
|
+
|
|
308
|
+
```py
|
|
309
|
+
def example_function(argument: argument_type) -> return_type:
|
|
310
|
+
"""
|
|
311
|
+
An example docstring for a function so others understand your work.
|
|
312
|
+
|
|
313
|
+
Parameters
|
|
314
|
+
----------
|
|
315
|
+
argument : argument_type
|
|
316
|
+
Description of your argument.
|
|
317
|
+
|
|
318
|
+
Returns
|
|
319
|
+
-------
|
|
320
|
+
return_value : return_type
|
|
321
|
+
Description of your return value.
|
|
322
|
+
|
|
323
|
+
Raises
|
|
324
|
+
------
|
|
325
|
+
ErrorType
|
|
326
|
+
Description of the error and the condition that raises it.
|
|
327
|
+
"""
|
|
328
|
+
|
|
329
|
+
...
|
|
330
|
+
|
|
331
|
+
return return_value
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### Building the Docs
|
|
335
|
+
|
|
336
|
+
Use the following commands to build the documentation locally:
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
cd docs
|
|
340
|
+
make html
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
You can then open `index.html` within `docs/build/html` to check the local version of the documentation.
|