From 2c19a794a066af996de0532d56b0851f60cfe620 Mon Sep 17 00:00:00 2001 From: DongGeon Lee Date: Sat, 23 Dec 2023 18:36:23 +0900 Subject: [PATCH 01/15] Add GH action CI yaml --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..aee7234f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Stock Indicators for Python + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-latest, ubuntu-latest, macos-latest] + python-version: ["3.8", "3.12"] + dotnet-version: ["6.0.x", "8.0.x"] + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: ${{ matrix.dotnet-version }} + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + pip install -r requirements.txt + working-directory: ${{ github.workspace }} + + - name: Run Tests + run: | + pip install -r requirements-test.txt + pytest -vr A tests --junitxml=${{ github.workspace }}/tests/test-results.xml --cov=${{ github.workspace }}/stock_indicators --cov-report xml:${{ github.workspace }}/tests/coverage.xml + working-directory: ${{ github.workspace }} From a0473ff4feda51c15704bc3acbc241bef4b2f5ca Mon Sep 17 00:00:00 2001 From: DongGeon Lee Date: Sat, 23 Dec 2023 18:41:27 +0900 Subject: [PATCH 02/15] Remove old ci config --- .github/build.main.yml | 158 ----------------------------------------- 1 file changed, 158 deletions(-) delete mode 100644 .github/build.main.yml diff --git a/.github/build.main.yml b/.github/build.main.yml deleted file mode 100644 index a79205ed..00000000 --- a/.github/build.main.yml +++ /dev/null @@ -1,158 +0,0 @@ -# MAIN BUILD -trigger: - - main - -pr: - - main - -jobs: - - job: Build - variables: - ImageName: "ubuntu-latest" - PythonVersion: "3.8" - - pool: - name: Azure Pipelines - vmImage: "$(imageName)" - - steps: - - task: UseDotNet@2 - displayName: Use .NET 6.0 - inputs: - packageType: 'sdk' - version: '6.0.x' - - - task: UsePythonVersion@0 - inputs: - versionSpec: "$(PythonVersion)" - - - task: gitversion/setup@0 - displayName: Use GitVersion - inputs: - versionSpec: '5.x' - - - task: gitversion/execute@0 - displayName: Get GitVersion - inputs: - useConfigFile: true - configFilePath: 'gitversion.yml' - - - powershell: | - echo "Current version: $(GitVersion.SemVer)" - displayName: Shows GitVersion - - - script: | - python -m pip install --upgrade pip "setuptools<66" wheel build - displayName: "Install dependencies" - - - task: CmdLine@2 - displayName: "Build" - inputs: - script: "python setup.py sdist bdist_wheel semver:$(GitVersion.SemVer)" - workingDirectory: $(Build.SourcesDirectory) - #condition: eq(variables['Build.SourceBranch'], 'refs/heads/main') - - - task: CopyFiles@2 - displayName: "Stage artifacts" - inputs: - SourceFolder: "$(Build.SourcesDirectory)/dist" - Contents: "**" - TargetFolder: "$(Build.ArtifactStagingDirectory)" - CleanTargetFolder: true - OverWrite: true - flattenFolders: true - - - task: PublishPipelineArtifact@1 - displayName: "Save artifacts" - inputs: - targetPath: "$(Build.ArtifactStagingDirectory)" - artifact: "packages" - publishLocation: "pipeline" - - - job: Test - variables: - PythonVersion: "3.8" - - strategy: - matrix: - Windows-Python38: - imageName: windows-latest - python.version: "$(PythonVersion)" - # Windows-Python39: - # imageName: windows-latest - # python.version: "3.9" - Linux-Python38: - imageName: ubuntu-latest - python.version: "$(PythonVersion)" - # Linux-Python39: - # imageName: ubuntu-latest - # python.version: "3.9" - MacOS-Python38: - imageName: macOS-latest - python.version: "$(PythonVersion)" - # MacOS-Python39: - # imageName: macOS-latest - # python.version: "3.9" - - pool: - name: Azure Pipelines - vmImage: "$(imageName)" - - steps: - - task: UseDotNet@2 - displayName: Use .NET 6.0 - inputs: - packageType: 'sdk' - version: '6.0.x' - - - task: UsePythonVersion@0 - inputs: - versionSpec: "$(python.version)" - - - bash: | - # echo $(Agent.OS) - # if [ '$(Agent.OS)' = 'Darwin' ] - # then - # # Setup Miniconda environment - # sudo chown -R $USER $CONDA - # conda create --yes --quiet --name myEnvironment - - # # Official documentation is out of date. - # # This is just workaround to activate conda environment. - # # See https://github.com/MicrosoftDocs/azure-devops-docs/issues/3812. - # source $CONDA/bin/activate $CONDA/envs/myEnvironment - # conda install --yes --quiet --name myEnvironment -c conda-forge pythonnet - # fi - - python -m pip install --upgrade pip setuptools wheel - pip install -r requirements.txt - workingDirectory: $(Build.SourcesDirectory) - displayName: "Install dependencies" - - - bash: | - # if [ '$(Agent.OS)' = 'Darwin' ] - # then - # # Activate conda environment - # # Official documentation is out of date. - # # This is just workaround to activate conda environment. - # # See https://github.com/MicrosoftDocs/azure-devops-docs/issues/3812. - # source $CONDA/bin/activate $CONDA/envs/myEnvironment - # fi - - pip install -r requirements-test.txt - pytest -vr A tests --junitxml=$(Build.SourcesDirectory)/tests/test-results.xml --cov=$(Build.SourcesDirectory)/stock_indicators --cov-report xml:$(Build.SourcesDirectory)/tests/coverage.xml - workingDirectory: $(Build.SourcesDirectory) - displayName: "Run all tests" - - - task: PublishTestResults@2 - displayName: "Publish test results" - condition: succeededOrFailed() - inputs: - testResultsFiles: "$(Build.SourcesDirectory)/tests/test-results.xml" - testRunTitle: "Python $(python.version) Tests" - - - task: PublishCodeCoverageResults@1 - displayName: "Publish code coverage" - inputs: - codeCoverageTool: Cobertura - summaryFileLocation: "$(Build.SourcesDirectory)/tests/coverage.xml" From ef5b98ba509189061295245e25f3ba6540685da2 Mon Sep 17 00:00:00 2001 From: DongGeon Lee Date: Sat, 23 Dec 2023 19:15:36 +0900 Subject: [PATCH 03/15] Clean config --- .github/workflows/ci.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aee7234f..c3f57102 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,12 +38,9 @@ jobs: - name: Install Dependencies run: | - python -m pip install --upgrade pip setuptools wheel pip install -r requirements.txt - working-directory: ${{ github.workspace }} + pip install -r requirements-test.txt - name: Run Tests run: | - pip install -r requirements-test.txt - pytest -vr A tests --junitxml=${{ github.workspace }}/tests/test-results.xml --cov=${{ github.workspace }}/stock_indicators --cov-report xml:${{ github.workspace }}/tests/coverage.xml - working-directory: ${{ github.workspace }} + pytest -vr A tests From 6fbf927e6717c7350cbdc73d02cfbb3b69cfd6c2 Mon Sep 17 00:00:00 2001 From: DongGeon Lee Date: Sat, 23 Dec 2023 22:12:16 +0900 Subject: [PATCH 04/15] Add CD yml --- .github/workflows/cd.yml | 83 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 00000000..107eddac --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,83 @@ +# ref: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows + +name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI + +on: + push: + branches: + - main + +jobs: + build: + name: Build distribution 📦 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install pypa/build + run: >- + python3 -m + pip install + wheel sdist setuptools_scm + --user + - name: Build a binary wheel and a source tarball + run: python3 setup.py sdist bdist_wheel + - name: Store the distribution packages + uses: actions/upload-artifact@v3 + with: + name: python-package-distributions + path: dist/ + + +# This will be triggered everytime when tag is created + publish-to-pypi: + name: >- + Publish Python 🐍 distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + needs: + - build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/stock-indicators + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + + +# This will be triggered everytime when commit is pushed on main branch + publish-to-testpypi: + name: Publish Python 🐍 distribution 📦 to TestPyPI + needs: + - build + runs-on: ubuntu-latest + + environment: + name: testpypi + url: https://test.pypi.org/p/stock-indicators + + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ From 9c87ebba66dcf641794f2b57d99d3747528d9dcd Mon Sep 17 00:00:00 2001 From: DongGeon Lee Date: Sat, 23 Dec 2023 22:28:47 +0900 Subject: [PATCH 05/15] Update setup.py to use setuptools_scm --- setup.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/setup.py b/setup.py index 0d9fc0ab..e613a1e7 100644 --- a/setup.py +++ b/setup.py @@ -1,23 +1,14 @@ import sys import setuptools -# Set semver. -PREFIX_VERSION = "semver:" -DEFAULT_VERSION = "0.0.0.dev0" - -if sys.argv[-1].startswith(PREFIX_VERSION): - version = sys.argv[-1].split(':')[1] - sys.argv.pop() -else: - version = DEFAULT_VERSION - # Build. with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="stock-indicators", - version=version, + use_scm_version=True, + setup_requires=['setuptools_scm'], author="Dave Skender", maintainer="Dong-Geon Lee", description="Stock Indicators for Python. Send in historical price quotes and get back desired technical indicators such as Stochastic RSI, Average True Range, Parabolic SAR, etc. Nothing more.", From 4c3181447f472bcb00290caf342792723b9d733b Mon Sep 17 00:00:00 2001 From: Dong-Geon Lee Date: Tue, 26 Dec 2023 00:09:02 +0900 Subject: [PATCH 06/15] Add auto-gen release note config --- .github/workflows/deploy.yml | 89 ++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 46 +++++++++++++++++++ 2 files changed, 135 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..1e3efa81 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,89 @@ +# ref: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows + +name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI + +on: + push: + branches: + - main + +jobs: + build: + name: Build distribution 📦 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install pypa/build + run: >- + python3 -m + pip install + wheel sdist setuptools_scm + --user + - name: Build a binary wheel and a source tarball + run: python3 setup.py sdist bdist_wheel + - name: Store the distribution packages + uses: actions/upload-artifact@v3 + with: + name: python-package-distributions + path: dist/ + + +# This will be triggered everytime when tag is created + publish-to-pypi: + name: >- + Publish Python 🐍 distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + needs: + - build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/stock-indicators + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + - name: Tag and draft release note + uses: ncipollo/release-action@v1 + with: + body: "We’ve released a new Stock Indicators for Python. See [Skender.Stock.Indicators @ PyPI.org](${{ vars.PYPI_DOWNLOAD_PREFIX }}${{ github.ref_name }}) for more information." + generateReleaseNotes: true + draft: true + + +# This will be triggered everytime when commit is pushed on main branch + publish-to-testpypi: + name: Publish Python 🐍 distribution 📦 to TestPyPI + needs: + - build + runs-on: ubuntu-latest + + environment: + name: testpypi + url: https://test.pypi.org/p/stock-indicators + + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..c3f57102 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,46 @@ +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Stock Indicators for Python + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-latest, ubuntu-latest, macos-latest] + python-version: ["3.8", "3.12"] + dotnet-version: ["6.0.x", "8.0.x"] + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: ${{ matrix.dotnet-version }} + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Dependencies + run: | + pip install -r requirements.txt + pip install -r requirements-test.txt + + - name: Run Tests + run: | + pytest -vr A tests From 470b96751e4413cbd0579ba98deed51975791a0a Mon Sep 17 00:00:00 2001 From: Dong-Geon Lee Date: Tue, 26 Dec 2023 00:14:35 +0900 Subject: [PATCH 07/15] delete duplications --- .github/workflows/cd.yml | 83 ---------------------------------------- .github/workflows/ci.yml | 46 ---------------------- 2 files changed, 129 deletions(-) delete mode 100644 .github/workflows/cd.yml delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml deleted file mode 100644 index 107eddac..00000000 --- a/.github/workflows/cd.yml +++ /dev/null @@ -1,83 +0,0 @@ -# ref: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows - -name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI - -on: - push: - branches: - - main - -jobs: - build: - name: Build distribution 📦 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.x" - - name: Install pypa/build - run: >- - python3 -m - pip install - wheel sdist setuptools_scm - --user - - name: Build a binary wheel and a source tarball - run: python3 setup.py sdist bdist_wheel - - name: Store the distribution packages - uses: actions/upload-artifact@v3 - with: - name: python-package-distributions - path: dist/ - - -# This will be triggered everytime when tag is created - publish-to-pypi: - name: >- - Publish Python 🐍 distribution 📦 to PyPI - if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes - needs: - - build - runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/p/stock-indicators - permissions: - id-token: write # IMPORTANT: mandatory for trusted publishing - - steps: - - name: Download all the dists - uses: actions/download-artifact@v3 - with: - name: python-package-distributions - path: dist/ - - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - - -# This will be triggered everytime when commit is pushed on main branch - publish-to-testpypi: - name: Publish Python 🐍 distribution 📦 to TestPyPI - needs: - - build - runs-on: ubuntu-latest - - environment: - name: testpypi - url: https://test.pypi.org/p/stock-indicators - - permissions: - id-token: write # IMPORTANT: mandatory for trusted publishing - - steps: - - name: Download all the dists - uses: actions/download-artifact@v3 - with: - name: python-package-distributions - path: dist/ - - name: Publish distribution 📦 to TestPyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index c3f57102..00000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,46 +0,0 @@ -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: Stock Indicators for Python - -on: - push: - branches: - - main - pull_request: - branches: - - main - -permissions: - contents: read - -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [windows-latest, ubuntu-latest, macos-latest] - python-version: ["3.8", "3.12"] - dotnet-version: ["6.0.x", "8.0.x"] - - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ matrix.dotnet-version }} - - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Install Dependencies - run: | - pip install -r requirements.txt - pip install -r requirements-test.txt - - - name: Run Tests - run: | - pytest -vr A tests From dbb5b331fe8531926658dd13a3bf13ed1dec182b Mon Sep 17 00:00:00 2001 From: Dave Skender <8432125+DaveSkender@users.noreply.github.com> Date: Mon, 25 Dec 2023 16:05:28 -0500 Subject: [PATCH 08/15] update env name and release URL label --- .github/workflows/deploy.yml | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1e3efa81..65103153 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -8,24 +8,31 @@ on: - main jobs: + + # production build build: name: Build distribution 📦 runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + - name: Set up Python uses: actions/setup-python@v4 with: python-version: "3.x" + - name: Install pypa/build run: >- python3 -m pip install wheel sdist setuptools_scm --user + - name: Build a binary wheel and a source tarball run: python3 setup.py sdist bdist_wheel + - name: Store the distribution packages uses: actions/upload-artifact@v3 with: @@ -33,37 +40,41 @@ jobs: path: dist/ -# This will be triggered everytime when tag is created + # This will be triggered only when a tag is pushed publish-to-pypi: - name: >- - Publish Python 🐍 distribution 📦 to PyPI - if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + name: Publish Python 🐍 distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags/') needs: - build runs-on: ubuntu-latest + environment: name: pypi url: https://pypi.org/p/stock-indicators + permissions: id-token: write # IMPORTANT: mandatory for trusted publishing steps: + - name: Download all the dists uses: actions/download-artifact@v3 with: name: python-package-distributions path: dist/ + - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 + - name: Tag and draft release note uses: ncipollo/release-action@v1 with: - body: "We’ve released a new Stock Indicators for Python. See [Skender.Stock.Indicators @ PyPI.org](${{ vars.PYPI_DOWNLOAD_PREFIX }}${{ github.ref_name }}) for more information." + body: "We’ve released a new Stock Indicators for Python. See [stock-indicators @ PyPI.org](${{ vars.PYPI_DOWNLOAD_PREFIX }}${{ github.ref_name }}) for more information." generateReleaseNotes: true draft: true -# This will be triggered everytime when commit is pushed on main branch + # This will be triggered everytime when commit is pushed on main branch publish-to-testpypi: name: Publish Python 🐍 distribution 📦 to TestPyPI needs: @@ -71,18 +82,20 @@ jobs: runs-on: ubuntu-latest environment: - name: testpypi + name: pypi-test url: https://test.pypi.org/p/stock-indicators permissions: id-token: write # IMPORTANT: mandatory for trusted publishing steps: + - name: Download all the dists uses: actions/download-artifact@v3 with: name: python-package-distributions path: dist/ + - name: Publish distribution 📦 to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: From 7deda1eb759921e7d83a0c2565249efabb87affd Mon Sep 17 00:00:00 2001 From: DongGeon Lee Date: Tue, 26 Dec 2023 15:33:24 +0900 Subject: [PATCH 09/15] Remove auto-generating release note step --- .github/workflows/deploy.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 65103153..1e9d9cb0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -66,13 +66,6 @@ jobs: - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - - name: Tag and draft release note - uses: ncipollo/release-action@v1 - with: - body: "We’ve released a new Stock Indicators for Python. See [stock-indicators @ PyPI.org](${{ vars.PYPI_DOWNLOAD_PREFIX }}${{ github.ref_name }}) for more information." - generateReleaseNotes: true - draft: true - # This will be triggered everytime when commit is pushed on main branch publish-to-testpypi: From a9382f28ae398c08d83a5aa7c9c15ea9cbf4bc3d Mon Sep 17 00:00:00 2001 From: DongGeon Lee Date: Tue, 26 Dec 2023 15:37:05 +0900 Subject: [PATCH 10/15] Remove gitversion.yml --- gitversion.yml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 gitversion.yml diff --git a/gitversion.yml b/gitversion.yml deleted file mode 100644 index 4cb24ba1..00000000 --- a/gitversion.yml +++ /dev/null @@ -1,11 +0,0 @@ -mode: ContinuousDelivery - -commit-message-incrementing: Enabled -major-version-bump-message: '\+semver:\s?(breaking|major)' -minor-version-bump-message: '\+semver:\s?(feature|minor)' -patch-version-bump-message: '\+semver:\s?(fix|patch)' -no-bump-message: '\+semver:\s?(none|skip)' - -branches: - pull-request: - tag: preview. From 307bef270346e5920b21d1a6bd78a8b417f695bb Mon Sep 17 00:00:00 2001 From: Dave Skender <8432125+DaveSkender@users.noreply.github.com> Date: Tue, 26 Dec 2023 01:52:15 -0500 Subject: [PATCH 11/15] remove unneeded node install on a11y build tests --- .github/workflows/docs-test-a11y.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs-test-a11y.yml b/.github/workflows/docs-test-a11y.yml index c980d1fc..4c6918c2 100644 --- a/.github/workflows/docs-test-a11y.yml +++ b/.github/workflows/docs-test-a11y.yml @@ -1,4 +1,5 @@ name: Website + on: pull_request: branches: [main] @@ -10,18 +11,13 @@ env: JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: - testing: + test: name: test a11y runs-on: ubuntu-latest steps: - name: Checkout source - uses: actions/checkout@v2 - - - name: Install Node - uses: actions/setup-node@v2 - with: - node-version: '16' + uses: actions/checkout@v4 - name: Install Ruby uses: ruby/setup-ruby@v1 From 1daec7b63c2e1228702cde140cea69b9cce958b4 Mon Sep 17 00:00:00 2001 From: DongGeon Lee Date: Tue, 26 Dec 2023 16:14:06 +0900 Subject: [PATCH 12/15] Update contributing.md (draft) --- docs/pages/contributing.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/docs/pages/contributing.md b/docs/pages/contributing.md index 47dcb1a8..6aaf21cd 100644 --- a/docs/pages/contributing.md +++ b/docs/pages/contributing.md @@ -128,7 +128,7 @@ If you want to contribute administratively, do code reviews, or provide general ## Versioning -We use the `GitVersion` tool for [semantic versioning](https://semver.org). It is mostly auto generated in the [Azure DevOps build](https://dev.azure.com/skender/Stock.Indicators/_build?definitionId=26). +We use the `setuptools_scm` tool for [semantic versioning](https://semver.org). It detects the version number from `git tag` in the [GitHub Actions build](https://github.com/DaveSkender/Stock.Indicators.Python/deployments/pypi). Type | Format | Description ------------ | ------ | ----------- @@ -137,13 +137,7 @@ Minor | `-.x.-` | A new feature, usually new non-breaking change, such as adding Patch | `-.-.x` | A small bug fix, chore, or documentation change. Increment | `-.-.-+x` | Intermediate commits between releases. -This only needs to be done on the merge to `main` when the Pull Request is committed, so your feature branch does not need to include this as it will get squashed anyway. - -- Adding `+semver: major` as a PR merge commit message will increment the major x.-.- element -- Adding `+semver: minor` as a PR merge commit message will increment the minor -.x.- element -- Adding `+semver: patch` as a PR merge commit message will increment the minor -.-.x element. Patch element auto-increments, so you'd only need to do this to override the next value. - -A Git `tag`, in accordance with the above schema, is introduced automatically after deploying to PyPI and is reflected in the [Releases](https://github.com/DaveSkender/Stock.Indicators.Python/releases). +After creating `git tag` with version number for the latest release, deployment workflow will be triggered, no any other actions required. ## License From b069d274491c6c2ec2a36f885a338a7c9aca2228 Mon Sep 17 00:00:00 2001 From: DongGeon Lee Date: Tue, 26 Dec 2023 16:27:11 +0900 Subject: [PATCH 13/15] Update contributing.md (draft) --- docs/pages/contributing.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/pages/contributing.md b/docs/pages/contributing.md index 6aaf21cd..977a37c2 100644 --- a/docs/pages/contributing.md +++ b/docs/pages/contributing.md @@ -137,7 +137,8 @@ Minor | `-.x.-` | A new feature, usually new non-breaking change, such as adding Patch | `-.-.x` | A small bug fix, chore, or documentation change. Increment | `-.-.-+x` | Intermediate commits between releases. -After creating `git tag` with version number for the latest release, deployment workflow will be triggered, no any other actions required. +After creating `git tag` with version number for the latest release, deployment workflow will be triggered. +Then, publish the release note manually using [automatically generated release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes) feature. ## License From 435a069474691751d3094a8f5c231fa3466ed3a5 Mon Sep 17 00:00:00 2001 From: Dave Skender <8432125+DaveSkender@users.noreply.github.com> Date: Tue, 26 Dec 2023 02:38:20 -0500 Subject: [PATCH 14/15] exclude timeout in build URL checker --- .github/workflows/docs-test-links.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-test-links.yml b/.github/workflows/docs-test-links.yml index 5fdbf57a..2ded2ae9 100644 --- a/.github/workflows/docs-test-links.yml +++ b/.github/workflows/docs-test-links.yml @@ -67,6 +67,6 @@ jobs: run: | htmlproofer _site \ --no-enforce-https \ - --ignore-status-codes "0,403,406,408,429,503,999" \ + --ignore-status-codes "0,302,403,406,408,429,503,999" \ --swap-urls "https\://python.stockindicators.dev:http\://127.0.0.1:4000" \ --ignore-urls "/fonts.gstatic.com/" From 227834c4296684cf253211833804b317fa012dfd Mon Sep 17 00:00:00 2001 From: Dave Skender <8432125+DaveSkender@users.noreply.github.com> Date: Tue, 26 Dec 2023 03:14:34 -0500 Subject: [PATCH 15/15] update contributing.md --- docs/pages/contributing.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/pages/contributing.md b/docs/pages/contributing.md index 977a37c2..d3789bda 100644 --- a/docs/pages/contributing.md +++ b/docs/pages/contributing.md @@ -98,7 +98,8 @@ See [GitHub Pages documentation](https://docs.github.com/en/pages/setting-up-a-g bundle install bundle exec jekyll serve -# then open site on http://127.0.0.1:4000 +# then open site on http://127.0.0.1:4000, +# or use `bundle exec jekyll serve -o -l` to auto-open, livereload ``` When adding or updating indicators: @@ -135,10 +136,10 @@ Type | Format | Description Major | `x.-.-` | A significant deviation with major breaking changes. Minor | `-.x.-` | A new feature, usually new non-breaking change, such as adding an indicator. Minor breaking changes may occur here and are denoted in the [release notes](https://github.com/DaveSkender/Stock.Indicators.Python/releases). Patch | `-.-.x` | A small bug fix, chore, or documentation change. -Increment | `-.-.-+x` | Intermediate commits between releases. -After creating `git tag` with version number for the latest release, deployment workflow will be triggered. -Then, publish the release note manually using [automatically generated release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes) feature. +After one of our repository administrators creates a `git tag` on the `main` branch, +reflecting the new version number, the `PyPI` deployment workflow will start. +After the new package is published, they'll publicly post the [release record](https://github.com/DaveSkender/Stock.Indicators.Python/releases) with [automatically generated notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes) and other information. ## License