Skip to content

Commit ab6aec2

Browse files
committed
init commit
0 parents  commit ab6aec2

38 files changed

+15201
-0
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: 'Bug Report'
3+
about: 'Report a bug or unexpected behavior to help us improve the package'
4+
labels: 'bug'
5+
---
6+
7+
Please:
8+
9+
- [ ] Check for duplicate issues.
10+
- [ ] Provide a complete example of how to reproduce the bug, wrapped in triple backticks like this:
11+
12+
```python
13+
import brainunit as bu
14+
```
15+
16+
- [ ] If applicable, include full error messages/tracebacks.
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: 'Feature Request'
3+
about: 'Suggest a new idea or improvement for ``brainunit``'
4+
labels: 'enhancement'
5+
---
6+
7+
Please:
8+
9+
- [ ] Check for duplicate requests.
10+
- [ ] Describe your goal, and if possible provide a code snippet with a motivating example.

.github/PULL_REQUEST_TEMPLATE.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
<!--- Please do remember to follow the contributing guidelines -->
3+
4+
## Description
5+
<!--- Why is this change required? What problem does it solve? -->
6+
<!--- Describe your changes in detail here to communicate to the maintainers why this pull request should be accepted -->
7+
<!--- Describe your technology stack here if not a documentation update -->
8+
<!--- Tasklist format is recommended for all pull requests and is required for all draft pull requests. You can couple your description with the tasklist -->
9+
<!--- If it fixes an open issue, please link to the issue here in the last line. -->
10+
11+
## How Has This Been Tested
12+
<!--- Please describe in detail how you tested your changes locally -->
13+
<!--- Include details of your testing environment, and the tests you ran to -->
14+
<!--- For example, markdown files should pass markdownlint locally according to the rules -->
15+
<!--- See how your change affects other areas of the code, etc. -->
16+
17+
## Types of changes
18+
<!--- What types of changes does your code introduce? -->
19+
<!--- Only left the line that best describes this pull request -->
20+
- Bug fix (non-breaking change which fixes an issue)
21+
- New feature (non-breaking change which adds functionality)
22+
- Documentation (non-breaking change which updates documentation)
23+
- Breaking change (fix or feature that would cause existing functionality to change)
24+
- Code style (formatting, renaming)
25+
- Refactoring (no functional changes, no api changes)
26+
- Other (please describe here):
27+
28+
## Checklist
29+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
30+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
31+
- [ ] Code follows the code style of this project.
32+
- [ ] Changes follow the **CONTRIBUTING** guidelines.
33+
- [ ] Update necessary documentation accordingly.
34+
- [ ] Lint and tests pass locally with the changes.
35+
- [ ] Check issues and pull requests first. You don't want to duplicate effort.
36+
37+
## Other information

.github/dependabot.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "pip"
9+
directory: "/"
10+
schedule:
11+
interval: "daily"
12+
allow:
13+
- dependency-type: "all"
14+
commit-message:
15+
prefix: ":arrow_up:"
16+
open-pull-requests-limit: 50
17+
18+
- package-ecosystem: "github-actions"
19+
directory: "/"
20+
schedule:
21+
interval: "daily"
22+
allow:
23+
- dependency-type: "all"
24+
commit-message:
25+
prefix: ":arrow_up:"
26+
open-pull-requests-limit: 50

.github/workflows/CI.yml

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Continuous Integration
5+
6+
on:
7+
push:
8+
branches:
9+
- '**' # matches every branch
10+
pull_request:
11+
branches:
12+
- '**' # matches every branch
13+
14+
15+
permissions:
16+
contents: read # to fetch code
17+
actions: write # to cancel previous workflows
18+
19+
# This is what will cancel the workflow
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: true
23+
24+
25+
jobs:
26+
test_linux:
27+
runs-on: ubuntu-latest
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
32+
33+
steps:
34+
- name: Cancel Previous Runs
35+
uses: styfle/[email protected]
36+
with:
37+
access_token: ${{ github.token }}
38+
- uses: actions/checkout@v4
39+
- name: Print concurrency group
40+
run: echo '${{ github.workflow }}-${{ github.ref }}'
41+
- name: Set up Python ${{ matrix.python-version }}
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: ${{ matrix.python-version }}
45+
- name: Install dependencies
46+
run: |
47+
python -m pip cache purge
48+
python -m pip install --upgrade pip setuptools --no-cache-dir
49+
python -m pip install -r requirements-dev.txt --no-cache-dir
50+
pip install . --no-cache-dir
51+
- name: Test with pytest
52+
run: |
53+
pytest brainunit/
54+
55+
56+
test_macos:
57+
runs-on: macos-latest
58+
strategy:
59+
fail-fast: false
60+
matrix:
61+
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
62+
63+
steps:
64+
- name: Cancel Previous Runs
65+
uses: styfle/[email protected]
66+
with:
67+
access_token: ${{ github.token }}
68+
- uses: actions/checkout@v4
69+
- name: Print concurrency group
70+
run: echo '${{ github.workflow }}-${{ github.ref }}'
71+
- name: Set up Python ${{ matrix.python-version }}
72+
uses: actions/setup-python@v5
73+
with:
74+
python-version: ${{ matrix.python-version }}
75+
- name: Install dependencies
76+
run: |
77+
python -m pip cache purge
78+
python -m pip install --upgrade pip setuptools --no-cache-dir
79+
python -m pip install -r requirements-dev.txt --no-cache-dir
80+
pip install .
81+
- name: Test with pytest
82+
run: |
83+
pytest brainunit/
84+
85+
86+
test_windows:
87+
runs-on: windows-latest
88+
strategy:
89+
fail-fast: false
90+
matrix:
91+
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
92+
93+
steps:
94+
- name: Cancel Previous Runs
95+
uses: styfle/[email protected]
96+
with:
97+
access_token: ${{ github.token }}
98+
- uses: actions/checkout@v4
99+
- name: Print concurrency group
100+
run: echo '${{ github.workflow }}-${{ github.ref }}'
101+
- name: Set up Python ${{ matrix.python-version }}
102+
uses: actions/setup-python@v5
103+
with:
104+
python-version: ${{ matrix.python-version }}
105+
- name: Install dependencies
106+
run: |
107+
python -m pip cache purge
108+
python -m pip install --upgrade pip setuptools --no-cache-dir
109+
python -m pip install -r requirements-dev.txt --no-cache-dir
110+
pip install . --no-cache-dir
111+
- name: Test with pytest
112+
run: |
113+
pytest brainunit/ -p no:faulthandler

.github/workflows/Publish.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Publish to PyPI.org
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
pypi:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0
13+
- run: python setup.py bdist_wheel --python-tag=py3
14+
- name: Publish package
15+
uses: pypa/gh-action-pypi-publish@release/v1
16+
with:
17+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)