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

Fixing parsing #3

Open
wants to merge 26 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d871aeb
Deleted level and added superinit in Parser
JosePizarro3 Jul 23, 2024
38347d1
Fixed archive.data def
JosePizarro3 Jul 24, 2024
7d780da
Deleted program.link
JosePizarro3 Jul 25, 2024
8f1b05e
Adding nomad-lab[infrastructure] for connecting with DFT entries
JosePizarro3 Jul 29, 2024
96beebe
Adding workflow parsing from VASP+Wannier90
JosePizarro3 Sep 17, 2024
35a7957
Added new workflow from nomad_simulations and changed pyproject toml
JosePizarro3 Sep 23, 2024
1c6d488
Fix path to nomad in pyproject toml
JosePizarro3 Sep 23, 2024
14e0d38
Fix entry point to MatchingParserInterface
JosePizarro3 Sep 23, 2024
a615363
Fix mypy
JosePizarro3 Sep 23, 2024
1e693aa
Added python3.10 and python3.11
JosePizarro3 Sep 25, 2024
55130ae
Fix readme
JosePizarro3 Sep 25, 2024
5ffef84
Standard name for entry point name
JosePizarro3 Sep 26, 2024
7786e9e
Move EntryArchive to typechecking
JosePizarro3 Sep 26, 2024
bbe5357
Fix parsing with example from Vikrant
JosePizarro3 Sep 27, 2024
c30e13f
Add testing for TMM data
JosePizarro3 Sep 27, 2024
776929e
Fix mypy
JosePizarro3 Sep 27, 2024
4be85cc
fix win parsing
JosePizarro3 Sep 27, 2024
8dc61ee
Minor docstring changes
JosePizarro3 Sep 27, 2024
dea8302
Comment out dft_cell vs tb_cell comparison
JosePizarro3 Sep 27, 2024
258398a
Printing stuff
JosePizarro3 Sep 27, 2024
0eca54e
Add workflow normalization
JosePizarro3 Sep 27, 2024
8a5f431
Fix imports
JosePizarro3 Sep 27, 2024
2c6fc54
Fix parsing DFTPlusTB
JosePizarro3 Sep 27, 2024
bf48a74
Update dep and fix README
JosePizarro3 Oct 2, 2024
3ad832d
New workflow schema
JosePizarro3 Oct 10, 2024
b2f7909
Fix import
JosePizarro3 Oct 10, 2024
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
37 changes: 17 additions & 20 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,43 @@ permissions:
checks: write
pull-requests: write

env:
UV_SYSTEM_PYTHON: true

jobs:
install-and-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python_version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
- name: Set up Python ${{matrix.python_version}}
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: ${{matrix.python_version}}
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install dependencies
run: |
pip install --upgrade pip
pip install uv
uv pip install -e '.[dev]' --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple --system
uv pip install coveralls --system
uv pip install -e '.[dev]'
- name: mypy
run: |
python -m mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional src/nomad_parser_wannier90/schema_packages src/nomad_parser_wannier90/parsers tests
- name: Build coverage file
run: |
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=src tests | tee pytest-coverage.txt
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: pytest-coverage.txt
junitxml-path: pytest.xml
- name: Submit to coveralls
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test with pytest
run: |
coveralls --service=github
python -m pytest -sv tests
build-and-install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.11
- name: Build the package
run: |
pip install uv
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Testing with coveralls Report
on: [push]

# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
# `contents` is for permission to the contents of the repository.
# `pull-requests` is for permission to pull request
permissions:
contents: write
checks: write
pull-requests: write

env:
UV_SYSTEM_PYTHON: true

jobs:
coveralls-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install dependencies
run: |
uv pip install -e '.[dev]'
uv pip install coveralls
- name: Build coverage file
run: |
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=src tests | tee pytest-coverage.txt
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: pytest-coverage.txt
junitxml-path: pytest.xml
- name: Submit to coveralls
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github
22 changes: 11 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@ on:
permissions:
contents: read

env:
UV_SYSTEM_PYTHON: true

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.9
uses: actions/setup-python@v3
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.9'

python-version: 3.11
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install dependencies
run: |
pip install --upgrade pip
pip install build

uv pip install build
- name: Build package
run: python -m build

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@ This is a plugin for [NOMAD](https://nomad-lab.eu) which contains the parser and

## Getting started

`nomad-parser-wannier90` can be installed as a PyPI package using `pip`. We require features from the `nomad-lab` package which are not publicly available in PyPI, so an extra flag `--index-url` needs to be specified when pip installing this package:
`nomad-parser-wannier90` can be installed as a PyPI package using `pip`:

> [!WARNING]
> Unfortunately, the current plugin mechanism is not supported by the latest nomad-lab version on PyPI and therefore an index url pointing to the NOMAD Gitlab registry needs to be added.

```sh
pip install nomad-parser-wannier90 --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
```

## Development

If you want to develop locally this package, clone the project and in the workspace folder, create a virtual environment (note this project uses Python 3.9):
If you want to develop locally this package, clone the project and in the workspace folder, create a virtual environment (you can use Python 3.9, 3.10, 3.11, or 3.12):
```sh
git clone https://github.com/nomad-coe/nomad-parser-wannier90.git
cd nomad-parser-wannier90
python3.9 -m venv .pyenv
python3.11 -m venv .pyenv
. .pyenv/bin/activate
```

Expand Down Expand Up @@ -148,8 +152,8 @@ Alternatively and only valid for your local NOMAD installation, you can modify `
plugins:
entry_points:
include:
- ["nomad_parser_wannier90.parsers:nomad_parser_wannier90_plugin"]
- ["nomad_parser_wannier90.schema_packages:nomad_parser_wannier90_schema"]
- ["nomad_parser_wannier90.parsers:parser_entry_point"]
- ["nomad_parser_wannier90.schema_packages:schema_package_entry_point"]
```

**Note!**
Expand Down
Loading