Skip to content

Commit

Permalink
Merge branch 'bring-in-examples' of github.com:FAIRmat-NFDI/pynxtools…
Browse files Browse the repository at this point in the history
…-apm into bring-in-examples
  • Loading branch information
lukaspie committed Oct 14, 2024
2 parents 72acb50 + 87a1965 commit 59ca76d
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ jobs:
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install coverage coveralls
- name: Install nomad
if: "${{ matrix.python_version != '3.8' && matrix.python_version != '3.12'}}"
run: |
uv pip install nomad-lab@git+https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR.git
- name: Install package
run: |
uv pip install ".[dev]"
Expand Down
5 changes: 5 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
prune *
exclude *
recursive-include src/pynxtools_apm *.py
include pyproject.toml README.md dev-requirements.txt
recursive-include src/pynxtools_apm/nomad/examples
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ docs = [
[project.entry-points."pynxtools.reader"]
apm = "pynxtools_apm.reader:APMReader"

[project.entry-points.'nomad.plugin']
apm_example = "pynxtools_mpes.nomad.entrypoints:apm_example"

[tool.setuptools.packages.find]
where = [
"src",
Expand Down
41 changes: 41 additions & 0 deletions src/pynxtools_apm/nomad/entrypoints.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# Copyright The NOMAD Authors.
#
# This file is part of NOMAD. See https://nomad-lab.eu for further info.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
"""Entry points for XPS examples."""

try:
from nomad.config.models.plugins import ExampleUploadEntryPoint
except ImportError as exc:
raise ImportError(
"Could not import nomad package. Please install the package 'nomad-lab'."
) from exc

apm_example = ExampleUploadEntryPoint(
title="Atom Probe Microscopy",
category="FAIRmat examples",
description="""
This example presents the capabilities of the NOMAD platform to store and standardize atom probe data.
It shows the generation of a NeXus file according to the
[NXapm](https://fairmat-nfdi.github.io/nexus_definitions/classes/contributed_definitions/NXapm.html#nxapm)
application definition and a successive analysis of an example data set.
The example contains a small atom probe dataset from an experiment with a LEAP instrument to get you started
and keep the size of your NOMAD installation small. Once started, we recommend changing the respective
input file in the NOMAD Oasis ELN to run the example with your own datasets.
""",
path="nomad/examples",
local_path="examples/data/uploads/apm.zip",
)
Empty file added tests/test_nomad_examples.py
Empty file.

0 comments on commit 59ca76d

Please sign in to comment.