-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Readme * black * fix CI * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * more fixes * fix project --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
58c35ba
commit 5697df0
Showing
12 changed files
with
235 additions
and
197 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,33 @@ | ||
# This workflow will checkout the branch of the PR, apply black formatting and commit the result to the PR. Does not work for forks. | ||
|
||
name: Format black | ||
|
||
on: | ||
pull_request: | ||
types: [labeled] | ||
|
||
jobs: | ||
build: | ||
if: contains(github.event.pull_request.labels.*.name, 'format_black' ) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.DEPENDABOT_WORKFLOW_TOKEN }} | ||
ref: ${{ github.event.pull_request.head.ref }} # Check out the head of the actual branch, not the PR | ||
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo | ||
- name: format black | ||
uses: psf/black@stable | ||
with: | ||
options: "" | ||
src: "./${{ github.event.repository.name }}" | ||
- name: commit | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "pyiron-runner" | ||
git commit -m "Format black" -a | ||
- name: push | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.DEPENDABOT_WORKFLOW_TOKEN }} | ||
branch: ${{ github.event.pull_request.head.ref }} |
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
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,29 @@ | ||
# Dataclasses for pyiron | ||
The `pyiron_dataclasses` module provides a series of [dataclasses](https://docs.python.org/3/library/dataclasses.html) | ||
for the `pyiron` workflow framework. It can load HDF5 files created by `pyiron_atomistics` and read the content stored | ||
in those files, without depending on `pyiron_atomistics`. Furthermore, it is not fixed to a single version of | ||
`pyiron_atomistics` but rather matches multiple versions of `pyiron_atomistics` to the same API version of | ||
`pyiron_dataclasses`. | ||
|
||
## Usage | ||
Using the `get_dataclass()` function of the built-in converter: | ||
```python | ||
from h5io_browser import read_dict_from_hdf | ||
from pyiron_dataclasses.v1.converter import get_dataclass | ||
|
||
job_classes = get_dataclass( | ||
job_dict=read_dict_from_hdf( | ||
file_name=job.project_hdf5.file_name, | ||
h5_path="/", | ||
recursive=True, | ||
slash='ignore', | ||
)[job.job_name] | ||
) | ||
job_classes | ||
``` | ||
|
||
## Supported Versions | ||
### Version 1 - `v1` | ||
Supported versions of `pyiron_atomistics`: | ||
* `0.6.13` | ||
* `0.6.12` |
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.