Skip to content

Commit bbcf186

Browse files
committed
Small cleanups and housekeeping
- Add a proper .gitignore - Increment version in setup.py - Rename release script to increment - Fix imports flake8 in tests
1 parent da5c80a commit bbcf186

File tree

4 files changed

+142
-6
lines changed

4 files changed

+142
-6
lines changed

.gitignore

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
.vscode/
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+
*.py,cover
53+
.hypothesis/
54+
.pytest_cache/
55+
56+
# Translations
57+
*.mo
58+
*.pot
59+
60+
# Django stuff:
61+
*.log
62+
local_settings.py
63+
db.sqlite3
64+
db.sqlite3-journal
65+
66+
# Flask stuff:
67+
instance/
68+
.webassets-cache
69+
70+
# Scrapy stuff:
71+
.scrapy
72+
73+
# Sphinx documentation
74+
docs/_build/
75+
76+
# PyBuilder
77+
target/
78+
79+
# Jupyter Notebook
80+
.ipynb_checkpoints
81+
82+
# IPython
83+
profile_default/
84+
ipython_config.py
85+
86+
# pyenv
87+
.python-version
88+
89+
# pipenv
90+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
91+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
92+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
93+
# install all needed dependencies.
94+
#Pipfile.lock
95+
96+
# pyflow
97+
__pypackages__/
98+
99+
# Celery stuff
100+
celerybeat-schedule
101+
celerybeat.pid
102+
103+
# SageMath parsed files
104+
*.sage.py
105+
106+
# Environments
107+
.env
108+
.venv
109+
env/
110+
venv/
111+
ENV/
112+
env.bak/
113+
venv.bak/
114+
115+
# Spyder project settings
116+
.spyderproject
117+
.spyproject
118+
119+
# Rope project settings
120+
.ropeproject
121+
122+
# mkdocs documentation
123+
/site
124+
125+
# mypy
126+
.mypy_cache/
127+
.dmypy.json
128+
dmypy.json
129+
130+
# Pyre type checker
131+
.pyre/

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test: install
55
run: install
66
python tests/integration.py
77
release: install clean
8-
release
8+
~/Projects/increment
99
python setup.py sdist bdist_wheel
1010
python -m twine upload dist/*
1111
$(MAKE) clean

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
setup(
1212
name='Flask-Minify',
13-
version='0.12',
13+
version='0.13',
1414
url='https://github.com/mrf345/flask_minify/',
15-
download_url='https://github.com/mrf345/flask_minify/archive/0.12.tar.gz',
15+
download_url='https://github.com/mrf345/flask_minify/archive/0.13.tar.gz',
1616
license='MIT',
1717
author='Mohamed Feddad',
1818
author_email='[email protected]',

tests/integration.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
import sys
1+
from sys import path as sys_path
22
from os import path
3+
from sys import path as sys_path
4+
from importlib import import_module
35
from pytest import fixture
46
from flask import Flask
7+
58
from constants import (
69
HTML, JS, LESS, MINIFED_HTML, MINIFIED_JS,
710
MINIFED_LESS, FALSE_LESS, MINIFED_STRIPED)
811

9-
sys.path.append(path.dirname(path.dirname(__file__)))
10-
from flask_minify import minify
12+
13+
sys_path.append(path.dirname(path.dirname(__file__)))
14+
minify = import_module('flask_minify').minify
15+
1116

1217
app = Flask(__name__)
1318
store_minify = minify(app=app, fail_safe=False)

0 commit comments

Comments
 (0)