Skip to content

Commit

Permalink
Refactor (#2)
Browse files Browse the repository at this point in the history
* start refactoring

* continue refactoring, + docs

* update readme

Signed-off-by: Caleb Grant <[email protected]>

* update docs, lint and format

Signed-off-by: Caleb Grant <[email protected]>

---------

Signed-off-by: Caleb Grant <[email protected]>
  • Loading branch information
geocoug authored Jul 20, 2024
1 parent c6567f8 commit 902ef2b
Show file tree
Hide file tree
Showing 15 changed files with 2,695 additions and 2,197 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,31 @@ jobs:
platforms: linux/amd64,linux/arm64


docs-build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install sphinx sphinx-book-theme
- name: Build Sphinx documentation
run: |
cd docs
make html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html


pypi-publish:
name: PyPI Publish
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
dist/
*.egg-info
build/
docs/_build/
21 changes: 19 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ PYTHON = $(BIN)/python
PIP = $(BIN)/pip
TEST = pytest

# Sphinx documentation
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXAPIDOC ?= sphinx-apidoc
SOURCEDIR = docs
BUILDDIR = docs/_build

# Self documenting commands
.DEFAULT_GOAL := help
.PHONY: help
Expand Down Expand Up @@ -61,12 +68,22 @@ lint: $(VENV)/bin/activate ## Run pre-commit hooks
test: $(VENV)/bin/activate ## Run unit tests
$(PYTHON) -m $(TEST)

build: $(VENV)/bin/activate ## Generate distrubition packages
build-dist: $(VENV)/bin/activate ## Generate distrubition packages
$(PYTHON) -m build

build-docs: ## Generate documentation
@printf "Building documentation\n"
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)

publish: $(VENV)/bin/activate ## Publish to PyPI
$(MAKE) lint
$(MAKE) test
$(MAKE) build
$(MAKE) build-dist
$(PYTHON) -m twine upload --repository pypi dist/*
$(MAKE) clean

build: $(VENV)/bin/activate ## Build the project
$(MAKE) lint
$(MAKE) test
$(MAKE) build-dist
$(MAKE) build-docs
Loading

0 comments on commit 902ef2b

Please sign in to comment.