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

Merge main #1545

Merged
merged 67 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
8f527c1
wrap_executable(): Add automatic renaming just like wrap_python_funct…
jan-janssen Jul 13, 2024
f076ade
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 13, 2024
087d3a1
remove job_name parameter from use cases
jan-janssen Jul 13, 2024
27aa65a
Bump monty from 2024.5.24 to 2024.7.12
dependabot[bot] Jul 15, 2024
4edd048
Bump pympipool from 0.8.5 to 0.9.1
dependabot[bot] Jul 15, 2024
b0df10f
[dependabot skip] Update environment
github-actions[bot] Jul 15, 2024
3250a32
Bump pint from 0.24.1 to 0.24.3
dependabot[bot] Jul 15, 2024
56bd072
[dependabot skip] Update environment
github-actions[bot] Jul 15, 2024
3e6b4fb
[dependabot skip] Update environment
github-actions[bot] Jul 15, 2024
5070d45
Merge pull request #1532 from pyiron/dependabot/pip/pint-0.24.3
jan-janssen Jul 15, 2024
ffcf53e
Merge pull request #1530 from pyiron/dependabot/pip/monty-2024.7.12
jan-janssen Jul 15, 2024
c840407
Switch to executorlib
jan-janssen Jul 15, 2024
7041119
Merge pull request #1531 from pyiron/dependabot/pip/pympipool-0.9.1
jan-janssen Jul 15, 2024
489206d
Implement suggestion from Marvin
jan-janssen Jul 15, 2024
30b2410
Update pyiron_base/project/generic.py
jan-janssen Jul 15, 2024
23281df
Always set automatically_rename
jan-janssen Jul 15, 2024
9ba488a
Merge remote-tracking branch 'origin/exe_auto_job_name' into exe_auto…
jan-janssen Jul 15, 2024
53fea33
Following Sam's suggestion to rename the job during creation
jan-janssen Jul 15, 2024
c7e12d8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 15, 2024
324327f
fixes plus additonal test
jan-janssen Jul 15, 2024
998e186
set job_name first
jan-janssen Jul 15, 2024
26687fc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 15, 2024
7860013
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jul 15, 2024
82fecbf
Merge pull request #1534 from pyiron/pre-commit-ci-update-config
jan-janssen Jul 15, 2024
df6bcaa
fix hashing
jan-janssen Jul 15, 2024
381955d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 15, 2024
1b1a0d5
Update executablecontainer.py
jan-janssen Jul 15, 2024
ad77e29
test all different naming schemes
jan-janssen Jul 15, 2024
8d45d6a
Merge pull request #1529 from pyiron/exe_auto_job_name
jan-janssen Jul 15, 2024
506d86c
Add optional dependencies: gitpython, jinja2 and pint
jan-janssen Jul 16, 2024
5434b4a
Skip tests if the corresponding dependencies are not available
jan-janssen Jul 16, 2024
28ddc00
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 16, 2024
2e6781e
fixes
jan-janssen Jul 16, 2024
678cb00
Merge remote-tracking branch 'refs/remotes/origin/optional_dependenci…
jan-janssen Jul 16, 2024
6700544
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 16, 2024
488cff5
skip test_size() if pint is not available
jan-janssen Jul 16, 2024
45cdc6d
Merge remote-tracking branch 'origin/optional_dependencies' into opti…
jan-janssen Jul 16, 2024
7ffaeca
skip test_maintenance_get_repository_status() if gitpython is not ava…
jan-janssen Jul 16, 2024
4c284fe
Merge pull request #1537 from pyiron/optional_dependencies
jan-janssen Jul 16, 2024
e38e53b
Fix install dependencies
jan-janssen Jul 16, 2024
d495cff
Merge pull request #1538 from pyiron/fix_install_dependencies
jan-janssen Jul 16, 2024
770397b
Fix multi dimensional arrays with FlattenedStorage.to_pandas
pmrv Oct 27, 2023
909074d
Never pass None to assert_array_equal
pmrv Jul 16, 2024
d95ae83
Add tests for multidimensional arrays and to_pandas
pmrv Jul 16, 2024
741d5c4
Move flattenedstorage tests
pmrv Jul 16, 2024
0029936
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 16, 2024
c900fb6
Remove old flattened test
pmrv Jul 16, 2024
8d8d58c
Revert default in _assert_equal_numpy
pmrv Jul 16, 2024
878f6b8
Be more specific in try/except for regression
pmrv Jul 17, 2024
7bc4bde
Merge pull request #1335 from pyiron/topandas
pmrv Jul 17, 2024
868157b
Remove Codacy
jan-janssen Jul 18, 2024
277d7d0
Merge pull request #1540 from pyiron/remove_codacy
jan-janssen Jul 18, 2024
ec3eb46
Update pyproject.toml
jan-janssen Jul 18, 2024
8058b02
Update environment-docs.yml
jan-janssen Jul 18, 2024
4c9d5bb
Update environment-mini.yml
jan-janssen Jul 18, 2024
c7495eb
Update environment.yml
jan-janssen Jul 18, 2024
2f31973
Update environment.yml
jan-janssen Jul 18, 2024
ad3ba5c
Merge pull request #1541 from pyiron/h5io_browser
jan-janssen Jul 18, 2024
fbf9a1a
Bugfix: Interactive calculation array comparison
jan-janssen Jul 19, 2024
8436d53
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 19, 2024
110c883
Merge pull request #1542 from pyiron/interactive
jan-janssen Jul 19, 2024
5c48d2f
Bump pyiron-snippets from 0.1.2 to 0.1.3
dependabot[bot] Jul 20, 2024
32544c6
Update environment.yml
jan-janssen Jul 20, 2024
f113369
Update environment-docs.yml
jan-janssen Jul 20, 2024
d927aa6
Update environment.yml
jan-janssen Jul 20, 2024
54dff46
Update environment-mini.yml
jan-janssen Jul 20, 2024
40d617b
Merge pull request #1536 from pyiron/dependabot/pip/pyiron-snippets-0…
jan-janssen Jul 20, 2024
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
10 changes: 5 additions & 5 deletions .ci_support/environment-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ dependencies:
- conda_subprocess =0.0.4
- cloudpickle =3.0.0
- gitpython =3.1.43
- h5io_browser =0.0.15
- h5io_browser =0.0.16
- h5py =3.11.0
- jinja2 =3.1.4
- monty =2024.5.24
- monty =2024.7.12
- numpy =1.26.4
- pandas =2.2.2
- pint =0.24.1
- pint =0.24.3
- psutil =6.0.0
- pyfileindex =0.0.25
- pyiron_snippets =0.1.2
- pympipool =0.8.5
- pyiron_snippets =0.1.3
- executorlib =0.0.1
- pysqa =0.1.21
- pytables =3.9.2
- sqlalchemy =2.0.31
Expand Down
18 changes: 18 additions & 0 deletions .ci_support/environment-mini.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
channels:
- conda-forge
dependencies:
- cloudpickle =3.0.0
- h5io_browser =0.0.16
- h5py =3.11.0
- monty =2024.7.12
- numpy =1.26.4
- pandas =2.2.2
- psutil =6.0.0
- pyfileindex =0.0.25
- pyiron_snippets =0.1.3
- executorlib =0.0.1
- pysqa =0.1.21
- pytables =3.9.2
- sqlalchemy =2.0.31
- tqdm =4.66.4
- traitlets =5.14.3
2 changes: 1 addition & 1 deletion .ci_support/environment-old.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- psutil =5.8.0
- pyfileindex =0.0.16
- pyiron_snippets =0.1.1
- pympipool =0.8.0
- executorlib =0.0.1
- pysqa =0.1.12
- pytables =3.6.1
- sqlalchemy =2.0.22
Expand Down
10 changes: 5 additions & 5 deletions .ci_support/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ dependencies:
- conda_subprocess =0.0.4
- cloudpickle =3.0.0
- gitpython =3.1.43
- h5io_browser =0.0.15
- h5io_browser =0.0.16
- h5py =3.11.0
- jinja2 =3.1.4
- monty =2024.5.24
- monty =2024.7.12
- numpy =1.26.4
- pandas =2.2.2
- pint =0.24.1
- pint =0.24.3
- psutil =6.0.0
- pyfileindex =0.0.25
- pyiron_snippets =0.1.2
- pympipool =0.8.5
- pyiron_snippets =0.1.3
- executorlib =0.0.1
- pysqa =0.1.21
- pytables =3.9.2
- sqlalchemy =2.0.31
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
sed -i "/${package}/s/${from}/${to}/g" binder/environment.yml
sed -i "/${package}/s/${from}/${to}/g" .ci_support/environment.yml
sed -i "/${package}/s/${from}/${to}/g" .ci_support/environment-docs.yml
sed -i "/${package}/s/${from}/${to}/g" .ci_support/environment-mini.yml
- name: UpdateDependabotPR commit
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/minimal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow is used to run the unittest of pyiron

