Skip to content

Commit

Permalink
Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ladinesa committed Feb 16, 2024
1 parent 468acfb commit 3557c23
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 33 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,23 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install .[dev,tests]
pip install '.[dev]'
: # we need the latest nomad version for testing
pip install --ignore-installed nomad-lab[infrastructure]@git+https://github.com/nomad-coe/nomad.git@develop
pip install coverage coveralls
- name: mypy
run: |
python -m mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional runschema tests
- name: Test with pytest
if: success() || failure()
continue-on-error: true
run: |
python -m pytest -sv tests
python -m coverage run -m pytest -sv tests
- name: Submit to coveralls
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github
ruff:
runs-on: ubuntu-latest
steps:
Expand Down
78 changes: 48 additions & 30 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,75 @@ requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = 'nomad-schema-plugin-run'
version = '1.0'
description = 'Run schema plugin for NOMAD.'
name = "runschema"
version = "1.0"
description = "Run schema plugin for NOMAD."
readme = "README.md"
authors = [{ name = "The NOMAD Authors" }]
license = { text = "Apache-2.0" }
dependencies = [
"nomad-lab[infrastructure]@git+https://github.com/nomad-coe/nomad.git@develop"
"nomad-lab>=1.2.0"
]

[project.urls]
homepage = "https://github.com/nomad-coe/nomad-schema-plugin-run.git"

[project.optional-dependencies]
dev = [
'mypy==1.0.1',
'pytest==3.10.0',
'pytest-timeout==1.4.2',
'pytest-cov==2.7.1',
'ruff==0.1.4'
"mypy==1.0.1",
"pytest==3.10.0",
"pytest-timeout==1.4.2",
"pytest-cov==2.7.1",
"ruff==0.1.4"
]

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

# Assume Python 3.9
target-version = "py39"

[tool.ruff]
include = ["runschema/*.py", "tests/*.py"]
[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
"F401", # unused import
"PLR2004", # Magic values used in comparison
]
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"

# indent with spaces, rather than tabs.
indent-style = "space"

# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false

# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"

[tool.setuptools.packages.find]
include = ["runschema*"]

[tool.setuptools.package-data]
runschema = ['*/nomad_plugin.yaml']
runschema = ["*/nomad_plugin.yaml"]

0 comments on commit 3557c23

Please sign in to comment.