GithubHelp home page GithubHelp logo

lancet's Introduction

LANCET

From http://en.wikipedia.org/wiki/Scalpel:

A scalpel, or lancet, is a small and extremely sharp bladed instrument used for surgery, anatomical dissection, and various arts and crafts (called a hobby knife).

Lancet is a command line utility to streamline the various activities related to the development and maintenance of a software package.

Installation

Check out the documentation.

Getting started

Once installed, set up the initial configuration by running:

lancet setup

For each not-yet-configured project, you can then run:

cd path/to/project
lancet init

This creates a new project-level configuration file that can be shared across different users (and thus commited to source control).

Install dev version

~/.local/venvs/lancet/bin/pip uninstall lancet
~/.local/venvs/lancet/bin/pip install https://github.com/GaretJax/lancet/archive/master.zip

TODO

A lot of commands are still missing, as for example:

lancet's People

Contributors

garetjax avatar requires avatar vxsx avatar

Stargazers

Eugene Oskin avatar John Vandenberg avatar Brandon Evans avatar Jonathan Barratt avatar Kim Thoenen avatar Loriana Indelicato avatar Dario Albanesi avatar Igor Kucher avatar  avatar

Watchers

 avatar James Cloos avatar

lancet's Issues

Add a 'quickfix' command to use lancet without JIRA

Sometimes we just need to work on a small task or a quick fix, for which a JIRA issue would be overkill, but we would still like to take advantage of other parts of lancet (branching, pull requests, timing,...).

A lancet quickfix <harvest_task> <summary> (or a wizard) could initialize such a task.

Integrate `activate` into `workon`

This would allow to execute the lancet workon PRJ-1 command from any directory and having lancet setup everything to immediately starting work:

  • cd to the project directory
  • activate virtual environment
  • set JIRA issue status/assignee
  • start harvest timer

Handle unassigned issues

When executing workon on an issue without assignee, an AttributeError is raised (lancet/cli.py, line 55, in assign_issue)

Handle not configured usernames better

When no username is configured for a given service, the login process runs correctly, but on the next invocation, the credentials are not found and a new login loop is triggered. The same happens if a wrong username is passed in.

pip install lancet fails

Just so you don't forget ๐Ÿ˜‰

โฏ pipsi install lancet
New python executable in /Users/kim/.local/venvs/lancet/bin/python2.7
Also creating executable in /Users/kim/.local/venvs/lancet/bin/python
Installing setuptools, pip...done.
Collecting lancet
  Using cached lancet-0.7.1-py27-none-any.whl
Collecting gnureadline==6.3.3 (from lancet)
  Using cached gnureadline-6.3.3-cp27-none-macosx_10_5_x86_64.whl
Collecting six==1.9.0 (from lancet)
  Using cached six-1.9.0-py2.py3-none-any.whl
Collecting uritemplate.py==0.3.0 (from lancet)
  Using cached uritemplate.py-0.3.0.tar.gz
Collecting tlslite==0.4.8 (from lancet)
  Using cached tlslite-0.4.8.tar.gz
Collecting keyring==5.3 (from lancet)
  Using cached keyring-5.3.zip
Collecting Unidecode==0.04.17 (from lancet)
  Using cached Unidecode-0.04.17.tar.gz
Collecting MarkupSafe==0.23 (from lancet)
  Using cached MarkupSafe-0.23.tar.gz
Collecting click==3.3 (from lancet)
  Using cached click-3.3-py2.py3-none-any.whl
Collecting requests==2.5.3 (from lancet)
  Using cached requests-2.5.3-py2.py3-none-any.whl
Collecting oauthlib==0.7.2 (from lancet)
  Using cached oauthlib-0.7.2.tar.gz
Collecting giturlparse.py==0.0.5 (from lancet)
  Using cached giturlparse.py-0.0.5.tar.gz
