Skip to content

Add JSON file output option - #5

Merged
ka-sarthak merged 1 commit into
mainfrom
3-add-json-format-for-output
Jan 13, 2026
Merged

Add JSON file output option#5
ka-sarthak merged 1 commit into
mainfrom
3-add-json-format-for-output

Conversation

@ka-sarthak

@ka-sarthak ka-sarthak commented Jan 13, 2026

Copy link
Copy Markdown
Collaborator

This pull request adds support for generating JSON files in the export workflow, alongside the existing Parquet and CSV formats. The changes update type definitions, file writing utilities, and consolidation logic to recognize and process JSON files throughout the system.

Support for JSON file format:

  • Updated OutputFileTypeLiteral in models.py to include 'json' as a valid output file type.
  • Added a new write_json_file utility function in utils.py to write NOMAD entry dictionaries to a JSON file, with validation for file extension.
  • Modified the search activity in activities.py to support JSON as an output format, including relevant error handling and selection of the correct write function. [1] [2]

Consolidation logic enhancements:

  • Updated the consolidate_files utility in utils.py to allow merging multiple JSON files, in addition to Parquet and CSV, into a single consolidated file.
  • Updated documentation and error messages in both the search and consolidate_output_files activities to reflect support for JSON files. [1] [2]

These changes ensure that the workflow can now seamlessly handle JSON files for both output and consolidation tasks.

@ka-sarthak ka-sarthak self-assigned this Jan 13, 2026
@ka-sarthak ka-sarthak linked an issue Jan 13, 2026 that may be closed by this pull request
@ka-sarthak
ka-sarthak merged commit bc5ef5f into main Jan 13, 2026
2 checks passed
@ka-sarthak
ka-sarthak deleted the 3-add-json-format-for-output branch January 13, 2026 13:02
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.

Add JSON format for output

1 participant