Coder Social home page Coder Social logo

pyscaffold / pyscaffold Goto Github PK

View Code? Open in Web Editor NEW
2.0K 38.0 177.0 8.05 MB

๐Ÿ›  Python project template generator with batteries included

Home Page: https://pyscaffold.org

License: Other

Python 100.00%
python release-automation git distribution package-creation template-project project-template package

pyscaffold's Introduction

Built Status

ReadTheDocs

Coveralls

PyPI-Server

Conda-Forge

Monthly Downloads

Sponsor me

Twitter

PyScaffold

PyScaffold logo

PyScaffold is a project generator for bootstrapping high quality Python packages, ready to be shared on PyPI and installable via pip. It is easy to use and encourages the adoption of the best tools and practices of the Python ecosystem, helping you and your team to stay sane, happy and productive. The best part? It is stable and has been used by thousands of developers for over half a decade!

Checkout out this demo project, which was set up using PyScaffold and if you are still not convinced yet, also have a look at these reasons to use PyScaffold.

NOTE - This document refers to the latest version of PyScaffold (v4). Please refer to v3.3 for the previous stable version.

Quickstart

Just pick your favourite installation method:

## Good old pip
# (make sure it is up-to-date: pip install -U pip setuptools)
pip install pyscaffold

## Conda for the datascience fans
conda install -c conda-forge pyscaffold

## Or even pipx for the virtualenv aficionados
pipx install pyscaffold

If you want to install all PyScaffold's extensions you can even:

pip install pyscaffold[all]

(More details of each method are available in the installation docs)

After the installation, a new putup command will be available and you can just type:

putup my_project

This will create a new folder called my_project containing a perfect project template with everything you need for some serious coding.

After cd-ing into your new project and creating (or activating) an isolated development environment (with virtualenv, conda or your preferred tool), you can do the usual editable install:

pip install -e .

โ€ฆ all set and ready to go!

We also recommend using tox, so you can take advantage of the automation tasks we have setup for you, like:

tox -e build  # to build your package distribution
tox -e publish  # to test your project uploads correctly in test.pypi.org
tox -e publish -- --repository pypi  # to release your package to PyPI
tox -av  # to list all the tasks available

The following figure demonstrates the usage of putup with the new experimental interactive mode for setting up a simple project. It uses the --cirrus flag to add CI support (via Cirrus CI), and tox to run automated project tasks like building a package file for distribution (or publishing).

Creating a simple package with PyScaffold

Type putup -h to learn about more configuration options. PyScaffold assumes that you have Git installed and set up on your PC, meaning at least your name and email are configured.

The project template provides you with following features:

Configuration & Packaging

All configuration can be done in setup.cfg like changing the description, URL, classifiers, installation requirements and so on as defined by setuptools. That means in most cases it is not necessary to tamper with setup.py.