name: Minimal

on:
push:
branches: [ main ]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Mambaforge
uses: conda-incubator/setup-miniconda@v3
with:
python-version: '3.12'
miniforge-variant: Mambaforge
channels: conda-forge
channel-priority: strict
activate-environment: my-env
environment-file: .ci_support/environment-mini.yml
use-mamba: true
- name: Test
shell: bash -l {0}
timeout-minutes: 10
run: |
python .ci_support/pyironconfig.py
bash .ci_support/pip_install.sh
python -m unittest discover tests/unit
6 changes: 0 additions & 6 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,3 @@ jobs:
- name: Coveralls
if: matrix.label == 'linux-64-py-3-11'
uses: coverallsapp/github-action@v2
- name: Codacy
if: matrix.label == 'linux-64-py-3-11' && github.event_name != 'push'
continue-on-error: True
shell: bash -l {0}
run: |
python-codacy-coverage -r coverage.xml
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.1
rev: v0.5.2
hooks:
- id: ruff
name: ruff lint
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ simulation in `pyiron_atomistics`.
can be wrapped in `pyiron_base` to enable parameter studies with thousands or millions of calculation.
* The calculation can either be executed locally on the same computer or on high performance computing (HPC) resources.
The python simple queuing system adapter [pysqa](https://pysqa.readthedocs.io) is used to interface with the HPC
queuing systems directly from python and the [pympipool](https://pympipool.readthedocs.io) package is employed to
queuing systems directly from python and the [pympipool](https://executorlib.readthedocs.io) package is employed to
assign dedicated resources like multiple CPU cores and GPUs to individual python functions.
* Scientific data is efficiently stored using the [hierarchical data format (HDF)](https://www.hdfgroup.org) via the
[h5py](https://www.h5py.org) python library and more specifically the [h5io](https://github.com/h5io) packages to
Expand Down
10 changes: 5 additions & 5 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ dependencies:
- conda_subprocess =0.0.4
- cloudpickle =3.0.0
- gitpython =3.1.43
- h5io_browser =0.0.15
- h5io_browser =0.0.16
- h5py =3.11.0
- jinja2 =3.1.4
- monty =2024.5.24
- monty =2024.7.12
- numpy =1.26.4
- pandas =2.2.2
- pint =0.24.1
- pint =0.24.3
- psutil =6.0.0
- pyfileindex =0.0.25
- pyiron_snippets =0.1.2
- pympipool =0.8.5
- pyiron_snippets =0.1.3
- executorlib =0.0.1
- pysqa =0.1.21
- pytables =3.9.2
- sqlalchemy =2.0.31
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ selected. Still it is important to mention, that assigning 120 CPU cores does no
function. Only by implementing internal parallelization inside the python functions with solutions like
[concurrent.futures.ProcessPoolExecutor](https://docs.python.org/3/library/concurrent.futures.html#processpoolexecutor)
it is possible to parallelize the execution of python functions on a single compute node. Finally, the pyiron developers
released the [pympipool](https://pympipool.readthedocs.io) to enable parallelization of python functions as well as the
released the [pympipool](https://executorlib.readthedocs.io) to enable parallelization of python functions as well as the
direct assignment of GPU resources inside a given queuing system allocation over multiple compute nodes using the
hierarchical queuing system [flux](https://flux-framework.org).

Expand Down
2 changes: 1 addition & 1 deletion pyiron_base/_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def setUp(self):

def _assert_equal_numpy(self, a, b, msg=None):
try:
np.testing.assert_array_equal(a, b, err_msg=msg)
np.testing.assert_array_equal(a, b, err_msg=msg if msg is not None else "")
except AssertionError as e:
raise self.failureException(*e.args) from None

Expand Down
4 changes: 2 additions & 2 deletions pyiron_base/jobs/datamining.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def create_table(self, file, job_status_list, executor=None, enforce_update=Fals
The executor, if given, must not naively pickle the mapped functions or
arguments, as PyironTable relies on lambda functions internally. Use
with executors that rely on dill or cloudpickle instead. Pyiron
provides such executors in the `pympipool` sub packages.
provides such executors in the `executorlib` sub packages.

Args:
file (FileHDFio): HDF were the previous state of the table is stored
Expand Down Expand Up @@ -785,7 +785,7 @@ def update_table(self, job_status_list=None):
self.project.db.item_update({"timestart": datetime.now()}, self.job_id)
with self.project_hdf5.open("input") as hdf5_input:
if self._executor_type is None and self.server.cores > 1:
self._executor_type = "pympipool.Executor"
self._executor_type = "executorlib.Executor"
if self._executor_type is not None:
with self._get_executor(max_workers=self.server.cores) as exe:
self._pyiron_table.create_table(
Expand Down
6 changes: 3 additions & 3 deletions pyiron_base/jobs/job/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1620,15 +1620,15 @@ def _get_executor(self, max_workers=None):
"No executor type defined - Please set self.executor_type."
)
elif (
self._executor_type == "pympipool.Executor"
self._executor_type == "executorlib.Executor"
and platform.system() == "Darwin"
):
# The Mac firewall might prevent connections based on the network address - especially Github CI
return import_class(self._executor_type)(
max_cores=max_workers, hostname_localhost=True
)
elif self._executor_type == "pympipool.Executor":
# The pympipool Executor defines max_cores rather than max_workers
elif self._executor_type == "executorlib.Executor":
# The executorlib Executor defines max_cores rather than max_workers
return import_class(self._executor_type)(max_cores=max_workers)
elif isinstance(self._executor_type, str):
return import_class(self._executor_type)(max_workers=max_workers)
Expand Down
25 changes: 15 additions & 10 deletions pyiron_base/jobs/job/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,16 +268,21 @@ def interactive_flush(self, path="interactive", include_last_step=False):
step=self.interactive_write_frequency,
include_last=include_last_step,
)
if (
len(data) > 0
and isinstance(data[0], list)
and len(np.shape(data)) == 1
):
self._extend_hdf(h5=h5, path=path, key=key, data=data)
elif np.array(data).dtype == np.dtype("O"):
self._extend_hdf(h5=h5, path=path, key=key, data=data)
else:
self._extend_hdf(h5=h5, path=path, key=key, data=np.array(data))
try:
if (
len(data) > 0
and isinstance(data[0], list)
and len(np.shape(data)) == 1
):
self._extend_hdf(h5=h5, path=path, key=key, data=data)
elif np.array(data).dtype == np.dtype("O"):
self._extend_hdf(h5=h5, path=path, key=key, data=data)
else:
self._extend_hdf(h5=h5, path=path, key=key, data=np.array(data))
except ValueError:
self._extend_hdf(
h5=h5, path=path, key=key, data=np.array(data, dtype="object")
)
self.interactive_cache[key] = []

def interactive_open(self):
Expand Down
3 changes: 2 additions & 1 deletion pyiron_base/jobs/job/runfunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from datetime import datetime
from typing import List, Optional, Tuple

from jinja2 import Template
from pyiron_snippets.deprecate import deprecate

from pyiron_base.jobs.job.wrapper import JobWrapper
Expand Down Expand Up @@ -1008,6 +1007,8 @@ def execute_job_with_calculate_function(job):


def _generate_flux_execute_string(job, database_is_disabled):
from jinja2 import Template

if not database_is_disabled:
executable_template = Template(
"#!/bin/bash\n"
Expand Down
Loading
Loading