Re: Best Practice Virtual Environment

2024-10-06 Thread transreductionist via Python-list
This is how we handle this problem at a large organization.

In the repository there are a number of build scripts. For convenience we
use poetry (poetry.toml) to manage the virtual  environment. A
pyproduct.toml is used to define dependencies, how tests are run, the
linter config, etc.

So there are scripts for poetry lock, poetry install, and whatever else is
needed.

A user pulls down the repository and runs
1. poetry lock
2. poetry install
And they have their environment with the proper dependencies.

On Sun, Oct 6, 2024, 09:47 Karsten Hilbert via Python-list <
python-list@python.org> wrote:

> Am Sun, Oct 06, 2024 at 12:21:09AM +0200 schrieb Karsten Hilbert via
> Python-list:
>
> > Am Sat, Oct 05, 2024 at 10:27:33PM +0200 schrieb Ulrich Goebel via
> Python-list:
> >
> > > Debian (or even Python3 itself) doesn't allow to pip install required
> packages system wide, so I have to use virtual environments even there. But
> is it right, that I have to do that for every single user?
> > >
> > > Can someone give me a hint to find an howto for that?
> >
> > If you do find how to cleanly install non-packaged modules
> > in a system-wide way (even if that means installing every
> > application into its own *system-wide* venv) - do let me
> > know.
>
> It seems dh-virtualenv is one way to do it. On Debian.
>
> Karsten
> --
> GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Best Practice Virtual Environment

2024-10-06 Thread transreductionist via Python-list
byproduct.toml

On Sun, Oct 6, 2024, 13:30 transreductionist 
wrote:

> This is how we handle this problem at a large organization.
>
> In the repository there are a number of build scripts. For convenience we
> use poetry (poetry.toml) to manage the virtual  environment. A
> pyproduct.toml is used to define dependencies, how tests are run, the
> linter config, etc.
>
> So there are scripts for poetry lock, poetry install, and whatever else is
> needed.
>
> A user pulls down the repository and runs
> 1. poetry lock
> 2. poetry install
> And they have their environment with the proper dependencies.
>
> On Sun, Oct 6, 2024, 09:47 Karsten Hilbert via Python-list <
> python-list@python.org> wrote:
>
>> Am Sun, Oct 06, 2024 at 12:21:09AM +0200 schrieb Karsten Hilbert via
>> Python-list:
>>
>> > Am Sat, Oct 05, 2024 at 10:27:33PM +0200 schrieb Ulrich Goebel via
>> Python-list:
>> >
>> > > Debian (or even Python3 itself) doesn't allow to pip install required
>> packages system wide, so I have to use virtual environments even there. But
>> is it right, that I have to do that for every single user?
>> > >
>> > > Can someone give me a hint to find an howto for that?
>> >
>> > If you do find how to cleanly install non-packaged modules
>> > in a system-wide way (even if that means installing every
>> > application into its own *system-wide* venv) - do let me
>> > know.
>>
>> It seems dh-virtualenv is one way to do it. On Debian.
>>
>> Karsten
>> --
>> GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Best Practice Virtual Environment

2024-10-06 Thread Karsten Hilbert via Python-list
Am Sun, Oct 06, 2024 at 12:21:09AM +0200 schrieb Karsten Hilbert via 
Python-list:

> Am Sat, Oct 05, 2024 at 10:27:33PM +0200 schrieb Ulrich Goebel via 
> Python-list:
>
> > Debian (or even Python3 itself) doesn't allow to pip install required 
> > packages system wide, so I have to use virtual environments even there. But 
> > is it right, that I have to do that for every single user?
> >
> > Can someone give me a hint to find an howto for that?
>
> If you do find how to cleanly install non-packaged modules
> in a system-wide way (even if that means installing every
> application into its own *system-wide* venv) - do let me
> know.

It seems dh-virtualenv is one way to do it. On Debian.

Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Beazley's Problem

2024-10-06 Thread Antoon Pardon via Python-list

Op 23/09/2024 om 09:44 schreef Annada Behera via Python-list:

The "next-level math trick" Newton-Raphson has nothing to do with
functional programming. I have written solvers in purely iterative
style.


What is your point. Any problem solved in a functional style can
also be solved in a pure interative style. So you having written
something in an interative style doesn't contradict Newton-Raphson being 
expressable in a functional style.

  As far as I know, Newton-Raphson is the opposite of functional
programming as you iteratively solve for the root. Functional programming
is stateless where you are not allowed to store any state (current best
guess root).


That doesn't prevent you from passing state along as a parameter,
usualy in some helper function.

--
Antoon Pardon.
--
https://mail.python.org/mailman/listinfo/python-list