Skip to main content

A CLI for managing Python projects.

Project description

mpl_pymanage

A command line interface (CLI) for managing Python projects.

PyPI version Build status codecov Doc Status

Create new Python projects with ready-to-go recommended project structure.

Add important files to existing projects like setup.py, .gitignore, Sphinx documentation, choose a license and more.

Run test suites, analyze test coverage and deploy to PyPi.

Even mpl_pymanage is managed using mpl_pymanage... so meta.

Installation

pip install --upgrade mpl_pymanage

Documentation

The full documentation can be found here.

Usage

Creating a new project

mpl_pymanage create -n myproject

creates a complete Python project structure inside the current working directory:

myproject
├── docs
│   ├── Makefile
│   ├── conf.py
│   ├── index.rst
│   ├── make.bat
│   └── requirements.txt
├── myproject
│   ├── __init__.py
│   └── main.py
├── LICENSE
├── README.md
├── setup.py
├── .gitignore
└── tests
    └── test_main.py

including sample source, tests, documentation, setup.py, local git repository and a suitable .gitignore file.

After creation, the project is already installed in development (editable) mode, so you can start coding right away.

Adding stuff to an existing project

Sometimes you have an existing project, but initially you did not choose a license, or your .gitignore is missing. You can add those special files with the mpl_pymanage add command.

Add a project documentation folder

mpl_pymanage add docs

makes a ./docs folder and sets up a Sphinx-based documentation in Read-The-Docs-style:

generated docs

Call mpl_pymanage add --help for more information.

Add a license

mpl_pymanage add license

where you have the choice between standard license texts like MIT, GPLv3, Apache, ...

Add a .gitignore file

mpl_pymanage add gitignore

The created .gitignore contains all usual patterns that should typically be ignored by git in Python projects.

Add a setup.py file

mpl_pymanage add setup.py 

Add github actions

Add a standard github action which automatically runs build and tests on the github CI/CD systems whenever you push a commit:

mpl_pymanage add github-action

Run stuff

Run tests

mpl_pymanage run tests

Analyze test coverage

mpl_pymanage run coverage

Re-Build docs and show it browser

mpl_pymanage run docs

Run PEP8 style analyzer

mpl_pymanage run flake8

Deploy your project

To PyPi

mpl_pymanage deploy pypi

After that anyone in the world can install your package using pip.

As a prerequisite for deployment, you need an account at PyPi.

To Github, Gitlab, etc.

Create an empty repository at the platform of your choice, like github, and deploy your local project repository there, e.g.:

mpl_pymanage deploy repo

After that your local repo is in sync the remote one.

A note for Windows users

Depending on your environment settings, you may have to use mpl_pymanage by prepending python -m or py -m like in

python -m mpl_pymanage create

Contributing

mpl_pymanage is open source and every one is welcome to contribute! Please read the contribution guide if you are interested.

Requirements

mpl_pymanage requires Python 3. All Python dependencies are installed automatically. However, you need to have git installed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mpl_pymanage-0.1.1.tar.gz (42.6 kB view details)

Uploaded Source

Built Distribution

mpl_pymanage-0.1.1-py3-none-any.whl (45.6 kB view details)

Uploaded Python 3

File details

Details for the file mpl_pymanage-0.1.1.tar.gz.

File metadata

  • Download URL: mpl_pymanage-0.1.1.tar.gz
  • Upload date:
  • Size: 42.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.5

File hashes

Hashes for mpl_pymanage-0.1.1.tar.gz
Algorithm Hash digest
SHA256 57b502eafb7004ac981531f3ba233f8369a116651fbb54ded4c01d6af72e6e02
MD5 a166de4ab06ed9d42871d15918f53026
BLAKE2b-256 6d48cd67af847381af4645396a53114b8554f32cea54e5213b58f971f6df59bf

See more details on using hashes here.

File details

Details for the file mpl_pymanage-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mpl_pymanage-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 45.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.5

File hashes

Hashes for mpl_pymanage-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a8c49cad00cae9b12f378fd7f7caeef560743a52aa6bcdb76bb1c257b741135b
MD5 9949671d64b432a0a57c28be0e94b1e3
BLAKE2b-256 47569f76554ba2d66867229c8c562048d18d4bfa70435a40196221b74bc4756e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page