FreeCAD-addons icon indicating copy to clipboard operation
FreeCAD-addons copied to clipboard

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

Open luzpaz opened this issue 4 years ago • 1 comments

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.

  • [ ] is there a .gitignore file
  • [ ] is there a metadata.txt file (#29)
    • [ ] are the 3rd party dependencies listed in it?

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

Dependencies

  • This Addon/workbench runs on:
    • [ ] Most up to date stable release
    • [ ] Most up to date development release
    • [ ] Python 3 compatible
    • [ ] Qt5 compatible
  • [ ] Is this backward compatible with any previous version of FC? If so, please mention in the README.md
  • [ ] Does this use 3rd party dependencies?
    • [ ] numpy
    • [ ] scipy
    • Please specify if there are any other dependencies below and in the README.md

README.md

  • [ ] Is Markdown friendly
  • [ ] Has a Prerequisite or Dependencies section
  • [ ] Links to a LICENCE file (Note: FreeCAD uses LGPL3, most people choose that or GPL3)
  • [ ] Has a Screenshot and/or a section for screenshots
  • [ ] Links to a [FreeCAD Forum discussion thread][FreeCAD-Thread

Misc.

  • [ ] Do you keep a changelog?
    If so, where?
  • [ ] Your Addon has an SVG based Logo?
  • [ ] Once your Addon/Workbench is accepted, you'll open a PR for FreeCAD master in order to add said Logo in to the FreeCAD Addon Manager dialog? (Example), see directions below:
    1. Copy the SVG to FreeCAD/src/Mod/AddonManager/Resources/Icons (Note the formatting of the file name is important).
    2. Edit the FreeCAD/src/Mod/AddonManager/Resources/AddonManager.qrc and alphabetically place the path (in the previous step) to the icon of your workbench in the list.
  • [ ] Edit the FreeCAD External Workbenches wiki page

Housekeeping

  • [ ] Fixed typos in the code using codespell. We recommend running: codespell -q 3
  • [ ] We recommend linting python code with PEP8. See [coding conventions][Code-conventions]

Github Related

  • [ ] Does your repository use Release tags ?
  • [ ] Repository has topics which include FreeCAD Workbench Addon

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

luzpaz avatar Oct 27 '19 11:10 luzpaz

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')

luzpaz avatar Oct 27 '19 15:10 luzpaz