Commit Graph

30 Commits

Author SHA1 Message Date
Stephen Finucane 2d4025b002 Remove unnecessary 'coding' lines
Everything is unicode in Python 3. No need for these anymore.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I722095c41c8e014b38bfbb16aaecae0023fcf3a8
2021-11-04 10:45:02 +00:00
Thomas Goirand aa426abafe Restore reproducibility in docs
The documentation is writting the date in its copyright. This is
considered bad practice, because this kills reproducibility. If
you don't know about reproducible build, please read on:

https: //reproducible-builds.org/
Change-Id: I6427c83af06ac58da32898f00d3f99dc6ba1ae93
2021-09-07 10:54:30 +02:00
liyou01 4c26e72d61 remove unicode from code
Change-Id: I65d63c955dec439fc599754624d3dc9b96f3f6c3
2021-05-18 11:26:49 +08:00
Hervé Beraud be7bc9ecf9 Adding pre-commit
Introduced changes:
- pre-commit config and rules
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks.
- Applying fixes for pre-commit compliance in all code.

Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.

pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker (check-byte-order-marker);
- Checks that non-binary executables have a proper
  shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings (check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
  calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)

For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks

Change-Id: I382aa79f7357a86af11783f59e0f1680d5bed8d0
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-22 10:37:04 +02:00
Andreas Jaeger d5bc18e320 Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I6974f7131d7ac43b427f8ac6381aff80b9dcb884
2020-05-26 08:56:49 +02:00
Akihiro Motoki 9d3fbc726f rearrange existing documentation to fit the new standard layout
Change-Id: Iac95a337ac0a3ae8da1dd7c0a575c4d7b68fe632
2017-07-01 19:00:17 +09:00
Akihiro Motoki b77c77f03e switch from oslosphinx to openstackdocstheme
Change-Id: I0dd253f90dfa2c4e5afd8d5fae3657a64788f1cf
2017-07-01 18:59:13 +09:00
howardlee 6ed4cacbe7 Typo fix for module debtcollector
Trivial fix

Change-Id: I8d0e33710af8de089823eceb8ca5cf2511f15511
2016-11-07 15:27:58 +08:00
Graham Hayes 35601ed1b4 Add updated_kwarg_default_value decorator
Change-Id: I472aee4ee945b16bed48e86136a2e861fd50bb9f
2016-01-07 14:36:52 +00:00
Joshua Harlow fc0304e2a6 Add 'removed_class' class decorator
To augment the problems with @remove on classes, see
bug #1520397 and bug #1500851 introduce a class decorator
that is specifically made for removing existing
classes (and it appears to work correctly even
under inheritance).

Related-Bug: #1520397

Related-Bug: #1500851

Change-Id: I91adbdacc9fc77511d3f0bfb66d558269c49f885
2015-12-30 21:30:30 -08:00
Jenkins ee5c71197a Merge "Add ability to disable warnings being emitted" 2015-10-17 03:14:54 +00:00
Jenkins 09c7829f4d Merge "Add a 'removed_property' descriptor class" 2015-10-17 03:07:36 +00:00
Joshua Harlow 5fc9662d6c Add ability to disable warnings being emitted
Provide a helpful fixture that can be used
to disable warnings being output, for testing, or other
purporses.

Closes-Bug: #1503918

Change-Id: I2e1fd6f427ff6ee6d0b11b86ac2ff1b75dc0548c
2015-10-08 17:29:25 -07:00
Jenkins c788514836 Merge "Add a moved function helper" 2015-10-08 05:21:08 +00:00
Joshua Harlow 3ab532f175 Add a 'removed_property' descriptor class
Closes-Bug: #1478678

Change-Id: Ibc04e83b7d3b027471bb80de61ca27bb45aa18bf
2015-10-07 17:03:31 -07:00
Joshua Harlow 35f61710d8 Include changelog/history in docs
Also moves doc8 to test-requirements.txt which should
be its more official home instead of being in tox.ini

