Changesets: Import 2017-06-07 23:51:09

master c8ab046a

2014-03-12 14:51:10

mwoehlke

Details Diff
ENH: Refactor and improve SlicerWizard arg parsing

Move conversion of Python method arguments to CLI arguments to its own
helper function in the Utilities module. Tweak this to handle non-string
arguments and to better handle bool and None arguments (note that a
named argument with the value None is now ignored, as is a named
argument with a value False; True is now used for flag options). Also
add support for "short" arguments (assuming a one-character name is
"short"). All this should make the conversion more intuitive and easier
to use.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22992 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/ExtensionWizard.py Diff File
mod - Utilities/Scripts/SlicerWizard/Utilities.py Diff File

master b43fc09f

2014-03-12 14:51:09

mwoehlke

Details Diff
ENH: Confirm changes to extension information

Change how 'extensionwizard.py --publish' modifies the extension
information to prompt the user before making changes to URL's (the
HOMEPAGE in particular, but also the ICONURL) if the existing URL does
not have 'example.com' as the host. As example.com is a reserved name,
such a URL (e.g. the default values from the templates) cannot possible
be valid and so should be safe to change in all cases, but this should
cause us to stop and confirm if we're about to change a URL that the
user has already changed to some potentially valid location (e.g. the
wiki).

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22991 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/ExtensionWizard.py Diff File

master edb7770d

2014-03-12 14:51:08

mwoehlke

Details Diff
BUG: Find pull request more strictly

Change how the Extension Wizard looks up pull requests to do the look-up
not against the user that submitted the request, but against the
downstream repository (which should imply the user). I'm not sure if
github even allows a user to have multiple forks of the same upstream
repository, but this will guard against that in case it would ever
happen.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22990 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/ExtensionWizard.py Diff File

master bf8846d2

2014-03-12 14:51:06

mwoehlke

Details Diff
STYLE: Document and enhance ExtensionWizard.py

