python-ulid 2.7.0__tar.gz → 3.0.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 (33) hide show
  1. python_ulid-3.0.0/.envrc +10 -0
  2. python_ulid-3.0.0/.github/workflows/lint-and-test.yml +113 -0
  3. {python_ulid-2.7.0 → python_ulid-3.0.0}/.gitignore +4 -2
  4. {python_ulid-2.7.0 → python_ulid-3.0.0}/.pre-commit-config.yaml +2 -2
  5. python_ulid-3.0.0/.ruff_defaults.toml +547 -0
  6. {python_ulid-2.7.0 → python_ulid-3.0.0}/CHANGELOG.rst +18 -9
  7. {python_ulid-2.7.0 → python_ulid-3.0.0}/PKG-INFO +1 -1
  8. python_ulid-3.0.0/devbox.json +13 -0
  9. python_ulid-3.0.0/devbox.lock +62 -0
  10. {python_ulid-2.7.0 → python_ulid-3.0.0}/docs/source/conf.py +2 -1
  11. python_ulid-3.0.0/hatch.toml +40 -0
  12. {python_ulid-2.7.0 → python_ulid-3.0.0}/pyproject.toml +27 -5
  13. {python_ulid-2.7.0 → python_ulid-3.0.0}/tests/test_ulid.py +17 -4
  14. {python_ulid-2.7.0 → python_ulid-3.0.0}/ulid/__init__.py +51 -20
  15. {python_ulid-2.7.0 → python_ulid-3.0.0}/ulid/__main__.py +22 -18
  16. {python_ulid-2.7.0 → python_ulid-3.0.0}/ulid/base32.py +51 -59
  17. {python_ulid-2.7.0 → python_ulid-3.0.0}/ulid/constants.py +5 -0
  18. python_ulid-2.7.0/.github/workflows/lint-and-test.yml +0 -72
  19. python_ulid-2.7.0/hatch.toml +0 -32
  20. {python_ulid-2.7.0 → python_ulid-3.0.0}/.github/workflows/publish.yml +0 -0
  21. {python_ulid-2.7.0 → python_ulid-3.0.0}/.readthedocs.yml +0 -0
  22. {python_ulid-2.7.0 → python_ulid-3.0.0}/LICENSE +0 -0
  23. {python_ulid-2.7.0 → python_ulid-3.0.0}/README.rst +0 -0
  24. {python_ulid-2.7.0 → python_ulid-3.0.0}/docs/Makefile +0 -0
  25. {python_ulid-2.7.0 → python_ulid-3.0.0}/docs/requirements.txt +0 -0
  26. {python_ulid-2.7.0 → python_ulid-3.0.0}/docs/source/api.rst +0 -0
  27. {python_ulid-2.7.0 → python_ulid-3.0.0}/docs/source/changelog.rst +0 -0
  28. {python_ulid-2.7.0 → python_ulid-3.0.0}/docs/source/index.rst +0 -0
  29. {python_ulid-2.7.0 → python_ulid-3.0.0}/logo.png +0 -0
  30. {python_ulid-2.7.0 → python_ulid-3.0.0}/tests/__init__.py +0 -0
  31. {python_ulid-2.7.0 → python_ulid-3.0.0}/tests/test_base32.py +0 -0
  32. {python_ulid-2.7.0 → python_ulid-3.0.0}/tests/test_cli.py +0 -0
  33. {python_ulid-2.7.0 → python_ulid-3.0.0}/ulid/py.typed +0 -0
