Skip to content

Replace Linux-specific shell deps and remove ivert upgrade command - #42

Merged
mmacferrin merged 2 commits into
mainfrom
cross-platform-shell-deps
Jul 17, 2026
Merged

Replace Linux-specific shell deps and remove ivert upgrade command#42
mmacferrin merged 2 commits into
mainfrom
cross-platform-shell-deps

Conversation

@mmacferrin

Copy link
Copy Markdown
Collaborator

Part of cross-platform support work (refs #10). This does not close #10 — more remains (macOS/Windows testing, GDAL/h5py install differences, AWS credential paths, CI matrix, docs).

Changes

parallel_funcs.py — remove Linux-only shell dependencies

  • physical_cpu_count(): replaced the lscpu shell command and the platform if/elif blocks with psutil.cpu_count(logical=False), falling back to mp.cpu_count() when psutil returns None. psutil is already a declared dependency.
  • process_parallel(): replaced the rm -rf subprocess calls used for temp-dir cleanup with shutil.rmtree(..., ignore_errors=True).
  • process_parallel(): the max_nprocs default is now None, resolved to physical_cpu_count() at call time rather than at module import.

Remove the ivert upgrade command

  • The command assumed a pip-based install, which isn't always true (conda, etc.). Users now upgrade through standard pip/conda channels.
  • Deletes client_upgrade.py, the CLI command, the ivert_pip_upgrade_command config entry, and docs/upgrade.md (plus its README table row).

Testing

  • parallel_funcs imports cleanly; physical_cpu_count() returns the correct physical core count.
  • ivert.cli imports cleanly; upgrade no longer appears in the registered commands.
  • Pre-commit hooks pass.

Part of cross-platform support work (refs #10):

- parallel_funcs.physical_cpu_count(): replace the `lscpu` shell command
  and platform if/elif blocks with psutil.cpu_count(logical=False), falling
  back to mp.cpu_count() when psutil returns None.
- parallel_funcs.process_parallel(): replace the `rm -rf` subprocess calls
  used for temp-dir cleanup with shutil.rmtree(..., ignore_errors=True).
- Remove the `ivert upgrade` command, which assumed a pip-based install.
  Users now upgrade via standard pip/conda channels. Deletes
  client_upgrade.py, the cli command, the ivert_pip_upgrade_command config
  entry, and docs/upgrade.md (plus its README table row).

Refs #10
Change the max_nprocs default from physical_cpu_count() (evaluated once at
import time) to None, resolving it to physical_cpu_count() inside the
function body. Avoids running the CPU-count detection at module import and
picks up the true core count of the running machine.

Refs #10
@mmacferrin
mmacferrin force-pushed the cross-platform-shell-deps branch from 99b3df2 to e31f3c5 Compare July 17, 2026 20:49
@mmacferrin
mmacferrin merged commit a5d25f5 into main Jul 17, 2026
3 checks passed
@mmacferrin
mmacferrin deleted the cross-platform-shell-deps branch July 17, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cross-platform support and testing

1 participant