Skip to content

Commit 8f4f614

Browse files
authored
Merge pull request #17 from MatterMiners/add/initial-code
Initial code of the caching extension
2 parents 423f9ae + cc9f45f commit 8f4f614

Some content is hidden

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

68 files changed

+6026
-25
lines changed

.coveragerc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[run]
2+
source = lapis
3+
branch = TRUE
4+
cover_pylib = FALSE
5+
parallel = False
6+
omit =
7+
lapis/__about__.py
8+
9+
[report]
10+
exclude_lines =
11+
# default
12+
pragma: no cover
13+
# python debug/internals
14+
def __repr__
15+
if __debug__:
16+
assert
17+
raise AssertionError
18+
raise NotImplementedError
19+
return NotImplemented
20+
if __name__ == "__main__"
21+
if __name__ == '__main__'

.github/workflows/linter.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Static Checks
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Set up Python
11+
uses: actions/setup-python@v2
12+
with:
13+
python-version: '3.8'
14+
- name: Install dependencies
15+
run: |
16+
python -m pip install --upgrade pip
17+
pip install .[test]
18+
- name: Lint with flake8
19+
run: |
20+
flake8 lapis lapis_tests
21+
- name: Format with black
22+
run: |
23+
black lapis lapis_tests --diff --check

.github/workflows/unittest.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Unit Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ['pypy3', '3.6', '3.7', '3.8', '3.9']
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python ${{ matrix.python-version }}
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install .[test]
22+
python -m pip install codecov pytest-cov
23+
- name: Test with pytest
24+
run: |
25+
pytest --cov=./
26+
- name: Upload coverage to Codecov
27+
uses: codecov/codecov-action@v1

.gitignore

Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Windows template
3+
# Windows thumbnail cache files
4+
Thumbs.db
5+
ehthumbs.db
6+
ehthumbs_vista.db
7+
8+
# Dump file
9+
*.stackdump
10+
11+
# Folder config file
12+
[Dd]esktop.ini
13+
14+
# Recycle Bin used on file shares
15+
$RECYCLE.BIN/
16+
17+
# Windows Installer files
18+
*.cab
19+
*.msi
20+
*.msm
21+
*.msp
22+
23+
# Windows shortcuts
24+
*.lnk
25+
### JetBrains template
26+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
27+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
28+
29+
# User-specific stuff:
30+
.idea/
31+
32+
# CMake
33+
cmake-build-debug/
34+
cmake-build-release/
35+
36+
# Mongo Explorer plugin:
37+
.idea/**/mongoSettings.xml
38+
39+
## File-based project format:
40+
*.iws
41+
42+
## Plugin-specific files:
43+
44+
# IntelliJ
45+
out/
46+
47+
# mpeltonen/sbt-idea plugin
48+
.idea_modules/
49+
50+
# JIRA plugin
51+
atlassian-ide-plugin.xml
52+
53+
# Cursive Clojure plugin
54+
.idea/replstate.xml
55+
56+
# Crashlytics plugin (for Android Studio and IntelliJ)
57+
com_crashlytics_export_strings.xml
58+
crashlytics.properties
59+
crashlytics-build.properties
60+
fabric.properties
61+
### Python template
62+
# Byte-compiled / optimized / DLL files
63+
__pycache__/
64+
*.py[cod]
65+
*$py.class
66+
67+
# C extensions
68+
*.so
69+
70+
# Distribution / packaging
71+
.Python
72+
build/
73+
develop-eggs/
74+
dist/
75+
downloads/
76+
eggs/
77+
.eggs/
78+
lib/
79+
lib64/
80+
parts/
81+
sdist/
82+
var/
83+
wheels/
84+
*.egg-info/
85+
.installed.cfg
86+
*.egg
87+
MANIFEST
88+
89+
# PyInstaller
90+
# Usually these files are written by a python script from a template
91+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
92+
*.manifest
93+
*.spec
94+
95+
# Installer logs
96+
pip-log.txt
97+
pip-delete-this-directory.txt
98+
99+
# Unit test / coverage reports
100+
htmlcov/
101+
.tox/
102+
.coverage
103+
.coverage.*
104+
.cache
105+
nosetests.xml
106+
coverage.xml
107+
*.cover
108+
.hypothesis/
109+
.pytest_cache
110+
111+
# Translations
112+
*.mo
113+
*.pot
114+
115+
# Django stuff:
116+
*.log
117+
.static_storage/
118+
.media/
119+
local_settings.py
120+
121+
# Flask stuff:
122+
instance/
123+
.webassets-cache
124+
125+
# Scrapy stuff:
126+
.scrapy
127+
128+
# Sphinx documentation
129+
docs/_build/
130+
docs/_static/
131+
docs/_templates/
132+
133+
# PyBuilder
134+
target/
135+
136+
# Jupyter Notebook
137+
.ipynb_checkpoints
138+
139+
# pyenv
140+
.python-version
141+
142+
# celery beat schedule file
143+
celerybeat-schedule
144+
145+
# SageMath parsed files
146+
*.sage.py
147+
148+
# Environments
149+
.env
150+
.venv
151+
env/
152+
venv/
153+
ENV/
154+
env.bak/
155+
venv.bak/
156+
157+
# Spyder project settings
158+
.spyderproject
159+
.spyproject
160+
161+
# Rope project settings
162+
.ropeproject
163+
164+
# mkdocs documentation
165+
/site
166+
167+
# mypy
168+
.mypy_cache/
169+
### Linux template
170+
*~
171+
172+
# temporary files which can be created if a process still has a handle open of a deleted file
173+
.fuse_hidden*
174+
175+
# KDE directory preferences
176+
.directory
177+
178+
# Linux trash folder which might appear on any partition or disk
179+
.Trash-*
180+
181+
# .nfs files are created when an open file is removed but is still being accessed
182+
.nfs*
183+
### macOS template
184+
# General
185+
.DS_Store
186+
.AppleDouble
187+
.LSOverride
188+
189+
# Icon must end with two \r
190+
Icon
191+
192+
# Thumbnails
193+
._*
194+
195+
# Files that might appear in the root of a volume
196+
.DocumentRevisions-V100
197+
.fseventsd
198+
.Spotlight-V100
199+
.TemporaryItems
200+
.Trashes
201+
.VolumeIcon.icns
202+
.com.apple.timemachine.donotpresent
203+
204+
# Directories potentially created on remote AFP share
205+
.AppleDB
206+
.AppleDesktop
207+
Network Trash Folder
208+
Temporary Items
209+
.apdisk

.pep8speaks.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
scanner:
2+
diff_only: False # If False, the entire file touched by the Pull Request is scanned for errors. If True, only the diff is scanned.
3+
linter: flake8
4+
5+
flake8:
6+
max-line-length: 88 # flake8-bugbear uses 80*1.1
7+
ignore:
8+
- W503

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.3.0
4+
hooks:
5+
- id: check-merge-conflict
6+
- id: end-of-file-fixer
7+
- id: flake8
8+
- repo: https://github.com/psf/black
9+
rev: 19.3b0
10+
hooks:
11+
- id: black
12+
args:
13+
- --py36

.readthedocs.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
3+
python:
4+
version: 3
5+
install:
6+
- method: pip
7+
path: .
8+
extra_requirements:
9+
- doc
10+
11+
sphinx:
12+
builder: html
13+
configuration: docs/conf.py

0 commit comments

Comments
 (0)