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

Setup ci #2

Merged
merged 20 commits into from
Jun 18, 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
4 changes: 4 additions & 0 deletions .ci_support/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
channels:
- conda-forge
dependencies:
- pyiron_workflow
38 changes: 38 additions & 0 deletions .github/workflows/run_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run workflow

on:
push:
branches: [ main ]
pull_request:
types: [labeled, opened, synchronize, reopened]
workflow_call:

jobs:
run_workflow:
if: |
github.event_name == 'push' ||
( github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'run_workflow' ))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup environment
uses: pyiron/actions/cached-miniforge@actions-3.2.0
with:
python-version: '3.11'
env-files: .ci_support/environment.yml
local-code-directory: ''
use-cache: 'true'
miniforge-channels: conda-forge
pip-install-versioneer: 'false'
no-build-isolation: 'false'
- name: Add papermill
shell: bash -l {0}
run: mamba install -n my-env papermill
- name: Execute workflow
shell: bash -l {0}
run: papermill workflow.ipynb workflow-out.ipynb -k python3
- name: Upload updated notebook as artifact
uses: actions/upload-artifact@v4
with:
name: workflow-out.ipynb
path: ./workflow-out.ipynb
Empty file added .gitignore
Empty file.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# graphathon

Playground for collaborative environment in order to create a workflow in parallel by distributing nodes (i.e. tasks) to different people.

## Basic idea

1. Create a workflow in a large group, with empty nodes with only inputs and outputs defined
2. Distribute the nodes to different people
3. As people finish their tasks, they push the nodes to the repository, where CI takes care of the workflow execution

More will follow...
A template repository for setting up an environment where nodes for a workflow using `pyiron_workflow` can be developed by different people in parallel.

Usage goes like so:
- the team sets up a dummy workflow using placeholder-vwersions of the involved nodes
- the team creates a repository using *this* repo as a template (especially anything located in `.github/` and `.ci_support/`)
- each dev opens a branch + PR for her work
- as soon as the `run_workflow` label is added to the PR, each push triggers workflow execution via actions.
- the updated notebook is uploaded as a github action artifact (Actions -> select CI run -> Artifacts). Download, unzip and view locally.
2 changes: 1 addition & 1 deletion nodes/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

@Workflow.wrap.as_function_node("travel_time")
def get_time(distance: float, speed: float) -> float:
return 10.
return 42.