Skip to content

Commit

Permalink
Add Mike for Docs Versioning (#33)
Browse files Browse the repository at this point in the history
* bump version, add mike

* mike pages fun

* add mike fun

* update readme

* mike refinements

* add docs to changelog
  • Loading branch information
ADGEfficiency authored Jul 1, 2023
1 parent 0e63030 commit 5565f39
Show file tree
Hide file tree
Showing 7 changed files with 379 additions and 46 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
0.1.2 - add the site API, add documentation.
0.1.1 - allow Python 3.11.
0.1.0 - added to pypi.
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,22 @@ publish: setup
poetry build
@poetry config pypi-token.pypi $(PYPI_TOKEN)
poetry publish
# TODO publish docs

# DOCS
.PHONY: docs docs-build
.PHONY: docs docs-build mike-deploy

docs: setup-docs
cd docs; mkdocs serve; cd ..
cd docs; mike serve; cd ..

# actually not used anymore - we used mike to build & deploy docs
docs-build: setup-docs
cd docs; mkdocs build; cd ..

# -u = update aliases of this $(VERSION) to latest
# -b = branch - aligns with the branch name we build docs off
# -r = Github remote
# -p = push
# TODO - get VERSION from pyproject.toml
mike-deploy:
cd docs; mike deploy $(VERSION) latest -u -b mike-pages -r origin -p
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

---

Documentation: [energypylinear.adgefficiency.com](https://energypylinear.adgefficiency.com)
Documentation: [energypylinear.adgefficiency.com](https://energypylinear.adgefficiency.com/latest)

---

Expand Down Expand Up @@ -107,4 +107,4 @@ $ make test

## Documentation

Documentation is hosted at [energypylinear.adgefficiency.com](https://energypylinear.adgefficiency.com).
Documentation is hosted at [energypylinear.adgefficiency.com](https://energypylinear.adgefficiency.com/latest).
4 changes: 4 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
site_name: energy-py-linear
site_url: https://energypylinear.adgefficiency.com
repo_url: https://github.com/ADGEfficiency/energy-py-linear
repo_name: energy-py-linear
theme:
Expand Down Expand Up @@ -63,3 +64,6 @@ nav:
# - Blocks: index.md
# - Spills: index.md
# - Valves: index.md
extra:
version:
provider: mike
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ phmdoctest
pytest
pillow
cairosvg
mike
395 changes: 354 additions & 41 deletions poetry.lock

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "energypylinear"
version = "0.1.1"
version = "0.1.2"
description = "Optimizing energy assets with mixed-integer linear programming."
authors = ["Adam Green <adam.green@adgefficiency.com>"]
license = "MIT"
Expand Down Expand Up @@ -40,6 +40,10 @@ ipython = "^8.7.0"
[tool.poetry.group.static.dependencies]
mypy = "^0.991"


[tool.poetry.group.dev.dependencies]
mike = "^1.1.2"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 5565f39

Please sign in to comment.