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 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: 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" ]