Collecting pygit2==0.21.4 (from lancet)
  Using cached pygit2-0.21.4.tar.gz
    Complete output from command python setup.py egg_info:
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    In file included from c/_cffi_backend.c:5902:
    c/../_cffi1/cffi1_module.c:21:34: warning: comparison of constant 0 with boolean expression is always false [-Wtautological-constant-out-of-range-compare]
        if (!PyType_Ready(&FFI_Type) < 0)
            ~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
    c/../_cffi1/cffi1_module.c:23:34: warning: comparison of constant 0 with boolean expression is always false [-Wtautological-constant-out-of-range-compare]
        if (!PyType_Ready(&Lib_Type) < 0)
            ~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
    2 warnings generated.

    Installed /private/var/folders/90/c8vt49x94657zkzbgqc8t3yh0000gn/T/pip-build-FjbOIy/pygit2/.eggs/cffi-1.0.0b2-py2.7-macosx-10.10-x86_64.egg
    Searching for pycparser
    Reading https://pypi.python.org/simple/pycparser/
    Best match: pycparser 2.12
    Downloading https://pypi.python.org/packages/source/p/pycparser/pycparser-2.12.tar.gz#md5=debde3e37af8566c95d2c0a0504397e7
    Processing pycparser-2.12.tar.gz
    Writing /var/folders/90/c8vt49x94657zkzbgqc8t3yh0000gn/T/easy_install-iQfqta/pycparser-2.12/setup.cfg
    Running pycparser-2.12/setup.py -q bdist_egg --dist-dir /var/folders/90/c8vt49x94657zkzbgqc8t3yh0000gn/T/easy_install-iQfqta/pycparser-2.12/egg-dist-tmp-PROghF
    warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
    warning: no previously-included files matching 'lextab.*' found under directory 'tests'
    warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
    warning: no previously-included files matching 'lextab.*' found under directory 'examples'
    zip_safe flag not set; analyzing archive contents...
    Copying pycparser-2.12-py2.7.egg to /private/var/folders/90/c8vt49x94657zkzbgqc8t3yh0000gn/T/pip-build-FjbOIy/pygit2/.eggs

    Installed /private/var/folders/90/c8vt49x94657zkzbgqc8t3yh0000gn/T/pip-build-FjbOIy/pygit2/.eggs/pycparser-2.12-py2.7.egg
    running egg_info
    creating pip-egg-info/pygit2.egg-info
    writing requirements to pip-egg-info/pygit2.egg-info/requires.txt
    writing pip-egg-info/pygit2.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/pygit2.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/pygit2.egg-info/dependency_links.txt
    writing manifest file 'pip-egg-info/pygit2.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    running build_ext
    building 'pygit2_cffi_bd4f3739x292444b7' extension
    creating /private/var/folders/90/c8vt49x94657zkzbgqc8t3yh0000gn/T/pip-build-FjbOIy/pygit2/pygit2/__pycache__/pygit2
    creating /private/var/folders/90/c8vt49x94657zkzbgqc8t3yh0000gn/T/pip-build-FjbOIy/pygit2/pygit2/__pycache__/pygit2/__pycache__
    clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -I/usr/local/include -I/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pygit2/__pycache__/pygit2_cffi_bd4f3739x292444b7.c -o /private/var/folders/90/c8vt49x94657zkzbgqc8t3yh0000gn/T/pip-build-FjbOIy/pygit2/pygit2/__pycache__/pygit2/__pycache__/pygit2_cffi_bd4f3739x292444b7.o
    pygit2/__pycache__/pygit2_cffi_bd4f3739x292444b7.c:207:10: fatal error: 'git2.h' file not found
    #include <git2.h>
             ^
    1 error generated.
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/var/folders/90/c8vt49x94657zkzbgqc8t3yh0000gn/T/pip-build-FjbOIy/pygit2/setup.py", line 202, in <module>
        cmdclass=cmdclass)
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "<string>", line 15, in replacement_run
      File "/Users/kim/.local/venvs/lancet/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 207, in find_sources
        mm.run()
      File "/Users/kim/.local/venvs/lancet/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 291, in run
        self.add_defaults()
      File "/Users/kim/.local/venvs/lancet/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 320, in add_defaults
        sdist.add_defaults(self)
      File "/Users/kim/.local/venvs/lancet/lib/python2.7/site-packages/setuptools/command/sdist.py", line 118, in add_defaults
        build_py = self.get_finalized_command('build_py')
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command
        cmd_obj.ensure_finalized()
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
        self.finalize_options()
      File "/Users/kim/.local/venvs/lancet/lib/python2.7/site-packages/setuptools/command/build_py.py", line 28, in finalize_options
        orig.build_py.finalize_options(self)
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_py.py", line 46, in finalize_options
        ('force', 'force'))
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 298, in set_undefined_options
        src_cmd_obj.ensure_finalized()
      File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
        self.finalize_options()
      File "/private/var/folders/90/c8vt49x94657zkzbgqc8t3yh0000gn/T/pip-build-FjbOIy/pygit2/setup.py", line 101, in finalize_options
        ffi, C = get_ffi()
      File "pygit2/_utils.py", line 101, in get_ffi
        include_dirs=[libgit2_include], library_dirs=[libgit2_lib])
      File "/private/var/folders/90/c8vt49x94657zkzbgqc8t3yh0000gn/T/pip-build-FjbOIy/pygit2/.eggs/cffi-1.0.0b2-py2.7-macosx-10.10-x86_64.egg/cffi/api.py", line 368, in verify
        lib = self.verifier.load_library()
      File "/private/var/folders/90/c8vt49x94657zkzbgqc8t3yh0000gn/T/pip-build-FjbOIy/pygit2/.eggs/cffi-1.0.0b2-py2.7-macosx-10.10-x86_64.egg/cffi/verifier.py", line 96, in load_library
        self._compile_module()
      File "/private/var/folders/90/c8vt49x94657zkzbgqc8t3yh0000gn/T/pip-build-FjbOIy/pygit2/.eggs/cffi-1.0.0b2-py2.7-macosx-10.10-x86_64.egg/cffi/verifier.py", line 192, in _compile_module
        outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
      File "/private/var/folders/90/c8vt49x94657zkzbgqc8t3yh0000gn/T/pip-build-FjbOIy/pygit2/.eggs/cffi-1.0.0b2-py2.7-macosx-10.10-x86_64.egg/cffi/ffiplatform.py", line 38, in compile
        outputfilename = _build(tmpdir, ext)
      File "/private/var/folders/90/c8vt49x94657zkzbgqc8t3yh0000gn/T/pip-build-FjbOIy/pygit2/.eggs/cffi-1.0.0b2-py2.7-macosx-10.10-x86_64.egg/cffi/ffiplatform.py", line 65, in _build
        raise VerificationError('%s: %s' % (e.__class__.__name__, e))
    cffi.ffiplatform.VerificationError: CompileError: command 'clang' failed with exit status 1

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/90/c8vt49x94657zkzbgqc8t3yh0000gn/T/pip-build-FjbOIy/pygit2
Failed to pip install.  Aborting.

