cookiecutter python template (pkgs, modules and tests)
git clone https://github.com/chhsiao1981/cc-python-template.git .cc && ./.cc/scripts/init_dev.sh && source .venv/bin/activate
- create module: ./scripts/dev_module.sh
This template intends to facilitate the efficient development of Python projects with cookiecutter. All are welcome to improve this template.
As specified in gen.py,
currently the following variables are defined (using a.b.c.d
in the project directory awesome-project
as an example):
pkg
: (ex:awesome_project.a.b.c
)module
: (ex:d
)pkg_name
: (ex:awesome_project.a.b.c
)project_name
: (ex:awesome_project
)project_name_with_dash
: (ex:awesome-project
)include_pkg
: (ex:awesome_project.a.b.c
)package_dir
: (ex:awesome_project/a/b/c
)include_package_dir
: (ex:awesome_project/a/b/c
)test_package_dir
: (ex:test_a/test_b/test_c
)
UPPERCASE:
PKG
: UPPERCASE ofpkg
(ex:AWESOME_PROJECT.A.B.C
)MODULE
: UPPERCASE ofmodule
(ex:D
)PROJECT
UpperCamelCase ofproject_name
(ex:AwesomeProject
)PKG_NAME
: UPPERCASE ofpkg_name
(ex:AWESOME_PROJECT.A.B.C
)PROJECT_NAME
UpperCamelCase ofproject_name
(ex:AwesomeProject
)INCLUDE_PKG
: UPPERCASE ofinclude_pkg
(ex:AWESOME_PROJECT.A.B.C
)PACKAGE_DIR
: UPPERCASE ofpackage_dir
(ex:AWESOME_PROJECT/A/B/C
)include_package_dir
: UPPERCASE ofinclude_package_dir
(ex:AWESOME_PROJECT/A/B/C
)test_package_dir
: UPPERCASE oftest_package_dir
(ex:TEST_A/TEST_B/TEST_C
)
UpperCamelCase:
Pkg
: UpperCamelCase ofpkg
(ex:AwesomeProject.A.B.C
)Module
: UpperCamelCase ofmodule
(ex:D
)Project
UpperCamelCase ofproject_name
(ex:AwesomeProject
)PkgName
: UpperCamelCase ofpkg_name
(ex:AwesomeProject.A.B.C
)ProjectName
UpperCamelCase ofproject_name
(ex:AwesomeProject
)IncludePkg
: UpperCamelCase ofinclude_pkg
(ex:AwesomeProject.A.B.C
)PackageDir
: UpperCamelCase ofpackage_dir
(ex:AwesomeProject/A/B/C
)IncludePackageDir
: UpperCamelCase ofinclude_package_dir
(ex:AwesomeProject/A/B/C
)TestPackageDir
: UpperCamelCase oftest_package_dir
(ex:TestA/TestB/TestC
)
camelCase:
pkgCamel
: camelCase ofpkg
(ex:awesomeProject.A.B.C
)moduleCamel
: camelCase ofmodule
(ex:D
)projectCamel
camelCase ofproject_name
(ex:awesomeProject
)pkgName
: camelCase ofpkg_name
(ex:awesomeProject.A.B.C
)projectName
camelCase ofproject_name
(ex:awesomeProject
)includePkg
: camelCase ofinclude_pkg
(ex:awesomeProject.A.B.C
)packageDir
: camelCase ofpackage_dir
(ex:awesomeProject/A/B/C
)includePackageDir
: camelCase ofinclude_package_dir
(ex:awesomeProject/A/B/C
)testPackageDir
: camelCase oftest_package_dir
(ex:testA/testB/testC
)