diff --git a/.github/workflows/python-actions.yaml b/.github/workflows/python-actions.yaml index 5caeecb9..e9bb4c6c 100644 --- a/.github/workflows/python-actions.yaml +++ b/.github/workflows/python-actions.yaml @@ -1,9 +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 @@ -14,13 +12,39 @@ jobs: - name: Install dependencies run: | pip install --upgrade pip - pip install .[dev] + # we need the latest nomad version for testing + pip install nomad-lab[infrastructure]@git+https://github.com/nomad-coe/nomad.git@develop + pip install '.[dev]' --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple + pip install coverage coveralls - 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: diff --git a/pyproject.toml b/pyproject.toml index 2611baec..9719968c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,21 +3,21 @@ requires = ["setuptools"] build-backend = "setuptools.build_meta" [project] -name = 'atomisticparsers' -version = '1.0' -description = 'Collection of NOMAD parsers for atomistic codes.' +name = "atomisticparsers" +version = "1.0" +description = "Collection of NOMAD parsers for atomistic codes." 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", "simulationparsers@git+https://github.com/nomad-coe/simulation-parsers.git@develop", - 'lxml==4.7.1', - 'MDAnalysis', - 'panedr==0.2', - 'scipy>=1.7.1', + "lxml==4.7.1", + "MDAnalysis", + "panedr==0.2", + "scipy>=1.7.1", ] [project.urls] @@ -25,16 +25,16 @@ homepage = "https://github.com/nomad-coe/atomistic-parsers" [project.optional-dependencies] dev = [ - 'mypy==1.0.1', - 'pylint==2.13.9', - 'pylint_plugin_utils==0.7', - 'pycodestyle==2.8.0', - 'pytest>= 5.3.0, <= 8.0.2', - 'pytest-timeout==1.4.2', - 'pytest-cov==2.7.1', - 'astroid>=2.5.1', - 'typing-extensions==4.4.0', - 'ruff==0.1.8' + "mypy==1.0.1", + "pylint==2.13.9", + "pylint_plugin_utils==0.7", + "pycodestyle==2.8.0", + "pytest>= 5.3.0, <= 8.0.2", + "pytest-timeout==1.4.2", + "pytest-cov==2.7.1", + "astroid>=2.5.1", + "typing-extensions==4.4.0", + "ruff==0.1.8" ] [tool.ruff] @@ -67,4 +67,4 @@ include = [ ] # package names should match these glob patterns (["*"] by default) [tool.setuptools.package-data] -atomisticparsers = ['*/metadata.yaml', '*/README.md'] +atomisticparsers = ["*/metadata.yaml", "*/README.md"]