Skip to content
Closed
Show file tree
Hide file tree
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
29 changes: 29 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"template": "git@github.com:FAIRmat-NFDI/pynxtools-plugin-template.git",
"commit": "519f503945368a21d0c44125c0f34cf0d5f46e10",
"checkout": null,
"context": {
"cookiecutter": {
"reader_name": "spm",
"supported_nxdl": "NXspm",
"short_description": "NeXus data converter from SPM (Scanning Probe Microscopy).",
"technique": "SPM,STS,STM,AFM",
"reader_class": "SPMReader",
"author_name": "The NOMAD authors",
"author_email": "fairmat@physik.hu-berlin.de",
"license": "Apache Software License 2.0",
"zenodo_record": "17390485",
"vscode_settings": false,
"include_nomad_app": true,
"include_nomad_example_upload": true,
"__package_name": "pynxtools-spm",
"__module_name": "pynxtools_spm",
"__nomad_example": "spm_example_upload_entry_point",
"__nomad_app": "",
"_copy_without_render": ["*.html"],
"_template": "git@github.com:FAIRmat-NFDI/pynxtools-plugin-template.git",
"_commit": "519f503945368a21d0c44125c0f34cf0d5f46e10"
}
},
"directory": null
}
97 changes: 81 additions & 16 deletions .cspell/custom-dictionary.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,106 @@
# Custom Dictionary Words
actv
Alingment
Alphabat
arange
AXISNAME
backw
bais
Brockhauser
bruker
Bruker
Calib
caplog
chann
channs
chnl
Cojal
cryo
curnt
dataconverter
datamodel
Demod
Dobener
Draxl
Finishup
filt
findiff
fliplr
flipud
Florian
Forschungsgemeinschaft
forw
genfromtxt
Ginzburg
González
gradient
griddata
grps
Haraszti
Heiko
imshow
Incorrect
infinitiy
input
inted
iupac
José
keywith
Kpage
Kühbach
levelname
localzone
lockin
Lockin
Lukas
mainfile
Markus
metadata
Mformatter
miscellaneous
Mozumder
NFDI
Nanonis
PAMY
Pielsticker
Piezo
Sandor
Setpoint
Shabih
Sherjeel
Tamás
Yichen
dataconverter
filt
lockin
MPES
multilines
nanonis
Nanonis
NANONIS
nanonispy
nbins
nbsp
nchanns
ndarray
ndir
nested
NFDI
nxdata
nxdl
nxdls
nxformatted
nxscan
orcid
organized
PAMY
Pielsticker
piezo
Piezo
plottable
pynxtools
regrex
rhksm
Sandor
scandata
Scanfield
SCANIT
sctype
Setpoint
Shabih
Sherjeel
specdata
spect
spym
subpackages
Subpackages
Tamás
topo
ureg
valinit
valtext
Yichen
45 changes: 45 additions & 0 deletions .github/workflows/compatibility_with_pynxtools_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Compatibility with pynxtools

on:
push:
branches: [main]
pull_request:
branches: [main]

env:
python-version: 3.12

jobs:
pynx_compatibility:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pynxtools-version: ["latest"]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Install uv and set the python version to ${{ env.python-version }}
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ env.python-version }}
- name: Install pynxtools-spm
run: |
uv pip install ".[dev]"
uv pip install coverage coveralls
- name: Install nomad
run: |
uv pip install nomad-lab[infrastructure]@git+https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR.git
- name: Install pynxtools release version ${{ matrix.pynxtools-version }}
run: |
if [ "${{ matrix.pynxtools-version }}" == "latest" ]; then
uv pip install pynxtools
else
uv pip install pynxtools==${{ matrix.pynxtools-version }}
fi
- name: Run tests
run: |
pytest tests/.
81 changes: 81 additions & 0 deletions .github/workflows/cruft_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Update repository with Cruft

permissions:
contents: write
pull-requests: write

on:
schedule:
- cron: "0 4 * * 1" # Every Monday at 4am
workflow_dispatch: # manually

env:
python-version: 3.12

