Skip to content

Commit

Permalink
Fix nomad dependency (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
ladinesa authored Mar 13, 2024
1 parent 235e3d4 commit c7c6781
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 30 deletions.
38 changes: 30 additions & 8 deletions .github/workflows/python-actions.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +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 @@ -15,15 +12,40 @@ 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
pip install types-PyYAML
- 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-linting:
runs-on: ubuntu-latest
steps:
Expand Down
44 changes: 22 additions & 22 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,40 @@ requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = 'workflowparsers'
version = '1.0'
description = 'Collection of NOMAD parsers for workflow engines.'
name = "workflowparsers"
version = "1.0"
description = "Collection of NOMAD parsers for workflow engines."
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-lab>=1.2.0",
"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",
'lxml',
'asr',
'xarray>=0.19.0',
'phonopy',
'h5py>=3.4.0',
"lxml",
"asr",
"xarray>=0.19.0",
"phonopy",
"h5py>=3.4.0",
]

[project.urls]
homepage = "https://github.com/nomad-coe/electronic-parsers"

[project.optional-dependencies]
tests = [
'mypy==1.0.1',
'pytest==3.10.0',
'pytest-timeout==1.4.2',
'pytest-cov==2.7.1',
'astroid==2.11.7',
'lxml==4.7.1',
'asr==0.4.1',
'xarray==0.20.2',
'phonopy==2.11.0',
'h5py==3.6.0',
'typing-extensions==4.4.0',
'ruff==0.1.8',
"mypy==1.0.1",
"pytest==3.10.0",
"pytest-timeout==1.4.2",
"pytest-cov==2.7.1",
"astroid==2.11.7",
"lxml==4.7.1",
"asr==0.4.1",
"xarray==0.20.2",
"phonopy==2.11.0",
"h5py==3.6.0",
"typing-extensions==4.4.0",
"ruff==0.1.8",
]

[tool.ruff]
Expand Down Expand Up @@ -84,7 +84,7 @@ line-ending = "auto"
include = ["workflowparsers*"]

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

[tool.mypy]
strict = false
Expand Down

0 comments on commit c7c6781

Please sign in to comment.