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

Package #2

Merged
merged 4 commits into from
Feb 21, 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
32 changes: 29 additions & 3 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,42 @@ 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 simulationworkflownormalizer 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:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1
with:
args: "check"
28 changes: 28 additions & 0 deletions .github/workflows/mkdocs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: deploy-mkdocs

on:
push:
branches:
- develop # Triggers deployment on push to the main branch

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material==8.1.1 pymdown-extensions mkdocs-click

- name: Build and Deploy
run: |
mkdocs gh-deploy --config-file ../nomad-normalizer-plugin-simulation-workflow/mkdocs.yml --force --remote-branch gh-pages
54 changes: 54 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: upload-package

on:
release:
types: [published]

jobs:
github-release:
name: >-
Sign the Python distribution with Sigstore
and upload them to GitHub Release
runs-on: ubuntu-latest
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
1 change: 1 addition & 0 deletions docs/assets/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nomad-oasis*.zip
Binary file added docs/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/nomad-plugin-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/explanation/explanation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Explanation

!!! note "Attention"
Please update the document with relevant information specific to your plugin.
4 changes: 4 additions & 0 deletions docs/how_to/contribute_to_the_documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Contribute to the documentation

!!! note "Attention"
Please update the document with relevant information specific to your plugin.
5 changes: 5 additions & 0 deletions docs/how_to/contribute_to_this_plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Contribute to This Plugin

!!! note "Attention"
Please update the document with relevant information specific to your plugin.

4 changes: 4 additions & 0 deletions docs/how_to/install_this_plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Install This Plugin

!!! note "Attention"
Please update the document with relevant information specific to your plugin.
10 changes: 10 additions & 0 deletions docs/how_to/use_this_plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# How to Use This Plugin

This plugin can be used in a NOMAD Oasis instalation..

## Add This Plugin to Your NOMAD instalation