jobs:
update:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- add-paths: .
body: Use this to merge the changes to this repository.
branch: cruft/update
commit-message: "chore: accept new Cruft update"
title: New updates detected with Cruft
- add-paths: .cruft.json
body: Use this to reject the changes in this repository.
branch: cruft/reject
commit-message: "chore: reject new Cruft update"
title: Reject new updates detected with Cruft
steps:
- uses: actions/checkout@v4

- name: Install uv and set the python version to ${{ env.python-version }}
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ env.python-version }}

- name: Install Cruft
run: uv pip install cruft

- name: Check if update is available
continue-on-error: false
id: check
run: |
CHANGES=0
if [ -f .cruft.json ]; then
if ! cruft check; then
CHANGES=1
fi
else
echo "No .cruft.json file"
fi

echo "has_changes=$CHANGES" >> "$GITHUB_OUTPUT"

- name: Run update if available
if: steps.check.outputs.has_changes == '1'
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub"

cruft update --skip-apply-ask --refresh-private-variables
# git restore --staged .

- name: Create pull request
if: steps.check.outputs.has_changes == '1'
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
add-paths: ${{ matrix.add-paths }}
commit-message: ${{ matrix.commit-message }}
branch: ${{ matrix.branch }}
delete-branch: true
branch-suffix: timestamp
title: ${{ matrix.title }}
body: |
This is an autogenerated PR. ${{ matrix.body }}

[Cruft](https://cruft.github.io/cruft/) has detected updates from the Cookiecutter repository.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
python-version: 3.12

permissions:
contents: write
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -22,7 +22,7 @@ jobs:
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com

- name: Install uv and set the python version to ${{ env.python-version }}
uses: astral-sh/setup-uv@v5
with:
Expand All @@ -42,4 +42,4 @@ jobs:

- name: Build and Deploy
run: |
mkdocs gh-deploy --force --remote-branch gh-pages
mkdocs gh-deploy --force --remote-branch gh-pages
50 changes: 50 additions & 0 deletions .github/workflows/nomad-requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: NOMAD dependencies compatibility

on:
push:
branches:
- main
pull_request:
branches:
- main
# Run workflow only when there are changes in pyproject.toml or dev-requirements.txt
# paths:
# - 'pyproject.toml'
# - 'dev-requirements.txt'

env:
python-version: 3.12

jobs:
validate_dependencies:
runs-on: ubuntu-latest

steps:
- name: Checkout pynxtools-spm
uses: actions/checkout@v4

- name: Checkout NOMAD from GitLab
run: |
git clone --depth 1 --branch develop --recurse-submodules https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR.git nomad
git submodule update --init --recursive --depth 1
- name: Add pynxtools-spm dependency in NOMAD test_plugins.txt
working-directory: ./nomad
run: |
echo "" >> test_plugins.txt
echo "pynxtools-spm@git+https://github.com/FAIRmat-NFDI/pynxtools-spm.git@${{ github.head_ref || github.ref_name }}" >> test_plugins.txt
- name: Install uv and set the python version to ${{ env.python-version }}
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ env.python-version }}
- name: Generate (dev-)requirements.txt from modified pyproject.toml
working-directory: ./nomad
run: |
uv pip compile --universal -p ${{ env.python-version }} --annotation-style=line --extra=infrastructure --extra=parsing --output-file=requirements.txt pyproject.toml
uv pip compile --universal -p ${{ env.python-version }} --annotation-style=line --extra=dev --extra=infrastructure --extra=parsing --output-file=requirements-dev.txt requirements.txt pyproject.toml
uv pip compile --universal -p ${{ env.python-version }} --annotation-style=line --output-file=requirements-plugins.txt --unsafe-package nomad-lab -c requirements-dev.txt test_plugins.txt
- name: Install NOMAD dependencies with pynxtools from current branch
working-directory: ./nomad
run: |
uv pip install -r requirements-plugins.txt -c requirements-dev.txt --prerelease=allow
env:
PYTHONPATH: "" # Ensure no pre-installed packages interfere with the test
Loading
Loading