Skip to content

Commit 06272c1

Browse files
committed
Merge remote-tracking branch 'origin/main' into loosen
# Conflicts: # django_unicorn/static/unicorn/js/unicorn.min.js # pyproject.toml
2 parents 30b2117 + 807a35d commit 06272c1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+2152
-1111
lines changed

.all-contributorsrc

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,42 @@
259259
"code",
260260
"test"
261261
]
262+
},
263+
{
264+
"login": "mihrab34",
265+
"name": "Akintola Rahmat",
266+
"avatar_url": "https://avatars.githubusercontent.com/u/35562131?v=4",
267+
"profile": "https://rahma.hashnode.dev/",
268+
"contributions": [
269+
"code"
270+
]
271+
},
272+
{
273+
"login": "tataraba",
274+
"name": "Mario Munoz",
275+
"avatar_url": "https://avatars.githubusercontent.com/u/46942991?v=4",
276+
"profile": "https://www.pythonbynight.com",
277+
"contributions": [
278+
"doc"
279+
]
280+
},
281+
{
282+
"login": "epw1624",
283+
"name": "Emily Wood",
284+
"avatar_url": "https://avatars.githubusercontent.com/u/112768709?v=4",
285+
"profile": "https://github.com/epw1624",
286+
"contributions": [
287+
"code"
288+
]
289+
},
290+
{
291+
"login": "JeremyLWright",
292+
"name": "Jeremy Wright",
293+
"avatar_url": "https://avatars.githubusercontent.com/u/2302957?v=4",
294+
"profile": "https://quiescent.us",
295+
"contributions": [
296+
"code"
297+
]
262298
}
263299
],
264300
"contributorsPerLine": 7,

.github/ISSUE_TEMPLATE/bugs.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: 🐛 Bug Report
2+
description: Report bugs to fix and improve.
3+
title: "[Bug] <description>:"
4+
labels: ["bug"]
5+
6+
body:
7+
- type: textarea
8+
id: description
9+
attributes:
10+
label: Bug Description
11+
description: Please provide as much detail as possible.
12+
validations:
13+
required: true
14+
15+
- type: textarea
16+
id: expected
17+
attributes:
18+
label: Expected behaviour
19+
description: A clear and concise description of what you expected to happen.
20+
validations:
21+
required: true
22+
23+
- type: textarea
24+
id: screenshots
25+
attributes:
26+
label: Screenshots / Screenrecords
27+
description: Please add a screenshot/ short video of the bug you faced.
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: steps
33+
attributes:
34+
label: Steps to reproduce
35+
placeholder: Add all steps/share a github gist that can help anyone reproduce the bug
36+
37+
- type: dropdown
38+
id: browsers
39+
attributes:
40+
label: What browsers are you seeing the problem on?
41+
multiple: true
42+
options:
43+
- Firefox
44+
- Chrome
45+
- Safari
46+
- Microsoft Edge
47+
- Brave
48+
- Others
49+
50+
- type: checkboxes
51+
id: no-duplicate-issues
52+
attributes:
53+
label: "👀 Have you checked for similar open issues?"
54+
options:
55+
- label: "I checked and didn't find similar issue"
56+
required: true
57+
58+
- type: checkboxes
59+
id: terms
60+
attributes:
61+
label: Code of Conduct
62+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/adamghill/django-unicorn/blob/main/DEVELOPING.md).
63+
# the description can be changed to the contributing.md once it's available
64+
options:
65+
- label: I agree to follow this project's Code of Conduct
66+
required: true
67+
68+
- type: dropdown
69+
attributes:
70+
label: Are you willing to work on this issue ?
71+
description: This is absolutely not required, but we are happy to guide you in the contribution process.
72+
options:
73+
- "Yes I am willing to submit a PR!"
74+
- "No, someone else can work on it"

