Skip to content

Commit b66bb8d

Browse files
authored
Merge pull request #11 from bitranox/development
v2.0.5
2 parents f92414b + fac4731 commit b66bb8d

21 files changed

+697
-378
lines changed

.docs/README_template.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ lib_registry
22
============
33

44

5-
Version v2.0.4 as of 2020-08-01 see `Changelog`_
5+
Version v2.0.5 as of 2020-08-08 see `Changelog`_
66

77

88
.. include:: ./badges.rst

.docs/installation.rst

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,17 @@
55
66
python -m pip --upgrade pip
77
python -m pip --upgrade setuptools
8-
python -m pip --upgrade wheel
8+
99
1010
.. include:: ./installation_via_pypi.rst
1111

12-
- to install the latest development version from github via pip:
12+
- to install the latest version from github via pip:
1313

1414

1515
.. code-block:: bash
1616
17-
# normal install
1817
python -m pip install --upgrade git+https://github.com/bitranox/lib_registry.git
1918
20-
# to test without installing (can be skipped)
21-
python -m pip install git+https://github.com/bitranox/lib_registry.git --install-option test
22-
23-
# to install and upgrade all dependencies regardless of version number
24-
python -m pip install --upgrade git+https://github.com/bitranox/lib_registry.git --upgrade-strategy eager
25-
2619
2720
- include it into Your requirements.txt:
2821

@@ -39,19 +32,13 @@
3932
python -m pip install --upgrade -r /<path>/requirements.txt
4033
4134
42-
4335
- to install the latest development version from source code:
4436

4537
.. code-block:: bash
4638
4739
# cd ~
4840
$ git clone https://github.com/bitranox/lib_registry.git
4941
$ cd lib_registry
50-
51-
# to test without installing (can be skipped)
52-
python setup.py test
53-
54-
# normal install
5542
python setup.py install
5643
5744

.docs/installation_via_pypi.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,4 @@
22

33
.. code-block:: bash
44
5-
# install latest release from PyPi
65
python -m pip install --upgrade lib_registry
7-
8-
# test latest release from PyPi without installing (can be skipped)
9-
python -m pip install lib_registry --install-option test

.docs/tested_under.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
tested on linux "bionic" with python 3.6, 3.7, 3.8, 3.8-dev, pypy3 - architectures: amd64, ppc64le, s390x, arm64
22

3-
`100% code coverage <https://codecov.io/gh/bitranox/lib_registry>`_, codestyle checking ,mypy static type checking ,tested under `Linux, macOS, Windows <https://travis-ci.org/bitranox/lib_registry>`_, automatic daily builds and monitoring
3+
`100% code coverage <https://codecov.io/gh/bitranox/lib_registry>`_, flake8 style checking ,mypy static type checking ,tested under `Linux, macOS, Windows <https://travis-ci.org/bitranox/lib_registry>`_, automatic daily builds and monitoring

.docs/usage.rst

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,31 @@
1-
.. code-block:: py
1+
python methods:
22

3-
>>> from lib_registry import *
3+
- Registry Object
44

5-
>>> # Read a Value from the Registry
6-
>>> key = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\S-1-5-20'
7-
>>> get_value(key_name=key, value_name='ProfileImagePath')
8-
'%systemroot%\\\\ServiceProfiles\\\\NetworkService'
5+
.. include:: ../lib_registry/lib_registry.py
6+
:code: python
7+
:start-after: # Registry{{{
8+
:end-before: # Registry}}}
99

10-
>>> # Create a Key
11-
>>> create_key(r'HKCU\\Software\\lib_registry_test')
10+
- create_key
1211

13-
>>> # Delete a Key
14-
>>> delete_key(r'HKCU\\Software\\lib_registry_test')
12+
.. include:: ../lib_registry/lib_registry.py
13+
:code: python
14+
:start-after: # create_key{{{
15+
:end-before: # create_key}}}
1516

17+
- delete_key
1618

