From 03e094a4973d12dabf40766572bb423fdbf185a1 Mon Sep 17 00:00:00 2001 From: Elara6331 Date: Thu, 25 Apr 2024 19:43:08 -0700 Subject: [PATCH 1/7] ci: add pipeline --- .woodpecker.yml | 36 +++++++++++++++++++++++++++++++++ pyproject.toml | 11 +++++++++- python_sponsorblock/_version.py | 16 +++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 .woodpecker.yml create mode 100644 python_sponsorblock/_version.py diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..f8713e8 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,36 @@ +labels: + platform: linux/amd64 + +steps: + build: + image: python + commands: + - python -m pip install hatch + - python -m unittest + - hatch build + when: + - event: manual + - event: tag + + publish-gitea: + image: gitea.elara.ws/music-kraken/plugin-twine + settings: + repository_url: "https://gitea.elara.ws/api/packages/music-kraken/pypi" + username: + from_secret: gitea_username + password: + from_secret: gitea_password + when: + - event: manual + - event: tag + + publish-pypi: + image: gitea.elara.ws/music-kraken/plugin-twine + settings: + username: + from_secret: pypi_username + password: + from_secret: pypi_password + when: + - event: manual + - event: tag diff --git a/pyproject.toml b/pyproject.toml index 8fb4f01..40495b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,16 @@ include = ["python_sponsorblock/*.py", "python_sponsorblock/**/*.py" ] packages = ["python_sponsorblock"] [tool.hatch.version] -path = "python_sponsorblock/__about__.py" +source = "vcs" +path = "python_sponsorblock/_version.py" +fallback-version = "0.0.0" + +[tool.hatch.version.raw-options] +local_scheme = "no-local-version" + +[tool.hatch.build.hooks.vcs] +version-file = "python_sponsorblock/_version.py" + [project] name = "python-sponsorblock" diff --git a/python_sponsorblock/_version.py b/python_sponsorblock/_version.py new file mode 100644 index 0000000..0283081 --- /dev/null +++ b/python_sponsorblock/_version.py @@ -0,0 +1,16 @@ +# file generated by setuptools_scm +# don't change, don't track in version control +TYPE_CHECKING = False +if TYPE_CHECKING: + from typing import Tuple, Union + VERSION_TUPLE = Tuple[Union[int, str], ...] +else: + VERSION_TUPLE = object + +version: str +__version__: str +__version_tuple__: VERSION_TUPLE +version_tuple: VERSION_TUPLE + +__version__ = version = '0.1.dev15' +__version_tuple__ = version_tuple = (0, 1, 'dev15') -- 2.45.2 From 68919e2c3519d99924e9d0bdc6bee68a3fb9d09a Mon Sep 17 00:00:00 2001 From: Elara6331 Date: Thu, 25 Apr 2024 19:43:50 -0700 Subject: [PATCH 2/7] ci: remove no-longer-needed __about__ file --- python_sponsorblock/__about__.py | 1 - 1 file changed, 1 deletion(-) delete mode 100644 python_sponsorblock/__about__.py diff --git a/python_sponsorblock/__about__.py b/python_sponsorblock/__about__.py deleted file mode 100644 index c57bfd5..0000000 --- a/python_sponsorblock/__about__.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = '0.0.0' -- 2.45.2 From e97ee0ea130a27e5a31e6ce4d68de20ac8bb33f5 Mon Sep 17 00:00:00 2001 From: Elara6331 Date: Thu, 25 Apr 2024 19:45:09 -0700 Subject: [PATCH 3/7] ci: add version file to gitignore --- .gitignore | 2 ++ python_sponsorblock/_version.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 5d381cc..708cad3 100644 --- a/.gitignore +++ b/.gitignore @@ -160,3 +160,5 @@ cython_debug/ # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +# setuptools-scm +_version.py diff --git a/python_sponsorblock/_version.py b/python_sponsorblock/_version.py index 0283081..7a38155 100644 --- a/python_sponsorblock/_version.py +++ b/python_sponsorblock/_version.py @@ -12,5 +12,5 @@ __version__: str __version_tuple__: VERSION_TUPLE version_tuple: VERSION_TUPLE -__version__ = version = '0.1.dev15' -__version_tuple__ = version_tuple = (0, 1, 'dev15') +__version__ = version = '0.1.dev17' +__version_tuple__ = version_tuple = (0, 1, 'dev17') -- 2.45.2 From 17203825ede2e630959ec263fbd30171d5df74b2 Mon Sep 17 00:00:00 2001 From: Elara6331 Date: Thu, 25 Apr 2024 19:45:45 -0700 Subject: [PATCH 4/7] ci: remove _version.py file --- python_sponsorblock/_version.py | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 python_sponsorblock/_version.py diff --git a/python_sponsorblock/_version.py b/python_sponsorblock/_version.py deleted file mode 100644 index 7a38155..0000000 --- a/python_sponsorblock/_version.py +++ /dev/null @@ -1,16 +0,0 @@ -# file generated by setuptools_scm -# don't change, don't track in version control -TYPE_CHECKING = False -if TYPE_CHECKING: - from typing import Tuple, Union - VERSION_TUPLE = Tuple[Union[int, str], ...] -else: - VERSION_TUPLE = object - -version: str -__version__: str -__version_tuple__: VERSION_TUPLE -version_tuple: VERSION_TUPLE - -__version__ = version = '0.1.dev17' -__version_tuple__ = version_tuple = (0, 1, 'dev17') -- 2.45.2 From b57991c3ce6cf873feebd3a3e8b27ac1a0e313f1 Mon Sep 17 00:00:00 2001 From: Elara6331 Date: Thu, 25 Apr 2024 19:50:11 -0700 Subject: [PATCH 5/7] ci: install requests package --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index f8713e8..207d10c 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -5,7 +5,7 @@ steps: build: image: python commands: - - python -m pip install hatch + - python -m pip install hatch requests - python -m unittest - hatch build when: -- 2.45.2 From 65b1d172539e14fa2d52eab0767d05b44f754d41 Mon Sep 17 00:00:00 2001 From: Elara6331 Date: Thu, 25 Apr 2024 19:56:08 -0700 Subject: [PATCH 6/7] docs: fix command in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3838f2e..6064c61 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This is a wrapper for the sponsorblock api, enabling you to get the timestamps o ```bash # using this gitea repository (recommended) -pip install --index-url https://gitea.elara.ws/api/packages/music-kraken/pypi/simple/ music-kraken +pip install --index-url https://gitea.elara.ws/api/packages/music-kraken/pypi/simple/ python-sponsorblock ``` ```bash -- 2.45.2 From 7d14fef3f5a3f0edadd9a5cf59c9ad4e2244b991 Mon Sep 17 00:00:00 2001 From: Elara6331 Date: Thu, 25 Apr 2024 19:56:55 -0700 Subject: [PATCH 7/7] docs: add ci badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6064c61..280d7d2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Python Sponsorblock +[![status-badge](https://ci.elara.ws/api/badges/61/status.svg)](https://ci.elara.ws/repos/61) + python-sponsorblock logo This is a wrapper for the sponsorblock api, enabling you to get the timestamps of sponsor segments from Youtube videos. -- 2.45.2