diff --git a/.cz.toml b/.cz.toml index 5de657e..50bbefc 100644 --- a/.cz.toml +++ b/.cz.toml @@ -1,7 +1,4 @@ [tool.commitizen] bump_message = "build(version): :bookmark: update version from $current_version to $new_version [skip ci]" update_changelog_on_bump = true -version_provider = "poetry" -version_files = [ - "pyproject.toml" -] +version_provider = "uv" diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7d9cdca..52d525a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -10,4 +10,4 @@ justfile .gitignore ruff.toml pyproject.toml -poetry.lock +uv.lock diff --git a/.github/sync.yml b/.github/sync.yml index 1303385..65c4c29 100644 --- a/.github/sync.yml +++ b/.github/sync.yml @@ -11,8 +11,6 @@ group: dest: .gitignore - source: justfile dest: justfile - - source: poetry.toml - dest: poetry.toml - source: .cz.toml dest: .cz.toml - source: ruff.toml diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..e4fba21 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.12 diff --git a/README.md b/README.md index 448872f..4348da7 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,6 @@ gh repo create NAME --template seedcase-project/template-python-project ## Setting things up after cloning -To add Poetry: - -``` bash -cd new-project -poetry init -``` - Search for `NAME` and `REPO` and replace them with the name of your project and the repository name. Then look for any `TODO` items. ## Setting things up diff --git a/justfile b/justfile index 83621d8..a300524 100644 --- a/justfile +++ b/justfile @@ -6,20 +6,20 @@ run-all: install-deps format-python check-python test-python check-commits build # Install Python package dependencies install-deps: - poetry install + uv sync # Run the Python tests test-python: - poetry run pytest + uv run pytest # Check Python code with the linter for any errors that need manual attention check-python: - poetry run ruff check . + uv run ruff check . # Reformat Python code to match coding style and general structure format-python: - poetry run ruff check --fix . - poetry run ruff format . + uv run ruff check --fix . + uv run ruff format . # Build the documentation website using Quarto build-website: @@ -28,8 +28,8 @@ build-website: # Delete any previously built files from quartodoc. # -f is to not give an error if the files don't exist yet. rm -f docs/reference/*.qmd - poetry run quartodoc build - poetry run quarto render --execute + uv run quartodoc build + uv run quarto render --execute # Run checks on commits with non-main branches check-commits: @@ -38,7 +38,7 @@ check-commits: number_of_commits=$(git rev-list --count HEAD ^main) if [[ ${branch_name} != "main" && ${number_of_commits} -gt 0 ]] then - poetry run cz check --rev-range main..HEAD + uv run cz check --rev-range main..HEAD else echo "Can't either be on ${branch_name} or have more than ${number_of_commits}." fi diff --git a/poetry.toml b/poetry.toml deleted file mode 100644 index acaf856..0000000 --- a/poetry.toml +++ /dev/null @@ -1,2 +0,0 @@ -[virtualenvs] -path = ".venv" diff --git a/pyproject.toml b/pyproject.toml index db412f7..415bf77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,44 +1,41 @@ -[tool.poetry] +[project] name = "template-python-package" -version = "0.0.1" -description = "" +version = "0.1.0" +description = "Template Python Package" authors = [ - "Luke W. Johnston ", - "Kristiane Beicher ", - "Signe Kirk Brødbæk ", - "Marton Vago ", + {name = "Luke W. Johnston", email = "lwjohnst@gmail.com" }, + {name = "Kristiane Beicher", email = "kris.beicher@clin.au.dk" }, + {name = "Signe Kirk Brødbæk", email = "signekb@clin.au.dk" }, + {name = "Marton Vago", email = "marton.vago95@gmail.com" }, ] maintainers = [ - "Luke W. Johnston ", - "Kristiane Beicher ", - "Signe Kirk Brødbæk ", - "Marton Vago ", + {name = "Luke W. Johnston", email = "lwjohnst@gmail.com" }, + {name = "Kristiane Beicher", email = "kris.beicher@clin.au.dk" }, + {name = "Signe Kirk Brødbæk", email = "signekb@clin.au.dk" }, + {name = "Marton Vago", email = "marton.vago95@gmail.com" }, ] readme = "README.md" -homepage = "https://NAME.seedcase-project.org" -repository = "https://github.com/seedcase-project/REPO" license = "MIT" +license-files = ["LICENSE.md"] +requires-python = ">=3.12" +dependencies = [] -[tool.poetry.urls] -"Bug Tracker" = "https://github.com/seedcase-project/REPO/issues" - -[tool.poetry.dependencies] -python = "^3.12" - -[tool.poetry.group.test.dependencies] -pytest = "^8.3.2" +# TODO: Update these +[project.urls] +homepage = "https://PROJECT.seedcase-project.org" +repository = "https://github.com/seedcase-project/REPO" +changelog = "https://github.com/seedcase-project/REPO/blob/main/CHANGELOG.md" +issues = "https://github.com/seedcase-project/REPO/issues" -[tool.poetry.group.dev.dependencies] -ruff = "^0.6.2" [build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +requires = ["hatchling"] +build-backend = "hatchling.build" [tool.pytest.ini_options] addopts = [ # A short traceback mode to make it easier to view "--tb=short", - # Use the package in `src/` + # Use the `src/` package "--import-mode=importlib", ]