17-
>>> # Write a Value to the Registry
18-
>>> create_key(r'HKCU\\Software\\lib_registry_test')
19-
>>> set_value(key_name=r'HKCU\\Software\\lib_registry_test', value_name='test_name', value='test_string', value_type=REG_SZ)
20-
>>> result = get_value(key_name=r'HKCU\\Software\\lib_registry_test', value_name='test_name')
21-
>>> assert result == 'test_string'
19+
.. include:: ../lib_registry/lib_registry.py
20+
:code: python
21+
:start-after: # delete_key{{{
22+
:end-before: # delete_key}}}
2223

23-
>>> # Delete a Value from the Registry
24-
>>> delete_value(key_name=r'HKCU\\Software\\lib_registry_test', value_name='test_name')
25-
>>> delete_key(r'HKCU\\Software\\lib_registry_test')
2624

27-
>>> # Check if a key exists
28-
>>> key_exist('HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\S-1-5-20'
29-
True
30-
>>> key_exist('HKEY_LOCAL_MACHINE\\Software\\DoesNotExist')
31-
False
25+
- key_exists
3226

33-
>>> # get the SIDs of all Windows users
34-
>>> get_ls_user_sids()
35-
['.DEFAULT', 'S-1-5-18', 'S-1-5-19', 'S-1-5-20', ...]
27+
.. include:: ../lib_registry/lib_registry.py
28+
:code: python
29+
:start-after: # key_exist{{{
30+
:end-before: # key_exist}}}
3631

37-
>>> # get the Username from SID
38-
>>> get_username_from_sid(sid='S-1-5-20')
39-
'NetworkService'

.travis.yml

Lines changed: 46 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,23 @@ env:
1313
- cPIP="python -m pip"
1414
# switch off wine fix me messages
1515
- WINEDEBUG=fixme-all
16-
# mypy path
16+
17+
# PYTEST
18+
- PYTEST_DO_TESTS="True"
19+
20+
# FLAKE8 tests
21+
- DO_FLAKE8_TESTS="True"
22+
23+
# MYPY tests
24+
- MYPY_DO_TESTS="True"
25+
- MYPY_OPTIONS="--follow-imports=normal --implicit-reexport --no-warn-unused-ignores --strict"
1726
- MYPYPATH="./lib_registry/3rd_party_stubs"
27+
28+
# coverage
29+
- DO_COVERAGE="True"
30+
- DO_COVERAGE_UPLOAD_CODECOV="True"
31+
- DO_COVERAGE_UPLOAD_CODE_CLIMATE="True"
32+
1833
# package name
1934
- PACKAGE_NAME="lib_registry"
2035
# the registered CLI Command
@@ -23,11 +38,13 @@ env:
2338
- RST_INCLUDE_SOURCE="./.docs/README_template.rst"
2439
# the target file for rst_include (rebuild rst file includes)
2540
- RST_INCLUDE_TARGET="./README.rst"
41+
2642
# secure environment variable
2743
- secure: "AP9/YXcfQzCyGCOdgCqO8ryUAanXxQCD3v2oV8r4EYSi0cAZIPfTNayxVyDLkciLjyu5Sh55WbCD9Ky302AOcwLfdGEG30r2f/cckBzQxhtaRrMXWCnmMpiA9t1Xz42T+Zf9kXBeTAB7Tm8AUSAWYjipqk2XfE36a6/mY4htM5fqAWQ7oLn9zZZtL6Ow4LgHG8zhtebOYXrxQLZSnhogF3iFKiNIVurU7C0MJC0iLCJ7lR/u/XtQhcIZPLBMES2DFadQYx6AcNb+t76n11Bi6HuJyoHtyc1NqHiMR64rvohWmwLCFP5PLPD85xQyg0c51KvTqCf4FinEOGHzacRI/5NIOzhGiaDhEwvGPyvmOP0LMipS3T/tnD5woBY3bmbfpfUMzhTslQiCFXwMgpLdzkBj4bzRtf/ceTq8ymv7i6w+MMpirYOAXJ88V3+oEPDZ2jf2KfJqyB9GTIiuyq9Z/ySQLbWa1XtDjY0E8W5Di8Kbvd9bF9oQTIy7+ED5Qwg510TOmu+JJjrk4T63R8QpP4jxbgKZSHSbwEejyNiCn0VLumpenesNz5T06IdFFteliIA7MzG1DESoEEQxztvxSiXz8ly+7Gu8Oi58LbTB1MiEhuX7BjDA0HyzTGeXZ27Hp/V6MIaEnH2daGaAkE5QzKFc8BXPwLrFk8Cmtv+gCmo=" # CC_TEST_REPORTER_ID.secret
2844
- secure: "rOWm+1AesXyzdS4yG3rarQK2xVfyNK1LgnFSQDPHleUQn0/XgsnaTh5LZoZoiqSBjsaRclT/+QTBIJq32VQA3BZAbOV3sRHCXGttg0ws1hwP+YoPM+Ii57PlTCu+hYG4W+dgm3pIKi2zLxozmOsJV1oZlHny4/Zbdp+SFoMd9T2WMcHVCRywQUorDPkW+a4Py+XJT3Z6gWTuP8PzTU91glokkAuLky7B29qkHkwePEwO69yUBXNjfKZEtl0+J0XabNQe7PPIYZNoWiZBAg/N2xW7oCdunGIfyEKhnzIkVmMttXrs9JeGgIz6PPLRf6JLuH+NjeRDigu823NA0aaWD7GVOBUqPgsJRySo4v9eCXXo+z9NB5RqeYw2J+YZFVVrEdV9cZ4+WeP/OXls+zZqAUz44Hf0DYdktsUF45sh6ZawJIi6cRQrGLdRb9yvMUf4zFlz3/AzFHnl9mk3MY/8t/qKohIFnSKNmNYD+XINFQ5+jziXty0wgNRL4BOYj0XKjCKz5UicZr5QrGJEIGqB4F7OosvVQzq1uAvSWuyoQT7lZZEZeNbnsnxobS3RVQl0tg2/mVxppnjQWmZZgqudNA+BA+oZoXfGm5in6JPineqKBzfxW7zZ6ms5NDJ5YQoeJ2rOUPcZiQ5NnjCwMDC82AL7SKzGfmcsl1UWABgSMeg=" # PYPI_PASSWORD.secret
2945

3046

47+
3148
addons:
3249
apt:
3350
packages:
@@ -59,7 +76,7 @@ matrix:
5976
- export DEPLOY_SDIST="False"
6077
- export DEPLOY_WHEEL="False"
6178
- export DEPLOY_TEST="False"
62-
- export MYPY_STRICT="True"
79+
- export MYPY_DO_TESTS="True"
6380

6481

6582
- os: linux
@@ -69,10 +86,10 @@ matrix:
6986
python: "3.6"
7087
before_install:
7188
- export BUILD_DOCS="False"
72-
- export DEPLOY_SDIST="False"
73-
- export DEPLOY_WHEEL="False"
74-
- export DEPLOY_TEST="True"
75-
- export MYPY_STRICT="True"
89+
- export DEPLOY_SDIST="True"
90+
- export DEPLOY_WHEEL="True"
91+
- export BUILD_TEST="True"
92+
- export MYPY_DO_TESTS="True"
7693

7794
- os: linux
7895
arch: "amd64"
@@ -81,10 +98,10 @@ matrix:
8198
python: "3.7"
8299
before_install:
83100
- export BUILD_DOCS="False"
84-
- export DEPLOY_SDIST="False"
101+
- export DEPLOY_SDIST="True"
85102
- export DEPLOY_WHEEL="False"
86-
- export DEPLOY_TEST="True"
87-
- export MYPY_STRICT="True"
103+
- export BUILD_TEST="True"
104+
- export MYPY_DO_TESTS="True"
88105

89106
- os: linux
90107
arch: "amd64"
@@ -95,8 +112,8 @@ matrix:
95112
- export BUILD_DOCS="True"
96113
- export DEPLOY_SDIST="True"
97114
- export DEPLOY_WHEEL="True"
98-
- export DEPLOY_TEST="True"
99-
- export MYPY_STRICT="True"
115+
- export BUILD_TEST="True"
116+
- export MYPY_DO_TESTS="True"
100117

101118
- os: linux
102119
arch: "amd64"
@@ -105,10 +122,10 @@ matrix:
105122
python: "3.8-dev"
106123
before_install:
107124
- export BUILD_DOCS="False"
108-
- export DEPLOY_SDIST="False"
109-
- export DEPLOY_WHEEL="False"
110-
- export DEPLOY_TEST="True"
111-
- export MYPY_STRICT="True"
125+
- export DEPLOY_SDIST="True"
126+
- export DEPLOY_WHEEL="True"
127+
- export BUILD_TEST="True"
128+
- export MYPY_DO_TESTS="True"
112129

113130
- os: linux
114131
arch: "amd64"
@@ -117,10 +134,10 @@ matrix:
117134
python: "pypy3"
118135
before_install:
119136
- export BUILD_DOCS="False"
120-
- export DEPLOY_SDIST="False"
121-
- export DEPLOY_WHEEL="False"
122-
- export DEPLOY_TEST="True"
123-
- export MYPY_STRICT="False"
137+
- export DEPLOY_SDIST="True"
138+
- export DEPLOY_WHEEL="True"
139+
- export BUILD_TEST="True"
140+
- export MYPY_DO_TESTS="False"
124141

125142
- os: linux
126143
arch: "ppc64le"
@@ -129,10 +146,10 @@ matrix:
129146
python: "3.8"
130147
before_install:
131148
- export BUILD_DOCS="False"
132-
- export DEPLOY_SDIST="False"
149+
- export DEPLOY_SDIST="True"
133150
- export DEPLOY_WHEEL="True"
134-
- export DEPLOY_TEST="True"
135-
- export MYPY_STRICT="True"
151+
- export BUILD_TEST="True"
152+
- export MYPY_DO_TESTS="True"
136153

137154
- os: linux
138155
arch: "s390x"
@@ -141,10 +158,10 @@ matrix:
141158
python: "3.8"
142159
before_install:
143160
- export BUILD_DOCS="False"
144-
- export DEPLOY_SDIST="False"
161+
- export DEPLOY_SDIST="True"
145162
- export DEPLOY_WHEEL="True"
146-
- export DEPLOY_TEST="True"
147-
- export MYPY_STRICT="True"
163+
- export BUILD_TEST="True"
164+
- export MYPY_DO_TESTS="True"
148165

149166
- os: linux
150167
arch: "arm64"
@@ -153,10 +170,10 @@ matrix:
153170
python: "3.8"
154171
before_install:
155172
- export BUILD_DOCS="False"
156-
- export DEPLOY_SDIST="False"
173+
- export DEPLOY_SDIST="True"
157174
- export DEPLOY_WHEEL="True"
158-
- export DEPLOY_TEST="True"
159-
- export MYPY_STRICT="True"
175+
- export BUILD_TEST="True"
176+
- export MYPY_DO_TESTS="True"
160177

161178
- os: osx
162179
if: true
@@ -173,7 +190,7 @@ matrix:
173190
- export DEPLOY_SDIST="False"
174191
- export DEPLOY_WHEEL="False"
175192
- export DEPLOY_TEST="True"
176-
- export MYPY_STRICT="True"
193+
- export MYPY_DO_TESTS="True"
177194

178195

179196
install:

CHANGES.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ tasks:
1111
- pathlib-like Interface
1212
- jupyter notebook update
1313

14+
v2.0.5
15+
--------
16+
2020-08-08: service release
17+
- fix documentation
18+
- fix travis
19+
- deprecate pycodestyle
20+
- implement flake8
1421

1522
v2.0.4
1623
---------
@@ -20,7 +27,6 @@ v2.0.3
2027
--------
2128
2020-07-31: fix travis build
2229

23-
2430
v2.0.2
2531
--------
2632
2020-07-29: feature release

0 commit comments

Comments
 (0)