From 97b1540a411382589f6c3d2f2e94501cbc55b018 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Wed, 4 Jun 2025 15:29:48 -0500 Subject: [PATCH 01/14] working-ish --- sp-installer-menu/menu/menu.json | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/sp-installer-menu/menu/menu.json b/sp-installer-menu/menu/menu.json index a601ba1..745e422 100644 --- a/sp-installer-menu/menu/menu.json +++ b/sp-installer-menu/menu/menu.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft-07/schema", "$id": "https://schemas.conda.io/menuinst-1.schema.json", - "menu_name": "Scientific Python (#PKG_VERSION#)", + "menu_name": "Science", "menu_items": [{ "name": "Scientific Python Environment Info", "description": "Information on the Scientific Python runtime environment", @@ -17,9 +17,7 @@ "desktop": false }, "linux": { - "Categories": [ - "Science" - ] + "Categories": "Science" }, "osx": { "CFBundleName": "SP Sys Info", @@ -51,9 +49,7 @@ "--init-file", "{{ MENU_DIR }}/#PKG_NAME#_open_prompt.sh" ], - "Categories": [ - "Science" - ], + "Categories": "Science", "terminal": true }, "osx": { @@ -91,9 +87,7 @@ "--init-file", "{{ MENU_DIR }}/#PKG_NAME#_open_jupyterlab.sh" ], - "Categories": [ - "Science" - ], + "Categories": "Science", "terminal": true }, "osx": { @@ -128,9 +122,7 @@ "xdg-open", "https://lectures.scientific-python.org" ], - "Categories": [ - "Science" - ] + "Categories": "Science" }, "osx": { "command": [ @@ -163,9 +155,7 @@ "xdg-open", "https://discuss.scientific-python.org" ], - "Categories": [ - "Science" - ] + "Categories": "Science" }, "osx": { "command": [ From bfcae9005d5b0d69af60231ce1678ecec1ff7f99 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Wed, 4 Jun 2025 15:30:21 -0500 Subject: [PATCH 02/14] fix Makefile clean recipe --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5d51fa4..ad150ac 100644 --- a/Makefile +++ b/Makefile @@ -48,9 +48,9 @@ clean: rm -rf ~/Applications/$(PROJECT_NAME)*; \ rm -f Scientific-Python-*.pkg; \ elif [[ $(MACHINE) == "Linux" ]]; then \ - rm -rf $(HOME)/Scientific-Python; \ + rm -rf $(HOME)/Scientific-Python-Environment; \ rm -f ./Scientific-Python-*.sh; \ - rm -f $(HOME)/.local/share/applications/$(PROJECT_NAME_LOWER)-*.desktop; \ + rm -f $(HOME)/.local/share/applications/*$(PROJECT_NAME_LOWER)-*.desktop; \ elif [[ $(MACHINE) == "Windows" ]]; then \ echo "TODO add command to cleanup icons on Windows"; \ fi From ae1d171eab3609f6ae0b1e3db354c026ac365e04 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Wed, 4 Jun 2025 20:39:12 +0000 Subject: [PATCH 03/14] [autofix.ci] apply automated fixes --- recipes/scientific-python/construct.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/scientific-python/construct.yaml b/recipes/scientific-python/construct.yaml index 64313a9..7b3dd7c 100644 --- a/recipes/scientific-python/construct.yaml +++ b/recipes/scientific-python/construct.yaml @@ -105,7 +105,7 @@ specs: - pytest-timeout =2.4.0 - pre-commit =4.2.0 - ruff =0.11.12 - - uv =0.7.9 + - uv =0.7.10 # Doc building - numpydoc =1.8.0 # OS-specific From 175cb98a0de4076da21cffc5ae4f7f9697de6899 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Thu, 5 Jun 2025 16:32:10 -0500 Subject: [PATCH 04/14] more makefile fixes --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ad150ac..a24bb1e 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,8 @@ clean: elif [[ $(MACHINE) == "Linux" ]]; then \ rm -rf $(HOME)/Scientific-Python-Environment; \ rm -f ./Scientific-Python-*.sh; \ - rm -f $(HOME)/.local/share/applications/*$(PROJECT_NAME_LOWER)-*.desktop; \ + rm -f $(HOME)/.local/share/applications/$(PROJECT_NAME_LOWER)-*.desktop; \ + rm -f $(HOME)/.local/share/desktop-directories/$(PROJECT_NAME_LOWER).directory; \ elif [[ $(MACHINE) == "Windows" ]]; then \ echo "TODO add command to cleanup icons on Windows"; \ fi From d68f0e1f6c934d8effc41cc8b5b890af852b0b87 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Thu, 5 Jun 2025 16:32:44 -0500 Subject: [PATCH 05/14] go back to orig. name/category --- sp-installer-menu/menu/menu.json | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/sp-installer-menu/menu/menu.json b/sp-installer-menu/menu/menu.json index 745e422..3a82cf7 100644 --- a/sp-installer-menu/menu/menu.json +++ b/sp-installer-menu/menu/menu.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft-07/schema", "$id": "https://schemas.conda.io/menuinst-1.schema.json", - "menu_name": "Science", + "menu_name": "Scientific Python", "menu_items": [{ "name": "Scientific Python Environment Info", "description": "Information on the Scientific Python runtime environment", @@ -17,7 +17,9 @@ "desktop": false }, "linux": { - "Categories": "Science" + "Categories": [ + "Scientific Python" + ] }, "osx": { "CFBundleName": "SP Sys Info", @@ -49,7 +51,9 @@ "--init-file", "{{ MENU_DIR }}/#PKG_NAME#_open_prompt.sh" ], - "Categories": "Science", + "Categories": [ + "Scientific Python" + ], "terminal": true }, "osx": { @@ -87,7 +91,9 @@ "--init-file", "{{ MENU_DIR }}/#PKG_NAME#_open_jupyterlab.sh" ], - "Categories": "Science", + "Categories": [ + "Scientific Python" + ], "terminal": true }, "osx": { @@ -122,7 +128,9 @@ "xdg-open", "https://lectures.scientific-python.org" ], - "Categories": "Science" + "Categories": [ + "Scientific Python" + ] }, "osx": { "command": [ @@ -155,7 +163,9 @@ "xdg-open", "https://discuss.scientific-python.org" ], - "Categories": "Science" + "Categories": [ + "Scientific Python" + ] }, "osx": { "command": [ From 108dd00db600410c944d9bcfc6f756231d4351cb Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 21:34:51 +0000 Subject: [PATCH 06/14] [autofix.ci] apply automated fixes --- recipes/scientific-python/construct.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/scientific-python/construct.yaml b/recipes/scientific-python/construct.yaml index 7b3dd7c..a98d150 100644 --- a/recipes/scientific-python/construct.yaml +++ b/recipes/scientific-python/construct.yaml @@ -58,7 +58,7 @@ specs: - pip =25.1.1 - wheel =0.45.1 - conda =25.5.0 - - mamba =2.1.1 + - mamba =2.2.0 - threadpoolctl =3.6.0 # for our sysinfo menu command # Menus - sp-installer-menu =0.1.0 @@ -71,7 +71,7 @@ specs: - requests =2.32.3 - pooch =1.8.2 # Data science and statistics. - - pandas =2.2.3 + - pandas =2.3.0 - polars =1.30.0 - scikit-learn =1.6.1 - statsmodels =0.14.4 @@ -105,7 +105,7 @@ specs: - pytest-timeout =2.4.0 - pre-commit =4.2.0 - ruff =0.11.12 - - uv =0.7.10 + - uv =0.7.11 # Doc building - numpydoc =1.8.0 # OS-specific From 2ab1a36da62781eab9b21387cdedb43de2f94137 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Thu, 5 Jun 2025 17:22:10 -0500 Subject: [PATCH 07/14] whitespace consistency --- sp-installer-menu/menu/menu.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sp-installer-menu/menu/menu.json b/sp-installer-menu/menu/menu.json index 3a82cf7..2ff872a 100644 --- a/sp-installer-menu/menu/menu.json +++ b/sp-installer-menu/menu/menu.json @@ -18,7 +18,7 @@ }, "linux": { "Categories": [ - "Scientific Python" + "Scientific Python" ] }, "osx": { @@ -52,7 +52,7 @@ "{{ MENU_DIR }}/#PKG_NAME#_open_prompt.sh" ], "Categories": [ - "Scientific Python" + "Scientific Python" ], "terminal": true }, @@ -92,7 +92,7 @@ "{{ MENU_DIR }}/#PKG_NAME#_open_jupyterlab.sh" ], "Categories": [ - "Scientific Python" + "Scientific Python" ], "terminal": true }, @@ -129,7 +129,7 @@ "https://lectures.scientific-python.org" ], "Categories": [ - "Scientific Python" + "Scientific Python" ] }, "osx": { @@ -164,7 +164,7 @@ "https://discuss.scientific-python.org" ], "Categories": [ - "Scientific Python" + "Scientific Python" ] }, "osx": { From 4772808fd7c9702a1be6b11d8613dc92322bb00c Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Thu, 5 Jun 2025 17:22:26 -0500 Subject: [PATCH 08/14] fix makefile again --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a24bb1e..52e5bfc 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ clean: elif [[ $(MACHINE) == "Linux" ]]; then \ rm -rf $(HOME)/Scientific-Python-Environment; \ rm -f ./Scientific-Python-*.sh; \ - rm -f $(HOME)/.local/share/applications/$(PROJECT_NAME_LOWER)-*.desktop; \ + rm -f $(HOME)/.local/share/applications/$(PROJECT_NAME_LOWER)*.desktop; \ rm -f $(HOME)/.local/share/desktop-directories/$(PROJECT_NAME_LOWER).directory; \ elif [[ $(MACHINE) == "Windows" ]]; then \ echo "TODO add command to cleanup icons on Windows"; \ From 4838afddf3542c6c7b773fa6830097cb114b9ed4 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Fri, 1 Aug 2025 14:08:37 -0500 Subject: [PATCH 09/14] update env file --- environment.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index d219642..511caa2 100644 --- a/environment.yml +++ b/environment.yml @@ -7,7 +7,9 @@ dependencies: - constructor >=3.6.0 - conda-libmamba-solver - conda-standalone >=23.11.0,!=24.11.0 - - menuinst - conda >=23.11.0 - fmt !=10.2.0 - conda-build + - pip: + # ↓ TODO after menuinst release (something >2.3.1), move to normal dependencies list + - git+https://github.com/conda/menuinst.git@3d11307485f8de8b813e2cec6866e2c00aee11da From 504b5edb7a7baafdb33aac20e7f71dc3ace03607 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Fri, 1 Aug 2025 14:28:49 -0500 Subject: [PATCH 10/14] use variable for folder & category names (must match) --- sp-installer-menu/make_menu.py | 2 ++ sp-installer-menu/menu/menu.json | 12 ++++++------ sp-installer-menu/meta.yaml | 2 ++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/sp-installer-menu/make_menu.py b/sp-installer-menu/make_menu.py index fa4d7ad..df1f007 100755 --- a/sp-installer-menu/make_menu.py +++ b/sp-installer-menu/make_menu.py @@ -16,6 +16,7 @@ out_path = Path(prefix) / "Menu" pkg_name = environ["PKG_NAME"] pkg_version = environ["PKG_VERSION"] +folder_and_category_name = environ["MENU_FOLDER_NAME"] # defined in `meta.yaml` if not out_path.is_dir(): out_path.mkdir(parents=True) @@ -30,6 +31,7 @@ def txt_replace(txt): ("#PREFIX#", prefix), ("#PKG_NAME#", pkg_name), ("#PKG_VERSION#", pkg_version), + ("#FOLDER_AND_CATEGORY_NAME#", folder_and_category_name), ): txt = txt.replace(start, end) return txt diff --git a/sp-installer-menu/menu/menu.json b/sp-installer-menu/menu/menu.json index 2ff872a..5134da8 100644 --- a/sp-installer-menu/menu/menu.json +++ b/sp-installer-menu/menu/menu.json @@ -1,7 +1,7 @@ { "$schema": "https://json-schema.org/draft-07/schema", "$id": "https://schemas.conda.io/menuinst-1.schema.json", - "menu_name": "Scientific Python", + "menu_name": "#FOLDER_AND_CATEGORY_NAME#", "menu_items": [{ "name": "Scientific Python Environment Info", "description": "Information on the Scientific Python runtime environment", @@ -18,7 +18,7 @@ }, "linux": { "Categories": [ - "Scientific Python" + "#FOLDER_AND_CATEGORY_NAME#" ] }, "osx": { @@ -52,7 +52,7 @@ "{{ MENU_DIR }}/#PKG_NAME#_open_prompt.sh" ], "Categories": [ - "Scientific Python" + "#FOLDER_AND_CATEGORY_NAME#" ], "terminal": true }, @@ -92,7 +92,7 @@ "{{ MENU_DIR }}/#PKG_NAME#_open_jupyterlab.sh" ], "Categories": [ - "Scientific Python" + "#FOLDER_AND_CATEGORY_NAME#" ], "terminal": true }, @@ -129,7 +129,7 @@ "https://lectures.scientific-python.org" ], "Categories": [ - "Scientific Python" + "#FOLDER_AND_CATEGORY_NAME#" ] }, "osx": { @@ -164,7 +164,7 @@ "https://discuss.scientific-python.org" ], "Categories": [ - "Scientific Python" + "#FOLDER_AND_CATEGORY_NAME#" ] }, "osx": { diff --git a/sp-installer-menu/meta.yaml b/sp-installer-menu/meta.yaml index 5effbe5..3d24085 100644 --- a/sp-installer-menu/meta.yaml +++ b/sp-installer-menu/meta.yaml @@ -11,6 +11,8 @@ build: number: {{ build }} # skip: true # [not linux] noarch: python + script_env: + - MENU_FOLDER_NAME=Scientific Python script: - pushd {{ RECIPE_DIR }} - python make_menu.py From 2c22c080a72d064e3184479e99c0eae37097f0eb Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Fri, 1 Aug 2025 14:29:09 -0500 Subject: [PATCH 11/14] linter fixes --- sp-installer-menu/make_menu.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sp-installer-menu/make_menu.py b/sp-installer-menu/make_menu.py index df1f007..cced88b 100755 --- a/sp-installer-menu/make_menu.py +++ b/sp-installer-menu/make_menu.py @@ -41,14 +41,15 @@ def txt_replace(txt): (out_path / f"{pkg_name}.json").write_text(txt_replace(menu_txt)) -for fstem in ("console", "info", "web", "forum", 'jupyter'): +for fstem in ("console", "info", "web", "forum", "jupyter"): for ext in ("icns", "ico", "png"): copy2(in_path / f"{fstem}.{ext}", out_path / f"{pkg_name}_{fstem}.{ext}") for ext in ("sh", "applescript", "bat"): - for fpath in in_path.glob(f'*.{ext}'): + for fpath in in_path.glob(f"*.{ext}"): (out_path / f"{pkg_name}_{fpath.name}").write_text( - txt_replace(fpath.read_text())) + txt_replace(fpath.read_text()) + ) for fname in ("spi_sys_info.py", "spi_mac_folder_icon.png"): copy2(in_path / fname, out_path / fname) From ac5de136f3b983475b5da66f36f5e2c0f006f92f Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Fri, 1 Aug 2025 15:26:35 -0500 Subject: [PATCH 12/14] silence pushd --- sp-installer-menu/menu/open_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sp-installer-menu/menu/open_prompt.sh b/sp-installer-menu/menu/open_prompt.sh index 0c94f72..4928d0b 100755 --- a/sp-installer-menu/menu/open_prompt.sh +++ b/sp-installer-menu/menu/open_prompt.sh @@ -12,4 +12,4 @@ echo "Using $(python --version) from $(which python)" echo "This is Scientific Python version #PKG_VERSION#" workdir="$HOME/Documents/scientific-python" mkdir -p $workdir -pushd $workdir +pushd $workdir > /dev/null From 7d66581eb516b2de391333d774ebdfebab1a4a49 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Fri, 1 Aug 2025 20:44:44 +0000 Subject: [PATCH 13/14] [autofix.ci] apply automated fixes --- recipes/scientific-python/construct.yaml | 40 ++++++++++++------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/recipes/scientific-python/construct.yaml b/recipes/scientific-python/construct.yaml index a98d150..c4d0bd8 100644 --- a/recipes/scientific-python/construct.yaml +++ b/recipes/scientific-python/construct.yaml @@ -55,59 +55,59 @@ specs: # Python - python =3.13.3 # [not (osx and arm64)] - python =3.13.2 # [osx and arm64] # allow_outdated - - pip =25.1.1 + - pip =25.2 - wheel =0.45.1 - - conda =25.5.0 - - mamba =2.2.0 + - conda =25.5.1 + - mamba =2.3.1 - threadpoolctl =3.6.0 # for our sysinfo menu command # Menus - sp-installer-menu =0.1.0 # Scientific Python - - scipy =1.15.2 + - scipy =1.16.0 - numpy =2.1.3 # allow_outdated, each new version has to wait for numba - openblas =0.3.28 # allow_outdated, NumPy etc. need to update - libblas =3.9.0=*openblas # Web - - requests =2.32.3 + - requests =2.32.4 - pooch =1.8.2 # Data science and statistics. - - pandas =2.3.0 - - polars =1.30.0 - - scikit-learn =1.6.1 - - statsmodels =0.14.4 + - pandas =2.3.1 + - polars =1.31.0 + - scikit-learn =1.7.1 + - statsmodels =0.14.5 - pingouin =0.5.5 # https://pingouin-stats.org # Jupyter - jupyter =1.1.1 - - jupyterlab =4.4.3 + - jupyterlab =4.4.5 - nbclassic =1.3.1 - - ipykernel =6.29.5 + - ipykernel =6.30.0 # I/O - openpyxl =3.1.5 - xlrd =2.0.1 - - pyreadstat =1.2.9 # https://github.com/Roche/pyreadstat + - pyreadstat =1.3.0 # https://github.com/Roche/pyreadstat # Image processing - scikit-image =0.25.2 - - pillow =11.2.1 + - pillow =11.3.0 # Symbolic math - sympy =1.14.0 # Viz - - matplotlib =3.10.3 + - matplotlib =3.10.5 - ipympl =0.9.7 - seaborn =0.13.2 - - plotly =6.1.2 + - plotly =6.2.0 - ipywidgets =8.1.7 - termcolor =3.1.0 # Security - defusedxml =0.7.1 # https://github.com/tiran/defusedxml # Development - - cython =3.1.1 - - pytest =8.4.0 + - cython =3.1.2 + - pytest =8.4.1 - pytest-timeout =2.4.0 - pre-commit =4.2.0 - - ruff =0.11.12 - - uv =0.7.11 + - ruff =0.12.7 + - uv =0.8.4 # Doc building - - numpydoc =1.8.0 + - numpydoc =1.9.0 # OS-specific - git =2.49.0 # [win] - make =4.4.1 # [win] From 27e8037b5e376ec7862f30317fc08b53b3b94cf5 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Fri, 1 Aug 2025 15:44:46 -0500 Subject: [PATCH 14/14] fix terminal display of sysinfo --- sp-installer-menu/menu/spi_sys_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sp-installer-menu/menu/spi_sys_info.py b/sp-installer-menu/menu/spi_sys_info.py index 00486a6..176c980 100755 --- a/sp-installer-menu/menu/spi_sys_info.py +++ b/sp-installer-menu/menu/spi_sys_info.py @@ -13,7 +13,7 @@ from importlib import import_module from importlib.metadata import metadata -from os import sep +from os import linesep from xml.etree import ElementTree @@ -149,7 +149,7 @@ def main(): if len(sys.argv) > 1 and sys.argv[1] == "nohtml": print() # blank line - print(sep.join(out), file=sys.stdout) + print(linesep.join(out), file=sys.stdout) return # build the output tree