djangorestframework-services 0.1.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.
Files changed (133) hide show
  1. djangorestframework_services-0.1.0/.github/workflows/tests.yml +74 -0
  2. djangorestframework_services-0.1.0/.gitignore +626 -0
  3. djangorestframework_services-0.1.0/.pre-commit-config.yaml +31 -0
  4. djangorestframework_services-0.1.0/CHANGELOG.md +130 -0
  5. djangorestframework_services-0.1.0/CLAUDE.md +150 -0
  6. djangorestframework_services-0.1.0/Makefile +23 -0
  7. djangorestframework_services-0.1.0/PKG-INFO +586 -0
  8. djangorestframework_services-0.1.0/README.md +551 -0
  9. djangorestframework_services-0.1.0/examples/README.md +61 -0
  10. djangorestframework_services-0.1.0/examples/invoices/__init__.py +0 -0
  11. djangorestframework_services-0.1.0/examples/invoices/apps.py +10 -0
  12. djangorestframework_services-0.1.0/examples/invoices/migrations/0001_initial.py +47 -0
  13. djangorestframework_services-0.1.0/examples/invoices/migrations/__init__.py +0 -0
  14. djangorestframework_services-0.1.0/examples/invoices/models/__init__.py +29 -0
  15. djangorestframework_services-0.1.0/examples/invoices/selectors/__init__.py +20 -0
  16. djangorestframework_services-0.1.0/examples/invoices/serializers/__init__.py +21 -0
  17. djangorestframework_services-0.1.0/examples/invoices/services/__init__.py +89 -0
  18. djangorestframework_services-0.1.0/examples/invoices/tests/__init__.py +86 -0
  19. djangorestframework_services-0.1.0/examples/invoices/urls.py +12 -0
  20. djangorestframework_services-0.1.0/examples/invoices/utils/__init__.py +0 -0
  21. djangorestframework_services-0.1.0/examples/invoices/validators/__init__.py +0 -0
  22. djangorestframework_services-0.1.0/examples/invoices/views/__init__.py +48 -0
  23. djangorestframework_services-0.1.0/examples/manage.py +18 -0
  24. djangorestframework_services-0.1.0/examples/project/__init__.py +0 -0
  25. djangorestframework_services-0.1.0/examples/project/settings.py +44 -0
  26. djangorestframework_services-0.1.0/examples/project/urls.py +9 -0
  27. djangorestframework_services-0.1.0/pyproject.toml +123 -0
  28. djangorestframework_services-0.1.0/rest_framework_services/__init__.py +70 -0
  29. djangorestframework_services-0.1.0/rest_framework_services/_compat/__init__.py +11 -0
  30. djangorestframework_services-0.1.0/rest_framework_services/_compat/arun_service.py +37 -0
  31. djangorestframework_services-0.1.0/rest_framework_services/_compat/is_async.py +23 -0
  32. djangorestframework_services-0.1.0/rest_framework_services/_compat/run_service.py +21 -0
  33. djangorestframework_services-0.1.0/rest_framework_services/conf.py +24 -0
  34. djangorestframework_services-0.1.0/rest_framework_services/exceptions/__init__.py +15 -0
  35. djangorestframework_services-0.1.0/rest_framework_services/exceptions/service_error.py +20 -0
  36. djangorestframework_services-0.1.0/rest_framework_services/exceptions/service_validation_error.py +26 -0
  37. djangorestframework_services-0.1.0/rest_framework_services/management/__init__.py +0 -0
  38. djangorestframework_services-0.1.0/rest_framework_services/management/commands/__init__.py +0 -0
  39. djangorestframework_services-0.1.0/rest_framework_services/management/commands/startserviceapp.py +35 -0
  40. djangorestframework_services-0.1.0/rest_framework_services/management/templates/service_app/__init__.py-tpl +0 -0
  41. djangorestframework_services-0.1.0/rest_framework_services/management/templates/service_app/admin.py-tpl +1 -0
  42. djangorestframework_services-0.1.0/rest_framework_services/management/templates/service_app/apps.py-tpl +6 -0
  43. djangorestframework_services-0.1.0/rest_framework_services/management/templates/service_app/migrations/__init__.py-tpl +0 -0
  44. djangorestframework_services-0.1.0/rest_framework_services/management/templates/service_app/models/__init__.py-tpl +0 -0
  45. djangorestframework_services-0.1.0/rest_framework_services/management/templates/service_app/selectors/__init__.py-tpl +0 -0
  46. djangorestframework_services-0.1.0/rest_framework_services/management/templates/service_app/serializers/__init__.py-tpl +0 -0
  47. djangorestframework_services-0.1.0/rest_framework_services/management/templates/service_app/services/__init__.py-tpl +0 -0
  48. djangorestframework_services-0.1.0/rest_framework_services/management/templates/service_app/tests/__init__.py-tpl +0 -0
  49. djangorestframework_services-0.1.0/rest_framework_services/management/templates/service_app/urls.py-tpl +7 -0
  50. djangorestframework_services-0.1.0/rest_framework_services/management/templates/service_app/utils/__init__.py-tpl +0 -0
  51. djangorestframework_services-0.1.0/rest_framework_services/management/templates/service_app/validators/__init__.py-tpl +0 -0
  52. djangorestframework_services-0.1.0/rest_framework_services/management/templates/service_app/views/__init__.py-tpl +0 -0
  53. djangorestframework_services-0.1.0/rest_framework_services/mutations/__init__.py +23 -0
  54. djangorestframework_services-0.1.0/rest_framework_services/mutations/acreate_from_input.py +43 -0
  55. djangorestframework_services-0.1.0/rest_framework_services/mutations/apply_input.py +39 -0
  56. djangorestframework_services-0.1.0/rest_framework_services/mutations/aupdate_from_input.py +52 -0
  57. djangorestframework_services-0.1.0/rest_framework_services/mutations/create_from_input.py +48 -0
  58. djangorestframework_services-0.1.0/rest_framework_services/mutations/update_from_input.py +57 -0
  59. djangorestframework_services-0.1.0/rest_framework_services/mutations/utils.py +201 -0
  60. djangorestframework_services-0.1.0/rest_framework_services/py.typed +0 -0
  61. djangorestframework_services-0.1.0/rest_framework_services/selectors/__init__.py +9 -0
  62. djangorestframework_services-0.1.0/rest_framework_services/selectors/async_selector.py +12 -0
  63. djangorestframework_services-0.1.0/rest_framework_services/selectors/selector.py +22 -0
  64. djangorestframework_services-0.1.0/rest_framework_services/selectors/utils.py +27 -0
  65. djangorestframework_services-0.1.0/rest_framework_services/types/__init__.py +16 -0
  66. djangorestframework_services-0.1.0/rest_framework_services/types/change_result.py +39 -0
  67. djangorestframework_services-0.1.0/rest_framework_services/types/field_change.py +19 -0
  68. djangorestframework_services-0.1.0/rest_framework_services/types/unset.py +34 -0
  69. djangorestframework_services-0.1.0/rest_framework_services/views/__init__.py +24 -0
  70. djangorestframework_services-0.1.0/rest_framework_services/views/mutation/__init__.py +11 -0
  71. djangorestframework_services-0.1.0/rest_framework_services/views/mutation/mutation_flow_mixin.py +57 -0
  72. djangorestframework_services-0.1.0/rest_framework_services/views/mutation/service_create_view.py +53 -0
  73. djangorestframework_services-0.1.0/rest_framework_services/views/mutation/service_delete_view.py +46 -0
  74. djangorestframework_services-0.1.0/rest_framework_services/views/mutation/service_update_view.py +55 -0
  75. djangorestframework_services-0.1.0/rest_framework_services/views/mutation/utils.py +155 -0
  76. djangorestframework_services-0.1.0/rest_framework_services/views/query/__init__.py +11 -0
  77. djangorestframework_services-0.1.0/rest_framework_services/views/query/selector_list_view.py +52 -0
  78. djangorestframework_services-0.1.0/rest_framework_services/views/query/selector_retrieve_view.py +61 -0
  79. djangorestframework_services-0.1.0/rest_framework_services/views/utils.py +47 -0
  80. djangorestframework_services-0.1.0/rest_framework_services/viewsets/__init__.py +25 -0
  81. djangorestframework_services-0.1.0/rest_framework_services/viewsets/decorators/__init__.py +7 -0
  82. djangorestframework_services-0.1.0/rest_framework_services/viewsets/decorators/service_action.py +72 -0
  83. djangorestframework_services-0.1.0/rest_framework_services/viewsets/multi_serializer_mixin.py +39 -0
  84. djangorestframework_services-0.1.0/rest_framework_services/viewsets/selector_list_mixin.py +50 -0
  85. djangorestframework_services-0.1.0/rest_framework_services/viewsets/selector_retrieve_mixin.py +63 -0
  86. djangorestframework_services-0.1.0/rest_framework_services/viewsets/selector_viewset.py +25 -0
  87. djangorestframework_services-0.1.0/rest_framework_services/viewsets/service_create_mixin.py +53 -0
  88. djangorestframework_services-0.1.0/rest_framework_services/viewsets/service_destroy_mixin.py +49 -0
  89. djangorestframework_services-0.1.0/rest_framework_services/viewsets/service_update_mixin.py +56 -0
  90. djangorestframework_services-0.1.0/rest_framework_services/viewsets/service_viewset.py +33 -0
  91. djangorestframework_services-0.1.0/tests/__init__.py +0 -0
  92. djangorestframework_services-0.1.0/tests/conftest.py +3 -0
  93. djangorestframework_services-0.1.0/tests/conftest_settings.py +37 -0
  94. djangorestframework_services-0.1.0/tests/management/__init__.py +0 -0
  95. djangorestframework_services-0.1.0/tests/management/test_startserviceapp.py +110 -0
  96. djangorestframework_services-0.1.0/tests/mutations/__init__.py +0 -0
  97. djangorestframework_services-0.1.0/tests/mutations/test_acreate_from_input.py +86 -0
  98. djangorestframework_services-0.1.0/tests/mutations/test_apply_input.py +103 -0
  99. djangorestframework_services-0.1.0/tests/mutations/test_aupdate_from_input.py +103 -0
  100. djangorestframework_services-0.1.0/tests/mutations/test_create_from_input.py +110 -0
  101. djangorestframework_services-0.1.0/tests/mutations/test_update_from_input.py +140 -0
  102. djangorestframework_services-0.1.0/tests/mutations/test_utils.py +118 -0
  103. djangorestframework_services-0.1.0/tests/selectors/__init__.py +0 -0
  104. djangorestframework_services-0.1.0/tests/selectors/test_selector.py +23 -0
  105. djangorestframework_services-0.1.0/tests/selectors/test_utils.py +33 -0
  106. djangorestframework_services-0.1.0/tests/test_compat.py +140 -0
  107. djangorestframework_services-0.1.0/tests/test_conf.py +23 -0
  108. djangorestframework_services-0.1.0/tests/test_exceptions.py +60 -0
  109. djangorestframework_services-0.1.0/tests/testapp/__init__.py +0 -0
  110. djangorestframework_services-0.1.0/tests/testapp/apps.py +11 -0
  111. djangorestframework_services-0.1.0/tests/testapp/models.py +37 -0
  112. djangorestframework_services-0.1.0/tests/testapp/serializers.py +25 -0
  113. djangorestframework_services-0.1.0/tests/types/__init__.py +0 -0
  114. djangorestframework_services-0.1.0/tests/types/test_change_result.py +49 -0
  115. djangorestframework_services-0.1.0/tests/types/test_field_change.py +36 -0
  116. djangorestframework_services-0.1.0/tests/types/test_unset.py +36 -0
  117. djangorestframework_services-0.1.0/tests/urls.py +5 -0
  118. djangorestframework_services-0.1.0/tests/views/__init__.py +0 -0
  119. djangorestframework_services-0.1.0/tests/views/test_mutation_utils.py +96 -0
  120. djangorestframework_services-0.1.0/tests/views/test_selector_list_view.py +121 -0
  121. djangorestframework_services-0.1.0/tests/views/test_selector_retrieve_view.py +91 -0
  122. djangorestframework_services-0.1.0/tests/views/test_service_create_view.py +150 -0
  123. djangorestframework_services-0.1.0/tests/views/test_service_delete_view.py +140 -0
  124. djangorestframework_services-0.1.0/tests/views/test_service_update_view.py +174 -0
  125. djangorestframework_services-0.1.0/tests/views/test_utils.py +46 -0
  126. djangorestframework_services-0.1.0/tests/viewsets/__init__.py +0 -0
  127. djangorestframework_services-0.1.0/tests/viewsets/decorators/__init__.py +0 -0
  128. djangorestframework_services-0.1.0/tests/viewsets/decorators/test_service_action.py +241 -0
  129. djangorestframework_services-0.1.0/tests/viewsets/test_multi_serializer_mixin.py +46 -0
  130. djangorestframework_services-0.1.0/tests/viewsets/test_selector_retrieve_mixin.py +45 -0
  131. djangorestframework_services-0.1.0/tests/viewsets/test_selector_viewset.py +105 -0
  132. djangorestframework_services-0.1.0/tests/viewsets/test_service_viewset.py +301 -0
  133. djangorestframework_services-0.1.0/uv.lock +1227 -0
