Skip to content

Commit

Permalink
Remove run schema from nomad (#11)
Browse files Browse the repository at this point in the history
* Use run schema plugin

* Add missing dependency

* Fix tests data

* Add ruff
  • Loading branch information
ladinesa authored Feb 5, 2024
1 parent 73b16ee commit 04fccb0
Show file tree
Hide file tree
Showing 4 changed files with 387 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/python-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ jobs:
- name: Test with pytest
run: |
python -m pytest -sv tests
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1
34 changes: 33 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,45 @@ tests = [
'pytest-timeout==1.4.2',
'pytest-cov==2.7.1',
'astroid==2.11.7',
'typing-extensions==4.4.0'
'typing-extensions==4.4.0',
'ruff==0.1.4',
]

[tool.ruff]
include = ["electronicparsers/*.py", "tests/*.py"]
select = [
"E", # pycodestyle
"W", # pycodestyle
"PL", # pylint
]
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
]
fixable = ["ALL"]

[tool.setuptools.packages.find]
include = [
"databaseparsers*",
]

[tool.setuptools.package-data]
databaseparsers = ['*/metadata.yaml', '*/README.md']

[tool.mypy]
strict = false
ignore_missing_imports = true
follow_imports = "silent"
no_strict_optional = true
disable_error_code = "import, annotation-unchecked"
12 changes: 11 additions & 1 deletion tests/data/openkim/openkim_archive_data.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"run": [
{
"m_def": "runschema.run.Run",
"program": {
"name": "OpenKIM",
"version": "TE_776080871867_007",
Expand Down Expand Up @@ -61,6 +62,7 @@
]
},
{
"m_def": "runschema.run.Run",
"program": {
"name": "OpenKIM",
"version": "TE_929921425793_007",
Expand Down Expand Up @@ -121,6 +123,7 @@
]
},
{
"m_def": "runschema.run.Run",
"program": {
"name": "OpenKIM",
"version": "TE_162589006162_007",
Expand Down Expand Up @@ -181,6 +184,7 @@
]
},
{
"m_def": "runschema.run.Run",
"program": {
"name": "OpenKIM",
"version": "TE_162589006162_007",
Expand Down Expand Up @@ -241,6 +245,7 @@
]
},
{
"m_def": "runschema.run.Run",
"program": {
"name": "OpenKIM",
"version": "TE_162589006162_007",
Expand Down Expand Up @@ -301,6 +306,7 @@
]
},
{
"m_def": "runschema.run.Run",
"program": {
"name": "OpenKIM",
"version": "TE_162589006162_007",
Expand Down Expand Up @@ -361,6 +367,7 @@
]
},
{
"m_def": "runschema.run.Run",
"program": {
"name": "OpenKIM",
"version": "TE_162589006162_007",
Expand Down Expand Up @@ -421,6 +428,7 @@
]
},
{
"m_def": "runschema.run.Run",
"program": {
"name": "OpenKIM",
"version": "TE_162589006162_007",
Expand Down Expand Up @@ -481,6 +489,7 @@
]
},
{
"m_def": "runschema.run.Run",
"program": {
"name": "OpenKIM",
"version": "TE_162589006162_007",
Expand Down Expand Up @@ -541,6 +550,7 @@
]
},
{
"m_def": "runschema.run.Run",
"program": {
"name": "OpenKIM",
"version": "TE_162589006162_007",
Expand Down Expand Up @@ -601,4 +611,4 @@
]
}
]
}
}
Loading

0 comments on commit 04fccb0

Please sign in to comment.