estrec 0.1.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.
Files changed (78) hide show
  1. estrec/__init__.py +141 -0
  2. estrec/__main__.py +5 -0
  3. estrec/collection.py +942 -0
  4. estrec/records.py +2140 -0
  5. estrec/schema/LICENSE +138 -0
  6. estrec/schema/catalog.json +268 -0
  7. estrec/schema/estrec-0.1.json +976 -0
  8. estrec/schema/estrec-collection-0.1.json +135 -0
  9. estrec/schema/estrec-table-0.1.json +170 -0
  10. estrec/schema/examples/bayesian.estrec.json +162 -0
  11. estrec/schema/examples/causal-ml.estrec.json +98 -0
  12. estrec/schema/examples/choice-mixed-logit.estrec.json +151 -0
  13. estrec/schema/examples/choice-mnl.estrec.json +137 -0
  14. estrec/schema/examples/conditional-logit.estrec.json +103 -0
  15. estrec/schema/examples/csdid.estrec.json +339 -0
  16. estrec/schema/examples/dcas.estrec.json +198 -0
  17. estrec/schema/examples/dfeols-linear-fe.estrec.json +96 -0
  18. estrec/schema/examples/did2s.estrec.json +269 -0
  19. estrec/schema/examples/event-study.estrec-table.json +24 -0
  20. estrec/schema/examples/gam.estrec.json +83 -0
  21. estrec/schema/examples/glm-logit.estrec.json +118 -0
  22. estrec/schema/examples/iv.estrec.json +64 -0
  23. estrec/schema/examples/lm-minimal.estrec.json +94 -0
  24. estrec/schema/examples/med2s.estrec.json +181 -0
  25. estrec/schema/examples/mediation.estrec.json +102 -0
  26. estrec/schema/examples/meta-analysis.estrec.json +105 -0
  27. estrec/schema/examples/mi.estrec.json +121 -0
  28. estrec/schema/examples/mixed.estrec.json +143 -0
  29. estrec/schema/examples/multiple-testing.estrec.json +81 -0
  30. estrec/schema/examples/paper.estrec-collection.json +1070 -0
  31. estrec/schema/examples/paper.estrec-table.json +30 -0
  32. estrec/schema/examples/ppmlhdfe.estrec.json +92 -0
  33. estrec/schema/examples/predictive.estrec.json +293 -0
  34. estrec/schema/examples/process-spss.estrec.json +363 -0
  35. estrec/schema/examples/replication.estrec-collection.json +123 -0
  36. estrec/schema/examples/replication.members.jsonl +2 -0
  37. estrec/schema/examples/resampling.estrec.json +91 -0
  38. estrec/schema/examples/sem.estrec.json +312 -0
  39. estrec/schema/examples/session.estrec-collection.json +857 -0
  40. estrec/schema/examples/survey.estrec.json +115 -0
  41. estrec/schema/examples/survival-cox-breslow.estrec.json +125 -0
  42. estrec/schema/examples/survival-cox-efron.estrec.json +249 -0
  43. estrec/schema/profiles/bayesian-0.1.json +117 -0
  44. estrec/schema/profiles/causal-ml-0.1.json +137 -0
  45. estrec/schema/profiles/choice-0.1.json +173 -0
  46. estrec/schema/profiles/conditional-logit-0.1.json +149 -0
  47. estrec/schema/profiles/csdid-0.1.json +85 -0
  48. estrec/schema/profiles/dcas-0.1.json +83 -0
  49. estrec/schema/profiles/dfeols-0.1.json +109 -0
  50. estrec/schema/profiles/did-0.1.json +221 -0
  51. estrec/schema/profiles/did2s-0.1.json +82 -0
  52. estrec/schema/profiles/gam-0.1.json +111 -0
  53. estrec/schema/profiles/glm-0.1.json +146 -0
  54. estrec/schema/profiles/inference-0.1.json +77 -0
  55. estrec/schema/profiles/iv-0.1.json +133 -0
  56. estrec/schema/profiles/linear-fe-0.1.json +137 -0
  57. estrec/schema/profiles/med2s-0.1.json +154 -0
  58. estrec/schema/profiles/mediation-0.1.json +99 -0
  59. estrec/schema/profiles/meta-analysis-0.1.json +145 -0
  60. estrec/schema/profiles/mi-0.1.json +102 -0
  61. estrec/schema/profiles/mixed-0.1.json +181 -0
  62. estrec/schema/profiles/multiple-testing-0.1.json +55 -0
  63. estrec/schema/profiles/ppmlhdfe-0.1.json +78 -0
  64. estrec/schema/profiles/predictive-0.1.json +125 -0
  65. estrec/schema/profiles/resampling-0.1.json +70 -0
  66. estrec/schema/profiles/sem-0.1.json +157 -0
  67. estrec/schema/profiles/survey-0.1.json +115 -0
  68. estrec/schema/profiles/survival-0.1.json +170 -0
  69. estrec/show.py +297 -0
  70. estrec/table.py +1702 -0
  71. estrec/views.py +370 -0
  72. estrec-0.1.0.dist-info/METADATA +157 -0
  73. estrec-0.1.0.dist-info/RECORD +78 -0
  74. estrec-0.1.0.dist-info/WHEEL +5 -0
  75. estrec-0.1.0.dist-info/entry_points.txt +2 -0
  76. estrec-0.1.0.dist-info/licenses/LICENSE +25 -0
  77. estrec-0.1.0.dist-info/licenses/schema/LICENSE +138 -0
  78. estrec-0.1.0.dist-info/top_level.txt +1 -0
