Coder Social home page Coder Social logo

pytemplate's Introduction

pytemplate

A template for a python package with setup scripts, testing and continuous integration.

Contents

Installing the Package

The python package can be installed directly from github using

pip install --index-url https://github.com/joesdesk/pytemplate pytemplate

It can also be installed from a local source (presumably after being downloaded). In development mode (using the -e option), editing the source files also changes the installed package in real time. First change directory to the repository root

cd path/to/pytemplate

and run

pip install -e ./

To install the package as a normal package, where changing the source files will not change change the installed package without reinstallation, run

pip install ./

Uninstalling the Package

To perform a clean uninstall of the package, run

pip uninstall pytemplate

Running Tests

Having tests to ensure changes don't create new bugs is essential in software development. To run all the tests in the tests/ folder, change directory to the repository root

cd path/to/pytemplate

and run

pytest

sphinx

Sphinx generates documentation for the package. The source code for the documentation is in the sphinx/ folder. It contains a Makefile which can be used to generate the documentation after changes. To generate the documentation, run

make html

The generated documentation is made in the docs/ folder. This allows a github pages website to be created for the documentation of the project in the project's repository.

Resources

  • Documentation Extensions: Include documentation from docstrings. link.
  • reStructuredText Markup Specification. link.
  • The GitHub Blog. Publish Your Project Documentation with GitHub Pages. 2016. link.

About

  • Author: Jomar Sastrillo
  • Date created: November 19, 2017

References

  • PyPA. Installing Packages. link.
  • PyPA. Packaging Python Projects. link.
  • PEAK. Accessing Package Resources. link
  • setuptools Documentation. Resource Extraction. link

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.