-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
G Infrastructure: Homogeneous build, test and deploy metrics #3
Comments
|
Repository cookiecutter-brightwaylib is a starting point. It contains already a basic cookiecutter template, and issues related to each of the specification requirements described here. |
Here is a job description to find a freelancer to work on this: Update Python packaging and CI scripts for an open source framework for life cycle assessmentBrightway (https://brightway.dev/) is an open source framework for life cycle assessment. Our packaging concept and CI infrastructure needs to be updated to use modern tools and make our lives easier. Specifically, the following changes need to be made:
(The reason we are hiring someone to do this in the first place is that we can build libraries using
Tagged releases for anaconda should be built by conda-forge, and their robot will automatically notice new PyPI releases and create pull requests. The following libraries need to be updated and can have a single, version/OS independent wheel: https://github.com/brightway-lca/brightway2-data This library needs to be updated, but needs version/OS-specific wheels: https://github.com/brightway-lca/brightway2-calc See https://github.com/brightway-lca/brightway2-speedups/blob/master/.github/workflows/build_wheels.yaml for an example of such wheels. The calc library relies on linear algebra libraries which are compiled separately for each version and OS. It should have |
Note the following changes to the original plan:
|
Motivation
Every time we need to make a change, e.g. add a tool, update Github Workflows system images, etc. we need to manually change every library. Manual changes can be inconsistent and are a pain, leading to procrastination. Larger changes are basically impossible to imagine.
Desired template attributes
We need a standard template and guide for libraries which has the following qualities:
conda
andpip
setup.cfg
instead ofsetup.py
. Include sections fordev
(has e.g.pytest
,pip-tools
),stable
(all requirements pinned), and normal installation (requirements have ranges of>=
)anaconda
on tagged commitsAdapting the
hypermodern
templateA lot of these attributes are found in the hypermodern template, though @cmutel would argue against the following:
poetry
: Better to stick with standard tools instead of more opinionated ones in components designed to be integrated into applications.tox
ornox
: Not necessary, we do testing in CI, and setting up a venv for each test run is quite heavy for our components.We should use the following (copied from their docs):
pre-commit
hooksNote that we assume the following are done as pre-commit hooks by the template (instead of by Github Workflows):
cookiecutter
instead ofpyscaffold
pyscaffold ticks a lot of boxes, but has some controversial choices which are hard to remove, including the use of
setuptools-scm
andtox
, has custom commands instead ofpip
and friends (not great for new users), and would need to adapted to include the Azure Workflows config in any case. @cmutel thinks that a custom cookiecutter template is probably the best choice. Ideally, someone would already have such a template, as thecookiecutter
ecosystem is large, but no suitable template was found browsing cookiecutter-templates.pip
, notpoetry
orpipenv
Let's skip the drama,
pip
withpip-tools
andpipreqs
works just fine.Useful links
setup.cfg
Tasks
cookiecutter
template that satisfies the required attributesThe text was updated successfully, but these errors were encountered: