Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor plugin structure #69

Merged
merged 29 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
42495bf
refactored structure
aalbino2 Aug 21, 2024
1ee7a38
updated toml file and relaunched ruff linting
aalbino2 Aug 21, 2024
3cb97a1
further lintage activities
aalbino2 Aug 21, 2024
94607cd
fixed ruff formatting and test files
aalbino2 Aug 21, 2024
605a6c4
reverted nomad-lab version in toml
aalbino2 Aug 21, 2024
568c852
added aliases and updated README
aalbino2 Aug 21, 2024
e383792
extended conductivity-type quantity
aalbino2 Aug 22, 2024
0b7b2a0
added carrier density deviation quantity
aalbino2 Aug 22, 2024
fce8953
harmonized type=float everywhere
aalbino2 Aug 22, 2024
dec6731
remove unused import
aalbino2 Aug 22, 2024
6488a66
filled default values in special Geometry shapes
aalbino2 Aug 22, 2024
4487f43
Bump up nomad-lab to 1.3.4dev
ka-sarthak Aug 22, 2024
56abd81
fixed reference to substrate holder
aalbino2 Aug 22, 2024
f2596f8
InsertReduction class refinements
aalbino2 Aug 22, 2024
155c58d
fixed InsertReduction reference
aalbino2 Aug 22, 2024
7663493
refined recipe classes
aalbino2 Aug 23, 2024
cad2769
refined recipe classes
aalbino2 Aug 23, 2024
aca633a
added starting and ending T in annealing step
aalbino2 Aug 23, 2024
17c64f4
Update src/nomad_material_processing/solution/__init__.py
aalbino2 Aug 23, 2024
ab8e1f8
reformatting
aalbino2 Aug 23, 2024
2d4c7ad
check if aliases work
aalbino2 Aug 26, 2024
31d77b9
reverted m_def to old paths in test files
aalbino2 Aug 26, 2024
0c400ee
reverted solution m_def
aalbino2 Aug 26, 2024
d211575
reverted nomad_material_processing.vapor_deposition.pvd.general.Physi…
aalbino2 Aug 26, 2024
b22304c
added print statement in tests
aalbino2 Aug 26, 2024
f87540b
added print statement in tests
aalbino2 Aug 26, 2024
6c56275
Explicitely load metainfo before tests. (#72)
markus1978 Aug 27, 2024
dd4d015
remove unused import
aalbino2 Aug 29, 2024
61f707e
formatting
aalbino2 Aug 29, 2024
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
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,25 @@ material processing.
pip install nomad-material-processing
```

### Setting up your OASIS
Read the [NOMAD plugin documentation](https://nomad-lab.eu/prod/v1/staging/docs/plugins/plugins.html#add-a-plugin-to-your-nomad) for all details on how to deploy the plugin on your NOMAD instance.

You don't need to modify the ```nomad.yaml``` configuration file of your NOMAD instance, beacuse the package is pip installed and all the available modules (entry points) are loaded.
To include, instead, only some of the entry points, you need to specify them in the ```include``` section of the ```nomad.yaml```. In the following lines, a list of all the available entry points:

```yaml
plugins:
include:
- "nomad_material_processing:schema"
- "nomad_material_processing.solution:schema"
- "nomad_material_processing.vapor_deposition.cvd:schema"
- "nomad_material_processing.vapor_deposition.pvd:schema"
- "nomad_material_processing.vapor_deposition.pvd:mbe_schema"
- "nomad_material_processing.vapor_deposition.pvd:pld_schema"
- "nomad_material_processing.vapor_deposition.pvd:sputtering_schema"
- "nomad_material_processing.vapor_deposition.pvd:thermal_schema"
```

### Development
This code is currently under development and for installing and contributing you should clone the repository:
```sh
Expand Down
10 changes: 0 additions & 10 deletions nomad.yaml

This file was deleted.

116 changes: 78 additions & 38 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,74 +6,101 @@ requires = [
build-backend = "setuptools.build_meta"

[project]
classifiers = [
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
]
name = "nomad-material-processing"
dynamic = ["version"]
description = "A plugin for NOMAD containing base sections for material processing."
readme = "README.md"
authors = [
{ name = "Sarthak Kapoor", email = '[email protected]' },
{ name = "Hampus Näsström", email = '[email protected]' },
{ name = "Andrea Albino", email = '[email protected]' },
{ name = "Sebastian Brückner", email = '[email protected]' },
]
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"License :: OSI Approved :: Apache Software License",
]
license = { file = "LICENSE" }
dependencies = [
"nomad-lab>=1.3.3.dev86",
]
[project.optional-dependencies]
dev = [
"pytest",
"ruff",
"structlog>=22.3.0",
"nomad-lab>=1.3.4dev",
]

[project.license]
file = "LICENSE"

[project.urls]
"Homepage" = "https://github.com/FAIRmat-NFDI/nomad-material-processing"
"Bug Tracker" = "https://github.com/FAIRmat-NFDI/nomad-material-processing/issues"

[tool.uv]
index-url = "https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple"


[project.optional-dependencies]
dev = [
"pytest",
"ruff",
"structlog",
]

[tool.ruff]
include = ["src/*.py", "tests/*.py"]

exclude = ["dependencies"]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]

# Same as Black.
line-length = 88
indent-width = 4

[tool.ruff.lint]
select = [
"E", # pycodestyle
"W", # pycodestyle
"PL", # pylint
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
"UP",
# isort
"I",
# pylint
"PL",
]

ignore = [
"E501", # Line too long ({width} > {limit} characters)
"E701", # Multiple statements on one line (colon)
"E731", # Do not assign a lambda expression, use a def
"E402", # Module level import not at top of file
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments in function definition
"PLR0915", # Too many statements
"PLR2004", # Magic value used instead of constant
"PLW0603", # Using the global statement
"PLW2901", # redefined-loop-name
"PLR1714", # consider-using-in
"PLR5501", # else-if-used
"F403", # 'from module import *' used; unable to detect undefined names
]

fixable = ["ALL"]

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

# this is entirely optional, you can remove this if you wish to
[tool.ruff.format]
# use single quotes for strings.
quote-style = "single"
Expand All @@ -87,9 +114,22 @@ skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"

[tool.setuptools]
package-dir = { "" = "src" }

[tool.setuptools.packages.find]
where = [
"src",
]
where = ["src"]

[project.entry-points.'nomad.plugin']

general_schema = "nomad_material_processing:schema"
solution_schema = "nomad_material_processing.solution:schema"
vd_schema = "nomad_material_processing.vapor_deposition:schema"
cvd_schema = "nomad_material_processing.vapor_deposition.cvd:schema"
pvd_schema = "nomad_material_processing.vapor_deposition.pvd:schema"
mbe_schema = "nomad_material_processing.vapor_deposition.pvd:mbe_schema"
pld_schema = "nomad_material_processing.vapor_deposition.pvd:pld_schema"
sputtering_schema = "nomad_material_processing.vapor_deposition.pvd:sputtering_schema"
thermal_schema = "nomad_material_processing.vapor_deposition.pvd:thermal_schema"

[tool.setuptools_scm]
Loading