From a9fd37f3f69325f6d7ec0254bcea49b411cb6865 Mon Sep 17 00:00:00 2001 From: amanda Date: Fri, 16 Jul 2021 10:49:50 +0100 Subject: [PATCH 1/7] Initial changes, with dummy break of st2client README to check failiure reported --- Makefile | 32 +++++++++++++++++++++++++++++++- st2client/README.rst | 2 +- st2client/setup.py | 1 + 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7072607d31..48f9e8f43c 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,12 @@ OS := $(shell uname) ifeq ($(OS),Darwin) VIRTUALENV_DIR ?= virtualenv-osx VIRTUALENV_ST2CLIENT_DIR ?= virtualenv-st2client-osx + VIRTUALENV_ST2CLIENT_PYPI_DIR ?= virtualenv-st2client-pypi-osx VIRTUALENV_COMPONENTS_DIR ?= virtualenv-components-osx else VIRTUALENV_DIR ?= virtualenv VIRTUALENV_ST2CLIENT_DIR ?= virtualenv-st2client + VIRTUALENV_ST2CLIENT_PYPI_DIR ?= virtualenv-st2client-pypi VIRTUALENV_COMPONENTS_DIR ?= virtualenv-components endif @@ -478,6 +480,34 @@ flake8: requirements .flake8 . $(VIRTUALENV_DIR)/bin/activate; flake8 --config ./lint-configs/python/.flake8 tools/ . $(VIRTUALENV_DIR)/bin/activate; flake8 --config ./lint-configs/python/.flake8 pylint_plugins/ +# Make task which verifies st2client README will parse pypi checks +. PHONY: .st2client-pypi-check +st2client-pypi-check: + @echo + @echo "==================== st2client pypi check ====================" + @echo + test -f $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate || virtualenv --python=python3 $(VIRTUALENV_ST2CLIENT_PYPI_DIR) --no-download + + # Setup PYTHONPATH in bash activate script... + # Delete existing entries (if any) + sed -i '/_OLD_PYTHONPATHp/d' $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate + sed -i '/PYTHONPATH=/d' $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate + sed -i '/export PYTHONPATH/d' $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate + echo '_OLD_PYTHONPATH=$$PYTHONPATH' >> $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate + echo 'PYTHONPATH=${ROOT_DIR}:$(COMPONENT_PYTHONPATH)' >> $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate + echo 'export PYTHONPATH' >> $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate + touch $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate + chmod +x $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate + + $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/pip install --upgrade "pip==$(PIP_VERSION)" + $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/pip install --upgrade "readme_renderer" + $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/pip install --upgrade "restructuredtext-lint" + + # Check with readme-renderer + . $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate; cd st2client ; ../$(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/python -m readme_renderer README.rst ; cd .. + # Check with old setup.py check - encounters errors that readme_renderer doesn't + . $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate; cd st2client ; rst-lint README.rst ; cd .. + # Make task which verifies st2client installs and works fine .PHONY: .st2client-install-check .st2client-install-check: @@ -1105,7 +1135,7 @@ ci: ci-checks ci-unit ci-integration ci-packs-tests # NOTE: pylint is moved to ci-compile so we more evenly spread the load across # various different jobs to make the whole workflow complete faster .PHONY: ci-checks -ci-checks: .generated-files-check .shellcheck .black-check .pre-commit-checks .flake8 check-requirements check-sdist-requirements .st2client-dependencies-check .st2common-circular-dependencies-check circle-lint-api-spec .rst-check .st2client-install-check check-python-packages +ci-checks: .generated-files-check .shellcheck .black-check .pre-commit-checks .flake8 check-requirements check-sdist-requirements .st2client-dependencies-check .st2common-circular-dependencies-check circle-lint-api-spec .rst-check .st2client-install-check check-python-packages .st2client-pypi-check .PHONY: .rst-check .rst-check: diff --git a/st2client/README.rst b/st2client/README.rst index a45039ae64..e7257f8a43 100644 --- a/st2client/README.rst +++ b/st2client/README.rst @@ -4,7 +4,7 @@ StackStorm CLI and Python Client Install stable / production version from Python Package Index (PyPi) -------------------------------------------------------------------- -.. sourcecode:: bash +.. sourcecode:: bashc pip install st2client diff --git a/st2client/setup.py b/st2client/setup.py index ccd101877a..118c6101f2 100644 --- a/st2client/setup.py +++ b/st2client/setup.py @@ -45,6 +45,7 @@ "automation platform." ), long_description=readme, + long_description_content_type="text/x-rst", author="StackStorm", author_email="info@stackstorm.com", url="https://stackstorm.com/", From 9c1f951664b4337db205f30ecd3243477b7a5907 Mon Sep 17 00:00:00 2001 From: amanda Date: Fri, 16 Jul 2021 11:06:38 +0100 Subject: [PATCH 2/7] Error in Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 48f9e8f43c..17aebfe33f 100644 --- a/Makefile +++ b/Makefile @@ -482,7 +482,7 @@ flake8: requirements .flake8 # Make task which verifies st2client README will parse pypi checks . PHONY: .st2client-pypi-check -st2client-pypi-check: +.st2client-pypi-check: @echo @echo "==================== st2client pypi check ====================" @echo From 1629ab60ec5ea69f5a72a064235b6a69a4082daa Mon Sep 17 00:00:00 2001 From: amanda Date: Fri, 16 Jul 2021 11:42:09 +0100 Subject: [PATCH 3/7] Make sure last command is the checker not cd --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 17aebfe33f..63924b9068 100644 --- a/Makefile +++ b/Makefile @@ -504,9 +504,9 @@ flake8: requirements .flake8 $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/pip install --upgrade "restructuredtext-lint" # Check with readme-renderer - . $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate; cd st2client ; ../$(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/python -m readme_renderer README.rst ; cd .. + . $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate; cd st2client ; ../$(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/python -m readme_renderer README.rst # Check with old setup.py check - encounters errors that readme_renderer doesn't - . $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate; cd st2client ; rst-lint README.rst ; cd .. + . $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate; cd st2client ; rst-lint README.rst # Make task which verifies st2client installs and works fine .PHONY: .st2client-install-check From ca6313aa0a16f89c54af6ba819324aae674c200a Mon Sep 17 00:00:00 2001 From: amanda Date: Fri, 16 Jul 2021 11:48:21 +0100 Subject: [PATCH 4/7] Fix whitespace --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 63924b9068..8950173ef5 100644 --- a/Makefile +++ b/Makefile @@ -506,7 +506,7 @@ flake8: requirements .flake8 # Check with readme-renderer . $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate; cd st2client ; ../$(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/python -m readme_renderer README.rst # Check with old setup.py check - encounters errors that readme_renderer doesn't - . $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate; cd st2client ; rst-lint README.rst + . $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate; cd st2client ; rst-lint README.rst # Make task which verifies st2client installs and works fine .PHONY: .st2client-install-check From 164b637f60268fb043afe7cf3fdad202a5213171 Mon Sep 17 00:00:00 2001 From: amanda Date: Fri, 16 Jul 2021 13:17:12 +0100 Subject: [PATCH 5/7] Put readme back to valid now got correct error --- st2client/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st2client/README.rst b/st2client/README.rst index e7257f8a43..a45039ae64 100644 --- a/st2client/README.rst +++ b/st2client/README.rst @@ -4,7 +4,7 @@ StackStorm CLI and Python Client Install stable / production version from Python Package Index (PyPi) -------------------------------------------------------------------- -.. sourcecode:: bashc +.. sourcecode:: bash pip install st2client From 2d5c66ac23e7d64412cd9c6d65a16a9971cf91a5 Mon Sep 17 00:00:00 2001 From: Amanda McGuinness Date: Fri, 16 Jul 2021 16:00:42 +0100 Subject: [PATCH 6/7] Update comments in Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8950173ef5..0e09ad94c5 100644 --- a/Makefile +++ b/Makefile @@ -505,7 +505,7 @@ flake8: requirements .flake8 # Check with readme-renderer . $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate; cd st2client ; ../$(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/python -m readme_renderer README.rst - # Check with old setup.py check - encounters errors that readme_renderer doesn't + # Check with rst-lint - encounters errors that readme_renderer doesn't, but pypi complains about . $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate; cd st2client ; rst-lint README.rst # Make task which verifies st2client installs and works fine From 0fa477e70d7925275f38abd53cc40cb3455b6bb5 Mon Sep 17 00:00:00 2001 From: Amanda McGuinness Date: Fri, 16 Jul 2021 16:01:35 +0100 Subject: [PATCH 7/7] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0e09ad94c5..018641bffd 100644 --- a/Makefile +++ b/Makefile @@ -505,7 +505,7 @@ flake8: requirements .flake8 # Check with readme-renderer . $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate; cd st2client ; ../$(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/python -m readme_renderer README.rst - # Check with rst-lint - encounters errors that readme_renderer doesn't, but pypi complains about + # Check with rst-lint - encounters errors that readme_renderer doesn't, but pypi complains about . $(VIRTUALENV_ST2CLIENT_PYPI_DIR)/bin/activate; cd st2client ; rst-lint README.rst # Make task which verifies st2client installs and works fine