generated from xinntao/ProjectTemplate-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b96f391
Showing
10 changed files
with
559 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: PyLint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 yapf isort | ||
# modify the folders accordingly | ||
- name: Lint | ||
run: | | ||
flake8 . | ||
isort --check-only --diff basicsr/ options/ scripts/ tests/ inference/ setup.py | ||
yapf -r -d basicsr/ options/ scripts/ tests/ inference/ setup.py |
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,131 @@ | ||
.vscode | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
pip-wheel-metadata/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ |
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,40 @@ | ||
repos: | ||
# flake8 | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 3.8.3 | ||
hooks: | ||
- id: flake8 | ||
args: ["--config=setup.cfg", "--ignore=W504, W503"] | ||
|
||
# modify known_third_party | ||
- repo: https://github.com/asottile/seed-isort-config | ||
rev: v2.2.0 | ||
hooks: | ||
- id: seed-isort-config | ||
|
||
# isort | ||
- repo: https://github.com/timothycrosley/isort | ||
rev: 5.2.2 | ||
hooks: | ||
- id: isort | ||
|
||
# yapf | ||
- repo: https://github.com/pre-commit/mirrors-yapf | ||
rev: v0.30.0 | ||
hooks: | ||
- id: yapf | ||
|
||
# pre-commit-hooks | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: trailing-whitespace # Trim trailing whitespace | ||
- id: check-yaml # Attempt to load all yaml files to verify syntax | ||
- id: check-merge-conflict # Check for files that contain merge conflict strings | ||
- id: double-quote-string-fixer # Replace double quoted strings with single quoted strings | ||
- id: end-of-file-fixer # Make sure files end in a newline and only a newline | ||
- id: requirements-txt-fixer # Sort entries in requirements.txt and remove incorrect entry for pkg-resources==0.0.0 | ||
- id: fix-encoding-pragma # Remove the coding pragma: # -*- coding: utf-8 -*- | ||
args: ["--remove"] | ||
- id: mixed-line-ending # Replace or check mixed line ending | ||
args: ["--fix=lf"] |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Xintao Wang | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
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. |
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,81 @@ | ||
# ProjectTemplate-Python | ||
|
||
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/xinntao/HandyView.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/xinntao/HandyView/context:python) | ||
[![download](https://img.shields.io/github/downloads/xinntao/Real-ESRGAN/total.svg)](https://github.com/xinntao/Real-ESRGAN/releases) | ||
[![Open issue](https://isitmaintained.com/badge/open/xinntao/basicsr.svg)](https://github.com/xinntao/basicsr/issues) | ||
[![PyPI](https://img.shields.io/pypi/v/basicsr)](https://pypi.org/project/basicsr/) | ||
[![LICENSE](https://img.shields.io/github/license/xinntao/basicsr.svg)](https://github.com/xinntao/BasicSR/blob/master/LICENSE/LICENSE) | ||
[![python lint](https://github.com/xinntao/BasicSR/actions/workflows/pylint.yml/badge.svg)](https://github.com/xinntao/BasicSR/blob/master/.github/workflows/pylint.yml) | ||
[![Publish-pip](https://github.com/xinntao/BasicSR/actions/workflows/publish-pip.yml/badge.svg)](https://github.com/xinntao/BasicSR/blob/master/.github/workflows/publish-pip.yml) | ||
[![gitee mirror](https://github.com/xinntao/BasicSR/actions/workflows/gitee-mirror.yml/badge.svg)](https://github.com/xinntao/BasicSR/blob/master/.github/workflows/gitee-mirror.yml) | ||
|
||
[English](README.md) **|** [简体中文](README_CN.md)   [GitHub](https://github.com/xinntao/ProjectTemplate-Python) **|** [Gitee码云](https://gitee.com/xinntao/ProjectTemplate-Python) | ||
|
||
## File Modification | ||
|
||
1. Setup *pre-commit* hook | ||
1. If necessary, modify `.pre-commit-config.yaml` | ||
1. In the repository root path, run | ||
> pre-commit install | ||
1. Modify the `.gitignore` file | ||
1. Modify the `LICENSE` file | ||
This repository uses the *MIT* license, you may change it to other licenses | ||
1. Modify the *setup* files | ||
1. `setup.cfg` | ||
1. `setup.py`, especially the `basicsr` keyword | ||
1. Modify the `requirements.txt` files | ||
1. Modify the `VERSION` file | ||
|
||
## GitHub Workflows | ||
|
||
1. [pylint](./github/workflows/pylint.yml) | ||
1. [gitee-repo-mirror](./github/workflow/gitee-repo-mirror.yml) - Support Gitee码云 | ||
1. Clone GitHub repo in the [Gitee](https://gitee.com/) website | ||
1. Modify [gitee-repo-mirror](./github/workflow/gitee-repo-mirror.yml) | ||
1. In Github *Settings* -> *Secrets*, add `SSH_PRIVATE_KEY` | ||
|
||
## Other Procedures | ||
|
||
1. The `description`, `website`, `topics` in the main page | ||
1. Support Chinese documents, for example, `README_CN.md` | ||
|
||
## Emoji | ||
|
||
[Emoji cheat-sheet](https://github.com/ikatyang/emoji-cheat-sheet) | ||
|
||
| Emoji | Meaning | | ||
| :--- | :---: | | ||
| :rocket: | Used for [BasicSR](https://github.com/xinntao/BasicSR) Logo | | ||
| :sparkles: | Features | | ||
| :zap: | HOWTOs | | ||
| :wrench: | Installation / Usage | | ||
| :hourglass_flowing_sand: | TODO list | | ||
| :turtle: | Dataset preparation | | ||
| :computer: | Commands | | ||
| :european_castle: | Model zoo | | ||
| :memo: | Designs | | ||
| :scroll: | License and acknowledgement | | ||
| :earth_asia: | Citations | | ||
| :e-mail: | Contact | | ||
| :m: | Models | | ||
| :arrow_double_down: | Download | | ||
| :file_folder: | Datasets | | ||
| :chart_with_upwards_trend: | Curves| | ||
| :eyes: | Screenshot | | ||
| :books: |References | | ||
|
||
## Useful Image Links | ||
|
||
<img src="https://colab.research.google.com/assets/colab-badge.svg" height="28" alt="google colab logo"> Google Colab Logo <br> | ||
<img src="https://upload.wikimedia.org/wikipedia/commons/8/8d/Windows_darkblue_2012.svg" height="28" alt="google colab logo"> Windows Logo <br> | ||
<img src="https://upload.wikimedia.org/wikipedia/commons/3/3a/Logo-ubuntu_no%28r%29-black_orange-hex.svg" alt="Ubuntu" height="24"> Ubuntu Logo <br> | ||
|
||
## Other Useful Tips | ||
|
||
1. `More` drop-down menu | ||
<details> | ||
<summary>More</summary> | ||
<ul> | ||
<li>Nov 19, 2020. Set up ProjectTemplate-Python.</li> | ||
</ul> | ||
</details> |
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,72 @@ | ||
# ProjectTemplate-Python | ||
|
||
[English](README.md) **|** [简体中文](README_CN.md)   [GitHub](https://github.com/xinntao/ProjectTemplate-Python) **|** [Gitee码云](https://gitee.com/xinntao/ProjectTemplate-Python) | ||
|
||
## 文件修改 | ||
|
||
1. 设置 *pre-commit* hook. | ||
1. 若需要, 修改 `.pre-commit-config.yaml` | ||
1. 在文件夹根目录, 运行 | ||
> pre-commit install | ||
1. 修改 `.gitignore` 文件 | ||
1. 修改 `LICENSE` 文件 | ||
本仓库使用 *MIT* 许可, 根据需要可以修改成其他许可 | ||
1. 修改 *setup* 文件 | ||
1. `setup.cfg` | ||
1. `setup.py`, 特别是其中包含的关键字 `basicsr` | ||
1. 修改 `requirements.txt` 文件 | ||
1. 修改 `VERSION` 文件 | ||
|
||
## GitHub Workflows | ||
|
||
1. [pylint](./github/workflows/pylint.yml) | ||
1. [gitee-repo-mirror](./github/workflow/gitee-repo-mirror.yml) - 支持 Gitee码云 | ||
1. 在 [Gitee](https://gitee.com/) 网站克隆 Github 仓库 | ||
1. 修改 [gitee-repo-mirror](./github/workflow/gitee-repo-mirror.yml) 文件 | ||
1. 在 Github 中的 *Settings* -> *Secrets* 的 `SSH_PRIVATE_KEY` | ||
|
||
## 其他流程 | ||
|
||
1. 主页上的 `description`, `website`, `topics` | ||
1. 支持中文文档, 比如, `README_CN.md` | ||
|
||
## Emoji | ||
|
||
[Emoji cheat-sheet](https://github.com/ikatyang/emoji-cheat-sheet) | ||
|
||
| Emoji | Meaning | | ||
| :--- | :---: | | ||
| :rocket: | Used for [BasicSR](https://github.com/xinntao/BasicSR) Logo | | ||
| :sparkles: | Features | | ||
| :zap: | HOWTOs | | ||
| :wrench: | Installation / Usage | | ||
| :hourglass_flowing_sand: | TODO list | | ||
| :turtle: | Dataset preparation | | ||
| :computer: | Commands | | ||
| :european_castle: | Model zoo | | ||
| :memo: | Designs | | ||
| :scroll: | License and acknowledgement | | ||
| :earth_asia: | Citations | | ||
| :e-mail: | Contact | | ||
| :m: | Models | | ||
| :arrow_double_down: | Download | | ||
| :file_folder: | Datasets | | ||
| :chart_with_upwards_trend: | Curves| | ||
| :eyes: | Screenshot | | ||
| :books: |References | | ||
|
||
## 有用的图像链接 | ||
|
||
<img src="https://colab.research.google.com/assets/colab-badge.svg" height="28" alt="google colab logo"> Google Colab Logo <br> | ||
<img src="https://upload.wikimedia.org/wikipedia/commons/8/8d/Windows_darkblue_2012.svg" height="28" alt="google colab logo"> Windows Logo <br> | ||
<img src="https://upload.wikimedia.org/wikipedia/commons/3/3a/Logo-ubuntu_no%28r%29-black_orange-hex.svg" alt="Ubuntu" height="24"> Ubuntu Logo <br> | ||
|
||
## 其他有用的技巧 | ||
|
||
1. `More` 下拉菜单 | ||
<details> | ||
<summary>More</summary> | ||
<ul> | ||
<li>Nov 19, 2020. Set up ProjectTemplate-Python.</li> | ||
</ul> | ||
</details> |
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 @@ | ||
0.0.0 |
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 @@ | ||
numpy |
Oops, something went wrong.