Skip to content

[Feature:System] Migrate CLI from Submitty monorepo - #2

Open
prestoncarman wants to merge 4 commits into
mainfrom
feature/submitty-cli-2-migrate
Open

[Feature:System] Migrate CLI from Submitty monorepo#2
prestoncarman wants to merge 4 commits into
mainfrom
feature/submitty-cli-2-migrate

Conversation

@prestoncarman

Copy link
Copy Markdown

Why is this Change Important & Necessary?

Submitty's Python CLI (submitty auth ...) was scaffolded inside the monorepo at tools/submitty-cli/ (see Submitty/feature/submitty-cli-1-scaffold, PR adding [Feature:CLI] Add submitty-cli: unified sysadmin CLI scaffold). It was decided this CLI is better served by its own repo — separate release cadence, its own CI, no coupling to the monorepo's lint/dependency config. This PR brings the CLI source over so SubmittyCLI becomes the CLI's home going forward.

What is the New Behavior?

  • src/submitty_cli/, tests/, and pyproject.toml now live at this repo's root (previously nested under tools/submitty-cli/ in the monorepo).
  • README.md no longer references monorepo-relative paths: the sbin/ link now points at github.com/Submitty/Submitty, and the cd tools/submitty-cli step is removed since commands run from repo root.
  • Added a self-contained .github/workflows/ci.yml (flake8, pylint, pytest + coverage/Codecov upload) plus standalone .flake8 / .pylintrc, so this repo no longer depends on the monorepo's lint config or CI job wiring.
  • Fixed a real bug caught by an updated flake8-bugbear: APIError.__init__ wasn't forwarding status_code to super().__init__(), so it was silently lost on pickle/copy.

The tools/submitty-cli/ folder in the Submitty monorepo is untouched for now — it lives on a feature branch that hasn't merged to main, so there's nothing there to clean up yet. That branch will be abandoned once this repo is the CLI's canonical home.

What steps should a reviewer take to reproduce or test the bug or new feature?

  1. pip install -e ".[dev]" (or uv run ...) from the repo root.
  2. flake8 — should report 0 issues.
  3. pylint --recursive=y src tests — should report 10.00/10.
  4. pytest --cov=submitty_cli --cov-report=xml -v — 22 tests should pass.
  5. Confirm the CI checks on this PR (lint, test, Codecov upload) run and pass.

Automated Testing & Documentation

No new functionality was added — this is a lift-and-shift of existing, already-tested code plus CI plumbing. Existing unit tests (22, unchanged in behavior) continue to cover the CLI. No submitty.org documentation changes needed.

Other information

Not a breaking change and no migrations needed — this is an internal repo relocation. CODECOV_TOKEN needs to be configured as a secret on this repo for the coverage upload step to succeed (separate from Submitty's monorepo token).

Moves the CLI code from Submitty's tools/submitty-cli/ (feature/submitty-cli-1-scaffold)
into this dedicated repo at the root, with a self-contained CI workflow (flake8, pylint,
pytest+coverage) so the project no longer depends on the monorepo's lint config or CI setup.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@prestoncarman prestoncarman changed the title [Feature:CLI] Migrate CLI from Submitty monorepo [Feature:System] Migrate CLI from Submitty monorepo Aug 6, 2026
prestoncarman and others added 2 commits August 5, 2026 21:31
Trimmed from Submitty's monorepo dependabot.yml to just the two ecosystems
that apply here (no PHP/JS in this repo).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…itty

Pulls in the CLI features added upstream in Submitty/tools/submitty-cli since
the last sync: config-file-backed auth (login/logout, saved server/token/user),
the course command group (list/create/config get/config set), and matching
test coverage. Also brings dependency/lint config up to date (pylint-pytest
plugin) and expands README with the new command reference and sbin migration
table.

Re-applies the flake8-bugbear fix in client.py (APIError forwarding
status_code to super().__init__) since the fresh copy reverted it; not yet
fixed upstream.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
_raise_for_status() already parsed response.json() to check for an
application-level "fail" status; get/post/put then parsed it again to
return the body. Have _raise_for_status() return the parsed body so
callers reuse it instead of decoding twice.

Co-Authored-By: Claude Sonnet 5 <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