Connection refused when connecting to JIRA

Connection refused when logging in:

File "/Users/joseph/.local/venvs/lancet/lib/python3.4/site-packages/requests/sessions.py", line 473, in get
    return self.request('GET', url, **kwargs)
File "/Users/joseph/.local/venvs/lancet/lib/python3.4/site-packages/requests/sessions.py", line 461, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/joseph/.local/venvs/lancet/lib/python3.4/site-packages/requests/sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
  File "/Users/joseph/.local/venvs/lancet/lib/python3.4/site-packages/requests/adapters.py", line 415, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionRefusedError(61, 'Connection refused'))

Full traceback: https://gist.github.com/jmelett/252e32b793aa6b80a5f8

Any idea what might cause this? My firewall is turned off.

ValueError

ยฑ % lancet workon 145                                                                                                                                                                                                                                           !12674 17:51:13
 โœ“  Retrieved issue PRJ-145: redacted
 โœ“  Issue assigned to you
 โœ“  Issue status set to "In Progress"
 โœ“  Checked out working branch based on "master"
 โœ—  ValueError: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "/Users/divio/.local/bin/lancet", line 11, in <module>
    sys.exit(main())
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/lancet/cli.py", line 252, in workon
    lancet.timer.start(issue)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/lancet/harvest.py", line 31, in wrapper
    return func(self, *args, **kwargs)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/lancet/harvest.py", line 164, in start
    assert 'message' in r.json()
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/requests/models.py", line 799, in json
    return json.loads(self.text, **kwargs)
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/json/__init__.py", line 318, in loads
    return _default_decoder.decode(s)
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/json/decoder.py", line 343, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/json/decoder.py", line 361, in raw_decode
    raise ValueError(errmsg("Expecting value", s, err.value)) from None
