Skip to content

Make CLI input robust (EOF/empty) and add pytest configuration#72

Merged
vepretski merged 1 commit into
mainfrom
codex/organize-project-status-and-functionality
Apr 18, 2026
Merged

Make CLI input robust (EOF/empty) and add pytest configuration#72
vepretski merged 1 commit into
mainfrom
codex/organize-project-status-and-functionality

Conversation

@vepretski
Copy link
Copy Markdown
Owner

Motivation

  • Ensure the simple CLI in src/main.py behaves sensibly in non-interactive environments by providing a default name and avoiding crashes on EOF or empty input.
  • Provide a basic pytest configuration so test discovery and execution are consistent across environments.

Description

  • Added pytest.ini to set pythonpath = . and testpaths = tests to configure pytest discovery.
  • Updated src/main.py to strip() the result of input(), catch EOFError, and default the user name to "Builder" when input is empty or unavailable.
  • When input is unavailable (EOFError) the code now prints a short auto-fill message and proceeds without raising an exception.
  • No changes were made to get_greeting; it continues to return a personalised greeting string.

Testing

  • Added pytest.ini and ran pytest -q to validate test discovery, which completed successfully with no tests collected.

Codex Task

@vepretski vepretski merged commit d3ba7d3 into main Apr 18, 2026
1 check failed
@vepretski vepretski self-assigned this Apr 18, 2026
@vepretski vepretski added bug Something isn't working documentation Improvements or additions to documentation duplicate This issue or pull request already exists enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers wontfix This will not be worked on labels Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working codex documentation Improvements or additions to documentation duplicate This issue or pull request already exists enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant