Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE]"
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
7 changes: 5 additions & 2 deletions .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ jobs:
id: build_artifacts
run: |
python3 -m build
package_name=$(hatchling metadata name)
package_version=$(hatchling version)
# In case you decide to use chatchling with pyproject.toml only:
# package_name=$(hatchling metadata name)
# package_version=$(hatchling version)
package_name=$(python setup.py --name)
package_version=$(python setup.py --name)
echo "package_name=$package_name" >> $GITHUB_OUTPUT
echo "package_version=$package_version" >> $GITHUB_OUTPUT
- name: Store the distribution packages
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,14 @@ $ ls dist/
Packaging uses [`setuptools-scm`](https://github.com/pypa/setuptools-scm), so the version of the software is based on git tags.

To run the linting, we recommend `ruff`, a standard configuration is in the repo in `pyproject.toml`.

# Releasing
To release a new version of the package, you can create a pre-release from the main branch using GitHub UI, which will then trigger the release workflow. Alternatively, you can use the `gh` command line tool to create a release:

```bash
gh release create v[a.b.c] --prerelease --title "Kick starting the release" --target main
```


# Contributing
We welcome contributions to this project! If you have an idea for a new feature, bug fix, or improvement, please open an issue or submit a pull request. Before contributing, please read our [contributing guidelines](./CONTRIBUTING.md).
43 changes: 35 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
[build-system]
requires = ["setuptools>=71", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "package/_version.py"
write_to_template = "__version__ = \"{version}\"\n"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--strict-markers --doctest-modules --doctest-glob='*.rst' --ignore=setup.py"
Expand Down Expand Up @@ -62,3 +54,38 @@ disallow_untyped_defs = "True"
no_implicit_optional = "True"
show_error_codes = "True"
warn_unused_ignores = "True"

# --- Buildsystem based on setuptools + pyproject.toml : ---

[build-system]
requires = ["setuptools>=71", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"


[tool.setuptools_scm]
write_to = "package/_version.py"
write_to_template = "__version__ = \"{version}\"\n"


# --- Alternative with hatchling with pyproject.toml only: ---
#[project]
#name = "Squarer"
#dynamic = ["version"]

#[build-system]
#requires = ["hatchling>=1.24.2", "hatch-vcs>=0.3.0"]
#build-backend = "hatchling.build"

#[tool.hatch.version]
#source = "vcs"

#[tool.hatch.version.raw-options]
#version_scheme = "python-simplified-semver"
#local_scheme = "no-local-version"
#parentdir_prefix_version = "v"
#git_describe_command = ["git", "describe", "--dirty", "--tags", "--long", "--match", "v*"]

#[tool.hatch.build.hooks.vcs]
#version-file = "package/_version.py"

# -------------------------------------------------------------
Loading