Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init commit for citation. #439

Merged
merged 21 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
55 changes: 55 additions & 0 deletions .github/workflows/manual_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Update CITATION.cff version and create a new release
on:
workflow_dispatch:
inputs:
version:
description: 'New version'
required: true

jobs:
update-version-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Update version
run: |
sed -i "s/version: .*/version: ${{ github.event.inputs.version }}/g" CITATION.cff

- name: Commit changes to a new branch
run: |
const { version } = github.event.inputs;
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git checkout -b update-version-${version}
git commit -am "Update CITATION.cff version to ${version}"
git push origin update-version-${version}

- name: Create pull request
uses: actions/github-script@v6
with:
script: |
const { version } = github.event.inputs;
github.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: `Update CITATION.cff version to ${version}`,
head: `update-version-${version}`,
base: `main`,
body: `This PR updates the CITATION.cff version to ${version}`
})

- name: Create release
RubelMozumder marked this conversation as resolved.
Show resolved Hide resolved
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: Release ${{ github.event.inputs.version }}
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ jobs:
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install build
- name: Git tag version
id: git_tag_version
run: |
# Extract the version from the tag (e.g., 'v1.0.0' becomes '1.0.0')
GIT_TAG_VERSION=${GITHUB_REF#refs/tags/v}
echo "GIT_TAG_VERSION=$GIT_TAG_VERSION" >> $GITHUB_ENV
echo "Version from Git tag: $GIT_TAG_VERSION"
- name: Citation version
id: citation_version
run: |
# Parse the version from the CITATION.cff file
CITATION_VERSION=$(grep '^version:' CITATION.cff | cut -d' ' -f2)
echo "CITATION_VERSION=$CITATION_VERSION" >> $GITHUB_ENV
echo "Version from CITATION.cff: $CITATION_VERSION"
- name: Compare versions
run: |
if [ "$GIT_TAG_VERSION" != "$CITATION_VERSION" ]; then
echo "Version mismatch: Git tag version is $GIT_TAG_VERSION, CITATION.cff version is $CITATION_VERSION"
exit 1
fi
- name: Build package
run: |
git reset --hard HEAD
Expand Down
86 changes: 86 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
cff-version: 1.2.0
title: A converter plugin of NOMAD to convert NeXus data format to NOMAD metainfo
message:
If you use this software, please cite it using the
metadata from this file.
type: software
version: 0.7.2
authors:
- given-names: Andrea
lukaspie marked this conversation as resolved.
Show resolved Hide resolved
family-names: Albino
orcid: 'https://orcid.org/0000-0001-9280-7431'
- given-names: Florian
family-names: Dobener
orcid: 'https://orcid.org/0000-0003-1987-6224'
- given-names: Lukas
family-names: Pielsticker
orcid: 'https://orcid.org/0000-0001-9361-8333'
- given-names: Markus
family-names: Kühbach
lukaspie marked this conversation as resolved.
Show resolved Hide resolved
orcid: 'https://orcid.org/0000-0002-7117-5196'
- given-names: Rubel
family-names: Mozumder
orcid: 'https://orcid.org/0009-0007-5926-6646'
- given-names: Sandor
family-names: Brockhauser
orcid: 'https://orcid.org/0000-0002-9700-4803'
- given-names: Sherjeel
family-names: Shabih
orcid: 'https://orcid.org/0009-0008-6635-4465'
- given-names: Sebastian
family-names: Brückner
orcid: 'https://orcid.org/0000-0002-5969-847X'
- given-names: Tamás
family-names: Haraszti
orcid: 'https://orcid.org/0000-0002-7095-4358'
- given-names: Laurenz
family-names: Rettig
orcid: 'https://orcid.org/0000-0002-0725-6696'
- given-names: Lev
family-names: Ginzburg
orcid: 'https://orcid.org/0000-0001-8929-1040'
- given-names: José A.
family-names: Márquez
orcid: 'https://orcid.org/0000-0002-8173-2566'
- given-names: Ádám
family-names: Fekete
orcid: 'https://orcid.org/0000-0002-6263-897X'
- given-names: Theodore
family-names: Chang
orcid: 'https://orcid.org/0000-0002-4911-0230'


add contact:
Ron,


# NOTE: After publishing this software in zenodo, replace add DOI and URL
# Each indivisual version has a own doi, but DOI should be the all version
# doi that will always points to the latest version
# of the release. Similarly, zenodo will provide single URL for the published
# software.
# doi: Not available yet
repository-code: 'https://github.com/FAIRmat-NFDI/pynxtools'
# url: Not available yet
abstract:

pynxools is a python library that provides core functionalities for converting experimental
data, if the experiment specific reader plugin (e.g. pynxtools-stm for Scanning Tunneling
Microscopy, pynxtools-em for for Electron Microscopy) is integrated with, into NeXus-compliant
HDF5 file following NeXus application definition
(https://manual.nexusformat.org/classes/applications/index.html). During the data
RubelMozumder marked this conversation as resolved.
Show resolved Hide resolved
conversion process it performs data verification (e.g. expected type of data) to ensure
compliance in accordance with NeXus application definition. In addition to its standalone
RubelMozumder marked this conversation as resolved.
Show resolved Hide resolved
capabilities, pynxtools offers an interface for developing custom reader plugins to
convert experimental raw data into structured HDF5 formats. The library is also integrated
with the NOMAD platform, a distributed web-based system for managing materials science data,
RubelMozumder marked this conversation as resolved.
Show resolved Hide resolved
allowing users to convert experimental data directly into the NOMAD metainfo format. The
resulting HDF5 files are parsed and stored in the NOMAD central database, ensuring that
the data remains findable, accessible, interoperable, and reusable (FAIR).

The work is a part of the FAIRmat project (project id 460197019) funded by the Deutsche
Forschungsgemeinschaft (DFG, German Research Foundation)
(https://gepris.dfg.de/gepris/projekt/460197019?language=en).


license: Apache-2.0
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ dev = [
"types-requests",
"uv",
"pre-commit",
"cffconvert",
RubelMozumder marked this conversation as resolved.
Show resolved Hide resolved
]
convert = [
"pynxtools[apm,em,mpes,xps,stm,xrd,ellips,raman]",
Expand Down
Loading