- Manage unified single virtual env
- Install repo deps in a unified dev venv
- Installing in less pip calls possible? Maybe just use a temporary
requirements.txt
?
- Installing in less pip calls possible? Maybe just use a temporary
- "Dependency Merger" (creates list of conflict-free dependencies from all repos)
- Implement merger
- Check if repo deps are conflict-free
- Consider all (optional) groups
- And remove them from qpy-dev
pyproject.toml
- And remove them from qpy-dev
- Use
dict[dep.name, tuple[Dep, Pkg]]
forDependencyMerger._deps
? - Use (version constraint) intersection of conflicting deps
- Raise error if result is empty
- Consider dep extras: use union of conflicting deps extras
- (Idea: Choose one or the other interactively when a conflict occurs. Can also be done manually/is probably overkill.)
- Install repo deps in a unified dev venv
- Common developer tasks and workflows
- post-checkout hook that sets up venv automatically?
- Manage Moodle dev stack
- Tasks
- start
- stop
- reset/remove
- log tail
- access to docker-compose command
- Automate config (
local.yml
)- Add
host.docker.internal
to webserver container/etc/hosts
so QPy server can be specified by using a fixed hostname in Moodle -
qtype-questionpy
as bind volume into the webserver container
- Add
- Start/stop hooks (mainly need this for creating/removing a Firewall rule to allow the Moodle webserver container to access the QPy server on my host)
- Tasks
- QPy server
- Tasks
- start dev server
- watch dev server
- Create
config.ini
- Pass env vars
- Create cache directories
- Tasks
- Per repo tasks
- All some/repos
- Lint
- ruff
- PHP_CodeSniffer (https://docs.moodle.org/dev/Linting)
- Format (check)
- Type-check
- Test
- pytest
- coverage/report
- phpunit (https://moodledev.io/general/development/process/testing)
- Lint
- Bump versions in
pyproject.toml
- git tasks
- git clone
- all repos
- some repos, single repo
- .github repo
- git pull/fetch (to see if there have been pushes)
- git clone
- tox task
- make sure dev repos are used in tox
- add pyenv to requirements/add pyenv instructions
- Run GH actions locally using act?
- Sync tooling config into QPy repos
-
ruff_defaults.toml
- Use tomlkit to sync tooling config (
pyproject.toml
)- dependencies: check pylint, flake8, tox is not present
- check
tool.tox
is not presence - check no
tool.pylint*
are present - mypy, check keys/values from qpy-dev config are present and match
-
tool.pytest.ini_options
asyncio_mode = "auto"
, ignore otherstool.coverage.run
branch = true
source = [MODULE_NAME]
- ruff
- check
extend = "ruff_defaults.toml"
option is present - check that
extend-*
variants are used
- check
-
- All some/repos
- Docs
- Build docs using mkdocs
- Watch docs
-
Publish docs(solved using GitHub actions)
- Update tooling
- Add ruff (replacing Pylint, Flake8)
- Possible to have preset rules (like Eslint sharable config)?
- No, not yet. astral-sh/ruff#3363
- Can be mimicked by using
extend
Solution: Haveruff_defaults.toml
inqpy-dev
and create command that sync's it into the QPy repos.
Look at hatch default config
https://github.com/pypa/hatch/blob/master/ruff_defaults.toml
- Can be mimicked by using
- No, not yet. astral-sh/ruff#3363
- Ruff import formatting not configurable
astral-sh/ruff#2600
- Possible to have preset rules (like Eslint sharable config)?
- Remove tox config from individual repos
- Update GH actions
- Other less important
- Add https://github.com/commitizen-tools/commitizen?
- Fix this bug and create PR: nat-n/poethepoet#198
- pre-commit-hook
- lint/test/...
- lint conventional commit messages
- Add ruff (replacing Pylint, Flake8)