pcdshub / pcdshub/pcdsutils

Profiler utils with file-like object

Open
#54 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2
Forks
6
Avg merge
7d 11h
Merged PRs (30d)
1

Description

Suggestion for profiler utils:

a save_results that takes a file-like object would be useful from an API standpoint. It would allow for using in-memory StringIO, easier testing, and so on.

And then I believe print_results and save_results_to_file effectively then rely on the same underlying code (as sys.stdout, sys.stderr, and open() as fp are all output streams/file-like objects)

Originally posted by @klauer in https://github.com/pcdshub/pcdsutils/pull/53#pullrequestreview-977341220

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the profiler utilities and the existing save_results, print_results, and save_results_to_file entry points. Read how each currently handles output streams, then verify that a shared file-like-object path supports in-memory StringIO and preserves the existing stdout, stderr, and file behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.