https://github.com/databio/example_python_cli

A skeleton python package demonstrating how to create a python CLI tool using logmuse.

https://github.com/databio/example_python_cli

Science Score: 13.0%

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

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.8%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

A skeleton python package demonstrating how to create a python CLI tool using logmuse.

Basic Info
  • Host: GitHub
  • Owner: databio
  • License: bsd-2-clause
  • Language: Python
  • Default Branch: master
  • Size: 5.86 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 6 years ago · Last pushed over 6 years ago
Metadata Files
Readme License

README.md

A Skeleton Python CLI

This repository contains a skeleton that shows you how to create a python package that behaves as a command-line tool. If you install this repository with pip, you will then have access to a new shell command called packagename.

Packagename

Install with: pip install --user .

Run with: packagename -i INPUT -p PARAMETER

See: packagename --help for details.

Make it yours

Just copy all the files in this repository into a new repository and then edit them. You can edit these files to replace packagename everywhere with the name of the tool you want to create. Then, just make the function call whatever python code you need it to.

Explanation

The creation of a command-line tool happens in setup.py in the lines that say:

entry_points={ "console_scripts": [ 'packagename = packagename.packagename:main' ], },

Here packagename = ... is the command that will eventually be created; and then packagename.packagename are 1) the name of the folder and then 2) the name of the file that you want the command to run. Finally, :main says to run the main function in that file.

Logmuse

This package sets you up automatically to use the logmuse package, which gives your tool parameters like --verbosity and --logdev, which change the logging. You can use _LOGGER.debug() and _LOGGER.info(), and _LOGGER.warn(), etc, to emit different classes of error messages. It's already configured. You can read the logmuse documentation for more info.

Owner

  • Name: Databio
  • Login: databio
  • Kind: organization
  • Location: University of Virginia

Solving problems in computational biology

GitHub Events

Total
Last Year

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 4
  • Total Committers: 1
  • Avg Commits per committer: 4.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
nsheff n****f 4

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

requirements/requirements-all.txt pypi
  • logmuse *