GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mweb/python_template_project: Python template project that can be used to start a new project including i18n and testing.

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
bin
bin
 
 
doc
doc
 
 
i18n
i18n
 
 
test/testPackages
test/testPackages
 
 
tmppackages
tmppackages
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
setup.py
setup.py
 
 

Repository files navigation

Python Project Template

This is a simple Python project template with setup.py. This template implements i18n and uses nosetests for the automatic testing.

Project Setup

The following changes need to be applied to use this template for your own application.

  • Change content of tmppackage/init.py
  • Change name of package within tmppackage/i18n.py
  • Rename tmppackage drictory to the name of your application package
  • Change TODOs in the bin/tmppackage_bin
  • Rename bin/tmppackage_bin to the binary name of your desire
  • Setup your tests in the test directory
  • Change the values within setup.py
  • Change all the tmppackages entry within the Makefile

Requirements

This package requires the following packages to be usable:

  • nose
  • coverage

Install them with pip install. The easiest way is to use it with virtualenv.

$ mkvirtualenv --no-site-packages tmppackage

$ pip install nose
...

Usage

Run tests

$ make tests

This runs all the tests and creates a cover directory with the html output of the coverage report.

Build packages

$ make source

Build the documentation

$ make documentation

Create i18n File

$ make update-pot

If you would like to add a new translation call the msginit command.

$ cd i18n
$ msginit --locale=de --input tmppackages.pot

After new string where added the transleted po files need to be updated. For this call

$ make i18n/de.po

To test the translation call the make source target since this builds the translations files and then call the application with the environment set to the language to test.

$ make source
$ LANG=de ./bin/tmppackages_bin

About

Python template project that can be used to start a new project including i18n and testing.

Resources

Readme
BSD-3-Clause license
Activity

Stars

0 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.