Skip to content

Commit 647867b

Browse files
Plugin setup
1 parent f8877f0 commit 647867b

40 files changed

Lines changed: 954 additions & 258 deletions

.cruft.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"template": "https://github.com/FAIRmat-NFDI/cookiecutter-nomad-plugin",
3+
"commit": "3c5b9b8bfb4c6e91c3f84aa6e5e453f2b721a326",
4+
"checkout": null,
5+
"context": {
6+
"cookiecutter": {
7+
"full_name": "FAIRmat",
8+
"email": "fairmat@physik.hu-berlin.de",
9+
"github_username": "FAIRmat-NFDI",
10+
"plugin_name": "nomad-json-parser",
11+
"module_name": "nomad_json_parser",
12+
"short_description": "A NOMAD parser plugin for parsing json files to entries.",
13+
"version": "0.1.0",
14+
"license": "MIT",
15+
"include_schema_package": true,
16+
"include_normalizer": false,
17+
"include_parser": true,
18+
"include_app": true,
19+
"include_example_uploads": true,
20+
"_copy_without_render": [
21+
"*.html"
22+
],
23+
"_template": "https://github.com/FAIRmat-NFDI/cookiecutter-nomad-plugin",
24+
"_commit": "3c5b9b8bfb4c6e91c3f84aa6e5e453f2b721a326"
25+
}
26+
},
27+
"directory": null
28+
}

.github/workflows/actions.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: install-and-test-workflow
2+
3+
on: [push]
4+
5+
jobs:
6+
install-and-test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Install uv and set the python version
11+
uses: astral-sh/setup-uv@v5
12+
with:
13+
python-version: 3.12
14+
- name: Install dependencies
15+
run: |
16+
uv sync --all-extras
17+
- name: Test with pytest
18+
run: |
19+
uv run --with coverage 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+
uv run --with coveralls coveralls --service=github
26+
27+
ruff-linting:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- uses: astral-sh/ruff-action@v3
32+
- run: ruff check .
33+
# Uncomment the following line to enable format check
34+
# - run: ruff format --check .
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

.gitignore

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95+
__pypackages__/
96+
97+
# Celery stuff
98+
celerybeat-schedule
99+
celerybeat.pid
100+
101+
# SageMath parsed files
102+
*.sage.py
103+
104+
# Environments
105+
.env
106+
.venv
107+
env/
108+
venv/
109+
ENV/
110+
env.bak/
111+
venv.bak/
112+
.pyenv
113+
114+
# Spyder project settings
115+
.spyderproject
116+
.spyproject
117+
118+
# Rope project settings
119+
.ropeproject
120+
121+
# mkdocs documentation
122+
/site
123+
124+
# mypy
125+
.mypy_cache/
126+
.dmypy.json
127+
dmypy.json
128+
129+
# Pyre type checker
130+
.pyre/

.vscode/settings.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"editor.rulers": [
3+
88
4+
],
5+
"editor.renderWhitespace": "all",
6+
"editor.tabSize": 4,
7+
"files.trimTrailingWhitespace": true,
8+
"[python]": {
9+
"editor.formatOnSave": true,
10+
"editor.codeActionsOnSave": {
11+
"source.fixAll": "explicit",
12+
"source.organizeImports": "explicit"
13+
},
14+
"editor.defaultFormatter": "charliermarsh.ruff"
15+
},
16+
"python.testing.pytestArgs": [
17+
"tests"
18+
],
19+
"python.testing.unittestEnabled": false,
20+
"python.testing.pytestEnabled": true
21+
}

0 commit comments

Comments
 (0)