generated from FAIRmat-NFDI/nomad-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit after cruft generation
- Loading branch information
1 parent
324d33a
commit ef1759a
Showing
37 changed files
with
1,098 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"template": "https://github.com/FAIRmat-NFDI/cookiecutter-nomad-plugin", | ||
"commit": "e759475d3f8905df4354ca83d8ce6cd632ffce99", | ||
"checkout": null, | ||
"context": { | ||
"cookiecutter": { | ||
"full_name": "Jose Pizarro", | ||
"email": "[email protected]", | ||
"github_username": "FAIRmat-NFDI", | ||
"plugin_name": "nomad-parser-vasp", | ||
"module_name": "nomad_parser_vasp", | ||
"short_description": "A NOMAD parser plugin for VASP input/output files.", | ||
"version": "0.1.0", | ||
"license": "Apache Software License 2.0", | ||
"include_schema_package": true, | ||
"include_normalizer": false, | ||
"include_parser": true, | ||
"include_app": false, | ||
"include_example_uploads": false, | ||
"_copy_without_render": [ | ||
"*.html" | ||
], | ||
"_template": "https://github.com/FAIRmat-NFDI/cookiecutter-nomad-plugin" | ||
} | ||
}, | ||
"directory": null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: install-and-test | ||
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: | ||
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 ${{matrix.python_version}} | ||
uses: actions/setup-python@v5 | ||
with: | ||
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 | ||
uv pip install -e '.[dev]' | ||
- name: mypy | ||
run: | | ||
python -m mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional src/nomad_parser_vasp/schema_packages src/nomad_parser_vasp/parsers tests | ||
- name: Test with pytest | ||
run: | | ||
python -m pytest -sv tests | ||
build-and-install: | ||
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: Build the package | ||
run: | | ||
pip install uv | ||
uv pip install --upgrade pip --system | ||
uv pip install build --system | ||
python -m build --sdist | ||
- name: Install the package | ||
run: | | ||
uv pip install dist/*.tar.gz --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple --system | ||
ruff-linting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: chartboost/ruff-action@v1 | ||
with: | ||
args: "check ." | ||
ruff-formatting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: chartboost/ruff-action@v1 | ||
with: | ||
args: "format . --check --verbose" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Deploy MkDocs Site | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # Triggers deployment on push to the main branch | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Deploy docs | ||
uses: mhausenblas/mkdocs-deploy-gh-pages@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CONFIG_FILE: mkdocs.yml | ||
REQUIREMENTS: requirements_docs.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Build and Publish Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
UV_SYSTEM_PYTHON: true | ||
|
||
jobs: | ||
deploy: | ||
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: | | ||
pip install --upgrade pip | ||
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: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
.pyenv | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"editor.rulers": [ | ||
90 | ||
], | ||
"editor.renderWhitespace": "all", | ||
"editor.tabSize": 4, | ||
"files.trimTrailingWhitespace": true, | ||
"[python]": { | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "explicit", | ||
"source.organizeImports": "explicit" | ||
}, | ||
"editor.defaultFormatter": "charliermarsh.ruff" | ||
}, | ||
"python.testing.pytestArgs": [ | ||
"tests" | ||
], | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.