Skip to content

Improve code quality: LICENSE, CI, deps, exception handling#1

Merged
he-yufeng merged 1 commit intomainfrom
improve/code-quality
Mar 1, 2026
Merged

Improve code quality: LICENSE, CI, deps, exception handling#1
he-yufeng merged 1 commit intomainfrom
improve/code-quality

Conversation

@he-yufeng
Copy link
Copy Markdown
Owner

Summary

  • Add MIT LICENSE file (2024, universeplayer) -- the repo previously referenced MIT in the README but had no actual license file
  • Add GitHub Actions CI workflow (.github/workflows/ci.yml) -- runs ruff linting on push/PR against Python 3.9 and 3.11, catching syntax errors and undefined names
  • Fix missing dependency -- add openai>=1.0.0 to requirements.txt (used by AI_interviewer.py via from openai import OpenAI)
  • Narrow 4 overly broad exception handlers in llm_client.py:
    • except Exception: on import -> except ImportError:
    • except Exception as e: on JSON config parsing -> except (json.JSONDecodeError, ValueError, OSError)
    • except Exception as e: on API key file loading -> except (FileNotFoundError, ValueError, OSError)
    • except Exception as e: on HTTP retry loop -> except (requests.RequestException, ValueError, KeyError)
  • Update README badges -- replace static badges with clickable ones (Python version, License, GitHub Stars, CI status)

Test plan

  • Verify CI workflow passes on GitHub Actions
  • Verify pip install -r requirements.txt installs all needed packages including openai
  • Verify the LICENSE file renders correctly on the repo page
  • Verify README badges display correctly
  • Smoke test: python -c "from llm_client import LLMClient" still works (no import errors)

Generated with Claude Code

- Add MIT LICENSE file (2024, universeplayer)
- Add GitHub Actions CI workflow with ruff linting on Python 3.9/3.11
- Add missing `openai` package to requirements.txt
- Replace 4 overly broad exception handlers in llm_client.py with
  specific exceptions (ImportError, json.JSONDecodeError, ValueError,
  requests.RequestException, etc.)
- Update README badges: add clickable Python, License, Stars, and CI
  badges at the top

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@he-yufeng he-yufeng merged commit 20c6540 into main Mar 1, 2026
2 checks passed
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