@@ -0,0 +1,10 @@
1
+ #!/bin/bash
2
+
3
+ # Automatically sets up your devbox environment whenever you cd into this
4
+ # directory via our direnv integration:
5
+
6
+ eval "$(devbox generate direnv --print-envrc)"
7
+ unset UV_PYTHON
8
+
9
+ # check out https://www.jetpack.io/devbox/docs/ide_configuration/direnv/
10
+ # for more details
@@ -0,0 +1,113 @@
1
+ name: lint-and-test
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ lint-docs:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - name: Set up Python 3.12
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.12"
18
+ - name: Install hatch
19
+ uses: pypa/hatch@install
20
+ - name: Lint documentation
21
+ run: hatch run docs:check
22
+
23
+ lint-code:
24
+ runs-on: ubuntu-latest
25
+ name: Lint code
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+ - name: Set up Python 3.12
29
+ uses: actions/setup-python@v5
30
+ with:
31
+ python-version: "3.12"
32
+ - name: Install hatch
33
+ uses: pypa/hatch@install
34
+ - name: Lint code
35
+ run: hatch fmt --check
36
+
37
+ lint-typing:
38
+ runs-on: ubuntu-latest
39
+ name: Lint type annotations
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+ - name: Set up Python 3.12
43
+ uses: actions/setup-python@v5
44
+ with:
45
+ python-version: "3.12"
46
+ - name: Install hatch
47
+ uses: pypa/hatch@install
48
+ - name: Lint typing
49
+ run: hatch run types:check
50
+
51
+ test:
52
+ runs-on: ubuntu-latest
53
+ name: Run tests
54
+ strategy:
55
+ matrix:
56
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
57
+ steps:
58
+ - uses: actions/checkout@v4
59
+ - name: Set up Python ${{ matrix.python-version }}
60
+ uses: actions/setup-python@v5
61
+ with:
62
+ python-version: ${{ matrix.python-version }}
63
+
64
+ - name: Install hatch
65
+ uses: pypa/hatch@install
66
+
67
+ - name: Test
68
+ run: hatch test --cover --python ${{ matrix.python-version }}
69
+
70
+ - name: Disambiguate coverage filename
71
+ run: mv .coverage ".coverage.${{ matrix.os }}.${{ matrix.python-version }}"
72
+
73
+ - name: Upload coverage data
74
+ uses: actions/upload-artifact@v4
75
+ with:
76
+ include-hidden-files: true
77
+ name: coverage-${{ matrix.os }}-${{ matrix.python-version }}
78
+ path: .coverage*
79
+
80
+
81
+ coverage:
82
+ runs-on: ubuntu-latest
83
+ name: Report coverage
84
+ needs:
85
+ - test
86
+ steps:
87
+ - uses: actions/checkout@v4
88
+ - name: Install Hatch
89
+ uses: pypa/hatch@install
90
+
91
+ - name: Download coverage data
92
+ uses: actions/download-artifact@v4
93
+ with:
94
+ pattern: coverage-*
95
+ merge-multiple: true
96
+
97
+ - name: Combine coverage data
98
+ run: hatch run coverage:combine
99
+
100
+ - name: Export coverage reports
101
+ run: hatch run coverage:xml
102
+
103
+ - uses: codecov/codecov-action@v4
104
+ with:
105
+ token: ${{ secrets.CODECOV_TOKEN }}
106
+
107
+
108
+ package:
109
+ name: Build & verify package
110
+ runs-on: ubuntu-latest
111
+ steps:
112
+ - uses: actions/checkout@v4
113
+ - uses: hynek/build-and-inspect-python-package@v2
@@ -7,9 +7,11 @@ __pycache__
7
7
  /.cache
8
8
  /.eggs
9
9
  /.mypy_cache
10
+ /.pytest_cache
11
+ /.ruff_cache
12
+ /.devbox
13
+
10
14
  /coverage.xml
11
- /AUTHORS
12
- /ChangeLog
13
15
  /dist/
14
16
  /build/
15
17
  /docs/build
@@ -1,10 +1,10 @@
1
1
  repos:
2
2
  - repo: https://github.com/astral-sh/ruff-pre-commit
3
- rev: v0.3.3
3
+ rev: v0.6.9
4
4
  hooks:
5
5
  - id: ruff
6
6
  - id: ruff-format
7
7
  - repo: https://github.com/pycqa/doc8
8
- rev: v1.1.1
8
+ rev: v1.1.2
9
9
  hooks:
10
10
  - id: doc8