@@ -0,0 +1,74 @@
1
+ name: Test djangorestframework-services package
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - name: Install uv
16
+ uses: astral-sh/setup-uv@v5
17
+ with:
18
+ python-version: "3.13"
19
+
20
+ - name: Install dependencies
21
+ run: uv sync --all-groups
22
+
23
+ - name: Ruff lint
24
+ run: uv run ruff check .
25
+
26
+ - name: Ruff format
27
+ run: uv run ruff format --check --diff .
28
+
29
+ - name: Type check
30
+ run: uv run ty check rest_framework_services
31
+
32
+ test:
33
+ runs-on: ubuntu-latest
34
+ strategy:
35
+ fail-fast: false
36
+ matrix:
37
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
38
+ django-version: ["4.2", "5.0", "5.1", "5.2", "6.0"]
39
+ exclude:
40
+ # Django 4.2 supports Python 3.8–3.12
41
+ - python-version: "3.13"
42
+ django-version: "4.2"
43
+ - python-version: "3.14"
44
+ django-version: "4.2"
45
+ # Django 5.0 supports Python 3.10–3.12
46
+ - python-version: "3.13"
47
+ django-version: "5.0"
48
+ - python-version: "3.14"
49
+ django-version: "5.0"
50
+ # Django 5.1 supports Python 3.10–3.13
51
+ - python-version: "3.14"
52
+ django-version: "5.1"
53
+ # Django 6.0 requires Python 3.12+
54
+ - python-version: "3.10"
55
+ django-version: "6.0"
56
+ - python-version: "3.11"
57
+ django-version: "6.0"
58
+
59
+ steps:
60
+ - uses: actions/checkout@v4
61
+
62
+ - name: Install uv
63
+ uses: astral-sh/setup-uv@v5
64
+ with:
65
+ python-version: ${{ matrix.python-version }}
66
+
67
+ - name: Install dependencies
68
+ run: uv sync --all-groups
69
+
70
+ - name: Pin Django ${{ matrix.django-version }}
71
+ run: uv pip install --reinstall-package django "django~=${{ matrix.django-version }}.0"
72
+
73
+ - name: Run tests
74
+ run: uv run --no-sync pytest
@@ -0,0 +1,626 @@
1
+ ### core template
2
+ *.swp
3
+ *.*~
4
+ project.lock.json
5
+ .DS_Store
6
+ *.pyc
7
+ nupkg/
8
+
9
+ # Visual Studio Code
10
+ .vscode
11
+
12
+ # Rider
13
+ .idea
14
+
15
+ # User-specific files
16
+ *.suo
17
+ *.user
18
+ *.userosscache
19
+ *.sln.docstates
20
+
21
+ # Build results
22
+ [Dd]ebug/
23
+ [Dd]ebugPublic/
24
+ [Rr]elease/
25
+ [Rr]eleases/
26
+ x64/
27
+ x86/
28
+ build/
29
+ bld/
30
+ [Bb]in/
31
+ [Oo]bj/
32
+ [Oo]ut/
33
+ msbuild.log
34
+ msbuild.err
35
+ msbuild.wrn
36
+
37
+ # Visual Studio 2015
38
+ .vs/
39
+
40
+
41
+ ### VirtualEnv template
42
+ # Virtualenv
43
+ # http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
44
+ .Python
45
+ [Bb]in
46
+ [Ii]nclude
47
+ [Ll]ib
48
+ [Ll]ib64
49
+ [Ll]ocal
50
+ [Ss]cripts
51
+ pyvenv.cfg
52
+ .venv
53
+ pip-selfcheck.json
54
+
55
+ ### Example user template template
56
+ ### Example user template
57
+
58
+ # IntelliJ project files
59
+ .idea
60
+ *.iml
61
+ out
62
+ gen
63
+ ### VisualStudio template
64
+ ## Ignore Visual Studio temporary files, build results, and
65
+ ## files generated by popular Visual Studio add-ons.
66
+ ##
67
+ ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
68
+
69
+ # User-specific files
70
+ *.rsuser
71
+ *.suo
72
+ *.user
73
+ *.userosscache
74
+ *.sln.docstates
75
+
76
+ # User-specific files (MonoDevelop/Xamarin Studio)
77
+ *.userprefs
78
+
79
+ # Mono auto generated files
80
+ mono_crash.*
81
+
82
+ # Build results
83
+ [Dd]ebug/
84
+ [Dd]ebugPublic/
85
+ [Rr]elease/
86
+ [Rr]eleases/
87
+ x64/
88
+ x86/
89
+ [Ww][Ii][Nn]32/
90
+ [Aa][Rr][Mm]/
91
+ [Aa][Rr][Mm]64/
92
+ bld/
93
+ [Bb]in/
94
+ [Oo]bj/
95
+ [Ll]og/
96
+ [Ll]ogs/
97
+
98
+ # Visual Studio 2015/2017 cache/options directory
99
+ .vs/
100
+ # Uncomment if you have tasks that create the project's static files in wwwroot
101
+ #wwwroot/
102
+
103
+ # Visual Studio 2017 auto generated files
104
+ Generated\ Files/
105
+
106
+ # MSTest test Results
107
+ [Tt]est[Rr]esult*/
108
+ [Bb]uild[Ll]og.*
109
+
110
+ # NUnit
111
+ *.VisualState.xml
112
+ TestResult.xml
113
+ nunit-*.xml
114
+
115
+ # Build Results of an ATL Project
116
+ [Dd]ebugPS/
117
+ [Rr]eleasePS/
118
+ dlldata.c
119
+
120
+ # Benchmark Results
121
+ BenchmarkDotNet.Artifacts/
122
+
123
+ # .NET Core
124
+ project.lock.json
125
+ project.fragment.lock.json
126
+ artifacts/
127
+
128
+ # ASP.NET Scaffolding
129
+ ScaffoldingReadMe.txt
130
+
131
+ # StyleCop
132
+ StyleCopReport.xml
133
+
134
+ # Files built by Visual Studio
135
+ *_i.c
136
+ *_p.c
137
+ *_h.h
138
+ *.ilk
139
+ *.meta
140
+ *.obj
141
+ *.iobj
142
+ *.pch
143
+ *.pdb
144
+ *.ipdb
145
+ *.pgc
146
+ *.pgd
147
+ *.rsp
148
+ *.sbr
149
+ *.tlb
150
+ *.tli
151
+ *.tlh
152
+ *.tmp
153
+ *.tmp_proj
154
+ *_wpftmp.csproj
155
+ *.log
156
+ *.tlog
157
+ *.vspscc
158
+ *.vssscc
159
+ .builds
160
+ *.pidb
161
+ *.svclog
162
+ *.scc
163
+
164
+ # Chutzpah Test files
165
+ _Chutzpah*
166
+
167
+ # Visual C++ cache files
168
+ ipch/
169
+ *.aps
170
+ *.ncb
171
+ *.opendb
172
+ *.opensdf
173
+ *.sdf
174
+ *.cachefile
175
+ *.VC.db
176
+ *.VC.VC.opendb
177
+
178
+ # Visual Studio profiler
179
+ *.psess
180
+ *.vsp
181
+ *.vspx
182
+ *.sap
183
+
184
+ # Visual Studio Trace Files
185
+ *.e2e
186
+
187
+ # TFS 2012 Local Workspace
188
+ $tf/
189
+
190
+ # Guidance Automation Toolkit
191
+ *.gpState
192
+
193
+ # ReSharper is a .NET coding add-in
194
+ _ReSharper*/
195
+ *.[Rr]e[Ss]harper
196
+ *.DotSettings.user
197
+
198
+ # TeamCity is a build add-in
199
+ _TeamCity*
200
+
201
+ # DotCover is a Code Coverage Tool
202
+ *.dotCover
203
+
204
+ # AxoCover is a Code Coverage Tool
205
+ .axoCover/*
206
+ !.axoCover/settings.json
207
+
208
+ # Coverlet is a free, cross platform Code Coverage Tool
209
+ coverage*.json
210
+ coverage*.xml
211
+ coverage*.info
212
+
213
+ # Visual Studio code coverage results
214
+ *.coverage
215
+ *.coveragexml
216
+
217
+ # NCrunch
218
+ _NCrunch_*
219
+ .*crunch*.local.xml
220
+ nCrunchTemp_*
221
+
222
+ # MightyMoose
223
+ *.mm.*
224
+ AutoTest.Net/
225
+
226
+ # Web workbench (sass)
227
+ .sass-cache/
228
+
229
+ # Installshield output folder
230
+ [Ee]xpress/
231
+
232
+ # DocProject is a documentation generator add-in
233
+ DocProject/buildhelp/
234
+ DocProject/Help/*.HxT
235
+ DocProject/Help/*.HxC
236
+ DocProject/Help/*.hhc
237
+ DocProject/Help/*.hhk
238
+ DocProject/Help/*.hhp
239
+ DocProject/Help/Html2
240
+ DocProject/Help/html
241
+
242
+ # Click-Once directory
243
+ publish/
244
+
245
+ # Publish Web Output
246
+ *.[Pp]ublish.xml
247
+ *.azurePubxml
248
+ # Note: Comment the next line if you want to checkin your web deploy settings,
249
+ # but database connection strings (with potential passwords) will be unencrypted
250
+ *.pubxml
251
+ *.publishproj
252
+
253
+ # Microsoft Azure Web App publish settings. Comment the next line if you want to
254
+ # checkin your Azure Web App publish settings, but sensitive information contained
255
+ # in these scripts will be unencrypted
256
+ PublishScripts/
257
+
258
+ # NuGet Packages
259
+ *.nupkg
260
+ # NuGet Symbol Packages
261
+ *.snupkg
262
+ # The packages folder can be ignored because of Package Restore
263
+ **/[Pp]ackages/*
264
+ # except build/, which is used as an MSBuild target.
265
+ !**/[Pp]ackages/build/
266
+ # Uncomment if necessary however generally it will be regenerated when needed
267
+ #!**/[Pp]ackages/repositories.config
268
+ # NuGet v3's project.json files produces more ignorable files
269
+ *.nuget.props
270
+ *.nuget.targets
271
+
272
+ # Microsoft Azure Build Output
273
+ csx/
274
+ *.build.csdef
275
+
276
+ # Microsoft Azure Emulator
277
+ ecf/
278
+ rcf/
279
+
280
+ # Windows Store app package directories and files
281
+ AppPackages/
282
+ BundleArtifacts/
283
+ Package.StoreAssociation.xml
284
+ _pkginfo.txt
285
+ *.appx
286
+ *.appxbundle
287
+ *.appxupload
288
+
289
+ # Visual Studio cache files
290
+ # files ending in .cache can be ignored
291
+ *.[Cc]ache
292
+ # but keep track of directories ending in .cache
293
+ !?*.[Cc]ache/
294
+
295
+ # Others
296
+ ClientBin/
297
+ ~$*
298
+ *~
299
+ *.dbmdl
300
+ *.dbproj.schemaview
301
+ *.jfm
302
+ *.pfx
303
+ *.publishsettings
304
+ orleans.codegen.cs
305
+
306
+ # Including strong name files can present a security risk
307
+ # (https://github.com/github/gitignore/pull/2483#issue-259490424)
308
+ #*.snk
309
+
310
+ # Since there are multiple workflows, uncomment next line to ignore bower_components
311
+ # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
312
+ #bower_components/
313
+
314
+ # RIA/Silverlight projects
315
+ Generated_Code/
316
+
317
+ # Backup & report files from converting an old project file
318
+ # to a newer Visual Studio version. Backup files are not needed,
319
+ # because we have git ;-)
320
+ _UpgradeReport_Files/
321
+ Backup*/
322
+ UpgradeLog*.XML
323
+ UpgradeLog*.htm
324
+ ServiceFabricBackup/
325
+ *.rptproj.bak
326
+
327
+ # SQL Server files
328
+ *.mdf
329
+ *.ldf
330
+ *.ndf
331
+
332
+ # Business Intelligence projects
333
+ *.rdl.data
334
+ *.bim.layout
335
+ *.bim_*.settings
336
+ *.rptproj.rsuser
337
+ *- [Bb]ackup.rdl
338
+ *- [Bb]ackup ([0-9]).rdl
339
+ *- [Bb]ackup ([0-9][0-9]).rdl
340
+
341
+ # Microsoft Fakes
342
+ FakesAssemblies/
343
+
344
+ # GhostDoc plugin setting file
345
+ *.GhostDoc.xml
346
+
347
+ # Node.js Tools for Visual Studio
348
+ .ntvs_analysis.dat
349
+ node_modules/
350
+
351
+ # Visual Studio 6 build log
352
+ *.plg
353
+
354
+ # Visual Studio 6 workspace options file
355
+ *.opt
356
+
357
+ # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
358
+ *.vbw
359
+
360
+ # Visual Studio 6 auto-generated project file (contains which files were open etc.)
361
+ *.vbp
362
+
363
+ # Visual Studio 6 workspace and project file (working project files containing files to include in project)
364
+ *.dsw
365
+ *.dsp
366
+
367
+ # Visual Studio 6 technical files
368
+ *.ncb
369
+ *.aps
370
+
371
+ # Visual Studio LightSwitch build output
372
+ **/*.HTMLClient/GeneratedArtifacts
373
+ **/*.DesktopClient/GeneratedArtifacts
374
+ **/*.DesktopClient/ModelManifest.xml
375
+ **/*.Server/GeneratedArtifacts
376
+ **/*.Server/ModelManifest.xml
377
+ _Pvt_Extensions
378
+
379
+ # Paket dependency manager
380
+ .paket/paket.exe
381
+ paket-files/
382
+
383
+ # FAKE - F# Make
384
+ .fake/
385
+
386
+ # CodeRush personal settings
387
+ .cr/personal
388
+
389
+ # Python Tools for Visual Studio (PTVS)
390
+ __pycache__/
391
+ *.pyc
392
+
393
+ # Cake - Uncomment if you are using it
394
+ # tools/**
395
+ # !tools/packages.config
396
+
397
+ # Tabs Studio
398
+ *.tss
399
+
400
+ # Telerik's JustMock configuration file
401
+ *.jmconfig
402
+
403
+ # BizTalk build output
404
+ *.btp.cs
405
+ *.btm.cs
406
+ *.odx.cs
407
+ *.xsd.cs
408
+
409
+ # OpenCover UI analysis results
410
+ OpenCover/
411
+
412
+ # Azure Stream Analytics local run output
413
+ ASALocalRun/
414
+
415
+ # MSBuild Binary and Structured Log
416
+ *.binlog
417
+
418
+ # NVidia Nsight GPU debugger configuration file
419
+ *.nvuser
420
+
421
+ # MFractors (Xamarin productivity tool) working folder
422
+ .mfractor/
423
+
424
+ # Local History for Visual Studio
425
+ .localhistory/
426
+
427
+ # Visual Studio History (VSHistory) files
428
+ .vshistory/
429
+
430
+ # BeatPulse healthcheck temp database
431
+ healthchecksdb
432
+
433
+ # Backup folder for Package Reference Convert tool in Visual Studio 2017
434
+ MigrationBackup/
435
+
436
+ # Ionide (cross platform F# VS Code tools) working folder
437
+ .ionide/
438
+
439
+ # Fody - auto-generated XML schema
440
+ FodyWeavers.xsd
441
+
442
+ # VS Code files for those working on multiple tools
443
+ .vscode/*
444
+ !.vscode/settings.json
445
+ !.vscode/tasks.json
446
+ !.vscode/launch.json
447
+ !.vscode/extensions.json
448
+ *.code-workspace
449
+
450
+ # Local History for Visual Studio Code
451
+ .history/
452
+
453
+ # Windows Installer files from build outputs
454
+ *.cab
455
+ *.msi
456
+ *.msix
457
+ *.msm
458
+ *.msp
459
+
460
+ # JetBrains Rider
461
+ *.sln.iml
462
+
463
+ ### Python template
464
+ # Byte-compiled / optimized / DLL files
465
+ __pycache__/
466
+ *.py[cod]
467
+ *$py.class
468
+
469
+ # C extensions
470
+ *.so
471
+
472
+ # Distribution / packaging
473
+ .Python
474
+ build/
475
+ develop-eggs/
476
+ dist/
477
+ downloads/
478
+ eggs/
479
+ .eggs/
480
+ lib/
481
+ lib64/
482
+ parts/
483
+ sdist/
484
+ var/
485
+ wheels/
486
+ share/python-wheels/
487
+ *.egg-info/
488
+ .installed.cfg
489
+ *.egg
490
+ MANIFEST
491
+
492
+ # PyInstaller
493
+ # Usually these files are written by a python script from a template
494
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
495
+ *.manifest
496
+ *.spec
497
+
498
+ # Installer logs
499
+ pip-log.txt
500
+ pip-delete-this-directory.txt
501
+
502
+ # Unit test / coverage reports
503
+ htmlcov/
504
+ .tox/
505
+ .nox/
506
+ .coverage
507
+ .coverage.*
508
+ .cache
509
+ nosetests.xml
510
+ coverage.xml
511
+ *.cover
512
+ *.py,cover
513
+ .hypothesis/
514
+ .pytest_cache/
515
+ cover/
516
+
517
+ # Translations
518
+ *.mo
519
+ *.pot
520
+
521
+ # Django stuff:
522
+ *.log
523
+ local_settings.py
524
+ db.sqlite3
525
+ db.sqlite3-journal
526
+
527
+ # Flask stuff:
528
+ instance/
529
+ .webassets-cache
530
+
531
+ # Scrapy stuff:
532
+ .scrapy
533
+
534
+ # Sphinx documentation
535
+ docs/_build/
536
+
537
+ # PyBuilder
538
+ .pybuilder/
539
+ target/
540
+
541
+ # Jupyter Notebook
542
+ .ipynb_checkpoints
543
+
544
+ # IPython
545
+ profile_default/
546
+ ipython_config.py
547
+
548
+ # pyenv
549
+ # For a library or package, you might want to ignore these files since the code is
550
+ # intended to run in multiple environments; otherwise, check them in:
551
+ # .python-version
552
+
553
+ # pipenv
554
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
555
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
556
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
557
+ # install all needed dependencies.
558
+ #Pipfile.lock
559
+
560
+ # poetry
561
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
562
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
563
+ # commonly ignored for libraries.
564
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
565
+ #poetry.lock
566
+
567
+ # pdm
568
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
569
+ #pdm.lock
570
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
571
+ # in version control.
572
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
573
+ .pdm.toml
574
+ .pdm-python
575
+ .pdm-build/
576
+
577
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
578
+ __pypackages__/
579
+
580
+ # Celery stuff
581
+ celerybeat-schedule
582
+ celerybeat.pid
583
+
584
+ # SageMath parsed files
585
+ *.sage.py
586
+
587
+ # Environments
588
+ .env
589
+ .venv
590
+ env/
591
+ venv/
592
+ ENV/
593
+ env.bak/
594
+ venv.bak/
595
+
596
+ # Spyder project settings
597
+ .spyderproject
598
+ .spyproject
599
+
600
+ # Rope project settings
601
+ .ropeproject
602
+
603
+ # mkdocs documentation
604
+ /site
605
+
606
+ # mypy
607
+ .mypy_cache/
608
+ .dmypy.json
609
+ dmypy.json
610
+
611
+ # Pyre type checker
612
+ .pyre/
613
+
614
+ # pytype static type analyzer
615
+ .pytype/
616
+
617
+ # Cython debug symbols
618
+ cython_debug/
619
+
620
+ # PyCharm
621
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
622
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
623
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
624
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
625
+ #.idea/
626
+
@@ -0,0 +1,31 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+ - id: check-yaml
8
+ - id: check-added-large-files
9
+
10
+ - repo: local
11
+ hooks:
12
+ - id: ruff-check
13
+ name: "ruff check --fix"
14
+ entry: make lint-fix
15
+ pass_filenames: false
16
+ language: system
17
+ stages: [pre-commit]
18
+
19
+ - id: ruff-format
20
+ name: "ruff format"
21
+ entry: make format
22
+ pass_filenames: false
23
+ language: system
24
+ stages: [pre-commit]
25
+
26
+ - id: backend-type-check
27
+ name: "type check (ty)"
28
+ entry: make type-check
29
+ pass_filenames: false
30
+ language: system
31
+ stages: [pre-commit]