Commit Graph

30 Commits

Author SHA1 Message Date
Takashi Kajinami 2a282e9eb7 Move reno to doc requirements
The library is used only when rendering release notes.

Change-Id: Ief984862bbc99e77fbff33f77dbe1653b6d13b81
2024-01-28 01:41:47 +09:00
Hervé Beraud c1987c3a44 Remove unnecessary unicode prefixes
Change-Id: I89d9b80a54a283664502c84ae07b992c4a4172ab
2022-04-20 12:16:47 +02:00
Stephen Finucane 45e5452482 doc: Avoid duplicate entry warning
Both the 'FiniteMachine' and 'HierarchicalFiniteMachine' in
'automaton.machines' define an 'Effect' attribute. It seems recent
versions of autodoc can't handle this since we're seeing the following
warning:

  automaton/machines.py:docstring of
  automaton.machines.Effect:1:duplicate object description of
  automaton.machines.Effect, other instance in reference/index, use
  :noindex: for one of them

Do as it says and configure 'noindex' for the latter. This means we lose
the ability to link to other members of this class but that's a
necessary compromise since there's no way to exclude an individual
member.

Change-Id: Ic9e50f6b56a278032463357552960e40c2ddf6a7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2021-09-21 15:32:39 +01:00
Hervé Beraud 7d0648f8a3 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: I1e4625d34ed08218dd7069402a1eff1418f4ec35
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-15 17:41:13 +02:00
Andreas Jaeger 5ad6748225 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.

Remove docs requirements from lower-constraints, they are not needed
during install or test but only for docs building.

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: I3adc259f89f9093fbe9cce1353f5d6f0828271b9
2020-05-26 08:08:27 +02:00
Andreas Jaeger a1ed711037 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Cleanup some old cuft from setup.cfg.
Fix sphinx-build invocation to publish correctly.

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I61b0dcd730be1889815e47a0c0c354d8f7759571
2020-02-03 16:06:32 +01:00
Hervé Beraud b43036ac05 Move doc requirements into dedicated file
For the sake of homogeneity between oslo project scope,
prefer to use doc/requirements.txt

Change-Id: I10acf283752d18cb98c8ad19b8af4758bed94679
2019-12-18 15:23:57 +00:00
jacky06 d92ea1f8be Sync Sphinx requirement
1. Sync sphinx dependency with global requirements. It caps python 2 since
sphinx 2.0 no longer supports Python 2.7.
2. Remove unncessary "=="

Change-Id: Ied4095b176b20795f6a8d4d7a84d01d958d76896
2019-06-19 00:57:49 +08:00
Doug Hellmann 6c5dbfcd09 switch from oslosphinx to openstackdocstheme
Change-Id: I2b59094e2e670d711ed924e5c1c59b1e67568ca7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-07-06 15:39:45 -04:00
Doug Hellmann 9de339ee50 rearrange existing documentation according to the new standard layout
Change-Id: I1acfaaecd446953587ec36bda1cd795afed26b43
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-07-06 15:35:44 -04:00
Joshua Harlow 3f93f01330 Add a state-space machine building example
We currently don't have an example that uses a state
space to build a machine, so in order to make people aware
of this ability add an example that uses it to build a simple
state machine.

Change-Id: Ieec71ceee14f2bb451a52457d1a05aa54898597c
2016-02-02 14:50:53 -08:00
Joshua Harlow 64c51a554c Ensure machine special method(s) include in generated docs
Without explicitly mentioning that it should have its docs
generated sphinx won't generate docs for it, so ensure that
we list __iter__ and __contains__ so that it does get
generated docs.

Also fixes 'default_start_state' docs which were not showing
up since they were on the setter method vs the getter method.

Change-Id: I83d02a3604678d16b16f6da5384ff10543af850f
2016-01-07 13:01:52 -08:00
Jenkins 20c05120fd Merge "Provide a finite machine build() method" 2015-09-16 12:00:25 +00:00
Joshua Harlow ae7d6df7f4 Provide a finite machine build() method
This method can be quite useful to simplify building a
state-machine in a automated manner.

