Skip to content

Commit d6fd368

Browse files
authored
Merge pull request #149 from pyiron/main
Merge master
2 parents 281bf5d + bae9914 commit d6fd368

24 files changed

+375
-165
lines changed

.ci_support/environment.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ dependencies:
55
- coveralls
66
- coverage
77
- codacy-coverage
8-
- pandas =1.4.3
8+
- pandas =1.5.2
99
- pyyaml =6.0
1010
- jinja2 =3.1.2
11-
- paramiko =2.11.0
12-
- tqdm =4.64.0
11+
- paramiko =2.12.0
12+
- tqdm =4.64.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
exclude:
2-
- master
2+
- main
33
delete_closed_pr: false

.github/variables/cache_number.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CACHE_NUMBER=0

.github/workflows/UpdateDependabotPR.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: UpdateDependabotPR
22

33
on:
44
pull_request_target:
5-
branches: [ master ]
5+
branches: [ main ]
66

77
jobs:
88
build:

.github/workflows/black.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: Black
55

66
on:
77
push:
8-
branches: [ master ]
8+
branches: [ main ]
99
pull_request:
10-
branches: [ master ]
10+
branches: [ main ]
1111

1212
jobs:
1313
build:

.github/workflows/coverage.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/format_black.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow will checkout the branch of the PR, apply black formatting and commit the result to the PR. Does not work for forks.
2+
3+
name: Format black
4+
5+
on:
6+
pull_request:
7+
types: [labeled]
8+
9+
jobs:
10+
build:
11+
if: contains(github.event.pull_request.labels.*.name, 'format_black' )
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
with:
18+
token: ${{ secrets.DEPENDABOT_WORKFLOW_TOKEN }}
19+
ref: ${{ github.event.pull_request.head.ref }} # Check out the head of the actual branch, not the PR
20+
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
21+
- name: format black
22+
uses: psf/black@stable
23+
with:
24+
options: ""
25+
src: "./pysqa"
26+
- name: commit
27+
run: |
28+
git config --local user.email "pyiron@mpie.de"
29+
git config --local user.name "pyiron-runner"
30+
git commit -m "Format black" -a
31+
- name: push
32+
uses: ad-m/github-push-action@master
33+
with:
34+
github_token: ${{ secrets.DEPENDABOT_WORKFLOW_TOKEN }}
35+
branch: ${{ github.event.pull_request.head.ref }}

.github/workflows/pypicheck.yml

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,45 @@
1+
# This workflow is used to test, if the installation of the pypi package works
2+
13
name: Pip check
24

35
on:
46
push:
5-
branches: [ master ]
7+
branches: [ main ]
68
pull_request:
7-
branches: [ master ]
9+
branches: [ main ]
810