@@ -0,0 +1,547 @@
1
+ line-length = 120
2
+
3
+ [format]
4
+ docstring-code-format = true
5
+ docstring-code-line-length = 80
6
+
7
+ [lint]
8
+ select = [
9
+ "A001",
10
+ "A002",
11
+ "A003",
12
+ "ARG001",
13
+ "ARG002",
14
+ "ARG003",
15
+ "ARG004",
16
+ "ARG005",
17
+ "ASYNC100",
18
+ "B002",
19
+ "B003",
20
+ "B004",
21
+ "B005",
22
+ "B006",
23
+ "B007",
24
+ "B008",
25
+ "B009",
26
+ "B010",
27
+ "B011",
28
+ "B012",
29
+ "B013",
30
+ "B014",
31
+ "B015",
32
+ "B016",
33
+ "B017",
34
+ "B018",
35
+ "B019",
36
+ "B020",
37
+ "B021",
38
+ "B022",
39
+ "B023",
40
+ "B024",
41
+ "B025",
42
+ "B026",
43
+ "B028",
44
+ "B029",
45
+ "B030",
46
+ "B031",
47
+ "B032",
48
+ "B033",
49
+ "B034",
50
+ "B035",
51
+ "B904",
52
+ "B905",
53
+ "BLE001",
54
+ "C400",
55
+ "C401",
56
+ "C402",
57
+ "C403",
58
+ "C404",
59
+ "C405",
60
+ "C406",
61
+ "C408",
62
+ "C409",
63
+ "C410",
64
+ "C411",
65
+ "C413",
66
+ "C414",
67
+ "C415",
68
+ "C416",
69
+ "C417",
70
+ "C418",
71
+ "C419",
72
+ "COM818",
73
+ "DTZ001",
74
+ "DTZ002",
75
+ "DTZ003",
76
+ "DTZ004",
77
+ "DTZ005",
78
+ "DTZ006",
79
+ "DTZ007",
80
+ "DTZ011",
81
+ "DTZ012",
82
+ "E101",
83
+ "E401",
84
+ "E402",
85
+ "E701",
86
+ "E702",
87
+ "E703",
88
+ "E711",
89
+ "E712",
90
+ "E713",
91
+ "E714",
92
+ "E721",
93
+ "E722",
94
+ "E731",
95
+ "E741",
96
+ "E742",
97
+ "E743",
98
+ "E902",
99
+ "EM101",
100
+ "EM102",
101
+ "EM103",
102
+ "EXE001",
103
+ "EXE002",
104
+ "EXE003",
105
+ "EXE004",
106
+ "EXE005",
107
+ "F401",
108
+ "F402",
109
+ "F403",
110
+ "F404",
111
+ "F405",
112
+ "F406",
113
+ "F407",
114
+ "F501",
115
+ "F502",
116
+ "F503",
117
+ "F504",
118
+ "F505",
119
+ "F506",
120
+ "F507",
121
+ "F508",
122
+ "F509",
123
+ "F521",
124
+ "F522",
125
+ "F523",
126
+ "F524",
127
+ "F525",
128
+ "F541",
129
+ "F601",
130
+ "F602",
131
+ "F621",
132
+ "F622",
133
+ "F631",
134
+ "F632",
135
+ "F633",
136
+ "F634",
137
+ "F701",
138
+ "F702",
139
+ "F704",
140
+ "F706",
141
+ "F707",
142
+ "F722",
143
+ "F811",
144
+ "F821",
145
+ "F822",
146
+ "F823",
147
+ "F841",
148
+ "F842",
149
+ "F901",
150
+ "FA100",
151
+ "FA102",
152
+ "FBT001",
153
+ "FBT002",
154
+ "FLY002",
155
+ "G001",
156
+ "G002",
157
+ "G003",
158
+ "G004",
159
+ "G010",
160
+ "G101",
161
+ "G201",
162
+ "G202",
163
+ "I001",
164
+ "I002",
165
+ "ICN001",
166
+ "ICN002",
167
+ "ICN003",
168
+ "INP001",
169
+ "INT001",
170
+ "INT002",
171
+ "INT003",
172
+ "ISC003",
173
+ "LOG001",
174
+ "LOG002",
175
+ "LOG007",
176
+ "LOG009",
177
+ "N801",
178
+ "N802",
179
+ "N803",
180
+ "N804",
181
+ "N805",
182
+ "N806",
183
+ "N807",
184
+ "N811",
185
+ "N812",
186
+ "N813",
187
+ "N814",
188
+ "N815",
189
+ "N816",
190
+ "N817",
191
+ "N818",
192
+ "N999",
193
+ "PERF101",
194
+ "PERF102",
195
+ "PERF401",
196
+ "PERF402",
197
+ "PGH005",
198
+ "PIE790",
199
+ "PIE794",
200
+ "PIE796",
201
+ "PIE800",
202
+ "PIE804",
203
+ "PIE807",
204
+ "PIE808",
205
+ "PIE810",
206
+ "PLC0105",
207
+ "PLC0131",
208
+ "PLC0132",
209
+ "PLC0205",
210
+ "PLC0208",
211
+ "PLC0414",
212
+ "PLC3002",
213
+ "PLE0100",
214
+ "PLE0101",
215
+ "PLE0116",
216
+ "PLE0117",
217
+ "PLE0118",
218
+ "PLE0237",
219
+ "PLE0241",
220
+ "PLE0302",
221
+ "PLE0307",
222
+ "PLE0604",
223
+ "PLE0605",
224
+ "PLE1142",
225
+ "PLE1205",
226
+ "PLE1206",
227
+ "PLE1300",
228
+ "PLE1307",
229
+ "PLE1310",
230
+ "PLE1507",
231
+ "PLE1700",
232
+ "PLE2502",
233
+ "PLE2510",
234
+ "PLE2512",
235
+ "PLE2513",
236
+ "PLE2514",
237
+ "PLE2515",
238
+ "PLR0124",
239
+ "PLR0133",
240
+ "PLR0206",
241
+ "PLR0402",
242
+ "PLR1711",
243
+ "PLR1714",
244
+ "PLR1722",
245
+ "PLR2004",
246
+ "PLR5501",
247
+ "PLW0120",
248
+ "PLW0127",
249
+ "PLW0129",
250
+ "PLW0131",
251
+ "PLW0406",
252
+ "PLW0602",
253
+ "PLW0603",
254
+ "PLW0711",
255
+ "PLW1508",
256
+ "PLW1509",
257
+ "PLW1510",
258
+ "PLW2901",
259
+ "PLW3301",
260
+ "PT001",
261
+ "PT002",
262
+ "PT003",
263
+ "PT006",
264
+ "PT007",
265
+ "PT008",
266
+ "PT009",
267
+ "PT010",
268
+ "PT011",
269
+ "PT012",
270
+ "PT013",
271
+ "PT014",
272
+ "PT015",
273
+ "PT016",
274
+ "PT017",
275
+ "PT018",
276
+ "PT019",
277
+ "PT020",
278
+ "PT021",
279
+ "PT022",
280
+ "PT023",
281
+ "PT024",
282
+ "PT025",
283
+ "PT026",
284
+ "PT027",
285
+ "PYI001",
286
+ "PYI002",
287
+ "PYI003",
288
+ "PYI004",
289
+ "PYI005",
290
+ "PYI006",
291
+ "PYI007",
292
+ "PYI008",
293
+ "PYI009",
294
+ "PYI010",
295
+ "PYI011",
296
+ "PYI012",
297
+ "PYI013",
298
+ "PYI014",
299
+ "PYI015",
300
+ "PYI016",
301
+ "PYI017",
302
+ "PYI018",
303
+ "PYI019",
304
+ "PYI020",
305
+ "PYI021",
306
+ "PYI024",
307
+ "PYI025",
308
+ "PYI026",
309
+ "PYI029",
310
+ "PYI030",
311
+ "PYI032",
312
+ "PYI033",
313
+ "PYI034",
314
+ "PYI035",
315
+ "PYI036",
316
+ "PYI041",
317
+ "PYI042",
318
+ "PYI043",
319
+ "PYI044",
320
+ "PYI045",
321
+ "PYI046",
322
+ "PYI047",
323
+ "PYI048",
324
+ "PYI049",
325
+ "PYI050",
326
+ "PYI051",
327
+ "PYI052",
328
+ "PYI053",
329
+ "PYI054",
330
+ "PYI055",
331
+ "PYI056",
332
+ "PYI058",
333
+ "RET503",
334
+ "RET504",
335
+ "RET505",
336
+ "RET506",
337
+ "RET507",
338
+ "RET508",
339
+ "RSE102",
340
+ "RUF001",
341
+ "RUF002",
342
+ "RUF003",
343
+ "RUF005",
344
+ "RUF006",
345
+ "RUF007",
346
+ "RUF008",
347
+ "RUF009",
348
+ "RUF010",
349
+ "RUF012",
350
+ "RUF013",
351
+ "RUF015",
352
+ "RUF016",
353
+ "RUF017",
354
+ "RUF018",
355
+ "RUF019",
356
+ "RUF020",
357
+ "RUF100",
358
+ "S101",
359
+ "S102",
360
+ "S103",
361
+ "S104",
362
+ "S105",
363
+ "S106",
364
+ "S107",
365
+ "S108",
366
+ "S110",
367
+ "S112",
368
+ "S113",
369
+ "S201",
370
+ "S202",
371
+ "S301",
372
+ "S302",
373
+ "S303",
374
+ "S304",
375
+ "S305",
376
+ "S306",
377
+ "S307",
378
+ "S308",
379
+ "S310",
380
+ "S311",
381
+ "S312",
382
+ "S313",
383
+ "S314",
384
+ "S315",
385
+ "S316",
386
+ "S317",
387
+ "S318",
388
+ "S319",
389
+ "S320",
390
+ "S321",
391
+ "S323",
392
+ "S324",
393
+ "S501",
394
+ "S502",
395
+ "S503",
396
+ "S504",
397
+ "S505",
398
+ "S506",
399
+ "S507",
400
+ "S508",
401
+ "S509",
402
+ "S601",
403
+ "S602",
404
+ "S604",
405
+ "S605",
406
+ "S606",
407
+ "S607",
408
+ "S608",
409
+ "S609",
410
+ "S611",
411
+ "S612",
412
+ "S701",
413
+ "S702",
414
+ "SIM101",
415
+ "SIM102",
416
+ "SIM103",
417
+ "SIM105",
418
+ "SIM107",
419
+ "SIM108",
420
+ "SIM109",
421
+ "SIM110",
422
+ "SIM112",
423
+ "SIM113",
424
+ "SIM114",
425
+ "SIM115",
426
+ "SIM116",
427
+ "SIM117",
428
+ "SIM118",
429
+ "SIM201",
430
+ "SIM202",
431
+ "SIM208",
432
+ "SIM210",
433
+ "SIM211",
434
+ "SIM212",
435
+ "SIM220",
436
+ "SIM221",
437
+ "SIM222",
438
+ "SIM223",
439
+ "SIM300",
440
+ "SIM910",
441
+ "SIM911",
442
+ "SLF001",
443
+ "SLOT000",
444
+ "SLOT001",
445
+ "SLOT002",
446
+ "T100",
447
+ "T201",
448
+ "T203",
449
+ "TCH001",
450
+ "TCH002",
451
+ "TCH003",
452
+ "TCH004",
453
+ "TCH005",
454
+ "TCH010",
455
+ "TD004",
456
+ "TD005",
457
+ "TD006",
458
+ "TD007",
459
+ "TID251",
460
+ "TID252",
461
+ "TID253",
462
+ "TRY002",
463
+ "TRY003",
464
+ "TRY004",
465
+ "TRY201",
466
+ "TRY300",
467
+ "TRY301",
468
+ "TRY302",
469
+ "TRY400",
470
+ "TRY401",
471
+ "UP001",
472
+ "UP003",
473
+ "UP004",
474
+ "UP005",
475
+ "UP006",
476
+ "UP007",
477
+ "UP008",
478
+ "UP009",
479
+ "UP010",
480
+ "UP011",
481
+ "UP012",
482
+ "UP013",
483
+ "UP014",
484
+ "UP015",
485
+ "UP017",
486
+ "UP018",
487
+ "UP019",
488
+ "UP020",
489
+ "UP021",
490
+ "UP022",
491
+ "UP023",
492
+ "UP024",
493
+ "UP025",
494
+ "UP026",
495
+ "UP028",
496
+ "UP029",
497
+ "UP030",
498
+ "UP031",
499
+ "UP032",
500
+ "UP033",
501
+ "UP034",
502
+ "UP035",
503
+ "UP036",
504
+ "UP037",
505
+ "UP038",
506
+ "UP039",
507
+ "UP040",
508
+ "UP041",
509
+ "W291",
510
+ "W292",
511
+ "W293",
512
+ "W505",
513
+ "W605",
514
+ "YTT101",
515
+ "YTT102",
516
+ "YTT103",
517
+ "YTT201",
518
+ "YTT202",
519
+ "YTT203",
520
+ "YTT204",
521
+ "YTT301",
522
+ "YTT302",
523
+ "YTT303",
524
+ ]
525
+
526
+ [lint.per-file-ignores]
527
+ "**/scripts/*" = [
528
+ "INP001",
529
+ "T201",
530
+ ]
531
+ "**/tests/**/*" = [
532
+ "PLC1901",
533
+ "PLR2004",
534
+ "PLR6301",
535
+ "S",
536
+ "TID252",
537
+ ]
538
+
539
+ [lint.flake8-tidy-imports]
540
+ ban-relative-imports = "all"
541
+
542
+ [lint.isort]
543
+ known-first-party = ["python_ulid"]
544
+
545
+ [lint.flake8-pytest-style]
546
+ fixture-parentheses = false
547
+ mark-parentheses = false