diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index bf2a5784..5f6486d4 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -34,13 +34,13 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index 17486c37..5ce5af3e 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -8,10 +8,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Python 3 - uses: actions/setup-python@v2.2.2 + uses: actions/setup-python@v4.4.0 with: python-version: '3.9' diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 7d203648..800a1092 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -9,10 +9,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Python 3 - uses: actions/setup-python@v2.2.2 + uses: actions/setup-python@v4.4.0 with: python-version: '3.9' @@ -25,16 +25,17 @@ jobs: python -m build . - name: Publish to Test PyPI - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository_url: https://test.pypi.org/legacy/ skip_existing: true + verbose: true - name: Publish to PyPI if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/test-suite.yaml b/.github/workflows/test-suite.yaml index 12285142..b9e23439 100644 --- a/.github/workflows/test-suite.yaml +++ b/.github/workflows/test-suite.yaml @@ -12,10 +12,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2.2.2 + uses: actions/setup-python@v4.4.0 with: python-version: ${{ matrix.python-version }} @@ -36,4 +36,4 @@ jobs: coverage report -m --skip-covered - name: Code Coverage - uses: codecov/codecov-action@v1.5.0 + uses: codecov/codecov-action@v3.1.1 diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..3b0142a5 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,14 @@ +version: 2 + +build: + os: ubuntu-20.04 + tools: + python: "3.9" + +sphinx: + configuration: docs/source/conf.py + +python: + install: + - path: . + method: pip diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index f735ea06..0bafb2db 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -1,6 +1,24 @@ Changelog ####################################### +1.1.1 +======================================= + +- Add ``parse_dependabot.py`` script to get dependency update information + from dependabot commits. +- Add readthedocs configuration and set to use python 3.9. +- Dependency updates: + - Update actions/checkout from 2 to 3.1.0. + - Update actions/setup-python from 2.2.2 to 4.4.0. + - Update codecov/codecov-action from 1.5.0 to 3.1.1. + - Update coverage from 5.5 to 7.0.5. + - Update flake8 from 3.9.2 to 6.0.0. + - Pin gh-action-pypi-publish to release/v1. + - Update github/codeql-action from 1 to 2. + - Update setuptools from 56.2.0 to 65.6.3. + - Update sphinx from 4.2.0 to 5.3.0. + - Update sphinx-rtd-theme from 0.5.2 to 1.1.1. + 1.1.0 ======================================= diff --git a/docs/source/conf.py b/docs/source/conf.py index 64fd1df8..918a9615 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -65,7 +65,7 @@ # # 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. diff --git a/parse_dependabot.py b/parse_dependabot.py new file mode 100755 index 00000000..ad1e5035 --- /dev/null +++ b/parse_dependabot.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 + +import re +import sys + +import subprocess + +if len(sys.argv) <= 1: + print("Please supply the ref as the first parameter") + sys.exit(1) + +proc = subprocess.run( + f'git log {sys.argv[1]}..HEAD --author="dependabot" --grep="^Bump" --oneline --no-decorate', + shell=True, + stdout=subprocess.PIPE, + text=True +) +lines = sorted(proc.stdout.splitlines()) + +warnings = [] +output = [] + +p = re.compile(r"Bump ([a-zA-Z\/\-\_0-9]+) from ([0-9\.]+) to ([0-9\.]+)") +for (line, match) in map(lambda line: (line, p.search(line)), lines): + if not match: + warnings.append(line) + continue + + name, old, new = match.group(1, 2, 3) + output.append(f"- Update {name} from {old} to {new}.") + +print(*sorted(set(output)), sep="\n") + +if warnings: + print("Could not parse these lines") + print(*warnings, sep="\n") diff --git a/requirements-dev.txt b/requirements-dev.txt index dde4500a..7265da01 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,5 +1,5 @@ -setuptools==56.2.0 -sphinx==4.2.0 -sphinx_rtd_theme==0.5.2 -coverage==5.5 -flake8==3.9.2 +setuptools==65.6.3 +sphinx==5.3.0 +sphinx_rtd_theme==1.1.1 +coverage==7.0.5 +flake8==6.0.0 diff --git a/verto/__init__.py b/verto/__init__.py index abd933ef..b4f4025a 100644 --- a/verto/__init__.py +++ b/verto/__init__.py @@ -1,4 +1,4 @@ # flake8: noqa from .Verto import Verto -__version__ = '1.1.0' +__version__ = '1.1.1' diff --git a/verto/processors/ImageContainerBlockProcessor.py b/verto/processors/ImageContainerBlockProcessor.py index 38cca6d3..bf13437f 100644 --- a/verto/processors/ImageContainerBlockProcessor.py +++ b/verto/processors/ImageContainerBlockProcessor.py @@ -60,7 +60,7 @@ def custom_parsing(self, content_blocks, argument_values): extra_args[argument] = content_blocks[0] file_path = argument_values['file-path'] - del(argument_values['file-path']) + del (argument_values['file-path']) external_path_match = re.search(r'^http', file_path) if external_path_match is None: # internal image self.required.add(file_path) diff --git a/verto/processors/VideoBlockProcessor.py b/verto/processors/VideoBlockProcessor.py index 0032aea9..34757cf9 100644 --- a/verto/processors/VideoBlockProcessor.py +++ b/verto/processors/VideoBlockProcessor.py @@ -96,7 +96,7 @@ def extract_video_identifier(self, video_url): if end_pos == -1: end_pos = len(video_url) video_query = video_url[start_pos:end_pos] - return('youtube', video_query) + return ('youtube', video_query) elif 'vimeo' in video_url: video_query = video_url.split('/')[-1] return ('vimeo', video_query)