Skip to content

Commit 45d7258

Browse files
author
aaahalian
committed
Added template
1 parent ecb025d commit 45d7258

File tree

88 files changed

+23681
-0
lines changed

Some content is hidden

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

88 files changed

+23681
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
3+
name: Bug Report
4+
about: Create a bug report to help us improve template_project
5+
title: "BUG:"
6+
labels: "bug"
7+
8+
---
9+
10+
- [ ] I have checked that this issue has not already been reported.
11+
12+
- [ ] I have confirmed this bug exists on the latest version of template_project.
13+
14+
- [ ] (optional) I have confirmed this bug exists on the `main` branch of template_project.
15+
16+
---
17+
18+
**Note**: Please read [this
19+
guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing
20+
how to provide the necessary information for us to reproduce your bug.
21+
22+
#### Code Sample, a copy-pastable example
23+
24+
```python
25+
# Your code here
26+
```
27+
28+
#### Problem description
29+
30+
Explain **why** the current behaviour is a problem and why the expected output is a
31+
better solution.
32+
33+
#### Expected Output
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
3+
name: Documentation Improvement
4+
about: Report wrong or missing documentation in template_project
5+
title: "DOC:"
6+
labels: "documentation"
7+
8+
---
9+
10+
#### Documentation problem
11+
12+
Provide a description of what documentation you believe needs to be fixed/improved.
13+
14+
#### Suggested fix for documentation
15+
16+
Explain the suggested fix and **why** it's better than the existing documentation.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
3+
name: Enhancement
4+
about: Suggest an idea for template_project
5+
title: "ENH:"
6+
labels: "enhancement"
7+
8+
---
9+
10+
#### Is your feature request related to a problem?
11+
12+
Provide a description of what the problem is, e.g. "I wish I could use
13+
template_project to do [...]".
14+
15+
#### Describe the solution you'd like
16+
17+
Provide a description of the feature request and how it might be implemented.
18+
19+
#### API breaking implications
20+
21+
Provide a description of how this feature will affect the API.
22+
23+
#### Describe alternatives you've considered
24+
25+
Provide a description of any alternative solutions or features you've considered.
26+
27+
#### Additional context
28+
29+
Add any other context, code examples, or references to existing implementations about
30+
the feature request here.
31+
32+
```python
33+
# Your code here, if applicable
34+
```

.github/ISSUE_TEMPLATE/question.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
3+
name: Submit Question
4+
about: Ask a general question about template_project
5+
title: "QST:"
6+
labels: "question"
7+
8+
---
9+
10+
#### Question about template_project
11+
12+
**Note**: If you'd still like to submit a question, please read [this guide](
13+
https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) detailing how to
14+
provide the necessary information for us to reproduce your question.
15+
16+
```python
17+
# Your code here, if applicable
18+
```

.github/pull_request_template.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#### Changes
2+
3+
Provide a description and/or bullet points to describe the changes in this PR.
4+
5+
#### Todo
6+
7+
- [ ] Reference issues which can be closed due to this PR with "Closes #x".
8+
- [ ] Review whether the documentation needs to be updated.

