Skip to content

Commit 5374fe2

Browse files
author
AlvarBer
committed
Release alpha 0.3
Code: * Rewritten contributions by previous team member. * Added icon file chooser Documentation: * Added book version with some academic requirements * Date and version automatically get inputted on document * Added implementation section * Expanded previous chapters
2 parents 97c39f1 + cdf52cd commit 5374fe2

21 files changed

+298
-124
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# PDF files
22
*.pdf
33

4+
# Word files
5+
*.docx
6+
47
# TeX files
58
*.tex
69

.travis.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ install: true
77

88
script: true
99

10+
1011
after_success:
1112
- sudo apt-get install texlive-latex-extra
1213
- cd docs
@@ -18,6 +19,13 @@ after_success:
1819
- cd .. && mv standalone/* .
1920
- make travis && cd ..
2021

22+
# Run tests on master & dev
23+
branches:
24+
only:
25+
- master
26+
- dev
27+
28+
# Only deploy on master
2129
deploy:
2230
provider: releases
2331
api_key: "$GH_TOKEN"
@@ -28,9 +36,6 @@ deploy:
2836
branch:
2937
- master
3038

31-
# Only run CI on master
32-
branches:
33-
only:
34-
- master
35-
- dev
36-
39+
# Stop bothering me
40+
notifications:
41+
email: false

docs/Makefile

Lines changed: 62 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,69 @@
11
PDF := persimmon.pdf # PDF Main Target
2+
MARKDOWN := introduction.md state_of_the_art.md objectives.md risk_analysis.md \
3+
implementation.md postmortem.md # Markdown files
4+
BODY := body.tex # Markdown files will be converted to this intermediate step
5+
#APPENDICES := appendixX.md # Markdown Appendices
6+
#APPENDIX := appendix.tex # And appendices to this intermediate step
7+
# METADATA := metadata.yaml # Metadata files (Author, Date, Title, etc..)
8+
BIBLIOGRAPHY := persimmon.bib # BibLaTeX bibliography
29
CSL := emerald-harvard.csl # CSL file used for citations
310
TEMPLATE := template.tex # LaTeX template for producing PDF
4-
BIBLIOGRAPHY := persimmon.bib # BibLaTeX bibliography
5-
MARKDOWN := chapter0.md chapter1.md chapter2.md chapter3.md # Markdown files
6-
GRAPHS := $(wildcard graphs/*.tex)
7-
IMAGES := $(GRAPHS:.tex=.pdf)
8-
IMAGES += $(wildcard graphs/*.png) # Standalone pictures to be inserted
9-
LATEXHEADERS := latexheaders.tex # Additional LaTeX headers
10-
METADATA := metadata.yaml # Metadata files (Author, Date, Title, etc..)
11-
12-
all: pdf
13-
14-
pdf: $(MARKDOWN) $(BIBLIOGRAPHY) $(CSL) $(TEMPLATE) $(IMAGES) $(METADATA)
15-
pandoc --standalone --smart --latex-engine xelatex --template $(TEMPLATE) \
16-
--top-level-division chapter --bibliography $(BIBLIOGRAPHY) --csl $(CSL) \
17-
--include-in-header $(LATEXHEADERS) $(METADATA) $(MARKDOWN) -o $(PDF)
18-
19-
travis: $(IMAGES)
20-
pandoc --standalone --smart --latex-engine xelatex --template $(TEMPLATE) \
21-
--chapters --bibliography $(BIBLIOGRAPHY) --csl $(CSL) \
22-
--include-in-header $(LATEXHEADERS) $(METADATA) $(MARKDOWN) -o $(PDF)
23-
24-
# For standalone images (Not used)
11+
12+
GRAPHS := $(wildcard graphs/*.tex) # Latex diagrams
13+
IMAGES := $(wildcard graphs/*.png) # .png images
14+
IMAGES += $(GRAPHS:.tex=.pdf) # Generated PDF Images
15+
16+
all: $(PDF)
17+
18+
# Main PDF, travis ci and book to print version
19+
$(PDF): $(BODY) $(TEMPLATE) $(IMAGES) # TODO: Add abstract
20+
pandoc --smart --standalone --latex-engine xelatex --template $(TEMPLATE) \
21+
--metadata author:"Álvaro Bermejo" \
22+
--metadata date:"$(shell date +"%d/%m/%Y") ($(shell git describe --abbrev=0 --tags))" \
23+
--metadata title:"Persimmon" --metadata fontsize:"12pt" --toc \
24+
--metadata subtitle:"A scikitlearn visual programming interface" \
25+
--metadata mainlang:"English" --metada keywords:"Machine Learning","Visual Programming" \
26+
--metadata papersize:"A4" --metadata sansfont:"Helvetica Neue LT Com" \
27+
--metadata colorlinks --metadata documentclass:"scrreprt" \
28+
--top-level-division chapter $(BODY) -o $@
29+
30+
# Main PDF, travis ci and book to print version
31+
travis: $(BODY) $(APPENDIX) $(TEMPLATE) $(IMAGES)
32+
pandoc --smart --standalone --latex-engine xelatex --template $(TEMPLATE) \
33+
--metadata author:"Álvaro Bermejo" \
34+
--metadata date:"$(shell date +"%d/%m/%Y") ($(shell git describe --abbrev=0 --tags))" \
35+
--metadata title:"Persimmon" --metadata fontsize:"12pt" --toc \
36+
--metadata subtitle:"A sklearn visual programming interface" \
37+
--metadata mainlang:"English" --metada keywords:"Machine Learning","Visual Programming" \
38+
--metadata papersize:"A4" \
39+
--metadata colorlinks --metadata documentclass:"scrreprt" \
40+
--chapters $(BODY) $(APPENDIX) -o $(PDF)
41+
42+
43+
book_complu: $(BODY) $(APPENDIX) $(TEMPLATE) $(IMAGES)
44+
pandoc --smart --standalone --latex-engine xelatex --template $(TEMPLATE) \
45+
--metadata author:"Álvaro Bermejo" --metadata date:"Director: Pablo Moreno Ger" \
46+
--metadata title:"Persimmon" --metadata fontsize:"12pt" --toc \
47+
--metadata subtitle:"A scikitlearn visual programming interface" \
48+
--metadata mainlang:"English" \
49+
--metadata papersize:"A4" --metadata sansfont:"Helvetica Neue LT Com" \
50+
--metadata documentclass:"scrbook" --metadata institute:"Universidad Complutense" \
51+
--top-level-division chapter $(BODY) $(APPENDIX) -o bool_$(PDF)
52+
53+
54+
# For standalone images
2555
graphs/%.pdf: graphs/%.tex
26-
xelatex $<
27-
28-
## Splitted creation (Not currently working)
29-
#CHAPTERS := $(MARKDOWN:.md=.tex) # LaTeX Chapters
30-
#GRAPHS := $(wildcard graphs/*.tex)
31-
#IMAGES += $(GRAPHS:.tex=.pdf)
32-
#
33-
##splitted: $(CHAPTERS) $(BIBLIOGRAPHY) $(CSL) $(TEMPLATE)
34-
# pandoc --standalone --smart --latex-engine xelatex --template $(TEMPLATE) \
35-
# --top-level-division chapter --bibliography $(BIBLIOGRAPHY) --csl $(CSL) \
36-
# $(CHAPTERS) -o $(PDF)
37-
#
38-
#%.tex: metadata.yaml %.md
39-
# pandoc --no-tex-ligatures metadata.yaml $*.md -o $@
40-
#
41-
## For standalone images (Not used)
42-
#graphs/%.pdf: graphs/%.tex
43-
# xelatex $<
44-
#
56+
xelatex $< > /dev/null # TODO: actually output in graphs directory
57+
mv $*.pdf graphs/
58+
59+
# Body and Appendices Middle Steps creation
60+
$(BODY): $(MARKDOWN)
61+
pandoc --no-tex-ligatures --bibliography $(BIBLIOGRAPHY) --csl $(CSL) \
62+
metadata.yaml $(MARKDOWN) -o $@
63+
64+
$(APPENDIX): $(APPENDICES)
65+
pandoc --no-tex-ligatures $(APPENDICES) -o $@
4566

4667
clean:
47-
rm -f *.pdf chapter?.tex *.log *.aux *.png
68+
rm -f $(BODY) $(APPENDIX) graphs/*.pdf *.pdf *.log *.aux
4869

docs/appendixX.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Appendix X: How was this document made?
2+
=======================================
3+
4+
This document was written on Markdown, and converted to PDF
5+
using Pandoc.
6+
7+
Process
8+
-------
9+
Document is written on Pandoc's extended Markdown, and can be broken amongst
10+
different files. Images are inserted with regular Markdown syntax for images.
11+
A YAML file with metadata information is passed to pandoc, containing things
12+
such as Author, Title, font, etc... The use of this information depends on
13+
what output we are creating and the template/reference we are using.
14+
15+
16+
Diagrams
17+
--------
18+
Diagrams are were created with LaTeX packages such as tikz or pgfgantt, they
19+
can be inserted directly as PDF, but if we desire to output to formats other
20+
than LaTeX is more convenient to convert them to .png filesi with tools such
21+
as `pdftoppm`.
22+
23+
24+
References
25+
------------
26+
References are handled by pandoc-citeproc, we can write our bibliography in
27+
a myriad of different formats: bibTeX, bibLaTeX, JSON, YAML, etc..., then
28+
we reference in our markdown, and that reference works for multiple formats
29+
30+

docs/chapter0.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

docs/graphs/early_interface.png

95.8 KB
Loading

docs/graphs/filechooser.png

113 KB
Loading

docs/graphs/objectives.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
\draw (-1, 2.8) rectangle (1, 3.5) node[midway, gray] {Parity};
1010
\draw [->, gray, thick] (0, 3.6) -- (0, 4.3);
1111
\draw (-1, 4.4) rectangle (1, 5.1) node[midway, gray] {Compilation};
12-
\draw [red, dashed] (-3, 5.5) -- (3, 5.5) node[below left] {Out of scope};
12+
\draw [red, dashed] (4, 5.35) -- (-4, 5.35) node[above right] {Out of scope};
1313
\draw [->, gray, thick] (-0.1, 5.2) -- (-2, 5.9);
1414
\draw [->, gray, thick] (0.1, 5.2) -- (2, 5.9);
1515
\draw (-3, 6) rectangle (-1, 6.7) node[midway, gray] {Web};

docs/implementation.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Implementation
2+
==============
3+
4+
First Iteration
5+
---------------
6+
7+
![Early "static" interface](graphs/early_interface.png)
8+
9+
![File chooser](graphs/filechooser.png)
10+
11+

docs/introduction.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Introduction
2+
============
3+
4+
Description
5+
-----------
6+
Persimmon is a visual programming interface for sklearn.
7+
8+
This projects involves a variety of Computer Science topics, such as User
9+
Experience (Main topic as the project is driven by the users feedback and
10+
engagement with the project), Machine Learning (We don't write the algorithms,
11+
but need extensive knowledge of them to surface all their options) Software
12+
Engineering (We have to interact with already built software, using interfaces
13+
and organizing code through object-oriented techniques), Compilers (Language
14+
parsing and transpilers) and a number of tangentially related topics such as
15+
Machine Learning, I/O, preprocessing of data, etc.
16+
17+
Motivation
18+
----------
19+
After learning about Machine Learning on university last year I was able to get
20+
an internship working for a company on the algorithmic trading sector..
21+
22+
There, amongst other duties, I aided with moving the codebase from MATLAB to
23+
Python, and during that process I realised many of my co-workers struggled with
24+
the switch. All of the were not computer scientists, but instead came from a
25+
variety of backgrounds such as Maths, Physics, Electric Engineering,
26+
Statistics or Aerospacial Engineering.
27+
28+
Yet they were the whole of the department, their work requires a very high
29+
level of theoretical maths knowledge, and so happens that these experts from
30+
these fields tend to not have a lot of general programming skills, they mostly
31+
work with specialized languages, tailored to these tasks such as MATLAB, R,
32+
Julia, etc, and moving to a general purpose language such as Python involves
33+
learning about a plethora of additional topics, such as Object Oriented
34+
Programming, custom complex Datastructures or CPU cache optimization.
35+
36+
The situation is even more complicated for newcomers to Machine Learning, as
37+
they not only have the programming barrier but also have to overcome the
38+
difficulties of the algorithms themselves, something Computer Scientists also
39+
struggle with (In many cases even more because their weaker maths skills).
40+
41+
So this project serves a double purpose, it helps with the programming barrier,
42+
and it aids with the Machine Learning process as it allows the learner to focus
43+
on the connections, intuitions and mathematical basis and not on the
44+
implementation details and the quirks of the concrete language.
45+
46+
This hypothesis that visual learning can improve understanding is supported by
47+
numerous sources such as [@fry2007visualizing] and [@principles].
48+

0 commit comments

Comments
 (0)