Skip to content

Commit 3cafc66

Browse files
committed
Rework the package with MIT license
1 parent 5e2556c commit 3cafc66

Some content is hidden

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

79 files changed

+2317
-1602
lines changed

.editorconfig

-17
This file was deleted.

.env.defaults

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
BOOTSTRAP_DATEPICKER_PLUS_APP_STATIC_URL="bootstrap_datepicker_plus/"

.github/workflows/build.yml

+74-13
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,107 @@ on:
66
pull_request:
77

88
jobs:
9-
build:
10-
if: "!contains(github.event.head_commit.message, 'skip-ci')"
9+
pre-build:
1110
runs-on: ubuntu-latest
1211
strategy:
1312
matrix:
14-
python-version: ["3.10", "3.9", "3.8", "3.7"]
13+
python-version: ["3.11"]
1514
steps:
1615
- uses: actions/checkout@v3
1716

1817
- name: Install poetry
1918
run: pipx install poetry
2019

21-
- uses: actions/setup-python@v3
20+
- uses: actions/setup-python@v4
2221
with:
2322
python-version: ${{ matrix.python-version }}
2423
cache: poetry
2524

25+
- name: Check poetry.lock
26+
run: |
27+
poetry env use ${{ matrix.python-version }}
28+
poetry lock --check
29+
2630
- name: Install dependencies
2731
run: |
2832
poetry env use ${{ matrix.python-version }}
29-
poetry install --no-ansi --no-root --no-interaction --only build
30-
poetry run pip install -r tests/requirements.txt
33+
poetry install --no-root --only build --no-ansi --no-interaction
34+
poetry run pip install -c tests/pip-constraints.txt .
3135
3236
- name: Lint
3337
run: poetry run poe lint
3438

3539
- name: Test Coverage
36-
run: poetry run coverage run
40+
run: poetry run poe test-cov
3741

38-
- name: Coveralls.io notification
39-
uses: miurahr/coveralls-python-action@b5f4b04e702438c3f7eceb03acf0f3c60dbe252e
42+
- name: Coveralls Parallel
43+
uses: coverallsapp/github-action@master
4044
with:
45+
github-token: ${{ secrets.GITHUB_TOKEN }}
46+
flag-name: run-${{ matrix.python-version }}
4147
parallel: true
42-
flag-name: Unit Test
4348

44-
coveralls_finish:
45-
needs: build
49+
- name: Upload pages artifact
50+
uses: actions/upload-pages-artifact@v1
51+
if: github.event_name == 'push' && github.ref_name == 'master' && github.repository_owner == 'monim67'
52+
with:
53+
path: ./pages
54+
55+
build:
4656
runs-on: ubuntu-latest
57+
needs: pre-build
58+
strategy:
59+
matrix:
60+
python-version: ["3.10", "3.9", "3.8", "3.7"]
61+
steps:
62+
- uses: actions/checkout@v3
63+
64+
- name: Install poetry
65+
run: pipx install poetry
66+
67+
- uses: actions/setup-python@v4
68+
with:
69+
python-version: ${{ matrix.python-version }}
70+
cache: poetry
71+
72+
- name: Install dependencies
73+
run: |
74+
poetry env use ${{ matrix.python-version }}
75+
poetry install --no-root --only build --no-ansi --no-interaction
76+
poetry run pip install -c tests/pip-constraints.txt .
77+
78+
- name: Test Coverage
79+
run: poetry run poe test-cov
80+
81+
- name: Coveralls Parallel
82+
uses: coverallsapp/github-action@master
83+
with:
84+
github-token: ${{ secrets.GITHUB_TOKEN }}
85+
flag-name: run-${{ matrix.python-version }}
86+
parallel: true
87+
88+
coveralls:
89+
runs-on: ubuntu-latest
90+
needs: build
4791
steps:
4892
- name: Coveralls Finished
49-
uses: miurahr/coveralls-python-action@b5f4b04e702438c3f7eceb03acf0f3c60dbe252e
93+
uses: coverallsapp/github-action@master
5094
with:
95+
github-token: ${{ secrets.GITHUB_TOKEN }}
5196
parallel-finished: true
97+
98+
deploy-pages:
99+
runs-on: ubuntu-latest
100+
needs: build
101+
if: github.event_name == 'push' && github.ref_name == 'master' && github.repository_owner == 'monim67'
102+
permissions:
103+
contents: read
104+
pages: write
105+
id-token: write
106+
environment:
107+
name: github-pages
108+
url: ${{ steps.deployment.outputs.page_url }}
109+
steps:
110+
- name: Deploy to GitHub Pages
111+
id: deployment
112+
uses: actions/deploy-pages@v1

.github/workflows/deploy.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ jobs:
1313
- uses: actions/checkout@v3
1414

1515
- name: Install poetry
16-
run: pipx install poetry
17-
18-
- uses: actions/setup-python@v3
19-
with:
20-
python-version: "3.10"
16+
run: |
17+
pipx install poetry
18+
pipx inject poetry poetry-bumpversion
2119
2220
- name: Build
2321
run: |

.github/workflows/docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: docs
22

33
on:
44
push:
5-
branches: [master, 3.x]
5+
branches: [master, "[0-9]+.x"]
66

77
jobs:
88
deploy:

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.env
2+
/pages
13
/tmp
24
node_modules
35
db.sqlite3
@@ -18,6 +20,7 @@ __pycache__/
1820
.history/*
1921

2022
# Unit test / coverage reports
23+
coverage/
2124
htmlcov/
2225
.tox/
2326
.coverage

.pre-commit-config.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
repos:
2+
- repo: local
3+
hooks:
4+
- id: poetry-lock
5+
name: Check poetry.lock consistency
6+
language: system
7+
entry: poetry lock --check
8+
always_run: true
9+
pass_filenames: false
10+
- id: lint
11+
name: Run poe lint
12+
language: system
13+
entry: poetry run poe lint
14+
always_run: true
15+
pass_filenames: false

.vscode/launch.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@
88
"name": "Django: runserver",
99
"type": "python",
1010
"request": "launch",
11-
"program": "${workspaceFolder}/dev/manage.py",
11+
"module": "poethepoet",
1212
"args": [
13-
"runserver"
13+
"start",
1414
],
15+
"env": {
16+
"POETRY_ACTIVE": "1",
17+
},
1518
"django": true,
1619
"justMyCode": true
1720
},

.vscode/settings.json

+13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"python.formatting.provider": "black",
3+
"python.linting.mypyEnabled": true,
4+
"python.linting.pydocstyleEnabled": true,
35
"python.testing.pytestEnabled": true,
46
"python.testing.unittestEnabled": false,
57
"[python]": {
@@ -8,7 +10,18 @@
810
"source.organizeImports": true,
911
}
1012
},
13+
"[javascript]": {
14+
"editor.tabSize": 2,
15+
"editor.detectIndentation": false,
16+
"editor.formatOnSave": true,
17+
},
18+
"[html]": {
19+
"editor.tabSize": 2,
20+
"editor.detectIndentation": false,
21+
"editor.formatOnSave": true,
22+
},
1123
"yaml.schemas": {
1224
"https://json.schemastore.org/github-workflow.json": ".github/workflows/*.yml"
1325
},
26+
"esbonio.sphinx.confDir": "docs",
1427
}

0 commit comments

Comments
 (0)