Change-Id: If3836b211dbb47fa6bec36ac43367139bb939243
2015-09-24 15:38:46 -07:00
Joshua Harlow f0f1fce2a2 Add a moved function helper
This is useful for moving functions to newer names
or newer modules/locations and retaining the old function
so that the old function proxies to the new function and
emits a deprecation warning when it is called.

Also fixes how the 'get_callable_name' needs to filter
for none, as it appears that when ran under sphinx the
'__module__' attribute is set to none and this causes
issues when joining into a string.

Change-Id: I290f1b71c141c6647da1750aec348ea590a8d9bd
2015-08-28 11:20:19 -07:00
Joshua Harlow 90799975b4 Expose a top level 'deprecate' function
To make it possible for easy usage of the message generating
formats that debtcollector uses, allow users to call into a
helper function that can be used to deprecate arbitrary things.

Closes-Bug: 1478676

Change-Id: I4d5b8fe44150ce2d6d5418a9f4e13812e6b558ce
2015-07-28 17:42:33 -07:00
Joshua Harlow 1d97c0b101 Add @removals.removed_kwarg on an __init__ method
Closes-Bug: 1478679

Change-Id: Ie12a11dcbcbcdcf5da64b28ec868043ba2e2806a
2015-07-27 16:33:17 -07:00
Joshua Harlow 347369e758 Improve + test keyword argument @classmethod removal
Closes-Bug: 1478677

Change-Id: I61655c439e5e6f9878bedfef87518465482afc6d
2015-07-27 23:15:07 +00:00
Joshua Harlow 51587258bc Add example for removing a @classmethod
Closes-Bug: 1478674

Change-Id: I060c4ecda7f9397856c0a3c16efb49aae1585365
2015-07-27 16:14:28 -07:00
Joshua Harlow 8e607d1853 Ensure doctesting and doc8 testing done in py27 env
This ensures that sphinx doc tests are ran and validated
and also runs doc8 to ensure style checks are done and adjusts
some of the current examples and code to fix found issues.

Change-Id: I618d44df1e153dd0156110a2657e2540908e9225
2015-07-14 22:02:15 -07:00
Joshua Harlow fc4f285480 Fix quoting of examples
The removal output was updated to be in quotes, so the examples
should reflect this.

Change-Id: I76cc9a6a9f46e218c98b7657404c55d526ed15c0
2015-06-23 23:06:58 -07:00
Joshua Harlow 3eddc9394b Add pypi download + version badges
Change-Id: Ia4caab936f8ebd2a2f09ed28f231a9eb3cdaa258
2015-04-08 10:35:17 -07:00
Joshua Harlow 77edd33670 Add examples of using the new removals decorator
Change-Id: Ic5600ebb33e68f06fe4ab81fdc84107fb3e4df4f
2015-02-11 16:21:10 -08:00
Jenkins 538299d29f Merge "Add doctested examples into the documentation" 2015-02-11 18:28:13 +00:00
Matthew Treinish 497c1b47be Add a removal decorator
This commit adds a new decorator to mark a function/class as
deprecated in preparation for it's removal.

Change-Id: I4c3cf3ff9abdd7faefeae907a8b73608123fb09d
2015-02-09 22:54:57 +00:00
Joshua Harlow 7e3f6d41d7 Add doctested examples into the documentation
To make it more easy for those to see how to use
this library, start adding some basic examples that
show the common usage patterns.

Change-Id: Ieda04d0c3402cb3d9d7e55ecfd737571520ffbcb
2015-02-06 18:32:45 -08:00
Joshua Harlow 9f0f114b27 Fix up the docs into reasonable shape
Make the docs include the exposed API's and be formatted
better so that they are useful to users of debtcollector instead
of not being useful.

Change-Id: I6b1bdda206927d1475cabb1872a3fe21a178b125
2015-02-02 12:09:30 -08:00
Joshua Harlow 2c4e7d58dd Initial commit 2014-12-12 22:26:59 -08:00