Skip to content

Commit 1a6f168

Browse files
committed
apply cookiecutter-pygitreo 0.0.3 project skeleton
1 parent f667402 commit 1a6f168

61 files changed

Lines changed: 1487 additions & 1107 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coveragerc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# for more info: https://coverage.readthedocs.io/en/coverage-4.4.1/config.html
33
[run]
44
omit =
5+
uszipcode/_version.py
6+
uszipcode/docs/*
7+
uszipcode/tests/*
58
uszipcode/pkg/*
69
uszipcode/db.py
710

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ uszipcode_venv/
33
uszipcode.egg-info/
44
uszipcode-*/
55

6+
playground/
67

78
# Byte-compiled / optimized / DLL files
89
__pycache__/
@@ -70,7 +71,7 @@ instance/
7071
.scrapy
7172

7273
# Sphinx documentation
73-
docs/_build/
74+
docs/build/
7475

7576
# PyBuilder
7677
target/
@@ -91,6 +92,8 @@ celerybeat-schedule
9192
venv/
9293
ENV/
9394

95+
96+
9497
# Spyder project settings
9598
.spyderproject
9699

@@ -146,4 +149,4 @@ $RECYCLE.BIN/
146149
*.msp
147150

148151
# Windows shortcuts
149-
*.lnk
152+
*.lnk
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
About the Author
44
------------------------------------------------------------------------------
5+
56
::
67

