From 6099a3a731890460f116a41388f17c00ed7b0b06 Mon Sep 17 00:00:00 2001 From: Trent Warlaven Date: Tue, 1 Aug 2023 17:45:55 -0500 Subject: [PATCH 1/4] Python does name mangling once inside a class, so change the function name to prevent the mangling, and breaking on Python on a computer --- circuitpython_hmac.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/circuitpython_hmac.py b/circuitpython_hmac.py index 9d5cdc5..b86252b 100644 --- a/circuitpython_hmac.py +++ b/circuitpython_hmac.py @@ -47,7 +47,7 @@ import adafruit_hashlib as _hashlib -def __translate(key, translation): +def __translate__(key, translation): return bytes(translation[x] for x in key) @@ -112,8 +112,8 @@ def __init__(self, key, msg=None, digestmod=None): key = self.digest_cons(key).digest() key = key + bytes(blocksize - len(key)) - self.outer.update(__translate(key, TRANS_5C)) - self.inner.update(__translate(key, TRANS_36)) + self.outer.update(__translate__(key, TRANS_5C)) + self.inner.update(__translate__(key, TRANS_36)) if msg is not None: self.update(msg) From 5050098efb0ef3f5d14930c96f2f732550ba681b Mon Sep 17 00:00:00 2001 From: Trent Warlaven Date: Tue, 1 Aug 2023 20:12:52 -0500 Subject: [PATCH 2/4] Work on updating CI/CD stuff to be with modern library releases --- .github/workflows/build.yml | 57 ++++++++++++++++++++++++++++------- .github/workflows/release.yml | 16 +++++----- .gitignore | 23 +++++++++++--- .pre-commit-config.yaml | 38 +++++++++++++++++++++++ .pylintrc | 54 ++++++--------------------------- circuitpython_hmac.py | 9 ++---- pyproject.toml | 50 ++++++++++++++++++++++++++++++ requirements.txt | 5 +++ setup.py | 53 -------------------------------- 9 files changed, 179 insertions(+), 126 deletions(-) create mode 100644 .pre-commit-config.yaml create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9828612..261aff3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,3 +1,9 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +# This is modified version of the action adafruit/workflows-circuitpython-libs/build@main to skips docs + name: Build CI on: [pull_request, push] @@ -38,20 +44,49 @@ jobs: # (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.) run: | source actions-ci/install.sh - - name: Pip install pylint, black, & Sphinx + - name: Install pre-commit for testing # Spinx was removed from this list. To add back add `Sphinx sphinx-rtd-theme` + # pre-commit will install pylint and black when it runs run: | - pip install --force-reinstall pylint==1.9.2 black==19.10b0 Sphinx sphinx-rtd-theme + pip install --force-reinstall pre-commit - name: Library version run: git describe --dirty --always --tags - - name: PyLint + - name: Setup problem matchers + uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1 + - name: Pre-commit hooks + # This will run pylint and black + shell: bash run: | - pylint $( find . -path './circuitpython*.py' ) - ([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace $( find . -path "./examples/*.py" )) - - name: Check formatting + pre-commit run --all-files + - name: Run pytest + shell: bash run: | - black --check --target-version=py35 . + if [[ -d tests ]]; then + pip install pytest + pytest + fi - name: Build assets - run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . - # - name: Build docs - # working-directory: docs - # run: sphinx-build -E -W -b html . _build/html + shell: bash + run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . ${{ steps.package-prefix-arg.outputs.prefix-arg }} + - name: Archive bundles + uses: actions/upload-artifact@v3 + with: + name: bundles + path: ${{ github.workspace }}/bundles/ + # Doc building would go here, if that were being done + - name: Check For pyproject.toml + id: need-pypi + shell: bash + run: | + echo pyproject-toml=$( find . -wholename './pyproject.toml' ) >> $GITHUB_OUTPUT + - name: Check packaging information + if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') + shell: bash + run: python actions-ci/check_lib_packaging.py + - name: Build Python package + if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') + shell: bash + run: | + pip install --upgrade build twine + find -type f -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) -exec sed -i -e "s/0.0.0+auto.0/1.2.3/" {} + + python -m build + twine check dist/* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 18efb9c..da14d06 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,6 +48,7 @@ jobs: # allows for selecting files with a pattern. # https://github.com/actions/upload-release-asset/issues/4 #uses: actions/upload-release-asset@v1.0.1 + # This has been changed in the Adafruit action to "shogo82148/actions-upload-release-asset" uses: csexton/release-asset-action@master with: pattern: "bundles/*" @@ -57,25 +58,26 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - name: Check For setup.py + - name: Check For pyproject.toml id: need-pypi run: | - echo ::set-output name=setup-py::$( find . -wholename './setup.py' ) + echo pyproject-toml=$( find . -wholename './pyproject.toml' ) >> $GITHUB_OUTPUT - name: Set up Python - if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') + if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') uses: actions/setup-python@v1 with: python-version: '3.x' - name: Install dependencies - if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') + if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') run: | python -m pip install --upgrade pip - pip install setuptools wheel twine + pip install --upgrade build twine - name: Build and publish - if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') + if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') env: TWINE_USERNAME: ${{ secrets.pypi_username }} TWINE_PASSWORD: ${{ secrets.pypi_password }} run: | - python setup.py sdist + find -type f -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) -exec sed -i -e "s/0.0.0+auto.0/${{github.event.release.tag_name}}/" {} + + python -m build twine upload dist/* diff --git a/.gitignore b/.gitignore index 966df0f..180db33 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,27 @@ +# Built python files *.mpy -.idea __pycache__ -_build -*.pyc -.env -.python-version build*/ bundles +*.pyc + +# Sphix build dir +_build + +# Python env files +.env +.venv +venv/ + +# MacOS metadata files *.DS_Store + +# Local module install files .eggs dist +.python-version **/*.egg-info + +# IDE FIles +.idea .vscode diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..48cc780 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò +# +# SPDX-License-Identifier: Unlicense + +repos: + - repo: https://github.com/python/black + rev: 23.3.0 + hooks: + - id: black + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + - repo: https://github.com/pycqa/pylint + rev: v2.17.4 + hooks: + - id: pylint + name: pylint (library code) + types: [python] + args: + - --disable=consider-using-f-string + exclude: "^(docs/|examples/|tests/|setup.py$)" + - id: pylint + name: pylint (example code) + description: Run pylint rules on "examples/*.py" files + types: [python] + files: "^examples/" + args: + - --disable=missing-docstring,invalid-name,consider-using-f-string,duplicate-code + - id: pylint + name: pylint (test code) + description: Run pylint rules on "tests/*.py" files + types: [python] + files: "^tests/" + args: + - --disable=missing-docstring,consider-using-f-string,duplicate-code diff --git a/.pylintrc b/.pylintrc index 039eaec..37cebd8 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,3 +1,8 @@ +# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò +# SPDX-FileCopyrightText: 2023 Jim Bennett +# +# SPDX-License-Identifier: Unlicense + [MASTER] # A comma-separated list of package or module names from where C extensions may @@ -5,11 +10,11 @@ # run arbitrary code extension-pkg-whitelist= -# Add files or directories to the blacklist. They should be base names, not +# Add files or directories to the ignore-list. They should be base names, not # paths. ignore=CVS -# Add files or directories matching the regex patterns to the blacklist. The +# Add files or directories matching the regex patterns to the ignore-list. The # regex matches against base names, not paths. ignore-patterns= @@ -18,12 +23,11 @@ ignore-patterns= #init-hook= # Use multiple processes to speed up Pylint. -# jobs=1 jobs=2 # List of plugins (as comma separated values of python modules names) to load, # usually to register additional checkers. -load-plugins= +load-plugins=pylint.extensions.no_self_use # Pickle collected data for later comparisons. persistent=yes @@ -51,8 +55,7 @@ confidence= # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use"--disable=all --enable=classes # --disable=W" -# disable=import-error,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call -disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error +disable=raw-checker-failed,bad-inline-option,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,import-error,pointless-string-statement,unspecified-encoding # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option @@ -222,12 +225,6 @@ max-line-length=100 # Maximum number of lines in a module max-module-lines=1000 -# List of optional constructs for which whitespace checking is disabled. `dict- -# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. -# `trailing-comma` allows a space between comma and closing bracket: (a, ). -# `empty-line` allows space-only lines. -no-space-check=trailing-comma,dict-separator - # Allow the body of a class to be on the same line as the declaration if body # contains single statement. single-line-class-stmt=no @@ -254,38 +251,22 @@ min-similarity-lines=4 [BASIC] -# Naming hint for argument names -argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - # Regular expression matching correct argument names argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ -# Naming hint for attribute names -attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - # Regular expression matching correct attribute names attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ # Bad variable names which should always be refused, separated by a comma bad-names=foo,bar,baz,toto,tutu,tata -# Naming hint for class attribute names -class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ - # Regular expression matching correct class attribute names class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ -# Naming hint for class names -# class-name-hint=[A-Z_][a-zA-Z0-9]+$ -class-name-hint=[A-Z_][a-zA-Z0-9_]+$ - # Regular expression matching correct class names # class-rgx=[A-Z_][a-zA-Z0-9]+$ class-rgx=[A-Z_][a-zA-Z0-9_]+$ -# Naming hint for constant names -const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$ - # Regular expression matching correct constant names const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ @@ -293,9 +274,6 @@ const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ # ones are exempt. docstring-min-length=-1 -# Naming hint for function names -function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - # Regular expression matching correct function names function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ @@ -306,21 +284,12 @@ good-names=r,g,b,w,i,j,k,n,x,y,z,ex,ok,Run,_ # Include a hint for the correct naming format with invalid-name include-naming-hint=no -# Naming hint for inline iteration names -inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$ - # Regular expression matching correct inline iteration names inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ -# Naming hint for method names -method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - # Regular expression matching correct method names method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ -# Naming hint for module names -module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ - # Regular expression matching correct module names module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ @@ -336,9 +305,6 @@ no-docstring-rgx=^_ # to this list to register other decorators that produce valid properties. property-classes=abc.abstractproperty -# Naming hint for variable names -variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - # Regular expression matching correct variable names variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ @@ -430,4 +396,4 @@ min-public-methods=1 # Exceptions that will emit a warning when being caught. Defaults to # "Exception" -overgeneral-exceptions=Exception +overgeneral-exceptions=builtins.Exception diff --git a/circuitpython_hmac.py b/circuitpython_hmac.py index b86252b..b63325f 100644 --- a/circuitpython_hmac.py +++ b/circuitpython_hmac.py @@ -119,13 +119,11 @@ def __init__(self, key, msg=None, digestmod=None): @property def name(self): - """Return the name of this object - """ + """Return the name of this object""" return "hmac-" + self.inner.name def update(self, msg): - """Update this hashing object with the string msg. - """ + """Update this hashing object with the string msg.""" self.inner.update(msg) def copy(self): @@ -161,8 +159,7 @@ def digest(self): return hmac.digest() def hexdigest(self): - """Like digest(), but returns a string of hexadecimal digits instead. - """ + """Like digest(), but returns a string of hexadecimal digits instead.""" hmac = self._current() return hmac.hexdigest() diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..0a03f87 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: 2022 Alec Delaney, written for Adafruit Industries +# SPDX-FileCopyrightText: Copyright (c) 2023 Jim Bennett +# +# SPDX-License-Identifier: MIT + +[build-system] +requires = [ + "setuptools", + "wheel", + "setuptools-scm", +] + +[project] +name = "circuitpython-hmac" +description = "HMAC (Keyed-Hashing for Message Authentication) Python module. Implements the HMAC algorithm as described by RFC 2104." +version = "0.0.0+auto.0" +license = {text = "MIT"} +readme = "README.rst" +urls = {Homepage = "https://github.com/jimbobbennett/CircuitPython_HMAC"} +authors = [ + {name = "Jim Bennett", email = "jim.bennett@microsoft.com"} +] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "Topic :: Software Development :: Libraries", + "Topic :: System :: Hardware", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5", +] +keywords = [ + "adafruit", + "blinka", + "circuitpython", + "micropython", + "hmac", + "hashing", + "authentication", + "message", +] +dynamic = ["dependencies", "optional-dependencies"] + +[tool.setuptools] +py-modules = ["circuitpython_hmac"] + +[tool.setuptools.dynamic] +dependencies = {file = ["requirements.txt"]} +optional-dependencies = {optional = {file = ["optional_requirements.txt"]}} diff --git a/requirements.txt b/requirements.txt index 5c52968..fb5a148 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,7 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# SPDX-FileCopyrightText: Copyright (c) 2020 Jim Bennett +# +# SPDX-License-Identifier: MIT + Adafruit-Blinka Adafruit-CircuitPython-Hashlib diff --git a/setup.py b/setup.py deleted file mode 100644 index 7a8c489..0000000 --- a/setup.py +++ /dev/null @@ -1,53 +0,0 @@ -"""A setuptools based setup module. - -See: -https://packaging.python.org/en/latest/distributing.html -https://github.com/pypa/sampleproject -""" - -from setuptools import setup, find_packages - -# To use a consistent encoding -from codecs import open -from os import path - -here = path.abspath(path.dirname(__file__)) - -# Get the long description from the README file -with open(path.join(here, "README.rst"), encoding="utf-8") as f: - long_description = f.read() - -setup( - name="circuitpython-hmac", - use_scm_version=True, - setup_requires=["setuptools_scm"], - description="HMAC (Keyed-Hashing for Message Authentication) Python module. Implements the HMAC algorithm as described by RFC 2104.", - long_description=long_description, - long_description_content_type="text/x-rst", - # The project's main homepage. - url="https://github.com/jimbobbennett/CircuitPython_HMAC", - # Author details - author="Jim Bennett", - author_email="jim.bennett@microsoft.com", - install_requires=["Adafruit-Blinka", "adafruit-circuitpython-hashlib"], - # Choose your license - license="MIT", - # See https://pypi.python.org/pypi?%3Aaction=list_classifiers - classifiers=[ - "Development Status :: 3 - Alpha", - "Intended Audience :: Developers", - "Topic :: Software Development :: Libraries", - "Topic :: System :: Hardware", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - ], - # What does your project relate to? - keywords="adafruit blinka circuitpython micropython hmac hashing authentication message", - # You can just specify the packages manually here if your project is - # simple. Or you can use find_packages(). - # TODO: IF LIBRARY FILES ARE A PACKAGE FOLDER, - # CHANGE `py_modules=['...']` TO `packages=['...']` - py_modules=["circuitpython_hmac"], -) From eed8c1407f25dbd77a50c82e1264f8cb9781d75b Mon Sep 17 00:00:00 2001 From: Trent Warlaven Date: Tue, 1 Aug 2023 20:18:43 -0500 Subject: [PATCH 3/4] Updating python version, and actions version to newer ones --- .github/workflows/build.yml | 10 +++++----- .github/workflows/release.yml | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 261aff3..25adad0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,19 +24,19 @@ jobs: awk -F '\/' '{ print tolower($2) }' | tr '_' '-' ) - - name: Set up Python 3.6 - uses: actions/setup-python@v1 + - name: Set up Python 3.X + uses: actions/setup-python@v4 with: - python-version: 3.6 + python-version: 3.X - name: Versions run: | python3 --version - name: Checkout Current Repo - uses: actions/checkout@v1 + uses: actions/checkout@v3 with: submodules: true - name: Checkout tools repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: adafruit/actions-ci-circuitpython-libs path: actions-ci diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da14d06..aea6daa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,19 +20,19 @@ jobs: awk -F '\/' '{ print tolower($2) }' | tr '_' '-' ) - - name: Set up Python 3.6 - uses: actions/setup-python@v1 + - name: Set up Python 3.X + uses: actions/setup-python@v4 with: - python-version: 3.6 + python-version: 3.X - name: Versions run: | python3 --version - name: Checkout Current Repo - uses: actions/checkout@v1 + uses: actions/checkout@v3 with: submodules: true - name: Checkout tools repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: repository: adafruit/actions-ci-circuitpython-libs path: actions-ci @@ -57,14 +57,14 @@ jobs: upload-pypi: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Check For pyproject.toml id: need-pypi run: | echo pyproject-toml=$( find . -wholename './pyproject.toml' ) >> $GITHUB_OUTPUT - name: Set up Python if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: '3.x' - name: Install dependencies From 7fd853175be241450d1264b574888c911420ac5d Mon Sep 17 00:00:00 2001 From: Trent Warlaven Date: Tue, 1 Aug 2023 20:32:06 -0500 Subject: [PATCH 4/4] Fixing some deprecation issues that still existed in the CI/CD --- .github/workflows/build.yml | 4 ++-- .github/workflows/release.yml | 4 ++-- .gitignore | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25adad0..5fb06a5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,11 +19,11 @@ jobs: - name: Translate Repo Name For Build Tools filename_prefix id: repo-name run: | - echo ::set-output name=repo-name::$( + echo repo-name=$( echo ${{ github.repository }} | awk -F '\/' '{ print tolower($2) }' | tr '_' '-' - ) + ) >> $GITHUB_OUTPUT - name: Set up Python 3.X uses: actions/setup-python@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aea6daa..ace0adc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,11 +15,11 @@ jobs: - name: Translate Repo Name For Build Tools filename_prefix id: repo-name run: | - echo ::set-output name=repo-name::$( + echo repo-name=$( echo ${{ github.repository }} | awk -F '\/' '{ print tolower($2) }' | tr '_' '-' - ) + ) >> $GITHUB_OUTPUT - name: Set up Python 3.X uses: actions/setup-python@v4 with: diff --git a/.gitignore b/.gitignore index 180db33..c09caec 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ _build # Python env files .env .venv -venv/ # MacOS metadata files *.DS_Store