Read the [NOMAD plugin documentation](https://nomad-lab.eu/prod/v1/staging/docs/plugins/plugins.html#add-a-plugin-to-your-nomad) for all details on how to deploy the plugin on your NOMAD instance.

!!! note "Attention"
Please update the document with relevant information specific to your plugin.
48 changes: 48 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Welcome to the `nomad-normalizer-plugin-simulation-workflow` documentation

This is the normalizer for simulation workflow.

## Introduction

!!! note "Attention"
Please update the document with relevant information specific to your plugin.

<div markdown="block" class="home-grid">
<div markdown="block">

### Tutorial

A series of tutorials will guide you through the main functionality of `nomad-normalizer-plugin-simulation-workflow`.

- [Tutorial](tutorial/tutorial.md)

</div>
<div markdown="block">

### How-to guides

How-to guides provide step-by-step instructions for a wide range of tasks, with the overarching topics:

- [Install this plugin](how_to/install_this_plugin.md)
- [Use this plugin](how_to/use_this_plugin.md)
- [Contribute to this plugin](how_to/contribute_to_this_plugin.md)
- [Contribute to the documentation](how_to/contribute_to_the_documentation.md)

</div>

<div markdown="block">

### Explanation

The explanation [section](explanation/explanation.md) provides background knowledge on this plugin.

</div>
<div markdown="block">

### Reference

The reference [section](reference/references.md) includes all CLI commands and arguments, all configuration options,
the possible schema annotations and their arguments, and a glossary of used terms.

</div>
</div>
4 changes: 4 additions & 0 deletions docs/reference/references.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# References

!!! note "Attention"
Please update the document with relevant information specific to your plugin.
69 changes: 69 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

.md-header__button.md-logo :where(img,svg) {
width: 100%;
height: 30px;
}

.md-header, .md-header__inner {
background-color: #fff;
color: #2A4CDF;
}

.md-header[data-md-state=shadow] {
box-shadow: 0px 2px 4px -1px rgb(0 0 0 / 20%), 0px 4px 5px 0px rgb(0 0 0 / 14%), 0px 1px 10px 0px rgb(0 0 0 / 12%);
transition: box-shadow 200ms linear;
}

.md-header__inner {
height: 80px;
}

.md-header__topic {
font-size: 24px;
}

.md-footer {
background-color: #2A4CDF;
}

.md-search__form:hover {
background-color: rgba(0,0,0,.13);
}

.md-typeset h1 {
color: black;
font-weight: 700;
}

.youtube {
position: relative;
width: 100%;
height: 0;
padding-bottom: 56.25%;
}

.youtube iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

.home-grid {
display: grid;
grid-template-columns: 1fr 1fr;
grid-column-gap: 24px;
row-gap: 24px;
}

.home-grid div {
border-radius: 4px;
padding: 24px;
background-color: #f3e9d9;
}

.home-grid h3 {
margin-top: 0;
font-weight: 700;
}
86 changes: 86 additions & 0 deletions docs/theme/partials/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{#-
This file was automatically generated - do not edit
-#}
{% set class = "md-header" %}
{% if "navigation.tabs.sticky" in features %}
{% set class = class ~ " md-header--lifted" %}
{% endif %}
<header class="{{ class }}" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="{{ lang.t('header.title') }}">
<a href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}" title="{{ config.site_name | e }}" class="md-header__button md-logo" aria-label="{{ config.site_name }}" data-md-component="logo">
{% include "partials/logo.html" %}
</a>
<label class="md-header__button md-icon" for="__drawer">
{% include ".icons/material/menu" ~ ".svg" %}
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
{{ config.site_name }}
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
{% if page and page.meta and page.meta.title %}
{{ page.meta.title }}
{% else %}
{{ page.title }}
{% endif %}
</span>
</div>
</div>
</div>
{% if not config.theme.palette is mapping %}
<form class="md-header__option" data-md-component="palette">
{% for option in config.theme.palette %}
{% set primary = option.primary | replace(" ", "-") | lower %}
{% set accent = option.accent | replace(" ", "-") | lower %}
<input class="md-option" data-md-color-media="{{ option.media }}" data-md-color-scheme="{{ option.scheme }}" data-md-color-primary="{{ primary }}" data-md-color-accent="{{ accent }}" {% if option.toggle %} aria-label="{{ option.toggle.name }}" {% else %} aria-hidden="true" {% endif %} type="radio" name="__palette" id="__palette_{{ loop.index }}">
{% if option.toggle %}
<label class="md-header__button md-icon" title="{{ option.toggle.name }}" for="__palette_{{ loop.index0 or loop.length }}" hidden>
{% include ".icons/" ~ option.toggle.icon ~ ".svg" %}
</label>
{% endif %}
{% endfor %}
</form>
{% endif %}
{% if config.extra.alternate %}
<div class="md-header__option">
<div class="md-select">
{% set icon = config.theme.icon.alternate or "material/translate" %}
<button class="md-header__button md-icon" aria-label="{{ lang.t('select.language.title') }}">
{% include ".icons/" ~ icon ~ ".svg" %}
</button>
<div class="md-select__inner">
<ul class="md-select__list">
{% for alt in config.extra.alternate %}
<li class="md-select__item">
<a href="{{ alt.link | url }}" hreflang="{{ alt.lang }}" class="md-select__link">
{{ alt.name }}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% endif %}
{% if "search" in config["plugins"] %}
<label class="md-header__button md-icon" for="__search">
{% include ".icons/material/magnify.svg" %}
</label>
{% include "partials/search.html" %}
{% endif %}
{% if config.repo_url %}
<div class="md-header__source">
{% include "partials/source.html" %}
</div>
{% endif %}
</nav>
{% if "navigation.tabs.sticky" in features %}
{% if "navigation.tabs" in features %}
{% include "partials/tabs.html" %}
{% endif %}
{% endif %}
</header>
4 changes: 4 additions & 0 deletions docs/tutorial/tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Tutorial

!!! note "Attention"
Please update the document with relevant information specific to your plugin.
Loading
Loading