Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Add NewareNDA extractor entry #78

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions marda_registry/data/extractors/neware-nda-reader.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
id: >-
NewareNDA
name: >-
NewareNDA
description: >-
Python module and command line tool for reading and converting Neware nda and ndax battery cycling data files.
supported_filetypes:
- id: neware-nda
license:
spdx: BSD-3-Clause
uri: https://github.com/Solid-Energy-Systems/NewareNDA/blob/master/LICENSE
subject:
- electrochemistry
citations:
- uri: https://github.com/Solid-Energy-Systems/NewareNDA
creators:
- D. Cogswell
title: NewareNDA github repository
type: software
source_repository: https://github.com/Solid-Energy-Systems/NewareNDA
usage:
- method: cli
command: NewareNDA-cli.py {{ input_path }} --format csv {{ output_path }}
Comment on lines +23 to +24
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, what is the python object generated from NewareNDA.read() below? Is it a dict, or some other object? I think we should probably have the analogous CLI usage (json?) for the python usage for now, instead of having 10 equivalent ones with an output format.

Also, we have output_type in the template: https://marda-alliance.github.io/metadata_extractors_schema/main/mme_schema/UsageTemplate.html

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It returns a dataframe at the moment, the CLI then just calls the various df.to_<x>() functions that pandas has.

output_type requires a MaRDA filetype itself right? I think it's also single-valued (at the moment) so not sure how useful it is here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, then we probably need to mention pandas somewhere. I'll think about how to add that into schema (also for the xarray requirement in yadg) in another PR.

And yes, we should probably add those as FileTypes into the registry anyway.

- method: cli
command: NewareNDA-cli.py {{ input_path }} --format excel {{ output_path }}
- method: cli
command: NewareNDA-cli.py {{ input_path }} --format feather {{ output_path }}
- method: cli
command: NewareNDA-cli.py {{ input_path }} --format hdf {{ output_path }}
- method: cli
command: NewareNDA-cli.py {{ input_path }} --format json {{ output_path }}
- method: cli
command: NewareNDA-cli.py {{ input_path }} --format parquet {{ output_path }}
- method: cli
command: NewareNDA-cli.py {{ input_path }} --format pickle {{ output_path }}
- method: cli
command: NewareNDA-cli.py {{ input_path }} --format stata {{ output_path }}
- method: python
setup: NewareNDA
command: NewareNDA.read({{ input_path }})
installation:
- method: pip
packages:
- NewareNDA >= 2024
requires_python: '>=3.6'
instructions: >-
Install the package into a Python 3.6+ environment with
`pip install NewareNDA`. The results will be returned as
a pandas dataframe.
Loading