diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 01c034e763..df9c1b1bb6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -82,10 +82,6 @@ jobs: path: | ./autotest/.failed/** - - name: Run notebooks - working-directory: scripts - run: python run_notebooks.py - - name: Generate changelog id: cliff uses: orhun/git-cliff-action@v3 diff --git a/docs/make_release.md b/docs/make_release.md index 455af25424..d65c7619f5 100644 --- a/docs/make_release.md +++ b/docs/make_release.md @@ -100,8 +100,6 @@ As described above, making a release manually involves the following steps: - Run `ruff check .` and `ruff format .` from the project root. -- Use `run_notebooks.py` in the `scripts` directory to rerun all notebooks in `.docs/Notebooks`. - - Generate a changelog starting from the last release with [git cliff](https://github.com/orhun/git-cliff), for instance: `git cliff --config cliff.toml --unreleased --tag=`. - Prepend the release changelog to the comprehensive changelog file `docs/version_changes.md`. diff --git a/scripts/README.md b/scripts/README.md index 45d5166057..71ed667f2e 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -28,12 +28,6 @@ For instance, `e689af57e7439b9005749d806248897ad550eab5_20150811_041632_uncommit **Note**: the `process_benchmarks.py` script depends on `seaborn`, which is not included as a dependency in either `etc/environment.yml` or in any of the optional groups in `pyproject.toml`, since this is the only place it is used in this repository. -## Running notebooks - -The `run_notebooks.py` script runs notebooks located in the `.docs/Notebooks` directory. - -Notebooks are run using `jupytext --from_ipynb --execute `. Note that notebooks are under version control, and running them with this script will produce large changesets in your working tree as outputs and execution metadata are updated. See the [developer docs](../DEVELOPER.md) for instructions to configure `git` to automatically strip notebook outputs before commits. - ## Updating version The `update_version.py` script can be used to update FloPy version numbers. Running the script first updates the version in `version.txt`, then propagates the change to various other places version strings or timestamps are embedded in the repository: diff --git a/scripts/run_notebooks.py b/scripts/run_notebooks.py deleted file mode 100644 index 7569c2259a..0000000000 --- a/scripts/run_notebooks.py +++ /dev/null @@ -1,47 +0,0 @@ -import os -import sys - -# path to notebooks -src_pths = (os.path.join("..", ".docs", "Notebooks"),) - -# parse command line arguments for notebook to create -nb_files = None -for idx, arg in enumerate(sys.argv): - if arg in ("-f", "--file"): - file_name = sys.argv[idx + 1] - if not file_name.endswith(".ipynb"): - file_name += ".ipynb" - for src_pth in src_pths: - src = os.path.join(src_pth, file_name) - if os.path.isfile(src): - nb_files = [src] - break - -# get list of notebooks -if nb_files is None: - nb_files = [] - for src_pth in src_pths: - nb_files += [ - os.path.join(src_pth, file_name) - for file_name in sorted(os.listdir(src_pth)) - if file_name.endswith(".ipynb") - ] - -failed_runs = [] - -# run the notebooks -for src in nb_files: - arg = ( - "jupytext", - "--from ipynb", - "--execute", - src, - ) - print(" ".join(arg)) - return_code = os.system(" ".join(arg)) - if return_code != 0: - failed_runs.append(src) - -# write out failed runs -for idx, src in enumerate(failed_runs): - print(f"{idx + 1:2d}...{src} FAILED")