-
-
Notifications
You must be signed in to change notification settings - Fork 171
Description
How would this feature be useful?
For sufficiently complex CI/CD pipelines, the noxfile can get a bit out of hand in terms of length. In my case, the cookiecutter I am working on has gotten to the point that I have a scripts folder for running sufficiently complex steps.
The goal here would be to enable the use of remotely defined CI/CD plugins that can be partially/fully overwritten locally if desired, while making use of pytest's system to aid in defining out a solid system for accomplishing this.
Some other benefits that could come from this are:
- Enabling partial overwrites of portions of nox sessions. (Think pytest fixtures, like how you can overwrite pytest plugin fixtures as needed)
- plugins using maturin for any internal logic, allowing for faster builds without sacrificing the ability to overwrite portions locally
- Easier grouping of dependencies for portions of CI. For example, rather than 5 different sphinx plugin installs, it could just be plugin "nox-sphinx" has its own dependencies.
- Having nox recipes available as plugins that you can just use or overwrite as needed, rather than having to copy paste into every project
Describe the solution you'd like
There is already a ton of groundwork laid out between pytest and tox both using pluggy. It might make sense to then try and parody many of pytest's existing structures.
For an example of a user based view of this, here is a small demo project kind of showing what comes to mind: https://github.com/56kyle/nox-plugin-proposal
Granted there is a ton of flexibility that could be brought over from pytest that may not be useful, so I'm hesitant to begin any implementation before at least feeling out what people may find useful if anything.
Describe alternatives you've considered
Some things I have considered:
- Swapping to tox
- Would require way more complex templating logic in cookiecutter
- Would lose support surrounding envs not using any python venv
- overall just a bunch of QoL stuff that would be lost
- Local imports in utility package
- Would need an init.py in the repo root, which am definitely avoiding
- Doesn't allow for nested overwriting of select parts the same way that plugins do
- Swapping to just
- Trying to avoid implicit dependencies for CICD's sake
- Would lose out on convenient python testing across versions
Anything else?
I appreciate you taking the time to read this! This may be a bit of a long shot, but it really feels like a nice fit at first glance, so may as well see if anyone else is interested in this idea.
If anyone has any ideas that I may not have thought of for better approaching the problems I described, I would greatly appreciate any advice!