Comments (12)
Hi,
pitching in with a bit of a different suggestion.
For CICD purposes I find Github Actions matrices more comfortable than tox
.
Why ?
- You have control over
build
, not relying on a wrapped build ran bytox
. I find this control is necessary, for when things fall behind in wrappers. e.g. -- you'll see deprecation warnings thrown bytox
using long deprecatedsetuptools
deprecation warning. considering the complexity of building wheels, i find the wrapper an overhead. - You have an
action
per target build, which is comfortable for humans [ more below related to matrices ] - this will play in the same manner for the cross of
platforms
(linux
,mac-os
,win
)
A good enough reference for that you can find in pydantic
--
https://github.com/samuelcolvin/pydantic/blob/master/.github/workflows/ci.yml
https://github.com/samuelcolvin/pydantic/runs/4846228861?check_suite_focus=true
This approach actually also makes sense to me for local development --
- Having control of the
build
,install
andtest
flow, separately from tox. - Have that flow for
python
, agnostic to version and where it's py38, py38 will be used etc.
I'd love to hear what you think.
And either way, be happy to contribute.
Thanks,
Harel
from hera.
I like the idea of using both. I use tox extensively during development because I can run the full suite of tests locally against all of the supported python versions by just running one command. The bigger issue might be with Pipenv only wanting to support one python release, so Pipenv.lock can't be stored in git. I like the principles behind pipenv but the single-python-release requirement seems a bit unrealistic for most projects.
from hera.
Hey @hirosassa! Thanks for the issue submission 🙂 Sure, this sounds great! I am curious, however, whether you foresee any potential future issue submissions that have to do with some potential backward incompatible changes? I have not looked at the release notes of 3.8 and I'd love to know whether you can share some potential drawbacks of this migration! My main concern is, to be perfectly honest, any syntax changes Hera might introduce, which can break existing application usage.
from hera.
@flaviuvadan - have you considered using tox to provide test environment support for multiple python releases? That would allow the test suite to run on every supported python release for every build and hopefully find any compatibility issues in the pipeline. I can push a PR if you're interested.
from hera.
@flaviuvadan @bobh66 Thanks for the comments!
In my experiences, there's no significant changes (including syntax changes) in migration from Python 3.7 to 3.8+.
Only concern is dependent packages, but in Hera, dependencies are simple and all the dependencies supports Python 3.7+.
So this migration has no (or very small) concerns, IMO.
https://github.com/argoproj-labs/hera-workflows/blob/main/Pipfile
https://github.com/argoproj-labs/hera-workflows/blob/main/setup.py#L37-L44
from hera.
As @bobh66 says, I also think using tox
is the best way to support multiple versions of Python.
examples:
- https://github.com/spotify/luigi/blob/master/tox.ini (complex)
- https://github.com/m3dev/gokart/blob/master/tox.ini (simple)
from hera.
Also note tox-pipenv: https://github.com/tox-dev/tox-pipenv to allow for tox and pipenv to work together cleanly
from hera.
now i see that luigi
is actually an example case where both
of these approaches are used together !
https://github.com/spotify/luigi/blob/master/.github/workflows/pythonbuild.yml#L13
from hera.
I agree with the idea of using both, too. The idea covers both running tests locally and CI environments.
The bigger issue might be with Pipenv only wanting to support one python release, so Pipenv.lock can't be stored in git.
Yeah, this is true. I'm currently using poetry
for package management in my personal project, it supports multiple versions of Python releases.
from hera.
This is a very valuable discussion 🙂 In light of the preferences outlined here, it seems like multiple local Python versions for Hera development is preferred, along with tox
(to run tests on local using multiple environments), with the potential to transition Hera to poetry for package and version management?
from hera.
@flaviuvadan I think it is right, but applying all of the solutions is not preferable for the developers and such a big change will cause bugs.
So my recommendation is supporting for multiple Python version using tox
as the first step.
from hera.
I agree with @hirosassa - I guess the next question is do we want to continue using make/Makefile for now and just have the tox environments invoke the make commands? That would probably be the easiest first step forward. There is also the issue of the Pipenv.lock file being stored in git. I started to look at tox-pipenv but got distracted - I'll try to pick it up again and see how it works.
from hera.
Related Issues (20)
- Improve Hera I/O models HOT 1
- Script annotation inputs doesn't play well with `with_param`
- Lifecycle Hooks arguments and support for Steps / DAGs HOT 1
- HTTPGetAction "port: int" will output as string in yaml HOT 1
- get_workflow_link() doesn't form perfect URLs when workflows is running with BASE_HREF HOT 3
- Upgrading to 5.10 causes validation error HOT 6
- parameter output regression HOT 1
- Improve example directory structure to accommodate complex "mini projects" HOT 4
- Container ImagePullPolicy builds an incompatible type HOT 2
- On-cluster testing improvements
- Support loaders for script Parameters HOT 1
- make test is broken with cappa dependency HOT 1
- Create a hera mypy plugin HOT 1
- Error messages improvement
- Arguments mapping is very verbose depending on use case
- Remove the need to write `.value` on `Parameter`s passed to `arguments` HOT 1
- How to set a workflow parameters default value HOT 1
- VolumeMounts for sidecars disappear
- Robust validation for k8s resource requirements
- Save dummy outputs when runner script raises an exception HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hera.