-
Notifications
You must be signed in to change notification settings - Fork 184
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
chore: devenv environment #2083
base: devel
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for dlt-hub-docs canceled.
|
279118f
to
9141ee4
Compare
''; | ||
|
||
# https://devenv.sh/pre-commit-hooks/ | ||
git-hooks.hooks.lint = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this runs the linter before commit. Can be omitted by passing -n
, however I am also happy to remove this, if in question.
Hey @joscha, since no one has replied here yet, maybe my take on this: Currently we are using poetry where you can work within a shell, so the prerequsites are to have poetry installed and nothing more, so I am not sure we need any other system to manage dependencies or development environment. Are you working within some kind of browser based IDE or what do you need the nix setup for? |
Nix is controlling the whole dependency closure, not only poetry. E.g. it also controls:
Basically any dependency (direct AND transitive) in the repository. |
Ok, since poetry manages all python dependencies and dlt should work with all currently supported python versions and any make versions I don't really see the need in this project at the moment, but if anyone on the core team wants to review and maintain this that would be fine of course. I just have the suspicion that no one is using / is familiar with nix. |
I am not a poetry pro, it doesn't manage python itself, does it? you probably have something like
The binaries in my original post are just an example. We also have bash (and some dependent tooling like
and a myriad of external dependencies (ODBC driver, Docker, etc.) in various spaces. Whenever you have a new member onboarding the dlt project I am sure there is a whole bunch of tooling, etc. to be installed if they want to be successful in the project. The versions they install (and the downstream closure of all transitive dependencies) depends on:
I think dlt & other projects in the dlthub space have more than enough tools, etc. to warrant controlling that closure. Example: If dlt introduces support for another python version, we'd update that lock file. When you then in a year's time after dlt 4.0 has been released have to go back to do a 1.x patch, you can just go back in time in git history and your old python version (and all other dependencies) will be available immediately without having to change all of these dependencies on your computer. You could even do
Time to learn something new? But also with |
Sure, but you'll have to let the people contributing here decide for themselves how they need to invest their time. Like I said, if someone wants to take it it might be merged.. |
Of course, I am advocating for it, because I am convinced it will actually save time. The PR only contains a scaffold for the python/poetry/make part. If I haven't piqued your interest with the value proposition in the response above, maybe the pain in the aforementioned points hasn't been felt enough, yet. As someone who switches between open source projects regularly with every single one using a different runtime versions / package managers / binaries it becomes more obvious. |
Description
This adds a Devenv environment to the repository which allows immediate development w/o have to worry about local installation of dependencies (make, python, poetry, etc.).
Devenv is using
nix
under the hood, which provides a reproducible environment due to the fact that it controls the whole dependency closure. That means that the files in this PR would ensure that all developers would use the same version of make, python, poetry, etc. for their local development of dlt, which reduces a whole bunch of problems when talking about issues, opening pull requests, etc.If the system has
direnv
anddevenv
installed everything is automatic.After activating the environment,
setup
can be run, which calls out tomake dev
.Also happy to swap this for a raw nix flake or even a nix-shell if devenv is too bleeding edge.