Skip to content

Add 'python-moodle' CLI alias and fix install docs#83

Merged
erseco merged 1 commit into
mainfrom
add-python-moodle-alias
Jul 8, 2026
Merged

Add 'python-moodle' CLI alias and fix install docs#83
erseco merged 1 commit into
mainfrom
add-python-moodle-alias

Conversation

@erseco

@erseco erseco commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

Makes the CLI runnable as both py-moodle and python-moodle, so the command can match the distribution name, and fixes install docs that used the wrong package/directory names.

Changes

  • pyproject.toml — register python-moodle = "py_moodle.cli:app" as a second console-script entry point alongside py-moodle. Both invoke the same CLI.
  • docs/getting-started/installation.mdpip install py-moodlepip install python-moodle; cd py-moodlecd python-moodle; "Python 3.8+" → "3.9+" (matches requires-python = ">=3.9"); added a note clarifying the three names (package python-moodle, commands py-moodle/python-moodle, import py_moodle).
  • docs/getting-started/quickstart.md — same pip install fix + a note that both commands work.

Verification

pip install -e . --no-deps     # regenerates console scripts
ls .venv/bin/py-moodle .venv/bin/python-moodle   # both present
python-moodle --help           # runs: "Usage: python-moodle [OPTIONS] COMMAND ..."
pytest tests/unit              # green

pyproject.toml validated as TOML ({'py-moodle': 'py_moodle.cli:app', 'python-moodle': 'py_moodle.cli:app'}); docs build clean.

Backwards compatibility

Fully additive — py-moodle is unchanged; python-moodle is new. All existing docs/examples that use py-moodle remain correct.

The distribution is 'python-moodle' but the CLI command was only
'py-moodle', and the install docs said 'pip install py-moodle' /
'cd py-moodle' (wrong package + directory names).

- pyproject.toml: register 'python-moodle' as a second console-script
  entry point aliasing 'py_moodle.cli:app', so both 'py-moodle' and
  'python-moodle' invoke the CLI. Verified: pip install -e . creates both
  .venv/bin/py-moodle and .venv/bin/python-moodle, and 'python-moodle
  --help' runs.
- docs/getting-started/installation.md: fix 'pip install py-moodle' ->
  'python-moodle', 'cd py-moodle' -> 'cd python-moodle', 'Python 3.8+' ->
  '3.9+' (matches requires-python), and add a note explaining the
  package/command/import names and that both commands are equivalent.
- docs/getting-started/quickstart.md: fix 'pip install py-moodle' ->
  'python-moodle' and note both commands work.
@erseco erseco merged commit 19f9a8e into main Jul 8, 2026
13 checks passed
@erseco erseco deleted the add-python-moodle-alias branch July 8, 2026 05:45
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