From 2f1db4b690d7cffe8d4bce02eb164f007d9c98b8 Mon Sep 17 00:00:00 2001 From: Gregor Sturm Date: Tue, 1 Oct 2024 14:30:34 +0200 Subject: [PATCH 1/6] Set PyPI name --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 351ea80..85cb18c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest environment: name: pypi - url: https://pypi.org/p/dso # TODO update once settled on a name + url: https://pypi.org/p/dso-cli permissions: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: From bd71304e578c2651329773d2702541b8b173e6d0 Mon Sep 17 00:00:00 2001 From: Gregor Sturm Date: Tue, 1 Oct 2024 14:34:15 +0200 Subject: [PATCH 2/6] simplify pre-commit --- .github/workflows/pre_commit.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml index e15cbc1..9987dc7 100644 --- a/.github/workflows/pre_commit.yml +++ b/.github/workflows/pre_commit.yml @@ -1,24 +1,26 @@ -name: "DSO lint" on: push: branches: [main] pull_request: + branches: [main] + +name: pre-commit jobs: - pre_commit: - name: "pre-commit" + pre-commit: + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. + contents: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - cache: "pip" - - uses: pre-commit/action@v2.0.3 - uses: stefanzweifel/git-auto-commit-action@v5 if: '!cancelled()' + with: + commit_message: pre-commit autofixes From ad52f59f14c6e8b09a890ccd07a3b2a7ae30d768 Mon Sep 17 00:00:00 2001 From: Gregor Sturm Date: Tue, 1 Oct 2024 14:35:08 +0200 Subject: [PATCH 3/6] Switch to dynamic versioning --- pyproject.toml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5e7aaa9..ce2c561 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [build-system] build-backend = "hatchling.build" -requires = [ "hatchling" ] +requires = [ "hatchling", "hatch-vcs" ] [project] name = "dso" -version = "0.8.2" +dynamic = ["version"] description = "Data Science Operations on top of dvc" readme = "README.md" license = { file = "LICENSE" } @@ -68,6 +68,9 @@ urls.Source = "https://github.com/Boehringer-Ingelheim/dso" scripts.dso = "dso:cli" scripts.dso_pandocfilter = "dso.pandocfilter:main" +[tool.hatch.version] +source = "vcs" + [tool.ruff] line-length = 120 src = [ "src" ] From 6b8fd63af882493a111c0cbdfa3e76505f18997c Mon Sep 17 00:00:00 2001 From: Gregor Sturm Date: Tue, 1 Oct 2024 14:39:48 +0200 Subject: [PATCH 4/6] Fix pre-commit --- .github/workflows/release.yml | 2 +- pyproject.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 85cb18c..d2da62d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest environment: name: pypi - url: https://pypi.org/p/dso-cli + url: https://pypi.org/p/dso-cli permissions: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: diff --git a/pyproject.toml b/pyproject.toml index ce2c561..bf0e178 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,9 @@ [build-system] build-backend = "hatchling.build" -requires = [ "hatchling", "hatch-vcs" ] +requires = [ "hatch-vcs", "hatchling" ] [project] name = "dso" -dynamic = ["version"] description = "Data Science Operations on top of dvc" readme = "README.md" license = { file = "LICENSE" } @@ -23,6 +22,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", ] +dynamic = [ "version" ] dependencies = [ "dvc", "jinja2", From ee9673ef1406781c9de156e1ca45de5489178024 Mon Sep 17 00:00:00 2001 From: Gregor Sturm Date: Tue, 1 Oct 2024 14:40:44 +0200 Subject: [PATCH 5/6] Update pre-commit hooks --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9f96f4a..049a5d2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: # - id: prettier # exclude: '^src/dso/templates/.*\.yaml$' # prettier messes with jinja2 templating here - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.7 + rev: v0.6.8 hooks: - id: ruff types_or: [python, pyi, jupyter] From 33ea9a8b2722eb9c27d89a811bfcf5d92a422ea5 Mon Sep 17 00:00:00 2001 From: Gregor Sturm Date: Tue, 1 Oct 2024 14:42:36 +0200 Subject: [PATCH 6/6] fix merge conflict --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1ffd49a..bf0e178 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,6 @@ requires = [ "hatch-vcs", "hatchling" ] [project] name = "dso" -dynamic = ["version"] description = "Data Science Operations on top of dvc" readme = "README.md" license = { file = "LICENSE" }