diff --git a/.github/workflows/autoformat-and-lint.yml b/.github/workflows/autoformat-and-lint.yml index 15ecaaf..527f1c6 100644 --- a/.github/workflows/autoformat-and-lint.yml +++ b/.github/workflows/autoformat-and-lint.yml @@ -38,5 +38,5 @@ jobs: - name: ๐Ÿงถ Lint run: hatch fmt --check - - name: ๐Ÿ” Type Check - run: hatch -e types run check \ No newline at end of file +# - name: ๐Ÿ” Type Check +# run: hatch -e types run check \ No newline at end of file diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 0000000..8b2e9b3 --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -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" \ No newline at end of file diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..9c4af77 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -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 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 369d8ef..dcc535b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"] \ No newline at end of file