.github/workflows/main.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: main
3+
# Automatically cancel a previous run.
4+
concurrency:
5+
group: ${{ github.head_ref || github.run_id }}
6+
cancel-in-progress: true
7+
# yamllint disable rule:line-length
8+
on:
9+
push:
10+
branches: [main]
11+
pull_request:
12+
branches: ['*']
13+
jobs:
14+
run-tests:
15+
name: Run tests for ${{ matrix.os }} on Python 3.13
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu-latest, macos-latest, windows-latest]
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Install TinyTex
24+
uses: r-lib/actions/setup-tinytex@v2
25+
if: runner.os != 'Windows'
26+
- name: Install additional LaTeX packages
27+
run: |
28+
tlmgr update --self
29+
tlmgr install a4wide beamer biber biblatex caption eurosym grfext minibox moreverb ntgclass relsize setspace xfrac
30+
tlmgr list --only-installed
31+
if: runner.os != 'Windows'
32+
- uses: prefix-dev/[email protected]
33+
with:
34+
pixi-version: v0.41.4
35+
cache: true
36+
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
37+
activate-environment: true
38+
frozen: true
39+
- name: Run pytest on MacOS
40+
shell: bash {0}
41+
run: pixi run pytest
42+
if: runner.os == 'MacOS'
43+
- name: Run tests (except pytask) on Windows
44+
shell: bash {0}
45+
run: pixi run pytest -k "not pytask"
46+
if: runner.os == 'Windows'
47+
- name: Run pytest (with coverage) on Linux
48+
shell: bash {0}
49+
run: pixi run pytest --cov-report=xml --cov=./
50+
if: runner.os == 'Linux'
51+
- name: Upload coverage reports
52+
uses: codecov/codecov-action@v4
53+
if: runner.os == 'Linux'
54+
with:
55+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# python
2+
*.egg-info
3+
*_version.py
4+
*.pyc
5+
*__pycache__
6+
*.ipynb_checkpoints
7+
8+
# python tools
9+
.pytest_cache
10+
.ruff_cache
11+
.pytask.sqlite3
12+
.pytask
13+
.pixi
14+
15+
# R
16+
.RData
17+
.Rhistory
18+
19+
# bld
20+
bld/
21+
22+
# latex
23+
*.aux
24+
*.bbl
25+
*.bcf*
26+
*.blg
27+
*.fdb_latexmk
28+
*.fls
29+
*.log
30+
*.out
31+
*.pdf
32+
*.run.xml
33+
*.synctex.gz
34+
*.nav
35+
*.snm
36+
*.toc
37+
38+
# documentation
39+
docs_template/build/
40+
docs_template/scripts/latex/*.png
41+
42+
# local
43+
.vscode

.pre-commit-config.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
repos:
3+
- repo: meta
4+
hooks:
5+
- id: check-useless-excludes
6+
# - id: check-hooks-apply # Leave nbqa in here.
7+
# - id: identity # Prints all files passed to pre-commits. Debugging.
8+
- repo: https://github.com/lyz-code/yamlfix
9+
rev: 1.17.0
10+
hooks:
11+
- id: yamlfix
12+
- repo: https://github.com/pre-commit/pre-commit-hooks
13+
rev: v5.0.0
14+
hooks:
15+
- id: check-added-large-files
16+
args: [--maxkb=25]
17+
- id: check-case-conflict
18+
- id: check-merge-conflict
19+
- id: check-vcs-permalinks
20+
- id: check-yaml
21+
- id: check-toml
22+
- id: debug-statements
23+
- id: end-of-file-fixer
24+
- id: fix-byte-order-marker
25+
types: [text]
26+
- id: forbid-submodules
27+
- id: mixed-line-ending
28+
args: [--fix=lf]
29+
description: Forces to replace line ending by the UNIX 'lf' character.
30+
- id: name-tests-test
31+
args: [--pytest-test-first]
32+
- id: trailing-whitespace
33+
- id: check-ast
34+
- id: check-docstring-first
35+
- repo: https://github.com/adrienverge/yamllint.git
36+
rev: v1.35.1
37+
hooks:
38+
- id: yamllint
39+
- repo: https://github.com/astral-sh/ruff-pre-commit
40+
rev: v0.9.9
41+
hooks:
42+
# Run the linter.
43+
- id: ruff
44+
types_or: [python, jupyter]
45+
args:
46+
- --fix
47+
# Run the formatter.
48+
- id: ruff-format
49+
types_or: [python, jupyter]
50+
- repo: https://github.com/kynan/nbstripout
51+
rev: 0.8.1
52+
hooks:
53+
- id: nbstripout
54+
args:
55+
- --extra-keys
56+
- metadata.kernelspec metadata.language_info.version metadata.vscode
57+
- repo: https://github.com/executablebooks/mdformat
58+
rev: 0.7.22
59+
hooks:
60+
- id: mdformat
61+
additional_dependencies: [mdformat-gfm, mdformat-gfm-alerts, mdformat-ruff]
62+
args: [--wrap, '88']
63+
files: (README\.md)
64+
- repo: https://github.com/executablebooks/mdformat
65+
rev: 0.7.22
66+
hooks:
67+
- id: mdformat
68+
additional_dependencies: [mdformat-myst, mdformat-ruff]
69+
args: [--wrap, '88']
70+
files: (docs_template/.)
71+
- repo: https://github.com/codespell-project/codespell
72+
rev: v2.4.1
73+
hooks:
74+
- id: codespell
75+
exclude: pixi.lock
76+
- repo: local
77+
hooks:
78+
- id: forbid-to-commit
79+
name: Don't commit common R artifacts
80+
entry: Cannot commit .Rhistory, .RData, .Rds or .rds.
81+
language: fail
82+
files: \.(Rhistory|RData|Rds|rds)$
83+
# `exclude: <regex>` to allow committing specific files{% endif %}
84+
ci:
85+
autoupdate_schedule: monthly

.yamllint.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
yaml-files: ['*.yaml', '*.yml', .yamllint]
3+
rules:
4+
braces: enable
5+
brackets: enable
6+
colons: enable
7+
commas: enable
8+
comments:
9+
level: warning
10+
comments-indentation:
11+
level: warning
12+
document-end: disable
13+
document-start:
14+
level: warning
15+
empty-lines: enable
16+
empty-values: disable
17+
float-values: disable
18+
hyphens: enable
19+
indentation: {spaces: 2}
20+
key-duplicates: enable
21+
key-ordering: disable
22+
line-length:
23+
max: 88
24+
allow-non-breakable-words: true
25+
allow-non-breakable-inline-mappings: false
26+
new-line-at-end-of-file: enable
27+
new-lines:
28+
type: unix
29+
octal-values: disable
30+
quoted-strings: disable
31+
trailing-spaces: enable
32+
truthy:
33+
level: warning

0 commit comments

Comments
 (0)