Intuitive and extensible command line tool for managing software projects
Project description
By © Jorge Royan / http://www.royan.com.ar, CC BY-SA 3.0, Link
Backstage
Intuitive and extensible command line tool for managing software projects
This project is part of the Pyrustic Open Ecosystem.
Installation . Demo . Latest . Documentation
Table of contents
Overview
Backstage is a command-line tool that allows the developer to define, coordinate and use the various resources at his disposal to create and manage a software project.
Concretely, the developer specifies in a backstage.tasks
file placed at the root of his project, the tasks necessary for the creation and management of the project. A task is represented by a name and a sequence of commands. From the command line, the developer can launch the execution of a task with or without arguments which are automatically passed to the first command of the task.
Here is a fictional example of the contents of backstage.tasks
:
[init]
templating --arg "default-python-desktop-project"
[build]
python -m test "test_*"
packager --dist "project.whl" --out "build_report.pdf"
notifyme --to "my.email@invalid.earth" -f "build_report.pdf"
[commit]
git commit
[release]
uploader --dist "project.whl" --to "github-release"
uploader --dist "project.whl" --to "pypi"
And this is how the build
task can be launched:
> cd /path/to/project
> backstage build
building...
To get the list of available tasks:
> cd /path/to/project
> backstage
Project Backstage 0.0.5
https://pyrustic.github.io
This software is part of the Pyrustic Open Ecosystem.
Available Tasks
===============
init run build release version test gitinit gitcommit gitpush
Backstage exposes an API (the same used by the CLI) with which you can interact programmatically in Python:
import backstage
project_dir = "/path/to/project"
# get the tasks defined in 'backstage.tasks'
tasks = backstage.get_tasks(project_dir)
# commands for the 'build' task
commands = tasks["build"]
# run the commands
backstage.run(*commands, project_dir=project_dir)
Check the modules documentation.
Subrun
Under the hood, Backstage uses extensively the Python library Subrun.
Subrun is an elegant API to safely start and communicate with processes in Python.
Discover Subrun !
Default Behavior
When a backstage.tasks
file is missing in the root of your project, Backstage rely on a global backstage.tasks
file located at $HOME/PyrusticHome/backstage
and created upon the first usage of Backstage. This backstage.tasks
file is made to create and manage Python projects.
This is the contents of the global backstage.tasks
file:
[init]
python -m backstage.script.init
[run]
python -m backstage.script.run
[build]
python -m backstage.script.build
[release]
python -m backstage.script.release
[version]
python -m backstage.script.version
[test]
python -m unittest discover -f -s tests -t .
[gitinit]
python -m backstage.script.gitinit
[gitcommit]
python -m backstage.script.gitcommit
[gitpush]
python -m backstage.script.gitpush
Basically, the default behavior of Backstage allows the developer to create a packageable Python project with the init
command, create distribution package with the build
command that has an integrated automatic versioning system, publish the distribution package to PyPI, run some basic Git commands, et cetera.
Play with the Demo !
Installation
Backstage is cross platform and versions under 1.0.0 will be considered Beta at best. It is built on Ubuntu with Python 3.8 and should work on Python 3.5 or newer.
For the first time
$ pip install backstage
Upgrade
$ pip install backstage --upgrade --upgrade-strategy eager
Make your project packageable
Backstage is an extensible command line tool for managing software projects. By default, it supports Python, so you can run the init
command to make your Python project packageable:
$ cd /path/to/project
$ backstage init
Project successfully initialized !
You can also create a distribution package of your project with the build
command, then publish it to PyPI with the release
command, et cetera.
Discover Backstage !
Demo
A demo is available to play with as a Github Gist. Feel free to give a feedback in the comments section.
Play with the Demo.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for backstage-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e371f19b2fcdd7fff846ac8354ed131baa43555e573823073945dc84bf18df4 |
|
MD5 | cb6569571afe7c42228690307d4f5dbd |
|
BLAKE2b-256 | 38d8b8f3dc59eaf2af3679a0440202af73e23c5f3c65b1cf6014d87efc12826a |