In order to build a source or wheel distribution, just run tox -e build (if you don't use tox, you can also install build and run python -m build).

Package and Files Data

Additional data, e.g. images and text files, that reside within your package and are tracked by Git will automatically be included if include_package_data = True in setup.cfg. It is not necessary to have a MANIFEST.in file for this to work.

Note that the include_package_data option in setup.cfg is only guaranteed to be read when creating a wheels distribution. Other distribution methods might behave unexpectedly (e.g. always including data files even when include_package_data = False). Therefore, the best option if you want to have data files in your repository but not as part of the pip installable package is to add them somewhere outside the src directory (e.g. a files directory in the root of the project, or inside tests if you use them for checks). Additionally you can exclude them explicitly via the [options.packages.find] exclude option in setup.cfg.

Versioning and Git Integration

Your project is an already initialised Git repository and uses the information of tags to infer the version of your project with the help of setuptools_scm. To use this feature, you need to tag with the format MAJOR.MINOR[.PATCH] , e.g. 0.0.1 or 0.1. This version will be used when building a package and is also accessible through my_project.__version__.

Unleash the power of Git by using its pre-commit hooks. This feature is available through the --pre-commit flag. After your project's scaffold was generated, make sure pre-commit is installed, e.g. pip install pre-commit, then just run pre-commit install.

A default .gitignore file is also provided; it is well adjusted for Python projects and the most common tools.

Sphinx Documentation

PyScaffold will prepare a docs directory with all you need to start writing your documentation. Start editing the file docs/index.rst to extend the documentation. The documentation also works with Read the Docs.

The Numpy and Google style docstrings are activated by default.

If you have tox in your system, simply run tox -e docs or tox -e doctests to compile the docs or run the doctests.

Alternatively, if you have make and Sphinx installed in your computer, build the documentation with make -C docs html and run doctests with make -C docs doctest. Just make sure Sphinx 1.3 or above is installed.

Automation, Tests & Coverage

PyScaffold relies on pytest to run all automated tests defined in the subfolder tests. Some sane default flags for pytest are already defined in the [tool:pytest] section of setup.cfg. The pytest plugin pytest-cov is used to automatically generate a coverage report. It is also possible to provide additional parameters and flags on the commandline, e.g., type:

pytest -h

to show the help of pytest (requires pytest to be installed in your system or virtualenv).

Projects generated with PyScaffold by default support running tests via tox, a virtualenv management and test tool, which is very handy. If you run:

tox

in the root of your project, tox will download its dependencies, build the package, install it in a virtualenv and run the tests using pytest, so you are sure everything is properly tested.

JUnit and Coverage HTML/XML

For usage with a continuous integration software JUnit and Coverage XML output can be activated in setup.cfg. Use the flag --cirrus to generate templates of the Cirrus CI configuration file .cirrus.yml which even features the coverage and stats system Coveralls.

Management of Requirements & Licenses

Installation requirements of your project can be defined inside setup.cfg, e.g. install_requires = numpy; scipy. To avoid package dependency problems it is common to not pin installation requirements to any specific version, although minimum versions, e.g. sphinx>=1.3, and/or maximum versions, e.g. pandas<0.12, are used frequently in accordance with semantic versioning.

All licenses from choosealicense.com can be easily selected with the help of the --license flag.

Extensions

PyScaffold comes with several extensions:

Find more extensions within the PyScaffold organisation and consider contributing your own, it is very easy! You can quickly generate a template for your extension with the --custom-extension option after having installed pyscaffoldext-custom-extension.

All extensions can easily be installed with pip install pyscaffoldext-NAME.

Easy Updating

Keep your project's scaffold up-to-date by applying putup --update my_project when a new version of PyScaffold was released. An update will only overwrite files that are not often altered by users like setup.py. To update all files use --update --force. An existing project that was not setup with PyScaffold can be converted with putup --force existing_project. The force option is completely safe to use since the git repository of the existing project is not touched!

pyscaffold's People

Contributors

abravalheri avatar baurmatt avatar carlijoy avatar cclauss avatar cpaulik avatar florianwilhelm avatar gitter-badger avatar holgerpeters avatar jayvdb avatar kianmeng avatar koenvervloesem avatar laurentiu-andronache avatar maresb avatar mfhepp avatar mgorny avatar mhaley-tignis avatar noahp avatar prassanna-ravishankar avatar pre-commit-ci[bot] avatar qulogic avatar reuvenpo avatar sam-m888 avatar satwell avatar smartsammler avatar stephanerb avatar taylormonacelli avatar treebee avatar vickychenglau avatar willu47 avatar xhochy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyscaffold's Issues

Check if Versioneer could be included in setup.py

Versioneer seems to be in a state of no active development and if it is it will be extended to other VCS which will increase the codebase. Check if the code can be merged directly into PyScaffold, this would also allow the codebase to be cleaned up for PEP8 conformity etc.

Use dictionaries instead of namespace objects

Currently all settings are handled as namespace objects. It would be more convenient to use dictionaries instead. Dictionaries are more general and only argparse seems to use these namespace objects.

Proper Windows support

Currently PyScaffold does not really seem to work under Windows properly. Some of the unittests fail and most importantly the test_version test meaning that the whole versioneer setup does not work.

Travis support

Add a default .travis.yml which runs the unittests. Mention this in the docs.

Update should not add a skeleton.py

On the inital setup of a project a skeleton file is very helpful to already have the python structure but while I perform a PyScaffold update on my project I already have code. So there is no need for a new skeleton anymore.

Return code of doctest

Currently python setup.py doctestalways exits with return code 0. For use with a continuous integration server it would be useful if the return code was nonzero in case of failing tests. Maybe it could also generate a junit xml report.

Check out if PBR could be used in setup.py

Right now reading setup.cfg is implemented in setup.py since setuptools does not provide this functionality. The library pbr seems to add this functionality and is based on setuptools. We should check it out and see if our own code can be removed in favor of pbr.

test_Command unit test fails on Mac OS X

On a macbook, the test_Command test fails. I suppose that this is a gnu-tools bsd-tools issue (upon exchanging echo with gecho - the gnu-tool echo the test succeeds).

=================================== FAILURES ====================================
_________________________________ test_Command __________________________________

    def test_Command():
        echo = shell.Command('echo')
        output = echo('Hello Echo!!!')
        assert next(output) == 'Hello Echo!!!'
        output = echo('-n', 'No newline')
>       assert next(output) == 'No newline'
E       assert '-n No newline' == 'No newline'
E         - -n No newline
E         ? ---
E         + No newline

tests/test_shell.py:20: AssertionError
__________________________________ test_chdir _____

Add license file to project template AND to pyscaffold

Howdy,

How about having license information in the project templates? Just a blank stub file as the default, of course, but IMHO it's an important piece that every project needs to have. Sites like http://choosealicense.com take the pain away from chosing a license, we could even have a flag where users could pass the licence they want, like --with-license MIT and pyscaffold would grab the license from choosealicense.com.

And speaking of licenses, how about creating a license file for this project?

Rework the --update mechanism

Updating without the force parameter seems to behave strange sometimes. Especially files that do not exist will not be created in that case. Make sure nothing is overwritten but create the files if they don't exist.

Installation

Small section in the Sphinx documentation about the installation with pip.

Allow Cython files to be included

Right now PyScaffold does not directly allow to create packages which use Cython files. This functionality of setuptools is not yet exposed in a user-friendly way. We should start collecting ideas how we could resolve this.

Recursive include of data_files

Using MANIFEST.in has the advantage of the recursive-include command. Using wildcards in data_files does not work recursively. Can we somehow fix this?

Support for Plugins

See how plugins for additional templates could be implemented in PyScaffold. One idea would be to use https://github.com/audreyr/cookiecutter in order to define additional files and folders. Maybe providing a --cookiecutter TEMPLATE command-line option is the way to go. Any thoughts on that?

Support for numpydoc?

Would it be possible, or better, is it in the scope of this project to add a --with-numpydoc flag to the putup command?

That is one of the only things I always have to add manually.

Thanks.

Add pre-commit hooks to the project template

Howdy,

What do you think about having http://pre-commit.com/ being part of the poject template? In pretty much all of my python project I have hooks setup to run pylint/pep8/your_favorite_tool_here before commits and I since this tool already creates a git repository, why not set some hooks while we're at it?

Add configurable test and coverage xml and/or html output

It makes sense that automatically xml output of test results and coverage. It is easy to add this in setup.py: and in the end it should look like this:

class PyTest(TestCommand):
    user_options = [("cov=", None, "Run coverage"),
                    ("junitxml=", None, "Generate xml of test results")]

    def initialize_options(self):
        TestCommand.initialize_options(self)
        self.cov = None
        self.junitxml = None

    def finalize_options(self):
        TestCommand.finalize_options(self)
        if self.cov is not None:
            self.cov = ["--cov", self.cov, "--cov-report", "xml"]
        if self.junitxml is not None:
            self.junitxml = ["--junitxml", self.junitxml]

    def run_tests(self):
        try:
            import pytest
        except:
            raise RuntimeError("py.test is not installed, "
                               "run: pip install pytest")
        params = {"args": self.test_args}
        if self.cov:
            params["args"] += self.cov
            params["plugins"] = ["cov"]
        if self.junitxml:
            params["args"] += self.junitxml

        errno = pytest.main(**params)
        sys.exit(errno)

....

          command_options={
              'docs': {'project': ('setup.py', MAIN_PACKAGE),
                       'version': ('setup.py', version.split('-', 1)[0]),
                       'release': ('setup.py', version),
                       'build_dir': ('setup.py', docs_build_path),
                       'config_dir': ('setup.py', docs_path),
                       'source_dir': ('setup.py', docs_path)},
              'doctest': {'project': ('setup.py', MAIN_PACKAGE),
                          'version': ('setup.py', version.split('-', 1)[0]),
                          'release': ('setup.py', version),
                          'build_dir': ('setup.py', docs_build_path),
                          'config_dir': ('setup.py', docs_path),
                          'source_dir': ('setup.py', docs_path),
                          'builder': ('setup.py', 'doctest')},
              'test': {'test_suite': ('setup.py', 'tests'),
                       'cov': ('setup.py', 'py_db_connection'),
                       'junitxml': ('setup.py', 'result.xml')}
          },

Usage of setup.cfg

Try to move all configuration options from setup.py to setup.cfg for a clearer distinction between configuration and logic.

Provide proper defaults for `devpi upload`

PyScaffold should provide proper defaults for the devpi upload as the usage of https://pypi.python.org/pypi/setuptools_scm comes with some peculiarities in combination with devpi upload. E.g. devpi by default exports from the SCM to avoid packaging files not under version control.

Potential content of the relevant section in setup.cfgcould be:

[devpi:upload]
formats = sdist.tgz,bdist_wheel
no-vcs = 1
with-docs = 1

Rational for each line:

  • setuptools_scm is a required to execute the setup.py and installation will be handled by easy_install. As this can cause errors when using custom indices a wheel should be provided.
  • no-vcs ensures that the version console information is present during packaging.
  • with-docs would ensure the documentation is also uploaded to devpi. As PyScaffold generates Sphinx documentation I assume this to be a sensible default.

Does not install setuptools>9.0 automatically

Using 2.3rc10, the generated setup.py does not install setuptools>9.0 but rather uses 2.0.2 and then crashes with the following trace (reproduced using pip 1.5.6 and 7.1.0).

% pip install -e .                                                                                                                       [10/1518]
Obtaining file://...
    Complete output from command python setup.py egg_info:

    Installed /tmp/easy_install-wWfn4d/pyscaffold-2.3rc10/setuptools_scm-1.5.5-py2.7.egg
    Searching for pbr>=1.2,<1.3a0
    Reading https://pypi.python.org/simple/pbr/
    Best match: pbr 1.2.0
    Downloading https://pypi.python.org/packages/source/p/pbr/pbr-1.2.0.tar.gz#md5=b5b93565a5c6fd514889d5f5d83a485b
    Processing pbr-1.2.0.tar.gz
    Writing /tmp/easy_install-wWfn4d/pyscaffold-2.3rc10/temp/easy_install-D7iuwn/pbr-1.2.0/setup.cfg
    Running pbr-1.2.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-wWfn4d/pyscaffold-2.3rc10/temp/easy_install-D7iuwn/pbr-1.2.0/egg-dist-tmp-b7NGrp

    Installed /tmp/easy_install-wWfn4d/pyscaffold-2.3rc10/pbr-1.2.0-py2.7.egg
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File ".../setup.py", line 24, in <module>
        setup_package()
      File ".../setup.py", line 20, in setup_package
        use_pyscaffold=True)
      File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File ".../local/lib/python2.7/site-packages/setuptools/dist.py", line 239, in __init__
        self.fetch_build_eggs(attrs.pop('setup_requires'))
      File ".../local/lib/python2.7/site-packages/setuptools/dist.py", line 263, in fetch_build_eggs
        parse_requirements(requires), installer=self.fetch_build_egg
      File ".../local/lib/python2.7/site-packages/pkg_resources.py", line 563, in resolve
        dist = best[req.key] = env.best_match(req, self, installer)
      File ".../local/lib/python2.7/site-packages/pkg_resources.py", line 801, in best_match
        return self.obtain(req, installer) # try and download/install
      File ".../local/lib/python2.7/site-packages/pkg_resources.py", line 813, in obtain
        return installer(requirement)
      File ".../local/lib/python2.7/site-packages/setuptools/dist.py", line 313, in fetch_build_egg
        return cmd.easy_install(req)
      File ".../local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 593, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File ".../local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 623, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File ".../local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 809, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File ".../local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1015, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File ".../local/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1000, in run_setup
        run_setup(setup_script, args)
      File ".../local/lib/python2.7/site-packages/setuptools/sandbox.py", line 50, in run_setup
        lambda: execfile(
      File ".../local/lib/python2.7/site-packages/setuptools/sandbox.py", line 100, in run
        return func()
      File ".../local/lib/python2.7/site-packages/setuptools/sandbox.py", line 52, in <lambda>
        {'__file__':setup_script, '__name__':'__main__'}
      File "setup.py", line 134, in <module>

      File "setup.py", line 130, in setup_package

      File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File ".../local/lib/python2.7/site-packages/setuptools/dist.py", line 239, in __init__
        self.fetch_build_eggs(attrs.pop('setup_requires'))
      File ".../local/lib/python2.7/site-packages/setuptools/dist.py", line 263, in fetch_build_eggs
        parse_requirements(requires), installer=self.fetch_build_egg
      File ".../local/lib/python2.7/site-packages/pkg_resources.py", line 575, in resolve
        raise VersionConflict(dist,req) # XXX put more info here
    pkg_resources.VersionConflict: (setuptools 2.0.2 (.../lib/python2.7/site-packages), Requirement.parse('setuptools>=9.0'))

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /...

Output of pip list:

argparse (1.2.1)
pip (1.5.6)
setuptools (2.0.2)
wsgiref (0.1.2)

Better default README.rst

Many users of pyscaffold tend to keep the default README.rst. Unfortuantely, this readme is tailored for the user of pyscaffold but not for any user of the project, who only wants to find out what the project does and how it can be run/tested.

The readme should therefore be shorter and more to the point without any long explanations. It could also contain an elevator pitch of the project.

Conflict with django-admin.py startproject

Florian - this is a really impressive project kick off tool. Watched your talk at Europython. I instantly abandoned the scripts I've slowly evolved over the years as soon as I tried it.

However, it seems that I can't easily put a django project and scaffold project at the same location. My preference is to create the django project then run scaffold on top of it.

For example:
django-admin startproject mycoolproject
creates: mycoolproject/
manage.py
mycoolproject/
init.py
settings.py
urls.py
wsgi.py

I'd then like to do:
putup --force mycoolproject
which would ignore the fact that the directory already exists and write over anything that it encounters.

The only file collision is at mycoolproject/mycoolproject/init.py which is actually an empty file that django makes.

I'm pretty sure these belong at the same level and I don't want to be creating the django project another level deeper.

What do you think?

Changelog

Add a changelog file, also in the template

Use python git bindings instead of parsing git subprocess output

Creating an issue here, as I think it should probably be discussed, and I didn't want to derail the discussion on #40 (sorry @xhochy !)

@FlorianWilhelm - in #40 (comment) you say that you're against the idea of using python bindings such as pygit2 as it would "lead to further restrictions on the user". Can you explain what you mean by "further restrictions"?

My impression is that we want to keep the requirements for pyscaffold as lean as possible. Introducing a dependency on pygit2 would mean the user would have to install it, and (possibly) also already have a system package such as git-lib installed, or something similar.

With all things considered, is that not preferable to the current situation? By "current situation", I mean:

  • Parsing output from git, which is bound to break sooner or later, and which makes backwards compatibility (with regards to git) extremely difficult, due to differing output or behaviour between versions
  • pyscaffold possibly breaking for those who use git in a language other than English
  • Rube Goldberg-style solutions to problems (e.g. checking output from git rev-parse to determine whether we're inside a git repo)

Add a version requirement for setuptools

Installing PyScaffold warns about an outdated version of setuptools. Instead it should just depend on a newer version.

your setuptools is too old (<12)
setuptools_scm functionality is degraded

DistributionNotFound error when running putup

Not sure if this is your main support channel, but I couldn't find anything else. After seeing (the video of) your talk on EuroPython I tried pyscaffold on OSX 10.9 and this is what comes out:

# a320-2 ~/code โžœ putup -h
Traceback (most recent call last):
  File "/usr/local/bin/putup", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
    working_set.require(__requires__)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
    raise DistributionNotFound(req)  # XXX put more info here
pkg_resources.DistributionNotFound: six

Trying to install six, this comes out:

# a320-2 ~/code โžœ sudo pip install six
Password:
Requirement already satisfied (use --upgrade to upgrade): six in /Library/Python/2.7/site-packages
Cleaning up...
# a320-2 ~/code โžœ sudo pip install --upgrade six
Requirement already up-to-date: six in /Library/Python/2.7/site-packages
Cleaning up...

Do you have a hint what I could do to clear this up?

On Windows, the installation aborts even though as requested, "pbs" was installed before

On Windows, the setup installation aborts with "File "c:\temp\easy_install-jy_ycl\sh-1.09\sh.py", line 34, in
ImportError: sh 1.09 is currently only supported on linux and osx. please install pbs 0.110 (http://pypi.python.org/pypi/pbs] for windows support.

It does not help to install pbs first,
the script breaks anyhow and so the installation fails :-(

It would be nice, if the script checks, if pbs is installed, and then does not try to install sh.

Sincerely
Rolf

Improve flake8 pre-commit hook

Exclude scaffold files like versioneer.py, setup.py and {project}/_version.py with:

-   id: flake8
    args: ["--exclude=versioneer.py,setup.py,package/_version.py"

Consider usage of setuptools-git

Using setuptools-git would allow to use the include_package_data keyword argument for setup. The downside would be an additional dependency as well as the need to add the exclude_package_data keyword.

test_chdir fails

test_chdir fails on Mac OS X (Yosemite) with the following stacktrace

__________________________________ test_chdir ___________________________________

    def test_chdir():
        curr_dir = os.getcwd()
        try:
            temp_dir = tempfile.mkdtemp()
            with utils.chdir(temp_dir):
                new_dir = os.getcwd()
>           assert new_dir == temp_dir
E           assert '/private/var...T/tmp79qx1gjm' == '/var/folders/...T/tmp79qx1gjm'
E             - /private/var/folders/nq/fx4vf3v14jz9b8mldvcyv1xr0000gn/T/tmp79qx1gjm
E             ? --------
E             + /var/folders/nq/fx4vf3v14jz9b8mldvcyv1xr0000gn/T/tmp79qx1gjm

tests/test_utils.py:20: AssertionError

Check if git is configured

Newer versions of git seem to deny commits when the user.name and user.mail are not set. This should be checked by PyScaffold before trying to do something.

Provide a proper API for PyScaffold

Currently it is hard to use PyScaffold from another script, more or less one needs to provide all arguments as list of strings to the main function in runner. It would be nice to have functions that help to generate a settings object and a function that runs PyScaffold based on that settings. This means a major rewrite of runner.py.

install fail on windows with python 2.7.2

I'm in a virtualenv with python2.7.2
Windows7, under bash (i.e. GitBash)

You are using pip version 6.0.6, however version 6.0.8 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting git+https://github.com/blue-yonder/pyscaffold.git
Cloning https://github.com/blue-yonder/pyscaffold.git to c:\users\ifruchte\app
data\local\temp\pip-mllxg7-build
Traceback (most recent call last):
File "", line 20, in
File "c:\users\ifruchte\appdata\local\temp\pip-mllxg7-build\setup.py", line 520, in
setup_package()
File "c:\users\ifruchte\appdata\local\temp\pip-mllxg7-build\setup.py", line 477, in setup_package
metadata, console_scripts = read_setup_cfg()
File "c:\users\ifruchte\appdata\local\temp\pip-mllxg7-build\setup.py", line 166, in read_setup_cfg
config_file = StringIO(read(os.path.join(location, 'setup.cfg')))
TypeError: initial_value must be unicode or None, not str
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

  File "<string>", line 20, in <module>

  File "c:\users\ifruchte\appdata\local\temp\pip-mllxg7-build\setup.py", line 520, in <module>

    setup_package()

  File "c:\users\ifruchte\appdata\local\temp\pip-mllxg7-build\setup.py", line 477, in setup_package

    metadata, console_scripts = read_setup_cfg()

  File "c:\users\ifruchte\appdata\local\temp\pip-mllxg7-build\setup.py", line 166, in read_setup_cfg

    config_file = StringIO(read(os.path.join(__location__, 'setup.cfg')))

TypeError: initial_value must be unicode or None, not str

Add a plugin/template system

Most likely when you really need pyscaffold is, when you need to create many packages. Most likely they will be very similar, eg. a flask app, a Django app, a sk-learn app...
It would be great to be able to use already created (e.g hosted on github) or create custom made plugins/templates.
What could be done:

  • prebuild directory structure
  • prebuild code parts, configurable
  • dependencies
  • prebuild documentation
  • ....

Use version 0.0 instead of unknown

If there is no commit, versioneer will report unknown which let's setuptools go crazy. Also check if versioneer is till in active development or if should be replaced.

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.