feat: init

This commit is contained in:
2025-12-04 16:07:30 +08:00
commit 262583a57f
681 changed files with 117578 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

27
.github/ISSUE_TEMPLATE/issue-report.md vendored Normal file
View File

@@ -0,0 +1,27 @@
---
name: Issue report
about: Create an issue to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Traceback**
Please copy and paste the traceback provided in your Anaconda Prompt here.
**Logs & Configuration Files**
Please drag and drop the logs and configuration files here. These are located in your `.navigate` folder, and can be found easily be opening Navigate, selecting File, then `Open Log Files` and `Open Configuration Files`.

13
.github/workflows/black.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
name: Lint
on: workflow_dispatch
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
with:
src: "./src"
jupyter: true

54
.github/workflows/build_docs.yaml vendored Normal file
View File

@@ -0,0 +1,54 @@
name: Build Documentation
on:
push:
branches: [ develop ]
paths: [ 'docs/**' ]
workflow_dispatch:
jobs:
deploy:
strategy:
matrix:
python-version: [ "3.9" ]
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout GitHub Pages
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python3 -m pip install --upgrade pip
pip install -e '.[docs]'
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build HTML with Sphinx
run: |
cd docs
make html
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: './docs/build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

52
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: deploy
on:
release:
workflow_dispatch:
jobs:
deploy:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
python-version: ["3.9"]
operating-system: [windows-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create .pypirc file
shell: pwsh
run: |
@"
[distutils]
index-servers =
pypi
navigate-micro
[pypi]
repository: https://upload.pypi.org/legacy/
username: $env:PYPI_USERNAME
password: $env:PYPI_PASSWORD
[navigate-micro]
repository: https://upload.pypi.org/legacy/
username: $env:PYPI_USERNAME
password: $env:PYPI_PASSWORD
"@ | Set-Content -Path $env:USERPROFILE\.pypirc
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools build twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
run: |
git tag
python -m build
twine upload -r navigate-micro dist/*

43
.github/workflows/push_checks.yaml vendored Normal file
View File

@@ -0,0 +1,43 @@
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Tests
on:
push:
branches:
- develop
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
python-version: ["3.9"]
operating-system: [windows-latest] # [ubuntu-latest, windows-latest]
env:
MPLBACKEND: Agg # https://github.com/microsoft/azure-pipelines-tasks/issues/16426
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
- name: Test with pytest
run: |
python3 -m pytest
- name: Codecov
uses: codecov/codecov-action@v3.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: false
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
verbose: true