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
51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: 🐛 Bug report
description: Report a bug currently impacting orca_python.
title: "BUG: "
labels: ["bug"]

body:
- type: markdown
attributes:
value: >
#### You can see if the bug has already been addressed by searching
through the open and closed [issues](https://github.com/ayrna/orca_python/issues?q=is%3Aissue).
- type: textarea
attributes:
label: Describe the bug
description: >
A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
attributes:
label: Steps/Code to reproduce the bug
description: |
Please include a [minimal reproducible example](https://stackoverflow.com/help/mcve) so users can reproduce the error when running it. Be as succinct as possible, and do not depend on external data files.

If the code is too long, feel free to put it in a public [gist](https://gist.github.com) and link it in the issue.
placeholder: |
```python
Your code here. placing your code between three backticks will format it like the above example.
```
- type: textarea
attributes:
label: Expected results
description: >
Please provide a clear and concise description of the expected results or paste the correct output if available.
placeholder: >
For example: No error is thrown, or y_name1 == y_name2.
validations:
required: true
- type: textarea
attributes:
label: Actual results
description: |
Please provide a clear and concise description of the actual seen results or paste the incorrect output if available.

If you observe an error, please paste the error message including the full traceback of the exception.
placeholder: |
```python-traceback
Place traceback error here if applicable. If your issue has no traceback, please describe the observed output without formatting.
```
validations:
required: true
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/doc_improvement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 📖 Documentation improvement
description: Create a report to help us improve the orca_python documentation.
title: "DOC: "
labels: ["documentation"]

body:
- type: textarea
attributes:
label: Describe the issue linked to the documentation
description: >
Tell us what part of the documentation you think needs improvement.
validations:
required: true
- type: textarea
attributes:
label: Suggest a potential alternative/fix
description: >
Tell us how you think the documentation could be improved.
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 🚀 Feature request
description: Suggest a new feature or idea for orca_python.
title: "ENH: "
labels: ["enhancement"]

body:
- type: textarea
attributes:
label: Describe the feature or idea you want to propose
description: >
Please provide a clear and concise description of the feature or idea you are proposing.
validations:
required: true
- type: textarea
attributes:
label: Describe your proposed solution
description: >
Please provide a description of your desired outcome, ideally aligning with the existing toolbox design, classes, and methods.
validations:
required: true
- type: textarea
attributes:
label: Describe alternatives you have considered, if relevant
description: >
Please provide any alternative solutions or features you have considered.
- type: textarea
attributes:
label: Additional context
description: >
Add any other context about the problem here.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/other_issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: ❗ Other issue
description: Other issue not covered by the other templates.
title: "MNT: "
labels: ["maintenance"]

body:
- type: markdown
attributes:
value: >
If the issue is maintenance related, please start the title with MNT: and add the maintenance tag, or use any other tag available in the repository.
- type: textarea
attributes:
label: Describe the issue
validations:
required: true
- type: textarea
attributes:
label: Suggest a potential alternative/fix
- type: textarea
attributes:
label: Additional context
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!--
Thanks for contributing with a pull request!
Feel free to delete sections the template if they do not apply to the PR.
-->

#### Reference Issues/PRs

<!--
i.e. Fixes #1234 or See #3456.
-->

#### What does this implement/fix? Explain your changes

<!--
A clear and concise description of what you have implemented.
-->

#### Any other comments?

<!--
Please be aware that we are a team of volunteers so patience is necessary.
-->
62 changes: 62 additions & 0 deletions .github/workflows/pr_precommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: PR pre-commit

on:
push:
branches:
- main
pull_request_target:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true


jobs:
pre-commit:
runs-on: ubuntu-24.04

steps:
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_KEY }}

- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
token: ${{ steps.app-token.outputs.token }}

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- uses: tj-actions/changed-files@v46.0.5
id: changed-files

- name: List changed files
run: echo '${{ steps.changed-files.outputs.all_changed_files }}'

# only check the full repository if PR and correctly labelled
- if: ${{ github.event_name != 'pull_request_target' || contains(github.event.pull_request.labels.*.name, 'full pre-commit') }}
name: Full pre-commit
uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files
- if: ${{ github.event_name == 'pull_request_target' && !contains(github.event.pull_request.labels.*.name, 'full pre-commit') }}
name: Local pre-commit
uses: pre-commit/action@v3.0.1
with:
extra_args: --files ${{ steps.changed-files.outputs.all_changed_files }}

# push fixes if pre-commit fails and PR is eligible
- if: ${{ failure() && github.event_name == 'pull_request_target' && !github.event.pull_request.draft && !contains(github.event.pull_request.labels.*.name, 'stop pre-commit fixes') }}
name: Push pre-commit fixes
uses: stefanzweifel/git-auto-commit-action@v6
with:
commit_message: Automatic `pre-commit` fixes
commit_user_name: ayrna-actions-bot[bot]
create_branch: false
67 changes: 67 additions & 0 deletions .github/workflows/pr_pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Run Tests

on:
push:
branches:
- main
paths:
- "orca_python/**"
- ".github/workflows/**"
- "pyproject.toml"
pull_request:
branches:
- main
paths:
- "orca_python/**"
- ".github/workflows/**"
- "pyproject.toml"

jobs:
pytest:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Run tests
run: pytest -n auto

tests-dev-docs:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev,docs]"

- name: Run tests
run: pytest
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ dev = [
"black",
"pre-commit",
"pytest",
"pytest-cov"
"pytest-cov",
"pytest-xdist[psutil]"
]

[project.urls]
Expand Down