-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Drop Python 2 / Django 1.11 Code compatibility layers to support python, old django will be removed in a future commit / PR * Adopt modern packaging - bumpversion - towncrier - github actions - pre-commit * Improve coverage * Add tests for wizard mode
- Loading branch information
Showing
56 changed files
with
3,152 additions
and
2,337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,34 @@ | ||
[run] | ||
source = djangocms_installer | ||
branch = True | ||
source = djangocms_installer | ||
omit = | ||
djangocms_installer/share/* | ||
djangocms_installer/__main__.py | ||
djangocms_installer/main.py | ||
djangocms_installer/compat.py | ||
djangocms_installer/config/urls_i18n.py | ||
djangocms_installer/config/urls_noi18n.py | ||
djangocms_installer/config/settings.py | ||
tests/* | ||
|
||
[report] | ||
omit = *migrations*,*tests*,*test_utils* | ||
# Regexes for lines to exclude from consideration | ||
exclude_lines = | ||
# Have to re-enable the standard pragma | ||
pragma: no cover | ||
|
||
# Don't complain about missing debug-only code: | ||
def __repr__ | ||
if self\.debug | ||
|
||
# Don't complain if tests don't hit defensive assertion code: | ||
raise AssertionError | ||
raise NotImplementedError | ||
|
||
# Don't complain if non-runnable code isn't run: | ||
if 0: | ||
if __name__ == .__main__.: | ||
|
||
ignore_errors = True | ||
|
||
[html] | ||
directory = coverage_html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
name: "\U0001F41B Bug report" | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: 'type: bug' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- | ||
Please fill in each section to help maintainers to be helpful and quick to respond. | ||
--> | ||
|
||
## Description | ||
|
||
<!-- | ||
Describe issue in general terms. | ||
--> | ||
|
||
## Steps to reproduce | ||
|
||
<!-- | ||
Provide clear steps to reproduce the issue. | ||
--> | ||
|
||
## Versions | ||
|
||
<!-- | ||
Provide at least Python, Django and application version. | ||
--> | ||
|
||
## Expected behaviour | ||
|
||
<!-- | ||
Provide what you would have expected to happen. | ||
--> | ||
|
||
## Actual behaviour | ||
|
||
<!-- | ||
Provide what happened. | ||
--> | ||
|
||
## Additional information | ||
|
||
<!-- | ||
Add any other information. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
name: "\U0001F389 Feature request" | ||
about: Share your idea, let's discuss it! | ||
title: '' | ||
labels: 'type: feature' | ||
assignees: '' | ||
|
||
--- | ||
|
||
<!-- | ||
Please fill in each section to help maintainers to be helpful and quick to respond. | ||
--> | ||
|
||
## Description | ||
|
||
<!-- | ||
Describe the feature in general terms. | ||
--> | ||
|
||
## Use cases | ||
|
||
<!-- | ||
What use cases these feature will address? | ||
--> | ||
|
||
## Proposed solution | ||
|
||
<!-- | ||
A clear and concise description of what you want to happen. | ||
--> | ||
|
||
## Alternatives | ||
|
||
<!-- | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
--> | ||
|
||
## Additional information | ||
|
||
<!-- | ||
Add any other information. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Description | ||
|
||
Describe: | ||
|
||
* Content of the pull request | ||
* Feature added / Problem fixed | ||
|
||
## References | ||
|
||
Provide any github issue fixed (as in ``Fix #XYZ``) | ||
|
||
# Checklist | ||
|
||
* [ ] I have read the [contribution guide](https://djangocms-installer.readthedocs.io/en/latest/contributing.html) | ||
* [ ] Code lint checked via `inv lint` | ||
* [ ] ``changes`` file included (see [docs](https://djangocms-installer.readthedocs.io/en/latest/contributing.html#pull-request-guidelines)) | ||
* [ ] Usage documentation added in case of new features | ||
* [ ] Tests added |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Code quality | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
toxenv: [pep8, isort, black, pypi-description, docs, towncrier] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Cache pip | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ matrix.toxenv }} | ||
restore-keys: | | ||
${{ runner.os }}-pip-${{ matrix.toxenv }} | ||
- name: Cache tox | ||
uses: actions/cache@v1 | ||
with: | ||
path: .tox | ||
key: ${{ runner.os }}-lint-${{ matrix.toxenv }}-${{ hashFiles('setup.cfg') }} | ||
restore-keys: | | ||
${{ runner.os }}-lint-${{ matrix.toxenv }}- | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools tox>=1.8 | ||
- name: Test with tox | ||
run: | | ||
tox -e${{ matrix.toxenv }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [published,prereleased] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.x' | ||
- name: Cache pip | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ matrix.toxenv }} | ||
restore-keys: | | ||
${{ runner.os }}-pip-${{ matrix.toxenv }} | ||
- name: Cache tox | ||
uses: actions/cache@v1 | ||
with: | ||
path: .tox | ||
key: ${{ runner.os }}-tox-release-${{ hashFiles('setup.cfg') }} | ||
restore-keys: | | ||
${{ runner.os }}-tox-release- | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools tox>=1.8 | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
tox -erelease |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Tox tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8, 3.7, 3.6, 3.5] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Cache pip | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ matrix.python-version }} | ||
restore-keys: | | ||
${{ runner.os }}-pip-${{ matrix.python-version }} | ||
- name: Cache tox | ||
uses: actions/cache@v1 | ||
with: | ||
path: .tox | ||
key: ${{ runner.os }}-tox-${{ matrix.python-version }}-${{ hashFiles('setup.cfg') }} | ||
restore-keys: | | ||
${{ runner.os }}-tox-${{ matrix.python-version }}- | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install gettext sqlite3 | ||
python -m pip install --upgrade pip tox>=3.5 | ||
- name: Test with tox | ||
env: | ||
TOX_ENV: py | ||
COMMAND: coverage run | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COVERALLS_SERVICE_NAME: github | ||
run: | | ||
tox -e$TOX_ENV | ||
.tox/$TOX_ENV/bin/coverage xml | ||
.tox/$TOX_ENV/bin/coveralls | ||
- uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
flags: unittests | ||
file: ./coverage.xml | ||
fail_ci_if_error: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
exclude: "(.idea|node_modules|.tox)" | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.1.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: check-builtin-literals | ||
- id: check-executables-have-shebangs | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
- id: fix-encoding-pragma | ||
args: | ||
- --remove | ||
- repo: https://github.com/timothycrosley/isort | ||
rev: "5.0.2" | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/psf/black | ||
rev: 19.10b0 | ||
hooks: | ||
- id: black | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.8.3 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
- flake8-broken-line | ||
- flake8-bugbear | ||
- flake8-builtins | ||
- flake8-coding | ||
- flake8-commas | ||
- flake8-comprehensions | ||
- flake8-eradicate | ||
- flake8-quotes | ||
- flake8-tidy-imports | ||
- pep8-naming | ||
- repo: https://github.com/econchick/interrogate | ||
rev: 1.2.0 | ||
hooks: | ||
- id: interrogate | ||
args: | ||
- "-cpyproject.toml" | ||
- "--quiet" | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.6.2 | ||
hooks: | ||
- id: pyupgrade | ||
args: | ||
- --py3-plus | ||
- repo: local | ||
hooks: | ||
- id: towncrier | ||
name: towncrier | ||
entry: inv towncrier-check | ||
language: system | ||
pass_filenames: false | ||
always_run: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
update: all | ||
pin: False | ||
branch: | ||
schedule: "every day" | ||
search: True | ||
branch_prefix: pyup/ | ||
close_prs: True |
Oops, something went wrong.