Skip to content

Commit

Permalink
Remove six from code base.
Browse files Browse the repository at this point in the history
  • Loading branch information
nzlosh committed Aug 13, 2023
1 parent 676ce3e commit 4992b11
Show file tree
Hide file tree
Showing 57 changed files with 226 additions and 273 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ on:
branches:
- master
schedule:
# run every Monday at 6 AM
# run every Monday at 6am
- cron: '0 6 * * 1'

jobs:
tests:
runs-on: ubuntu-latest
# Force u2004 until py3.6 is dropped https://github.com/actions/setup-python/issues/544
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.8"]
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Changelog
=========

Unreleased
----------

Fixed
~~~~~

* Removed six from code base since py2 is not supported.
Contributed by @nzlosh

1.5.0
-----

Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ clean:

.PHONY: venv
venv:
test -d $(VENV_DIR) || virtualenv -p $(PY3) $(VENV_DIR)
test -d $(VENV_DIR) || $(PY3) -m venv $(VENV_DIR)

.PHONY: reqs
reqs: venv
Expand All @@ -61,7 +61,8 @@ format:

.PHONY: check
check:
tox
test -x $(VENV_DIR)/bin/tox || $(VENV_DIR)/bin/pip install tox;
$(VENV_DIR)/bin/tox

.PHONY: docs
docs: reqs
Expand Down
4 changes: 2 additions & 2 deletions bin/orquesta-generate-schemas
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright 2021-2023 The StackStorm Authors.
# Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
Expand All @@ -18,7 +19,6 @@ from __future__ import absolute_import
import inspect
import json
import os
import six
import sys

from orquesta.specs import native
Expand All @@ -32,7 +32,7 @@ def main():
scripts_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
schemas_dir = scripts_dir + "/../docs/source/schemas"

for name, model in six.iteritems(workflow_models):
for name, model in workflow_models.items():
new_schema_text = json.dumps(model.get_schema(), indent=4) + "\n"
print('Generated schema for the "%s" model.' % name)

Expand Down
2 changes: 1 addition & 1 deletion bin/orquesta-rehearse
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Copyright 2021 The StackStorm Authors.
# Copyright 2021-2023 The StackStorm Authors.
#
# Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
Expand Down
51 changes: 25 additions & 26 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@

# -- Project information -----------------------------------------------------

project = u'StackStorm Orquesta'
copyright = u'2018, StackStorm'
author = u'StackStorm'
project = "StackStorm Orquesta"
copyright = "2018, StackStorm"
author = "StackStorm"

# The short X.Y version
version = u''
version = ""
# The full version, including alpha/beta/rc tags
release = u''
release = ""


# -- General configuration ---------------------------------------------------
Expand All @@ -40,43 +40,43 @@
# ones.
extensions = [
# Add theme as extension so sitemap.xml is generated
'sphinx_rtd_theme'
"sphinx_rtd_theme"
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand All @@ -87,7 +87,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand All @@ -103,7 +103,7 @@
# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'Orquestadoc'
htmlhelp_basename = "Orquestadoc"


# -- Options for LaTeX output ------------------------------------------------
Expand All @@ -112,15 +112,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -130,19 +127,15 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'Orquesta.tex', u'Orquesta Documentation',
u'StackStorm', 'manual'),
(master_doc, "Orquesta.tex", "Orquesta Documentation", "StackStorm", "manual"),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'orquesta', u'Orquesta Documentation',
[author], 1)
]
man_pages = [(master_doc, "orquesta", "Orquesta Documentation", [author], 1)]


# -- Options for Texinfo output ----------------------------------------------
Expand All @@ -151,7 +144,13 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'Orquesta', u'Orquesta Documentation',
author, 'Orquesta', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"Orquesta",
"Orquesta Documentation",
author,
"Orquesta",
"One line description of project.",
"Miscellaneous",
),
]
6 changes: 3 additions & 3 deletions docs/source/context.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Basics
------

Let's revisit the workflow example we've used before. This example is using YAQL expressions.
The ``ctx`` function is also available to Jinja expressions. This workflow calculates a simple math
The ``ctx`` function is also available to Jinja expressions. This workflow calculates a simple maths
equation on inputs ``a``, ``b``, ``c``, and ``d``. The workflow input is provided on invocation.
If input is not provided at runtime, a default value is assigned. In this case, all the variables
will be assigned a value of 0.
Expand Down Expand Up @@ -90,7 +90,7 @@ best practice to avoid using the same variable name in parallel branches that co
Assignment Order
----------------

In the workflow defintion where variables are assigned into the context dictionary such as
In the workflow definition where variables are assigned into the context dictionary such as
``input``, ``vars``, ``publish``, and ``output``, the variables are defined as a list of key value
pairs. Orquesta will evaluate the assignment and associated expression in the order that the
variables are listed. Variables that have already been assigned earlier in the list are immediately
Expand Down Expand Up @@ -185,7 +185,7 @@ the other properties of the task. Example:
In the example above, the workflow takes a parameter ``dynamic_action``, this is a string of
the full action ref (``<pack>.<action>``, ex: ``core.local``) to execute.

Additionally, action inputs can be dynamically assigned using expresssions:
Additionally, action inputs can be dynamically assigned using expressions:

.. code-block:: yaml
Expand Down
2 changes: 1 addition & 1 deletion orquesta/commands/rehearsal.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021 The StackStorm Authors.
# Copyright 2021-2023 The StackStorm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
5 changes: 2 additions & 3 deletions orquesta/composers/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright 2021-2023 The StackStorm Authors.
# Copyright 2019 Extreme Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -14,7 +15,6 @@

import abc
import logging
import six

from orquesta.utils import plugin as plugin_util

Expand All @@ -26,8 +26,7 @@ def get_composer(catalog):
return plugin_util.get_module("orquesta.composers", catalog)


@six.add_metaclass(abc.ABCMeta)
class WorkflowComposer(object):
class WorkflowComposer(object, metaclass=abc.ABCMeta):
wf_spec_type = None

@classmethod
Expand Down
3 changes: 2 additions & 1 deletion orquesta/composers/native.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copyright 2021-2023 The StackStorm Authors.
# Copyright 2019 Extreme Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,7 +14,7 @@
# limitations under the License.

import logging
from six.moves import queue
import queue

from orquesta.composers import base as comp_base
from orquesta import graphing
Expand Down
Loading

0 comments on commit 4992b11

Please sign in to comment.