From 219b5ce7f4bebcc374dfd23ad49fca3989a8ab3d Mon Sep 17 00:00:00 2001 From: Liam Huber Date: Wed, 22 May 2024 13:02:35 -0700 Subject: [PATCH] Specify tags for reusable CI (#215) --- .binder/environment.yml | 38 ++++++++++++++----------- .ci_support/environment-notebooks.yml | 4 +-- .ci_support/environment.yml | 35 +++++++++++++---------- .github/workflows/daily.yml | 6 ++-- .github/workflows/dependabot-pr.yml | 2 +- .github/workflows/pr-labeled.yml | 2 +- .github/workflows/pr-target-opened.yml | 2 +- .github/workflows/push-pull-main.yml | 16 ----------- .github/workflows/push-pull.yml | 19 +++++++++++++ .github/workflows/release.yml | 2 +- .github/workflows/weekly.yml | 2 +- docs/environment.yml | 39 ++++++++++++++++---------- ironflow/model/dtypes.py | 6 ++-- ironflow/utils.py | 1 + setup.py | 34 +++++++++++----------- 15 files changed, 117 insertions(+), 91 deletions(-) delete mode 100644 .github/workflows/push-pull-main.yml create mode 100644 .github/workflows/push-pull.yml diff --git a/.binder/environment.yml b/.binder/environment.yml index e117af35..12fec6af 100644 --- a/.binder/environment.yml +++ b/.binder/environment.yml @@ -1,21 +1,25 @@ channels: - conda-forge dependencies: -- ipycanvas -- ipython -- ipywidgets == 7.* -- maggma >= 0.57.1 -- matplotlib -- nglview <= 3.0.9 -- numpy -- owlready2 -- pandas -- pyiron_base -- pyiron_atomistics >= 0.2.57 -- pyiron_gui >= 0.0.8 -- pyiron_ontology == 0.1.3 +- python >=3.10,<3.12 +- aimsgb =0.1.3 +- ipycanvas =0.13.2 +- ipython =8.24.0 +- ipywidgets =7.7.1 +- jupyterlab =3.6.7 +- matplotlib =3.8.4 +- nglview =3.0.8 +- numpy =1.26.4 +- openjdk =22.0.1 +- owlready2 =0.46 +- pandas =1.5.3 +- pyiron-data =0.0.27 +- pyiron_atomistics = 0.2.63 +- pyiron_base =0.5.33 +- pyiron_gui =0.0.8 +- pyiron_ontology =0.1.3 +- pymatgen =2023.5.10 - ryvencore =0.3.1.1 -- seaborn -- traitlets -- python >= 3.8 -- lammps +- seaborn =0.13.2 +- traitlets =5.14.3 +- lammps =2024.02.07 diff --git a/.ci_support/environment-notebooks.yml b/.ci_support/environment-notebooks.yml index 7ba96a82..a5b490df 100644 --- a/.ci_support/environment-notebooks.yml +++ b/.ci_support/environment-notebooks.yml @@ -1,5 +1,5 @@ channels: - conda-forge dependencies: - - python >= 3.8 - - lammps + - python >=3.10, <3.12 + - lammps =2024.02.07 diff --git a/.ci_support/environment.yml b/.ci_support/environment.yml index 2b6566a6..d024dd12 100644 --- a/.ci_support/environment.yml +++ b/.ci_support/environment.yml @@ -1,19 +1,24 @@ channels: - conda-forge dependencies: - - ipycanvas - - ipython - - ipywidgets == 7.* - - maggma >= 0.57.1 - - matplotlib - - nglview <= 3.0.9 - - numpy - - owlready2 - - pandas - - pyiron_base - - pyiron_atomistics >= 0.2.57 - - pyiron_gui >= 0.0.8 - - pyiron_ontology == 0.1.3 + - python >=3.10,<3.12 + - aimsgb =0.1.3 + - ipycanvas =0.13.2 + - ipython =8.24.0 + - ipywidgets =7.7.1 + - jupyterlab =3.6.7 + - matplotlib =3.8.4 + - nglview =3.0.8 + - numpy =1.26.4 + - openjdk =22.0.1 + - owlready2 =0.46 + - pandas =1.5.3 + - pyiron-data =0.0.27 + - pyiron_atomistics = 0.2.63 + - pyiron_base =0.5.33 + - pyiron_gui =0.0.8 + - pyiron_ontology =0.1.3 + - pymatgen =2023.5.10 - ryvencore =0.3.1.1 - - seaborn - - traitlets + - seaborn =0.13.2 + - traitlets =5.14.3 diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 6fed36c3..96a37f6e 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -8,5 +8,7 @@ on: jobs: codeql: - uses: pyiron/actions/.github/workflows/tests-and-coverage.yml@main - secrets: inherit \ No newline at end of file + uses: pyiron/actions/.github/workflows/tests-and-coverage.yml@actions-3.1.0 + secrets: inherit + with: + python-version: '3.11' \ No newline at end of file diff --git a/.github/workflows/dependabot-pr.yml b/.github/workflows/dependabot-pr.yml index 1ec64454..0559d311 100644 --- a/.github/workflows/dependabot-pr.yml +++ b/.github/workflows/dependabot-pr.yml @@ -6,5 +6,5 @@ on: jobs: pyiron: - uses: pyiron/actions/.github/workflows/dependabot-pr.yml@main + uses: pyiron/actions/.github/workflows/dependabot-pr.yml@actions-3.1.0 secrets: inherit \ No newline at end of file diff --git a/.github/workflows/pr-labeled.yml b/.github/workflows/pr-labeled.yml index 4d5e8aa2..7881d907 100644 --- a/.github/workflows/pr-labeled.yml +++ b/.github/workflows/pr-labeled.yml @@ -8,5 +8,5 @@ on: jobs: pyiron: - uses: pyiron/actions/.github/workflows/pr-labeled.yml@main + uses: pyiron/actions/.github/workflows/pr-labeled.yml@actions-3.1.0 secrets: inherit \ No newline at end of file diff --git a/.github/workflows/pr-target-opened.yml b/.github/workflows/pr-target-opened.yml index afdda9d1..48b14f1f 100644 --- a/.github/workflows/pr-target-opened.yml +++ b/.github/workflows/pr-target-opened.yml @@ -8,5 +8,5 @@ on: jobs: pyiron: - uses: pyiron/actions/.github/workflows/pr-target-opened.yml@main + uses: pyiron/actions/.github/workflows/pr-target-opened.yml@actions-2.0.7 secrets: inherit \ No newline at end of file diff --git a/.github/workflows/push-pull-main.yml b/.github/workflows/push-pull-main.yml deleted file mode 100644 index 1b2aaf76..00000000 --- a/.github/workflows/push-pull-main.yml +++ /dev/null @@ -1,16 +0,0 @@ -# This runs jobs which pyiron modules should run on pushes or PRs to main - -name: Push-Pull-main - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - pyiron: - uses: pyiron/actions/.github/workflows/push-pull-main.yml@main - secrets: inherit - with: - notebooks-env-files: .ci_support/environment.yml .ci_support/environment-notebooks.yml \ No newline at end of file diff --git a/.github/workflows/push-pull.yml b/.github/workflows/push-pull.yml new file mode 100644 index 00000000..141e35be --- /dev/null +++ b/.github/workflows/push-pull.yml @@ -0,0 +1,19 @@ +# This runs jobs which pyiron modules should run on pushes or PRs to main + +name: Push-Pull + +on: + push: + branches: [ main ] + pull_request: + +jobs: + pyiron: + uses: pyiron/actions/.github/workflows/push-pull.yml@actions-3.1.0 + secrets: inherit + with: + notebooks-env-files: .ci_support/environment.yml .ci_support/environment-notebooks.yml + python-version: '3.11' + python-version-alt1: 'exclude' # 3.11 is the main one now + python-version-alt3: 'exclude' # Don't run on 3.8 + unit-test-timeout-minutes: 20 # For windows, which seems a little slow \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6212781c..ec8dc1af 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,5 +7,5 @@ on: jobs: pyiron: - uses: pyiron/actions/.github/workflows/release.yml@main + uses: pyiron/actions/.github/workflows/release.yml@actions-3.1.0 secrets: inherit \ No newline at end of file diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml index eb67b879..66f744a0 100644 --- a/.github/workflows/weekly.yml +++ b/.github/workflows/weekly.yml @@ -8,5 +8,5 @@ on: jobs: codeql: - uses: pyiron/actions/.github/workflows/codeql.yml@main + uses: pyiron/actions/.github/workflows/codeql.yml@actions-3.1.0 secrets: inherit \ No newline at end of file diff --git a/docs/environment.yml b/docs/environment.yml index fb820306..39098975 100644 --- a/docs/environment.yml +++ b/docs/environment.yml @@ -2,20 +2,29 @@ channels: - conda-forge dependencies: - ipykernel +- myst-parser - nbsphinx -- ipycanvas -- ipython -- ipywidgets == 7.* -- maggma >= 0.57.1 -- matplotlib -- nglview <= 3.0.9 -- numpy -- owlready2 -- pandas -- pyiron_base -- pyiron_atomistics >= 0.2.57 -- pyiron_gui >= 0.0.8 -- pyiron_ontology == 0.1.3 +- sphinx-gallery +- sphinx-rtd-theme +- versioneer +- python >=3.10,<3.12 +- aimsgb =0.1.3 +- ipycanvas =0.13.2 +- ipython =8.24.0 +- ipywidgets =7.7.1 +- jupyterlab =3.6.7 +- matplotlib =3.8.4 +- nglview =3.0.8 +- numpy =1.26.4 +- openjdk =22.0.1 +- owlready2 =0.46 +- pandas =1.5.3 +- pyiron-data =0.0.27 +- pyiron_atomistics = 0.2.63 +- pyiron_base =0.5.33 +- pyiron_gui =0.0.8 +- pyiron_ontology =0.1.3 +- pymatgen =2023.5.10 - ryvencore =0.3.1.1 -- seaborn -- traitlets +- seaborn =0.13.2 +- traitlets =5.14.3 diff --git a/ironflow/model/dtypes.py b/ironflow/model/dtypes.py index 4f211ace..6aa4c5fd 100644 --- a/ironflow/model/dtypes.py +++ b/ironflow/model/dtypes.py @@ -288,9 +288,9 @@ def __init__( default=default, doc=doc, _load_state=_load_state, - valid_classes=[float, np.floating] - if valid_classes is None - else valid_classes, + valid_classes=( + [float, np.floating] if valid_classes is None else valid_classes + ), allow_none=allow_none, batched=batched, ) diff --git a/ironflow/utils.py b/ironflow/utils.py index 6e614a51..f158f190 100644 --- a/ironflow/utils.py +++ b/ironflow/utils.py @@ -1,6 +1,7 @@ """ Stuff that doesn't fit anywhere yet. """ + from __future__ import annotations from IPython.core.display import HTML diff --git a/setup.py b/setup.py index 0894be0e..b2ef03f6 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,6 @@ 'License :: OSI Approved :: BSD License', 'Intended Audience :: Science/Research', 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', ], @@ -30,21 +29,24 @@ keywords='pyiron', packages=find_packages(exclude=["*tests*", "*docs*", "*binder*", "*conda*", "*notebooks*", "*.ci_support*"]), install_requires=[ - 'ipycanvas', - 'ipython', - 'ipywidgets >= 7,< 8', - 'matplotlib', - 'maggma >= 0.57.1', - 'nglview <= 3.0.9', - 'numpy', - 'owlready2', - 'pyiron_base', - 'pyiron_atomistics', - 'pyiron_gui >= 0.0.8', - 'pyiron_ontology == 0.1.3', - 'ryvencore == 0.3.1.1 ', - 'seaborn', - 'traitlets', + 'aimsgb ==0.1.3', + 'ipycanvas ==0.13.2', + 'ipython ==8.24.0', + 'ipywidgets ==7.7.1', + 'jupyterlab ==3.6.7', + 'matplotlib ==3.8.4', + 'nglview ==3.0.8', + 'numpy ==1.26.4', + 'owlready2 ==0.46', + 'pandas ==1.5.3', + 'pyiron_atomistics == 0.2.63', + 'pyiron_base ==0.5.33', + 'pyiron_gui <=0.0.8', + 'pyiron_ontology ==0.1.3', + 'pymatgen ==2023.5.10', + 'ryvencore ==0.3.1.1', + 'seaborn ==0.13.2', + 'traitlets ==5.14.3', ], cmdclass=versioneer.get_cmdclass(),