Skip to content

Commit

Permalink
Merge pull request #187 from TaleLin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Jokky6 authored Feb 7, 2022
2 parents 6c9e9b0 + 22697c3 commit 298faee
Show file tree
Hide file tree
Showing 77 changed files with 1,138 additions and 927 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.venv
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf
charset = utf-8
max_line_length = 100

[*.{yml,yaml,json,js,css,html}]
indent_size = 2
15 changes: 15 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[flake8]
max-line-length = 120
select = C,E,F,W,B,B9
ignore = E203, E501, W503, E712, E711
per-file-ignores =
__init__.py: F401
app/core/exception.py: F811
app/cli/plugin/init.py: W605
exclude =
.git,
__pycache__,
build,
dist,
tests,
.venv
27 changes: 0 additions & 27 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

6 changes: 0 additions & 6 deletions .github/ISSUE_TEMPLATE/question.md

This file was deleted.

44 changes: 23 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
# .env 中记录了私密配置
# *.env

# OS
.DS_Store
.idea
.vscode
*.pytest_cache/
*.pyc
assets
logs

# Created by https://www.toptal.com/developers/gitignore/api/python
# Edit at https://www.toptal.com/developers/gitignore?templates=python

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*/__pycache__/
*.py[cod]
*$py.class

Expand All @@ -30,6 +17,7 @@ dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
Expand All @@ -54,7 +42,9 @@ pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
test.json
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
Expand All @@ -63,7 +53,6 @@ coverage.xml
*.py,cover
.hypothesis/
.pytest_cache/
pytestdebug.log

# Translations
*.mo
Expand All @@ -74,7 +63,6 @@ pytestdebug.log
local_settings.py
db.sqlite3
db.sqlite3-journal
*.db

# Flask stuff:
instance/
Expand All @@ -85,7 +73,6 @@ instance/

# Sphinx documentation
docs/_build/
doc/_build/

# PyBuilder
target/
Expand Down Expand Up @@ -118,6 +105,7 @@ celerybeat.pid
*.sage.py

# Environments
.env
.venv
env/
venv/
Expand All @@ -143,8 +131,22 @@ dmypy.json
# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/
# IDE
.vscode/
.idea/
.vim/

# End of https://www.toptal.com/developers/gitignore/api/python
# custom
assets
logs

*.pyc
# poetry lock
poetry.lock
# db
lincmsdev.db
lincmsprod.db
lincms.db

# .env 中记录了私密配置
# *.env
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
repos:
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
exclude: tests
- repo: https://github.com/psf/black
rev: 21.10b0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: fix-byte-order-marker
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM python:3.9
# 拷贝依赖
COPY requirements-prod.txt .
# 安装依赖
# RUN pip install -r requirements-prod.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com >/dev/null 2>&1
RUN pip install -r requirements-prod.txt >/dev/null 2>&1
# 拷贝项目
COPY . /app
19 changes: 18 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
ISC License

Copyright (c) 2016, Kenneth Reitz <[email protected]>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
=== https://github.com/kennethreitz/records(v0.5.3) ===

MIT License

Copyright (c) 2019 TaleLin
Expand All @@ -18,4 +35,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
Loading

0 comments on commit 298faee

Please sign in to comment.