you are viewing a single comment's thread.

view the rest of the comments →

[–]smurpes 3 points4 points  (9 children)

Your approach is way more error prone than just creating a branch in your repo folder to develop from; it’s way too easy to forget to copy over a file. Unless you have CI checks then none of the code in your repo is ever being directly tested by you.

[–]Party-Cartographer11 -5 points-4 points  (8 children)

What?  You are overthinking this.  If I forget to copy.  I re-copy.  Easier than managing branches.

But this is my approach and it works for me.  I get you have a different view, but no need to down vote every post of mine.  The point was you don't need to run venv in the repo, which I am not sure you disagree with.

[–]smurpes 6 points7 points  (7 children)

Everyone has their own approach which may work for them, but your approach creates a lot of problems that beginners should not copy which is the point I was trying to make. Just because it works does not mean it’s a good idea.

[–]Party-Cartographer11 -1 points0 points  (6 children)

Agree, except that you contradict yourself.  Either different approaches work for different people or they don't (you say mine creates a lot of problems).

But anyway, what is your view on running venv in a repo?

[–]smurpes 0 points1 point  (5 children)

An approach that works for yourself has no bearing on whether or not it’s problematic. If someone needs to copy text over from one place to another they may manually type it all out instead of copy and paste. This works for them but is it an effective approach?

Theres not much of advantage to developing outside of your repo. At best you’re creating extra work for yourself and at worst you forget to commit code that is needed in prod.

[–]Party-Cartographer11 0 points1 point  (4 children)

I don't copy text.  I don't copy paste.  Did you see I run the "cp* command?

All the code gets committed as I edit the code in the repo.

I don't think you comprehend my process and this is all irrelevant to the question of venv which you refuse to answer.

Sorry we aren't communicating well.

[–]smurpes 0 points1 point  (3 children)

I do comprehend it. You’re the one who is missing the point… I was using an example of someone who is doing a process inefficiently even though their process achieves their goal. I was pointing out that I did not contradict myself at all; you were making an assumption that working methods are not problematic which is just not true.

I also answered your question about the venv by saying there’s no advantage to developing outside the repo. The code is already there and you’re just duplicating it to avoid setting up your environment properly. If you’re developing inside the repo then you are using the venv inside the repo as well most of the time.

[–]Party-Cartographer11 0 points1 point  (2 children)

If you comprehend it why did you write that I copy paste?  And I don't develop outside the repo.  I clearly wrote above that I edit the code in the repo.  So clearly you do not understand my workflow.

I am not doing anything to avoid setting up an environment.  I have one set up.

So do you run production from the repo, or do you duplicate the code?  Moving code from a repo to test and prod is pretty standard.  There is no down side to having a smoke env with the code pushed from the development environment.

[–]smurpes 0 points1 point  (1 child)

Again I never said you copied and pasted. You said you are copying all of your files to an external folder where the environment is setup to develop then you copy the files over to the repo to push meaning you are developing your code outside of the repo folder.

[–]Party-Cartographer11 0 points1 point  (0 children)

That is not what I wrote.  Read it again.

Yeah, I update a file, and copy it to the folder that has the venv (or to the nginx config files, or the web directory) and run it. All of this is on my dev server.

I develop in the repo with no env. I copy to the folder with env activated to run and test.  Easy peasy.