Skip to content

Commit 8858678

Browse files
committed
Fix python 3.10 dawg
+ fixed python 3.10 support + added tox tests github workflow + removed generated *.cpp file + added `.gitingnore` + added py 3.9, 3.10 to tox testlist + added github workflow pytest
1 parent 239a9ae commit 8858678

18 files changed

+214
-57478
lines changed

.github/workflows/tox_tests.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
pull_request:
7+
branches: ["master"]
8+
9+
jobs:
10+
tests:
11+
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}"
12+
runs-on: ${{ matrix.os }}
13+
14+
strategy:
15+
matrix:
16+
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"]
17+
os: [ubuntu-latest, macos-latest, windows-latest]
18+
exclude:
19+
- os: windows-latest
20+
python-version: "2.7"
21+
fail-fast: false
22+
23+
steps:
24+
- uses: "actions/checkout@v2"
25+
with:
26+
submodules: true
27+
- uses: "actions/setup-python@v2"
28+
with:
29+
python-version: "${{ matrix.python-version }}"
30+
- name: "Install dependencies"
31+
run: |
32+
python -VV
33+
python -m site
34+
python -m pip install --upgrade pip setuptools wheel virtualenv tox tox-gh-actions cython pytest
35+
36+
- name: "Build CPP files using Cython"
37+
run: |
38+
sh -x update_cpp.sh
39+
40+
- name: "Install DAWG for ${{ matrix.python-version }}"
41+
run: |
42+
python setup.py install
43+
44+
- name: "Run tests for ${{ matrix.python-version }}"
45+
run: |
46+
python -m pytest
47+

.gitignore

Lines changed: 163 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,179 @@
1-
MANIFEST
1+
## cython and tox generated content
2+
23
src/*.html
34

5+
6+
src/*.cpp
7+
8+
### Idea
9+
/.idea
10+
11+
### macOS template
12+
# General
13+
.DS_Store
14+
.AppleDouble
15+
.LSOverride
16+
17+
# Icon must end with two \r
18+
Icon
19+
20+
# Thumbnails
21+
._*
22+
23+
# Files that might appear in the root of a volume
24+
.DocumentRevisions-V100
25+
.fseventsd
26+
.Spotlight-V100
27+
.TemporaryItems
28+
.Trashes
29+
.VolumeIcon.icns
30+
.com.apple.timemachine.donotpresent
31+
32+
# Directories potentially created on remote AFP share
33+
.AppleDB
34+
.AppleDesktop
35+
Network Trash Folder
36+
Temporary Items
37+
.apdisk
38+
39+
### Python template
40+
# Byte-compiled / optimized / DLL files
41+
__pycache__/
442
*.py[cod]
43+
*$py.class
544

645
# C extensions
746
*.so
847

9-
# Packages
10-
*.egg
11-
*.egg-info
12-
dist
13-
build
14-
eggs
15-
parts
16-
bin
17-
var
18-
sdist
19-
develop-eggs
48+
# Distribution / packaging
49+
.Python
50+
build/
51+
develop-eggs/
52+
dist/
53+
downloads/
54+
eggs/
55+
.eggs/
56+
lib/
57+
lib64/
58+
parts/
59+
sdist/
60+
var/
61+
wheels/
62+
share/python-wheels/
63+
*.egg-info/
2064
.installed.cfg
21-
lib
22-
lib64
23-
__pycache__
65+
*.egg
66+
MANIFEST
67+
68+
# PyInstaller
69+
# Usually these files are written by a python script from a template
70+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
71+
*.manifest
72+
*.spec
2473

2574
# Installer logs
2675
pip-log.txt
76+
pip-delete-this-directory.txt
2777

2878
# Unit test / coverage reports
79+
htmlcov/
80+
.tox/
81+
.nox/
2982
.coverage
30-
.tox
83+
.coverage.*
84+
.cache
3185
nosetests.xml
86+
coverage.xml
87+
*.cover
88+
*.py,cover
89+
.hypothesis/
90+
.pytest_cache/
91+
cover/
92+
93+
# Translations
94+
*.mo
95+
*.pot
96+
97+
# Django stuff:
98+
*.log
99+
local_settings.py
100+
db.sqlite3
101+
db.sqlite3-journal
102+
103+
# Flask stuff:
104+
instance/
105+
.webassets-cache
106+
107+
# Scrapy stuff:
108+
.scrapy
109+
110+
# Sphinx documentation
111+
docs/_build/
112+
113+
# PyBuilder
114+
.pybuilder/
115+
target/
116+
117+
# Jupyter Notebook
118+
.ipynb_checkpoints
119+
120+
# IPython
121+
profile_default/
122+
ipython_config.py
123+
124+
# pyenv
125+
# For a library or package, you might want to ignore these files since the code is
126+
# intended to run in multiple environments; otherwise, check them in:
127+
# .python-version
128+
129+
# pipenv
130+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
131+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
132+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
133+
# install all needed dependencies.
134+
#Pipfile.lock
135+
136+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
137+
__pypackages__/
138+
139+
# Celery stuff
140+
celerybeat-schedule
141+
celerybeat.pid
142+
143+
# SageMath parsed files
144+
*.sage.py
145+
146+
# Environments
147+
.env
148+
.venv
149+
env/
150+
venv/
151+
ENV/
152+
env.bak/
153+
venv.bak/
154+
155+
# Spyder project settings
156+
.spyderproject
157+
.spyproject
158+
159+
# Rope project settings
160+
.ropeproject
161+
162+
# mkdocs documentation
163+
/site
164+
165+
# mypy
166+
.mypy_cache/
167+
.dmypy.json
168+
dmypy.json
169+
170+
# Pyre type checker
171+
.pyre/
172+
173+
# pytype static type analyzer
174+
.pytype/
175+
176+
# Cython debug symbols
177+
cython_debug/
178+
32179

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
'Programming Language :: Python :: 3.6',
3535
'Programming Language :: Python :: 3.7',
3636
'Programming Language :: Python :: 3.8',
37+
'Programming Language :: Python :: 3.9',
38+
'Programming Language :: Python :: 3.10',
3739
'Programming Language :: Python :: Implementation :: CPython',
3840
'Topic :: Software Development :: Libraries :: Python Modules',
3941
'Topic :: Scientific/Engineering :: Information Analysis',

0 commit comments

Comments
 (0)