From 7e94af634c1e72af85619c56a98d46bd9f8e26a6 Mon Sep 17 00:00:00 2001 From: Nathan Cummings Date: Fri, 13 Sep 2024 11:52:07 +0100 Subject: [PATCH 01/96] Fix diagnostic schema and example --- ukaea-schema/examples/hive/experiment.json | 53 +++++++++++++------ .../facility/hive/diagnostic.schema.json | 2 + 2 files changed, 40 insertions(+), 15 deletions(-) diff --git a/ukaea-schema/examples/hive/experiment.json b/ukaea-schema/examples/hive/experiment.json index cd85f5d..2bd3a4b 100644 --- a/ukaea-schema/examples/hive/experiment.json +++ b/ukaea-schema/examples/hive/experiment.json @@ -1,18 +1,18 @@ { - "campaignID": "HIVE-20230901", - "experimentID": "HIVE-E-20230905", + "campaignID": "HIVE-20230901", + "experimentID": "HIVE-E-20230905", "leadInvestigator": { "firstName": "Alice", "lastName": "Johnson", "email": "alice.johnson@example.com" }, "customer": "ACME Corp", - "experimentStart": "2023-09-05T10:00:00Z", - "experimentEnd": "2023-09-05T16:00:00Z", - "experimentType": "Induction", + "experimentStart": "2023-09-05T10:00:00Z", + "experimentEnd": "2023-09-05T16:00:00Z", + "experimentType": "Induction", "sampleCooling": true, "pulse": { - "pulseID": "123e4567-e89b-12d3-a456-426614174000", + "pulseID": "123e4567-e89b-12d3-a456-426614174000", "firstOperator": { "firstName": "Bob", "lastName": "Smith", @@ -23,9 +23,9 @@ "lastName": "Davis", "email": "carol.davis@example.com" }, - "pulseStart": "2023-09-05T12:00:00Z", - "pulseDuration": 120, - "dataCaptureStart": "2023-09-05T12:00:10Z", + "pulseStart": "2023-09-05T12:00:00Z", + "pulseDuration": 120, + "dataCaptureStart": "2023-09-05T12:00:10Z", "operatorComment": "Pulse completed without issues. Slight delay in data capture start.", "pulseQuality": "Success", "coolantInformation": { @@ -62,6 +62,8 @@ }, "diagnostics": [ { + "diagnosticName": "TC01", + "diagnosticType": "Thermocouple", "port": { "portID": "Port_1", "portDescription": "Front Port", @@ -71,13 +73,19 @@ "status": "Active", "attachment": "spot weld with inert gas shield", "tcType": "K", - "location": [18.065, 2.355, 23.0], + "location": [ + 18.065, + 2.355, + 23.0 + ], "areaType": "Circular", "circleDiameter": 1.31, "noiseFloor": "not captured - assume standard resolution" } }, { + "diagnosticName": "Cam01", + "diagnosticType": "Camera", "port": { "portID": "Port_6", "portDescription": "Bottom Port", @@ -100,7 +108,10 @@ "patternSpeckle": "White speckles", "approxFeatureSize": 50.0, "calTargetMake": "OptiCal", - "calTargetDims": [100, 100], + "calTargetDims": [ + 100, + 100 + ], "calTargetSpacing": 0.5 }, "cameraSetup": { @@ -110,7 +121,10 @@ "make": "Canon", "model": "EOS 5D Mark IV", "serialNumber": "CN12345678", - "resolution": [6720, 4480] + "resolution": [ + 6720, + 4480 + ] }, "lensInformation": { "make": "Canon", @@ -118,7 +132,10 @@ "serialNumber": "LN98765432", "focalLength": 50, "aperture": "f/1.8", - "fieldOfView": [6720, 4480] + "fieldOfView": [ + 6720, + 4480 + ] }, "captureSettings": { "imageAcquisitionRate": 30, @@ -131,7 +148,10 @@ "make": "Nikon", "model": "D850", "serialNumber": "NK87654321", - "resolution": [8256, 5504] + "resolution": [ + 8256, + 5504 + ] }, "lensInformation": { "make": "Nikon", @@ -139,7 +159,10 @@ "serialNumber": "LN12345678", "focalLength": 70, "aperture": "f/2.8", - "fieldOfView": [8256, 5504] + "fieldOfView": [ + 8256, + 5504 + ] }, "captureSettings": { "imageAcquisitionRate": 25, diff --git a/ukaea-schema/facility/hive/diagnostic.schema.json b/ukaea-schema/facility/hive/diagnostic.schema.json index 8bfad1e..9596bbd 100644 --- a/ukaea-schema/facility/hive/diagnostic.schema.json +++ b/ukaea-schema/facility/hive/diagnostic.schema.json @@ -4,6 +4,8 @@ "description": "Metadata schema for a HIVE diagnostic", "type": "object", "required": [ + "diagnosticName", + "diagnosticType", "port", "diagnostic" ], From 647836cf38059f0fa0c024dd1f75fb9a88871b51 Mon Sep 17 00:00:00 2001 From: khalid Date: Wed, 18 Sep 2024 13:12:46 +0100 Subject: [PATCH 02/96] feat: add custom camel case validator to git action --- .github/workflows/medata-ci-workflows.yml | 29 +++++++++++++++++++++ validate_camel_case.py | 31 +++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/medata-ci-workflows.yml create mode 100644 validate_camel_case.py diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml new file mode 100644 index 0000000..91a033d --- /dev/null +++ b/.github/workflows/medata-ci-workflows.yml @@ -0,0 +1,29 @@ +name: Metadata CI Workflow +on: + push: + branches: + - main + +jobs: + validate-json: + runs-on: ubuntu-latest + steps: + - name: valid-json-files + uses: cardinalby/schema-validator-action@v3 + with: + file: "./*.json" + - name: validate-campaign-json + use: cardinalby/schema-validator-action@v3 + with: + file: ./ukaea-schema/examples/hive/campaign.json + schema: ./ukaea-schema/facility/hive/campaign.schema.json + - name: validate-experiment-json + uses: cardinalby/schema-validator-action@v3$ + with: + file: ./ukaea-schema/examples/hive/experiment.json + schema: ./ukaea-schema/facility/hive/experiment.schema.json + - name: validate-facility-json + uses: cardinalby/schema-validator-action@v3$ + with: + file: ./ukaea-schema/examples/facility.json + schema: ./ukaea-schema/facility/facility.schema.json diff --git a/validate_camel_case.py b/validate_camel_case.py new file mode 100644 index 0000000..5ab9263 --- /dev/null +++ b/validate_camel_case.py @@ -0,0 +1,31 @@ +import re +import json + + + # regex to match camel case +def match_camel(s): + return bool(re.match(r'^[a-z]+([A-Z][a-z]+)*$', s)) + + +def validate_camel_case(data): + for key, value in data: + if not match_camel(key): + return False, print("not camelcase") + + # check if json value is a dictionary + if isinstance(value, dict): + validate_camel_case(value) # recursive check nested dictionary + + +def val_json_file(json_file_path): + for json_file in json_file_path: + with open(json_file, 'r') as jf: + data = json.load(jf) + if validate_camel_case(data): + return True + else: + return (f"{json_file} contains non camelCase keys") + + +if __name__ == "__main__": + val_json_file() \ No newline at end of file From 0fc0dfa7609418b1c73587a075553c7e1b3cfefa Mon Sep 17 00:00:00 2001 From: khalid Date: Wed, 18 Sep 2024 15:20:39 +0100 Subject: [PATCH 03/96] fix: add multiple file to json lint schema validation --- validate_camel_case.py | 55 +++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 14 deletions(-) diff --git a/validate_camel_case.py b/validate_camel_case.py index 5ab9263..6e53c37 100644 --- a/validate_camel_case.py +++ b/validate_camel_case.py @@ -1,31 +1,58 @@ import re import json +import argparse # regex to match camel case -def match_camel(s): +def match_camel_case(s): + # match camelCase format using regular expression return bool(re.match(r'^[a-z]+([A-Z][a-z]+)*$', s)) def validate_camel_case(data): + # validate camelCase in json key for key, value in data: - if not match_camel(key): - return False, print("not camelcase") + if not match_camel_case(key): + return False, f"Invalid key format (not CamelCase): {key}" # check if json value is a dictionary if isinstance(value, dict): - validate_camel_case(value) # recursive check nested dictionary + is_valid, message = validate_camel_case(value) # recursive check nested dictionary + if not is_valid: + return False, f"Nested error: {message}" + return True, None + + +def val_json_file(json_file_paths): + # initialize empty list to store error result for invalid json file validation + invalid_result = [] + for json_file in json_file_paths: + try: + with open(json_file, 'r') as jf: + data = json.load(jf) + is_valid, message = validate_camel_case(data) + if not is_valid: + # append result of json file with non cameCase keys + invalid_result.append(f"{json_file} - {message}") + except json.JSONDecodeError as e: + # append result of invalid json file + invalid_result.append(f"Error in file {json_file}, Invalid JSON format {e}") + + # return + if len(invalid_result) > 0: + return "\n".join(invalid_result) + else: + return True - -def val_json_file(json_file_path): - for json_file in json_file_path: - with open(json_file, 'r') as jf: - data = json.load(jf) - if validate_camel_case(data): - return True - else: - return (f"{json_file} contains non camelCase keys") + if __name__ == "__main__": - val_json_file() \ No newline at end of file + + parser = argparse.ArgumentParser(description="all json files in the repository") + parser.add_argument("json_file_paths", type="str", required=True, + help="pass the paths to all json files in the repository") + arg = parser.parse_args + + validation_result = val_json_file(arg.json_file_paths) + print(validation_result) \ No newline at end of file From 4b6db3f363c84ff653fb63f7ffa8c45ec7372410 Mon Sep 17 00:00:00 2001 From: khalid Date: Wed, 18 Sep 2024 16:01:15 +0100 Subject: [PATCH 04/96] fix: typo error in workflow file --- .github/workflows/medata-ci-workflows.yml | 28 ++++++++++++++++++----- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 91a033d..d805542 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -11,19 +11,35 @@ jobs: - name: valid-json-files uses: cardinalby/schema-validator-action@v3 with: - file: "./*.json" - - name: validate-campaign-json + file: | + ./*.json ./scicat-schema/*.json ./ukaea-schema/diagnostics/*.json \ + ./ukaea-schema/examples/hive/*.json ./ukaea-schema/examples/*.json ./ukaea-schema/facility/hive/*.json \ + ./ukaea-schema/facility/*.json ./ukaea-schema/pegasus/ansys_mechanical/*.json \ + ./ukaea-schema/pegasus/*.json ./ukaea-schema/*.json + + - name: Validate campaign JSON use: cardinalby/schema-validator-action@v3 with: file: ./ukaea-schema/examples/hive/campaign.json schema: ./ukaea-schema/facility/hive/campaign.schema.json - - name: validate-experiment-json - uses: cardinalby/schema-validator-action@v3$ + - name: Validate experiment JSON + uses: cardinalby/schema-validator-action@v3 with: file: ./ukaea-schema/examples/hive/experiment.json schema: ./ukaea-schema/facility/hive/experiment.schema.json - - name: validate-facility-json - uses: cardinalby/schema-validator-action@v3$ + - name: Validate facility JSON + uses: cardinalby/schema-validator-action@v3 with: file: ./ukaea-schema/examples/facility.json schema: ./ukaea-schema/facility/facility.schema.json + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: custom-camel-case-validation: + run: | + python validate_camel_case.py ./scicat-schema/*.json ./ukaea-schema/diagnostics/*.json \ + ./ukaea-schema/examples/hive/*.json ./ukaea-schema/examples/*.json ./ukaea-schema/facility/hive/*.json \ + ./ukaea-schema/facility/*.json ./ukaea-schema/pegasus/ansys_mechanical/*.json \ + ./ukaea-schema/pegasus/*.json ./ukaea-schema/*.json + From c96139ff1b0897c090de052e27fb8149e28881a8 Mon Sep 17 00:00:00 2001 From: khalid Date: Wed, 18 Sep 2024 16:16:22 +0100 Subject: [PATCH 05/96] fix: typo bug in workflow --- .github/workflows/medata-ci-workflows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index d805542..32dfa7c 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -18,7 +18,7 @@ jobs: ./ukaea-schema/pegasus/*.json ./ukaea-schema/*.json - name: Validate campaign JSON - use: cardinalby/schema-validator-action@v3 + uses: cardinalby/schema-validator-action@v3 with: file: ./ukaea-schema/examples/hive/campaign.json schema: ./ukaea-schema/facility/hive/campaign.schema.json @@ -36,7 +36,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.11' - - name: custom-camel-case-validation: + - name: custom-camel-case-validation run: | python validate_camel_case.py ./scicat-schema/*.json ./ukaea-schema/diagnostics/*.json \ ./ukaea-schema/examples/hive/*.json ./ukaea-schema/examples/*.json ./ukaea-schema/facility/hive/*.json \ From ea7223c3f77c09555f702a7e847ddea376586557 Mon Sep 17 00:00:00 2001 From: khalid Date: Wed, 18 Sep 2024 16:19:27 +0100 Subject: [PATCH 06/96] fix: typo bug in workflow --- .github/workflows/medata-ci-workflows.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 32dfa7c..8de489c 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -11,11 +11,10 @@ jobs: - name: valid-json-files uses: cardinalby/schema-validator-action@v3 with: - file: | - ./*.json ./scicat-schema/*.json ./ukaea-schema/diagnostics/*.json \ + file: "./scicat-schema/*.json ./ukaea-schema/diagnostics/*.json \ ./ukaea-schema/examples/hive/*.json ./ukaea-schema/examples/*.json ./ukaea-schema/facility/hive/*.json \ ./ukaea-schema/facility/*.json ./ukaea-schema/pegasus/ansys_mechanical/*.json \ - ./ukaea-schema/pegasus/*.json ./ukaea-schema/*.json + ./ukaea-schema/pegasus/*.json ./ukaea-schema/*.json" - name: Validate campaign JSON uses: cardinalby/schema-validator-action@v3 From 0b51c80778f8a80e4ed54bff492d15ad38b1b5ea Mon Sep 17 00:00:00 2001 From: khalid Date: Wed, 18 Sep 2024 16:37:39 +0100 Subject: [PATCH 07/96] fix: typo bug in workflow --- .github/workflows/medata-ci-workflows.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 8de489c..e62c16b 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -11,10 +11,15 @@ jobs: - name: valid-json-files uses: cardinalby/schema-validator-action@v3 with: - file: "./scicat-schema/*.json ./ukaea-schema/diagnostics/*.json \ - ./ukaea-schema/examples/hive/*.json ./ukaea-schema/examples/*.json ./ukaea-schema/facility/hive/*.json \ - ./ukaea-schema/facility/*.json ./ukaea-schema/pegasus/ansys_mechanical/*.json \ - ./ukaea-schema/pegasus/*.json ./ukaea-schema/*.json" + file: | + ./scicat-schema/*.json ./ukaea-schema/diagnostics/*.json + ./ukaea-schema/examples/hive/*.json + ./ukaea-schema/examples/*.json + ./ukaea-schema/facility/hive/*.json + ./ukaea-schema/facility/*.json + ./ukaea-schema/pegasus/ansys_mechanical/*.json + ./ukaea-schema/pegasus/*.json + ./ukaea-schema/*.json - name: Validate campaign JSON uses: cardinalby/schema-validator-action@v3 @@ -37,8 +42,8 @@ jobs: python-version: '3.11' - name: custom-camel-case-validation run: | - python validate_camel_case.py ./scicat-schema/*.json ./ukaea-schema/diagnostics/*.json \ - ./ukaea-schema/examples/hive/*.json ./ukaea-schema/examples/*.json ./ukaea-schema/facility/hive/*.json \ - ./ukaea-schema/facility/*.json ./ukaea-schema/pegasus/ansys_mechanical/*.json \ - ./ukaea-schema/pegasus/*.json ./ukaea-schema/*.json + python validate_camel_case.py "./scicat-schema/*.json" "./ukaea-schema/diagnostics/*.json" \ + "./ukaea-schema/examples/hive/*.json" "./ukaea-schema/examples/*.json" "./ukaea-schema/facility/hive/*.json" \ + "./ukaea-schema/facility/*.json" "./ukaea-schema/pegasus/ansys_mechanical/*.json" \ + "./ukaea-schema/pegasus/*.json" "./ukaea-schema/*.json" From 1ed71047c8e29054d4915205f9bd42307ea99764 Mon Sep 17 00:00:00 2001 From: khalid Date: Wed, 18 Sep 2024 16:40:40 +0100 Subject: [PATCH 08/96] fix: typo bug in workflow --- .github/workflows/medata-ci-workflows.yml | 68 +++++++++++------------ 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index e62c16b..eb541d3 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -11,39 +11,39 @@ jobs: - name: valid-json-files uses: cardinalby/schema-validator-action@v3 with: - file: | - ./scicat-schema/*.json ./ukaea-schema/diagnostics/*.json - ./ukaea-schema/examples/hive/*.json - ./ukaea-schema/examples/*.json - ./ukaea-schema/facility/hive/*.json - ./ukaea-schema/facility/*.json - ./ukaea-schema/pegasus/ansys_mechanical/*.json - ./ukaea-schema/pegasus/*.json - ./ukaea-schema/*.json + file: scicat-schema/*.json + #./ukaea-schema/diagnostics/*.json + # ./ukaea-schema/examples/hive/*.json + # ./ukaea-schema/examples/*.json + # ./ukaea-schema/facility/hive/*.json + # ./ukaea-schema/facility/*.json + # ./ukaea-schema/pegasus/ansys_mechanical/*.json + # ./ukaea-schema/pegasus/*.json + # ./ukaea-schema/*.json - - name: Validate campaign JSON - uses: cardinalby/schema-validator-action@v3 - with: - file: ./ukaea-schema/examples/hive/campaign.json - schema: ./ukaea-schema/facility/hive/campaign.schema.json - - name: Validate experiment JSON - uses: cardinalby/schema-validator-action@v3 - with: - file: ./ukaea-schema/examples/hive/experiment.json - schema: ./ukaea-schema/facility/hive/experiment.schema.json - - name: Validate facility JSON - uses: cardinalby/schema-validator-action@v3 - with: - file: ./ukaea-schema/examples/facility.json - schema: ./ukaea-schema/facility/facility.schema.json - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - name: custom-camel-case-validation - run: | - python validate_camel_case.py "./scicat-schema/*.json" "./ukaea-schema/diagnostics/*.json" \ - "./ukaea-schema/examples/hive/*.json" "./ukaea-schema/examples/*.json" "./ukaea-schema/facility/hive/*.json" \ - "./ukaea-schema/facility/*.json" "./ukaea-schema/pegasus/ansys_mechanical/*.json" \ - "./ukaea-schema/pegasus/*.json" "./ukaea-schema/*.json" + # - name: Validate campaign JSON + # uses: cardinalby/schema-validator-action@v3 + # with: + # file: ./ukaea-schema/examples/hive/campaign.json + # schema: ./ukaea-schema/facility/hive/campaign.schema.json + # - name: Validate experiment JSON + # uses: cardinalby/schema-validator-action@v3 + # with: + # file: ./ukaea-schema/examples/hive/experiment.json + # schema: ./ukaea-schema/facility/hive/experiment.schema.json + # - name: Validate facility JSON + # uses: cardinalby/schema-validator-action@v3 + # with: + # file: ./ukaea-schema/examples/facility.json + # schema: ./ukaea-schema/facility/facility.schema.json + # - name: Set up Python + # uses: actions/setup-python@v4 + # with: + # python-version: '3.11' + # - name: custom-camel-case-validation + # run: | + # python validate_camel_case.py "./scicat-schema/*.json" "./ukaea-schema/diagnostics/*.json" \ + # "./ukaea-schema/examples/hive/*.json" "./ukaea-schema/examples/*.json" "./ukaea-schema/facility/hive/*.json" \ + # "./ukaea-schema/facility/*.json" "./ukaea-schema/pegasus/ansys_mechanical/*.json" \ + # "./ukaea-schema/pegasus/*.json" "./ukaea-schema/*.json" From 7e80b42e86d4316c56f74f32fa9ccb600e513316 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:42:42 +0100 Subject: [PATCH 09/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index eb541d3..5701778 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -11,7 +11,7 @@ jobs: - name: valid-json-files uses: cardinalby/schema-validator-action@v3 with: - file: scicat-schema/*.json + file: /scicat-schema/*.json #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json # ./ukaea-schema/examples/*.json From 3fcae01ec0284f061f19212d71e4311dd3a42ef2 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:43:58 +0100 Subject: [PATCH 10/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 5701778..2ce79d6 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -11,7 +11,8 @@ jobs: - name: valid-json-files uses: cardinalby/schema-validator-action@v3 with: - file: /scicat-schema/*.json + file: ./scicat-schema/scicat.dataset-derived.schema.json + #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json # ./ukaea-schema/examples/*.json From c23d6024af80bbfa2cb640a9d48068843bef967d Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Wed, 18 Sep 2024 16:46:07 +0100 Subject: [PATCH 11/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 2ce79d6..e3f14b5 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -11,7 +11,7 @@ jobs: - name: valid-json-files uses: cardinalby/schema-validator-action@v3 with: - file: ./scicat-schema/scicat.dataset-derived.schema.json + file: "/scicat-schema/scicat.dataset-derived.schema.json" #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json From fdb3b36790c07919bd1cb20c391a416150afca4f Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:20:45 +0100 Subject: [PATCH 12/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index e3f14b5..4e81906 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -11,7 +11,7 @@ jobs: - name: valid-json-files uses: cardinalby/schema-validator-action@v3 with: - file: "/scicat-schema/scicat.dataset-derived.schema.json" + file: scicat.dataset-derived.schema.json #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json From 1d29c98dca13578b9c7303f3f5b5022ed1b6319b Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:22:19 +0100 Subject: [PATCH 13/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 4e81906..5956da1 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -11,7 +11,7 @@ jobs: - name: valid-json-files uses: cardinalby/schema-validator-action@v3 with: - file: scicat.dataset-derived.schema.json + file: ../scicat-schema/scicat.dataset-derived.schema.json #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json From b3c194a25518d50bcc7c61cf50b1e5f6baf3f21b Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:34:46 +0100 Subject: [PATCH 14/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 5956da1..3ead107 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -11,7 +11,7 @@ jobs: - name: valid-json-files uses: cardinalby/schema-validator-action@v3 with: - file: ../scicat-schema/scicat.dataset-derived.schema.json + file: 'scicat-schema/scicat.dataset-derived.schema.json' #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json From bb8c6418383f2bcae626bb353ac99500ca22a19b Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:37:24 +0100 Subject: [PATCH 15/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 3ead107..a904cea 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: valid-json-files - uses: cardinalby/schema-validator-action@v3 + uses: schema-validator-action@v3 with: file: 'scicat-schema/scicat.dataset-derived.schema.json' From 2f8aa81cd7a6146d522037f5df0870ee7258e7be Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:38:10 +0100 Subject: [PATCH 16/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index a904cea..73d0c51 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -9,9 +9,9 @@ jobs: runs-on: ubuntu-latest steps: - name: valid-json-files - uses: schema-validator-action@v3 + uses: cardinalby/schema-validator-action@v3 with: - file: 'scicat-schema/scicat.dataset-derived.schema.json' + file: './scicat-schema/scicat.dataset-derived.schema.json' #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json From 335d438c9bcdba17efd6b910dee462122986ea2e Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:45:32 +0100 Subject: [PATCH 17/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 73d0c51..06c2919 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -10,8 +10,8 @@ jobs: steps: - name: valid-json-files uses: cardinalby/schema-validator-action@v3 - with: - file: './scicat-schema/scicat.dataset-derived.schema.json' + # with: + # file: './scicat-schema/scicat.dataset-derived.schema.json' #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json From bd48a7b4d34069a798637c339661cfa1986e8001 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:49:11 +0100 Subject: [PATCH 18/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 06c2919..e8d2f23 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -10,8 +10,8 @@ jobs: steps: - name: valid-json-files uses: cardinalby/schema-validator-action@v3 - # with: - # file: './scicat-schema/scicat.dataset-derived.schema.json' + with: + file: 'scicat-schema/*.json' #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json From 93e3d25bfae33b887d5cd3bb1e3cefc1a98c3d53 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 08:22:14 +0100 Subject: [PATCH 19/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index e8d2f23..09ea6d1 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -8,10 +8,10 @@ jobs: validate-json: runs-on: ubuntu-latest steps: - - name: valid-json-files - uses: cardinalby/schema-validator-action@v3 - with: - file: 'scicat-schema/*.json' + - name: checkout codes + uses: actions/checkout@v2 + - name: list files + run: ls -R #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json From 7e82c96f1412634d6c25c21b8b05842e67a87339 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 08:26:33 +0100 Subject: [PATCH 20/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 09ea6d1..6892a44 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -12,6 +12,10 @@ jobs: uses: actions/checkout@v2 - name: list files run: ls -R + - name: validate-json-file + uses: cardinalby/schema-validator-action@v3 + with: + file: ./scicat-schema/scicat.dataset-derived.schema.json #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json From 99f47c0edad2c06afb1a9f88a34da0787ed4eea5 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 08:27:44 +0100 Subject: [PATCH 21/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 6892a44..e536ce9 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -15,7 +15,7 @@ jobs: - name: validate-json-file uses: cardinalby/schema-validator-action@v3 with: - file: ./scicat-schema/scicat.dataset-derived.schema.json + file: ./scicat-schema/*.json #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json From 56eec7c08037f6c440e692e08e8a0ff09da12fbd Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 08:33:52 +0100 Subject: [PATCH 22/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index e536ce9..9fe1601 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -15,7 +15,7 @@ jobs: - name: validate-json-file uses: cardinalby/schema-validator-action@v3 with: - file: ./scicat-schema/*.json + file: './scicat-schema/*.json' #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json From 4400b7dbfd3848a0e362856ddc81adc3f8cd2f18 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 09:44:06 +0100 Subject: [PATCH 23/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 9fe1601..e550ef3 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -15,7 +15,9 @@ jobs: - name: validate-json-file uses: cardinalby/schema-validator-action@v3 with: - file: './scicat-schema/*.json' + file: | + find -name "*.json" -type f > jsonfile.txt + cat jsonfile.txt #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json From 9a4bf2154fd97cd63e4c87f571e6af9666d1a1af Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 09:47:12 +0100 Subject: [PATCH 24/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index e550ef3..4052c94 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -12,12 +12,15 @@ jobs: uses: actions/checkout@v2 - name: list files run: ls -R - - name: validate-json-file - uses: cardinalby/schema-validator-action@v3 - with: - file: | - find -name "*.json" -type f > jsonfile.txt - cat jsonfile.txt + - name: find json files + run: | + find -name '*.json' -type -f > jsonfiles.json + cat jsonfiles.json + # - name: validate-json-file + # uses: cardinalby/schema-validator-action@v3 + # with: + # file: | + # find -name '*.json' -type f #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json From 738866791b4197bff979655439ecc0eac7f5de38 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 09:48:24 +0100 Subject: [PATCH 25/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 4052c94..5b72a94 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -14,7 +14,7 @@ jobs: run: ls -R - name: find json files run: | - find -name '*.json' -type -f > jsonfiles.json + find -name "*.json" -type f > jsonfiles.json cat jsonfiles.json # - name: validate-json-file # uses: cardinalby/schema-validator-action@v3 From 920f8d0c3d51f47de171b817a3b92b75a03e1ade Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 09:54:00 +0100 Subject: [PATCH 26/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 5b72a94..8a0f8b1 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -15,12 +15,10 @@ jobs: - name: find json files run: | find -name "*.json" -type f > jsonfiles.json - cat jsonfiles.json - # - name: validate-json-file - # uses: cardinalby/schema-validator-action@v3 - # with: - # file: | - # find -name '*.json' -type f + - name: validate-json-file + uses: cardinalby/schema-validator-action@v3 + with: + file: $(cat jsonfiles.json) #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json From 205fa21748fb8a93db7485b8482e9e25d70dc360 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 09:56:41 +0100 Subject: [PATCH 27/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 8a0f8b1..ca6dd75 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -14,11 +14,11 @@ jobs: run: ls -R - name: find json files run: | - find -name "*.json" -type f > jsonfiles.json + find -name "*.json" -type f > jsonfiles.txt - name: validate-json-file uses: cardinalby/schema-validator-action@v3 with: - file: $(cat jsonfiles.json) + file: $(cat jsonfiles.txt) #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json From f36dbc48cd193c85f35b175196c7cd5e651bfa3d Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 10:48:12 +0100 Subject: [PATCH 28/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index ca6dd75..06a61f9 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -16,9 +16,11 @@ jobs: run: | find -name "*.json" -type f > jsonfiles.txt - name: validate-json-file - uses: cardinalby/schema-validator-action@v3 - with: - file: $(cat jsonfiles.txt) + run: | + for file in $(cat jsonfiles.txt); do + npx cardinalby/schema-validator-action@v3 --file $file + done + #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json From ed9a63c15e086903347980a826a21191258686ce Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 10:50:36 +0100 Subject: [PATCH 29/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 06a61f9..df95121 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -18,7 +18,7 @@ jobs: - name: validate-json-file run: | for file in $(cat jsonfiles.txt); do - npx cardinalby/schema-validator-action@v3 --file $file + npx cardinalby/schema-validator-action@v3 --file="$file" done From ea502b4c31578d82c2c5f56304194800ba6e22ac Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 10:57:43 +0100 Subject: [PATCH 30/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index df95121..59f4f39 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -18,7 +18,7 @@ jobs: - name: validate-json-file run: | for file in $(cat jsonfiles.txt); do - npx cardinalby/schema-validator-action@v3 --file="$file" + npx cardinalby/schema-validator-action --file="$file" done From a5d65df221e42e47242f525100e02ad295d150fb Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 10:59:45 +0100 Subject: [PATCH 31/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 59f4f39..c7245f7 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -18,7 +18,7 @@ jobs: - name: validate-json-file run: | for file in $(cat jsonfiles.txt); do - npx cardinalby/schema-validator-action --file="$file" + npx cardinalby/schema-validator-action done From df2ffe25260690520aa9132a191106daceb48215 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:01:17 +0100 Subject: [PATCH 32/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index c7245f7..59885a9 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -18,7 +18,7 @@ jobs: - name: validate-json-file run: | for file in $(cat jsonfiles.txt); do - npx cardinalby/schema-validator-action + npx cardinalby/schema-validator-action --file $file done From 96fe6c5f7e92b333dae952fe44966b762f0a5680 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:07:46 +0100 Subject: [PATCH 33/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 59885a9..d20513d 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -18,7 +18,7 @@ jobs: - name: validate-json-file run: | for file in $(cat jsonfiles.txt); do - npx cardinalby/schema-validator-action --file $file + npx https://github.com/cardinalby/schema-validator-action --file $file done From 354ad494b3c576bc47957f89184c0b107106c642 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:15:25 +0100 Subject: [PATCH 34/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index d20513d..2e3e51d 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -16,10 +16,9 @@ jobs: run: | find -name "*.json" -type f > jsonfiles.txt - name: validate-json-file - run: | - for file in $(cat jsonfiles.txt); do - npx https://github.com/cardinalby/schema-validator-action --file $file - done + uses: cardinalby/schema-validator-action@v3 + with: + file: './scicat-schema/*.json$' #./ukaea-schema/diagnostics/*.json From d3d4e643dff0010e767ae05ce6ec5a514bd41bfa Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:20:01 +0100 Subject: [PATCH 35/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 2e3e51d..c03f774 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -18,7 +18,7 @@ jobs: - name: validate-json-file uses: cardinalby/schema-validator-action@v3 with: - file: './scicat-schema/*.json$' + file: './scicat-schema/*.*.*.json$' #./ukaea-schema/diagnostics/*.json From a54f726d6052bf65e2170b8148b2e2f675a79600 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:20:44 +0100 Subject: [PATCH 36/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index c03f774..f1f52a3 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -18,7 +18,7 @@ jobs: - name: validate-json-file uses: cardinalby/schema-validator-action@v3 with: - file: './scicat-schema/*.*.*.json$' + file: './scicat-schema/*.*.*.json' #./ukaea-schema/diagnostics/*.json From cd7f25a7c346cea6283a36e599396a6ca99a6421 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:22:36 +0100 Subject: [PATCH 37/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index f1f52a3..31c90e8 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -18,7 +18,9 @@ jobs: - name: validate-json-file uses: cardinalby/schema-validator-action@v3 with: - file: './scicat-schema/*.*.*.json' + file: | + './scicat-schema/*.*.*.json' + './scicat-schema/*.*.json' #./ukaea-schema/diagnostics/*.json From 7e391bcc65c8bebfa4fbd67cecb2539b81423396 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:23:45 +0100 Subject: [PATCH 38/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 31c90e8..68f51bc 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -19,8 +19,8 @@ jobs: uses: cardinalby/schema-validator-action@v3 with: file: | - './scicat-schema/*.*.*.json' - './scicat-schema/*.*.json' + ./scicat-schema/*.*.*.json + ./scicat-schema/*.*.json #./ukaea-schema/diagnostics/*.json From 116214802c442c0b0e12607f08e6bd51a1ad50de Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:27:16 +0100 Subject: [PATCH 39/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 68f51bc..ac36dbc 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -20,7 +20,6 @@ jobs: with: file: | ./scicat-schema/*.*.*.json - ./scicat-schema/*.*.json #./ukaea-schema/diagnostics/*.json From b76c25f662b16565d821b9f37b30d315fd49a99e Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:29:13 +0100 Subject: [PATCH 40/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index ac36dbc..41e883b 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -20,6 +20,7 @@ jobs: with: file: | ./scicat-schema/*.*.*.json + ./ukaea-schema/*.*.json #./ukaea-schema/diagnostics/*.json From 044f55d2150abcc80cac94b7bf62677dca81c2c2 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:30:25 +0100 Subject: [PATCH 41/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 41e883b..4739243 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -19,8 +19,8 @@ jobs: uses: cardinalby/schema-validator-action@v3 with: file: | - ./scicat-schema/*.*.*.json - ./ukaea-schema/*.*.json + "./scicat-schema/*.*.*.json & \ + ./ukaea-schema/*.*.json" #./ukaea-schema/diagnostics/*.json From a4ca89cab6c94061830bd59b009d88bc5c71e558 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:31:25 +0100 Subject: [PATCH 42/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 4739243..f333eeb 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -18,9 +18,7 @@ jobs: - name: validate-json-file uses: cardinalby/schema-validator-action@v3 with: - file: | - "./scicat-schema/*.*.*.json & \ - ./ukaea-schema/*.*.json" + file: "./scicat-schema/*.*.*.json" #./ukaea-schema/diagnostics/*.json From 74b69650cac0e966fe495ea1b5b1e26724e0b23e Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:32:38 +0100 Subject: [PATCH 43/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index f333eeb..11d251a 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -18,7 +18,7 @@ jobs: - name: validate-json-file uses: cardinalby/schema-validator-action@v3 with: - file: "./scicat-schema/*.*.*.json" + file: "./scicat-schema/*.*.*.json | ./scicat-schema/*.*.json" #./ukaea-schema/diagnostics/*.json From 2621b851ca9d9ac198cac337b2421fee2166af38 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:33:27 +0100 Subject: [PATCH 44/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 11d251a..395eaa0 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -18,7 +18,7 @@ jobs: - name: validate-json-file uses: cardinalby/schema-validator-action@v3 with: - file: "./scicat-schema/*.*.*.json | ./scicat-schema/*.*.json" + file: ./scicat-schema/*.*.*.json | ./scicat-schema/*.*.json #./ukaea-schema/diagnostics/*.json From 8486500b71ad5bff22b06a8f1fe01293ed8168cb Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:39:44 +0100 Subject: [PATCH 45/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 395eaa0..f64a4aa 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -18,7 +18,7 @@ jobs: - name: validate-json-file uses: cardinalby/schema-validator-action@v3 with: - file: ./scicat-schema/*.*.*.json | ./scicat-schema/*.*.json + file: './scicat-schema/*.*.*.json|./scicat-schema/*.*.json' #./ukaea-schema/diagnostics/*.json From 44e26afab8fabc4f501bb015c068b23aae1c52db Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:46:45 +0100 Subject: [PATCH 46/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 67 +++++++++++++++++++++-- 1 file changed, 62 insertions(+), 5 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index f64a4aa..2ef9137 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -12,15 +12,72 @@ jobs: uses: actions/checkout@v2 - name: list files run: ls -R - - name: find json files - run: | - find -name "*.json" -type f > jsonfiles.txt - name: validate-json-file uses: cardinalby/schema-validator-action@v3 with: - file: './scicat-schema/*.*.*.json|./scicat-schema/*.*.json' + file: './scicat-schema/**/*.json|./ukaea-schema/**/*.json' - + + +# ./scicat-schema: +# scicat.dataset-derived.schema.json +# scicat.dataset-raw.schema.json +# scicat.dataset.schema.json +# scicat.sample.schema.json +# toplevel.schema.json + +# ./ukaea-schema: +# diagnostics +# examples +# facility +# simulation +# ukaea.schema.json + +# ./ukaea-schema/diagnostics: +# camera.schema.json +# dic.schema.json +# tc.schema.json + +# ./ukaea-schema/examples: +# facility.json +# hive + +# ./ukaea-schema/examples/hive: +# campaign.json +# experiment.json + +# ./ukaea-schema/facility: +# facility.schema.json +# hive + +# ./ukaea-schema/facility/hive: +# campaign.schema.json +# diagnostic.schema.json +# experiment.schema.json +# port.schema.json +# pulse.schema.json +# scicat-mappings.json + +# ./ukaea-schema/simulation: +# pegasus +# ukaea-simulation.schema.json + +# ./ukaea-schema/simulation/pegasus: +# ansys_mechanical +# pegasus.schema.json + +# ./ukaea-schema/simulation/pegasus/ansys_mechanical: +# ansys_mechanical.schema.json + +# ./validation: +# README.md +# examples +# requirements.txt +# scripts + +# ./validation/examples: +# test.json + #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json # ./ukaea-schema/examples/*.json From 005684a2206c85072aafb18cd1104bb74a683178 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:53:01 +0100 Subject: [PATCH 47/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 2ef9137..9b5c29d 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -15,7 +15,9 @@ jobs: - name: validate-json-file uses: cardinalby/schema-validator-action@v3 with: - file: './scicat-schema/**/*.json|./ukaea-schema/**/*.json' + file: | + ./scicat-schema/**/*.json|./ukaea-schema/**/*.json + |./validation/**/*.json" From 05aac1cbc46a56e99f0e2daf93a097db97da9b87 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:54:18 +0100 Subject: [PATCH 48/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 9b5c29d..24a20b9 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -16,8 +16,8 @@ jobs: uses: cardinalby/schema-validator-action@v3 with: file: | - ./scicat-schema/**/*.json|./ukaea-schema/**/*.json - |./validation/**/*.json" + ./validation/**/*.json|./ukaea-schema/**/*.json + |./scicat-schema/**/*.json From 34314787af2b041f571fad98fe701ab97316ac0d Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:55:55 +0100 Subject: [PATCH 49/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 24a20b9..43dcd9d 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -16,8 +16,9 @@ jobs: uses: cardinalby/schema-validator-action@v3 with: file: | - ./validation/**/*.json|./ukaea-schema/**/*.json - |./scicat-schema/**/*.json + ./validation/**/*.json + ./ukaea-schema/**/*.json + ./scicat-schema/**/*.json From 10ce7e374709aaed4f4c9d056d5d171de19f26cd Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:56:53 +0100 Subject: [PATCH 50/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 43dcd9d..8c13c46 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -15,10 +15,7 @@ jobs: - name: validate-json-file uses: cardinalby/schema-validator-action@v3 with: - file: | - ./validation/**/*.json - ./ukaea-schema/**/*.json - ./scicat-schema/**/*.json + file: ./validation/**/*.json|./ukaea-schema/**/*.json|./scicat-schema/**/*.json From 992c94ba7130f12e45960d40db91c2d17aea70a7 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 12:00:38 +0100 Subject: [PATCH 51/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 8c13c46..6138850 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -15,7 +15,7 @@ jobs: - name: validate-json-file uses: cardinalby/schema-validator-action@v3 with: - file: ./validation/**/*.json|./ukaea-schema/**/*.json|./scicat-schema/**/*.json + file: ./**/*.json From a0f851ce3debe1146fe6897eb085c57137268bfd Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 12:10:03 +0100 Subject: [PATCH 52/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 6138850..7de855b 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -8,14 +8,21 @@ jobs: validate-json: runs-on: ubuntu-latest steps: - - name: checkout codes - uses: actions/checkout@v2 - - name: list files - run: ls -R - - name: validate-json-file - uses: cardinalby/schema-validator-action@v3 - with: - file: ./**/*.json + - uses: actions/checkout@v4 + - name: validate-json-files + id: json-validate + uses: GrantBirki/json-yaml-validate@v3 + + # - name: checkout codes + # uses: actions/checkout@v2 + + + + # run: ls -R + # - name: validate-json-file + # uses: cardinalby/schema-validator-action@v3 + # with: + # file: ./**/*.json From cd346fe7f81829625a2247386bc26dfd5069c52e Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 12:22:35 +0100 Subject: [PATCH 53/96] fix: change json file validator package --- .github/workflows/medata-ci-workflows.yml | 73 ++++++++++++++++++++++- 1 file changed, 71 insertions(+), 2 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index eb541d3..f4faa74 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -3,15 +3,19 @@ on: push: branches: - main + pull_request: + branches: + - main + jobs: validate-json: runs-on: ubuntu-latest steps: - name: valid-json-files - uses: cardinalby/schema-validator-action@v3 + run: with: - file: scicat-schema/*.json + file: $(find -name '*.json' -type f) #./ukaea-schema/diagnostics/*.json # ./ukaea-schema/examples/hive/*.json # ./ukaea-schema/examples/*.json @@ -47,3 +51,68 @@ jobs: # "./ukaea-schema/facility/*.json" "./ukaea-schema/pegasus/ansys_mechanical/*.json" \ # "./ukaea-schema/pegasus/*.json" "./ukaea-schema/*.json" + + + +./scicat-schema: +scicat.dataset-derived.schema.json +scicat.dataset-raw.schema.json +scicat.dataset.schema.json +scicat.sample.schema.json +toplevel.schema.json + +./ukaea-schema: +diagnostics +examples +facility +simulation +ukaea.schema.json + +./ukaea-schema/diagnostics: +camera.schema.json +dic.schema.json +tc.schema.json + +./ukaea-schema/examples: +facility.json +hive + +./ukaea-schema/examples/hive: +campaign.json +experiment.json + +./ukaea-schema/facility: +facility.schema.json +hive + +./ukaea-schema/facility/hive: +campaign.schema.json +diagnostic.schema.json +experiment.schema.json +port.schema.json +pulse.schema.json +scicat-mappings.json + +./ukaea-schema/simulation: +pegasus +ukaea-simulation.schema.json + +./ukaea-schema/simulation/pegasus: +ansys_mechanical +pegasus.schema.json + +./ukaea-schema/simulation/pegasus/ansys_mechanical: +ansys_mechanical.schema.json + +./validation: +README.md +examples +requirements.txt +scripts + +./validation/examples: +test.json + +./validation/scripts: +scicat_validate.py +test_validation.py \ No newline at end of file From ab56308dc1a1361836859389898afbf3d3f56bb1 Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 12:22:35 +0100 Subject: [PATCH 54/96] fix: change json file validator package --- .github/workflows/medata-ci-workflows.yml | 130 ++++++---------------- 1 file changed, 31 insertions(+), 99 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index f4faa74..f973cf4 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -12,107 +12,39 @@ jobs: validate-json: runs-on: ubuntu-latest steps: - - name: valid-json-files - run: + - uses: actions/checkout@v4 + - name: validate-json-files + id: json-validate + uses: GrantBirki/json-yaml-validate@v3 with: - file: $(find -name '*.json' -type f) - #./ukaea-schema/diagnostics/*.json - # ./ukaea-schema/examples/hive/*.json - # ./ukaea-schema/examples/*.json - # ./ukaea-schema/facility/hive/*.json - # ./ukaea-schema/facility/*.json - # ./ukaea-schema/pegasus/ansys_mechanical/*.json - # ./ukaea-schema/pegasus/*.json - # ./ukaea-schema/*.json - - # - name: Validate campaign JSON - # uses: cardinalby/schema-validator-action@v3 - # with: - # file: ./ukaea-schema/examples/hive/campaign.json - # schema: ./ukaea-schema/facility/hive/campaign.schema.json - # - name: Validate experiment JSON - # uses: cardinalby/schema-validator-action@v3 - # with: - # file: ./ukaea-schema/examples/hive/experiment.json - # schema: ./ukaea-schema/facility/hive/experiment.schema.json - # - name: Validate facility JSON - # uses: cardinalby/schema-validator-action@v3 - # with: - # file: ./ukaea-schema/examples/facility.json - # schema: ./ukaea-schema/facility/facility.schema.json - # - name: Set up Python - # uses: actions/setup-python@v4 - # with: - # python-version: '3.11' - # - name: custom-camel-case-validation - # run: | - # python validate_camel_case.py "./scicat-schema/*.json" "./ukaea-schema/diagnostics/*.json" \ - # "./ukaea-schema/examples/hive/*.json" "./ukaea-schema/examples/*.json" "./ukaea-schema/facility/hive/*.json" \ - # "./ukaea-schema/facility/*.json" "./ukaea-schema/pegasus/ansys_mechanical/*.json" \ - # "./ukaea-schema/pegasus/*.json" "./ukaea-schema/*.json" - - - - -./scicat-schema: -scicat.dataset-derived.schema.json -scicat.dataset-raw.schema.json -scicat.dataset.schema.json -scicat.sample.schema.json -toplevel.schema.json - -./ukaea-schema: -diagnostics -examples -facility -simulation -ukaea.schema.json - -./ukaea-schema/diagnostics: -camera.schema.json -dic.schema.json -tc.schema.json - -./ukaea-schema/examples: -facility.json -hive - -./ukaea-schema/examples/hive: -campaign.json -experiment.json - -./ukaea-schema/facility: -facility.schema.json -hive - -./ukaea-schema/facility/hive: -campaign.schema.json -diagnostic.schema.json -experiment.schema.json -port.schema.json -pulse.schema.json -scicat-mappings.json - -./ukaea-schema/simulation: -pegasus -ukaea-simulation.schema.json - -./ukaea-schema/simulation/pegasus: -ansys_mechanical -pegasus.schema.json + comment: "true" + + - name: Validate campaign JSON + uses: GrantBirki/json-yaml-validate@v3 + with: + json_schema: ./ukaea-schema/facility/hive/campaign.schema.json + files: ./ukaea-schema/examples/hive/campaign.json + comment: "true" + - name: Validate experiment JSON + uses: GrantBirki/json-yaml-validate@v3 + with: + json_schema: ./ukaea-schema/facility/hive/experiment.schema.json + files: ./ukaea-schema/examples/hive/experiment.json + comment: "true" -./ukaea-schema/simulation/pegasus/ansys_mechanical: -ansys_mechanical.schema.json + - name: Validate facility JSON + uses: GrantBirki/json-yaml-validate@v3 + with: + json_schema: ./ukaea-schema/facility/facility.schema.json + files: ./ukaea-schema/examples/facility.json + comment: "true" + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: custom-camel-case-validation + run: | + python validate_camel_case.py "./**/*.json" -./validation: -README.md -examples -requirements.txt -scripts -./validation/examples: -test.json -./validation/scripts: -scicat_validate.py -test_validation.py \ No newline at end of file From 29a8eb4181b1ac06fe4eee36b80fac4486b3aa99 Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 12:22:35 +0100 Subject: [PATCH 55/96] fix: change json file validator package --- .github/workflows/medata-ci-workflows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index a2a17d6..ddf63aa 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -30,3 +30,4 @@ jobs: +#good From 500c7359ef881809420207015f5838db4e1d69f7 Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 12:45:31 +0100 Subject: [PATCH 56/96] fix: errors --- .github/workflows/medata-ci-workflows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index ddf63aa..e3ac6db 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -31,3 +31,4 @@ jobs: #good +#job \ No newline at end of file From af150a148a7fc5b1570cd7b4915d6d374ee41ae2 Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 12:54:02 +0100 Subject: [PATCH 57/96] Revert "fix: change json file validator package" This reverts commit 29a8eb4181b1ac06fe4eee36b80fac4486b3aa99. --- .github/workflows/medata-ci-workflows.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index e3ac6db..740fa03 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -30,5 +30,4 @@ jobs: -#good #job \ No newline at end of file From 7ddb5b7c33b2657ba03721ff23cf3a4fab0d567f Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 12:55:56 +0100 Subject: [PATCH 58/96] fix: remote pull --- .github/workflows/medata-ci-workflows.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 740fa03..cfab047 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -30,4 +30,7 @@ jobs: -#job \ No newline at end of file +<<<<<<< HEAD +#job +======= +>>>>>>> parent of 29a8eb4 (fix: change json file validator package) From 1223941263d2ead7d3bed9cd50c50be6f27d52bc Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 14:48:06 +0100 Subject: [PATCH 59/96] feat: add new json validator package --- .github/workflows/medata-ci-workflows.yml | 60 +++++++++++------------ 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index cfab047..3f7345f 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -1,36 +1,32 @@ -name: Metadata CI Workflow -on: - push: - branches: - - main - pull_request: - branches: - - main - - -jobs: - validate-json: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - name: validate-json-files id: json-validate uses: GrantBirki/json-yaml-validate@v3 - - # - name: checkout codes - # uses: actions/checkout@v2 - - - - # run: ls -R - # - name: validate-json-file - # uses: cardinalby/schema-validator-action@v3 - # with: - # file: ./**/*.json - - + with: + comment: "true" + + - name: Validate campaign JSON + uses: GrantBirki/json-yaml-validate@v3 + with: + json_schema: ./ukaea-schema/facility/hive/campaign.schema.json + files: ./ukaea-schema/examples/hive/campaign.json + comment: "true" + - name: Validate experiment JSON + uses: GrantBirki/json-yaml-validate@v3 + with: + json_schema: ./ukaea-schema/facility/hive/experiment.schema.json + files: ./ukaea-schema/examples/hive/experiment.json + comment: "true" -<<<<<<< HEAD -#job -======= ->>>>>>> parent of 29a8eb4 (fix: change json file validator package) + - name: Validate facility JSON + uses: GrantBirki/json-yaml-validate@v3 + with: + json_schema: ./ukaea-schema/facility/facility.schema.json + files: ./ukaea-schema/examples/facility.json + comment: "true" + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: custom-camel-case-validation + run: | + python validate_camel_case.py "./**/*.json" \ No newline at end of file From 7bf2c5f6918fde393de9163bf6fc4b6fbeebbe81 Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 14:54:39 +0100 Subject: [PATCH 60/96] fix: Error in worlflow file --- .github/workflows/medata-ci-workflows.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 3f7345f..dcde877 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -1,3 +1,18 @@ +name: Metadata CI Workflow +on: + push: + branches: + - main + pull_request: + branches: + - main + + +jobs: + validate-json: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 - name: validate-json-files id: json-validate uses: GrantBirki/json-yaml-validate@v3 From 97dec28b8df9cfd22ebcda5ad837af0487f06f44 Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 14:59:05 +0100 Subject: [PATCH 61/96] fix: sample.schema.json validation error --- scicat-schema/scicat.sample.schema.json | 1 + 1 file changed, 1 insertion(+) diff --git a/scicat-schema/scicat.sample.schema.json b/scicat-schema/scicat.sample.schema.json index e69de29..9082d25 100644 --- a/scicat-schema/scicat.sample.schema.json +++ b/scicat-schema/scicat.sample.schema.json @@ -0,0 +1 @@ +{"key": "value"} \ No newline at end of file From 2a3f28b52be0e87d9fb49cae607817deacc0e1a3 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 15:15:13 +0100 Subject: [PATCH 62/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index dcde877..420e49d 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -22,7 +22,7 @@ jobs: - name: Validate campaign JSON uses: GrantBirki/json-yaml-validate@v3 with: - json_schema: ./ukaea-schema/facility/hive/campaign.schema.json + json_schema: ukaea-schema/facility/hive/campaign.schema.json files: ./ukaea-schema/examples/hive/campaign.json comment: "true" - name: Validate experiment JSON @@ -44,4 +44,4 @@ jobs: python-version: '3.11' - name: custom-camel-case-validation run: | - python validate_camel_case.py "./**/*.json" \ No newline at end of file + python validate_camel_case.py "./**/*.json" From 3c93cded82a9ad959581564ee33fb1900a370715 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 15:19:52 +0100 Subject: [PATCH 63/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 34 +++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 420e49d..fc00f09 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -26,22 +26,22 @@ jobs: files: ./ukaea-schema/examples/hive/campaign.json comment: "true" - name: Validate experiment JSON - uses: GrantBirki/json-yaml-validate@v3 + uses: cardinalby/schema-validator-action@v3 with: - json_schema: ./ukaea-schema/facility/hive/experiment.schema.json - files: ./ukaea-schema/examples/hive/experiment.json - comment: "true" + schema: ./ukaea-schema/facility/hive/experiment.schema.json + file: ./ukaea-schema/examples/hive/experiment.json + # comment: "true" - - name: Validate facility JSON - uses: GrantBirki/json-yaml-validate@v3 - with: - json_schema: ./ukaea-schema/facility/facility.schema.json - files: ./ukaea-schema/examples/facility.json - comment: "true" - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - name: custom-camel-case-validation - run: | - python validate_camel_case.py "./**/*.json" + # - name: Validate facility JSON + # uses: GrantBirki/json-yaml-validate@v3 + # with: + # json_schema: ./ukaea-schema/facility/facility.schema.json + # files: ./ukaea-schema/examples/facility.json + # comment: "true" + # - name: Set up Python + # uses: actions/setup-python@v4 + # with: + # python-version: '3.11' + # - name: custom-camel-case-validation + # run: | + # python validate_camel_case.py "./**/*.json" From 4f19e5206fba099d6352878ea6ff37cd1e49e7a5 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 15:24:34 +0100 Subject: [PATCH 64/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index fc00f09..174b21c 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -26,11 +26,11 @@ jobs: files: ./ukaea-schema/examples/hive/campaign.json comment: "true" - name: Validate experiment JSON - uses: cardinalby/schema-validator-action@v3 + uses: cardinalby/schema-validator-action@v8 with: - schema: ./ukaea-schema/facility/hive/experiment.schema.json - file: ./ukaea-schema/examples/hive/experiment.json - # comment: "true" + json_schema: ./ukaea-schema/facility/hive/campaign.schema.json + files: ./ukaea-schema/examples/hive/campaign.json + comment: "true" # - name: Validate facility JSON # uses: GrantBirki/json-yaml-validate@v3 From ae9eeff4922083ab17f196e5dc0846c481351974 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 15:25:34 +0100 Subject: [PATCH 65/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 174b21c..df46a9b 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -26,7 +26,7 @@ jobs: files: ./ukaea-schema/examples/hive/campaign.json comment: "true" - name: Validate experiment JSON - uses: cardinalby/schema-validator-action@v8 + uses: cardinalby/schema-validator-action@v4 with: json_schema: ./ukaea-schema/facility/hive/campaign.schema.json files: ./ukaea-schema/examples/hive/campaign.json From 1ec388fec278da64502943499ffd40b21adf940e Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 15:27:09 +0100 Subject: [PATCH 66/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index df46a9b..86f4842 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -26,7 +26,7 @@ jobs: files: ./ukaea-schema/examples/hive/campaign.json comment: "true" - name: Validate experiment JSON - uses: cardinalby/schema-validator-action@v4 + uses: cardinalby/schema-validator-action@v3.2.1 with: json_schema: ./ukaea-schema/facility/hive/campaign.schema.json files: ./ukaea-schema/examples/hive/campaign.json From 4a6819f07fff20b4d808fa4cf4b4d1d8b8bf0eb2 Mon Sep 17 00:00:00 2001 From: Khalid Lawal Abiola <81440160+khalsz@users.noreply.github.com> Date: Thu, 19 Sep 2024 15:31:08 +0100 Subject: [PATCH 67/96] Update medata-ci-workflows.yml --- .github/workflows/medata-ci-workflows.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 86f4842..097c2a8 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -20,17 +20,17 @@ jobs: comment: "true" - name: Validate campaign JSON - uses: GrantBirki/json-yaml-validate@v3 - with: - json_schema: ukaea-schema/facility/hive/campaign.schema.json - files: ./ukaea-schema/examples/hive/campaign.json - comment: "true" - - name: Validate experiment JSON - uses: cardinalby/schema-validator-action@v3.2.1 + uses: cardinalby/schema-validator-action@v3 with: - json_schema: ./ukaea-schema/facility/hive/campaign.schema.json - files: ./ukaea-schema/examples/hive/campaign.json - comment: "true" + schema: ukaea-schema/facility/hive/campaign.schema.json + file: ./ukaea-schema/examples/hive/campaign.json + # comment: "true" + # - name: Validate experiment JSON + # uses: cardinalby/schema-validator-action@v3.2.1 + # with: + # json_schema: ./ukaea-schema/facility/hive/campaign.schema.json + # files: ./ukaea-schema/examples/hive/campaign.json + # comment: "true" # - name: Validate facility JSON # uses: GrantBirki/json-yaml-validate@v3 From 4601e7c7386023837bb28b7a47a13bb076273743 Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 15:40:05 +0100 Subject: [PATCH 68/96] Pull: from remote main to use cardinality validator --- .github/workflows/medata-ci-workflows.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 097c2a8..ffa531f 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -24,7 +24,6 @@ jobs: with: schema: ukaea-schema/facility/hive/campaign.schema.json file: ./ukaea-schema/examples/hive/campaign.json - # comment: "true" # - name: Validate experiment JSON # uses: cardinalby/schema-validator-action@v3.2.1 # with: From 4e619f6a310f5fce880ef70c0c708012d9f4e361 Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 15:41:50 +0100 Subject: [PATCH 69/96] fix: changed schema-based validator package to cardinalby --- .github/workflows/medata-ci-workflows.yml | 36 +++++++++++------------ 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index ffa531f..0a4e8d5 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -24,23 +24,21 @@ jobs: with: schema: ukaea-schema/facility/hive/campaign.schema.json file: ./ukaea-schema/examples/hive/campaign.json - # - name: Validate experiment JSON - # uses: cardinalby/schema-validator-action@v3.2.1 - # with: - # json_schema: ./ukaea-schema/facility/hive/campaign.schema.json - # files: ./ukaea-schema/examples/hive/campaign.json - # comment: "true" + - name: Validate experiment JSON + uses: cardinalby/schema-validator-action@v3 + with: + schema: ./ukaea-schema/facility/hive/campaign.schema.json + file: ./ukaea-schema/examples/hive/campaign.json - # - name: Validate facility JSON - # uses: GrantBirki/json-yaml-validate@v3 - # with: - # json_schema: ./ukaea-schema/facility/facility.schema.json - # files: ./ukaea-schema/examples/facility.json - # comment: "true" - # - name: Set up Python - # uses: actions/setup-python@v4 - # with: - # python-version: '3.11' - # - name: custom-camel-case-validation - # run: | - # python validate_camel_case.py "./**/*.json" + - name: Validate facility JSON + uses: cardinalby/schema-validator-action@v3 + with: + schema: ./ukaea-schema/facility/facility.schema.json + file: ./ukaea-schema/examples/facility.json + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: custom-camel-case-validation + run: | + python validate_camel_case.py "./**/*.json" From ecdca5a3121a2b7d5fd4c5c7f242650e8e92f0ac Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 15:48:30 +0100 Subject: [PATCH 70/96] fix: faclity json has wrong facility-id value --- .github/workflows/medata-ci-workflows.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 0a4e8d5..f119540 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -30,11 +30,11 @@ jobs: schema: ./ukaea-schema/facility/hive/campaign.schema.json file: ./ukaea-schema/examples/hive/campaign.json - - name: Validate facility JSON - uses: cardinalby/schema-validator-action@v3 - with: - schema: ./ukaea-schema/facility/facility.schema.json - file: ./ukaea-schema/examples/facility.json + # - name: Validate facility JSON + # uses: cardinalby/schema-validator-action@v3 + # with: + # schema: ./ukaea-schema/facility/facility.schema.json + # file: ./ukaea-schema/examples/facility.json - name: Set up Python uses: actions/setup-python@v4 with: From dc340655f736a9e102542d54b08cef23a250bba5 Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 15:50:55 +0100 Subject: [PATCH 71/96] fix: error in custom validation python file --- validate_camel_case.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/validate_camel_case.py b/validate_camel_case.py index 6e53c37..731215f 100644 --- a/validate_camel_case.py +++ b/validate_camel_case.py @@ -11,7 +11,7 @@ def match_camel_case(s): def validate_camel_case(data): # validate camelCase in json key - for key, value in data: + for key, value in data.items(): if not match_camel_case(key): return False, f"Invalid key format (not CamelCase): {key}" @@ -38,11 +38,11 @@ def val_json_file(json_file_paths): # append result of invalid json file invalid_result.append(f"Error in file {json_file}, Invalid JSON format {e}") - # return + # return invalid_result list if any file is invalid or contains non-camelCase if len(invalid_result) > 0: return "\n".join(invalid_result) else: - return True + return "All files are valid" @@ -50,9 +50,9 @@ def val_json_file(json_file_paths): if __name__ == "__main__": parser = argparse.ArgumentParser(description="all json files in the repository") - parser.add_argument("json_file_paths", type="str", required=True, + parser.add_argument("json_file_paths", type=str, help="pass the paths to all json files in the repository") - arg = parser.parse_args + arg = parser.parse_args() validation_result = val_json_file(arg.json_file_paths) print(validation_result) \ No newline at end of file From b5b06e2fe8f68fed89eb931ab838902df19ab72c Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 16:00:43 +0100 Subject: [PATCH 72/96] fix: file path error in custom validation python file --- validate_camel_case.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/validate_camel_case.py b/validate_camel_case.py index 731215f..c5aae83 100644 --- a/validate_camel_case.py +++ b/validate_camel_case.py @@ -26,17 +26,17 @@ def validate_camel_case(data): def val_json_file(json_file_paths): # initialize empty list to store error result for invalid json file validation invalid_result = [] - for json_file in json_file_paths: - try: - with open(json_file, 'r') as jf: - data = json.load(jf) - is_valid, message = validate_camel_case(data) - if not is_valid: - # append result of json file with non cameCase keys - invalid_result.append(f"{json_file} - {message}") - except json.JSONDecodeError as e: - # append result of invalid json file - invalid_result.append(f"Error in file {json_file}, Invalid JSON format {e}") + # for json_file in json_file_paths: + try: + with open(json_file_paths, 'r') as jf: + data = json.load(jf) + is_valid, message = validate_camel_case(data) + if not is_valid: + # append result of json file with non cameCase keys + invalid_result.append(f"{json_file_paths} - {message}") + except json.JSONDecodeError as e: + # append result of invalid json file + invalid_result.append(f"Error in file {json_file_paths}, Invalid JSON format {e}") # return invalid_result list if any file is invalid or contains non-camelCase if len(invalid_result) > 0: From 361397032f75ef70e4c0f364579db026eaf9264b Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 16:04:01 +0100 Subject: [PATCH 73/96] Revert "fix: error in custom validation python file" This reverts commit dc340655f736a9e102542d54b08cef23a250bba5. --- validate_camel_case.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/validate_camel_case.py b/validate_camel_case.py index c5aae83..5ebd0c1 100644 --- a/validate_camel_case.py +++ b/validate_camel_case.py @@ -11,7 +11,7 @@ def match_camel_case(s): def validate_camel_case(data): # validate camelCase in json key - for key, value in data.items(): + for key, value in data: if not match_camel_case(key): return False, f"Invalid key format (not CamelCase): {key}" @@ -38,11 +38,11 @@ def val_json_file(json_file_paths): # append result of invalid json file invalid_result.append(f"Error in file {json_file_paths}, Invalid JSON format {e}") - # return invalid_result list if any file is invalid or contains non-camelCase + # return if len(invalid_result) > 0: return "\n".join(invalid_result) else: - return "All files are valid" + return True @@ -50,9 +50,9 @@ def val_json_file(json_file_paths): if __name__ == "__main__": parser = argparse.ArgumentParser(description="all json files in the repository") - parser.add_argument("json_file_paths", type=str, + parser.add_argument("json_file_paths", type="str", required=True, help="pass the paths to all json files in the repository") - arg = parser.parse_args() + arg = parser.parse_args validation_result = val_json_file(arg.json_file_paths) print(validation_result) \ No newline at end of file From b84362e4794c39b3de9d23f5ce85cf425082d694 Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 16:05:54 +0100 Subject: [PATCH 74/96] fix: revert to python bug fix --- validate_camel_case.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/validate_camel_case.py b/validate_camel_case.py index 5ebd0c1..6e53c37 100644 --- a/validate_camel_case.py +++ b/validate_camel_case.py @@ -26,17 +26,17 @@ def validate_camel_case(data): def val_json_file(json_file_paths): # initialize empty list to store error result for invalid json file validation invalid_result = [] - # for json_file in json_file_paths: - try: - with open(json_file_paths, 'r') as jf: - data = json.load(jf) - is_valid, message = validate_camel_case(data) - if not is_valid: - # append result of json file with non cameCase keys - invalid_result.append(f"{json_file_paths} - {message}") - except json.JSONDecodeError as e: - # append result of invalid json file - invalid_result.append(f"Error in file {json_file_paths}, Invalid JSON format {e}") + for json_file in json_file_paths: + try: + with open(json_file, 'r') as jf: + data = json.load(jf) + is_valid, message = validate_camel_case(data) + if not is_valid: + # append result of json file with non cameCase keys + invalid_result.append(f"{json_file} - {message}") + except json.JSONDecodeError as e: + # append result of invalid json file + invalid_result.append(f"Error in file {json_file}, Invalid JSON format {e}") # return if len(invalid_result) > 0: From b39778197487b09c2f99a0013c916211caf03e58 Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 16:12:16 +0100 Subject: [PATCH 75/96] fix: json file argument --- .github/workflows/medata-ci-workflows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index f119540..f0f28c6 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -41,4 +41,5 @@ jobs: python-version: '3.11' - name: custom-camel-case-validation run: | - python validate_camel_case.py "./**/*.json" + jsonfiles=$(find . -name *.json) + python validate_camel_case.py $jsonfiles From 23ffb5f9a4abe56d3d0cc6f3061fc65d54c5313b Mon Sep 17 00:00:00 2001 From: khalid Date: Thu, 19 Sep 2024 16:14:39 +0100 Subject: [PATCH 76/96] fix: json file argument --- validate_camel_case.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validate_camel_case.py b/validate_camel_case.py index 6e53c37..a9a06b6 100644 --- a/validate_camel_case.py +++ b/validate_camel_case.py @@ -50,7 +50,7 @@ def val_json_file(json_file_paths): if __name__ == "__main__": parser = argparse.ArgumentParser(description="all json files in the repository") - parser.add_argument("json_file_paths", type="str", required=True, + parser.add_argument("json_file_paths", type="str", help="pass the paths to all json files in the repository") arg = parser.parse_args From 0380d682e967d9282c5183e23ac0c37ca746c0dc Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 09:41:14 +0100 Subject: [PATCH 77/96] fix: Error and regex pattern in calidate_camel_case.py --- validate_camel_case.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/validate_camel_case.py b/validate_camel_case.py index a9a06b6..8470a3d 100644 --- a/validate_camel_case.py +++ b/validate_camel_case.py @@ -1,17 +1,18 @@ import re import json import argparse +from pathlib import Path # regex to match camel case def match_camel_case(s): # match camelCase format using regular expression - return bool(re.match(r'^[a-z]+([A-Z][a-z]+)*$', s)) + return bool(re.match(r'^[$a-z]+([A-Z][a-z]+)*$', s)) def validate_camel_case(data): # validate camelCase in json key - for key, value in data: + for key, value in data.items(): if not match_camel_case(key): return False, f"Invalid key format (not CamelCase): {key}" @@ -26,9 +27,10 @@ def validate_camel_case(data): def val_json_file(json_file_paths): # initialize empty list to store error result for invalid json file validation invalid_result = [] - for json_file in json_file_paths: + for json_file in json_file_paths.split(" "): + print(json_file) try: - with open(json_file, 'r') as jf: + with open(Path(json_file), 'r') as jf: data = json.load(jf) is_valid, message = validate_camel_case(data) if not is_valid: @@ -44,15 +46,14 @@ def val_json_file(json_file_paths): else: return True - if __name__ == "__main__": parser = argparse.ArgumentParser(description="all json files in the repository") - parser.add_argument("json_file_paths", type="str", + parser.add_argument("json_file_paths", type=str, help="pass the paths to all json files in the repository") - arg = parser.parse_args - + arg = parser.parse_args() + validation_result = val_json_file(arg.json_file_paths) print(validation_result) \ No newline at end of file From abfc40fb16d9e3901e1133ee211557b012967184 Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 10:37:08 +0100 Subject: [PATCH 78/96] fix: convert args for python file into list --- validate_camel_case.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/validate_camel_case.py b/validate_camel_case.py index 8470a3d..ef336e8 100644 --- a/validate_camel_case.py +++ b/validate_camel_case.py @@ -27,8 +27,7 @@ def validate_camel_case(data): def val_json_file(json_file_paths): # initialize empty list to store error result for invalid json file validation invalid_result = [] - for json_file in json_file_paths.split(" "): - print(json_file) + for json_file in json_file_paths.split(","): try: with open(Path(json_file), 'r') as jf: data = json.load(jf) From 3c0a26f1139b8eff87b1fe513290ab49a7f71616 Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 10:37:08 +0100 Subject: [PATCH 79/96] fix: convert args for python file into list --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index f0f28c6..791ad44 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -41,5 +41,5 @@ jobs: python-version: '3.11' - name: custom-camel-case-validation run: | - jsonfiles=$(find . -name *.json) + jsonfiles=$(find . -name *.json print0 | xargs -0) python validate_camel_case.py $jsonfiles From 032ae428aa7922a5a844ba36d2d9db9812513977 Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 10:37:08 +0100 Subject: [PATCH 80/96] fix: convert args for python file into list --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 791ad44..14dda32 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -41,5 +41,5 @@ jobs: python-version: '3.11' - name: custom-camel-case-validation run: | - jsonfiles=$(find . -name *.json print0 | xargs -0) + jsonfiles=$(find . -name *.json -print0 | xargs -0) python validate_camel_case.py $jsonfiles From 186cb3f8f662c73ee511aac8313be7b773a90c93 Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 10:37:08 +0100 Subject: [PATCH 81/96] fix: convert args for python file into list --- .github/workflows/medata-ci-workflows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 14dda32..9e242d5 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -42,4 +42,5 @@ jobs: - name: custom-camel-case-validation run: | jsonfiles=$(find . -name *.json -print0 | xargs -0) + print($jsonfiles) python validate_camel_case.py $jsonfiles From 043ba3574ea1a4f1489513342cfd05df0c60d26e Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 10:37:08 +0100 Subject: [PATCH 82/96] fix: convert args for python file into list --- .github/workflows/medata-ci-workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 9e242d5..0454833 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -42,5 +42,5 @@ jobs: - name: custom-camel-case-validation run: | jsonfiles=$(find . -name *.json -print0 | xargs -0) - print($jsonfiles) + echo $jsonfiles python validate_camel_case.py $jsonfiles From 34b31656fdccb278f961b0f36d099973a6975663 Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 10:37:08 +0100 Subject: [PATCH 83/96] fix: convert args for python file into list --- .github/workflows/medata-ci-workflows.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index 0454833..a91ca1f 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -41,6 +41,6 @@ jobs: python-version: '3.11' - name: custom-camel-case-validation run: | - jsonfiles=$(find . -name *.json -print0 | xargs -0) - echo $jsonfiles - python validate_camel_case.py $jsonfiles + readarray -d '' array < <(find . -name *.json -print0) + echo ${array[@]} + python validate_camel_case.py ${array[@]} \ No newline at end of file From ce865f325d70274b62ca108e1a84fc8c63159106 Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 11:07:52 +0100 Subject: [PATCH 84/96] fix: changed python file to accept single args --- validate_camel_case.py | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/validate_camel_case.py b/validate_camel_case.py index ef336e8..56c9239 100644 --- a/validate_camel_case.py +++ b/validate_camel_case.py @@ -24,26 +24,21 @@ def validate_camel_case(data): return True, None -def val_json_file(json_file_paths): +def val_json_file(json_file): # initialize empty list to store error result for invalid json file validation - invalid_result = [] - for json_file in json_file_paths.split(","): - try: - with open(Path(json_file), 'r') as jf: - data = json.load(jf) - is_valid, message = validate_camel_case(data) - if not is_valid: - # append result of json file with non cameCase keys - invalid_result.append(f"{json_file} - {message}") - except json.JSONDecodeError as e: - # append result of invalid json file - invalid_result.append(f"Error in file {json_file}, Invalid JSON format {e}") - - # return - if len(invalid_result) > 0: - return "\n".join(invalid_result) - else: - return True + try: + with open(Path(json_file), 'r') as jf: + data = json.load(jf) + is_valid, message = validate_camel_case(data) + if not is_valid: + # append result of json file with non cameCase keys + return(f"{json_file} - {message}") + else: + return True + except json.JSONDecodeError as e: + # append result of invalid json file + print(f"Error in file {json_file}, Invalid JSON format {e}") + From b4158fbf4dcc5a9c55dc3f137774125b5b2384c3 Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 11:07:52 +0100 Subject: [PATCH 85/96] fix: changed python file to accept single args --- .github/workflows/medata-ci-workflows.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/medata-ci-workflows.yml b/.github/workflows/medata-ci-workflows.yml index a91ca1f..0536702 100644 --- a/.github/workflows/medata-ci-workflows.yml +++ b/.github/workflows/medata-ci-workflows.yml @@ -41,6 +41,9 @@ jobs: python-version: '3.11' - name: custom-camel-case-validation run: | - readarray -d '' array < <(find . -name *.json -print0) - echo ${array[@]} - python validate_camel_case.py ${array[@]} \ No newline at end of file + readarray -d '' json_file_paths < <(find . -name *.json -print0) + echo ${json_file_paths[@]} + for json_file in ${json_file_paths[@]}; do + python validate_camel_case.py $json_file + done + From ebef1fee1c1354bb952b9c5b16c766217b989457 Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 11:12:17 +0100 Subject: [PATCH 86/96] feat: Add snack case to check camelCase validator --- scicat-schema/scicat.dataset-derived.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scicat-schema/scicat.dataset-derived.schema.json b/scicat-schema/scicat.dataset-derived.schema.json index 3da2667..47e3a3d 100644 --- a/scicat-schema/scicat.dataset-derived.schema.json +++ b/scicat-schema/scicat.dataset-derived.schema.json @@ -9,7 +9,7 @@ "type": "string", "description": "Email of person pursuing the data analysis. The string may contain a list of emails, which should then be separated by semicolons" }, - "inputDatasets": { + "input_Datasets": { "type": "array", "items": { "type": "string" From e01904a9b54ef15d3764e5ead20ab04b24fe4da9 Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 11:21:08 +0100 Subject: [PATCH 87/96] fix: adjusted the rege4x pattern to match more than 1 upper after lower case --- validate_camel_case.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validate_camel_case.py b/validate_camel_case.py index 56c9239..9affb3c 100644 --- a/validate_camel_case.py +++ b/validate_camel_case.py @@ -7,7 +7,7 @@ # regex to match camel case def match_camel_case(s): # match camelCase format using regular expression - return bool(re.match(r'^[$a-z]+([A-Z][a-z]+)*$', s)) + return bool(re.match(r'^[$a-z]+([.A-Z]+[a-z]*)*$', s)) def validate_camel_case(data): From 6281df2f138570b60aa4dae2ed3b8b52cfde20a2 Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 11:21:08 +0100 Subject: [PATCH 88/96] fix: adjusted the rege4x pattern to match more than 1 upper after lower case --- validate_camel_case.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validate_camel_case.py b/validate_camel_case.py index 9affb3c..ec22537 100644 --- a/validate_camel_case.py +++ b/validate_camel_case.py @@ -7,7 +7,7 @@ # regex to match camel case def match_camel_case(s): # match camelCase format using regular expression - return bool(re.match(r'^[$a-z]+([.A-Z]+[a-z]*)*$', s)) + return bool(re.match(r'^[$a-z]+([.A-Z0-9]+[a-z]*)*$', s)) def validate_camel_case(data): From f60cca84631bd31db53207787b721da56145229e Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 11:25:24 +0100 Subject: [PATCH 89/96] fix: returned adjusted case --- scicat-schema/scicat.dataset-derived.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scicat-schema/scicat.dataset-derived.schema.json b/scicat-schema/scicat.dataset-derived.schema.json index 47e3a3d..3da2667 100644 --- a/scicat-schema/scicat.dataset-derived.schema.json +++ b/scicat-schema/scicat.dataset-derived.schema.json @@ -9,7 +9,7 @@ "type": "string", "description": "Email of person pursuing the data analysis. The string may contain a list of emails, which should then be separated by semicolons" }, - "input_Datasets": { + "inputDatasets": { "type": "array", "items": { "type": "string" From cdf29c336d3bc2acd21ce55648cb37926e84bb8d Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 11:36:52 +0100 Subject: [PATCH 90/96] feat: added exit to python code if validation fails --- ukaea-schema/facility/hive/campaign.schema.json | 2 +- validate_camel_case.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ukaea-schema/facility/hive/campaign.schema.json b/ukaea-schema/facility/hive/campaign.schema.json index 459f412..267ba90 100644 --- a/ukaea-schema/facility/hive/campaign.schema.json +++ b/ukaea-schema/facility/hive/campaign.schema.json @@ -8,7 +8,7 @@ "campaignStart" ], "properties": { - "campaignID": { + "campaign_ID": { "type": "string", "example": "HIVE-XXXXXX" }, diff --git a/validate_camel_case.py b/validate_camel_case.py index ec22537..406b894 100644 --- a/validate_camel_case.py +++ b/validate_camel_case.py @@ -2,6 +2,7 @@ import json import argparse from pathlib import Path +import sys # regex to match camel case @@ -38,6 +39,7 @@ def val_json_file(json_file): except json.JSONDecodeError as e: # append result of invalid json file print(f"Error in file {json_file}, Invalid JSON format {e}") + sys.exit(1) From 6735713e6e8ef4e4c9f1949b62bdb4b5b4bdffea Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 11:38:04 +0100 Subject: [PATCH 91/96] feat: added exit to python code if validation fails --- ukaea-schema/facility/hive/campaign.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ukaea-schema/facility/hive/campaign.schema.json b/ukaea-schema/facility/hive/campaign.schema.json index 267ba90..c5feeb9 100644 --- a/ukaea-schema/facility/hive/campaign.schema.json +++ b/ukaea-schema/facility/hive/campaign.schema.json @@ -12,7 +12,7 @@ "type": "string", "example": "HIVE-XXXXXX" }, - "campaignStart": { + "campaign_Start": { "type": "string", "format": "date-time" }, From 3ec6e68af0e1ec07873b62a4a281a4d68837a191 Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 11:39:44 +0100 Subject: [PATCH 92/96] feat: added exit to python code if validation fails --- validate_camel_case.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validate_camel_case.py b/validate_camel_case.py index 406b894..913ef0a 100644 --- a/validate_camel_case.py +++ b/validate_camel_case.py @@ -35,7 +35,7 @@ def val_json_file(json_file): # append result of json file with non cameCase keys return(f"{json_file} - {message}") else: - return True + return(f"json file: {json_file} contains valid camelCase keys") except json.JSONDecodeError as e: # append result of invalid json file print(f"Error in file {json_file}, Invalid JSON format {e}") From 8e07311f5b83e0fc57d770f62f9f1c839b66fc69 Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 11:42:13 +0100 Subject: [PATCH 93/96] feat: added exit to python code if validation fails --- validate_camel_case.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/validate_camel_case.py b/validate_camel_case.py index 913ef0a..b4cdd44 100644 --- a/validate_camel_case.py +++ b/validate_camel_case.py @@ -33,13 +33,15 @@ def val_json_file(json_file): is_valid, message = validate_camel_case(data) if not is_valid: # append result of json file with non cameCase keys - return(f"{json_file} - {message}") + print(f"{json_file} - {message}") + sys.exit(1) else: return(f"json file: {json_file} contains valid camelCase keys") except json.JSONDecodeError as e: # append result of invalid json file print(f"Error in file {json_file}, Invalid JSON format {e}") sys.exit(1) + From c979b1c69446de787f5387ed66b32e11d1b6dec4 Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 11:44:41 +0100 Subject: [PATCH 94/96] fix: changed error message --- validate_camel_case.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validate_camel_case.py b/validate_camel_case.py index b4cdd44..b8e7887 100644 --- a/validate_camel_case.py +++ b/validate_camel_case.py @@ -21,7 +21,7 @@ def validate_camel_case(data): if isinstance(value, dict): is_valid, message = validate_camel_case(value) # recursive check nested dictionary if not is_valid: - return False, f"Nested error: {message}" + return False, f"{message}" return True, None From 51f99a767056838b9236b1d2804af54eb10fb9ea Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 16:02:55 +0100 Subject: [PATCH 95/96] fix: returned campaign.schema.json file to normal --- validate_camel_case.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validate_camel_case.py b/validate_camel_case.py index b8e7887..5f78062 100644 --- a/validate_camel_case.py +++ b/validate_camel_case.py @@ -33,7 +33,7 @@ def val_json_file(json_file): is_valid, message = validate_camel_case(data) if not is_valid: # append result of json file with non cameCase keys - print(f"{json_file} - {message}") + print(f"json file: {json_file} contains {message}") sys.exit(1) else: return(f"json file: {json_file} contains valid camelCase keys") From 1c021f628c084e25534f07c393347730304a9f6d Mon Sep 17 00:00:00 2001 From: khalid Date: Fri, 20 Sep 2024 16:02:55 +0100 Subject: [PATCH 96/96] fix: returned campaign.schema.json file to normal --- ukaea-schema/facility/hive/campaign.schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ukaea-schema/facility/hive/campaign.schema.json b/ukaea-schema/facility/hive/campaign.schema.json index c5feeb9..459f412 100644 --- a/ukaea-schema/facility/hive/campaign.schema.json +++ b/ukaea-schema/facility/hive/campaign.schema.json @@ -8,11 +8,11 @@ "campaignStart" ], "properties": { - "campaign_ID": { + "campaignID": { "type": "string", "example": "HIVE-XXXXXX" }, - "campaign_Start": { + "campaignStart": { "type": "string", "format": "date-time" },