Change-Id: I1428f95bad1637c565745673f5ce018d9439f442
2015-09-14 11:25:28 -07:00
Jenkins d434212af8 Merge "Ensure doctesting and doc8 testing done in py27 env" 2015-07-20 22:01:42 +00:00
Joshua Harlow 01ee0381fe 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.

Also fixes the `get_callback_name` method which needs to check
if the __module__ is non-none (since it appears sphinx somehow
triggers it being none).

Change-Id: I54daecff219a9e9be71ff382d36fc2d5e67360cf
2015-07-16 14:47:27 -07:00
Joshua Harlow 151f447a8a Allow providing and using a 'nested_start_state_fetcher'
For hierarchical machines it seems like it would be
quite useful to allow nested machines to initialize to
states that are not just none so to enable this allow for
providing a callback that will be used to determine the
callback for all nested machines (and nested-nested
machines) so that they can be initialized to the users
desire.

Change-Id: I45a0c0e0c2a976e0df094e6c728f943766be7c7a
2015-07-06 12:09:03 -07:00
Jenkins 971c83f6c0 Merge "Add runners to features.rst & add a runner base & update docstrings" 2015-06-30 19:19:05 +00:00
Jenkins e1e435759d Merge "Add a bigger CD-player state-machine doctest(ed) example" 2015-06-30 17:45:16 +00:00
Joshua Harlow 33d5fdaa5f Add a bigger CD-player state-machine doctest(ed) example
Change-Id: I7d0c1d08b61f56b33289a0d774b89685416a3a70
2015-06-29 15:43:00 -07:00
Joshua Harlow ecf1263033 Add runners to features.rst & add a runner base & update docstrings
Change-Id: I18d7a656f537c3bf28257d24adc4a900e77906f3
2015-06-27 18:09:58 +00:00
Jenkins 6fa0a1085d Merge "Add history.rst that uses generated 'ChangeLog' file" 2015-06-25 21:47:02 +00:00
Jenkins a17e2ff682 Merge "Add base exception class for this library" 2015-06-25 21:10:17 +00:00
Joshua Harlow 9489002102 Add history.rst that uses generated 'ChangeLog' file
Change-Id: Ia5ce6ebd96060eb2024564fab91a2a62ae2b9cc9
2015-06-23 16:06:33 -07:00
Joshua Harlow fd1d81a90c Add base exception class for this library
To make it easier for users of this library to
differentiate general exceptions from automaton
exceptions it is quite common to have a root exception
class that libraries use (and derive there exceptions
from); this adds that.

Change-Id: I140cb188f58849ac5caea97ed5a422375b549f6f
2015-06-23 12:36:17 -07:00
Joshua Harlow 3898b1d803 Add optional machine conversion into a pydot graph
Both ironic and taskflow share this same code to convert
their state machines into a pydot graph which then gets
converted into SVG to form:

- http://docs.openstack.org/developer/taskflow/states.html
- http://docs.openstack.org/developer/ironic/dev/states.html

So instead of duplicating it, provide a useful helper function
that both (and others) can share to produce a dot/graphviz pretty
diagram from a state machine.

Change-Id: I218740910163a1ca2587d706edc55852af1c0c74
2015-06-18 10:44:44 -07:00
Joshua Harlow 7eeef3f354 Add a more complex doctest(ed) example
Change-Id: I52345bbbac6526531f109d5fcb62ac451b99ba9f
2015-06-11 11:33:28 -07:00
Joshua Harlow 160e3044bd Add simple machine doctest(ed) example into docs
Change-Id: I9017b6972a06b57b0ae1c997640fbb51b6c4bea6
2015-06-10 13:20:17 -07:00
Joshua Harlow bcb61f0b0d Split the state machine runners off into own file
When using a state machine it is not always desired
to use the runner concept, so to ensure both concepts
are modular split runners off into there own module.

Change-Id: Iac8ce50b0a17468190f3f737663b5b094c324a55
2015-06-09 15:14:34 -07:00
Joshua Harlow d71b6cf8b4 Revamp repo to match openstack repos
Get the repo in a working state so that it works
with the new and improved openstack CI system.

Change-Id: I80661c35fa7109a7ee9b1d00f89ca521a469eed0
2015-06-05 17:18:17 -07:00