Skip to content

Commit 9f4fa56

Browse files
author
Saurabh Kumar
committed
Merge branch 'master' into pr/102
* master: (49 commits) Fix typo in README.md (#181) Refactor move run_command in cli Refractor: move 'to_env' to compat.py Refactor parser to fix inconsistencies (#180) chore(pypi): switch to markdown and twine for pypi upload + update supported version Bump version: 0.10.1 → 0.10.2 readme: Add new release stub Fix unicode/str inconsistency in Python 2 (#177) Add argument to choose .env file encoding, defaults to None Fix links in readme Restrict typing dependency to Python < 3.5 Add type hints and expose them to users Updated `.gitignore` with results from https://www.gitignore.io/api/python Added special case for `__file__` in Python 2. Fixes #130 Updated tests to show that this works. Moved `dotenv` package into `src` directory so that tests run against installed version. Added tox to run test suite against multiple versions of Python (with coverage) and run flake8. Updated Travis CI to use tox as well. Updated documentation about running tests. Fix ResourceWarning: unclosed file in setup.py and test_cli.py Clarify the usuages of export Isolate test files (#160) Deleted some temporary files that CLI tests were creating. Add python 3.7 to testsuite + udpate pypi creds ...
2 parents d6921b4 + 436b1be commit 9f4fa56

27 files changed

Lines changed: 1280 additions & 514 deletions

.bumpversion.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[bumpversion]
2-
current_version = 0.8.2
2+
current_version = 0.10.2
33
commit = True
44
tag = True
55

6-
[bumpversion:file:setup.py]
6+
[bumpversion:file:src/dotenv/version.py]
77

.coveragerc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
[run]
2-
source = dotenv/
3-
omit =
4-
tests/*
5-
venv/*
6-
*conftest*
2+
source = dotenv
3+
4+
[paths]
5+
source =
6+
src/dotenv
7+
.tox/*/lib/python*/site-packages/dotenv
8+
.tox/pypy*/site-packages/dotenv
9+
10+
[report]
11+
show_missing = True

.gitignore

Lines changed: 124 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,128 @@
1-
*.egg-info
2-
*.pyc
1+
.DS_Store
2+
.idea
3+
4+
# Created by https://www.gitignore.io/api/python
5+
# Edit at https://www.gitignore.io/?templates=python
6+
7+
### Python ###
8+
# Byte-compiled / optimized / DLL files
9+
__pycache__/
10+
*.py[cod]
11+
*$py.class
12+
13+
# C extensions
14+
*.so
15+
16+
# Distribution / packaging
17+
.Python
318
build/
19+
develop-eggs/
420
dist/
5-
.env
6-
__pycache__
7-
.coverage
8-
.DS_Store
21+
downloads/
22+
eggs/
23+
.eggs/
24+
lib/
25+
lib64/
26+
parts/
27+
sdist/
28+
var/
29+
wheels/
30+
pip-wheel-metadata/
31+
share/python-wheels/
32+
*.egg-info/
33+
.installed.cfg
34+
*.egg
35+
MANIFEST
36+
37+
# PyInstaller
38+
# Usually these files are written by a python script from a template
39+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
40+
*.manifest
41+
*.spec
42+
43+
# Installer logs
44+
pip-log.txt
45+
pip-delete-this-directory.txt
46+
47+
# Unit test / coverage reports
948
htmlcov/
10-
.cache/
11-
.idea
49+
.tox/
50+
.nox/
51+
.coverage
52+
.coverage.*
53+
.cache
54+
nosetests.xml
55+
coverage.xml
56+
*.cover
57+
.hypothesis/
1258
.pytest_cache/
59+
60+
# Translations
61+
*.mo
62+
*.pot
63+
64+
# Django stuff:
65+
*.log
66+
local_settings.py
67+
db.sqlite3
68+
69+
# Flask stuff:
70+
instance/
71+
.webassets-cache
72+
73+
# Scrapy stuff:
74+
.scrapy
75+
76+
# Sphinx documentation
77+
docs/_build/
78+
79+
# PyBuilder
80+
target/
81+
82+
# Jupyter Notebook
83+
.ipynb_checkpoints
84+
85+
# IPython
86+
profile_default/
87+
ipython_config.py
88+
89+
# pyenv
90+
.python-version
91+
92+
# celery beat schedule file
93+
celerybeat-schedule
94+
95+
# SageMath parsed files
96+
*.sage.py
97+
98+
# Environments
99+
.env
100+
.venv
101+
env/
102+
venv/
103+
ENV/
104+
env.bak/
105+
venv.bak/
106+
107+
# Spyder project settings
108+
.spyderproject
109+
.spyproject
110+
111+
# Rope project settings
112+
.ropeproject
113+
114+
# mkdocs documentation
115+
/site
116+
117+
# mypy
118+
.mypy_cache/
119+
.dmypy.json
120+
dmypy.json
121+
122+
# Pyre type checker
123+
.pyre/
124+
125+
### Python Patch ###
126+
.venv/
127+
128+
# End of https://www.gitignore.io/api/python

.travis.yml

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,50 @@
11
language: python
2+
cache: pip
23
sudo: false
3-
python:
4-
- '2.7'
5-
- '3.3'
6-
- '3.4'
7-
- '3.5'
8-
- '3.6'
9-
- pypy
4+
dist: xenial
5+
6+
matrix:
7+
include:
8+
- python: "3.6"
9+
env: TOXENV=lint
10+
- python: "3.6"
11+
env: TOXENV=manifest
12+
13+
- python: "2.7"
14+
env: TOXENV=py27
15+
- python: "3.4"
16+
env: TOXENV=py34
17+
- python: "3.5"
18+
env: TOXENV=py35
19+
- python: "3.6"
20+
env: TOXENV=py36
21+
- python: "3.7"
22+
env: TOXENV=py37
23+
- python: "pypy"
24+
env: TOXENV=pypy
25+
dist: trusty
26+
- python: "pypy3"
27+
env: TOXENV=pypy3
28+
dist: trusty
29+
1030
install:
11-
- pip install python-coveralls
12-
- pip install -q -r requirements.txt
13-
- pip install --editable .
31+
- pip install tox
32+
1433
script:
15-
- flake8 .
16-
- pytest -v --tb=native --cov
34+
- tox
35+
36+
before_install:
37+
- pip install python-coveralls
38+
1739
after_success:
40+
- tox -e coverage-report
1841
- coveralls
42+
1943
deploy:
2044
provider: pypi
2145
user: theskumar
2246
password:
23-
secure: VdULnucEUBZB0qZFKrP0kGdxYOY02QrvJBvVAHDc4CBhvPWcfF5HpEWD1CDNr2wdvg5Wwi5WGgX66Rthkrsw6akPwB+aPA++bFZ0uMHy392Nu4hxusX915R3JGnQ7L53aYrohOsJ7JsrZ7n12I38LJSewfkyQydAxjhJA+3hAtw=
47+
secure: DXUkl4YSC2RCltChik1csvQulnVMQQpD/4i4u+6pEyUfBMYP65zFYSNwLh+jt+URyX+MpN/Er20+TZ/F/fu7xkru6/KBqKLugeXihNbwGhbHUIkjZT/0dNSo03uAz6s5fWgqr8EJk9Ll71GexAsBPx2yqsjc2BMgOjwcNly40Co=
2448
on:
2549
tags: true
2650
repo: theskumar/python-dotenv

MANIFEST.in

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
include LICENSE
2-
include README.rst
1+
include LICENSE *.md *.yml
2+
3+
include tox.ini
4+
recursive-include tests *.py
5+
6+
include .bumpversion.cfg
7+
include .coveragerc
8+
include .editorconfig
9+
include Makefile
310
include requirements.txt
11+
include src/dotenv/py.typed

Makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,22 @@ clean: clean-build clean-pyc
55
clean-build:
66
rm -fr build/
77
rm -fr dist/
8-
rm -fr *.egg-info
8+
rm -fr src/*.egg-info
99

1010
clean-pyc:
1111
find . -name '*.pyc' -exec rm -f {} +
1212
find . -name '*.pyo' -exec rm -f {} +
1313
find . -name '*~' -exec rm -f {} +
1414

15-
release: clean
16-
python setup.py sdist upload
17-
python setup.py bdist_wheel upload
15+
release: sdist
16+
twine check dist/*
17+
twine upload dist/*
18+
19+
release-test: sdist
20+
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
1821

1922
sdist: clean
20-
python setup.py sdist
23+
python setup.py sdist bdist_wheel
2124
ls -l dist
2225

2326
test:

0 commit comments

Comments
 (0)