Skip to content

Add validate action tool to foxden CLI#3

Open
vkuznet wants to merge 1 commit into
mainfrom
feature/auto-pr-20260526-145801
Open

Add validate action tool to foxden CLI#3
vkuznet wants to merge 1 commit into
mainfrom
feature/auto-pr-20260526-145801

Conversation

@vkuznet

@vkuznet vkuznet commented May 26, 2026

Copy link
Copy Markdown
Contributor

This PR contains new validation action tool for foxden CLI as requested from this CHESSComputing/FOXDEN#51

The logic of the code was written by me and partially improved by AI.

Here is an example of its usage:

./foxden validate meta ~/Downloads/record.json --schema=/Users/vk/Wor
k/CHESS/FOXDEN/FOXDEN/configs/ID3A.json

# field did, value /beamline=3a/btr=test-123-a/cycle=2025-3/sample_name=meta-test-6, type
 string
# field facility, value CHESS, type string
# field cycle, value 2025-3, type string
# field pi, value Shanks, type string
# field btr, value test-123-a, type string
# field experimenters, value KSoloway, SClaus, type string
# field beamline, value [3A], type []interface {}
...
────────────────────────────────────────────────────────────
⚠  metadata  /Users/vk/Downloads/record.json — passed with 17 warning(s)
────────────────────────────────────────────────────────────
Warnings:
  [unexpected] doi_provider: field is not defined in the schema
  [unexpected] doi_url: field is not defined in the schema
  [unexpected] sample_chemical_formula: field is not defined in the schema
  [unexpected] schema: field is not defined in the schema
  [unexpected] schema_file: field is not defined in the schema
  [unexpected] doi_foxden_url: field is not defined in the schema
  [unexpected] doi_user: field is not defined in the schema
  [unexpected] doi_access_metadata: field is not defined in the schema
  [unexpected] doi_created_at: field is not defined in the schema
  [unexpected] affiliation: field is not defined in the schema
  [unexpected] doi_public: field is not defined in the schema
  [unexpected] material_safety_hazardous_samples: field is not defined in the schema
  [unexpected] date: field is not defined in the schema
  [unexpected] doi: field is not defined in the schema
  [unexpected] doi_parents_dids: field is not defined in the schema
  [unexpected] energy_foil: field is not defined in the schema
  [unexpected] user: field is not defined in the schema
────────────────────────────────────────────────────────────

I will further improve functionality after initial testing and verification with Kate.

@vkuznet vkuznet self-assigned this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant