Skip to content

Commit

Permalink
Add build scripts, remove type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
kjy5 committed Dec 24, 2024
1 parent d73bc90 commit 229b890
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 51 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/autoformat-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ jobs:
- name: 🧶 Lint
run: hatch fmt --check

- name: 🔍 Type Check
run: hatch -e types run check
# - name: 🔍 Type Check
# run: hatch -e types run check
30 changes: 30 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build Documentation

on:
pull_request:
branches: [ "main" ]
workflow_dispatch:
workflow_call:

jobs:
build:
name: Build

runs-on: ubuntu-latest

steps:
- name: 🛎 Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: 📦 Install Hatch
uses: pypa/hatch@install

- name: 🔨 Build Documentation
run: hatch run docs-build

- name: ⬆️ Upload Artifacts
uses: actions/upload-pages-artifact@v3
with:
path: "site"
41 changes: 41 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Deploy Documentation

on:
push:
branches: [ "main" ]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "deploy-docs"
cancel-in-progress: true

jobs:

build:
name: Build
uses: ./.github/workflows/build-docs.yml

deploy:
name: Deploy Documentation

needs: build

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest

steps:

- name: 🎛 Setup Pages
uses: actions/configure-pages@v5

- name: 🚀 Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
53 changes: 4 additions & 49 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,60 +61,15 @@ exclude = ["/.github", "/.idea"]
python = "3.13.1"
dependencies = [
"mkdocs-material==9.5.49",
"mkdocstrings-python==1.12.2"
# "coverage[toml]>=6.5",
# "pytest",
"mkdocstrings-python==1.12.2",
"pyinstaller==6.11.1",
]
[tool.hatch.envs.default.scripts]
docs = "mkdocs serve"
#test = "pytest {args:tests}"
#test-cov = "coverage run -m pytest {args:tests}"
#cov-report = [
# "- coverage combine",
# "coverage report",
#]
#cov = [
# "test-cov",
# "cov-report",
#]
docs-build = "mkdocs build"

[tool.hatch.envs.exe]
python = "3.13.1"
dependencies = [
"pyinstaller",
]
[tool.hatch.envs.exe.scripts]
build = "pyinstaller.exe ephys_link.spec -y -- -d && pyinstaller.exe ephys_link.spec -y"
build_onefile = "pyinstaller.exe ephys_link.spec -y"
build_clean = "pyinstaller.exe ephys_link.spec -y --clean"

[tool.hatch.envs.types]
python = "3.13.1"
skip-install = true
dependencies = [
"mypy",
]
[tool.hatch.envs.types.scripts]
check = "mypy --strict --install-types --non-interactive --ignore-missing-imports {args:src/ephys_link tests}"

#[tool.coverage.run]
#source_pkgs = ["ephys_link", "tests"]
#branch = true
#parallel = true
#omit = [
# "src/ephys_link/__about__.py",
#]
#
#[tool.coverage.paths]
#ephys_link = ["src/ephys_link", "*/ephys-link/src/ephys_link"]
#tests = ["tests", "*/ephys-link/tests"]
#
#[tool.coverage.report]
#exclude_lines = [
# "no cov",
# "if __name__ == .__main__.:",
# "if TYPE_CHECKING:",
#]
build-clean = "pyinstaller.exe ephys_link.spec -y --clean"

[tool.ruff.lint]
extend-ignore = ["DTZ005"]

0 comments on commit 229b890

Please sign in to comment.