Skip to content

refactor(resource): extract scitex.resource into standalone scitex-resource package#247

Open
ywatanabe1989 wants to merge 1 commit intodevelopfrom
feat/extract-scitex-resource
Open

refactor(resource): extract scitex.resource into standalone scitex-resource package#247
ywatanabe1989 wants to merge 1 commit intodevelopfrom
feat/extract-scitex-resource

Conversation

@ywatanabe1989
Copy link
Copy Markdown
Owner

Summary

Extracts `scitex.resource` into scitex-resource v0.1.0.

  • `get_specs / get_processor_usages / log_processor_usages / limit_ram` preserved.
  • `[resource]` extra collapsed to `scitex-resource[sh]>=0.1.0` (transitively pulls pandas/psutil/PyYAML/matplotlib + scitex-sh).
  • 65/65 tests pass.

Decoupling

  • `scitex.str.readable_bytes` / `scitex.gen.fmt_size` / `scitex.str.printc` → 3 vendored helpers in `_compat.py`.
  • `scitex.io._load/save` → `pandas.read_csv/to_csv` for CSV logs; `scitex.io` only as a non-CSV fallback.
  • `scitex.sh.sh` → `scitex_sh` if installed, else `subprocess.run`.

🤖 Generated with Claude Code

…source package

System resource info, processor usage logging, RAM-cap helper now live in
the standalone scitex-resource package
(https://github.com/ywatanabe1989/scitex-resource).

scitex.resource/__init__.py becomes a sys.modules alias.
The [resource] extra is collapsed to depend on scitex-resource[sh]>=0.1.0
(transitively pulls pandas/psutil/PyYAML/matplotlib + scitex-sh).

Decoupling notes (handled in scitex-resource's initial commit):
- scitex.str.readable_bytes / scitex.gen.fmt_size / scitex.str.printc →
  vendored as 3 small helpers in _compat.py.
- scitex.io._load.load / _save.save → pandas.read_csv / to_csv directly
  for CSV logs; defer to scitex.io only if a non-CSV path is requested.
- scitex.sh.sh → prefer scitex_sh, fall back to subprocess.run.
- scitex.session __main__ block → simplified to plain main().

65/65 tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant