Skip to content

Commit 6540b49

Browse files
committed
Use hacking fork as dependency and align modules with stackstorm core.
1 parent 08c41ed commit 6540b49

8 files changed

+75
-48
lines changed

.github/workflows/tox.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-20.04
1616
strategy:
1717
matrix:
18-
python-version: ["3.6", "3.8", "3.9", "3.10", "3.11"]
18+
python-version: ["3.8", "3.9", "3.10", "3.11"]
1919
steps:
2020
- name: Checkout repository
2121
uses: actions/checkout@v4

.pylintrc

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
11
[MESSAGES CONTROL]
22
# C0111 Missing docstring
33
# I0011 Warning locally suppressed using disable-msg
4-
# I0012 Warning locally suppressed using disable-msg
5-
# W0704 Except doesn't do anything Used when an except clause does nothing but "pass" and there is no "else" clause
6-
# W0142 Used * or * magic* Used when a function or method is called using *args or **kwargs to dispatch arguments.
74
# W0212 Access to a protected member %s of a client class
8-
# W0232 Class has no __init__ method Used when a class has no __init__ method, neither its parent classes.
95
# W0613 Unused argument %r Used when a function or method argument is not used.
106
# W0702 No exception's type specified Used when an except clause doesn't specify exceptions type to catch.
11-
# R0201 Method could be a function
127
# W0614 Unused import XYZ from wildcard import
138
# R0914 Too many local variables
149
# R0912 Too many branches
1510
# R0915 Too many statements
1611
# R0913 Too many arguments
1712
# R0904 Too many public methods
1813
# E0211: Method has no argument
19-
disable=C0103,C0111,I0011,I0012,W0704,W0142,W0212,W0232,W0613,W0702,R0201,W0614,R0914,R0912,R0915,R0913,R0904,R0801
14+
disable=C0103,C0111,I0011,W0212,W0613,W0702,W0614,R0914,R0912,R0915,R0913,R0904,R0801
2015

2116
[TYPECHECK]
2217
# Note: This modules are manipulated during the runtime so we can't detect all the properties during

CHANGELOG.rst

+18-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
Changelog
22
=========
33

4+
Unreleased
5+
----------
6+
7+
Changed
8+
~~~~~~~
9+
* Dropped python3.6 support.
10+
Contributed by @nzlosh
11+
* Use pip 24.0 in virtualenv
12+
Contributed by @nzlosh
13+
* Aligned pinned dependencies with St2 core.
14+
Contributed by @nzlosh
15+
16+
Fixed
17+
~~~~~
18+
19+
420
1.6.0
521
-----
622

@@ -159,7 +175,7 @@ Added
159175
~~~~~
160176

161177
* Add flake8 extension to restrict import alias. (improvement)
162-
* Add developer docs on getting started, testing, and StackStorm integration. (improvement)
178+
* Add developer docs on getting started, testing, and StackStorm integration. (improvement)
163179

164180
Changed
165181
~~~~~~~
@@ -189,7 +205,7 @@ Added
189205
Fixed
190206
~~~~~
191207

192-
* Add sleep in while loop for composing execution graph to spread out cpu spike. (improvement)
208+
* Add sleep in while loop for composing execution graph to spread out cpu spike. (improvement)
193209
* Value in quotes in shorthand publish should be evaluated as string type. Fixes #130 (bug fix)
194210
* Fix interpretation of boolean value in shorthand format of publish. Fixes #119 (bug fix)
195211
* Update YAQL section in docs on use of "=>" for named parameters in function calls. Closes #124

Makefile

+30-15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright 2020-2024 StackStorm contributors.
2+
# Copyright 2019 Extreme Networks, Inc.
3+
#
14
# Licensed under the Apache License, Version 2.0 (the "License");
25
# you may not use this file except in compliance with the License.
36
# You may obtain a copy of the License at
@@ -10,7 +13,9 @@
1013
# See the License for the specific language governing permissions and
1114
# limitations under the License.
1215

13-
PY3 := $(shell which python3)
16+
PY3 := python3
17+
SYS_PY3 := $(shell which $(PY3))
18+
PIP_VERSION = 24.0
1419

1520
# Virtual Environment
1621
VENV_DIR ?= .venv
@@ -21,47 +26,59 @@ TOX_DIR ?= .tox
2126
# Sphinx Document Options
2227
SPHINXOPTS =
2328
SPHINXBUILD = sphinx-build
24-
SPHINXAUTO = sphinx-autobuild
29+
SPHINXAUTO = sphinx-autobuild
2530
SPHINXPROJ = Orquesta
2631
SOURCEDIR = docs/source
2732
BUILDDIR = docs/build
33+
EGGDIR = orquesta.egg-info
2834

2935
# Packaging Options
3036
PKGDISTDIR = dist
3137
PKGBUILDDIR = build
3238

39+
40+
.PHONY: all
41+
all: clean reqs schemas check package
42+
3343
.PHONY: clean
3444
clean:
3545
rm -rf $(VENV_DIR)
3646
rm -rf $(TOX_DIR)
3747
rm -rf $(BUILDDIR)
3848
rm -rf $(PKGDISTDIR)
3949
rm -rf $(PKGBUILDDIR)
50+
rm -rf $(EGGDIR)
4051

4152
.PHONY: venv
4253
venv:
43-
test -d $(VENV_DIR) || virtualenv -p $(PY3) $(VENV_DIR)
54+
test -d $(VENV_DIR) || $(SYS_PY3) -m venv $(VENV_DIR)
4455

4556
.PHONY: reqs
46-
reqs: venv
47-
$(VENV_DIR)/bin/pip install --upgrade "pip==20.3.3"
57+
reqs: venv check_virtualenv
58+
echo Install pip version $(PIP_VERSION) to match st2 core.
59+
$(VENV_DIR)/bin/pip install --upgrade "pip==$(PIP_VERSION)"
4860
$(VENV_DIR)/bin/pip install -r requirements.txt
4961
$(VENV_DIR)/bin/pip install -r requirements-test.txt
5062
$(VENV_DIR)/bin/pip install -r requirements-docs.txt
63+
$(VENV_DIR)/bin/pip install -r requirements-ci.txt
5164
$(VENV_DIR)/bin/python setup.py develop
5265
echo
5366

67+
.PHONY: check_virtualenv
68+
check_virtualenv:
69+
test -d $(VENV_DIR) || exit 1
70+
5471
.PHONY: schemas
55-
schemas: reqs
56-
$(VENV_DIR)/bin/python bin/orquesta-generate-schemas
72+
schemas: check_virtualenv
73+
$(VENV_DIR)/bin/$(PY3) bin/orquesta-generate-schemas
5774

5875
.PHONY: format
59-
format:
76+
format: check_virtualenv
6077
$(VENV_DIR)/bin/black orquesta bin setup.py -l 100
6178

6279
.PHONY: check
63-
check:
64-
tox
80+
check: check_virtualenv
81+
$(VENV_DIR)/bin/tox
6582

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

7693
.PHONY: package
77-
package:
94+
package: check_virtualenv
7895
rm -rf $(PKGDISTDIR)
7996
rm -rf $(PKGBUILDDIR)
80-
$(VENV_DIR)/bin/python setup.py sdist bdist_wheel
97+
$(VENV_DIR)/bin/$(PY3) setup.py sdist bdist_wheel
8198

8299
.PHONY: publish
83100
publish: package
84-
$(VENV_DIR)/bin/python -m twine upload dist/*
101+
$(VENV_DIR)/bin/$(PY3) -m twine upload dist/*
85102

86-
.PHONY: all
87-
all: clean reqs schemas check package

requirements-ci.txt

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# Different versions of tox are required by python version
21
tox-gh-actions
3-
tox==3.28.0 ; python_version == "3.6"
4-
tox==4.11.3; python_version >= "3.8"
2+
tox==4.11.3
3+
wheel

requirements-docs.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
sphinx>=2.0
1+
# 202404: Align all requirements with st2 test-requirements
2+
sphinx>=5.0.0,<7.2.0
23
sphinx-autobuild
34
sphinx_rtd_theme

requirements-test.txt

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
black
2-
coverage
3-
flake8<3.9.0,>=3.8.0
4-
hacking
5-
mock>=1.0
6-
pytest
7-
pytest-cov
8-
pep8>=1.6.0,<1.7
9-
pylint>=2.5.2,<2.6
1+
# 202404: Align all requirements with st2 test-requirements
2+
coverage==7.2.7
3+
black==22.3.0
4+
flake8==7.0.0
5+
mock==4.0.3
6+
pytest==6.2.5
7+
pytest-cov==4.1.0
8+
pep8==1.7.1
9+
pylint==3.1.0
1010
twine
11-
unittest2
11+
# 202404: Use forked version for flake8 v7.0.0 to align requirements with st2 test-requirements
12+
hacking @ git+https://github.com/nzlosh/hacking@flake8v7

requirements.txt

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
chardet>=3.0.2,<4.0.0
2-
eventlet
3-
Jinja2>=2.11 # BSD License (3 clause)
4-
jsonschema!=2.5.0,>=2.0.0,<=3.2 # MIT
5-
# networkx v2.6 does not support Python3.6. Update networkx to match st2
6-
networkx>=2.5.1,<2.6; python_version < '3.7'
7-
networkx>=2.6,<3; python_version >= '3.7'
8-
python-dateutil
9-
PyYAML>=3.1.0 # MIT
10-
six>=1.9.0
1+
# 202404: Align all requirements with st2 fixed-requirements
2+
chardet==5.2.0
3+
eventlet==0.35.2
4+
jinja2==3.1.3 # BSD License (3 clause)
5+
jsonschema==3.2.0 # MIT
6+
# networkx v3.2 and greater does not support Python3.8.
7+
networkx<3.2
8+
python-dateutil==2.8.1
9+
pyyaml==5.3.1 # MIT
10+
six~=1.15
1111
stevedore>=1.3.0 # Apache-2.0
1212
ujson>=1.35 # BSD License
1313
yaql>=1.1.0 # Apache-2.0

0 commit comments

Comments
 (0)