Skip to content
This repository has been archived by the owner on Feb 23, 2019. It is now read-only.

Atomist project generator and editors for a new Python library package

License

Notifications You must be signed in to change notification settings

atomist-attic/python-library

Repository files navigation

Python library Rugs

Build Status Slack Status

This Rug archive contains a Generator for a Python library project.

Rugs

NewPythonLibraryProject

The NewPythonLibraryProject editor generates a new pure Python library package.

Prerequisites

There are no prerequisites to running this editor.

Parameters

To run this editor, you must supply the following parameters.

Name Required Default Description
project_name Yes A PEP8 valid package name. It must be 21 characters or less to avoid truncating name when the its Slack channel is created.
version No 0.1.0 Semantic version of the project.
description No My new project A brief description of the project.

Running

Run it as follows:

$ cd parent/directory
$ rug generate atomist-rugs:python-library:NewPythonLibraryProject \
    pet-shop-library \
    version=0.2.0 \
    description="A terrific new library"

Note the first parameter, the project_name, is different in that you do not need to supply the name of the parameter, just the value. This is because the project_name parameter is required for all editors that generate a project. This will create a directory named pet-shop-library and populate it with a working Python library.
If you are happy with the change, commit the changes.

$ cd pet-shop-library
$ git init
$ git add .
$ git commit -m 'Initial version generated by Atomist'

See the README in the generated project for further instructions.

AddChangeLog

The AddChangeLog editor adds a somewhat basic CHANGELOG.md file following common conventions.

Prerequisites

There are no prerequisites to running this editor.

Parameters

To run this editor, you should supply the following parameter.

Name Required Default Description
version No 0.1.0 Semantic version of the project.

Running

Run it as follows:

$ cd parent/directory/project-directory
$ rug edit atomist-rugs:python-library:AddChangeLog \
    version=0.2.0

AddPythonGitignore

The AddPythonGitignore editor adds a default .gitignore file suitable for Python projects.

Prerequisites

There are no prerequisites to running this editor.

Parameters

This editor has no parameters.

Running

Run it as follows:

$ cd parent/directory/project-directory
$ rug edit atomist-rugs:python-library:AddPythonGitignore

AddTravisCI

The AddTravisCI editor adds a .travis.yml file to your project with a basic layout for building a Python project. It installs the dependencies and runs your tests as part of the build.

Prerequisites

There are no prerequisites to running this editor.

Parameters

This editor has no parameters.

Running

Run it as follows:

$ cd parent/directory/project-directory
$ rug edit atomist-rugs:python-library:AddTravisCI

Support

General support questions should be discussed in the #support channel on our community Slack team at atomist-community.slack.com.

If you find a problem, please create an issue.

Development

You can build, test, and install the project locally with the Rug CLI.

$ rug test
$ rug install

To create a new release of the project, simply push a tag of the form M.N.P where M, N, and P are integers that form the next appropriate semantic version for release. For example:

$ git tag -a 1.2.3

The Travis CI build (see badge at the top of this page) will automatically create a GitHub release using the tag name for the release and the comment provided on the annotated tag as the contents of the release notes. It will also automatically upload the needed artifacts.


Created by Atomist. Need Help? Join our Slack team.