From 83f85edb98c9d76093d2d832e46dc91370ff251b Mon Sep 17 00:00:00 2001 From: David Hart Date: Tue, 29 Oct 2024 11:19:36 -0600 Subject: [PATCH] chore: synchronize changes between main and dev (#34) * release: Merge into main and create tag as v1.0.3 (#72) * build: update to create a standalone executable (#66) * ci: add executable to release workflow * ci: modify semantic-release pr requests to choose between release and chore * docs: update readme to show standalone version is available Signed-off-by: David Hart * ci: create reusable testing workflow Signed-off-by: David Hart --------- Signed-off-by: David Hart * refactor(cpp): abstract out a BaseModel class for API clarity (#71) * refactor: change the way logging is done, make output directories more explicit (not enforced yet) * refactor: modify logging output formats * refactor: move certain elements out of Model into a BaseModel * ci: Check output of a continuous release process * ci: modify semantic-release pr requests to choose between release and chore * refactor(version): move location of version number to avoid circular imports * refactor(test): fix test to match refactor of license and copyright text names * ci(test): Test using re-usable workflow for testing * ci(test): update test workflows to use same reusable workflow underneath * ci(test): create separate tests for each of the OSes * ci(testsuite): change titles of os-specific workflows for brevity * release: 1.0.3 Automatically generated by python-semantic-release --------- Signed-off-by: David Hart Co-authored-by: David Hart Co-authored-by: github-actions --- .github/workflows/codeql.yml | 11 +++-- .github/workflows/continuous-integration.yml | 2 +- .github/workflows/continuous-release.yml | 22 ++++----- .github/workflows/continuous-testing.yml | 2 +- .github/workflows/dependency-review.yml | 4 +- .github/workflows/gh-pages.yml | 4 +- .github/workflows/pytest-workflow.yml | 4 +- .github/workflows/release.yml | 8 +-- .github/workflows/scorecard.yml | 4 +- .github/workflows/semantic-release.yml | 2 +- .github/workflows/test-linux.yml | 4 +- .github/workflows/test-macOS_arm.yml | 4 +- .github/workflows/test-macOS_intel.yml | 4 +- .github/workflows/test-windows.yml | 4 +- CHANGELOG.md | 51 +++++++++++++++----- docs/requirements.txt | 2 +- pyproject.toml | 2 +- requirements-dev.txt | 2 +- requirements.txt | 2 +- setup.py | 2 +- src/python/sansmic/_version.py | 2 +- 21 files changed, 86 insertions(+), 56 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 8042027..fd5c569 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -9,6 +9,11 @@ name: "CodeQL Advanced" on: push: branches: [ "main" ] + paths: + - '.github/workflows/codeql.yml' + - '**/*.py' + - '**/*.cpp' + - '**/*.hpp' pull_request: branches: [ "main" ] schedule: @@ -61,11 +66,11 @@ jobs: uploads.github.com:443 - name: Checkout repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13 + uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} @@ -89,6 +94,6 @@ jobs: python3 setup.py build_ext - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13 + uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 91213b6..14becc5 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -22,7 +22,7 @@ jobs: matrix: version: ["3.9", "3.10", "3.11", "3.12"] os: [windows-latest, macOS-13, macOS-latest, ubuntu-latest] - uses: sandialabs/sansmic/.github/workflows/pytest-workflow.yml@951ebbd277e18b0a5b88a4e67535e262bc59f979 + uses: sandialabs/sansmic/.github/workflows/pytest-workflow.yml@7952e59342a8c8d1c8ad833121049bac58277167 with: version: ${{ matrix.version }} os: ${{ matrix.os }} diff --git a/.github/workflows/continuous-release.yml b/.github/workflows/continuous-release.yml index cf48f0e..2d70402 100644 --- a/.github/workflows/continuous-release.yml +++ b/.github/workflows/continuous-release.yml @@ -3,9 +3,7 @@ name: Check release on: - push: pull_request: - workflow_dispatch: permissions: contents: read @@ -17,7 +15,6 @@ jobs: permissions: id-token: write - contents: write pull-requests: write steps: @@ -27,7 +24,7 @@ jobs: egress-policy: audit - name: Setup | Checkout Repository at workflow sha - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 ref: ${{ github.sha }} @@ -39,10 +36,11 @@ jobs: - name: Action | Semantic Version id: check # Adjust tag with desired version if applicable. - uses: python-semantic-release/python-semantic-release@657118d28ae4a74d8a387bedf5db2bb7bac0cb33 # v9.11.1 + uses: python-semantic-release/python-semantic-release@c1bcfdbb994243ac7cf419365d5894d6bfb2950e # v9.12.0 with: + github_token: ${{ secrets.GITHUB_TOKEN }} build: false - changelog: false + changelog: true commit: false push: false tag: false @@ -51,9 +49,9 @@ jobs: - name: Action | Comment on PR with new version run: | echo "## The results of python-semantic-release are below." | tee -a "$GITHUB_STEP_SUMMARY" - echo "* released: ${{ github.check.outputs.released }}" | tee -a "$GITHUB_STEP_SUMMARY" - echo "* is_prerelease: ${{ github.check.outputs.is_prerelease }}" | tee -a "$GITHUB_STEP_SUMMARY" - echo "* version: ${{ github.check.outputs.version }}" | tee -a "$GITHUB_STEP_SUMMARY" - echo "* tag: ${{ github.check.outputs.tag }}" | tee -a "$GITHUB_STEP_SUMMARY" - # echo "The release number should be ${{ github.check.outputs.version }}" >> release.md - # gh pr comment ${{ github.event.pull_request.number }} --body "This PR should include a release: ${{ steps.check.outputs.released }}\n" + echo "* released: ${{ steps.check.outputs.released }}" | tee -a "$GITHUB_STEP_SUMMARY" + echo "* is_prerelease: ${{ steps.check.outputs.is_prerelease }}" | tee -a "$GITHUB_STEP_SUMMARY" + echo "* version: ${{ steps.check.outputs.version }}" | tee -a "$GITHUB_STEP_SUMMARY" + echo "* tag: ${{ steps.check.outputs.tag }}" | tee -a "$GITHUB_STEP_SUMMARY" + # echo "The release number should be ${{ steps.check.outputs.version }}" >> release.md + gh pr comment ${{ github.event.pull_request.number }} --body "This PR should include a release: ${{ steps.check.outputs.released }}\n" diff --git a/.github/workflows/continuous-testing.yml b/.github/workflows/continuous-testing.yml index 64ed108..9da3c5e 100644 --- a/.github/workflows/continuous-testing.yml +++ b/.github/workflows/continuous-testing.yml @@ -14,7 +14,7 @@ permissions: jobs: quick-test: - uses: sandialabs/sansmic/.github/workflows/pytest-workflow.yml@951ebbd277e18b0a5b88a4e67535e262bc59f979 + uses: sandialabs/sansmic/.github/workflows/pytest-workflow.yml@7952e59342a8c8d1c8ad833121049bac58277167 with: version: "3.12" os: ubuntu-latest diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 7b0990b..955b3b3 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -22,6 +22,6 @@ jobs: egress-policy: audit - name: 'Checkout Repository' - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: 'Dependency Review' - uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4 + uses: actions/dependency-review-action@4081bf99e2866ebe428fc0477b69eb4fcda7220a # v4.4.0 diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index c8a94ca..e802405 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -36,7 +36,7 @@ jobs: with: egress-policy: audit - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 @@ -47,7 +47,7 @@ jobs: git branch git remote -v - - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 + - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: '3.12' diff --git a/.github/workflows/pytest-workflow.yml b/.github/workflows/pytest-workflow.yml index f01c82b..5086476 100644 --- a/.github/workflows/pytest-workflow.yml +++ b/.github/workflows/pytest-workflow.yml @@ -42,10 +42,10 @@ jobs: uploader.codecov.io:443 - name: Check out the commit - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up Python - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: ${{ inputs.version }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4f1c084..5f4b021 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,12 +27,12 @@ jobs: steps: - name: Setup | Install python - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 + uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: '3.12' - name: Setup | Checkout Code - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Setup | Install Dependencies run: | @@ -77,7 +77,7 @@ jobs: egress-policy: audit - name: Setup | Checkout Code - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Action | Build Wheels uses: pypa/cibuildwheel@7940a4c0e76eb2030e473a5f864f291f63ee879b # v2.21.0 @@ -99,7 +99,7 @@ jobs: egress-policy: audit - name: Setup | Checkout Code - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 # Optional, use if you use setuptools_scm submodules: true # Optional, use if you have submodules diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 32ac39b..55251ad 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -50,7 +50,7 @@ jobs: www.bestpractices.dev:443 - name: "Checkout code" - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false @@ -86,6 +86,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard (optional). # Commenting out will disable upload of results to your repo's Code Scanning dashboard - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13 + uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0 with: sarif_file: results.sarif diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index ac882c6..53e3bbe 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -26,7 +26,7 @@ jobs: egress-policy: audit - name: Setup | Checkout Repository at workflow sha - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 ref: ${{ github.sha }} diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index b8a325d..5190f1d 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -1,4 +1,4 @@ -name: ubuntu // CPython 3.9 — 3.12 +name: '🐧-🐍3.9--3.12' on: push: @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: version: ["3.9", "3.10", "3.11", "3.12"] - uses: sandialabs/sansmic/.github/workflows/pytest-workflow.yml@951ebbd277e18b0a5b88a4e67535e262bc59f979 + uses: sandialabs/sansmic/.github/workflows/pytest-workflow.yml@7952e59342a8c8d1c8ad833121049bac58277167 with: version: ${{ matrix.version }} os: ubuntu-latest diff --git a/.github/workflows/test-macOS_arm.yml b/.github/workflows/test-macOS_arm.yml index 7a0f2ba..acd5f31 100644 --- a/.github/workflows/test-macOS_arm.yml +++ b/.github/workflows/test-macOS_arm.yml @@ -1,4 +1,4 @@ -name: macOS-14 // CPython 3.9 — 3.12 +name: '🍎-🐍3.9--3.12' on: push: @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: version: ["3.9", "3.10", "3.11", "3.12"] - uses: sandialabs/sansmic/.github/workflows/pytest-workflow.yml@951ebbd277e18b0a5b88a4e67535e262bc59f979 + uses: sandialabs/sansmic/.github/workflows/pytest-workflow.yml@7952e59342a8c8d1c8ad833121049bac58277167 with: version: ${{ matrix.version }} os: macOS-latest diff --git a/.github/workflows/test-macOS_intel.yml b/.github/workflows/test-macOS_intel.yml index c78fd2d..43a111a 100644 --- a/.github/workflows/test-macOS_intel.yml +++ b/.github/workflows/test-macOS_intel.yml @@ -1,4 +1,4 @@ -name: macOS-13 // CPython 3.9 — 3.12 +name: '🍏-🐍3.9--3.12' on: push: @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: version: ["3.9", "3.10", "3.11", "3.12"] - uses: sandialabs/sansmic/.github/workflows/pytest-workflow.yml@951ebbd277e18b0a5b88a4e67535e262bc59f979 + uses: sandialabs/sansmic/.github/workflows/pytest-workflow.yml@7952e59342a8c8d1c8ad833121049bac58277167 with: version: ${{ matrix.version }} os: macOS-13 diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 5c1634e..3cba306 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -1,4 +1,4 @@ -name: windows // CPython 3.9 — 3.12 +name: '🏢-🐍3.9--3.12' on: push: @@ -16,7 +16,7 @@ jobs: fail-fast: false matrix: version: ["3.9", "3.10", "3.11", "3.12"] - uses: sandialabs/sansmic/.github/workflows/pytest-workflow.yml@951ebbd277e18b0a5b88a4e67535e262bc59f979 + uses: sandialabs/sansmic/.github/workflows/pytest-workflow.yml@7952e59342a8c8d1c8ad833121049bac58277167 with: version: ${{ matrix.version }} os: windows-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 840e2a4..6e0ea0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,19 +1,54 @@ # CHANGELOG -## v1.0.2 (2024-10-17) +## v1.0.3 (2024-10-23) ### Refactoring -* refactor: logging capabilities and configuration (#58) +* refactor(cpp): abstract out a BaseModel class for API clarity (#71) -* refactor: convert to click from argparse +* refactor: change the way logging is done, make output directories more explicit (not enforced yet) + +* refactor: modify logging output formats + +* refactor: move certain elements out of Model into a BaseModel + +* ci: Check output of a continuous release process + +* ci: modify semantic-release pr requests to choose between release and chore + +* refactor(version): move location of version number to avoid circular imports + +* refactor(test): fix test to match refactor of license and copyright text names + +* ci(test): Test using re-usable workflow for testing + +* ci(test): update test workflows to use same reusable workflow underneath + +* ci(test): create separate tests for each of the OSes + +* ci(testsuite): change titles of os-specific workflows for brevity ([`926fa56`](https://github.com/sandialabs/sansmic/commit/926fa56840545cc103ffd9671f4557b1e0a19d98)) + +### Unknown + +* Merge branch 'main' into staging + +Signed-off-by: David Hart ([`9416c06`](https://github.com/sandialabs/sansmic/commit/9416c0659d0e12cc463abc669ef8f6a1db07acbc)) -* refactor: change the way logging is done, make output directories more explicit (not enforced yet) ([`4feff68`](https://github.com/sandialabs/sansmic/commit/4feff688fdf1773331dd9864f3fe13a6bf17395c)) + +## v1.0.2 (2024-10-17) ## v1.0.1 (2024-10-12) +### Bug Fixes + +* fix: change workflows for proper execution ([`c4ea2f4`](https://github.com/sandialabs/sansmic/commit/c4ea2f4464cbcbdf8d16a94e392fca404348e48e)) + +* fix: semantic release workflow syntax errors ([`9f7d215`](https://github.com/sandialabs/sansmic/commit/9f7d215439feb7348068bcae8748452b3737b2d5)) + +* fix: test semantic release and conventional commits ([`54423b1`](https://github.com/sandialabs/sansmic/commit/54423b194057e493def5456b290a3c4ec2f62098)) + ### Documentation * docs: build script failed to check out ([`a39a03f`](https://github.com/sandialabs/sansmic/commit/a39a03faa171c1fa36b955c68db1ebfc17ad7813)) @@ -60,14 +95,6 @@ Update the README on github. Signed-off-by: David Hart ([`11a5215`](https://github.com/sandialabs/sansmic/commit/11a521545d994ea8777ed654fd7c1f40e287e683)) -### Fixes - -* fix: change workflows for proper execution ([`c4ea2f4`](https://github.com/sandialabs/sansmic/commit/c4ea2f4464cbcbdf8d16a94e392fca404348e48e)) - -* fix: semantic release workflow syntax errors ([`9f7d215`](https://github.com/sandialabs/sansmic/commit/9f7d215439feb7348068bcae8748452b3737b2d5)) - -* fix: test semantic release and conventional commits ([`54423b1`](https://github.com/sandialabs/sansmic/commit/54423b194057e493def5456b290a3c4ec2f62098)) - ### Refactoring * refactor: Convert command-line interface to click instead of argparse (#54) diff --git a/docs/requirements.txt b/docs/requirements.txt index 73da655..170a34a 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,5 @@ Sphinx==8.1.3 -pydata-sphinx-theme==0.15.4 +pydata-sphinx-theme==0.16.0 sphinx_design==0.6.1 sphinxcontrib-bibtex==2.6.3 breathe==4.35.0 diff --git a/pyproject.toml b/pyproject.toml index b44592c..8f321f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "sansmic" description = "Sandia solution mining modeling software" readme = "README.md" requires-python = ">=3.9" -version = "1.0.2" +version = "1.0.3" authors = [ { name = "National Technology & Engineering Solutions of Sandia, LLC (NTESS)" }, { name = "SANSMIC Authors (see AUTHORS.md)" }, diff --git a/requirements-dev.txt b/requirements-dev.txt index 17aae7b..7349b23 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,7 +6,7 @@ pytest-cov==5.0.0 black==24.10.0 nbmake==1.5.4 matplotlib==3.9.2 -python-semantic-release==9.11.0 +python-semantic-release==9.12.0 h5py==3.12.1 openpyxl==3.1.5 tabulate==0.9.0 diff --git a/requirements.txt b/requirements.txt index 04c06da..1e7f2d4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ numpy==2.1.2 pandas==2.2.3 pybind11==2.13.6 -setuptools==75.1.0 +setuptools==75.2.0 click==8.1.7 diff --git a/setup.py b/setup.py index 1e3359c..0a0e71b 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from setuptools import find_packages, setup from pybind11.setup_helpers import Pybind11Extension, build_ext -__version__ = "1.0.2" +__version__ = "1.0.3" here = path.abspath(path.dirname(__file__)) diff --git a/src/python/sansmic/_version.py b/src/python/sansmic/_version.py index 2c9fd83..1a5116f 100644 --- a/src/python/sansmic/_version.py +++ b/src/python/sansmic/_version.py @@ -6,7 +6,7 @@ # # SPDX-License-Identifier: BSD-3-Clause. -__version__ = "1.0.2" +__version__ = "1.0.3" copyright = f"""Copyright (c) 2024 National Technology and Engineering Solutions of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.