Skip to content

Commit 9cf2dd2

Browse files
committed
Initial commit
0 parents  commit 9cf2dd2

File tree

177 files changed

+13848
-0
lines changed

Some content is hidden

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

177 files changed

+13848
-0
lines changed

.coveragerc

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[run]
2+
branch = True
3+
source = djangocms_frontend
4+
omit =
5+
djangocms_frontend/migrations/*
6+
djangocms_frontend/management/*
7+
*/foundation6.py
8+
tests/*
9+
10+
[report]
11+
exclude_lines =
12+
pragma: no cover
13+
def __repr__
14+
if self.debug:
15+
if settings.DEBUG
16+
raise AssertionError
17+
raise NotImplementedError
18+
if 0:
19+
if __name__ == .__main__.:
20+
ignore_errors = True

.editorconfig

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
end_of_line = lf
9+
charset = utf-8
10+
trim_trailing_whitespace = true
11+
insert_final_newline = true
12+
max_line_length = 80
13+
14+
[*.py]
15+
max_line_length = 120
16+
quote_type = single
17+
18+
[*.{scss,js,html}]
19+
max_line_length = 120
20+
indent_style = space
21+
quote_type = double
22+
23+
[*.js]
24+
max_line_length = 120
25+
quote_type = single
26+
27+
[*.rst]
28+
max_line_length = 80
29+
30+
[*.yml]
31+
indent_size = 2
32+
33+
[*plugins/code.html]
34+
insert_final_newline = false
35+
36+
[*plugins/responsive.html]
37+
insert_final_newline = false
38+
39+
[*plugins/image.html]
40+
insert_final_newline = false

.eslintrc.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
'use strict';
2+
3+
module.exports = {
4+
// documentation about rules can be found on http://eslint.org/docs/user-guide/configuring
5+
// based on http://eslint.org/docs/user-guide/configuring
6+
'extends': 'eslint:recommended',
7+
// http://eslint.org/docs/user-guide/configuring.html#specifying-environments
8+
'env': {
9+
'browser': true,
10+
'node': true,
11+
'es6': true,
12+
},
13+
'parser': 'babel-eslint',
14+
'parserOptions': {
15+
'sourceType': 'module',
16+
},
17+
'rules': {
18+
// 0 = ignore, 1 = warning, 2 = error
19+
'indent': [2, 4],
20+
'quotes': [1, 'single'],
21+
'comma-dangle': [1, 'always-multiline'],
22+
},
23+
}

.github/ISSUE_TEMPLATE/bug_report.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
32+
**Additional context**
33+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/codecov.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CodeCov
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
coverage:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
python-version: [ 3.7, 3.8, 3.9, ] # latest release minus two
16+
requirements-file: [
17+
dj32_cms38.txt,
18+
dj32_cms39.txt,
19+
dj32_cms40.txt,
20+
# dj40_cms311.txt,
21+
]
22+
os: [
23+
ubuntu-20.04,
24+
]
25+
exclude:
26+
- python-version: 3.7
27+
requirements-file: dj40_cms311.txt
28+
29+
steps:
30+
- uses: actions/checkout@v2
31+
with:
32+
fetch-depth: '2'
33+
34+
- name: Setup Python
35+
uses: actions/setup-python@master
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
- name: Generate Report
39+
run: |
40+
pip install -r tests/requirements/${{ matrix.requirements-file }}
41+
coverage run setup.py test
42+
- name: Upload Coverage to Codecov
43+
uses: codecov/codecov-action@v1

.github/workflows/codeql-analysis.yml

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ master ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ master ]
20+
schedule:
21+
- cron: '27 18 * * 4'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'javascript', 'python' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v2
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v1
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
52+
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# If this step fails, then you should remove it and run the build manually (see below)
55+
- name: Autobuild
56+
uses: github/codeql-action/autobuild@v1
57+
58+
# ℹ️ Command-line programs to run using the OS shell.
59+
# 📚 https://git.io/JvXDl
60+
61+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62+
# and modify them (or add more) to build your code if your project
63+
# uses a compiled language
64+
65+
#- run: |
66+
# make bootstrap
67+
# make release
68+
69+
- name: Perform CodeQL Analysis
70+
uses: github/codeql-action/analyze@v1

.github/workflows/docs.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Docs
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
name: build
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: '3.9'
20+
cache: 'pip'
21+
- name: Cache dependencies
22+
uses: actions/cache@v2
23+
with:
24+
path: ~/.cache/pip
25+
key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }}
26+
restore-keys: |
27+
${{ runner.os }}-pip-
28+
- run: python -m pip install -r docs/requirements.txt
29+
- name: Build docs
30+
run: |
31+
cd docs
32+
make html
33+
34+
spelling:
35+
runs-on: ubuntu-latest
36+
name: spelling
37+
needs: build
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v2
41+
- name: Set up Python
42+
uses: actions/setup-python@v2
43+
with:
44+
python-version: '3.9'
45+
cache: 'pip'
46+
- name: Cache dependencies
47+
uses: actions/cache@v2
48+
with:
49+
path: ~/.cache/pip
50+
key: ${{ runner.os }}-pip-${{ hashFiles('docs/requirements.txt') }}
51+
restore-keys: |
52+
${{ runner.os }}-pip-
53+
- run: python -m pip install -r docs/requirements.txt
54+
- name: Check spelling
55+
run: |
56+
cd docs
57+
make spelling
58+

.github/workflows/lint-pr.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Lint PR"
2+
3+
# Validates PR titles against the conventional commit spec
4+
# https://github.com/commitizen/conventional-commit-types
5+
6+
on:
7+
pull_request_target:
8+
types:
9+
- opened
10+
- edited
11+
- synchronize
12+
13+
jobs:
14+
main:
15+
name: Validate PR title
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: amannn/action-semantic-pull-request@v4
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lint.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
flake8:
11+
name: flake8
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.9
20+
- name: Install flate8
21+
run: pip install --upgrade flake8
22+
- name: Run flake8
23+
uses: liskin/gh-problem-matcher-wrap@v1
24+
with:
25+
linters: flake8
26+
run: flake8
27+
28+
isort:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v2
33+
- name: Set up Python
34+
uses: actions/setup-python@v2
35+
with:
36+
python-version: 3.9
37+
- run: python -m pip install isort
38+
- name: isort
39+
uses: liskin/gh-problem-matcher-wrap@v1
40+
with:
41+
linters: isort
42+
run: isort -c -rc -df djangocms_frontend

0 commit comments

Comments
 (0)