From 0240aa4fea9df002868964ff2b1af28a160b1cfc Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Fri, 3 May 2024 13:39:06 +0000 Subject: [PATCH 01/35] ruff ci --- .github/workflows/ruff.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/workflows/ruff.yml diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 0000000..c8a0958 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,8 @@ +name: Ruff +on: [ push, pull_request ] +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: chartboost/ruff-action@v1 \ No newline at end of file From 62f6d5305b88b6150f11a8cc36eb2f30e7610503 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Fri, 3 May 2024 13:53:00 +0000 Subject: [PATCH 02/35] added ruff.toml --- .ruff.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .ruff.toml diff --git a/.ruff.toml b/.ruff.toml new file mode 100644 index 0000000..d11fa04 --- /dev/null +++ b/.ruff.toml @@ -0,0 +1,3 @@ +[lint.extend-per-file-ignores] +"__init__.py" = ["E402"] +'__init__.py' = ["F403"] \ No newline at end of file From 174a000dc4fdd375908f19665dc9e6b975e77a40 Mon Sep 17 00:00:00 2001 From: Jacob Schmieder Date: Fri, 3 May 2024 16:09:46 +0200 Subject: [PATCH 03/35] fixed .ruff.toml --- .ruff.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.ruff.toml b/.ruff.toml index d11fa04..f6be0be 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -1,3 +1,2 @@ [lint.extend-per-file-ignores] -"__init__.py" = ["E402"] -'__init__.py' = ["F403"] \ No newline at end of file +"__init__.py" = ["E402","F403"] From f6f444093c1cb636882ef3b8a3d71b6f3363102f Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Mon, 6 May 2024 12:34:32 +0000 Subject: [PATCH 04/35] changed workflow name --- .github/workflows/pytest.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 8959789..973571f 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -1,11 +1,10 @@ -name: Run tests +name: Run Tests on: #push: pull_request: branches: ['main', 'develop'] - workflow_dispatch: jobs: From 0d9d8d57d181520252e9990f2ef7f3ed2354fcd3 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Mon, 6 May 2024 12:35:55 +0000 Subject: [PATCH 05/35] added pypi ci --- .github/workflows/pypi.yml | 102 +++++++++++++++++++++++++++ .github/workflows/python-publish.yml | 39 ---------- 2 files changed, 102 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/pypi.yml delete mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..0426bba --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,102 @@ +name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI + +on: + workflow_dispatch: + inputs: + branch_name: + description: 'Branch to build from (default is main)' + required: false + default: 'main' + workflow_run: + workflows: ["Run Tests"] # Ensure this matches the name of your testing workflow + types: + - completed + branches: [main, develop] # This ensures it only triggers for these branches + +env: + TestPyPI_URL: https://test.pypi.org/p/scraibe + PyPI_URL: https://pypi.org/p/scraibe + PyPI_DEV_URL: https://pypi.org/p/scraibe-nightly + +jobs: + + build: + name: Build distribution 📦 + runs-on: ubuntu-latest + # Check if manually triggered or automatically after successful test + if: > + github.event_name == 'workflow_dispatch' || + (github.event.workflow_run.conclusion == 'success' && + (github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'develop')) + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.branch_name || github.event.workflow_run.head_branch }} + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Build source distribution + run: python3 setup.py sdist + - name: Store the distribution packages + uses: actions/upload-artifact@v3 + with: + name: python-package-distributions + path: dist/ + + publish-to-testpypi: + name: Publish Python 🐍 distribution 📦 to TestPyPI + needs: build + runs-on: ubuntu-latest + environment: + name: testpypi + url: $TestPyPI_URL + permissions: + id-token: write + 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/ + + test-install: + name: Test Installation from TestPyPI + needs: publish-to-testpypi + runs-on: ubuntu-latest + steps: + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install package + run: | + python3 -m pip install --index-url $TestPyPI_URL + + publish-to-pypi: + name: Conditional Publish to PyPI or Dev Repository + needs: [build, test-install] + runs-on: ubuntu-latest + environment: + name: pypi + url: $PyPI_URL + permissions: + id-token: write + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to PyPI or Dev Repository + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: ${{ github.ref == 'refs/heads/main' && 'env.PyPI_URL' || ' env.PyPI_DEV_URL' }} + user: ${{ secrets.PYPI_USERNAME }} + password: ${{ secrets.PYPI_PASSWORD }} + + diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml deleted file mode 100644 index bdaab28..0000000 --- a/.github/workflows/python-publish.yml +++ /dev/null @@ -1,39 +0,0 @@ -# This workflow will upload a Python Package using Twine when a release is created -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: Upload Python Package - -on: - release: - types: [published] - -permissions: - contents: read - -jobs: - deploy: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - name: Build package - run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} From 3930a7e185840780fc826b3ca143b72ffd2aa47d Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Mon, 6 May 2024 12:39:08 +0000 Subject: [PATCH 06/35] use pypi api token --- .github/workflows/pypi.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 0426bba..7f5fc3b 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -96,7 +96,6 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: ${{ github.ref == 'refs/heads/main' && 'env.PyPI_URL' || ' env.PyPI_DEV_URL' }} - user: ${{ secrets.PYPI_USERNAME }} - password: ${{ secrets.PYPI_PASSWORD }} + password: ${{ secrets.PYPI_API_TOKEN}} From cc89f5e7cb98da8a6ad0564748aeaa1a1d7cf8bd Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Tue, 7 May 2024 07:55:02 +0000 Subject: [PATCH 07/35] test push --- .github/workflows/pypi.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 7f5fc3b..21f0109 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -1,23 +1,34 @@ name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI +# on: +# workflow_dispatch: +# inputs: +# branch_name: +# description: 'Branch to build from (default is main)' +# required: false +# default: 'main' +# workflow_run: +# workflows: ["Run Tests"] +# types: +# - completed +# branches: [main, develop] # This ensures it only triggers for these branches + on: + push: + branches: + - develop workflow_dispatch: inputs: branch_name: description: 'Branch to build from (default is main)' required: false default: 'main' - workflow_run: - workflows: ["Run Tests"] # Ensure this matches the name of your testing workflow - types: - - completed - branches: [main, develop] # This ensures it only triggers for these branches - + env: TestPyPI_URL: https://test.pypi.org/p/scraibe PyPI_URL: https://pypi.org/p/scraibe PyPI_DEV_URL: https://pypi.org/p/scraibe-nightly - + ISRELEASED: true jobs: build: From 141517d097fa94e60047bff0bc1416f0708a9cb3 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Tue, 7 May 2024 08:03:48 +0000 Subject: [PATCH 08/35] removed checks --- .github/workflows/pypi.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 21f0109..acc5c54 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -34,11 +34,6 @@ jobs: build: name: Build distribution 📦 runs-on: ubuntu-latest - # Check if manually triggered or automatically after successful test - if: > - github.event_name == 'workflow_dispatch' || - (github.event.workflow_run.conclusion == 'success' && - (github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'develop')) steps: - uses: actions/checkout@v4 with: From 1fe93497e13df33efb7de9df74513c94f1e35d33 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Tue, 7 May 2024 08:06:17 +0000 Subject: [PATCH 09/35] added dependencies to pypi yaml --- .github/workflows/pypi.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index acc5c54..b77ebb2 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -42,6 +42,10 @@ jobs: uses: actions/setup-python@v4 with: python-version: "3.x" + - name: Install dependencies + run: | + python3 -m pip install --upgrade pip + pip install setuptools wheel - name: Build source distribution run: python3 setup.py sdist - name: Store the distribution packages From 5ef907105f05d4447e6500a86ce5024292e4ff91 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Tue, 7 May 2024 11:15:10 +0000 Subject: [PATCH 10/35] test push to testpypi --- .github/workflows/pypi.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index b77ebb2..490202b 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -106,6 +106,4 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: ${{ github.ref == 'refs/heads/main' && 'env.PyPI_URL' || ' env.PyPI_DEV_URL' }} - password: ${{ secrets.PYPI_API_TOKEN}} - - + password: ${{ secrets.PYPI_API_TOKEN}} \ No newline at end of file From 0f3bd55d49366e9bd6950563e9fd57544f3fb6b0 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Tue, 7 May 2024 11:30:25 +0000 Subject: [PATCH 11/35] changed long_description --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 3e2cac7..c554d62 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,7 +4,7 @@ version = attr: scraibe.__version__ author = Jacob Schmieder author_email = Jacob.Schmieder@dbfz.de description = My package description -long_description = file: README.md, LICENSE +long_description = file: README.md, file: LICENSE platforms = Linux keywords = transcription speech recognition whisper pyannote audio speech-to-text speech-to-text transcription speech-to-text recognition voice-to-speech license = GPL-3.0 From d740602a781dded09aabbf9fe9cee63d814bc3e0 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Tue, 7 May 2024 11:37:03 +0000 Subject: [PATCH 12/35] added long description type --- setup.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.cfg b/setup.cfg index c554d62..7ecab8c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,6 +5,7 @@ author = Jacob Schmieder author_email = Jacob.Schmieder@dbfz.de description = My package description long_description = file: README.md, file: LICENSE +long_description_content_type = text/markdown; charset=UTF-8; variant=GFM platforms = Linux keywords = transcription speech recognition whisper pyannote audio speech-to-text speech-to-text transcription speech-to-text recognition voice-to-speech license = GPL-3.0 From 46f48d0e255ee29effa12bbe8163cb1b02a33f02 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Tue, 7 May 2024 11:55:03 +0000 Subject: [PATCH 13/35] changed env name --- .github/workflows/pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 490202b..fca875d 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -60,7 +60,7 @@ jobs: runs-on: ubuntu-latest environment: name: testpypi - url: $TestPyPI_URL + url: env.TestPyPI_URL permissions: id-token: write steps: From 8b187871236b59e77c87697c53300814e8b106f8 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Tue, 7 May 2024 11:59:43 +0000 Subject: [PATCH 14/35] try fix etras_require --- setup.py | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/setup.py b/setup.py index c2b37d4..60c7c03 100644 --- a/setup.py +++ b/setup.py @@ -30,27 +30,26 @@ with open(os.path.join(os.path.dirname(__file__), "requirements.txt")) as f: if __name__ == "__main__": setup( - name=module_name, - version=version["get_version"](build_version), - packages=find_packages(), - python_requires=">=3.8", - readme="README.md", + name = module_name, + version = version["get_version"](build_version), + packages = find_packages(), + python_requires = ">=3.8", + readme = "README.md", install_requires = requirements, - extras_require= { - "app" : "scraibe-webui @ https://github.com/JSchmie/ScrAIbe-WebUI" - } - , + extras_require = { + "app" : ["scraibe-webui @ git+https://github.com/JSchmie/ScrAIbe-WebUI"], + }, # dependency_links=[ # 'https://download.pytorch.org/whl/cu113', # ], - url= github_url, + url = github_url, - license='GPL-3', - author='Jacob Schmieder', - author_email='Jacob.Schmieder@dbfz.de', - description='Transcription tool for audio files based on Whisper and Pyannote', - classifiers=[ + license = 'GPL-3', + author = 'Jacob Schmieder', + author_email = 'Jacob.Schmieder@dbfz.de', + description = 'Transcription tool for audio files based on Whisper and Pyannote', + classifiers = [ 'Development Status :: 3 - Alpha', 'Environment :: GPU :: NVIDIA CUDA :: 11.2', 'License :: OSI Approved :: Open Software License 3.0 (OSL-3.0)', @@ -61,8 +60,8 @@ if __name__ == "__main__": keywords = ['transcription', 'speech recognition', 'whisper', 'pyannote', 'audio', 'ScrAIbe', 'scraibe', 'speech-to-text', 'speech-to-text transcription', 'speech-to-text recognition', 'voice-to-speech'], - package_data={'scraibe.app' : ["*.html", "*.svg","*.yml"]}, - entry_points={'console_scripts': + package_data = {'scraibe.app' : ["*.html", "*.svg","*.yml"]}, + entry_points = {'console_scripts': ['scraibe = scraibe.cli:cli']} ) From 57bcddd238e6304a25e809ac2c73a60008f76b6f Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Tue, 7 May 2024 12:10:05 +0000 Subject: [PATCH 15/35] removed url from extra_requeire since pip does not support it until now --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 60c7c03..b4894f9 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ if __name__ == "__main__": readme = "README.md", install_requires = requirements, extras_require = { - "app" : ["scraibe-webui @ git+https://github.com/JSchmie/ScrAIbe-WebUI"], + "app" : ["scraibe-webui"], }, # dependency_links=[ # 'https://download.pytorch.org/whl/cu113', From f793f3235e1517672a030a44e52a1a1b6b3a3461 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Tue, 7 May 2024 13:17:16 +0000 Subject: [PATCH 16/35] added package name for scraibe in test-install --- .github/workflows/pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index fca875d..7282149 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -85,7 +85,7 @@ jobs: python-version: "3.x" - name: Install package run: | - python3 -m pip install --index-url $TestPyPI_URL + python3 -m pip install scraibe --index-url env.TestPyPI_URL publish-to-pypi: name: Conditional Publish to PyPI or Dev Repository From edbf5e7585196659dffc62c3afba9337bd1e37b1 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Tue, 7 May 2024 14:43:34 +0000 Subject: [PATCH 17/35] test skip existing --- .github/workflows/pypi.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 7282149..b233a8e 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -73,6 +73,8 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/ + skip-existing: true + test-install: name: Test Installation from TestPyPI @@ -93,7 +95,7 @@ jobs: runs-on: ubuntu-latest environment: name: pypi - url: $PyPI_URL + url: env.PyPI_URL permissions: id-token: write steps: From fcf6e69f10fb401461ce3c35d9e5d225f91b67c8 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Tue, 7 May 2024 14:45:56 +0000 Subject: [PATCH 18/35] test index url --- .github/workflows/pypi.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index b233a8e..e380906 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -74,7 +74,7 @@ jobs: with: repository-url: https://test.pypi.org/legacy/ skip-existing: true - + test-install: name: Test Installation from TestPyPI @@ -87,7 +87,7 @@ jobs: python-version: "3.x" - name: Install package run: | - python3 -m pip install scraibe --index-url env.TestPyPI_URL + python3 -m pip install scraibe --index-url $env.TestPyPI_URL publish-to-pypi: name: Conditional Publish to PyPI or Dev Repository From f3c540b9a56011acb26080aa898402de314d686b Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Tue, 7 May 2024 14:52:54 +0000 Subject: [PATCH 19/35] changed variable --- .github/workflows/pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index e380906..814cc5a 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -87,7 +87,7 @@ jobs: python-version: "3.x" - name: Install package run: | - python3 -m pip install scraibe --index-url $env.TestPyPI_URL + python3 -m pip install scraibe --index-url $TestPyPI_URL publish-to-pypi: name: Conditional Publish to PyPI or Dev Repository From 417b30f9c393b02ba39684176619aec89e5cc70a Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Tue, 7 May 2024 14:57:32 +0000 Subject: [PATCH 20/35] fixed index-url --- .github/workflows/pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 814cc5a..95e06c9 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -87,7 +87,7 @@ jobs: python-version: "3.x" - name: Install package run: | - python3 -m pip install scraibe --index-url $TestPyPI_URL + python3 -m pip install --index-url https://test.pypi.org/simple/ scraibe publish-to-pypi: name: Conditional Publish to PyPI or Dev Repository From 3e04d20b5ae0cca24849cd66898242d0cc8ed52c Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Tue, 7 May 2024 15:02:43 +0000 Subject: [PATCH 21/35] install setuptools --- .github/workflows/pypi.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 95e06c9..8693012 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -87,6 +87,7 @@ jobs: python-version: "3.x" - name: Install package run: | + python3 -m pip install setuptools python3 -m pip install --index-url https://test.pypi.org/simple/ scraibe publish-to-pypi: From b92056196212eba221ce18fd709178e0df252689 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Wed, 8 May 2024 07:21:15 +0000 Subject: [PATCH 22/35] include requirements --- MANIFEST.IN | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.IN b/MANIFEST.IN index 6607396..e1a3884 100644 --- a/MANIFEST.IN +++ b/MANIFEST.IN @@ -1,4 +1,5 @@ recursive-include scraibe *.py recursive-include scraibe *.yaml +include requirements.txt global-exclude *.pyc global-exclude __pycache__ \ No newline at end of file From 978dca56401231f788ddf570e385e86b7f90cfe7 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Wed, 8 May 2024 07:21:53 +0000 Subject: [PATCH 23/35] removed unused package --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index b4894f9..a44fc0a 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,4 @@ import os -import re from setuptools import setup, find_packages module_name = "scraibe" From c1067fed32c4f5cc3d6c1bf0ff9c209f1dcb21bb Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Wed, 8 May 2024 07:38:04 +0000 Subject: [PATCH 24/35] added Nano Version --- scraibe/version.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scraibe/version.py b/scraibe/version.py index bce39ee..01ff5da 100644 --- a/scraibe/version.py +++ b/scraibe/version.py @@ -4,8 +4,9 @@ import subprocess as sp MAJOR = 0 MINOR = 1 MICRO = 1 +NANO = 1 ISRELEASED = False -VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) +VERSION = '%d.%d.%d.%d' % (MAJOR, MINOR, MICRO, NANO) # Return the git revision as a string # taken from numpy/numpy From 9893e4372b7510e2c9ac821fd62d65e2835b43a1 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Wed, 8 May 2024 07:51:53 +0000 Subject: [PATCH 25/35] removed tests from opackage and try global include requirements --- MANIFEST.IN | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MANIFEST.IN b/MANIFEST.IN index e1a3884..e2cb9a8 100644 --- a/MANIFEST.IN +++ b/MANIFEST.IN @@ -1,5 +1,6 @@ recursive-include scraibe *.py recursive-include scraibe *.yaml -include requirements.txt +recursive-exclude test/* +global-include requirements.txt global-exclude *.pyc -global-exclude __pycache__ \ No newline at end of file +global-exclude __pycache__ From 7bf5d329cac1b07eb19a9e46b5a81fbbf246135c Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Wed, 8 May 2024 08:00:38 +0000 Subject: [PATCH 26/35] check which branch is used --- .github/workflows/pypi.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 8693012..a7faaca 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -38,6 +38,10 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.branch_name || github.event.workflow_run.head_branch }} + - name: Display Branch Name + run: | + echo "Building branch: ${{ github.event.inputs.branch_name || github.event.workflow_run.head_branch }}" + - name: Set up Python uses: actions/setup-python@v4 with: From e8a03f9777cd325b16d7c3863991a5820e7628fe Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Wed, 8 May 2024 09:20:53 +0000 Subject: [PATCH 27/35] debug build --- .github/workflows/pypi.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index a7faaca..afa235c 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -38,10 +38,17 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.branch_name || github.event.workflow_run.head_branch }} + - name: Debug Event Context + run: | + echo "Event Name: ${{ github.event_name }}" + echo "Inputs Branch Name: ${{ github.event.inputs.branch_name }}" + echo "Workflow Run Head Branch: ${{ github.event.workflow_run.head_branch }}" + echo "Ref: ${{ github.ref }}" + echo "GITHUB_REF: $GITHUB_REF" - name: Display Branch Name run: | - echo "Building branch: ${{ github.event.inputs.branch_name || github.event.workflow_run.head_branch }}" - + BRANCH=${{ github.event.inputs.branch_name || github.event.workflow_run.head_branch }} + echo "Building branch: $BRANCH" - name: Set up Python uses: actions/setup-python@v4 with: From ee715a60f4fc18590b0eb14160c8ccb16a9f5165 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Wed, 8 May 2024 09:38:46 +0000 Subject: [PATCH 28/35] get branch name --- .github/workflows/pypi.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index afa235c..cc4d7fd 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -38,17 +38,8 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.branch_name || github.event.workflow_run.head_branch }} - - name: Debug Event Context - run: | - echo "Event Name: ${{ github.event_name }}" - echo "Inputs Branch Name: ${{ github.event.inputs.branch_name }}" - echo "Workflow Run Head Branch: ${{ github.event.workflow_run.head_branch }}" - echo "Ref: ${{ github.ref }}" - echo "GITHUB_REF: $GITHUB_REF" - - name: Display Branch Name - run: | - BRANCH=${{ github.event.inputs.branch_name || github.event.workflow_run.head_branch }} - echo "Building branch: $BRANCH" + - name: Get Branch Name + run: echo running on branch ${GITHUB_REF##*/} - name: Set up Python uses: actions/setup-python@v4 with: From 5b627ab27ae2ab458ccd2346a793a3ab76e1a200 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Wed, 8 May 2024 09:39:29 +0000 Subject: [PATCH 29/35] fixed syntax --- .github/workflows/pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index cc4d7fd..cb0338a 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -39,7 +39,7 @@ jobs: with: ref: ${{ github.event.inputs.branch_name || github.event.workflow_run.head_branch }} - name: Get Branch Name - run: echo running on branch ${GITHUB_REF##*/} + run: echo running on branch ${GITHUB_REF##*/} - name: Set up Python uses: actions/setup-python@v4 with: From c3b08f1c67f8565c485c2a21165c1f4bb4eadc2b Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Wed, 8 May 2024 09:41:23 +0000 Subject: [PATCH 30/35] show manifest in --- .github/workflows/pypi.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index cb0338a..913dcba 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -36,10 +36,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - ref: ${{ github.event.inputs.branch_name || github.event.workflow_run.head_branch }} - - name: Get Branch Name - run: echo running on branch ${GITHUB_REF##*/} - name: Set up Python uses: actions/setup-python@v4 with: @@ -48,8 +44,10 @@ jobs: run: | python3 -m pip install --upgrade pip pip install setuptools wheel - - name: Build source distribution - run: python3 setup.py sdist + - name: Build source distribution + run: | + cat MANIFEST.in + python3 setup.py sdist - name: Store the distribution packages uses: actions/upload-artifact@v3 with: From e52b30c9d58142272b377fd67ac6adf2e9cba60a Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Wed, 8 May 2024 09:43:32 +0000 Subject: [PATCH 31/35] change filename --- MANIFEST.IN => MANIFEST.in | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename MANIFEST.IN => MANIFEST.in (100%) diff --git a/MANIFEST.IN b/MANIFEST.in similarity index 100% rename from MANIFEST.IN rename to MANIFEST.in From 31b415f98f71903301bc51628503d67f48f7d832 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Wed, 8 May 2024 09:50:08 +0000 Subject: [PATCH 32/35] changed version to test new upload --- .github/workflows/pypi.yml | 1 - scraibe/version.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 913dcba..56d06bf 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -46,7 +46,6 @@ jobs: pip install setuptools wheel - name: Build source distribution run: | - cat MANIFEST.in python3 setup.py sdist - name: Store the distribution packages uses: actions/upload-artifact@v3 diff --git a/scraibe/version.py b/scraibe/version.py index 01ff5da..9c4faa5 100644 --- a/scraibe/version.py +++ b/scraibe/version.py @@ -4,7 +4,7 @@ import subprocess as sp MAJOR = 0 MINOR = 1 MICRO = 1 -NANO = 1 +NANO = 2 ISRELEASED = False VERSION = '%d.%d.%d.%d' % (MAJOR, MINOR, MICRO, NANO) From 2d2339000935daa599357c2df2d1c62ea3733f8e Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Wed, 8 May 2024 09:58:42 +0000 Subject: [PATCH 33/35] check if variable set correctly --- .github/workflows/pypi.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 56d06bf..3b47162 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -46,6 +46,7 @@ jobs: pip install setuptools wheel - name: Build source distribution run: | + python3 -c "import os; print("ISRELEASED" in os.environ)" python3 setup.py sdist - name: Store the distribution packages uses: actions/upload-artifact@v3 From 0aa28d87a4d3ce11d3a20f5b3fd639cc33ce414d Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Wed, 8 May 2024 09:59:37 +0000 Subject: [PATCH 34/35] fixed wrong syntax --- .github/workflows/pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 3b47162..0e73d9a 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -46,7 +46,7 @@ jobs: pip install setuptools wheel - name: Build source distribution run: | - python3 -c "import os; print("ISRELEASED" in os.environ)" + python3 -c "import os; print('ISRELEASED' in os.environ)" python3 setup.py sdist - name: Store the distribution packages uses: actions/upload-artifact@v3 From 9f590040298dab3e01de5d8f1e16017ef68ef793 Mon Sep 17 00:00:00 2001 From: "Schmieder, Jacob" Date: Wed, 8 May 2024 10:04:08 +0000 Subject: [PATCH 35/35] debug versioning --- setup.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a44fc0a..3dfc95e 100644 --- a/setup.py +++ b/setup.py @@ -26,6 +26,9 @@ version["ISRELEASED"] = True if "ISRELEASED" in os.environ else False with open(os.path.join(os.path.dirname(__file__), "requirements.txt")) as f: requirements = [line.strip() for line in f if line.strip() and not line.startswith('#')] + +print(f"Launch Version: {version['get_version'](build_version)}") + if __name__ == "__main__": setup( @@ -59,8 +62,8 @@ if __name__ == "__main__": keywords = ['transcription', 'speech recognition', 'whisper', 'pyannote', 'audio', 'ScrAIbe', 'scraibe', 'speech-to-text', 'speech-to-text transcription', 'speech-to-text recognition', 'voice-to-speech'], + include_package_data=True, package_data = {'scraibe.app' : ["*.html", "*.svg","*.yml"]}, entry_points = {'console_scripts': - ['scraibe = scraibe.cli:cli']} - + ['scraibe = scraibe.cli:cli']} )