From ad4d4fd6280131a9f85d76c3e99fd3d16224bede Mon Sep 17 00:00:00 2001 From: Amanda Richardson Date: Thu, 25 Apr 2024 16:00:51 -0700 Subject: [PATCH 1/4] init commit --- .github/workflows/changelog.yml | 88 +++++++------- .github/workflows/release.yml | 155 +++++++++++++------------ .github/workflows/run_tests.yml | 196 ++++++++++++++++---------------- 3 files changed, 226 insertions(+), 213 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 220e9c2..361da27 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -1,49 +1,49 @@ -# -# BSD 2-Clause License -# -# Copyright (c) 2021-2024, Hewlett Packard Enterprise -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# +# # +# # BSD 2-Clause License +# # +# # Copyright (c) 2021-2024, Hewlett Packard Enterprise +# # All rights reserved. +# # +# # Redistribution and use in source and binary forms, with or without +# # modification, are permitted provided that the following conditions are met: +# # +# # 1. Redistributions of source code must retain the above copyright notice, this +# # list of conditions and the following disclaimer. +# # +# # 2. Redistributions in binary form must reproduce the above copyright notice, +# # this list of conditions and the following disclaimer in the documentation +# # and/or other materials provided with the distribution. +# # +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# # -name: enforce_changelog +# name: enforce_changelog -on: - pull_request: - push: - branches: - - develop +# on: +# pull_request: +# push: +# branches: +# - develop -jobs: - changelog: - name: check_changelog - runs-on: ubuntu-latest +# jobs: +# changelog: +# name: check_changelog +# runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 +# steps: +# - uses: actions/checkout@v4 - - name: Changelog Enforcer - uses: dangoslen/changelog-enforcer@v3.6.0 - with: - changeLogPath: './doc/changelog.rst' - missingUpdateErrorMessage: 'changelog.rst has not been updated' \ No newline at end of file +# - name: Changelog Enforcer +# uses: dangoslen/changelog-enforcer@v3.6.0 +# with: +# changeLogPath: './doc/changelog.rst' +# missingUpdateErrorMessage: 'changelog.rst has not been updated' \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fc14050..97fa5a4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,8 +29,10 @@ name: deploy-release on: - release: - types: [published] + pull_request: + push: + branches: + - develop env: @@ -47,76 +49,87 @@ env: jobs: - build_wheels: - name: Build wheels on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-20.04, macos-12] - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - - uses: actions/setup-python@v2 - name: Install Python - with: - python-version: '3.9' - - - name: Install build - run: | - python -m pip install --upgrade pip - python -m pip install build>=1.0.3 - - - name: Build wheels - run: | - python -m build -o wheelhouse -w - env: - CIBW_ENVIRONMENT_MACOS: PATH="$(brew --prefix)/opt/make/libexec/gnubin:$PATH" - MACOSX_DEPLOYMENT_TARGET: "10.09" - - - uses: actions/upload-artifact@v2 - with: - path: ./wheelhouse/*.whl - - - build_sdist: - name: Build source distribution + createPullRequest: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - uses: actions/setup-python@v2 - name: Install Python - with: - python-version: '3.9' + - name: Checkout code + uses: actions/checkout@v2 - - name: Install build + - name: Create pull request run: | - python -m pip install --upgrade pip - python -m pip install build>=1.0.3 - - - name: Build dist - run: | - python -m build -o dist - - - uses: actions/upload-artifact@v2 - with: - path: dist/*.tar.gz - - - upload_pypi: - needs: [build_wheels, build_sdist] - runs-on: ubuntu-latest - steps: - - uses: actions/download-artifact@v2 - with: - name: artifact - path: dist - - - uses: pypa/gh-action-pypi-publish@release/v1 - with: - # user: __token__ - password: ${{ secrets.PYPI }} - #repository_url: https://test.pypi.org/legacy/ + gh pr create -B develop -H master --title 'Merge master into develop' --body 'This PR brings develop up to date with master for release.' + env: + GH_TOKEN: ${{ github.token }} + # build_wheels: + # name: Build wheels on ${{ matrix.os }} + # runs-on: ${{ matrix.os }} + # strategy: + # fail-fast: false + # matrix: + # os: [ubuntu-20.04, macos-12] + + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-python@v2 + + # - uses: actions/setup-python@v2 + # name: Install Python + # with: + # python-version: '3.9' + + # - name: Install build + # run: | + # python -m pip install --upgrade pip + # python -m pip install build>=1.0.3 + + # - name: Build wheels + # run: | + # python -m build -o wheelhouse -w + # env: + # CIBW_ENVIRONMENT_MACOS: PATH="$(brew --prefix)/opt/make/libexec/gnubin:$PATH" + # MACOSX_DEPLOYMENT_TARGET: "10.09" + + # - uses: actions/upload-artifact@v2 + # with: + # path: ./wheelhouse/*.whl + + + # build_sdist: + # name: Build source distribution + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v2 + + # - uses: actions/setup-python@v2 + # name: Install Python + # with: + # python-version: '3.9' + + # - name: Install build + # run: | + # python -m pip install --upgrade pip + # python -m pip install build>=1.0.3 + + # - name: Build dist + # run: | + # python -m build -o dist + + # - uses: actions/upload-artifact@v2 + # with: + # path: dist/*.tar.gz + + + # upload_pypi: + # needs: [build_wheels, build_sdist] + # runs-on: ubuntu-latest + # steps: + # - uses: actions/download-artifact@v2 + # with: + # name: artifact + # path: dist + + # - uses: pypa/gh-action-pypi-publish@release/v1 + # with: + # # user: __token__ + # password: ${{ secrets.PYPI }} + # #repository_url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 29d5872..1472f34 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -1,111 +1,111 @@ -# -# BSD 2-Clause License -# -# Copyright (c) 2021-2024, Hewlett Packard Enterprise -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# +# # +# # BSD 2-Clause License +# # +# # Copyright (c) 2021-2024, Hewlett Packard Enterprise +# # All rights reserved. +# # +# # Redistribution and use in source and binary forms, with or without +# # modification, are permitted provided that the following conditions are met: +# # +# # 1. Redistributions of source code must retain the above copyright notice, this +# # list of conditions and the following disclaimer. +# # +# # 2. Redistributions in binary form must reproduce the above copyright notice, +# # this list of conditions and the following disclaimer in the documentation +# # and/or other materials provided with the distribution. +# # +# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# # -name: run-tests +# name: run-tests -on: - pull_request: - push: - branches: - - develop - - dash_519 +# on: +# pull_request: +# push: +# branches: +# - develop +# - dash_519 -env: - HOMEBREW_NO_ANALYTICS: "ON" # Make Homebrew installation a little quicker - HOMEBREW_NO_AUTO_UPDATE: "ON" - HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: "ON" - HOMEBREW_NO_GITHUB_API: "ON" - HOMEBREW_NO_INSTALL_CLEANUP: "ON" - DEBIAN_FRONTEND: "noninteractive" # Disable interactive apt install sessions +# env: +# HOMEBREW_NO_ANALYTICS: "ON" # Make Homebrew installation a little quicker +# HOMEBREW_NO_AUTO_UPDATE: "ON" +# HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: "ON" +# HOMEBREW_NO_GITHUB_API: "ON" +# HOMEBREW_NO_INSTALL_CLEANUP: "ON" +# DEBIAN_FRONTEND: "noninteractive" # Disable interactive apt install sessions -jobs: - run_tests: - name: Run tests with ${{ matrix.os }}, Python ${{ matrix.py_v}} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-12, ubuntu-20.04] # Operating systems - compiler: [8] # GNU compiler version - py_v: ['3.9', '3.10', '3.11'] # Python versions +# jobs: +# run_tests: +# name: Run tests with ${{ matrix.os }}, Python ${{ matrix.py_v}} +# runs-on: ${{ matrix.os }} +# strategy: +# fail-fast: false +# matrix: +# os: [macos-12, ubuntu-20.04] # Operating systems +# compiler: [8] # GNU compiler version +# py_v: ['3.9', '3.10', '3.11'] # Python versions - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.py_v }} +# steps: +# - uses: actions/checkout@v2 +# - uses: actions/setup-python@v2 +# with: +# python-version: ${{ matrix.py_v }} - - name: Install build-essentials for Ubuntu - if: contains( matrix.os, 'ubuntu' ) - run: | - sudo add-apt-repository ppa:ubuntu-toolchain-r/test - sudo apt-get update - sudo apt-get install -y build-essential - sudo apt-get install -y wget +# - name: Install build-essentials for Ubuntu +# if: contains( matrix.os, 'ubuntu' ) +# run: | +# sudo add-apt-repository ppa:ubuntu-toolchain-r/test +# sudo apt-get update +# sudo apt-get install -y build-essential +# sudo apt-get install -y wget - - name: Install GNU make for MacOS and set GITHUB_PATH - if: contains( matrix.os, 'macos' ) - run: | - brew install make || true - echo "$(brew --prefix)/opt/make/libexec/gnubin" >> $GITHUB_PATH +# - name: Install GNU make for MacOS and set GITHUB_PATH +# if: contains( matrix.os, 'macos' ) +# run: | +# brew install make || true +# echo "$(brew --prefix)/opt/make/libexec/gnubin" >> $GITHUB_PATH - - name: Install SmartDashboard - run: | - python -m pip install --upgrade pip - python -m pip install .[dev,mypy] +# - name: Install SmartDashboard +# run: | +# python -m pip install --upgrade pip +# python -m pip install .[dev,mypy] - - name: Run Pylint - run: make check-lint +# - name: Run Pylint +# run: make check-lint - - name: Run mypy - run: | - make check-mypy +# - name: Run mypy +# run: | +# make check-mypy - - name: Run Pytest - run: | - pytest -s --import-mode=prepend -o log_cli=true --cov=smartdashboard --cov-report=xml --cov-config=./tests/test_configs/cov/local_cov.cfg ./tests/ +# - name: Run Pytest +# run: | +# pytest -s --import-mode=prepend -o log_cli=true --cov=smartdashboard --cov-report=xml --cov-config=./tests/test_configs/cov/local_cov.cfg ./tests/ - # Upload artifacts on failure, ignoring binary files - - name: Upload Artifact - if: failure() - uses: actions/upload-artifact@v3 - with: - name: test_artifact - path: | - tests/test_output - !**/*.so - !**/*.pb - !**/*.pt - !**/core - retention-days: 5 +# # Upload artifacts on failure, ignoring binary files +# - name: Upload Artifact +# if: failure() +# uses: actions/upload-artifact@v3 +# with: +# name: test_artifact +# path: | +# tests/test_output +# !**/*.so +# !**/*.pb +# !**/*.pt +# !**/core +# retention-days: 5 - # - name: Upload Pytest coverage to Codecov - # uses: codecov/codecov-action@v2 - # with: - # fail_ci_if_error: true - # files: ./coverage.xml +# # - name: Upload Pytest coverage to Codecov +# # uses: codecov/codecov-action@v2 +# # with: +# # fail_ci_if_error: true +# # files: ./coverage.xml From 09b166eab2283048419614546144cfbaa5fe72dc Mon Sep 17 00:00:00 2001 From: Amanda Richardson Date: Thu, 25 Apr 2024 16:07:14 -0700 Subject: [PATCH 2/4] pushing for PR --- .github/workflows/changelog.yml | 88 +++++++------- .github/workflows/release.yml | 154 ++++++++++++------------- .github/workflows/run_tests.yml | 196 ++++++++++++++++---------------- doc/changelog.rst | 2 + 4 files changed, 221 insertions(+), 219 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 361da27..220e9c2 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -1,49 +1,49 @@ -# # -# # BSD 2-Clause License -# # -# # Copyright (c) 2021-2024, Hewlett Packard Enterprise -# # All rights reserved. -# # -# # Redistribution and use in source and binary forms, with or without -# # modification, are permitted provided that the following conditions are met: -# # -# # 1. Redistributions of source code must retain the above copyright notice, this -# # list of conditions and the following disclaimer. -# # -# # 2. Redistributions in binary form must reproduce the above copyright notice, -# # this list of conditions and the following disclaimer in the documentation -# # and/or other materials provided with the distribution. -# # -# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# # +# +# BSD 2-Clause License +# +# Copyright (c) 2021-2024, Hewlett Packard Enterprise +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# -# name: enforce_changelog +name: enforce_changelog -# on: -# pull_request: -# push: -# branches: -# - develop +on: + pull_request: + push: + branches: + - develop -# jobs: -# changelog: -# name: check_changelog -# runs-on: ubuntu-latest +jobs: + changelog: + name: check_changelog + runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 + steps: + - uses: actions/checkout@v4 -# - name: Changelog Enforcer -# uses: dangoslen/changelog-enforcer@v3.6.0 -# with: -# changeLogPath: './doc/changelog.rst' -# missingUpdateErrorMessage: 'changelog.rst has not been updated' \ No newline at end of file + - name: Changelog Enforcer + uses: dangoslen/changelog-enforcer@v3.6.0 + with: + changeLogPath: './doc/changelog.rst' + missingUpdateErrorMessage: 'changelog.rst has not been updated' \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 97fa5a4..434cc2d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,10 +29,8 @@ name: deploy-release on: - pull_request: - push: - branches: - - develop + release: + types: [published] env: @@ -49,6 +47,81 @@ env: jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-20.04, macos-12] + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + + - uses: actions/setup-python@v2 + name: Install Python + with: + python-version: '3.8' + + - name: Install build + run: | + python -m pip install --upgrade pip + python -m pip install build>=1.0.3 + + - name: Build wheels + run: | + python -m build -o wheelhouse -w + env: + CIBW_ENVIRONMENT_MACOS: PATH="$(brew --prefix)/opt/make/libexec/gnubin:$PATH" + MACOSX_DEPLOYMENT_TARGET: "10.09" + + - uses: actions/upload-artifact@v2 + with: + path: ./wheelhouse/*.whl + + + build_sdist: + name: Build source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + name: Install Python + with: + python-version: '3.8' + + - name: Install build + run: | + python -m pip install --upgrade pip + python -m pip install build>=1.0.3 + + - name: Build dist + run: | + python -m build -o dist + + - uses: actions/upload-artifact@v2 + with: + path: dist/*.tar.gz + + + upload_pypi: + needs: [build_wheels, build_sdist] + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v2 + with: + name: artifact + path: dist + + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + # user: __token__ + password: ${{ secrets.PYPI }} + #repository_url: https://test.pypi.org/legacy/ + + createPullRequest: runs-on: ubuntu-latest steps: @@ -60,76 +133,3 @@ jobs: gh pr create -B develop -H master --title 'Merge master into develop' --body 'This PR brings develop up to date with master for release.' env: GH_TOKEN: ${{ github.token }} - # build_wheels: - # name: Build wheels on ${{ matrix.os }} - # runs-on: ${{ matrix.os }} - # strategy: - # fail-fast: false - # matrix: - # os: [ubuntu-20.04, macos-12] - - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v2 - - # - uses: actions/setup-python@v2 - # name: Install Python - # with: - # python-version: '3.9' - - # - name: Install build - # run: | - # python -m pip install --upgrade pip - # python -m pip install build>=1.0.3 - - # - name: Build wheels - # run: | - # python -m build -o wheelhouse -w - # env: - # CIBW_ENVIRONMENT_MACOS: PATH="$(brew --prefix)/opt/make/libexec/gnubin:$PATH" - # MACOSX_DEPLOYMENT_TARGET: "10.09" - - # - uses: actions/upload-artifact@v2 - # with: - # path: ./wheelhouse/*.whl - - - # build_sdist: - # name: Build source distribution - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v2 - - # - uses: actions/setup-python@v2 - # name: Install Python - # with: - # python-version: '3.9' - - # - name: Install build - # run: | - # python -m pip install --upgrade pip - # python -m pip install build>=1.0.3 - - # - name: Build dist - # run: | - # python -m build -o dist - - # - uses: actions/upload-artifact@v2 - # with: - # path: dist/*.tar.gz - - - # upload_pypi: - # needs: [build_wheels, build_sdist] - # runs-on: ubuntu-latest - # steps: - # - uses: actions/download-artifact@v2 - # with: - # name: artifact - # path: dist - - # - uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # # user: __token__ - # password: ${{ secrets.PYPI }} - # #repository_url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 1472f34..583183c 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -1,111 +1,111 @@ -# # -# # BSD 2-Clause License -# # -# # Copyright (c) 2021-2024, Hewlett Packard Enterprise -# # All rights reserved. -# # -# # Redistribution and use in source and binary forms, with or without -# # modification, are permitted provided that the following conditions are met: -# # -# # 1. Redistributions of source code must retain the above copyright notice, this -# # list of conditions and the following disclaimer. -# # -# # 2. Redistributions in binary form must reproduce the above copyright notice, -# # this list of conditions and the following disclaimer in the documentation -# # and/or other materials provided with the distribution. -# # -# # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# # +# +# BSD 2-Clause License +# +# Copyright (c) 2021-2024, Hewlett Packard Enterprise +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# -# name: run-tests +name: run-tests -# on: -# pull_request: -# push: -# branches: -# - develop -# - dash_519 +on: + pull_request: + push: + branches: + - develop + - dash_519 -# env: -# HOMEBREW_NO_ANALYTICS: "ON" # Make Homebrew installation a little quicker -# HOMEBREW_NO_AUTO_UPDATE: "ON" -# HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: "ON" -# HOMEBREW_NO_GITHUB_API: "ON" -# HOMEBREW_NO_INSTALL_CLEANUP: "ON" -# DEBIAN_FRONTEND: "noninteractive" # Disable interactive apt install sessions +env: + HOMEBREW_NO_ANALYTICS: "ON" # Make Homebrew installation a little quicker + HOMEBREW_NO_AUTO_UPDATE: "ON" + HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: "ON" + HOMEBREW_NO_GITHUB_API: "ON" + HOMEBREW_NO_INSTALL_CLEANUP: "ON" + DEBIAN_FRONTEND: "noninteractive" # Disable interactive apt install sessions -# jobs: -# run_tests: -# name: Run tests with ${{ matrix.os }}, Python ${{ matrix.py_v}} -# runs-on: ${{ matrix.os }} -# strategy: -# fail-fast: false -# matrix: -# os: [macos-12, ubuntu-20.04] # Operating systems -# compiler: [8] # GNU compiler version -# py_v: ['3.9', '3.10', '3.11'] # Python versions +jobs: + run_tests: + name: Run tests with ${{ matrix.os }}, Python ${{ matrix.py_v}} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-12, ubuntu-20.04] # Operating systems + compiler: [8] # GNU compiler version + py_v: [3.8, 3.9, '3.10'] # Python versions -# steps: -# - uses: actions/checkout@v2 -# - uses: actions/setup-python@v2 -# with: -# python-version: ${{ matrix.py_v }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.py_v }} -# - name: Install build-essentials for Ubuntu -# if: contains( matrix.os, 'ubuntu' ) -# run: | -# sudo add-apt-repository ppa:ubuntu-toolchain-r/test -# sudo apt-get update -# sudo apt-get install -y build-essential -# sudo apt-get install -y wget + - name: Install build-essentials for Ubuntu + if: contains( matrix.os, 'ubuntu' ) + run: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + sudo apt-get update + sudo apt-get install -y build-essential + sudo apt-get install -y wget -# - name: Install GNU make for MacOS and set GITHUB_PATH -# if: contains( matrix.os, 'macos' ) -# run: | -# brew install make || true -# echo "$(brew --prefix)/opt/make/libexec/gnubin" >> $GITHUB_PATH + - name: Install GNU make for MacOS and set GITHUB_PATH + if: contains( matrix.os, 'macos' ) + run: | + brew install make || true + echo "$(brew --prefix)/opt/make/libexec/gnubin" >> $GITHUB_PATH -# - name: Install SmartDashboard -# run: | -# python -m pip install --upgrade pip -# python -m pip install .[dev,mypy] + - name: Install SmartDashboard + run: | + python -m pip install --upgrade pip + python -m pip install .[dev,mypy] -# - name: Run Pylint -# run: make check-lint + - name: Run Pylint + run: make check-lint -# - name: Run mypy -# run: | -# make check-mypy + - name: Run mypy + run: | + make check-mypy -# - name: Run Pytest -# run: | -# pytest -s --import-mode=prepend -o log_cli=true --cov=smartdashboard --cov-report=xml --cov-config=./tests/test_configs/cov/local_cov.cfg ./tests/ + - name: Run Pytest + run: | + pytest -s --import-mode=prepend -o log_cli=true --cov=smartdashboard --cov-report=xml --cov-config=./tests/test_configs/cov/local_cov.cfg ./tests/ -# # Upload artifacts on failure, ignoring binary files -# - name: Upload Artifact -# if: failure() -# uses: actions/upload-artifact@v3 -# with: -# name: test_artifact -# path: | -# tests/test_output -# !**/*.so -# !**/*.pb -# !**/*.pt -# !**/core -# retention-days: 5 + # Upload artifacts on failure, ignoring binary files + - name: Upload Artifact + if: failure() + uses: actions/upload-artifact@v3 + with: + name: test_artifact + path: | + tests/test_output + !**/*.so + !**/*.pb + !**/*.pt + !**/core + retention-days: 5 -# # - name: Upload Pytest coverage to Codecov -# # uses: codecov/codecov-action@v2 -# # with: -# # fail_ci_if_error: true -# # files: ./coverage.xml + # - name: Upload Pytest coverage to Codecov + # uses: codecov/codecov-action@v2 + # with: + # fail_ci_if_error: true + # files: ./coverage.xml diff --git a/doc/changelog.rst b/doc/changelog.rst index 0670931..d4634e1 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -6,6 +6,8 @@ Development branch Description + +- Auto-post release PR to develop from master - Decrease the pinned version of Pydantic (SmartDashboard-PR51_) - Bump version to 0.0.4, exclude streamlit version 1.31.X (SmartDashboard-PR50_) - Drop Python 3.8 support, add 3.11 support. (SmartDashboard-PR49_) From eb894d391a74c1f5be3861c2cd19eb81224b0ae6 Mon Sep 17 00:00:00 2001 From: Amanda Richardson Date: Thu, 25 Apr 2024 16:08:40 -0700 Subject: [PATCH 3/4] updating changelog --- doc/changelog.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index d4634e1..4cccac4 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -7,8 +7,8 @@ Development branch Description -- Auto-post release PR to develop from master -- Decrease the pinned version of Pydantic (SmartDashboard-PR51_) +- Auto-post release PR to develop from master (SmartDashboard-PR53_) +- Decrease the pinned version of Pydantic (SmartDashboard-PR51_) - Bump version to 0.0.4, exclude streamlit version 1.31.X (SmartDashboard-PR50_) - Drop Python 3.8 support, add 3.11 support. (SmartDashboard-PR49_) - Add Database Telemetry page. (SmartDashboard-PR38_) @@ -16,6 +16,7 @@ Description on pull requests into develop. (SmartDashboard-PR47_) - Add manifest file tracking. (SmartDashboard-PR46_) +.. _SmartDashboard-PR53: https://github.com/CrayLabs/SmartDashboard/pull/53 .. _SmartDashboard-PR51: https://github.com/CrayLabs/SmartDashboard/pull/51 .. _SmartDashboard-PR50: https://github.com/CrayLabs/SmartDashboard/pull/50 .. _SmartDashboard-PR49: https://github.com/CrayLabs/SmartDashboard/pull/49 From d01e625ae01822c9dd95733e60056da04608f53a Mon Sep 17 00:00:00 2001 From: Amanda Richardson Date: Thu, 25 Apr 2024 16:11:31 -0700 Subject: [PATCH 4/4] bringing up to date --- .github/workflows/release.yml | 4 ++-- .github/workflows/run_tests.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 434cc2d..08d3d06 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,7 +62,7 @@ jobs: - uses: actions/setup-python@v2 name: Install Python with: - python-version: '3.8' + python-version: '3.9' - name: Install build run: | @@ -90,7 +90,7 @@ jobs: - uses: actions/setup-python@v2 name: Install Python with: - python-version: '3.8' + python-version: '3.9' - name: Install build run: | diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 583183c..29d5872 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -52,7 +52,7 @@ jobs: matrix: os: [macos-12, ubuntu-20.04] # Operating systems compiler: [8] # GNU compiler version - py_v: [3.8, 3.9, '3.10'] # Python versions + py_v: ['3.9', '3.10', '3.11'] # Python versions steps: - uses: actions/checkout@v2