Python Forum
Seeking input on my remote Python repo structure/look (recently updated)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Seeking input on my remote Python repo structure/look (recently updated)
#1
I've been trying to get my Python repo to have a good structure and look presentable. Could you have a peek at the structure and look and comment? (If you want to look at the current state of the code it's in ./dev/omnibus.py).

link to repo
Reply
#2
The first thing that strikes me is, why do you have folders called dev and working.
This seems like this should be handled with repo branches. In general git workflow you have a master branch. Then you create a branch called dev; work in that branch; and then merge that with master when it is ready.

Of course in small projects people might not bother with this and push directly to master but that isn't ideal methodology.
Reply
#3
(Jan-26-2018, 06:52 PM)Mekire Wrote: The first thing that strikes me is, why do you have folders called dev and working.
This seems like this should be handled with repo branches. In general git workflow you have a master branch. Then you create a branch called dev; work in that branch; and then merge that with master when it is ready.

Of course in small projects people might not bother with this and push directly to master but that isn't ideal methodology.

I just checked out to a dev branch, and then a working branch, and tried to redistribute my folders and files among them, and had nothing but frustration and failure.

So I tried deleting my local repo and recreating it from scratch with the folders and files properly distributed to the two branches (with only the readme and license in the root of the master branch), and again had nothing but frustration and failure.

Then I deleted the repo folder again and inadvertently initialized a repo in its parent folder, which is my user home folder. I deleted the .git subfolder right away before mkdir repo folder, cd to it, and running git init, configuring, and pulling the remote into it, but there's something weird going on.

It's gotten to the point that I'm going to delete the remote repo, back up my date, and reinstall my operating system just to get rid of any clutter created by git. And think twice about using git again.
Reply
#4
you dont need to reinstall you operating system jsut to get rid of git. You can delete any repo git and start anew by deleting the .git file in the repos root directory.

create a git config file .git in the current working directory
git init
connect this repo to the online "empty" repo if starting new
git remote add origin [email protected]:USER/REPONAME.git
add everything in the current directory to the staging area. This would be your working branch before changes
git add .
make a comment (required)
git commit -m "first commit"
push staged changes
git push -u origin master
At this point what is in your directory is on the website. Lets assume this is working and in good shape. Now when you make a change and it could break things (dev)... Instead of doing the same thing as we just did and pushing the change to your master branch we you make a dev branch.


create a new branch called "dev" and switch to it
git checkout -b dev
make your changes to your code as needed
add your changed files
git add .
make a comment
git commit -m "made a change"
push staged changes to branch dev
git push -u origin dev
at which you should have 2 branches, master and dev on site. The git repo will show the master branch while you have a dev branch that is X commits further ahead but could be unstable.

At some point the dev will be stable and you can merge it into master.
switch to master branch
git branch master
merge dev into master
git merge dev
push it to the site
git push -u origin master
Recommended Tutorials:
Reply
#5
Also, if you haven't gone through githubs interactive tutorial it is pretty short and helpful. Not a lot of detail but good basics:
https://try.github.io/
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  seeking names for my functions Skaperen 0 946 Sep-25-2022, 10:56 PM
Last Post: Skaperen
  updated synology package mbierman 1 1,643 Apr-14-2020, 09:15 PM
Last Post: Larz60+
  SEEKING BETA TESTERS W/ PYTHON EXPERIENCE ltarshis 0 1,663 Feb-19-2019, 06:24 PM
Last Post: ltarshis
  any more repo sites? Skaperen 4 3,296 Jul-03-2018, 11:40 PM
Last Post: metulburr
  Seeking Advice: Multiple workstations for one project mfayler 6 6,876 Oct-18-2016, 08:25 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020