Datasets:
Add multiple spacing options in schema search
Browse files- Pipfile +1 -0
- Pipfile.lock +42 -4
- commits.json +2 -2
- fetch_history.py +1 -1
- slurp.py +1 -3
- validate_schemas.py +4 -1
Pipfile
CHANGED
|
@@ -13,6 +13,7 @@ pyunionfind = "*"
|
|
| 13 |
scikit-learn = "*"
|
| 14 |
pybktree = "*"
|
| 15 |
python-levenshtein = "*"
|
|
|
|
| 16 |
|
| 17 |
[dev-packages]
|
| 18 |
|
|
|
|
| 13 |
scikit-learn = "*"
|
| 14 |
pybktree = "*"
|
| 15 |
python-levenshtein = "*"
|
| 16 |
+
jsonsubschema = "*"
|
| 17 |
|
| 18 |
[dev-packages]
|
| 19 |
|
Pipfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"_meta": {
|
| 3 |
"hash": {
|
| 4 |
-
"sha256": "
|
| 5 |
},
|
| 6 |
"pipfile-spec": 6,
|
| 7 |
"requires": {
|
|
@@ -128,6 +128,13 @@
|
|
| 128 |
"markers": "python_full_version >= '3.7.0'",
|
| 129 |
"version": "==3.3.2"
|
| 130 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
"idna": {
|
| 132 |
"hashes": [
|
| 133 |
"sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc",
|
|
@@ -160,6 +167,14 @@
|
|
| 160 |
"index": "pypi",
|
| 161 |
"version": "==0.9.25"
|
| 162 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
"jsonschema": {
|
| 164 |
"hashes": [
|
| 165 |
"sha256:5b22d434a45935119af990552c862e5d6d564e8f6601206b305a61fdf661a2b7",
|
|
@@ -176,6 +191,14 @@
|
|
| 176 |
"markers": "python_version >= '3.8'",
|
| 177 |
"version": "==2023.12.1"
|
| 178 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
"levenshtein": {
|
| 180 |
"hashes": [
|
| 181 |
"sha256:01ad1eb09933a499a49923e74e05b1428ca4ef37fed32965fef23f1334a11563",
|
|
@@ -314,6 +337,14 @@
|
|
| 314 |
"markers": "python_version < '3.9'",
|
| 315 |
"version": "==1.3.10"
|
| 316 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 317 |
"pybktree": {
|
| 318 |
"hashes": [
|
| 319 |
"sha256:eec0037cdd3d7553e6d72435a4379bede64be17c6712f149e485169638154d2b"
|
|
@@ -629,6 +660,13 @@
|
|
| 629 |
"markers": "python_version < '3.12' and python_version >= '3.8'",
|
| 630 |
"version": "==1.10.1"
|
| 631 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 632 |
"threadpoolctl": {
|
| 633 |
"hashes": [
|
| 634 |
"sha256:082433502dd922bf738de0d8bcc4fdcbf0979ff44c42bd40f5af8a282f6fa107",
|
|
@@ -655,11 +693,11 @@
|
|
| 655 |
},
|
| 656 |
"zipp": {
|
| 657 |
"hashes": [
|
| 658 |
-
"sha256:
|
| 659 |
-
"sha256:
|
| 660 |
],
|
| 661 |
"markers": "python_version < '3.10'",
|
| 662 |
-
"version": "==3.18.
|
| 663 |
}
|
| 664 |
},
|
| 665 |
"develop": {}
|
|
|
|
| 1 |
{
|
| 2 |
"_meta": {
|
| 3 |
"hash": {
|
| 4 |
+
"sha256": "f8514270cd134349fbc89229143c269b8c24175430257f94aa0ec663169958c2"
|
| 5 |
},
|
| 6 |
"pipfile-spec": 6,
|
| 7 |
"requires": {
|
|
|
|
| 128 |
"markers": "python_full_version >= '3.7.0'",
|
| 129 |
"version": "==3.3.2"
|
| 130 |
},
|
| 131 |
+
"greenery": {
|
| 132 |
+
"hashes": [
|
| 133 |
+
"sha256:c489d3d111ab49fc522e4796f349994d953d20ec8289aef107f2e7f240534d85",
|
| 134 |
+
"sha256:fb5f9439401ba01f256c7aff0aef9ecb482a3468e489532cfd8590743463d7c3"
|
| 135 |
+
],
|
| 136 |
+
"version": "==3.3.3"
|
| 137 |
+
},
|
| 138 |
"idna": {
|
| 139 |
"hashes": [
|
| 140 |
"sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc",
|
|
|
|
| 167 |
"index": "pypi",
|
| 168 |
"version": "==0.9.25"
|
| 169 |
},
|
| 170 |
+
"jsonref": {
|
| 171 |
+
"hashes": [
|
| 172 |
+
"sha256:32fe8e1d85af0fdefbebce950af85590b22b60f9e95443176adbde4e1ecea552",
|
| 173 |
+
"sha256:590dc7773df6c21cbf948b5dac07a72a251db28b0238ceecce0a2abfa8ec30a9"
|
| 174 |
+
],
|
| 175 |
+
"markers": "python_version >= '3.7'",
|
| 176 |
+
"version": "==1.1.0"
|
| 177 |
+
},
|
| 178 |
"jsonschema": {
|
| 179 |
"hashes": [
|
| 180 |
"sha256:5b22d434a45935119af990552c862e5d6d564e8f6601206b305a61fdf661a2b7",
|
|
|
|
| 191 |
"markers": "python_version >= '3.8'",
|
| 192 |
"version": "==2023.12.1"
|
| 193 |
},
|
| 194 |
+
"jsonsubschema": {
|
| 195 |
+
"hashes": [
|
| 196 |
+
"sha256:4133bd1f7a2529b28aa7150f71bbcd5d6acf3663f0b83dedd9e6df71c4585779",
|
| 197 |
+
"sha256:852e0878842122a046fce5b3db1bfb801a26de20a2dfaebd8df20f366a762d2c"
|
| 198 |
+
],
|
| 199 |
+
"index": "pypi",
|
| 200 |
+
"version": "==0.0.7"
|
| 201 |
+
},
|
| 202 |
"levenshtein": {
|
| 203 |
"hashes": [
|
| 204 |
"sha256:01ad1eb09933a499a49923e74e05b1428ca4ef37fed32965fef23f1334a11563",
|
|
|
|
| 337 |
"markers": "python_version < '3.9'",
|
| 338 |
"version": "==1.3.10"
|
| 339 |
},
|
| 340 |
+
"portion": {
|
| 341 |
+
"hashes": [
|
| 342 |
+
"sha256:17f0388d7df3488313ac527d8da9542d2c1329dfefb8793a77ad2dfc97596051",
|
| 343 |
+
"sha256:5289b40d98959b16b3f6927781678935d3df1b7c14947f5d7778e5e04dd9a065"
|
| 344 |
+
],
|
| 345 |
+
"markers": "python_version ~= '3.7'",
|
| 346 |
+
"version": "==2.4.2"
|
| 347 |
+
},
|
| 348 |
"pybktree": {
|
| 349 |
"hashes": [
|
| 350 |
"sha256:eec0037cdd3d7553e6d72435a4379bede64be17c6712f149e485169638154d2b"
|
|
|
|
| 660 |
"markers": "python_version < '3.12' and python_version >= '3.8'",
|
| 661 |
"version": "==1.10.1"
|
| 662 |
},
|
| 663 |
+
"sortedcontainers": {
|
| 664 |
+
"hashes": [
|
| 665 |
+
"sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88",
|
| 666 |
+
"sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0"
|
| 667 |
+
],
|
| 668 |
+
"version": "==2.4.0"
|
| 669 |
+
},
|
| 670 |
"threadpoolctl": {
|
| 671 |
"hashes": [
|
| 672 |
"sha256:082433502dd922bf738de0d8bcc4fdcbf0979ff44c42bd40f5af8a282f6fa107",
|
|
|
|
| 693 |
},
|
| 694 |
"zipp": {
|
| 695 |
"hashes": [
|
| 696 |
+
"sha256:6278d9ddbcfb1f1089a88fde84481528b07b0e10474e09dcfe53dad4069fa059",
|
| 697 |
+
"sha256:dce197b859eb796242b0622af1b8beb0a722d52aa2f57133ead08edd5bf5374e"
|
| 698 |
],
|
| 699 |
"markers": "python_version < '3.10'",
|
| 700 |
+
"version": "==3.18.2"
|
| 701 |
}
|
| 702 |
},
|
| 703 |
"develop": {}
|
commits.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f34aef7778a01ff7372caa93cb643cb813da1f4155c002934d31ccdbfcb6f70d
|
| 3 |
+
size 16160542
|
fetch_history.py
CHANGED
|
@@ -53,7 +53,7 @@ def main():
|
|
| 53 |
session.mount("http://", adapter)
|
| 54 |
session.mount("https://", adapter)
|
| 55 |
|
| 56 |
-
with open("
|
| 57 |
# Count number of rows and reset
|
| 58 |
reader = csv.DictReader(csvfile)
|
| 59 |
rows = sum(1 for row in reader)
|
|
|
|
| 53 |
session.mount("http://", adapter)
|
| 54 |
session.mount("https://", adapter)
|
| 55 |
|
| 56 |
+
with open("repos2.csv", "r") as csvfile:
|
| 57 |
# Count number of rows and reset
|
| 58 |
reader = csv.DictReader(csvfile)
|
| 59 |
rows = sum(1 for row in reader)
|
slurp.py
CHANGED
|
@@ -11,9 +11,7 @@ import tqdm
|
|
| 11 |
|
| 12 |
|
| 13 |
def slurp(outfile):
|
| 14 |
-
query = (
|
| 15 |
-
'count:all file:\.json$ content:\'{\n "$schema": "https://json-schema.org/\''
|
| 16 |
-
)
|
| 17 |
|
| 18 |
session = requests.Session()
|
| 19 |
adapter = requests_ratelimiter.LimiterAdapter(per_second=2)
|
|
|
|
| 11 |
|
| 12 |
|
| 13 |
def slurp(outfile):
|
| 14 |
+
query = 'count:all file:\.json$ (content:\'{\n "$schema": "https://json-schema.org/\' or content:\'{\n "$schema": "https://json-schema.org/\')'
|
|
|
|
|
|
|
| 15 |
|
| 16 |
session = requests.Session()
|
| 17 |
adapter = requests_ratelimiter.LimiterAdapter(per_second=2)
|
validate_schemas.py
CHANGED
|
@@ -9,8 +9,11 @@ import tqdm
|
|
| 9 |
|
| 10 |
data_path = Path("data")
|
| 11 |
for schema_file in tqdm.tqdm(list(data_path.rglob("*.json"))):
|
|
|
|
|
|
|
|
|
|
| 12 |
# Skip any directories named with .json at the end
|
| 13 |
-
if not schema_file.is_file():
|
| 14 |
continue
|
| 15 |
|
| 16 |
try:
|
|
|
|
| 9 |
|
| 10 |
data_path = Path("data")
|
| 11 |
for schema_file in tqdm.tqdm(list(data_path.rglob("*.json"))):
|
| 12 |
+
# Calculate the path of the new file
|
| 13 |
+
new_schema_file = Path("valid_data", *schema_file.parts[1:])
|
| 14 |
+
|
| 15 |
# Skip any directories named with .json at the end
|
| 16 |
+
if not schema_file.is_file() and not new_schema_file.is_file():
|
| 17 |
continue
|
| 18 |
|
| 19 |
try:
|