Replace Linux-specific shell deps and remove ivert upgrade command - #42
Merged
Conversation
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
force-pushed
the
cross-platform-shell-deps
branch
from
July 17, 2026 20:49
99b3df2 to
e31f3c5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 dependenciesphysical_cpu_count(): replaced thelscpushell command and the platformif/elifblocks withpsutil.cpu_count(logical=False), falling back tomp.cpu_count()when psutil returnsNone.psutilis already a declared dependency.process_parallel(): replaced therm -rfsubprocess calls used for temp-dir cleanup withshutil.rmtree(..., ignore_errors=True).process_parallel(): themax_nprocsdefault is nowNone, resolved tophysical_cpu_count()at call time rather than at module import.Remove the
ivert upgradecommandclient_upgrade.py, the CLI command, theivert_pip_upgrade_commandconfig entry, anddocs/upgrade.md(plus its README table row).Testing
parallel_funcsimports cleanly;physical_cpu_count()returns the correct physical core count.ivert.cliimports cleanly;upgradeno longer appears in the registered commands.