Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Package docs are now generated from Makefile
- Loading branch information
Showing
13 changed files
with
62 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
DOCS=docs | ||
DOCS_IMAGES_RAW=$(DOCS)/images | ||
DOCS_IMAGES_ANNOTATED=$(DOCS_IMAGES_RAW)/annotated | ||
ANNOTATED_TIKZ=$(wildcard $(DOCS_IMAGES_ANNOTATED)/*.tikz) | ||
ANNOTATED_JPGS=$(patsubst %.tikz, %.jpg, $(ANNOTATED_TIKZ)) | ||
PKG_DOCS=optoConfig96/resources/docs | ||
|
||
all: generate_package | ||
|
||
generate_docs: $(ANNOTATED_JPGS) $(DOCS)/optoConfig96_guide.html README.md | ||
|
||
$(DOCS_IMAGES_ANNOTATED)/%.jpg: $(DOCS_IMAGES_ANNOTATED)/%.tikz | ||
cd $(DOCS_IMAGES_ANNOTATED) ; \ | ||
pdflatex $(notdir $<) | ||
gs -sDEVICE=png16m -dJPEGQ=90 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 \ | ||
-dDOINTERPOLATE -r95 -o $@ $(patsubst %.tikz, %.pdf, $<) | ||
rm $(DOCS_IMAGES_ANNOTATED)/*.{aux,log,pdf} | ||
|
||
$(DOCS)/optoConfig96_guide.html: $(DOCS)/guide.md | ||
pandoc -s $< --css guide.css -o $@ | ||
|
||
README.md: $(DOCS)/guide.md | ||
# Ignore YAML header | ||
tail -n+5 docs/guide.md > README.md | ||
# Make image paths relative to root | ||
sed -i "s|images/|docs/images/|g" README.md | ||
|
||
generate_package: generate_docs | ||
# Copy docs to resources folder to make the documentation available from | ||
# within the application | ||
rm -rf $(PKG_DOCS) | ||
mkdir -p $(PKG_DOCS)/images/annotated | ||
cp $(DOCS)/*.{css,html} $(PKG_DOCS) | ||
cp $(DOCS)/images/*.jpg $(PKG_DOCS)/images | ||
cp $(DOCS)/images/annotated/*.jpg $(PKG_DOCS)/images/annotated | ||
python -m build | ||
|
||
.PHONY: test_install | ||
test_install: | ||
rm -rf test_install | ||
mkdir test_install ; cd test_install ; \ | ||
python -m venv test_install_venv ; \ | ||
source test_install_venv/bin/activate ; \ | ||
pip install ../dist/optoConfig96-1.0.3.tar.gz ; \ | ||
python -m optoConfig96 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
optoConfig96/resources/docs/images/annotated/annotation_template.tex
This file was deleted.
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
optoConfig96/resources/docs/images/annotated/bulk_assign.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 0 additions & 24 deletions
24
optoConfig96/resources/docs/images/annotated/bulk_assign.tikz
This file was deleted.
Oops, something went wrong.
Binary file modified
BIN
-197 Bytes
(100%)
optoConfig96/resources/docs/images/annotated/overview.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 0 additions & 20 deletions
20
optoConfig96/resources/docs/images/annotated/overview.tikz
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters