Add 'python-moodle' CLI alias and fix install docs#83
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes the CLI runnable as both
py-moodleandpython-moodle, so the command can match the distribution name, and fixes install docs that used the wrong package/directory names.Changes
pyproject.toml— registerpython-moodle = "py_moodle.cli:app"as a second console-script entry point alongsidepy-moodle. Both invoke the same CLI.docs/getting-started/installation.md—pip install py-moodle→pip install python-moodle;cd py-moodle→cd python-moodle; "Python 3.8+" → "3.9+" (matchesrequires-python = ">=3.9"); added a note clarifying the three names (packagepython-moodle, commandspy-moodle/python-moodle, importpy_moodle).docs/getting-started/quickstart.md— samepip installfix + a note that both commands work.Verification
pyproject.tomlvalidated as TOML ({'py-moodle': 'py_moodle.cli:app', 'python-moodle': 'py_moodle.cli:app'}); docs build clean.Backwards compatibility
Fully additive —
py-moodleis unchanged;python-moodleis new. All existing docs/examples that usepy-moodleremain correct.