Skip to content

Commit 88d391a

Browse files
committed
Merge branch 'release/0.1.0'
2 parents 28d1887 + 726a340 commit 88d391a

37 files changed

+3647
-0
lines changed

.gitignore

Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Python template
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
*.py[cod]
6+
*$py.class
7+
8+
# C extensions
9+
*.so
10+
11+
# Distribution / packaging
12+
.Python
13+
build/
14+
develop-eggs/
15+
dist/
16+
downloads/
17+
eggs/
18+
.eggs/
19+
lib/
20+
lib64/
21+
parts/
22+
sdist/
23+
var/
24+
wheels/
25+
pip-wheel-metadata/
26+
share/python-wheels/
27+
*.egg-info/
28+
.installed.cfg
29+
*.egg
30+
MANIFEST
31+
32+
# PyInstaller
33+
# Usually these files are written by a python script from a template
34+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
35+
*.manifest
36+
*.spec
37+
38+
# Installer logs
39+
pip-log.txt
40+
pip-delete-this-directory.txt
41+
42+
# Unit test / coverage reports
43+
htmlcov/
44+
.tox/
45+
.nox/
46+
.coverage
47+
.coverage.*
48+
.cache
49+
nosetests.xml
50+
coverage.xml
51+
*.cover
52+
.hypothesis/
53+
.pytest_cache/
54+
55+
# Translations
56+
*.mo
57+
*.pot
58+
59+
# Django stuff:
60+
*.log
61+
local_settings.py
62+
db.sqlite3
63+
db.sqlite3-journal
64+
65+
# Flask stuff:
66+
instance/
67+
.webassets-cache
68+
69+
# Scrapy stuff:
70+
.scrapy
71+
72+
# Sphinx documentation
73+
docs/_build/
74+
75+
# PyBuilder
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints/
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
.python-version
87+
88+
# pipenv
89+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
90+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
91+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
92+
# install all needed dependencies.
93+
#Pipfile.lock
94+
95+
# celery beat schedule file
96+
celerybeat-schedule
97+
98+
# SageMath parsed files
99+
*.sage.py
100+
101+
# Environments
102+
.env
103+
.venv
104+
env/
105+
venv/
106+
ENV/
107+
env.bak/
108+
venv.bak/
109+
110+
# Spyder project settings
111+
.spyderproject
112+
.spyproject
113+
114+
# Rope project settings
115+
.ropeproject
116+
117+
# mkdocs documentation
118+
/site
119+
120+
# mypy
121+
.mypy_cache/
122+
.dmypy.json
123+
dmypy.json
124+
125+
# Pyre type checker
126+
.pyre/
127+
128+
### JetBrains template
129+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
130+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
131+
132+
# User-specific stuff
133+
.idea/**/workspace.xml
134+
.idea/**/tasks.xml
135+
.idea/**/usage.statistics.xml
136+
.idea/**/dictionaries
137+
.idea/**/shelf
138+
139+
# Generated files
140+
.idea/**/contentModel.xml
141+
142+
# Sensitive or high-churn files
143+
.idea/**/dataSources/
144+
.idea/**/dataSources.ids
145+
.idea/**/dataSources.local.xml
146+
.idea/**/sqlDataSources.xml
147+
.idea/**/dynamic.xml
148+
.idea/**/uiDesigner.xml
149+
.idea/**/dbnavigator.xml
150+
151+
# Gradle
152+
.idea/**/gradle.xml
153+
.idea/**/libraries
154+
155+
# Gradle and Maven with auto-import
156+
# When using Gradle or Maven with auto-import, you should exclude module files,
157+
# since they will be recreated, and may cause churn. Uncomment if using
158+
# auto-import.
159+
# .idea/modules.xml
160+
# .idea/*.iml
161+
# .idea/modules
162+
# *.iml
163+
# *.ipr
164+
165+
# CMake
166+
cmake-build-*/
167+
168+
# Mongo Explorer plugin
169+
.idea/**/mongoSettings.xml
170+
171+
# File-based project format
172+
*.iws
173+
174+
# IntelliJ
175+
out/
176+
177+
# mpeltonen/sbt-idea plugin
178+
.idea_modules/
179+
180+
# JIRA plugin
181+
atlassian-ide-plugin.xml
182+
183+
# Cursive Clojure plugin
184+
.idea/replstate.xml
185+
186+
# Crashlytics plugin (for Android Studio and IntelliJ)
187+
com_crashlytics_export_strings.xml
188+
crashlytics.properties
189+
crashlytics-build.properties
190+
fabric.properties
191+
192+
# Editor-based Rest Client
193+
.idea/httpRequests
194+
195+
# Android studio 3.1+ serialized cache file
196+
.idea/caches/build_file_checksums.ser
197+
198+
### macOS template
199+
# General
200+
.DS_Store
201+
.AppleDouble
202+
.LSOverride
203+
204+
# Icon must end with two \r
205+
Icon
206+
207+
# Thumbnails
208+
._*
209+
210+
# Files that might appear in the root of a volume
211+
.DocumentRevisions-V100
212+
.fseventsd
213+
.Spotlight-V100
214+
.TemporaryItems
215+
.Trashes
216+
.VolumeIcon.icns
217+
.com.apple.timemachine.donotpresent
218+
219+
# Directories potentially created on remote AFP share
220+
.AppleDB
221+
.AppleDesktop
222+
Network Trash Folder
223+
Temporary Items
224+
.apdisk
225+
226+
### JupyterNotebooks template
227+
# gitignore template for Jupyter Notebooks
228+
# website: http://jupyter.org/
229+
230+
.ipynb_checkpoints
231+
*/.ipynb_checkpoints/*
232+
233+
# Remove previous ipynb_checkpoints
234+
# git rm -r .ipynb_checkpoints/
235+
#
236+

Makefile

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Copyright 2019 Felix Soubelet <[email protected]>
2+
# MIT License
3+
4+
# Documentation for most of what you will see here can be found at the following links:
5+
# for the GNU make special targets: https://www.gnu.org/software/make/manual/html_node/Special-Targets.html
6+
# for python packaging: https://docs.python.org/3/distutils/introduction.html
7+
8+
# ANSI escape sequences for bold, cyan, dark blue, end, pink and red.
9+
B = \033[1m
10+
C = \033[96m
11+
D = \033[34m
12+
E = \033[0m
13+
P = \033[95m
14+
R = \033[31m
15+
16+
.PHONY : help archive black checklist clean condaenv install isort lines pipreq uninstall tests
17+
18+
all: install
19+
20+
help:
21+
@echo "Please use 'make $(R)<target>$(E)' where $(R)<target>$(E) is one of:"
22+
@echo " $(R) archive $(E) to create a tarball of this specific release."
23+
@echo " $(R) black $(E) to recursively apply PEP8 formatting through the 'Black' cli tool."
24+
@echo " $(R) checklist $(E) to print a pre-release check-list."
25+
@echo " $(R) clean $(E) to recursively remove build, run, and bitecode files/dirs."
26+
@echo " $(R) condaenv $(E) to 'conda install' the specific 'PHD' environment I use. Personnal."
27+
@echo " $(R) install $(E) to 'pip install' this package into your activated environment."
28+
@echo " $(R) isort $(E) to recursively sort import statements. Called by 'make black'."
29+
@echo " $(R) lines $(E) to count lines of code with the 'tokei' tool."
30+
@echo " $(R) pipreq $(E) to 'pip install' packages listed in 'requirements.txt' into your activated environment."
31+
@echo " $(R) uninstall $(E) to uninstall the 'pyhdtoolkit' package from your activated environment."
32+
@echo " $(R) tests $(E) to run tests with the the pytest package."
33+
34+
archive:
35+
@echo "$(B)Creating tarball archive of this release.$(E)"
36+
@echo ""
37+
@python setup.py sdist
38+
@echo ""
39+
@echo "$(B)Your archive is in the $(C)dist/$(E) $(B)directory. Link it to your release.$(E)"
40+
@echo "To install from this archive, unpack it and run '$(D)python setup.py install$(E)' from within its directory."
41+
@echo ""
42+
43+
black: isort
44+
@echo "Linting code to PEP8, default line length is 120."
45+
@black -l 120 .
46+
47+
checklist:
48+
@echo "Here is a small pre-release check-list:"
49+
@echo " - Check you are on a tagged $(P)feature/release$(E) branch (see Gitflow workflow)."
50+
@echo " - Check you have updated the version number of $(C)__version__.py$(E) according to semantic versioning."
51+
@echo " - Check the $(P)feature/release$(E) branch tag matches this release's package version."
52+
@echo " - After merging and pushing this release from $(P)master$(E) to $(P)origin/master$(E):"
53+
@echo " - Run 'make $(R)archive$(E)'."
54+
@echo " - Create a Github release and attach the created tarball to it."
55+
@echo " - Run 'make $(R)clean$(E)'."
56+
57+
clean:
58+
@echo "Running setup clean."
59+
@python setup.py clean
60+
@echo "Cleaning up distutils remains."
61+
@rm -rf build
62+
@rm -rf dist
63+
@rm -rf pyhdtoolkit.egg-info
64+
@echo "Cleaning up bitecode files and python cache."
65+
@find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
66+
@echo "Cleaning up pytest cache."
67+
@find . -type f -name '*.pytest_cache' -delete -o -type d -name '*.pytest_cache' -delete
68+
69+
condaenv:
70+
@echo "Creating $(D)PHD$(E) conda environment according to '$(C)environment.yml$(E)' file."
71+
@conda env create -f environment.yml
72+
@echo "Adding $(D)PHD$(E) environment to base ipython kernel."
73+
@source activate PHD
74+
@ipython kernel install --user --name=PHD
75+
@conda deactivate
76+
77+
install: black clean
78+
@echo "Installing this package to your active environment."
79+
@pip install .
80+
81+
isort:
82+
@echo "Sorting import statements."
83+
@isort -rc -q .
84+
85+
lines: black
86+
@tokei .
87+
88+
pipreq:
89+
@echo "Installing packages from $(C)requirements.txt$(E) throough pip in your active environment."
90+
@pip install -r requirements.txt
91+
92+
uninstall:
93+
@echo "Uninstalling this package from your active environment."
94+
@pip uninstall pyhdtoolkit
95+
96+
tests: black clean
97+
@source activate PHD
98+
@pytest tests
99+
100+
# Catch-all unknow targets without returning an error. This is a POSIX-compliant syntax.
101+
.DEFAULT:
102+
@echo "Make caught an invalid target! See help output below for available targets."
103+
@make help

0 commit comments

Comments
 (0)