diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..6c6d1dc --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 + +updates: + - package-ecosystem: pip + directory: / + schedule: + interval: weekly + open-pull-requests-limit: 10 + target-branch: main + + - package-ecosystem: conda + directory: / + schedule: + interval: weekly + open-pull-requests-limit: 10 + target-branch: main diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..71ade7a --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +name: Publish to PyPI + +on: + push: + tags: + - 'v*.*.*' + +permissions: + contents: read + id-token: write + +jobs: + publish: + name: Publish to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/project/superblockify/ + + steps: + - uses: actions/checkout@v4 + + - name: Build package + run: | + python -m pip install build + python -m build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..1a2c43a --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,19 @@ +name: release-please + +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + config-file: release-please-config.json diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b751ab9..cee1843 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,6 +27,7 @@ the experience for all involved. The community looks forward to your contributio - [Reporting Bugs](#reporting-bugs) - [Suggesting Enhancements](#suggesting-enhancements) - [Your First Code Contribution](#your-first-code-contribution) + - [Conventional Commits](#conventional-commits) ## I Have a Question @@ -193,6 +194,26 @@ pylint -d E0401 superblockify/ black superblockify/ tests/ ``` +### Conventional Commits + +This project uses [Conventional Commits](https://www.conventionalcommits.org/) for automated versioning and changelog generation. Please use the following format for your commit messages: + +- `feat:` - A new feature (triggers minor version bump) +- `fix:` - A bug fix (triggers patch version bump) +- `docs:` - Documentation only changes +- `style:` - Changes that do not affect the meaning of the code +- `refactor:` - Code change that neither fixes a bug nor adds a feature +- `perf:` - Code change that improves performance +- `test:` - Adding missing tests or correcting existing tests +- `build:` - Changes that affect the build system or external dependencies +- `ci:` - Changes to CI configuration files and scripts +- `chore:` - Other changes that don't modify src or test files + +For breaking changes, add `!` after the type: +``` +feat!: break something +``` + ## Attribution This guide is based on the diff --git a/docs/conf.py b/docs/conf.py index 4745252..5c33dc3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -25,7 +25,7 @@ project = "superblockify" copyright = f"2023-{datetime.now().year}, superblockify developers" author = "superblockify developers" -release = "1.0.1" +release = "1.0.1" # x-release-please-version # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/pyproject.toml b/pyproject.toml index bb6d281..dcb9e21 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,9 +84,6 @@ superblockify = ["*.cfg", "*.yml"] jobs = 5 # Pickle collected data for later comparisons. persistent = true -# When enabled, pylint would attempt to guess common misconfiguration and emit -# user-friendly hints instead of false-positive error messages. -suggestion-mode = true [tool.pylint.basic] # Regular expression matching correct module names. Overrides module-naming- diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..defc400 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,11 @@ +{ + "packages": { + ".": { + "release-type": "python", + "extra-files": [ + "superblockify/_version.py", + "docs/conf.py" + ] + } + } +} diff --git a/superblockify/_version.py b/superblockify/_version.py index 901b7c0..7a5dfb9 100644 --- a/superblockify/_version.py +++ b/superblockify/_version.py @@ -1,3 +1,3 @@ """superblockify package version.""" -__version__ = "1.0.1" +__version__ = "1.0.1" # x-release-please-version