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

Fix nomad dependency #12

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 31 additions & 5 deletions .github/workflows/python-actions.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: test
name: install-and-test-workflow
on: [push]
jobs:
install-test:
install-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -12,7 +12,10 @@ jobs:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install .[tests]
# we need the latest nomad version for testing
pip install nomad-lab[infrastructure]@git+https://github.com/nomad-coe/nomad.git@develop
pip install '.[tests]' --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
pip install coverage coveralls
- name: pycodestyle
run: |
python -m pycodestyle --ignore=E501,E701,E731 *parsers tests
Expand All @@ -22,10 +25,33 @@ jobs:
- name: mypy
run: |
python -m mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional *parsers tests

- name: Test with pytest
if: success() || failure()
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
build-and-install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Build the package
run: |
pip install --upgrade pip
pip install build
python -m build --sdist
- name: Install the package
run: |
pip install dist/*.tar.gz --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
ruff:
runs-on: ubuntu-latest
steps:
Expand Down
29 changes: 14 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = 'databaseparsers'
version = '1.0'
description = 'Collection of NOMAD parsers for databases.'
name = "databaseparsers"
version = "1.0"
description = "Collection of NOMAD parsers for databases."
readme = "README.md"
authors = [{ name = "The NOMAD Authors" }]
license = { file = "LICENSE" }
dependencies = [
"nomad-lab[infrastructure]@git+https://github.com/nomad-coe/nomad.git@develop",
"nomad-schema-plugin-simulation-workflow@git+https://github.com/nomad-coe/nomad-schema-plugin-simulation-workflow.git@develop",
"nomad-schema-plugin-run@git+https://github.com/nomad-coe/nomad-schema-plugin-run.git@develop"
]
Expand All @@ -20,16 +19,16 @@ homepage = "https://github.com/nomad-coe/database-parsers"

[project.optional-dependencies]
tests = [
'mypy==1.0.1',
'pylint==2.13.9',
'pylint_plugin_utils==0.5',
'pycodestyle==2.8.0',
'pytest==3.10.0',
'pytest-timeout==1.4.2',
'pytest-cov==2.7.1',
'astroid==2.11.7',
'typing-extensions==4.4.0',
'ruff==0.1.4',
"mypy==1.0.1",
"pylint==2.13.9",
"pylint_plugin_utils==0.5",
"pycodestyle==2.8.0",
"pytest==3.10.0",
"pytest-timeout==1.4.2",
"pytest-cov==2.7.1",
"astroid==2.11.7",
"typing-extensions==4.4.0",
"ruff==0.1.4",
]

[tool.ruff]
Expand Down Expand Up @@ -62,7 +61,7 @@ include = [
]

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

[tool.mypy]
strict = false
Expand Down
Loading