Commit e151da2
committed
2.1.0 Added human_name, refactored setuppy + more
**New features:**
- Added new function `human_name` to `helpers.common` which humanises a function/class name
- Converted `setuppy.py` into a python module folder at `setuppy/`
- Added new distutils extras:
- `extras/setuppy.txt` to cover all setuppy optional requirements
- `extras/docs.txt` contains requirements for building the Sphinx documentation
- `extras/dev.txt` is a meta-extra which includes all extra requirements for development via `full`, `docs` and `tests`
- Created `privex.helpers.setuppy.bump`
- Most notably, this module contains a function `bump_version` which uses the package `semver` to bump a version number.
The version number is extracted from a python package file configured in `settings.VERSION_FILE` and after it's updated,
the file containing the version is automatically updated with the new version number.
- Created `privex.helpers.setuppy.commands` which contains setup.py / distutils command classes
- `BumpCommand` is a command class which allows you to bump the version of a python package, including updating the file containing the version,
simply by running a command such as `./setup.py bump --minor`
- `ExtrasCommand` is a command class which helps with managing your package's `extra_require` by offering these features:
- With no arguments, `./setup.py extras` would output a list of all requirements listed for each extra in your `extras_require`
- With the `--save=somefile.txt` argument, the requirements can be outputted into a file
- With the `--install` argument, the requirements will be installed with `pip` using the python version which is running setup.py
- With the `--extra=myextra` argument, only requirements for that individual extra will be listed/saved/installed
- Added unit tests for `human_name` in `tests/test_general.py`
- Created `tests/test_net.py` for network related unit tests
**General changes / improvements:**
- Added `__all__` to some modules, to reduce un-necessary objects being imported when you do wildcard imports such as `from privex.helpers import *`
- Moved `EXTRAS_FOLDER` into helpers.settings for consistency and easier changing
- Moved the various requirements.txt / extras related functions from `setuppy.py` into `helpers.setuppy.common`
- Moved network related tests from `test_general.py` into the new `test_net.py`
- The `setup.py` used for privex-helpers itself now has the commands `bump` and `extras` available, which uses the
new command classes from `privex.helpers.setuppy.commands`
- The file `privex/helpers/__init__.py` now imports `privex.loghelper` inside of a try/except block, so if for some strange reason
`privex-loghelper` isn't installed or is broken, then it will fallback to standard `logging.getLogger` instead of just breaking
- Fixed various issues with PyDoc blocks in several files, such as `cache.KeyManager` and `crypto.RedisCache`
- Travis-CI now uses `pip install -U '.[dev]'` instead of installing the requirements file `docs/requirements.txt` and package
- ReadTheDocs now uses `pip install -U '.[dev]'` instead of installing the requirements file `docs/requirements.txt`
- Possibly other small fixes / changes
**Documentation related:**
- Listed some of the new `setuppy` functionality in the overview in README.md
- Updated the `docs/requirements.txt` file to include all important requirements
- Updated the `module.rst` autosummary template to include attributes (if possible)
- Updated the `class.rst` autosummary template so inherited attributes / methods are ignored (generated unit test class docs were often really spammy)
- Added detailed documentation for the `privex.helpers.setuppy` module
- Added an autosummary block for `privex.helpers.settings` so that it can correctly show the settings in the navigation
- Fixed up several module/class rst files with `:noindex:` and other minor fixes to reduce the amount of warnings when building the docs
- Re-organised the navigation tree for some modules to make it easier to use
**Melded commits from develop branch**
- fix __all__ on dynamically loaded functions
- forgot to include extras/tests.txt in dev.txt1 parent 598584a commit e151da2
92 files changed
Lines changed: 1700 additions & 207 deletions
File tree
- docs
- source
- _templates/autosummary
- helpers
- cache
- crypto
- settings
- setuppy
- bump
- commands
- bumpcommand
- extrascommand
- common
- tests
- test_net
- testnet
- extras
- privex/helpers
- cache
- crypto
- setuppy
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
| |||
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
19 | | - | |
20 | | - | |
| 17 | + | |
21 | 18 | | |
22 | 19 | | |
23 | 20 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
| |||
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
177 | 189 | | |
178 | 190 | | |
179 | 191 | | |
| |||
357 | 369 | | |
358 | 370 | | |
359 | 371 | | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
369 | 394 | | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
370 | 398 | | |
371 | 399 | | |
372 | 400 | | |
| |||
391 | 419 | | |
392 | 420 | | |
393 | 421 | | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
394 | 451 | | |
395 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
396 | 461 | | |
397 | 462 | | |
398 | 463 | | |
| |||
401 | 466 | | |
402 | 467 | | |
403 | 468 | | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
404 | 472 | | |
405 | 473 | | |
406 | 474 | | |
407 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
408 | 479 | | |
409 | 480 | | |
410 | 481 | | |
| |||
468 | 539 | | |
469 | 540 | | |
470 | 541 | | |
471 | | - | |
| 542 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
5 | 17 | | |
6 | 18 | | |
7 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
180 | 184 | | |
181 | 185 | | |
182 | 186 | | |
| 187 | + | |
183 | 188 | | |
184 | 189 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
0 commit comments