ts-backend-check 1.0.0__py3-none-any.whl

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.
@@ -0,0 +1,192 @@
1
+ Metadata-Version: 2.4
2
+ Name: ts-backend-check
3
+ Version: 1.0.0
4
+ Summary: ts-backend-check is a Python package used to check TypeScript types against their corresponding backend models to assure that all fields have been accounted for.
5
+ Home-page: https://github.com/activist-org/ts-backend-check
6
+ Author: ts-backend-check developers
7
+ Author-email: andrew.t.mcallister@gmail.com
8
+ Requires-Python: >=3.8
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE.txt
11
+ Requires-Dist: click>=8.1
12
+ Dynamic: author-email
13
+ Dynamic: home-page
14
+ Dynamic: license-file
15
+ Dynamic: requires-python
16
+
17
+ <div align="center">
18
+ <a href="https://github.com/activist-org/ts-backend-check"><img src="https://raw.githubusercontent.com/activist-org/ts-backend-check/main/.github/resources/TSBECheckGitHubBanner.png" width=1024 alt="TSBE Check logo"></a>
19
+ </div>
20
+
21
+ [![rtd](https://img.shields.io/readthedocs/ts-backend-check.svg?label=%20&logo=read-the-docs&logoColor=ffffff)](http://ts-backend-check.readthedocs.io/en/latest/)
22
+ [![ci_backend](https://img.shields.io/github/actions/workflow/status/activist-org/ts-backend-check/pr_ci.yaml?branch=main&label=%20&logo=pytest&logoColor=ffffff)](https://github.com/activist-org/ts-backend-check/actions/workflows/pr_ci_backend.yaml)
23
+ [![issues](https://img.shields.io/github/issues/activist-org/ts-backend-check?label=%20&logo=github)](https://github.com/activist-org/ts-backend-check/issues)
24
+ [![python](https://img.shields.io/badge/Python-4B8BBE.svg?logo=python&logoColor=ffffff)](https://github.com/activist-org/ts-backend-check/blob/main/CONTRIBUTING.md)
25
+ [![pypi](https://img.shields.io/pypi/v/ts-backend-check.svg?label=%20&color=4B8BBE)](https://pypi.org/project/ts-backend-check/)
26
+ [![pypistatus](https://img.shields.io/pypi/status/ts-backend-check.svg?label=%20)](https://pypi.org/project/ts-backend-check/)
27
+ [![license](https://img.shields.io/github/license/activist-org/ts-backend-check.svg?label=%20)](https://github.com/activist-org/ts-backend-check/blob/main/LICENSE.txt)
28
+ [![coc](https://img.shields.io/badge/Contributor%20Covenant-ff69b4.svg)](https://github.com/activist-org/ts-backend-check/blob/main/.github/CODE_OF_CONDUCT.md)
29
+ [![matrix](https://img.shields.io/badge/Matrix-000000.svg?logo=matrix&logoColor=ffffff)](https://matrix.to/#/#activist_community:matrix.org)
30
+
31
+ ### Check TypeScript types against backend models
32
+
33
+ `ts-backend-check` is a Python package used to check TypeScript types against their corresponding backend models to assure that all fields have been accounted for.
34
+
35
+ <a id="contents"></a>
36
+
37
+ # **Contents**
38
+
39
+ - [Usage](#usage-)
40
+ - [Contributing](#contributing-)
41
+ - [Environment setup](#environment-setup)
42
+ - [Contributors](#contributors-)
43
+
44
+ <a id="usage"></a>
45
+
46
+ ## Usage [`⇧`](#contents)
47
+
48
+ ### Installation
49
+
50
+ ```bash
51
+ pip install ts-backend-check
52
+ ```
53
+
54
+ ### Basic Usage
55
+
56
+ The CLI provides a simple interface to check TypeScript types against backend models:
57
+
58
+ ```bash
59
+ # Show help and available commands:
60
+ ts-backend-check --help
61
+
62
+ # Check a TypeScript type against a backend model:
63
+ ts-backend-check check <typescript_file> <backend_model>
64
+
65
+ # Example command:
66
+ ts-backend-check check src/types/user.ts src/models/user.py
67
+ ```
68
+
69
+ ### Command Options
70
+
71
+ - `check`: Compare TypeScript types with backend models
72
+ - `typescript_file`: Path to the TypeScript interface/type file
73
+ - `backend_model`: Path to the backend model file (e.g. Python class)
74
+
75
+ ### Version Information
76
+
77
+ ```bash
78
+ ts-backend-check --version
79
+ ```
80
+
81
+ <a id="contributing"></a>
82
+
83
+ # Contributing [`⇧`](#contents)
84
+
85
+ <a href="https://matrix.to/#/#activist_community:matrix.org"><img src="https://raw.githubusercontent.com/activist-org/Organization/main/resources/images/logos/MatrixLogoGrey.png" height="50" alt="Public Matrix Chat" align="right"></a>
86
+
87
+ activist uses [Matrix](https://matrix.org/) for internal communication. You're more than welcome to [join us in our public chat rooms](https://matrix.to/#/#activist_community:matrix.org) to share ideas, ask questions or just say hi to the team :)
88
+
89
+ Please see the [contribution guidelines](CONTRIBUTING.md) if you are interested in contributing. Work that is in progress or could be implemented is tracked in the [issues](https://github.com/activist-org/ts-backend-check/issues) and [projects](https://github.com/activist-org/ts-backend-check/projects).
90
+
91
+ > [!NOTE]
92
+ > Just because an issue is assigned on GitHub doesn't mean the team isn't open to your contribution! Feel free to write [in the issues](https://github.com/activist-org/ts-backend-check/issues) and we can potentially reassign it to you.
93
+
94
+ Also check the [`-next release-`](https://github.com/activist-org/ts-backend-check/labels/-next%20release-) and [`-priority-`](https://github.com/activist-org/ts-backend-check/labels/-priority-) labels in the [issues](https://github.com/activist-org/ts-backend-check/issues) for those that are most important, as well as those marked [`good first issue`](https://github.com/activist-org/ts-backend-check/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) that are tailored for first-time contributors. For those new to coding or our tech stack, we've collected [links to helpful documentation pages](CONTRIBUTING.md#learning-the-tech-stack-) in the [contribution guidelines](CONTRIBUTING.md).
95
+
96
+ We would be happy to discuss granting you further rights as a contributor after your first pull requests, with a maintainer role then being possible after continued interest in the project. activist seeks to be an inclusive, diverse and supportive organization. We'd love to have you on the team!
97
+
98
+ <a id="how-you-can-help"></a>
99
+
100
+ ## How you can help [`⇧`](#contents)
101
+
102
+ - [Reporting bugs](https://github.com/activist-org/ts-backend-check/issues/new?assignees=&labels=bug&template=bug_report.yml) as they're found 🐞
103
+ - Working with us on [new features](https://github.com/activist-org/ts-backend-check/issues?q=is%3Aissue+is%3Aopen+label%3Afeature) ✨
104
+ - [Documentation](https://github.com/activist-org/ts-backend-check/issues?q=is%3Aissue+is%3Aopen+label%3Adocumentation) for onboarding and project cohesion 📝
105
+
106
+ <a id="environment-setup"></a>
107
+
108
+ # Environment setup [`⇧`](#contents)
109
+
110
+ 1. First and foremost, please see the suggested IDE setup in the dropdown below to make sure that your editor is ready for development.
111
+
112
+ > [!IMPORTANT]
113
+ >
114
+ > <details><summary>Suggested IDE setup</summary>
115
+ >
116
+ > <p>
117
+ >
118
+ > VS Code
119
+ >
120
+ > Install the following extensions:
121
+ >
122
+ > - [charliermarsh.ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff)
123
+ > - [streetsidesoftware.code-spell-checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker)
124
+ >
125
+ > </p>
126
+ > </details>
127
+
128
+ 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:
129
+
130
+ > [!NOTE]
131
+ >
132
+ > <details><summary>Consider using SSH</summary>
133
+ >
134
+ > <p>
135
+ >
136
+ > 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.
137
+ >
138
+ > To run git commands with SSH, remember then to substitute the HTTPS URL, `https://github.com/...`, with the SSH one, `git@github.com:...`.
139
+ >
140
+ > - e.g. Cloning now becomes `git clone git@github.com:<your-username>/ts-backend-check.git`
141
+ >
142
+ > 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) 🔑
143
+ >
144
+ > </p>
145
+ > </details>
146
+
147
+ ```bash
148
+ # Clone your fork of the repo into the current directory.
149
+ git clone https://github.com/<your-username>/ts-backend-check.git
150
+ # Navigate to the newly cloned directory.
151
+ cd ts-backend-check
152
+ # Assign the original repo to a remote called "upstream".
153
+ git remote add upstream https://github.com/activist-org/ts-backend-check.git
154
+ ```
155
+
156
+ - Now, if you run `git remote -v` you should see two remote repositories named:
157
+ - `origin` (forked repository)
158
+ - `upstream` (ts-backend-check repository)
159
+
160
+ 3. Create a virtual environment, activate it and install dependencies:
161
+
162
+ ```bash
163
+ # Unix or MacOS:
164
+ python3 -m venv venv
165
+ source venv/bin/activate
166
+
167
+ # Windows:
168
+ python -m venv venv
169
+ venv\Scripts\activate.bat
170
+
171
+ # After activating venv:
172
+ pip install --upgrade pip
173
+ pip install -r requirements-dev.txt
174
+
175
+ # To install the CLI for local development:
176
+ pip install -e .
177
+ ```
178
+
179
+ You're now ready to work on `ts-backend-check`!
180
+
181
+ > [!NOTE]
182
+ > 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!
183
+
184
+ <a id="contributors"></a>
185
+
186
+ # Contributors [`⇧`](#contents)
187
+
188
+ Thanks to all our amazing [contributors](https://github.com/activist-org/ts-backend-check/graphs/contributors)! ❤️
189
+
190
+ <a href="https://github.com/activist-org/ts-backend-check/graphs/contributors">
191
+ <img src="https://contrib.rocks/image?repo=activist-org/ts-backend-check" />
192
+ </a>
@@ -0,0 +1,14 @@
1
+ ts_backend_check/__init__.py,sha256=5Y_YDmaFl9cjVy1GqGeml-QaPUpcJyWgjCYe_vJoHvw,156
2
+ ts_backend_check/checker.py,sha256=8mLtLBt6ok2cDgt-3u8yb3hClf-3ojU8zIsqL2z_GdQ,5727
3
+ ts_backend_check/django_parser.py,sha256=CFg4-zV5BsVhuq-nVQEYD9nS25JSaHbIs2Xr3LE3KWY,3241
4
+ ts_backend_check/typescript_parser.py,sha256=BqBGOjsf-Wlh6ceaK-G2vLm5AMiEiwX-XnJQrr8P-gQ,2885
5
+ ts_backend_check/utils.py,sha256=Kfa6ZvjnsGrGJJX18FhfzmQtjMrjPwfECZiZL4zgGRQ,475
6
+ ts_backend_check/cli/__init__.py,sha256=bxThVZZgFRXoWgZ4pasljY6ATZPTJVh_KeBebweDJb0,129
7
+ ts_backend_check/cli/main.py,sha256=RUJsonWBUnCqg93ayuDo0LJYhCLKuVb9V9Ycx5cbts4,1636
8
+ ts_backend_check-1.0.0.data/data/requirements.txt,sha256=0FbFr7FTG31FEs_FMsN3MrAIFJIeGdDC6POOOb2FeA0,134
9
+ ts_backend_check-1.0.0.dist-info/licenses/LICENSE.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
10
+ ts_backend_check-1.0.0.dist-info/METADATA,sha256=1hA_CrBvSqePiw3G0ZBAvm5kEmGBRSYHGlUOmsagJnw,9084
11
+ ts_backend_check-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
+ ts_backend_check-1.0.0.dist-info/entry_points.txt,sha256=6_OttJoqgUr1BZYjy6Rcx5g0iYcwJD2o1c5q_6OcXzw,58
13
+ ts_backend_check-1.0.0.dist-info/top_level.txt,sha256=VzfNWQ3fPNdl-OBdtUKsUWR8Asdd27E3OJNUg2oQU8Y,17
14
+ ts_backend_check-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ ts-backend-check = ts_backend_check:cli