.github/ISSUE_TEMPLATE/docs.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: 📑 Docs
2+
description: Propose changes and improvements to Django Unicorn Docs.
3+
labels: "📑 docs"
4+
title: "[📑 Docs]: "
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thank you for contributing to Django Unicorn! 📑 👩🏻‍💻 We appreciate your feedback, ideas, and contributions.
11+
12+
Before filing this issue, please make sure to check if there's already a similar issue opened.
13+
14+
- type: textarea
15+
id: reason-context
16+
attributes:
17+
label: What Dev Docs changes are you proposing?
18+
description: Why do the Docs need this improvement? What is the motivation for this change?
19+
placeholder: "I would like to contribute to Django Unicorn 📑 by..."
20+
validations:
21+
required: true
22+
23+
- type: checkboxes
24+
id: terms
25+
attributes:
26+
label: Code of Conduct
27+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/adamghill/django-unicorn/blob/main/CODE_OF_CONDUCT.md)
28+
options:
29+
- label: I agree to follow this project's Code of Conduct
30+
required: true

.github/ISSUE_TEMPLATE/features.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: 💡 Feature Request
3+
about: Suggest a new idea/feature
4+
title: '[FEATURE] <description>'
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
11+
**Note: Please search to see if an issue already exists for the feature.**
12+
13+
14+
### Why do we need this improvement?
15+
<!-- Why do we need this improvement? -->
16+
17+
### How will this change help?
18+
<!-- How will this change help? -->
19+
20+
### Please add screenshots if applicable
21+
<!-- Please add screenshots if applicable -->
22+
23+
### How could it be implemented/designed?
24+
<!-- How will it be implemented/designed? -->
25+
26+
### Will this be a breaking change?
27+
<!-- Will this be a breaking change? -->
28+
- [ ] Yes
29+
- [ ] No
30+
31+
### Have you read the Contributing guidelines?
32+
- [ ] I have read the [Contributing guidelines](https://github.com/adamghill/django-unicorn/blob/main/DEVELOPING.md)
33+
34+
### Are you willing to work on this issue?
35+
<!-- This is absolutely not required, but we are happy to guide you in the contribution process. -->
36+
- [ ] Yes I am willing to submit a PR!
37+
- [ ] No, someone else can work on it.
38+
39+
### Anything else:
40+
<!--
41+
Links? References? Anything that will give us more context about the feature you're proposing!
42+
-->
43+
44+
### References:
45+
This document was adapted from the open-source issue templates for Async API

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "main"
8+
9+
env:
10+
PYTHON_VERSION: 3.11
11+
12+
jobs:
13+
test:
14+
name: Run tests & display coverage
15+
runs-on: ubuntu-latest
16+
permissions:
17+
# Gives the action the necessary permissions for publishing new
18+
# comments in pull requests.
19+
pull-requests: write
20+
# Gives the action the necessary permissions for pushing data to the
21+
# python-coverage-comment-action branch, and for editing existing
22+
# comments (to avoid publishing multiple comments in the same PR)
23+
contents: write
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 1
28+
29+
- name: Install Poetry
30+
run: |
31+
pipx install poetry
32+
poetry config virtualenvs.path ~/.virtualenvs${{ env.PYTHON_VERSION }}
33+
34+
- name: Set up Python ${{ env.PYTHON_VERSION }}
35+
uses: actions/setup-python@v3
36+
with:
37+
python-version: ${{ env.PYTHON_VERSION }}
38+
cache: "poetry"
39+
40+
- name: Install dependencies
41+
run: |
42+
poetry install -E minify
43+
44+
- name: Produce the .coverage file
45+
run: poetry run coverage run -m pytest
46+
47+
- name: Coverage comment
48+
id: coverage_comment
49+
uses: py-cov-action/python-coverage-comment-action@v3
50+
with:
51+
GITHUB_TOKEN: ${{ github.token }}
52+
53+
- name: Store Pull Request comment to be posted
54+
uses: actions/upload-artifact@v4
55+
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
56+
with:
57+
# If you use a different name, update COMMENT_ARTIFACT_NAME accordingly
58+
name: python-coverage-comment-action
59+
# If you use a different name, update COMMENT_FILENAME accordingly
60+
path: python-coverage-comment-action.txt

.github/workflows/coverage.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Post coverage comment
2+
3+
on:
4+
workflow_run:
5+
workflows: ["CI"]
6+
types:
7+
- completed
8+
9+
jobs:
10+
test:
11+
name: Run tests & display coverage
12+
runs-on: ubuntu-latest
13+
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
14+
permissions:
15+
# Gives the action the necessary permissions for publishing new
16+
# comments in pull requests.
17+
pull-requests: write
18+
# Gives the action the necessary permissions for editing existing
19+
# comments (to avoid publishing multiple comments in the same PR)
20+
contents: write
21+
# Gives the action the necessary permissions for looking up the
22+
# workflow that launched this workflow, and download the related
23+
# artifact that contains the comment to be published
24+
actions: read
25+
steps:
26+
# DO NOT run actions/checkout here, for security reasons
27+
# For details, refer to https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
28+
- name: Post comment
29+
uses: py-cov-action/python-coverage-comment-action@v3
30+
with:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
GITHUB_PR_RUN_ID: ${{ github.event.workflow_run.id }}
33+
# Update those if you changed the default values:
34+
# COMMENT_ARTIFACT_NAME: python-coverage-comment-action
35+
# COMMENT_FILENAME: python-coverage-comment-action.txt

.github/workflows/js.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: JavaScript
2-
on: [push]
2+
on:
3+
push:
4+
workflow_dispatch:
35

46
jobs:
57
test:

.github/workflows/python.yml

Lines changed: 54 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,73 @@
11
name: Python
2-
on: [push]
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
env:
8+
LINT_PYTHON_VERSION: 3.11
39

410
jobs:
5-
test:
11+
lint:
612
runs-on: ubuntu-latest
7-
strategy:
8-
matrix:
9-
python-version: [3.8, 3.9, "3.10", "3.11"]
1013

1114
steps:
12-
- uses: actions/checkout@v2.3.4
15+
- uses: actions/checkout@v3
1316
with:
1417
fetch-depth: 1
1518

16-
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/[email protected]
19+
- name: Install Poetry
20+
run: |
21+
pipx install poetry
22+
poetry config virtualenvs.path ~/.virtualenvs${{ env.LINT_PYTHON_VERSION }}
23+
24+
- name: Set up Python ${{ env.LINT_PYTHON_VERSION }}
25+
uses: actions/setup-python@v3
1826
with:
19-
python-version: ${{ matrix.python-version }}
27+
python-version: ${{ env.LINT_PYTHON_VERSION }}
28+
cache: "poetry"
2029

21-
- name: Install Poetry
22-
uses: abatilo/[email protected]
30+
- name: Install dependencies
31+
run: |
32+
poetry install
33+
34+
- name: ruff check
35+
run: poetry run ruff check .
36+
37+
- name: mypy check
38+
run: poetry run mypy django_unicorn
39+
40+
test:
41+
runs-on: ubuntu-latest
42+
strategy:
43+
matrix:
44+
python-version: ["3.10", "3.11", "3.12"]
45+
django-version: ["4.1", "4.2", "5.0"]
46+
47+
steps:
48+
- uses: actions/checkout@v3
2349
with:
24-
poetry-version: 1.6.1
50+
fetch-depth: 1
2551

26-
- name: Set Poetry config
52+
- name: Install Poetry
2753
run: |
54+
pipx install poetry
2855
poetry config virtualenvs.path ~/.virtualenvs${{ matrix.python-version }}
2956
57+
- name: Set up Python ${{ matrix.python-version }}
58+
uses: actions/setup-python@v3
59+
with:
60+
python-version: ${{ matrix.python-version }}
61+
cache: "poetry"
62+
3063
- name: Install dependencies
31-
run: poetry install
64+
run: |
65+
poetry env use ${{ matrix.python-version }}
66+
poetry add django==${{ matrix.django-version }}
67+
poetry install -E minify
3268
33-
- name: ruff check
34-
run: poetry run ruff .
69+
- name: Fast tests
70+
run: poetry run pytest -m 'not slow'
3571

36-
- name: Run all tests
37-
run: poetry run nox
72+
- name: Slow tests
73+
run: poetry run pytest -m 'slow'

0 commit comments

Comments
 (0)