Skip to content

Commit

Permalink
Fix release CI (#122)
Browse files Browse the repository at this point in the history
* update pre-commit hooks

* pre-commit run --all-files

* update GHA runner to macos-14 and pypa/[email protected]

fixes release job, see pypa/cibuildwheel#1740
  • Loading branch information
janosh committed Feb 8, 2024
1 parent 26dda61 commit 38bb60b
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 88 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-14, windows-latest]
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: "3.10"
cache: pip
cache-dependency-path: pyproject.toml

Expand Down Expand Up @@ -81,15 +81,15 @@ jobs:
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.task == 'release')
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-14, windows-latest]
python-version: ["39", "310", "311"]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repo
uses: actions/checkout@v4

- name: Build wheels
uses: pypa/[email protected].2
uses: pypa/[email protected].5
env:
CIBW_BUILD: cp${{ matrix.python-version }}-*
CIBW_ARCHS_MACOS: universal2
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ default_install_hook_types: [pre-commit, commit-msg]

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
rev: v0.2.1
hooks:
- id: ruff
args: [--fix]
Expand All @@ -30,13 +30,13 @@ repos:
args: [--check-filenames]

- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
rev: 0.7.1
hooks:
- id: nbstripout
args: [--drop-empty-cells, --keep-output]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.7
rev: v4.0.0-alpha.8
hooks:
- id: prettier
args: [--write] # edit files in-place
Expand All @@ -46,7 +46,7 @@ repos:
- svelte

- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.0.0-alpha.1
rev: v9.0.0-alpha.2
hooks:
- id: eslint
types: [file]
Expand Down
2 changes: 1 addition & 1 deletion chgnet/utils/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def read_json(filepath: str) -> dict:
filepath (str): file name of json to read.
Returns:
dictionary stored in fjson
dict: data stored in filepath
"""
with open(filepath) as file:
return json.load(file)
Expand Down
42 changes: 21 additions & 21 deletions examples/basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "f8c75a16",
"id": "0",
"metadata": {},
"source": [
"# This notebook shows example to load the CHGNet for prediction\n"
Expand All @@ -11,7 +11,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "87432e22",
"id": "1",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -25,7 +25,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7ead933c",
"id": "2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -42,7 +42,7 @@
},
{
"cell_type": "markdown",
"id": "16eeae1e",
"id": "3",
"metadata": {},
"source": [
"### Read structure from a json or cif file\n"
Expand All @@ -51,7 +51,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "208fa4aa",
"id": "4",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -94,7 +94,7 @@
},
{
"cell_type": "markdown",
"id": "abcc09b4",
"id": "5",
"metadata": {},
"source": [
"### Define Model\n"
Expand All @@ -103,7 +103,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c04a0993",
"id": "6",
"metadata": {},
"outputs": [
{
Expand All @@ -123,7 +123,7 @@
},
{
"cell_type": "markdown",
"id": "961d51fc",
"id": "7",
"metadata": {},
"source": [
"# Predict energy, force, stress, magmom\n"
Expand All @@ -132,7 +132,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "2c7c1997",
"id": "8",
"metadata": {
"pycharm": {
"name": "#%%\n"
Expand Down Expand Up @@ -181,7 +181,7 @@
},
{
"cell_type": "markdown",
"id": "2258f2f5",
"id": "9",
"metadata": {},
"source": [
"# Structure Optimization\n"
Expand All @@ -190,7 +190,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "27dac383",
"id": "10",
"metadata": {},
"outputs": [
{
Expand All @@ -211,7 +211,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "04bc3159",
"id": "11",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -270,7 +270,7 @@
},
{
"cell_type": "markdown",
"id": "06f7e84c",
"id": "12",
"metadata": {},
"source": [
"# Molecular Dynamics\n"
Expand All @@ -279,7 +279,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "1a59a5b5",
"id": "13",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -316,7 +316,7 @@
},
{
"cell_type": "markdown",
"id": "c6a10ec8",
"id": "14",
"metadata": {},
"source": [
"# Magmom Visualization\n"
Expand All @@ -325,7 +325,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "2d5c2f93",
"id": "15",
"metadata": {},
"outputs": [
{
Expand All @@ -344,7 +344,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "db4c9f16",
"id": "16",
"metadata": {},
"outputs": [
{
Expand All @@ -368,7 +368,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "a0fe8e50",
"id": "17",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -784,7 +784,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c96fb111",
"id": "18",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -797,7 +797,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "71ac47b1",
"id": "19",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -1862,7 +1862,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.11.7"
}
},
"nbformat": 4,
Expand Down
20 changes: 10 additions & 10 deletions examples/crystaltoolkit_relax_viewer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"attachments": {},
"cell_type": "markdown",
"id": "f8c75a16",
"id": "0",
"metadata": {},
"source": [
"# Crystaltoolkit Relaxation Viewer\n",
Expand All @@ -14,7 +14,7 @@
{
"attachments": {},
"cell_type": "markdown",
"id": "a51da8f4",
"id": "1",
"metadata": {},
"source": [
"Running the last cell in this notebook should spin up a `dash` app that looks like this:\n",
Expand All @@ -25,7 +25,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "156e8031",
"id": "2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -42,7 +42,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7ead933c",
"id": "3",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -53,7 +53,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e6792912",
"id": "4",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -72,7 +72,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "208fa4aa",
"id": "5",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -100,7 +100,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5d6e9fcc",
"id": "6",
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -218,7 +218,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c04ebd43",
"id": "7",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -235,7 +235,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e7a91576",
"id": "8",
"metadata": {},
"outputs": [
{
Expand All @@ -256,7 +256,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c9f16422",
"id": "9",
"metadata": {},
"outputs": [
{
Expand Down

0 comments on commit 38bb60b

Please sign in to comment.