wolfsoftware.template-package-cli

A simple template for creating CLI based Python pacakges.

https://github.com/developerstoolbox/template-package-cli

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.0%) to scientific vocabulary

Keywords

pypi pypi-package python python-package python-package-template wolfsoftware
Last synced: 4 months ago · JSON representation ·

Repository

A simple template for creating CLI based Python pacakges.

Basic Info
  • Host: GitHub
  • Owner: DevelopersToolbox
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 202 KB
Statistics
  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • Open Issues: 3
  • Releases: 11
Topics
pypi pypi-package python python-package python-package-template wolfsoftware
Created over 1 year ago · Last pushed 4 months ago
Metadata Files
Readme Contributing Funding License Code of conduct Citation Codeowners Security

README.md

DevelopersToolbox logo
Github Build Status License Created
Release Released Commits since release

Overview

This is the package template that we use internally when creating new python cli based tools. It has all of the basic functionality and workflows needed to create, build and publish new package to PyPI.

This package provides a command-line utility for processing and handling various tasks using a set of predefined arguments and configurations. The project aims to serve as a baseline for developing similar command-line applications.

It includes features such as argument parsing, configuration management, and a modular structure to facilitate scalable and maintainable code development.

We also provide 2 other templates which we use.

Features

  • Modular Architecture: Organize your code into modules for better maintainability.
  • Argument Parsing: Easily handle command-line arguments using argparse.
  • Configuration Management: Generate configuration objects from command-line arguments.
  • Custom Exceptions: Implement custom exceptions for specific error handling.

Installation

To install the cli package, clone the repository and navigate to the project directory:

bash git clone https://github.com/DevelopersToolbox/template-package-cli.git cd template-package-cli

It is recommended to use a virtual environment to manage dependencies. You can create and activate a virtual environment using the following commands:

