diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 79039e50456..15c48b538c3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -447,26 +447,6 @@ jobs: models="${{ inputs.models }}" pytest -v -n auto test_scripts.py --init -k "${models//,/ or }" - - name: Create folder structure - if: inputs.full == true - run: | - # Create empty folder structure for the /docs subdirectory - distname=${{ needs.build.outputs.distname }} - mkdir -p "$distname/doc" - mkdir "$distname/make" - mkdir "$distname/msvs" - mkdir "$distname/srcbmi" - cp modflow6/code.json "$distname/code.json" - cp modflow6/meson.build "$distname/meson.build" - cp -r modflow6-examples/examples "$distname" - cp -r modflow6/src "$distname" - cp -r modflow6/utils/mf5to6 "$distname/utils/mf5to6" - cp -r modflow6/utils/zonebudget "$distname/utils/zonebudget" - - # create LaTeX file describing the folder structure - cd modflow6/doc/ReleaseNotes - python mk_folder_struct.py -dp "${{ github.workspace }}/$distname" - - name: Collect deprecations working-directory: modflow6/doc/mf6io/mf6ivar run: | diff --git a/distribution/build_docs.py b/distribution/build_docs.py index b4934555ddc..4f1ff97fca4 100644 --- a/distribution/build_docs.py +++ b/distribution/build_docs.py @@ -303,33 +303,6 @@ def test_build_mf6io_tex_from_dfn(overwrite): os.system(f"git restore {p}") -def build_tex_folder_structure(overwrite: bool = False): - path = _release_notes_path / "folder_struct.tex" - - if overwrite: - path.unlink(missing_ok=True) - elif path.is_file(): - print(f"Folder structure file already exists: {path}") - return - - with set_dir(_release_notes_path): - out, err, ret = run_cmd( - sys.executable, "mk_folder_struct.py", "-dp", _project_root_path - ) - assert not ret, out + err - - assert path.is_file(), f"Failed to create {path}" - - -@no_parallel -def test_build_tex_folder_structure(): - path = _project_root_path / "doc" / "ReleaseNotes" / "folder_struct.tex" - try: - build_tex_folder_structure() - finally: - os.system(f"git restore {path}") - - def build_mf6io_tex_example( workspace_path: PathLike, bin_path: PathLike, example_model_path: PathLike ): diff --git a/doc/ReleaseNotes/mk_folder_struct.py b/doc/ReleaseNotes/mk_folder_struct.py deleted file mode 100755 index 39886d99f3d..00000000000 --- a/doc/ReleaseNotes/mk_folder_struct.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/python - -""" -mk_folder_struct.py: Create a latex file containing structure of a folder. - -This script is used to update folder_struct.tex using the structure of a specified -distribution folder. The distribution folder must be specified using a command line -argument. Usage is: - - python mk_folder_struct.py -dp - -""" - - -import os -import sys - - -def list_files(startpath, includefiles=False): - s = '' - for root, dirs, files in os.walk(startpath): - level = root.replace(startpath, '').count(os.sep) - indent = ' ' * 4 * (level) - s += '{}{}/ \n'.format(indent, os.path.basename(root)) - subindent = ' ' * 4 * (level + 1) - for f in files: - if includefiles: - s += '{}{} \n'.format(subindent, f) - return s - - -def get_distribution_path(): - distribution_path = None - for idx, arg in enumerate(sys.argv): - if arg == "-dp": - distribution_path = sys.argv[idx + 1] - return distribution_path - - -distribution_path = get_distribution_path() -if distribution_path is None: - raise Exception(f"Distribution path must be set from command line using -dp ") -if not os.path.isdir(distribution_path): - raise Exception(f"Distribution path not found: {distribution_path}") - -# Open the file -f = open('folder_struct.tex', 'w') - -# Write the latex header -s = r'''\begin{verbatim}''' -f.write(s) -f.write('\n') - -s = list_files(distribution_path) -f.write(s) - -s = r'''\end{verbatim} -''' -f.write(s) - -f.close() - -print('done...') diff --git a/pixi.toml b/pixi.toml index 5e84e1439e0..1f3d894a699 100644 --- a/pixi.toml +++ b/pixi.toml @@ -68,6 +68,5 @@ build-dist = { cmd = "python build_dist.py", cwd = "distribution" } build-makefiles = { cmd = "python build_makefiles.py", cwd = "distribution" } test-dist-scripts = { cmd = "pytest -v --durations 0", cwd = "distribution" } update-version = { cmd = "python update_version.py", cwd = "distribution" } -mk-folder-struct = { cmd = "python mk_folder_struct.py", cwd = "doc/ReleaseNotes" } deprecations = { cmd = "python deprecations.py", cwd = "doc/mf6io/mf6ivar" } sphinx = { cmd = "make html", cwd = ".build_rtd_docs" } \ No newline at end of file