Add documentation of SlicerWizard.ExtensionWizard. Tweak create() and
addModule() commands to improve error reporting, and in particular for
addModule() to attempt to do nothing in case of an error (or at least,
to not write changes to the extension's CMakeLists.txt). Add a helper
wrapper around execute() to allow for much greater flexibility, e.g. if
it should cause the application to terminate (and newly do so
consistently) or return an exit code, and to allow CLI arguments to be
passed as method arguments (including gitpython-like kwargs support).

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22989 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/ExtensionWizard.py Diff File

master 126f9b62

2014-03-12 14:51:05

mwoehlke

Details Diff
BUG: Fix default exit code of Utilities.die

Change the default exit code of SlicerWizard.Utilities.die from 0 to 1.
The former is a poor choice as it means "success", which not usually the
case when calling die().

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22988 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/Utilities.py Diff File

master 513ef977

2014-03-12 14:51:04

mwoehlke

Details Diff
ENH: Add documentation generation for SlicerWizard

Add CMake machinery to generate (using sphinx) HTML documentation from
the Python docstrings of SlicerWizard. I've been using this internally
(calling sphinx-build by hand) for a while now, but am committing it now
that it has been tied into CMake. Parts of this are generated from
sphinx-apidoc, but there are also already some enhancements added, e.g.
intersphinx setup, and the overriding of autodoc.ClassDocumenter to
remove the redundant module name from class module classes.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22987 3bd1e089-480b-0410-8dfb-8563597acbee
mod - CMakeLists.txt Diff File
add - Utilities/Scripts/SlicerWizard/doc/CMakeLists.txt Diff File
add - Utilities/Scripts/SlicerWizard/doc/SlicerWizard.rst Diff File
add - Utilities/Scripts/SlicerWizard/doc/conf.py Diff File
add - Utilities/Scripts/SlicerWizard/doc/index.rst Diff File

master 5b23b5f1

2014-03-12 14:51:03

mwoehlke

Details Diff
STYLE: Remove execute permissions from modules

Remove the +x bits from the SlicerWizard module .py files, as these are
not needed or wanted (and now that the shebangs are removed, the commit
hook doesn't like them).

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22986 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/CMakeParser.py Diff File
mod - Utilities/Scripts/SlicerWizard/ExtensionDescription.py Diff File
mod - Utilities/Scripts/SlicerWizard/ExtensionProject.py Diff File
mod - Utilities/Scripts/SlicerWizard/ExtensionWizard.py Diff File
mod - Utilities/Scripts/SlicerWizard/GithubHelper.py Diff File
mod - Utilities/Scripts/SlicerWizard/Utilities.py Diff File

master 7c65eaa9

2014-03-12 14:51:02

mwoehlke

Details Diff
STYLE: Move WizardHelpFormatter to its own module

As the class is referenced in the SlicerWizard.TemplateManager
documentation, and as ExtensionWizard is a class module which (as a
module) we want to hide, move WizardHelpFormatter to its own module so
that it is available to external users. Also, add documentation for the
same.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22985 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/ExtensionWizard.py Diff File
add - Utilities/Scripts/SlicerWizard/WizardHelpFormatter.py Diff File
mod - Utilities/Scripts/SlicerWizard/__init__.py Diff File

master 33b60774

2014-03-12 14:51:01

mwoehlke

Details Diff
STYLE: Document SlicerWizard/TemplateManager.py

Add documentation for the public API of SlicerWizard.TemplateManager.
Also, fix some code issues revealed in the course of writing the same:

- Add '_' prefix to private helper functions
- Add public setKey() method
- Move adding arguments to TemplateManager, for consistency with
parseArguments()

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22984 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/ExtensionWizard.py Diff File
mod - Utilities/Scripts/SlicerWizard/TemplateManager.py Diff File

master c6fd5d93

2014-03-12 14:51:00

mwoehlke

Details Diff
STYLE: Document SlicerWizard/ExtensionProject.py

Add documentation for the public API of SlicerWizard.ExtensionProject.
Also, fix some code issues revealed in the course of writing the same:

- Merge superfluous private helper method into public method
- Change getValue() to return the value from the last 'set()'
- Allow use in 'with'

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22983 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/ExtensionProject.py Diff File

master bc24bd47

2014-03-12 14:50:59

mwoehlke

Details Diff
BUG: Fix CMakeParser.py parsing

Add some additional escapes which were not being handled. Remove
attempts to parse expansions; AFAICT they don't impact argument
splitting (which is what we really care about), and the existing logic
was inadequate.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22982 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/CMakeParser.py Diff File

master b42c5dbc

2014-03-12 14:50:58

mwoehlke

Details Diff
STYLE: fix indent

Fix indentation of __all__ values in GithubHelper.py and Utilities.py,
which were using four spaces instead of two due to being copied from
another location that uses four-space indent.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22981 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/GithubHelper.py Diff File
mod - Utilities/Scripts/SlicerWizard/Utilities.py Diff File

master b31c71a3

2014-03-12 14:50:57

mwoehlke

Details Diff
STYLE: Make ExtensionProject.project a property

Change the project() method of ExtensionProject to a property, and
update uses accordingly.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22980 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/ExtensionProject.py Diff File
mod - Utilities/Scripts/SlicerWizard/ExtensionWizard.py Diff File

master d82ce22e

2014-03-12 14:50:56

mwoehlke

Details Diff
STYLE: Document SlicerWizard/CMakeParser.py

Add documentation of SlicerWizard.CMakeParser. Tweak an exception
message that I noticed in the process could be improved.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22979 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/CMakeParser.py Diff File

master 3c044b93

2014-03-12 14:50:55

mwoehlke

Details Diff
STYLE: Document SlicerWizard/GithubHelper.py

Add documentation for the public API of SlicerWizard.GithubHelper. Also,
fix some code issues revealed in the course of writing the same:

- CredentialToken class is private; name should start with '_'
- CredentialToken did not output values added from text input
- logIn() function doesn't need a repository; it can be optional
- logIn() was not failing as expected in case of authentication failure
- getPullRequest() should accept additional criteria

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22978 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/GithubHelper.py Diff File

master d13e47c0

2014-03-12 14:50:54

mwoehlke

Details Diff
STYLE: Document SlicerWizard/Utilities.py

Add documentation for the public API of SlicerWizard.Utilities. Also,
fix some minor code issues revealed in the course of writing the same:

- Use sys.exit instead of exit
- Remove unused 'clone' parameter from getRepo

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22977 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/Utilities.py Diff File

master 2c5d66be

2014-03-12 14:50:53

mwoehlke

Details Diff
STYLE: Remove silly shebangs

Remove shebangs ("#!/usr/bin/env python") from Python module code. These
are not meant to be executed directly, so shebangs are not appropriate.
(Their presence is almost certainly accidental.)

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22976 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/CMakeParser.py Diff File
mod - Utilities/Scripts/SlicerWizard/ExtensionDescription.py Diff File
mod - Utilities/Scripts/SlicerWizard/ExtensionProject.py Diff File
mod - Utilities/Scripts/SlicerWizard/ExtensionWizard.py Diff File
mod - Utilities/Scripts/SlicerWizard/GithubHelper.py Diff File
mod - Utilities/Scripts/SlicerWizard/Utilities.py Diff File

master 2d795233

2014-03-12 14:50:52

mwoehlke

Details Diff
ENH: Use 'git credentials' in GithubHelper.py

Change GithubHelper.py to use 'git credentials' to get the login
information for github. This way we are not only handling this
information in the same manner as git, but we leverage its credentials
storage system as well. (The downside is that the user name is no longer
automatically stored permanently if the user is not using a password
manager.)

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22975 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/GithubHelper.py Diff File

master bbd6e5f8

2014-03-12 14:50:51

mwoehlke

Details Diff
ENH: Sort ExtensionWizard.py --listTemplates

Change TemplateManager.listTemplates method to sort the list of
templates per category, rather than outputting in the semi-arbitrary
order of dict. (The categories come from a list, which retains the
declaration order - which is likely to be a meaningful, semantic
ordering that is at least as good as a lexical sorting - and so do not
need to be sorted.)

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22974 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/TemplateManager.py Diff File

master 01f213da

2014-03-12 14:49:33

jcfr

Details Diff
STYLE: Rename Slicer(Wizard.py) -> Extension

Given its current functionality, SlicerWizard.py is more appropriately
the Extension Wizard; rename it accordingly. This also allows us to
shorten the actions (by dropping 'extension' from the end).

Also, the 'submit' action has been renamed to 'contribute'.

Note that the module code has NOT been moved, as it conceivably could be
used by some other script. (Although the SlicerWizard class is renamed.)
Thus, the driver script now says 'from SlicerWizard import
ExtensionWizard'.

From: Matthew Woehlke <matthew.woehlke@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22973 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/__init__.py Diff File

master 22439577

2014-03-12 14:42:31

mwoehlke

Details Diff
ENH: Add 'describe extension' to SlicerWizard.py

Add an action to "describe" an extension (i.e. dump its generated
description content to stdout). This is useful both as a user check
before publishing, and potentially can be used by CMake as an alternate
means of generating the s4ext file for the build.

Note that at the moment the extension must have a git repository.
Eventually we want to support subversion repositories and also
extensions that don't yet have a repository, but a number of places will
need to change for that (e.g. publishing should also support svn).

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22972 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/ExtensionDescription.py Diff File
mod - Utilities/Scripts/SlicerWizard/SlicerWizard.py Diff File

master 1a804422

2014-03-12 14:42:30

mwoehlke

Details Diff
ENH: Add compare URL when updating extension

Change SlicerWizard.py to load the old extension description when
submitting an update to an extension, and to use this to generate and
include a compare URL in the pull request message with the changes in
the extension from the currently available (indexed) version.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22971 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/SlicerWizard.py Diff File
mod - Utilities/Scripts/SlicerWizard/Utilities.py Diff File

master 750ac2b4

2014-03-12 14:42:29

mwoehlke

Details Diff
ENH: Improve ExtensionDescription API

Add ability to directly construct an ExtensionDescription from a file
path. Note that unlike read() this takes the path to a description file,
not a directory containing a (single) extension description. This is
intended to be used to read extension descriptions from the index
repository.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22970 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/ExtensionDescription.py Diff File
mod - Utilities/Scripts/SlicerWizard/SlicerWizard.py Diff File

master f0f2cce8

2014-03-12 14:42:28

mwoehlke

Details Diff
ENH: Allow looking up github repository by URL

Change GithubHelper.getRepo to take either a name or clone URL, adding
the ability to look up a repository by a clone URL. This is needed to
find the github repository for an extension that has already been
published.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22969 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/GithubHelper.py Diff File
mod - Utilities/Scripts/SlicerWizard/SlicerWizard.py Diff File

master 9ae90c97

2014-03-12 14:42:27

mwoehlke

Details Diff
ENH: Create pull request when submitting extension

Finish implementing the base logic to crate the github pull request via
SlicerWizard when submitting an extension. This seems to be working for
additions. For updates, we still also want to generate a compare URL for
the extension repository to add to the pull request message.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22968 3bd1e089-480b-0410-8dfb-8563597acbee
mod - Utilities/Scripts/SlicerWizard/GithubHelper.py Diff File
mod - Utilities/Scripts/SlicerWizard/SlicerWizard.py Diff File
 First  Prev  1 2 3 ... 10 ... 20 ... 30 ... 40 ... 50 ... 60 ... 70 ... 80 ... 90 ... 100 ... 110 ... 120 121 122 123 124 125 126 ... 130 ... 133 134 135  Next  Last