ValueError: Expecting value: line 1 column 1 (char 0)

not sure if this is relevant, but
worked on the issue the day before - was okay, created timer correctly.
today there is not yet a timer for it - this happens

Weird lancet pr fail

I tried lancet pr and got this

ยฑ % lancet pr                                                                                                                                                                                                                                                    !11405 9:16:51
 โœ“  Retrieved issue PRJ-250: some text
 โœ“  Pushed latest changes to "origin"
 โœ—  ConnectionError: ('Connection aborted.', BadStatusLine("''",))
Traceback (most recent call last):
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 353, in _make_request
    httplib_response = conn.getresponse(buffering=True)
TypeError: getresponse() got an unexpected keyword argument 'buffering'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 518, in urlopen
    body=body, headers=headers)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 355, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/http/client.py", line 1172, in getresponse
    response.begin()
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/http/client.py", line 351, in begin
    version, status, reason = self._read_status()
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/http/client.py", line 321, in _read_status
    raise BadStatusLine(line)
http.client.BadStatusLine: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/requests/adapters.py", line 370, in send
    timeout=timeout
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 564, in urlopen
    _pool=self, _stacktrace=stacktrace)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/requests/packages/urllib3/util/retry.py", line 245, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/requests/packages/urllib3/packages/six.py", line 309, in reraise
    raise value.with_traceback(tb)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 518, in urlopen
    body=body, headers=headers)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py", line 355, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/http/client.py", line 1172, in getresponse
    response.begin()
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/http/client.py", line 351, in begin
    version, status, reason = self._read_status()
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/http/client.py", line 321, in _read_status
    raise BadStatusLine(line)
requests.packages.urllib3.exceptions.ProtocolError: ('Connection aborted.', BadStatusLine("''",))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/divio/.local/bin/lancet", line 9, in <module>
    load_entry_point('lancet==0.5.1', 'console_scripts', 'lancet')()
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/Users/divio/work/lancet/lancet/cli.py", line 400, in pull_request
    body.strip('\n'))
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/github3/decorators.py", line 38, in auth_wrapper
    return func(self, *args, **kwargs)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/github3/repos/repo.py", line 719, in create_pull
    return self._create_pull(data)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/github3/repos/repo.py", line 294, in _create_pull
    json = self._json(self._post(url, data=data), 201)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/github3/models.py", line 145, in _post
    return self._session.post(url, data, **kwargs)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/requests/sessions.py", line 504, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/github3/session.py", line 81, in request
    response = super(GitHubSession, self).request(*args, **kwargs)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/requests/sessions.py", line 461, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/requests/sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/requests/adapters.py", line 415, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))

Second time went ok.

Add better debugging/reporting tools

When helping other users, it is very useful to have some nice features such as:

  • Dropping into pdb when an exception is raised
  • Dropping into pdb when taskstatus.fail is called (one frame up)
  • Logging errors via Sentry

At least pdb shall be activated with a -d/--debug flag, Sentry could be active all the time.
Could also be interesting to start logging things and provide a -v/--verbose flag.

lancet init fails

not sure what's happening here

ยฑ % lancet init                                                                                                                                                                                                                                                 !12369 11:09:14
Project key on the issue tracker: PRJ
Integration branch [master]:
Path to virtual environment [env]:
Project ID on Harvest: 6523662
Task id on Harvest: 3692194
Traceback (most recent call last):
  File "/Users/divio/.local/bin/lancet", line 11, in <module>
    sys.exit(main())
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/Users/divio/.local/venvs/lancet/lib/python3.4/site-packages/lancet/cli.py", line 532, in init
    config.set('harvest', 'project_id', project_id)
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/configparser.py", line 1166, in set
    self._validate_value_types(option=option, value=value)
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/configparser.py", line 1155, in _validate_value_types
    raise TypeError("option values must be strings")
TypeError: option values must be strings

Please reconsider the project name

Hi!

Please consider the problems caused by calling your package 'lancet' when an older and more mature python package called Lancet already exists: Lancet Website and GitHub repository.

This wouldn't be an issue if your library weren't also written in Python with an entry on PyPI. As it is, there will be a package clash for anyone trying to import:

import lancet

The repository ioam/lancet is part of the IOAM educational organization: we are computational neuroscientists using the Topographica neural simulator. We use the Lancet package to launch our simulations and we would all be very grateful if we can avoid a name clash on PyPI.

I fully realize this is our own fault for not registering a PyPI package called "lancet" earlier on! I made the incorrect assumption that having an older GitHub repository, an official website as well as a paper publication would discourage anyone from picking the same name.

Further, I realize there is no way I can compel you to change your project in any way. That said, I do hope you will listen as I can make a fairly strong argument that both our projects would benefit by avoiding confusion.

Firstly, not only does Lancet on IOAM have an older GitHub repository (with more commits and contributors), there is a published paper, specifically about Lancet. It was published as part of a special research topic talking about the use of Python tools in Neuroscience (Python in Neuroscience II):

Frontiers in Neuroinformatics (Dec 30, 2013): An automated and reproducible workflow for running and analyzing neural simulations using Lancet and IPython Notebook

There are also a number of research papers already published using Lancet; it is used by other researchers as well as undergraduate and Masters students. Here is one paper published using Lancet:

Journal of Neuroscience (Oct 2, 2013): Mechanisms for Stable, Robust, and Adaptive Development of Orientation Maps in the Primary Visual Cortex

And here is another paper that used Lancet to launch simulations in the field of computer architecture:

HPCA 2014: TSO-CC: Consistency directed cache coherence for TSO

Next, I should point out that the Lancet GitHub repository on IOAM is over two years older, has more commits and also more contributors:

ioam/lancet: Sep 21, 2012 [247 commits - 5 contributors]
GaretJax/lancet: Nov 18, 2014 [168 commits - 3 contributors]

Thirdly, Lancet is about to get a lot of exposure which will then prevent people from using your work! I expect a lot of people to be installing it soon (which is why I am working on a PyPI and conda release). Everyone who installs Lancet from IOAM won't be able to install your project without encountering installation problems.

In particular, I will be giving a talk both at the SciPy and EuroScipy this summer and I will be encouraging people to install the IOAM version of Lancet. I am also presenting Lancet at a talk in September at the Bernstein conference and I am planning to give tutorials about using Lancet for scientific research at future SciPy conferences.

Lastly, I am the author of HoloViews which is becoming popular (and growing!). When people use pip install 'holoviews[extras]' they automatically install additional dependencies: I am now considering adding ioam/lancet to that list in order to avoid people getting confused if they try pip install lancet (the Lancet package is designed to complement HoloViews).

Having a name clash will only cause trouble for the rest of the Python community and will harm both our projects. Our work is free and open source and we are all trying to contribute something useful to the community. This is why it would be good if our two projects play nicely with each other without confusing people. I doubt either of us want people filing bugs in your project about my code and vice versa! :-)

So please do consider renaming your project - or at minimum freeing up the registered PyPI name for use by the IOAM organization! I wish to instruct people to use pip install lancet at SciPy, otherwise I will need to work around this issue. This will cause problems for me, everyone attending the talks and then also you because people won't also be able to use your project! No one benefits from such a situation. If you are willing to transfer the PyPI package name 'lancet' to the IOAM organization then that would probably be enough...

On PyPI, you could register garetjax-lancetor maybe lancet-utility for yourself so you can keep your existing project name. Sadly, this won't help resolve the import clash...

I understand that this is difficult coming up with a good name for a project that is unique - it is important to have a unique name for the Python community and good for you if you want people to use your software. I am willing to assist you in any way to help resolve this - I am certain that having a distinct name will help your project become successful and gain users.

If we don't resolve this now, it will causes problems for both projects down the line. Once your project grows, you don't want to inconvenience your users with a name change at a later date, once we really start experiencing the problems I have described.

Finally, I am happy to help promote your project in various ways if you consider either renaming your package or freeing up the 'lancet' name of PyPI. For a start, I am happy to redirect people looking for your command-line tools from our README as well as from our main website (hence directing traffic to your project!). If you are kind enough to rename, I would also be happy to mention your project favorably at the start of my upcoming SciPy talks. This will help your project grow!

I am sure we can come to an amicable arrangement that it good for both projects and that will reduce confusion for everyone.

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.