911
jobs:
1012
build:
13+
1114
runs-on: ubuntu-latest
15+
1216
steps:
13-
- uses: actions/checkout@v2
14-
- uses: conda-incubator/setup-miniconda@v2
15-
with:
16-
python-version: "3.10"
17-
mamba-version: "*"
18-
channels: conda-forge
19-
channel-priority: strict
20-
auto-update-conda: true
21-
environment-file: .ci_support/environment.yml
22-
- name: Setup
23-
shell: bash -l {0}
24-
run: |
25-
pip install --no-deps .
26-
pip check
17+
- uses: actions/checkout@v2
18+
- name: Setup environment
19+
run: cp .ci_support/environment.yml environment.yml
20+
- name: Setup Mambaforge
21+
uses: conda-incubator/setup-miniconda@v2
22+
with:
23+
python-version: '3.10'
24+
miniforge-variant: Mambaforge
25+
channels: conda-forge
26+
channel-priority: strict
27+
activate-environment: my-env
28+
use-mamba: true
29+
- name: Set cache date and number
30+
run: |
31+
echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
32+
cat .github/variables/cache_number.env >> $GITHUB_ENV
33+
- uses: actions/cache@v2
34+
with:
35+
path: /usr/share/miniconda3/envs/my-env
36+
key: linux-64-py-3-10-conda-${{ hashFiles('environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
37+
id: cache
38+
- name: Update environment
39+
run: mamba env update -n my-env -f environment.yml
40+
if: steps.cache.outputs.cache-hit != 'true'
41+
- name: Pip check
42+
shell: bash -l {0}
43+
run: |
44+
pip install --no-deps .
45+
pip check

.github/workflows/unittest.yml

Lines changed: 75 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,92 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: Python package
4+
name: Unittests
55

66
on:
77
push:
8-
branches: [ master ]
8+
branches: [ main ]
99
pull_request:
10-
branches: [ master ]
10+
branches: [ main ]
11+
12+
env:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
1115

1216
jobs:
1317
build:
1418

1519
runs-on: ${{ matrix.operating-system }}
1620
strategy:
1721
matrix:
18-
operating-system: [ubuntu-latest, windows-latest, macos-latest]
19-
python-version: ['3.10']
2022
include:
21-
- operating-system: ubuntu-latest
22-
python-version: 3.8
23-
- operating-system: ubuntu-latest
24-
python-version: 3.9
23+
- operating-system: macos-latest
24+
python-version: '3.11'
25+
label: osx-64-py-3-11
26+
prefix: /Users/runner/miniconda3/envs/my-env
27+
28+
- operating-system: windows-latest
29+
python-version: '3.11'
30+
label: win-64-py-3-11
31+
prefix: C:\Miniconda3\envs\my-env
32+
33+
- operating-system: ubuntu-latest
34+
python-version: '3.11'
35+
label: linux-64-py-3-11
36+
prefix: /usr/share/miniconda3/envs/my-env
37+
38+
- operating-system: ubuntu-latest
39+
python-version: '3.10'
40+
label: linux-64-py-3-10
41+
prefix: /usr/share/miniconda3/envs/my-env
42+
43+
- operating-system: ubuntu-latest
44+
python-version: 3.9
45+
label: linux-64-py-3-9
46+
prefix: /usr/share/miniconda3/envs/my-env
47+
48+
- operating-system: ubuntu-latest
49+
python-version: 3.8
50+
label: linux-64-py-3-8
51+
prefix: /usr/share/miniconda3/envs/my-env
2552

2653
steps:
27-
- uses: actions/checkout@v2
28-
- uses: conda-incubator/setup-miniconda@v2
29-
with:
30-
python-version: ${{ matrix.python-version }}
31-
mamba-version: "*"
32-
channels: conda-forge
33-
channel-priority: strict
34-
auto-update-conda: true
35-
environment-file: .ci_support/environment.yml
36-
- name: Setup
37-
shell: bash -l {0}
38-
run: |
39-
pip install --no-deps .
40-
- name: Test
41-
shell: bash -l {0}
42-
run: coverage run --omit pysqa/_version.py -m unittest discover tests
54+
- uses: actions/checkout@v2
55+
- name: Setup environment
56+
run: cp .ci_support/environment.yml environment.yml
57+
- name: Setup Mambaforge
58+
uses: conda-incubator/setup-miniconda@v2
59+
with:
60+
python-version: ${{ matrix.python-version }}
61+
miniforge-variant: Mambaforge
62+
channels: conda-forge
63+
channel-priority: strict
64+
activate-environment: my-env
65+
use-mamba: true
66+
- name: Set cache date and number
67+
run: |
68+
echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
69+
cat .github/variables/cache_number.env >> $GITHUB_ENV
70+
- uses: actions/cache@v2
71+
with:
72+
path: ${{ matrix.prefix }}
73+
key: ${{ matrix.label }}-conda-${{ hashFiles('environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
74+
id: cache
75+
- name: Update environment
76+
run: mamba env update -n my-env -f environment.yml
77+
if: steps.cache.outputs.cache-hit != 'true'
78+
- name: Setup
79+
shell: bash -l {0}
80+
run: |
81+
pip install --no-deps .
82+
- name: Test
83+
shell: bash -l {0}
84+
run: coverage run --omit pysqa/_version.py -m unittest discover tests
85+
- name: Coverage
86+
if: matrix.label == 'linux-64-py-3-10'
87+
shell: bash -l {0}
88+
run: |
89+
coverage combine
90+
coveralls
91+
coverage xml
92+
python-codacy-coverage -r coverage.xml

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Simple queue adapter for python
33

44
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9db80cb2477f46be870d1446540b4bf3)](https://www.codacy.com/app/pyiron-runner/pysqa?utm_source=github.com&utm_medium=referral&utm_content=pyiron/pysqa&utm_campaign=Badge_Grade_Dashboard)
55
[![Python package](https://github.com/pyiron/pysqa/workflows/Python%20package/badge.svg)](https://github.com/pyiron/pysqa/actions)
6-
[![Coverage Status](https://coveralls.io/repos/github/pyiron/pysqa/badge.svg?branch=master)](https://coveralls.io/github/pyiron/pysqa?branch=master)
6+
[![Coverage Status](https://coveralls.io/repos/github/pyiron/pysqa/badge.svg?branch=main)](https://coveralls.io/github/pyiron/pysqa?branch=main)
77

88
The goal of pysqa is to make submitting to an HPC cluster as easy as starting another subprocess. This is based on the assumption that even though modern queuing systems allow for an wide range of different configuration, most users submit the majority of their jobs with very similar parameters. Therefore pysqa allows the users to store their submission scripts as jinja2 templates for quick access. After the submission pysqa allows the users to track the progress of their jobs, delete them or enable reservations using the built-in functionality of the queuing system. The currently supported queuing systems are: LFS, MOAB, SGE (tested), SLURM (tested), TORQUE.
99

@@ -19,7 +19,7 @@ Or via anaconda from the conda-forge channel
1919

2020
# Usage
2121
pysqa requires the user to configure the type of queuing system as well as the available templates. Example configuration are available at:
22-
https://github.com/pyiron/pysqa/tree/master/tests/config
22+
https://github.com/pyiron/pysqa/tree/main/tests/config
2323
By default pysqa is searching for the queue configuration in `~/.queues/queue.yaml` and the corresponding jinja2 templates in the same folder.
2424

2525
Import pysqa:
@@ -53,14 +53,14 @@ Delete a job from the queuing sytem:
5353

5454
Sample configurations for the specific queuing systems are availabe in the tests:
5555

56-
* lsf - https://github.com/pyiron/pysqa/tree/master/tests/config/lsf
57-
* moab - https://github.com/pyiron/pysqa/tree/master/tests/config/moab
58-
* SGE - https://github.com/pyiron/pysqa/tree/master/tests/config/sge
59-
* slurm - https://github.com/pyiron/pysqa/tree/master/tests/config/slurm
60-
* torque - https://github.com/pyiron/pysqa/tree/master/tests/config/torque
56+
* lsf - https://github.com/pyiron/pysqa/tree/main/tests/config/lsf
57+
* moab - https://github.com/pyiron/pysqa/tree/main/tests/config/moab
58+
* SGE - https://github.com/pyiron/pysqa/tree/main/tests/config/sge
59+
* slurm - https://github.com/pyiron/pysqa/tree/main/tests/config/slurm
60+
* torque - https://github.com/pyiron/pysqa/tree/main/tests/config/torque
6161

6262
# License
63-
pysqa is released under the BSD license https://github.com/pyiron/pysqa/blob/master/LICENSE . It is a spin-off of the pyiron project https://github.com/pyiron/pyiron therefore if you use pysqa for your publication, please cite:
63+
pysqa is released under the BSD license https://github.com/pyiron/pysqa/blob/main/LICENSE . It is a spin-off of the pyiron project https://github.com/pyiron/pyiron therefore if you use pysqa for your publication, please cite:
6464

6565
@article{pyiron-paper,
6666
title = {pyiron: An integrated development environment for computational materials science},

0 commit comments

Comments
 (0)