Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add templates for PRs and automated release notes #3381

Merged
merged 10 commits into from
Mar 30, 2024
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
16 changes: 0 additions & 16 deletions .github/ISSUE_TEMPLATE/bug-report.md

This file was deleted.

34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Bug report
description: Report something that is broken
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!

Note that since Altair is a Python wrapper around the Vega-Lite visualization grammar, [most bugs should be reported directly to Vega-Lite](https://github.com/vega/vega-lite/issues). You can click the Action Button (`...`) of your Altair chart and "Open in Vega Editor" to see if you get the same error in the Vega Editor.

If you can't reproduce the bug in the Vega Editor, then make sure you are using [the latest version of Altair](https://github.com/altair-viz/altair/releases) and search for duplicate issues before filling out the form below.
- type: textarea
id: what-happened
attributes:
label: What happened?
description: |
Describe what happened and how to reproduce the bug.
Include the full code and data to reproduce it. Use a simple toy data set, e.g. from `vega_datasets`.
validations:
required: true
- type: textarea
id: desired-behavior
attributes:
label: What would you like to happen instead?
description: Describe the expected/desired behavior.
- type: input
id: altair-version
attributes:
label: Which version of Altair are you using?
description: Use `alt.__version__` to find out
- type: markdown
attributes:
value: By submitting this issue, you agree to follow our [Code of Conduct](../../CODE_OF_CONDUCT.md).
15 changes: 0 additions & 15 deletions .github/ISSUE_TEMPLATE/feature-request.md

This file was deleted.

26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Feature request
description: Suggest an improvement
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to suggest a new feature!

Note that since Altair is a Python wrapper around the Vega-Lite visualization grammar, [most feature requests should be reported directly to Vega-Lite](https://github.com/vega/vega-lite/issues). You can click the Action Button (`...`) of your Altair chart and "Open in Vega Editor" to see the Vega-Lite chart specification.

If you believe this feature is more relevant for Altair than Vega-Lite, then make sure to search for duplicate issues before filling out the form below.
- type: textarea
id: what-happened
attributes:
label: What is your suggestion?
description: Describe the feature's goal, motivating use cases, and its expected behavior.
validations:
required: true
- type: textarea
id: alternative-solutions
attributes:
label: Have you considered any alternative solutions?
- type: markdown
attributes:
value: By submitting this issue, you agree to follow our [Code of Conduct](../../CODE_OF_CONDUCT.md).
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Click "Preview" to read this message; then delete it. -->

Thanks for contributing to Altair!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the text! Could we wrap it in <!-- Here the text --> so that we don't even have to delete the message before submitting the PR? See how Ibis handles this: https://raw.githubusercontent.com/ibis-project/ibis/main/.github/PULL_REQUEST_TEMPLATE.md

I think I've also seen this in other repos as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I have seen this in other repos too, however I'm a bit split on whether it is preferable. The reason I kept it as uncommented text here is so that it can be read in the rich preview; I find that the links makes the comment cluttered and hard to parse.

For the issues, the answer is to use "Issue forms" instead of the regular templates. This renders links and formatting nicely while not including it in the actual issue. In my latest commit I switched both our issue templates over, you can see a demo in this other repo I made.

image

image

Unfortunately, forms don't exist for PR .


Please follow these guidelines when submitting your PR:

- Describe the purpose of the changes in PR, so that it is easy to understand the implication of the suggested changes.
- Here is a [helpful article about writing effective PR descriptions](https://medium.com/@greenberg/writing-pull-requests-your-coworkers-might-enjoy-reading-9d0307e93da3).
- Include unit tests and documentation for new features
- Ensure that the title is a concise [semantic commit message](https://www.conventionalcommits.org/) (e.g. "feat: Add `embed_options` to charts").
- Append `!` if the change is breaking (e.g. "fix!: Raise error when `embed_options` is `None`")
17 changes: 17 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
changelog:
categories:
- title: Enhancements
labels:
- enhancement
- title: Bug Fixes
labels:
- bug
- title: Maintainance
labels:
- maintainance
- title: Documentation
labels:
- documentation
- title: Other Changes
labels:
- "*"
20 changes: 20 additions & 0 deletions .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading