FreeCAD / FreeCAD-addons

A convenient gathering of useful and well-developed FreeCAD plugins made by the community.
749 stars 249 forks source link

[FEATURE] script/bot that checks Addons against a checklist #160

Open luzpaz opened 4 years ago

luzpaz commented 4 years ago

It seems that some Addons are being bundled with pycache/ directories and such. It gave me the idea for a script of a sort that checks all addons against a checklist.


Actually, why reinvent the wheel ? There is a checklist already in the Issue template for adding a workbench:

Dependencies

README.md

Misc.

Housekeeping

Github Related

Note: if your addon/workbench code doesn't reside on Github, please state the address where it is mentioned

luzpaz commented 4 years ago

using gitpthon to test untracked files

(Pdb) p gitrepo.status()
'On branch master\nYour branch is up to date with \'origin/master\'.\n\nUntracked files:\n  (use "git add <file>..." to include in what will be committed)\n\t__pycache__/\n\nnothing added to commit but untracked files present (use "git add" to track)'
            gitrepo = git.Git(clonedir)
            try:
                # gitrepo.fetch()
                gitrepo.status()
            except:
                print("Unable to fetch git updates for repo",repo[0])
            else:
                # 'git status' will tell us if we need to 'git pull'
                # note: print(gitrepo.status()) for troubleshooting
                if "Untracked files" in gitrepo.status():
                    print('\t' + repo[0] + ' ' + 'has untracked changes. Notify author')