78
(\ (\
89
( -.-)o I am a lovely Rabbit!
910
o_(")(")
1011

11-
**Sanhe Hu** is a very active **Python Developer** Since 2010. Research area includes **Machine Learning, Big Data Infrastructure, Block Chain, Business Intelligent, Open Cloud, Distribute System**. Love photography, vocal, outdoor, arts, game, and also the best `Python <https://www.python.org/>`_.
12+
**Sanhe Hu** is a very active **Python Developer** Since 2010. Research area includes **Machine Learning, Big Data Infrastructure, Block Chain, Business Intelligent, AWS, Distributive System**. Love photography, outdoor, arts, game, and also the best `Python <https://www.python.org/>`_.
1213

1314
- My Github: https://github.com/MacHu-GWU
14-
- My HomePage: http://www.sanhehu.org/
15+
- My HomePage: http://www.sanhehu.org/
16+
- My Linkedin: https://www.linkedin.com/in/sanhehu/

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright 2015 - 2016 Sanhe Hu <https://github.com/MacHu-GWU/uszipcode-project>
3+
Copyright 2015 - 2019 Sanhe Hu <https://github.com/MacHu-GWU/uszipcode-project>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 118 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,118 @@
1-
include ${shell pwd}/make/python_env.mk
1+
# -*- coding: utf-8 -*-
2+
#
3+
# This file is generated by cookiecutter-pygitrepo 0.0.2: https://github.com/MacHu-GWU/cookiecutter-pygitrepo/tree/0.0.2
4+
5+
help: ## ** Show this help message
6+
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-40s\033[0m %s\n", $$1, $$2}'
7+
8+
9+
up: ## ** Set Up the Virtual Environment
10+
bash ./bin/py/venv-up.sh
11+
12+
13+
remove: ## ** Remove Virtual Environment
14+
bash ./bin/py/venv-remove.sh
15+
16+
17+
clean: ## Clean temp files
18+
bash ./bin/py/clean.sh
19+
20+
21+
#--- Install ---
22+
pip-uninstall: ## ** Uninstall This Package
23+
bash ./bin/py/pip-uninstall.sh
24+
25+
26+
pip-install: pip-uninstall ## ** Install This Package via setup.py
27+
bash ./bin/py/pip-install.sh
28+
29+
30+
pip-dev-install: pip-uninstall ## ** Install This Package in Editable Mode
31+
bash ./bin/py/pip-dev-install.sh
32+
33+
34+
req-dev: ## Install Development Dependencies
35+
bash ./bin/py/req-dev.sh
36+
37+
38+
req-doc: ## Install Document Dependencies
39+
bash ./bin/py/req-doc.sh
40+
41+
42+
req-test: ## Install Test Dependencies
43+
bash ./bin/py/req-test.sh
44+
45+
46+
#--- Test ---
47+
test: req-test pip-dev-install test-only ## ** Run test
48+
49+
50+
test-only: ## Run test without checking test dependencies
51+
bash ./bin/py/test.sh
52+
53+
54+
cov: req-test pip-dev-install cov-only ## ** Run Code Coverage test
55+
56+
57+
cov-only: ## Run Code Coverage test without checking test dependencies
58+
bash ./bin/py/test-cov.sh
59+
60+
61+
tox: ## Run multi python version test with tox
62+
bash ./bin/py/test-tox.sh
63+
64+
65+
#--- Document ---
66+
build-doc: req-doc pip-dev-install ## ** Build Documents, start over
67+
bash ./bin/py/build-doc.sh
68+
69+
70+
build-doc-only: ## Build Documents, skip check doc dependencies, skip clean existing doc
71+
bash ./bin/py/build-doc-only.sh
72+
73+
74+
view-doc: ## ** Open Html Document
75+
bash ./bin/py/view-doc.sh
76+
77+
78+
deploy-doc-to-version: ## Deploy Html Document to the "x.x.x" version directory on AWS S3
79+
bash ./bin/py/deploy-doc-to-version.sh
80+
81+
82+
deploy-doc-to-latest: ## Deploy Html Document to the "latest" directory on AWS S3
83+
bash ./bin/py/deploy-doc-to-latest.sh
84+
85+
86+
deploy-doc: ## ** Deploy Html Document to both "x.x.x" and "latest" directory on AWS S3
87+
bash ./bin/py/deploy-doc.sh
88+
89+
90+
build-and-deploy-doc: build-doc deploy-doc ## ** Build and deploy Html Document to AWS S3
91+
92+
93+
clean-doc: ## ** Deploy Html Document to AWS S3
94+
bash ./bin/py/clean-doc.sh
95+
96+
97+
#--- Other ---
98+
reformat: req-dev ## ** Pep8 Format Python Source Code
99+
bash ./bin/py/reformat-python-code.sh
100+
101+
102+
publish: req-dev pip-dev-install ## ** Publish This Package to PyPI
103+
bash ./bin/py/publish-to-pypi.sh
104+
105+
106+
notebook: ## ** Run jupyter notebook
107+
bash ./bin/py/run-notebook.sh
108+
109+
110+
info: ## ** Show information about python, pip in this environment
111+
bash ./bin/py/info.sh
112+
113+
114+
req-info: ## Show requirements information
115+
bash ./bin/py/req-info.sh
116+
117+
118+

bin/py/build-doc-only.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
# -*- coding: utf-8 -*-
3+
4+
dir_here="$( cd "$(dirname "$0")" ; pwd -P )"
5+
dir_bin="$(dirname "${dir_here}")"
6+
dir_project_root=$(dirname "${dir_bin}")
7+
8+
source ${dir_bin}/py/python-env.sh
9+
10+
print_colored_line $color_cyan "[DOING] Build doc at ${path_sphinx_index_html} ..."
11+
12+
rm_if_exists "${path_sphinx_doc_source}/${package_name}"
13+
(
14+
source ${bin_activate};
15+
cd ${path_sphinx_doc};
16+
make html;
17+
)

bin/py/build-doc.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
# -*- coding: utf-8 -*-
3+
4+
dir_here="$( cd "$(dirname "$0")" ; pwd -P )"
5+
dir_bin="$(dirname "${dir_here}")"
6+
dir_project_root=$(dirname "${dir_bin}")
7+
8+
source ${dir_bin}/py/python-env.sh
9+
10+
print_colored_line $color_cyan "[DOING] Build doc at ${path_sphinx_index_html} ..."
11+
rm_if_exists "${path_sphinx_doc_build}/html"
12+
rm_if_exists "${path_sphinx_doc_source}/${package_name}"
13+
(
14+
source ${bin_activate};
15+
cd ${path_sphinx_doc};
16+
make html;
17+
)

bin/py/clean-doc.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
# -*- coding: utf-8 -*-
3+
4+
dir_here="$( cd "$(dirname "$0")" ; pwd -P )"
5+
dir_bin="$(dirname "${dir_here}")"
6+
dir_project_root=$(dirname "${dir_bin}")
7+
8+
source ${dir_bin}/py/python-env.sh
9+
10+
print_colored_line $color_cyan "[DOING] remove ${path_sphinx_doc_build} ..."
11+
rm -r ${path_sphinx_doc_build}

bin/py/clean.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
# -*- coding: utf-8 -*-
3+
#
4+
# Clean up all temp dir and files (except virtualenv)
5+
6+
dir_here="$( cd "$(dirname "$0")" ; pwd -P )"
7+
dir_bin="$(dirname "${dir_here}")"
8+
dir_project_root=$(dirname "${dir_bin}")
9+
10+
source ${dir_bin}/py/python-env.sh
11+
12+
print_colored_line $color_cyan "[DOING] remove all temp files ..."
13+
14+
tmp_to_remove_list=(
15+
${path_coverage_annotate_dir}
16+
${path_tox_dir}
17+
${path_build_dir}
18+
${path_dist_dir}
19+
${path_egg_dir}
20+
${path_pytest_cache_dir}
21+
${path_sphinx_doc_build}
22+
${path_lambda_deploy_pkg_file}
23+
)
24+
25+
for tmp_path in "${tmp_to_remove_list[@]}"
26+
do
27+
echo "remove ${tmp_path}"
28+
rm_if_exists ${tmp_path}
29+
done

bin/py/deploy-doc-to-latest.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
# -*- coding: utf-8 -*-
3+
#
4+
# Deploy html doc to s3://<s3-bucket-name>/<dir-prefix>/<package-name>/latest
5+
6+
7+
dir_here="$( cd "$(dirname "$0")" ; pwd -P )"
8+
dir_bin="$(dirname "${dir_here}")"
9+
dir_project_root=$(dirname "${dir_bin}")
10+
11+
source ${dir_bin}/py/python-env.sh
12+
13+
14+
print_colored_line $color_cyan "[DOING] deploy ${path_sphinx_doc_build_html} to ${s3_uri_doc_latest} ..."
15+
deploy_doc_to_s3 ${path_sphinx_doc_build_html} ${s3_uri_doc_latest}

0 commit comments

Comments
 (0)