Skip to main content

Python project skeleton and management

Project description

Python package wiptools

Python project skeleton set up and management.

Quick start

Installation

> pip install [--user] wiptools

Create a skeleton for a new project foo

wip init foo, will ask you to supply a brief project description, a minimal Python version and a documentation format. wip init will also ask you a few other items the first time. If you did not choose a documentation format, you can add one later with wip docs --md, e.g.

path/to/workspace > wip init foo

Project info needed:
Enter a short description for the project: [<project_short_description>]: a foo-lish project
Enter the minimal Python version [3.8]: 3.9

[[Expanding cookiecutter template `/Users/etijskens/software/dev/workspace/wiptools/wiptools/cookiecutters/project`...
]] (done Expanding cookiecutter template `/Users/etijskens/software/dev/workspace/wiptools/wiptools/cookiecutters/project`)
Add documentation templates? press
  [enter] for no,
  [m] for markdown format,
  [r] for restructuredText format []: m

[[Expanding cookiecutter template `/Users/etijskens/software/dev/workspace/wiptools/wiptools/cookiecutters/project-doc-md`...
]] (done Expanding cookiecutter template `/Users/etijskens/software/dev/workspace/wiptools/wiptools/cookiecutters/project-doc-md`)

[[Adding documentation for components ...
]] (done Adding documentation for components )

[[Creating a local git repo...

[[Running `git init --initial-branch=main` in directory /Users/etijskens/software/dev/ws-wip/foo...
Initialized empty Git repository in /Users/etijskens/software/dev/ws-wip/foo/.git/
]] (done Running `git init --initial-branch=main` in directory /Users/etijskens/software/dev/ws-wip/foo)

[[Running `git add *` in directory /Users/etijskens/software/dev/ws-wip/foo...
]] (done Running `git add *` in directory /Users/etijskens/software/dev/ws-wip/foo)

[[Running `git add .gitignore` in directory /Users/etijskens/software/dev/ws-wip/foo...
]] (done Running `git add .gitignore` in directory /Users/etijskens/software/dev/ws-wip/foo)

[[Running `git commit -m "Initial commit from wip init foo"` in directory /Users/etijskens/software/dev/ws-wip/foo...
[main (root-commit) fca0133] Initial commit from wip init foo
 11 files changed, 281 insertions(+)
 create mode 100644 .gitignore
...
]] (done Running `git commit -m "Initial commit from wip init foo"` in directory 
/Users/etijskens/software/dev/ws-wip/foo)
]] (done Creating a local git repo)

[[Creating a remote GitHub repo...

[[Running `gh auth login --with-token kwargs={'stdin': <_io.TextIOWrapper name='/Users/etijskens/.wiptools/etijskens.pat' mode='r' encoding='UTF-8'>, 'text': True}` in directory /Users/etijskens/software/dev/ws-wip/foo...
]] (done Running `gh auth login --with-token kwargs={'stdin': <_io.TextIOWrapper name='/Users/etijskens/.wiptools/etijskens.pat' mode='r' encoding='UTF-8'>, 'text': True}` in directory /Users/etijskens/software/dev/ws-wip/foo)

[[Running `gh repo create --source . --public --push` in directory /Users/etijskens/software/dev/ws-wip/foo...
✓ Created repository etijskens/foo on GitHub
✓ Added remote https://github.com/etijskens/foo.git
Enumerating objects: 17, done.
Counting objects: 100% (17/17), done.
Delta compression using up to 8 threads
Compressing objects: 100% (12/12), done.
Writing objects: 100% (17/17), 3.57 KiB | 1.19 MiB/s, done.
Total 17 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/etijskens/foo.git
 * [new branch]      HEAD -> main
branch 'main' set up to track 'origin/main'.
✓ Pushed commits to https://github.com/etijskens/foo.git
]] (done Running `gh repo create --source . --public --push` in directory /Users/etijskens/software/dev/ws-wip/foo)
]] (done Creating a remote GitHub repo)
path/to/workspace/foo

Listing project info

Cd into th project (cd foo) and use wip info:

path/to/foo > wip info
Project    : foo
Version    : 0.0.0
Package    : foo
GitHub repo: "https://github.com/<your github username>/foo"
Home page  : "https://<your github username>.github.io/foo"
Location   : /Users/etijskens/software/dev/ws-wip/foo

Structure of Python package foo
  foo [Python module]
  └── __init__.py

Add components

You can add Python submodules (--py), C++ binary extension modules (--cpp) or Modern Fortran binary extension modules (--f90), as well as CLIs with a single command (--cli) or with subcommands(--clisub):

path/to/foo > wip add foo_py --py
path/to/foo > wip add foo_cpp --cpp
path/to/foo > wip add foo_f90 --f90
path/to/foo > wip add foo_cli --cli
path/to/foo > wip add foo_clisub --clisub
path/to/foo > wip info
Project    : foofoo
Version    : 0.0.0
Package    : foofoo
GitHub repo: https://github.com/<your github username>/foo
Home page  : https://<your github username>.github.io/foo
Location   : /Users/etijskens/software/dev/workspace/wiptools/.test-workspace/foofoo

Structure of Python package foofoo
  foofoo [Python module]
  ├── __init__.py
  ├── foo_cli [CLI]
     └── __main__.py
  ├── foo_clisub [CLI]
     └── __main__.py
  ├── foo_cpp [C++ binary extension module]
     ├── foo_cpp.cpp
     └── foo_cpp.md
  ├── foo_f90 [Modern Fortran binary extension module]
     ├── foo_f90.f90
     └── foo_f90.md
  └── foo_py [Python module]
      └── __init__.py

To build the binary extension modules

Links

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

wiptools-1.3.2.tar.gz (27.3 kB view details)

Uploaded Source

Built Distribution

wiptools-1.3.2-py3-none-any.whl (44.5 kB view details)

Uploaded Python 3

File details

Details for the file wiptools-1.3.2.tar.gz.

File metadata

  • Download URL: wiptools-1.3.2.tar.gz
  • Upload date:
  • Size: 27.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.9.5 Darwin/22.5.0

File hashes

Hashes for wiptools-1.3.2.tar.gz
Algorithm Hash digest
SHA256 5a80bb66064f0e960863ba9b37bbd8d897181cc06a9ae4825fcae39ae3bcb377
MD5 986b8b30cdcfb21c32a0d98cb5c00f15
BLAKE2b-256 7d99facf27022f9c9139e146130bcbfaab844c0580cc5eb2dd0bc471c7f4d1e3

See more details on using hashes here.

File details

Details for the file wiptools-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: wiptools-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 44.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.9.5 Darwin/22.5.0

File hashes

Hashes for wiptools-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d755480cb129f466543b30afad4dcf04513b7e050c17bfc9ff49b42c201a3497
MD5 09dcbf94b33cd801ca0fbfcf0db91f99
BLAKE2b-256 6831a59dc9296faef2fa05b535a707881365befc3ae56e337c1ef2649b358613

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