estrec/__init__.py ADDED
@@ -0,0 +1,141 @@
1
+ # SPDX-License-Identifier: MIT
2
+ # Copyright (c) 2026 Ted Matherly and the estrec contributors
3
+ """Reference tools for estrec: write, read, validate and redact records
4
+ and collections of records.
5
+
6
+ import estrec as ef
7
+ rec = ef.new_record(parameters, estimator={"family": "linear", "method": "ols"})
8
+ ef.write(rec, "model.estrec.json")
9
+ issues = ef.validate(ef.read("model.estrec.json"))
10
+
11
+ The specification is spec/estrec.md in https://github.com/estrec/estrec.
12
+ """
13
+
14
+ __version__ = "0.1.0"
15
+
16
+ from . import show, table
17
+ from .collection import (
18
+ COLLECTION_SCHEMA,
19
+ add_event,
20
+ is_collection,
21
+ iter_members,
22
+ loads_collection,
23
+ member_sha256,
24
+ new_collection,
25
+ new_member,
26
+ read_collection,
27
+ redact_collection,
28
+ reduce_collection,
29
+ validate_collection,
30
+ write_collection,
31
+ )
32
+ from .records import (
33
+ CORE,
34
+ DEFAULT_IDENTIFYING,
35
+ DEFAULT_LEVEL,
36
+ FAIL_BYTES,
37
+ LEVELS,
38
+ PACKAGED_SCHEMAS,
39
+ SCHEMA,
40
+ WARN_BYTES,
41
+ WARN_ELEMENTS,
42
+ EstimationError,
43
+ Issue,
44
+ Schemas,
45
+ add_digest,
46
+ add_test,
47
+ attachment,
48
+ attachment_path,
49
+ canonical_json,
50
+ check_digest,
51
+ core_digest,
52
+ count_elements,
53
+ decode_nonfinite,
54
+ fields_above,
55
+ identifying_paths,
56
+ jsonschema_check,
57
+ level_marks,
58
+ levels_table,
59
+ load_schemas,
60
+ load_structure,
61
+ loads,
62
+ main,
63
+ new_record,
64
+ path_level,
65
+ prepare,
66
+ read,
67
+ record_identifying_paths,
68
+ record_level,
69
+ redact,
70
+ reduce,
71
+ spill,
72
+ to_json,
73
+ validate,
74
+ write,
75
+ )
76
+ from .views import glance, glance_table, parameters_table, tidy
77
+
78
+ __all__ = [
79
+ "COLLECTION_SCHEMA",
80
+ "CORE",
81
+ "DEFAULT_IDENTIFYING",
82
+ "DEFAULT_LEVEL",
83
+ "FAIL_BYTES",
84
+ "LEVELS",
85
+ "PACKAGED_SCHEMAS",
86
+ "SCHEMA",
87
+ "WARN_BYTES",
88
+ "WARN_ELEMENTS",
89
+ "EstimationError",
90
+ "Issue",
91
+ "Schemas",
92
+ "__version__",
93
+ "add_digest",
94
+ "add_event",
95
+ "add_test",
96
+ "attachment",
97
+ "attachment_path",
98
+ "canonical_json",
99
+ "check_digest",
100
+ "core_digest",
101
+ "count_elements",
102
+ "decode_nonfinite",
103
+ "fields_above",
104
+ "glance",
105
+ "glance_table",
106
+ "identifying_paths",
107
+ "is_collection",
108
+ "iter_members",
109
+ "jsonschema_check",
110
+ "level_marks",
111
+ "levels_table",
112
+ "load_schemas",
113
+ "load_structure",
114
+ "loads",
115
+ "loads_collection",
116
+ "main",
117
+ "member_sha256",
118
+ "new_collection",
119
+ "new_member",
120
+ "new_record",
121
+ "parameters_table",
122
+ "path_level",
123
+ "prepare",
124
+ "read",
125
+ "read_collection",
126
+ "record_identifying_paths",
127
+ "record_level",
128
+ "redact",
129
+ "redact_collection",
130
+ "reduce",
131
+ "reduce_collection",
132
+ "show",
133
+ "spill",
134
+ "table",
135
+ "tidy",
136
+ "to_json",
137
+ "validate",
138
+ "validate_collection",
139
+ "write",
140
+ "write_collection",
141
+ ]
estrec/__main__.py ADDED
@@ -0,0 +1,5 @@
1
+ import sys
2
+
3
+ from .records import main
4
+
5
+ sys.exit(main())