Skip to content

Commit 8f529f8

Browse files
initial template
0 parents  commit 8f529f8

28 files changed

+908
-0
lines changed

.codecov.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: auto
6+
threshold: 1%
7+
# If true PRs will always pass and reports are just for information
8+
informational: true
9+
patch:
10+
default:
11+
target: auto
12+
threshold: 1%
13+
# If true PRs will always pass and reports are just for information
14+
informational: true
15+
16+
# post comment on PR
17+
comment: false
18+
19+
# ignore files
20+
ignore:
21+
- ".github/"
22+
- "docs/"
23+
- "examples/"

.coveragerc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[run]
2+
branch = True
3+
source = tsml_subpackage_template
4+
parallel = True

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.ts linguist-detectable=false

.github/workflows/cancel.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Cancel
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Tests"]
6+
types:
7+
- requested
8+
9+
jobs:
10+
cancel:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: styfle/cancel-workflow-action@0.11.0
14+
with:
15+
workflow_id: ${{ github.event.workflow.id }}

.github/workflows/release.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
check_manifest:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.10"
18+
19+
- uses: pre-commit/action@v3.0.0
20+
with:
21+
extra_args: check-manifest --hook-stage manual
22+
23+
build_project:
24+
needs: check_manifest
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- uses: actions/checkout@v3
29+
30+
- uses: actions/setup-python@v4
31+
with:
32+
python-version: '3.10'
33+
34+
- name: Build project
35+
run: |
36+
python -m pip install build
37+
python -m build
38+
39+
- name: Store built files
40+
uses: actions/upload-artifact@v3
41+
with:
42+
name: dist
43+
path: dist/*
44+
45+
test_wheels:
46+
needs: build_project
47+
name: Test wheels on ${{ matrix.os }} with ${{ matrix.python-version }}
48+
runs-on: ${{ matrix.os }}
49+
50+
strategy:
51+
matrix:
52+
os: [ubuntu-latest, macOS-latest]
53+
python-version: ['3.8', '3.9', '3.10']
54+
include:
55+
- os: windows-latest
56+
python: 38
57+
python-version: '3.8'
58+
bitness: 64
59+
platform_id: win_amd64
60+
- os: windows-latest
61+
python: 39
62+
python-version: '3.9'
63+
bitness: 64
64+
platform_id: win_amd64
65+
- os: windows-latest
66+
python: 310
67+
python-version: '3.10'
68+
bitness: 64
69+
platform_id: win_amd64
70+
71+
steps:
72+
- uses: actions/checkout@v3
73+
74+
- uses: actions/setup-python@v4
75+
with:
76+
python-version: ${{ matrix.python-version }}
77+
78+
- uses: actions/download-artifact@v3
79+
with:
80+
name: dist
81+
path: dist
82+
83+
- if: matrix.os == 'windows-latest'
84+
name: Windows wheel filename
85+
run: echo "WHEELNAME=$(ls ./dist/tsml_subpackage_template-*-none-any.whl)" >> $env:GITHUB_ENV
86+
- if: matrix.os != 'windows-latest'
87+
name: Unix wheel filename
88+
run: echo "WHEELNAME=$(ls ./dist/tsml_subpackage_template-*-none-any.whl)" >> $GITHUB_ENV
89+
90+
- if: matrix.os == 'windows-latest'
91+
name: Windows install
92+
run: python -m pip install "${env:WHEELNAME}[dev]"
93+
- if: matrix.os != 'windows-latest'
94+
name: Unix install
95+
run: python -m pip install "${{ env.WHEELNAME }}[dev]"
96+
97+
- name: Tests
98+
run: python -m pytest
99+
100+
upload_wheels:
101+
needs: test_wheels
102+
runs-on: ubuntu-latest
103+
104+
steps:
105+
- uses: actions/download-artifact@v3
106+
with:
107+
name: dist
108+
path: dist
109+
110+
- name: Publish package to PyPI
111+
uses: pypa/gh-action-pypi-publish@release/v1
112+
with:
113+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/tests.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
pre-commit:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- uses: actions/setup-python@v4
18+
with:
19+
python-version: "3.10"
20+
21+
- id: file_changes
22+
uses: trilom/file-changes-action@v1.2.4
23+
with:
24+
output: " "
25+
26+
- uses: pre-commit/action@v3.0.0
27+
with:
28+
extra_args: --files ${{ steps.file_changes.outputs.files }}
29+
30+
pytest:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v3
34+
35+
- uses: actions/setup-python@v4
36+
with:
37+
python-version: "3.10"
38+
39+
- name: Install
40+
run: python -m pip install .[dev]
41+
42+
- name: Tests
43+
run: python -m pytest
44+
45+
- uses: codecov/codecov-action@v3

.gitignore

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
88+
__pypackages__/
89+
90+
# Celery stuff
91+
celerybeat-schedule
92+
celerybeat.pid
93+
94+
# SageMath parsed files
95+
*.sage.py
96+
97+
# Environments
98+
.env
99+
.venv
100+
env/
101+
venv/
102+
ENV/
103+
env.bak/
104+
venv.bak/
105+
106+
# Spyder project settings
107+
.spyderproject
108+
.spyproject
109+
110+
# Rope project settings
111+
.ropeproject
112+
113+
# mkdocs documentation
114+
/site
115+
116+
# mypy
117+
.mypy_cache/
118+
.dmypy.json
119+
dmypy.json
120+
121+
# Pyre type checker
122+
.pyre/
123+
124+
#IDE
125+
.idea/
126+
127+
# Test output
128+
test_output/
129+
130+
# HTcondor files
131+
*/condor_output/*
132+
task_params.txt
133+
task.sub
134+
run_condor.py
135+
136+
# local code and debug files
137+
local/
138+
local.py
139+
local_code/
140+
local_code.py
141+
debug.py

0 commit comments

Comments
 (0)