nomad-semantic-web-service 0.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. nomad_semantic_web_service-0.0.0/.cruft.json +34 -0
  2. nomad_semantic_web_service-0.0.0/.cspell/custom-dictionary.txt +52 -0
  3. nomad_semantic_web_service-0.0.0/.devcontainer/devcontainer.json +25 -0
  4. nomad_semantic_web_service-0.0.0/.github/dependabot.yml +12 -0
  5. nomad_semantic_web_service-0.0.0/.github/workflows/actions.yml +43 -0
  6. nomad_semantic_web_service-0.0.0/.github/workflows/cff_validation.yml +37 -0
  7. nomad_semantic_web_service-0.0.0/.github/workflows/mkdocs-deploy.yml +37 -0
  8. nomad_semantic_web_service-0.0.0/.github/workflows/publish.yml +107 -0
  9. nomad_semantic_web_service-0.0.0/.github/workflows/reuse.yml +10 -0
  10. nomad_semantic_web_service-0.0.0/.github/workflows/spellcheck.yaml +32 -0
  11. nomad_semantic_web_service-0.0.0/.gitignore +130 -0
  12. nomad_semantic_web_service-0.0.0/.pre-commit-config.yaml +40 -0
  13. nomad_semantic_web_service-0.0.0/.vscode/settings.json +21 -0
  14. nomad_semantic_web_service-0.0.0/CITATION.cff +27 -0
  15. nomad_semantic_web_service-0.0.0/LICENSE +202 -0
  16. nomad_semantic_web_service-0.0.0/LICENSES/Apache-2.0.txt +202 -0
  17. nomad_semantic_web_service-0.0.0/MANIFEST.in +1 -0
  18. nomad_semantic_web_service-0.0.0/PKG-INFO +261 -0
  19. nomad_semantic_web_service-0.0.0/README.md +23 -0
  20. nomad_semantic_web_service-0.0.0/REUSE.toml +47 -0
  21. nomad_semantic_web_service-0.0.0/cspell.json +31 -0
  22. nomad_semantic_web_service-0.0.0/docs/assets/.gitignore +1 -0
  23. nomad_semantic_web_service-0.0.0/docs/assets/favicon.png +0 -0
  24. nomad_semantic_web_service-0.0.0/docs/assets/nomad-plugin-logo.png +0 -0
  25. nomad_semantic_web_service-0.0.0/docs/explanation/explanation.md +122 -0
  26. nomad_semantic_web_service-0.0.0/docs/how_to/contribute_to_the_documentation.md +4 -0
  27. nomad_semantic_web_service-0.0.0/docs/how_to/contribute_to_this_plugin.md +5 -0
  28. nomad_semantic_web_service-0.0.0/docs/how_to/install_this_plugin.md +51 -0
  29. nomad_semantic_web_service-0.0.0/docs/how_to/use_this_plugin.md +82 -0
  30. nomad_semantic_web_service-0.0.0/docs/index.md +64 -0
  31. nomad_semantic_web_service-0.0.0/docs/reference/references.md +75 -0
  32. nomad_semantic_web_service-0.0.0/docs/stylesheets/extra.css +69 -0
  33. nomad_semantic_web_service-0.0.0/docs/theme/partials/header.html +86 -0
  34. nomad_semantic_web_service-0.0.0/docs/tutorial/tutorial.md +94 -0
  35. nomad_semantic_web_service-0.0.0/mkdocs.yml +59 -0
  36. nomad_semantic_web_service-0.0.0/pyproject.toml +161 -0
  37. nomad_semantic_web_service-0.0.0/scripts/generate_custom_dict.sh +56 -0
  38. nomad_semantic_web_service-0.0.0/setup.cfg +4 -0
  39. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service/__init__.py +0 -0
  40. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service/apis/__init__.py +23 -0
  41. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service/apis/api.py +378 -0
  42. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service/catalogue/__init__.py +5 -0
  43. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service/catalogue/demo_data.py +100 -0
  44. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service/catalogue/facilities.py +81 -0
  45. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service/catalogue/icat.py +416 -0
  46. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service/catalogue/ontology.py +105 -0
  47. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service/catalogue/search.py +155 -0
  48. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service/ontologies/ESRFET.owl +5723 -0
  49. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service/schema_packages/__init__.py +38 -0
  50. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service/schema_packages/auto_convert.py +115 -0
  51. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service/schema_packages/downloaded_dataset.py +174 -0
  52. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service/schema_packages/schema.py +521 -0
  53. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service.egg-info/PKG-INFO +261 -0
  54. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service.egg-info/SOURCES.txt +71 -0
  55. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service.egg-info/dependency_links.txt +1 -0
  56. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service.egg-info/entry_points.txt +4 -0
  57. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service.egg-info/requires.txt +19 -0
  58. nomad_semantic_web_service-0.0.0/src/nomad_semantic_web_service.egg-info/top_level.txt +1 -0
  59. nomad_semantic_web_service-0.0.0/tests/apis/test_api.py +104 -0
  60. nomad_semantic_web_service-0.0.0/tests/catalogue/test_facilities.py +137 -0
  61. nomad_semantic_web_service-0.0.0/tests/catalogue/test_facilities_live.py +31 -0
  62. nomad_semantic_web_service-0.0.0/tests/catalogue/test_icat.py +332 -0
  63. nomad_semantic_web_service-0.0.0/tests/catalogue/test_icat_live.py +127 -0
  64. nomad_semantic_web_service-0.0.0/tests/catalogue/test_search.py +43 -0
  65. nomad_semantic_web_service-0.0.0/tests/conftest.py +5 -0
  66. nomad_semantic_web_service-0.0.0/tests/data/.gitkeep +0 -0
  67. nomad_semantic_web_service-0.0.0/tests/data/esrf_bm23_dac6_10.1.h5 +0 -0
  68. nomad_semantic_web_service-0.0.0/tests/data/test.archive.yaml +8 -0
  69. nomad_semantic_web_service-0.0.0/tests/data/test_default_dates.archive.yaml +6 -0
  70. nomad_semantic_web_service-0.0.0/tests/data/test_panet.archive.yaml +8 -0
  71. nomad_semantic_web_service-0.0.0/tests/schema_packages/test_auto_convert.py +102 -0
  72. nomad_semantic_web_service-0.0.0/tests/schema_packages/test_downloaded_dataset.py +127 -0
  73. nomad_semantic_web_service-0.0.0/tests/schema_packages/test_schema_package.py +285 -0
@@ -0,0 +1,34 @@
1
+ {
2
+ "template": "https://github.com/FAIRmat-NFDI/cookiecutter-nomad-plugin",
3
+ "commit": "970fdbb387269545102f25e6a16f7a7b422c9414",
4
+ "checkout": null,
5
+ "context": {
6
+ "cookiecutter": {
7
+ "full_name": "Lukas Pielsticker",
8
+ "email": "lukas.pielsticker@physik.hu-berlin.de",
9
+ "github_username": "FAIRmat-NFDI",
10
+ "plugin_name": "nomad-semantic-web-service",
11
+ "module_name": "nomad_semantic_web_service",
12
+ "short_description": "A tool to query public synchrotron dataset catalogues with semantic OpenAPI annotations.",
13
+ "version": "0.1.0",
14
+ "license": "Apache-2.0",
15
+ "include_schema_package": true,
16
+ "include_normalizer": false,
17
+ "include_parser": false,
18
+ "include_app": false,
19
+ "include_example_uploads": false,
20
+ "include_action": false,
21
+ "include_api": true,
22
+ "include_north_tools": false,
23
+ "north_tool_name": "my_north_tool",
24
+ "include_citation_file": true,
25
+ "_copy_without_render": [
26
+ "*.html",
27
+ "*.png"
28
+ ],
29
+ "_template": "https://github.com/FAIRmat-NFDI/cookiecutter-nomad-plugin",
30
+ "_commit": "970fdbb387269545102f25e6a16f7a7b422c9414"
31
+ }
32
+ },
33
+ "directory": null
34
+ }
@@ -0,0 +1,52 @@
1
+ BESSY
2
+ Beamline
3
+ DCAT
4
+ DCTERMS
5
+ ESRF
6
+ ESRFET
7
+ EXAFS
8
+ Giannis
9
+ ICAT
10
+ Koumoutsos
11
+ Lukas
12
+ Operando
13
+ PANET
14
+ Pids
15
+ Pielsticker
16
+ SPARQL
17
+ STARTDATE
18
+ STRSTARTS
19
+ TOMO
20
+ XANES
21
+ addopts
22
+ autoconvert
23
+ beamline
24
+ beamlines
25
+ beamtimes
26
+ behaviour
27
+ browsable
28
+ dataconverter
29
+ datamodel
30
+ dcat
31
+ dcterms
32
+ esrf
33
+ esrfet
34
+ gitmodules
35
+ icat
36
+ icatplus
37
+ ihhc
38
+ inhouse
39
+ mainfile
40
+ mainfiles
41
+ metainfo
42
+ microcrystals
43
+ ndarray
44
+ normalised
45
+ nxxas
46
+ orcid
47
+ owlready
48
+ panet
49
+ pids
50
+ pynxtools
51
+ pytestmark
52
+ zenodo
@@ -0,0 +1,25 @@
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2
+ // README at: https://github.com/devcontainers/templates/tree/main/src/python
3
+ {
4
+ "name": "Python 3",
5
+ // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6
+ "image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm",
7
+ // Features to add to the dev container. More info: https://containers.dev/features.
8
+ // "features": {},
9
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
10
+ // "forwardPorts": [],
11
+ // Use 'postCreateCommand' to run commands after the container is created.
12
+ "postCreateCommand": "pipx install cruft",
13
+ // Configure tool-specific properties.
14
+ "customizations": {
15
+ // Configure properties specific to VS Code.
16
+ "vscode": {
17
+ // Add the IDs of extensions you want installed when the container is created.
18
+ "extensions": [
19
+ "charliermarsh.ruff"
20
+ ]
21
+ }
22
+ }
23
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
24
+ // "remoteUser": "root"
25
+ }
@@ -0,0 +1,12 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for more information:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+ # https://containers.dev/guide/dependabot
6
+
7
+ version: 2
8
+ updates:
9
+ - package-ecosystem: "devcontainers"
10
+ directory: "/"
11
+ schedule:
12
+ interval: weekly
@@ -0,0 +1,43 @@
1
+ name: install-and-test-workflow
2
+
3
+ on: [push]
4
+
5
+ env:
6
+ UV_VERSION: 0.9
7
+ PYTHON_VERSION: 3.12
8
+ UV_SYSTEM_PYTHON: true
9
+
10
+ jobs:
11
+ install-and-test:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - name: Install uv
16
+ uses: astral-sh/setup-uv@v5
17
+ with:
18
+ version: ${{ env.UV_VERSION }}
19
+ - name: Setup Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ env.PYTHON_VERSION }}
23
+ - name: Install dependencies
24
+ run: |
25
+ uv sync --all-extras
26
+ - name: Test with pytest
27
+ run: |
28
+ uv run --with coverage coverage run -m pytest -sv
29
+ - name: Submit to coveralls
30
+ continue-on-error: true
31
+ env:
32
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33
+ run: |
34
+ uv run --with coveralls coveralls --service=github
35
+
36
+ ruff-linting:
37
+ runs-on: ubuntu-latest
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+ - uses: astral-sh/ruff-action@v3
41
+ - run: ruff check .
42
+ # Uncomment the following line to enable format check
43
+ # - run: ruff format --check .
@@ -0,0 +1,37 @@
1
+ name: Validate CITATION.cff
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - "CITATION.cff"
9
+ - ".github/workflows/cff-validation.yml"
10
+ pull_request:
11
+ branches:
12
+ - main
13
+ paths:
14
+ - "CITATION.cff"
15
+ - ".github/workflows/cff-validation.yml"
16
+
17
+ env:
18
+ PYTHON_VERSION: 3.12
19
+
20
+ jobs:
21
+ validate-cff:
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - name: Checkout repository
25
+ uses: actions/checkout@v4
26
+
27
+ - name: Install uv
28
+ uses: astral-sh/setup-uv@v5
29
+ with:
30
+ python-version: ${{ env.PYTHON_VERSION }}
31
+
32
+ - name: Test Zenodo conversion
33
+ run: |
34
+ # Remove the funding section to avoid validation issues with Zenodo
35
+ sed -i '/^funding:/,$d' CITATION.cff
36
+
37
+ uv run --with cffconvert cffconvert --validate --format zenodo || exit 1
@@ -0,0 +1,37 @@
1
+ name: Deploy MkDocs Site
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main # Triggers deployment on push to the main branch
7
+
8
+ env:
9
+ REGISTRY: ghcr.io
10
+ UV_VERSION: 0.9
11
+ PYTHON_VERSION: 3.12
12
+ UV_SYSTEM_PYTHON: true
13
+
14
+ permissions:
15
+ contents: write
16
+
17
+ jobs:
18
+ deploy:
19
+ runs-on: ubuntu-latest
20
+
21
+ steps:
22
+ - name: Checkout Repository
23
+ uses: actions/checkout@v4
24
+
25
+ - name: Install uv
26
+ uses: astral-sh/setup-uv@v5
27
+ with:
28
+ version: ${{ env.UV_VERSION }}
29
+
30
+ - name: Set up Python
31
+ uses: actions/setup-python@v5
32
+ with:
33
+ python-version: ${{ env.PYTHON_VERSION }}
34
+
35
+ - name: Build and Deploy
36
+ run: |
37
+ uv run --extra dev mkdocs gh-deploy --force --remote-branch gh-pages
@@ -0,0 +1,107 @@
1
+ name: Upload Python Package
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ env:
8
+ UV_VERSION: 0.12
9
+ PYTHON_VERSION: 3.12
10
+
11
+ jobs:
12
+ check-version:
13
+ name: Check Version
14
+ runs-on: ubuntu-latest
15
+ outputs:
16
+ git_tag_version: ${{ steps.git_tag_version.outputs.version }}
17
+ citation_version: ${{ steps.citation_version.outputs.version }}
18
+ steps:
19
+ - uses: actions/checkout@v6
20
+ with:
21
+ fetch-depth: 0
22
+ submodules: recursive
23
+
24
+ - name: Git tag version
25
+ id: git_tag_version
26
+ run: |
27
+ GIT_TAG_VERSION=${GITHUB_REF#refs/tags/v}
28
+ echo "version=$GIT_TAG_VERSION" >> "$GITHUB_OUTPUT"
29
+
30
+ - name: Citation version
31
+ id: citation_version
32
+ run: |
33
+ CITATION_VERSION=$(grep '^version:' CITATION.cff | cut -d' ' -f2)
34
+ echo "version=$CITATION_VERSION" >> "$GITHUB_OUTPUT"
35
+
36
+ test:
37
+ name: Run Tests
38
+ needs: check-version
39
+ runs-on: ubuntu-latest
40
+ steps:
41
+ - uses: actions/checkout@v6
42
+ with:
43
+ fetch-depth: 0
44
+ submodules: recursive
45
+ - name: Install uv and set the python version to ${{ env.PYTHON_VERSION }}
46
+ uses: astral-sh/setup-uv@v5
47
+ with:
48
+ version: ${{ env.UV_VERSION }}
49
+ python-version: ${{ env.PYTHON_VERSION }}
50
+ - name: Install nomad-semantic-web-service in editable mode
51
+ run: uv sync --extra dev
52
+ - name: Test with pytest
53
+ run: uv run pytest tests/
54
+
55
+ compare-versions:
56
+ name: Compare Versions
57
+ needs: check-version
58
+ runs-on: ubuntu-latest
59
+ steps:
60
+ - name: Fail if versions mismatch
61
+ run: |
62
+ if [ "${{ needs.check-version.outputs.git_tag_version }}" != "${{ needs.check-version.outputs.citation_version }}" ]; then
63
+ echo "Version mismatch: Git tag is ${{ needs.check-version.outputs.git_tag_version }}, CITATION.cff is ${{ needs.check-version.outputs.citation_version }}"
64
+ exit 1
65
+ fi
66
+
67
+ build:
68
+ name: Build Package
69
+ needs: [compare-versions, test]
70
+ runs-on: ubuntu-latest
71
+ steps:
72
+ - uses: actions/checkout@v6
73
+ with:
74
+ fetch-depth: 0
75
+ submodules: recursive
76
+ - name: Install uv and set the python version to ${{ env.PYTHON_VERSION }}
77
+ uses: astral-sh/setup-uv@v5
78
+ with:
79
+ version: ${{ env.UV_VERSION }}
80
+ python-version: ${{ env.PYTHON_VERSION }}
81
+ - name: Build package
82
+ run: uv build
83
+ - name: Check distributions
84
+ run: uvx twine check dist/*
85
+ - name: Upload dist artifacts
86
+ uses: actions/upload-artifact@v4
87
+ with:
88
+ name: dist-artifacts
89
+ path: dist/
90
+
91
+ deploy:
92
+ name: Upload to PyPI
93
+ needs: build
94
+ runs-on: ubuntu-latest
95
+ environment:
96
+ name: pypi
97
+ url: https://pypi.org/p/nomad-semantic-web-service
98
+ permissions:
99
+ id-token: write
100
+ steps:
101
+ - name: Download dist artifacts
102
+ uses: actions/download-artifact@v4
103
+ with:
104
+ name: dist-artifacts
105
+ path: dist/
106
+ - name: Publish package distributions to PyPI
107
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,10 @@
1
+ name: reuse
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ reuse-compliance-check:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v4
10
+ - uses: fsfe/reuse-action@v5
@@ -0,0 +1,32 @@
1
+ name: Spell Check
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [master]
6
+
7
+ jobs:
8
+ spellcheck:
9
+ runs-on: ubuntu-latest
10
+
11
+ steps:
12
+ - name: Checkout code
13
+ uses: actions/checkout@v4
14
+
15
+ - name: Install dependencies and dictionary
16
+ run: |
17
+ npm install -g cspell jq @cspell/dict-scientific-terms-us
18
+
19
+ - name: Run cspell
20
+ run: |
21
+ cspell --config cspell.json \
22
+ "README.md" "CITATION.cff" \
23
+ "docs/**/*" \
24
+ "src/nomad_semantic_web_service/**/*.py" \
25
+ "tests/**/*.py"
26
+
27
+ - name: Fail on errors
28
+ run: |
29
+ if [[ $? -ne 0 ]]; then
30
+ echo "There are spelling errors in your code. Please fix them and try again."
31
+ exit 1
32
+ fi
@@ -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/
@@ -0,0 +1,40 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.15.19
4
+ hooks:
5
+ - id: ruff-check
6
+ files: ^(src/nomad_semantic_web_service|tests)/.*\.py$
7
+ - id: ruff-format
8
+ files: ^(src/nomad_semantic_web_service|tests)/.*\.py$
9
+
10
+ - repo: https://github.com/pre-commit/mirrors-mypy
11
+ rev: v1.20.2
12
+ hooks:
13
+ - id: mypy # static type checking
14
+ additional_dependencies:
15
+ - types-PyYAML
16
+
17
+ - repo: https://github.com/asottile/pyupgrade
18
+ rev: v3.21.2
19
+ hooks:
20
+ - id: pyupgrade
21
+ args: [--py310-plus] # modernizes syntax for Python 3.10+
22
+
23
+ - repo: https://github.com/kynan/nbstripout
24
+ rev: 0.9.1
25
+ hooks:
26
+ - id: nbstripout # removes notebook outputs before committing
27
+
28
+ - repo: https://github.com/streetsidesoftware/cspell-cli
29
+ rev: v10.0.1
30
+ hooks:
31
+ - id: cspell # spellchecking
32
+ pass_filenames: false
33
+ args:
34
+ - --config
35
+ - cspell.json
36
+ - README.md
37
+ - CITATION.cff
38
+ - docs/**/*
39
+ - src/nomad_semantic_web_service/**/*.py
40
+ - tests/**/*.py
@@ -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,0 +1,27 @@
1
+ cff-version: 1.2.0
2
+ title: 'nomad-semantic-web-service: A NOMAD plugin for semantic search and extraction of public synchrotron dataset records'
3
+ version: 0.1.1
4
+ message:
5
+ If you use this software, please cite it using the
6
+ metadata from this file.
7
+ type: software
8
+ authors:
9
+ - given-names: Lukas
10
+ family-names: Pielsticker
11
+ orcid: 'https://orcid.org/0000-0000-0000-0000'
12
+ doi: 10.5281/zenodo.0000000
13
+ repository-code: https://github.com/FAIRmat-NFDI/nomad-semantic-web-service
14
+ url: https://zenodo.org/records/0000000
15
+ keywords:
16
+ - NOMAD
17
+ - NeXus
18
+ - ESRF
19
+ - ontologies
20
+ abstract:
21
+ nomad-semantic-web-service is a NOMAD plugin that finds and extracts public
22
+ synchrotron dataset records from ESRF-style catalogues, with semantic OpenAPI
23
+ annotations and PANET/ESRFET ontology term mapping.
24
+ license: Apache-2.0
25
+ funding:
26
+ - name: Funding Agency
27
+ award: 123456