Skip to content

Commit e3d1328

Browse files
authored
Merge pull request #8 from FAIRmat-NFDI/docs-setup
docs setup + h5md transfer
2 parents 851e7aa + 8695e4f commit e3d1328

File tree

15 files changed

+2389
-6
lines changed

15 files changed

+2389
-6
lines changed

.github/workflows/actions.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: install-and-test-workflow
2+
on: [push]
3+
jobs:
4+
install-and-test:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v4
8+
- name: Set up Python 3.9
9+
uses: actions/setup-python@v5
10+
with:
11+
python-version: 3.9
12+
- name: Install dependencies
13+
run: |
14+
pip install --upgrade pip
15+
pip install '.[dev]' --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
16+
pip install coverage coveralls
17+
- name: Test with pytest
18+
run: |
19+
python -m coverage run -m pytest -sv
20+
- name: Submit to coveralls
21+
continue-on-error: true
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
run: |
25+
coveralls --service=github
26+
build-and-install:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: Set up Python 3.9
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: 3.9
34+
- name: Build the package
35+
run: |
36+
pip install --upgrade pip
37+
pip install build
38+
python -m build --sdist
39+
- name: Install the package
40+
run: |
41+
pip install dist/*.tar.gz --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
42+
ruff-linting:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v4
46+
- uses: chartboost/ruff-action@v1
47+
with:
48+
args: "check ."
49+
# to enable auto-formatting check, uncomment the following lines below
50+
# ruff-formatting:
51+
# runs-on: ubuntu-latest
52+
# steps:
53+
# - uses: actions/checkout@v4
54+
# - uses: chartboost/ruff-action@v1
55+
# with:
56+
# args: "format . --check"

.github/workflows/cruft-update.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# /.github/workflows/cruft-update.yml
2+
name: Update repository with Cruft
3+
permissions:
4+
contents: write
5+
pull-requests: write
6+
on:
7+
schedule:
8+
- cron: "0 14 * * 1" # Every Monday at 2pm (UTC time)
9+
workflow_dispatch:
10+
jobs:
11+
update:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
include:
17+
- add-paths: .
18+
body: Use this to merge the changes to this repository.
19+
branch: cruft/update
20+
commit-message: "chore: accept new Cruft update"
21+
title: New updates detected with Cruft
22+
- add-paths: .cruft.json
23+
body: Use this to reject the changes in this repository.
24+
branch: cruft/reject
25+
commit-message: "chore: reject new Cruft update"
26+
title: Reject new updates detected with Cruft
27+
steps:
28+
- uses: actions/checkout@v3
29+
30+
- uses: actions/setup-python@v4
31+
with:
32+
python-version: "3.10"
33+
34+
- name: Install Cruft
35+
run: pip3 install cruft
36+
37+
- name: Check if update is available
38+
continue-on-error: false
39+
id: check
40+
run: |
41+
CHANGES=0
42+
if [ -f .cruft.json ]; then
43+
if ! cruft check; then
44+
CHANGES=1
45+
fi
46+
else
47+
echo "No .cruft.json file"
48+
fi
49+
50+
echo "has_changes=$CHANGES" >> "$GITHUB_OUTPUT"
51+
52+
- name: Run update if available
53+
if: steps.check.outputs.has_changes == '1'
54+
run: |
55+
git config --global user.email "you@example.com"
56+
git config --global user.name "GitHub"
57+
58+
cruft update --skip-apply-ask --refresh-private-variables
59+
git restore --staged .
60+
61+
- name: Create pull request
62+
if: steps.check.outputs.has_changes == '1'
63+
uses: peter-evans/create-pull-request@v4
64+
with:
65+
token: ${{ secrets.GITHUB_TOKEN }}
66+
add-paths: ${{ matrix.add-paths }}
67+
commit-message: ${{ matrix.commit-message }}
68+
branch: ${{ matrix.branch }}
69+
delete-branch: true
70+
branch-suffix: timestamp
71+
title: ${{ matrix.title }}
72+
body: |
73+
This is an autogenerated PR. ${{ matrix.body }}
74+
75+
[Cruft](https://cruft.github.io/cruft/) has detected updates from the Cookiecutter repository.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Deploy MkDocs Site
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Triggers deployment on push to the main branch
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v4
18+
19+
- name: Deploy docs
20+
uses: mhausenblas/mkdocs-deploy-gh-pages@master
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
CONFIG_FILE: mkdocs.yml
24+
REQUIREMENTS: requirements_docs.txt
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# FHI-aims

docs/parsers/h5md/h5md_about.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# H5MD-NOMAD: A flexible data-storage schema for uploading molecular simulations to NOMAD
2+
3+
## Overview
4+
5+
Most computational data in NOMAD is harvested with code-specific parsers that recognize the output files from a particular software and retrieve the appropriate (meta)data accordingly.
6+
However, this approach is not possible for many modern molecular simulation engines that use fully-flexible scriptable input and non-fixed output files.
7+
["HDF5 for molecular data" (H5MD)](http://h5md.nongnu.org/) is a data schema for storage of molecular simulation data, based on the HDF5 file format.
8+
This page describes an extension of the H5MD schema, denoted H5MD-NOMAD, which adds specificity to several of the H5MD guidelines while also retaining reasonable flexibility. This enables simulation data stored according to the H5MD-NOMAD schema to be stored in the NOMAD.
9+
10+
**Due to the nature of extending upon the original H5MD schema, portions of this doc page was duplicated, extended, or summarized from the [H5MD webpage](http://h5md.nongnu.org/).**

0 commit comments

Comments
 (0)