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
18 changes: 18 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v0.14.4
_src_path: gl:openscm/copier-core-python-repository
conda_release: true
email: [email protected]
include_cli: false
name: Florence Bockting
notebook_based_docs: true
package_manager: uv
pandas_doctests: true
plot_dependencies: true
project_description_short: Learning prior distributions for model parameters in a
Bayesian model based on expert information.
project_name_human: PyMC elicito
project_name_pip: pymc-elicito
project_name_python: pymc_elicito
project_url: https://github.com/pymc-devs/pymc-elicito
track_lock_file: true
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Bug report
about: Report a bug
title: ''
labels: bug
assignees: ''

---

## Describe the bug
<!--- A clear and concise description of what the bug is. -->

## Failing Test
<!---
Please put the code (ideally in the form of a unit test) which fails below.

e.g.

```python
def test_bug_12():
# Python code here which fails because of the bug
# This is best if other developers can simply copy and paste this test in
# order to run it
```
-->

## Expected behavior
<!--- A clear and concise description of what you expected to happen. -->

## Screenshots
<!--- If applicable, add screenshots to help explain your problem. -->

## System
<!--- Please complete the following information. -->

- OS: [e.g. Windows, Linux, macOS]
- Python version [e.g. Python 3.11]

## Additional context
<!--- Add any other context about the problem here. -->
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Default
about: Report an issue or problem
title: ''
labels: triage
assignees: ''

---

## The problem
<!--- Useful to breakdown to "As a [persona], I [want to do], so that [reason] -->

## Definition of "done"
<!---
What are the things that must be true in order to close this issue
We find that describing these as dot points works well.
-->

## Additional context
<!--- Add any additional context can go here -->
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Feature Request
about: Request a feature or suggest an idea for this project
title: ''
labels: feature
assignees: ''

---

## The motivation

<!--- Useful to breakdown to "As a [persona], I [want to do], so that [reason] -->

## The proposed solution

<!---
If you'd like, please provide a description of the solution you would like to see
If you don't have any ideas for the solution, simply leave this blank
-->

## Alternatives

<!---
If you've considered any alternatives, please describe them here
If you don't have any alternatives, simply leave this blank
-->

## Additional context

<!--- Add any additional context can go here -->
29 changes: 29 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Setup Python and uv"
description: "setup Python and uv"

inputs:
python-version:
description: "Python version to use"
required: true
uv-dependency-install-flags:
description: "Flags to pass to uv when running `uv install`"
required: true
run-uv-install:
description: "Should we run the uv install steps"
required: false
default: true

runs:
using: "composite"
steps:
- name: Setup uv
id: setup-uv
uses: astral-sh/setup-uv@v4
with:
version: "0.8.8"
python-version: ${{ inputs.python-version }}
- name: Install dependencies
shell: bash
if: ${{ (inputs.run-uv-install == 'true') }}
run: |
uv sync ${{ inputs.uv-dependency-install-flags }}
9 changes: 9 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Description

## Checklist

Please confirm that this pull request has done the following:

- [ ] Tests added
- [ ] Documentation added (where applicable)
- [ ] Changelog item added to `changelog/`
3 changes: 3 additions & 0 deletions .github/release_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Announcements

* Announcement 1
78 changes: 78 additions & 0 deletions .github/workflows/bump.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Bump version

on:
workflow_dispatch:
inputs:
bump_rule:
type: choice
description: How to bump the project's version (see https://docs.astral.sh/uv/reference/cli/#uv-version)
options:
- patch
- minor
- major
- stable
- alpha
- beta
- rc
- post
- dev
required: true

jobs:
bump_version:
name: "Bump version and create changelog"
if: "!startsWith(github.event.head_commit.message, 'bump:')"
strategy:
matrix:
os: [ "ubuntu-latest" ]
python-version: [ "3.11" ]
runs-on: "${{ matrix.os }}"
env:
CI_COMMIT_EMAIL: "[email protected]"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"

- uses: ./.github/actions/setup
with:
python-version: ${{ matrix.python-version }}
uv-dependency-install-flags: "--all-extras --group dev"

- name: Create bump and changelog
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$CI_COMMIT_EMAIL"

BASE_VERSION=`sed -ne 's/^version = "\([0-9\.post]*\)"/\1/p' pyproject.toml`
echo "Bumping from version $BASE_VERSION"

# Bump
uv version --bump ${{ github.event.inputs.bump_rule }}

NEW_VERSION=`sed -ne 's/^version = "\([0-9\.]*\)"/\1/p' pyproject.toml`
echo "Bumping to version $NEW_VERSION"

# Build CHANGELOG
uv run towncrier build --yes --version v$NEW_VERSION

# Commit, tag and push
git commit -a -m "bump: version $BASE_VERSION -> $NEW_VERSION"
git tag v$NEW_VERSION
git push && git push --tags

# Bump to alpha (so that future commits do not have the same
# version as the tagged commit)
BASE_VERSION=`sed -ne 's/^version = "\([0-9\.]*\)"/\1/p' pyproject.toml`

# Bump to pre-release of next version
uv version --bump post

NEW_VERSION=`sed -ne 's/^version = "\([0-9\.post]*\)"/\1/p' pyproject.toml`
echo "Bumping version $BASE_VERSION > $NEW_VERSION"

# Commit and push
git commit -a -m "bump(pre-release): version $BASE_VERSION > $NEW_VERSION"
git push
Loading
Loading