Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use hacking fork as dependency and align modules with stackstorm core. #266

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
7 changes: 1 addition & 6 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
[MESSAGES CONTROL]
# C0111 Missing docstring
# I0011 Warning locally suppressed using disable-msg
# I0012 Warning locally suppressed using disable-msg
# W0704 Except doesn't do anything Used when an except clause does nothing but "pass" and there is no "else" clause
# W0142 Used * or * magic* Used when a function or method is called using *args or **kwargs to dispatch arguments.
# W0212 Access to a protected member %s of a client class
# W0232 Class has no __init__ method Used when a class has no __init__ method, neither its parent classes.
# W0613 Unused argument %r Used when a function or method argument is not used.
# W0702 No exception's type specified Used when an except clause doesn't specify exceptions type to catch.
# R0201 Method could be a function
# W0614 Unused import XYZ from wildcard import
# R0914 Too many local variables
# R0912 Too many branches
# R0915 Too many statements
# R0913 Too many arguments
# R0904 Too many public methods
# E0211: Method has no argument
disable=C0103,C0111,I0011,I0012,W0704,W0142,W0212,W0232,W0613,W0702,R0201,W0614,R0914,R0912,R0915,R0913,R0904,R0801
disable=C0103,C0111,I0011,W0212,W0613,W0702,W0614,R0914,R0912,R0915,R0913,R0904,R0801

[TYPECHECK]
# Note: This modules are manipulated during the runtime so we can't detect all the properties during
Expand Down
20 changes: 18 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
Changelog
=========

Unreleased
----------

Changed
~~~~~~~
* Dropped python3.6 support.
Contributed by @nzlosh
* Use pip 24.0 in virtualenv
Contributed by @nzlosh
* Aligned pinned dependencies with St2 core.
Contributed by @nzlosh

Fixed
~~~~~


1.6.0
-----

Expand Down Expand Up @@ -159,7 +175,7 @@ Added
~~~~~

* Add flake8 extension to restrict import alias. (improvement)
* Add developer docs on getting started, testing, and StackStorm integration. (improvement)
* Add developer docs on getting started, testing, and StackStorm integration. (improvement)

Changed
~~~~~~~
Expand Down Expand Up @@ -189,7 +205,7 @@ Added
Fixed
~~~~~

* Add sleep in while loop for composing execution graph to spread out cpu spike. (improvement)
* Add sleep in while loop for composing execution graph to spread out cpu spike. (improvement)
* Value in quotes in shorthand publish should be evaluated as string type. Fixes #130 (bug fix)
* Fix interpretation of boolean value in shorthand format of publish. Fixes #119 (bug fix)
* Update YAQL section in docs on use of "=>" for named parameters in function calls. Closes #124
Expand Down
45 changes: 30 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2020-2024 StackStorm contributors.
# Copyright 2019 Extreme Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -10,7 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

PY3 := $(shell which python3)
PY3 := python3
SYS_PY3 := $(shell which $(PY3))
PIP_VERSION = 24.0

# Virtual Environment
VENV_DIR ?= .venv
Expand All @@ -21,47 +26,59 @@ TOX_DIR ?= .tox
# Sphinx Document Options
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXAUTO = sphinx-autobuild
SPHINXAUTO = sphinx-autobuild
SPHINXPROJ = Orquesta
SOURCEDIR = docs/source
BUILDDIR = docs/build
EGGDIR = orquesta.egg-info

# Packaging Options
PKGDISTDIR = dist
PKGBUILDDIR = build


.PHONY: all
all: clean reqs schemas check package

.PHONY: clean
clean:
rm -rf $(VENV_DIR)
rm -rf $(TOX_DIR)
rm -rf $(BUILDDIR)
rm -rf $(PKGDISTDIR)
rm -rf $(PKGBUILDDIR)
rm -rf $(EGGDIR)

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

.PHONY: reqs
reqs: venv
$(VENV_DIR)/bin/pip install --upgrade "pip==20.3.3"
reqs: venv check_virtualenv
echo Install pip version $(PIP_VERSION) to match st2 core.
$(VENV_DIR)/bin/pip install --upgrade "pip==$(PIP_VERSION)"
$(VENV_DIR)/bin/pip install -r requirements.txt
$(VENV_DIR)/bin/pip install -r requirements-test.txt
$(VENV_DIR)/bin/pip install -r requirements-docs.txt
$(VENV_DIR)/bin/pip install -r requirements-ci.txt
$(VENV_DIR)/bin/python setup.py develop
echo

.PHONY: check_virtualenv
check_virtualenv:
test -d $(VENV_DIR) || exit 1

.PHONY: schemas
schemas: reqs
$(VENV_DIR)/bin/python bin/orquesta-generate-schemas
schemas: check_virtualenv
$(VENV_DIR)/bin/$(PY3) bin/orquesta-generate-schemas

.PHONY: format
format:
format: check_virtualenv
$(VENV_DIR)/bin/black orquesta bin setup.py -l 100

.PHONY: check
check:
tox
check: check_virtualenv
$(VENV_DIR)/bin/tox

.PHONY: docs
docs: reqs
Expand All @@ -74,14 +91,12 @@ livedocs: reqs
. $(VENV_DIR)/bin/activate; $(SPHINXAUTO) -H 0.0.0.0 -b html $(SOURCEDIR) $(BUILDDIR)/html

.PHONY: package
package:
package: check_virtualenv
rm -rf $(PKGDISTDIR)
rm -rf $(PKGBUILDDIR)
$(VENV_DIR)/bin/python setup.py sdist bdist_wheel
$(VENV_DIR)/bin/$(PY3) setup.py sdist bdist_wheel

.PHONY: publish
publish: package
$(VENV_DIR)/bin/python -m twine upload dist/*
$(VENV_DIR)/bin/$(PY3) -m twine upload dist/*

.PHONY: all
all: clean reqs schemas check package
5 changes: 2 additions & 3 deletions requirements-ci.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Different versions of tox are required by python version
tox-gh-actions
tox==3.28.0 ; python_version == "3.6"
tox==4.11.3; python_version >= "3.8"
tox==4.11.3
wheel
3 changes: 2 additions & 1 deletion requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sphinx>=2.0
# 202404: Align all requirements with st2 test-requirements
sphinx>=5.0.0,<7.2.0
sphinx-autobuild
sphinx_rtd_theme
21 changes: 11 additions & 10 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
black
coverage
flake8<3.9.0,>=3.8.0
hacking
mock>=1.0
pytest
pytest-cov
pep8>=1.6.0,<1.7
pylint>=2.5.2,<2.6
# 202404: Align all requirements with st2 test-requirements
coverage==7.2.7
black==22.3.0
flake8==7.0.0
mock==4.0.3
pytest==6.2.5
pytest-cov==4.1.0
pep8==1.7.1
pylint==3.1.0
twine
unittest2
# 202404: Use forked version for flake8 v7.0.0 to align requirements with st2 test-requirements
hacking @ git+https://github.com/nzlosh/hacking@flake8v7
20 changes: 10 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
chardet>=3.0.2,<4.0.0
eventlet
Jinja2>=2.11 # BSD License (3 clause)
jsonschema!=2.5.0,>=2.0.0,<=3.2 # MIT
# networkx v2.6 does not support Python3.6. Update networkx to match st2
networkx>=2.5.1,<2.6; python_version < '3.7'
networkx>=2.6,<3; python_version >= '3.7'
python-dateutil
PyYAML>=3.1.0 # MIT
six>=1.9.0
# 202404: Align all requirements with st2 fixed-requirements
chardet==5.2.0
eventlet==0.35.2
jinja2==3.1.3 # BSD License (3 clause)
jsonschema==3.2.0 # MIT
# networkx v3.2 and greater does not support Python3.8.
networkx<3.2
python-dateutil==2.8.1
pyyaml==5.3.1 # MIT
six~=1.15
stevedore>=1.3.0 # Apache-2.0
ujson>=1.35 # BSD License
yaql>=1.1.0 # Apache-2.0
Loading