Skip to content

Commit 141bf8d

Browse files
author
Heiru Wu
committed
chore: init project setup
0 parents  commit 141bf8d

30 files changed

+4125
-0
lines changed

.appveyor.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
image: Visual Studio 2019
2+
3+
environment:
4+
global:
5+
RANDOM_SEED: 0
6+
matrix:
7+
- PYTHON_MAJOR: 3
8+
PYTHON_MINOR: 8
9+
10+
cache:
11+
- .venv -> poetry.lock
12+
13+
install:
14+
# Add Make and Python to the PATH
15+
- copy C:\MinGW\bin\mingw32-make.exe C:\MinGW\bin\make.exe
16+
- set PATH=%PATH%;C:\MinGW\bin
17+
- set PATH=C:\Python%PYTHON_MAJOR%%PYTHON_MINOR%;%PATH%
18+
- set PATH=C:\Python%PYTHON_MAJOR%%PYTHON_MINOR%\Scripts;%PATH%
19+
# Install system dependencies
20+
- curl -sSL https://install.python-poetry.org | python -
21+
- set PATH=%USERPROFILE%\AppData\Roaming\Python\Scripts;%PATH%
22+
- make doctor
23+
# Install project dependencies
24+
- make install
25+
26+
build: off
27+
28+
test_script:
29+
- make check
30+
- make test

.coveragerc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[run]
2+
3+
branch = true
4+
5+
data_file = .cache/coverage
6+
7+
omit =
8+
.venv/*
9+
*/tests/*
10+
*/__main__.py
11+
12+
[report]
13+
14+
exclude_lines =
15+
pragma: no cover
16+
raise NotImplementedError
17+
except DistributionNotFound
18+
TYPE_CHECKING

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto
2+
CHANGELOG.md merge=union
3+
poetry.lock merge=binary

.github/workflows/test.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: main
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: ['3.7', '3.8', '3.9', '3.10']
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
21+
- uses: Gr1N/setup-poetry@v8
22+
23+
- name: Check dependencies
24+
run: make doctor
25+
26+
- uses: actions/cache@v2
27+
with:
28+
path: .venv
29+
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
30+
31+
- name: Install dependencies
32+
run: make install
33+
34+
- name: Check code
35+
run: make check
36+
37+
- name: Test code
38+
run: make test
39+
40+
- name: Upload coverage
41+
uses: codecov/codecov-action@v1
42+
with:
43+
fail_ci_if_error: true

.gitignore

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Temporary Python files
2+
*.pyc
3+
*.egg-info/
4+
__pycache__/
5+
.ipynb_checkpoints/
6+
setup.py
7+
pip-wheel-metadata/
8+
9+
# Temporary OS files
10+
Icon*
11+
12+
# Temporary virtual environment files
13+
/.cache/
14+
/.venv/
15+
tmp/
16+
17+
# Temporary server files
18+
.env
19+
*.pid
20+
21+
# Generated documentation
22+
/docs/gen/
23+
/docs/apidocs/
24+
/site/
25+
/*.html
26+
/docs/*.png
27+
28+
# Google Drive
29+
*.gdoc
30+
*.gsheet
31+
*.gslides
32+
*.gdraw
33+
34+
# Testing and coverage results
35+
/.coverage
36+
/.coverage.*
37+
/htmlcov/
38+
/prof/
39+
coverage.xml
40+
41+
# Build and release directories
42+
/build/
43+
/dist/
44+
*.spec
45+
46+
# Sublime Text
47+
*.sublime-workspace
48+
49+
# Eclipse
50+
.settings
51+
52+
# VSCode
53+
.vscode

.pydocstyle.ini

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[pydocstyle]
2+
3+
# D211: No blank lines allowed before class docstring
4+
add_select = D211
5+
6+
# D100: Missing docstring in public module
7+
# D101: Missing docstring in public class
8+
# D102: Missing docstring in public method
9+
# D103: Missing docstring in public function
10+
# D104: Missing docstring in public package
11+
# D105: Missing docstring in magic method
12+
# D107: Missing docstring in __init__
13+
# D202: No blank lines allowed after function docstring
14+
add_ignore = D100,D101,D102,D103,D104,D105,D107,D202

0 commit comments

Comments
 (0)