bash python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`

Install the required dependencies:

bash pip install -r requirements.txt

Usage

To run the cli package, execute the main function from the main script:

bash python -m wolfsoftware.template_package_cli.main --required <value>

Command-Line Arguments

The application supports several command-line arguments:

  • -h, --help: Show help message and exit.
  • -d, --debug: Enable debug mode for verbose output.
  • -v, --verbose: Enable verbose output to show scan results as they come in.
  • -V, --version: Show the program's version number and exit.
  • -i, --optional-integer: An optional integer argument (default: 2).
  • -s, --optional-string: An optional string argument (default: "me").
  • -r, --required: A required string argument.

Example usage:

bash python -m wolfsoftware.template_package_cli.main -r "required_value" -i 10 -s "optional_string"

Project Structure

The project is organized as follows:

sh template-package-cli/ ├── wolfsoftware/ │ └── template_package_cli/ │ ├── __init__.py │ ├── cli.py │ ├── config.py │ ├── exceptions.py │ ├── globals.py │ └── main.py ├── README.md ├── setup.py └── requirements.txt

  • wolfsoftware/template_package_cli: Contains the core modules of the application.
    • cli.py: Handles the command-line arguments and main program flow.
    • config.py: Handles configuration creation from command-line arguments.
    • exceptions.py: Handles custom exceptions.
    • globals.py: Defines global constants used across the application.
    • main.py: The main script that orchestrates argument parsing and program execution.
  • requirements.txt: Lists the dependencies required for the project.
  • README.md: The file you are currently reading.


Owner

  • Name: Developers Toolbox
  • Login: DevelopersToolbox
  • Kind: organization
  • Email: github@wolfsoftware.com
  • Location: United Kingdom

A selection of tools to help developers. Created by Wolf Software.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
title: Baseline Package
abstract: A template python command line package.
type: software
version: 0.1.2
date-released: 2024-06-26
repository-code: 'https://github.com/DevelopersToolbox/template-package-cli'
keywords:
  - "Wolf Software"
  - "Software"
license: MIT
authors:
  - family-names: "Wolf"
    orcid: "https://orcid.org/0009-0007-0983-2072"

GitHub Events

Total
  • Delete event: 76
  • Issue comment event: 165
  • Push event: 132
  • Pull request event: 154
  • Pull request review event: 121
  • Create event: 83
Last Year
  • Delete event: 76
  • Issue comment event: 165
  • Push event: 132
  • Pull request event: 154
  • Pull request review event: 121
  • Create event: 83

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 0
  • Total pull requests: 121
  • Average time to close issues: N/A
  • Average time to close pull requests: 2 days
  • Total issue authors: 0
  • Total pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 1.71
  • Merged pull requests: 91
  • Bot issues: 0
  • Bot pull requests: 120
Past Year
  • Issues: 0
  • Pull requests: 87
  • Average time to close issues: N/A
  • Average time to close pull requests: 2 days
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.7
  • Merged pull requests: 64
  • Bot issues: 0
  • Bot pull requests: 87
Top Authors
Issue Authors
  • dependabot[bot] (1)
Pull Request Authors
  • dependabot[bot] (183)
  • TGWolf (2)
Top Labels
Issue Labels
dependabot: auto approve (1) dependabot: auto merge (1) dependabot: dependencies (1) dependabot: ecosystem : github actions (1)
Pull Request Labels
dependabot: dependencies (183) dependabot: auto approve (143) dependabot: auto merge (143) dependabot: ecosystem : github actions (137) dependabot: ecosystem : python (46) dependabot: manual merge (28) resolution: closed (1) state: stale (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 12 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
pypi.org: wolfsoftware.template-package-cli

A template python command line package.

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 12 Last month
Rankings
Dependent packages count: 10.9%
Average: 36.1%
Dependent repos count: 61.3%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/cicd.yml actions
  • ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • actions/setup-python 82c7e631bb3cdc910f68e0081d67478d79c6982d composite
.github/workflows/citation-validation.yml actions
  • ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • citation-file-format/cffconvert-github-action 4cf11baa70a673bfdf9dad0acc7ee33b3f4b6084 composite
  • ruby/setup-ruby cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 composite
.github/workflows/codeql.yml actions
  • Gamesight/slack-workflow-status 68bf00d0dbdbcb206c278399aa1ef6c14f74347a composite
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • github/codeql-action/analyze a57c67b89589d2d13d5ac85a9fc4679c7539f94c composite
  • github/codeql-action/autobuild a57c67b89589d2d13d5ac85a9fc4679c7539f94c composite
  • github/codeql-action/init a57c67b89589d2d13d5ac85a9fc4679c7539f94c composite
.github/workflows/delete-old-workflow-runs.yml actions
  • Gamesight/slack-workflow-status 68bf00d0dbdbcb206c278399aa1ef6c14f74347a composite
  • Mattraks/delete-workflow-runs 39f0bbed25d76b34de5594dceab824811479e5de composite
.github/workflows/dependabot.yml actions
  • dependabot/fetch-metadata 5e5f99653a5b510e8555840e80cbf1514ad4af38 composite
.github/workflows/document-validation.yml actions
  • ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • actions/setup-node 60edb5dd545a775178f52524783378180af0d1f8 composite
  • ruby/setup-ruby cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 composite
.github/workflows/generate-release.yml actions
  • ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
  • Bullrich/generate-release-changelog 6b60f004b4bf12ff271603dc32dbd261965ad2f2 composite
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • actions/setup-python 82c7e631bb3cdc910f68e0081d67478d79c6982d composite
  • softprops/action-gh-release 69320dbe05506a9a39fc8ae11030b214ec2d1f87 composite
.github/workflows/generate-test-release.yml actions
  • ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
  • Bullrich/generate-release-changelog 6b60f004b4bf12ff271603dc32dbd261965ad2f2 composite
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • actions/setup-python 82c7e631bb3cdc910f68e0081d67478d79c6982d composite
  • softprops/action-gh-release 69320dbe05506a9a39fc8ae11030b214ec2d1f87 composite
.github/workflows/greetings.yml actions
  • actions/first-interaction 34f15e814fe48ac9312ccf29db4e74fa767cbab7 composite
.github/workflows/purge-deprecated-workflow-runs.yml actions
  • Gamesight/slack-workflow-status 68bf00d0dbdbcb206c278399aa1ef6c14f74347a composite
  • otto-de/purge-deprecated-workflow-runs 31a4e821d43e9a354cbd65845922c76e4b4b3633 composite
.github/workflows/repository-validation.yml actions
  • ActionsToolbox/get-language-versions-action 446919617fd774095b5dd3ed71c39dd3fd0d8f4f composite
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • actions/setup-go cdcb36043654635271a94b9a6d1392de5bb323a7 composite
  • actions/setup-python 82c7e631bb3cdc910f68e0081d67478d79c6982d composite
.github/workflows/security-hardening.yml actions
  • actions/checkout a5ac7e51b41094c92402da3b24376905380afc29 composite
  • zgosalvez/github-actions-ensure-sha-pinned-actions 40e45e738b3cad2729f599d8afc6ed02184e1dbd composite
.github/workflows/stale.yml actions
  • Gamesight/slack-workflow-status 68bf00d0dbdbcb206c278399aa1ef6c14f74347a composite
  • actions/stale 28ca1036281a5e5922ead5184a1bbf96e5fc984e composite
requirements.txt pypi
  • colorama ==0.4.6
  • setuptools ==69.5.1
setup.py pypi