Skip to content

Commit

Permalink
Release 0.8-β
Browse files Browse the repository at this point in the history
This release has been mostly code refactoring, with few minor extras such as
making persimmon pipeable.

Code
* Persimmon is now registered at Pypi.
* Refactored some loops in favor of generator expression/list comprehensions.
* Annotated part of the codebase with type hinting.
* Refactored property in derived class.
* Implemented abstract classes that enforce overriding.

Documentation
* Updated README.
* Fixed LaTeX cover template.

The LaTeX documentation will probably move to its own repository soon.
  • Loading branch information
AlvarBer committed May 6, 2017
2 parents 4db7683 + 411394c commit e1c8007
Show file tree
Hide file tree
Showing 61 changed files with 611 additions and 784 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ dist/

# CSV Files
*.csv

# virtualenv
env
File renamed without changes.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global-include *.kv *.ini *.png
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Persimmon ![travis](https://travis-ci.org/AlvarBer/Persimmon.svg?branch=master)
===================

![Final aspect](docs/images/final_aspect.png)

What is it?
-----------
Persimmon is a visual dataflow language for creating sklearn pipelines.

It represents functions as blocks, inputs and outputs are presented as pins,
and type safety is enforced when the connection is being made.

![Type safety](docs/images/type_safety.gif)

How to install?
---------------
If you have pip (Python 3.5+) you can simply type

`$> pip install persimmon`

For windows self-contained executables can be found on the [releases page].


![Full use](docs/images/full_use.gif)


[releases page]: https://github.com/AlvarBer/Persimmon/releases
35 changes: 0 additions & 35 deletions Readme.md

This file was deleted.

64 changes: 45 additions & 19 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PDF := persimmon.pdf # PDF Main Target
PDF := persimmon.pdf # PDF Default Target
MARKDOWN := introduction.md literature.md workflow.md milestones.md \
risk.md interface.md implementation.md types.md \
evaluation.md postmortem.md # Markdown files
MARKDOWN_COMPLUTENSE := introduction.md focus.md literature.md \
MARKDOWN_COMPLU := introduction.md focus.md literature.md \
workflow.md milestones.md risk.md interface.md implementation.md \
types.md analysis.md postmortem.md
APPENDICES := packages.md how.md eval_form.md # Appendix after bibliography
Expand All @@ -13,7 +13,7 @@ TEMPLATE := template.tex # LaTeX template for producing PDF

# Add src prefix to markdown files
MARKDOWN := $(addprefix src/, $(MARKDOWN))
MARKDOWN_COMPLUTENSE := $(addprefix src/, $(MARKDOWN_COMPLUTENSE))
MARKDOWN_COMPLU := $(addprefix src/, $(MARKDOWN_COMPLU))
APPENDICES := $(addprefix src/, $(APPENDICES))

GRAPHS := $(wildcard graphs/*.tex) # Latex diagrams
Expand All @@ -26,42 +26,68 @@ APPENDIX := appendix.tex

all: $(PDF)

# Default pdf, no information about university, no extra complutense chapters,
# no cool font
$(PDF): $(MARKDOWN) $(APPENDIX) $(TEMPLATE) $(IMAGES) $(BIBLIOGRAPHY) $(CSL) $(METADATA)
pandoc --smart --standalone --latex-engine xelatex --template $(TEMPLATE) \
--bibliography $(BIBLIOGRAPHY) --csl $(CSL) --table-of-contents \
--top-level-division chapter --highlight-style breezedark \
--include-in-header question.tex \
--metadata geometry:top=2.5cm,left=4cm,right=2.5cm,bottom=2.5cm \
--metadata date:"$(shell date +%Y/%m/%d)" \
--metadata sansfont:"Helvetica Neue LT Com" \
$(METADATA) $(MARKDOWN) --include-after-body $(APPENDIX) -o $@

hertfordshire: $(MARKDOWN) $(TEMPLATE) $(IMAGES) $(BIBLIOGRAPHY) $(CSL) $(METADATA)
# Hertfordshire digital submission
herts: $(MARKDOWN) $(APPENDIX) $(TEMPLATE) $(IMAGES) $(BIBLIOGRAPHY) $(CSL) $(METADATA)
pandoc --smart --standalone --latex-engine xelatex --template $(TEMPLATE) \
--bibliography $(BIBLIOGRAPHY) --csl $(CSL) --table-of-contents \
--top-level-division chapter --highlight-style breezedark \
--include-in-header question.tex \
--metadata geometry:top=2.5cm,left=4cm,right=2.5cm,bottom=2.5cm \
--metadata sansfont:"Helvetica Neue LT Com" \
$(METADATA) $(MARKDOWN) -o pandoc_herts.pdf


complutense: $(MARKDOWN_COMPLUTENSE) $(APPENDIX) $(TEMPLATE) $(IMAGES) $(BIBLIOGRAPHY) $(CSL) $(METADATA)
--metadata institute:"University of Hertfordshire" \
--metadata school:"School of Computer Science" \
--metadata degree:"Modular BSc Honours in Computer Science" \
--metadata degreecode:"6COM1054 - Artificial Intelligence Project" \
--metadata supervisor:"Dr.Mariana Lilley" \
$(METADATA) $(MARKDOWN) --include-after-body $(APPENDIX) \
-o persimmon_herts.pdf

# Hertfordshire print submission
herts_print: $(MARKDOWN) $(TEMPLATE) $(IMAGES) $(BIBLIOGRAPHY) $(CSL) $(METADATA)
pandoc --smart --standalone --latex-engine xelatex --template $(TEMPLATE) \
--bibliography $(BIBLIOGRAPHY) --csl $(CSL) --table-of-contents \
--top-level-division chapter --highlight-style breezedark \
--metadata geometry:top=2.5cm,left=4cm,right=2.5cm,bottom=2.5cm \
--metadata sansfont:"Helvetica Neue LT Com" \
--metadata institute:"University of Hertfordshire" \
--metadata school:"School of Computer Science" \
--metadata degree:"Modular BSc Honours in Computer Science" \
--metadata degreecode:"6COM1054 - Artificial Intelligence Project" \
--metadata supervisor:"Dr.Mariana Lilley" \
$(METADATA) $(MARKDOWN) -o persimmon_herts_print.pdf

# Complutense digital submission
complu: $(MARKDOWN_COMPLU) $(APPENDIX) $(TEMPLATE) $(IMAGES) $(BIBLIOGRAPHY) $(CSL) $(METADATA)
pandoc --smart --standalone --latex-engine xelatex --template $(TEMPLATE) \
--bibliography $(BIBLIOGRAPHY) --csl $(CSL) --table-of-contents \
--top-level-division chapter --highlight-style breezedark \
--metadata title:"A scikit-learn visual programming interface" \
--metadata date:"Director:Manuel Freire Moran, Codirector: Pablo Moreno Ger" \
--metadata sansfont:"Helvetica Neue LT Com" --metadata keywords:"Serious Learning","Visual Programming","Dataflow Programming" \
--metadata titlepic:images/fdi.png $(METADATA) $(MARKDOWN_COMPLUTENSE) \
--include-after-body $(APPENDIX) -o $(PDF)
--include-in-header question.tex \
--metadata sansfont:"Helvetica Neue LT Com" \
--metadata institute:"Universidad Complutense" \
--metadata school:"Facultad de Informática" \
--metadata degree:"Computer Engineering" \
--metadata degreecode:"Tecnología Específica de Computación" \
--metadata supervisor:"Manuel Freire Moran" \
--metadata cosupervisor:"Pablo Moreno Ger" \
--metadata titlepic:images/fdi.png $(METADATA) $(MARKDOWN_COMPLU) \
--include-after-body $(APPENDIX) -o persimmon_complu.pdf

# For standalone images
images/%.pdf: graphs/%.tex
xelatex $< > /dev/null
@mv $*.pdf images/
@rm -f $*.log $*.aux

# Appendices
$(APPENDIX): $(APPENDICES)
pandoc --smart --no-tex-ligatures --top-level-division chapter $(APPENDICES) -o $@

Expand All @@ -71,8 +97,8 @@ APPENDIX_TRAVIS := appendix_travis.tex
travis: $(MARKDOWN) $(APPENDIX_TRAVIS) $(TEMPLATE) $(IMAGES) $(BIBLIOGRAPHY) $(CSL) $(METADATA)
pandoc --smart --standalone --latex-engine xelatex --template $(TEMPLATE) \
--bibliography $(BIBLIOGRAPHY) --csl $(CSL) --table-of-contents \
--chapters --highlight-style breezedark \
--metadata date:"$(shell date +%Y/%m/%d)" \
--chapters --highlight-style espresso \
--include-in-header question.tex \
$(METADATA) $(MARKDOWN) --include-after-body $(APPENDIX_TRAVIS) \
-o $(PDF)

Expand All @@ -81,5 +107,5 @@ $(APPENDIX_TRAVIS): $(APPENDICES)


clean:
rm -f images/*.pdf $(PDF) *.log *.aux appendix*
rm -f images/*.pdf *.pdf *.log *.aux appendix*

Binary file added docs/images/final_aspect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/full_use.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/fully_automatic_workflow.png
Binary file not shown.
Binary file added docs/images/type_safety.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/weka.jpeg
Binary file not shown.
17 changes: 4 additions & 13 deletions docs/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@

---
author: |
Á. Bermejo
Supervised by Mariana Lilley
title: |
University of Hertfordshire
School of Computer Science
Modular BSc Honours in Computer Science
6COM105 - Artificial Intelligence Project
subtitle: |
Final Report
April 2017
Persimmon
#date: 2017-03-01
author: Álvaro Bermejo García
title: Persimmon
subtitle: A visual dataflow language for machine learning
date: \today
documentclass: scrreprt
colorlinks: True
lof: True
Expand Down
44 changes: 44 additions & 0 deletions docs/question.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
\def\question#1\par#2\par{\hbox to \hsize
{\vbox{\hsize=0.72\hsize #1\dotfill}\quad#2\hfil}\medskip\goodbreak}

\newdimen\scalewidth
\scalewidth=0.3\hsize

\def\xfamiliar{\xscalee{not familiar at all}{very familiar}}
\def\xagree{\xscalee{strongly disagree}{agree completely}}
\def\boxes{\fiveboxes{}{}{}{}{}\ignorespaces}
\def\xscale#1#2{%
\setbox0=\hbox{\boxes}%
\setbox1=\hbox to \wd0{\small\strut\hfill #2 $\to$}%
\setbox2=\hbox to \wd0{\small\strut $\gets$ #1 \hfill}%
\vbox{\vbox to 0pt{\vss\box1\box2\kern2pt}\vbox{\box0}}}

\def\xdifficulty{\xscalee{very difficult}{very easy}}
\def\xscalee#1#2{%
\setbox0=\hbox{\boxees}%
\setbox1=\hbox to \wd0{\small\strut\hfill #2 $\to$}%
\setbox2=\hbox to \wd0{\small\strut $\gets$ #1 \hfill}%
\vbox{\vbox to 0pt{\vss\box1\box2\kern2pt}\vbox{\box0}}}
\def\boxees{\sevenboxes{}{}{}{}{}{}{}\ignorespaces}

\def\boxit#1{\hbox{\lower0.7ex\vbox{\hrule\hbox{\vrule\kern1pt
\vbox{\kern1pt\hbox to 1.4em
{\small\strut\hfil #1\hfil}\kern1pt}\kern1pt\vrule}\hrule}}}

\def\fiveboxes#1#2#3#4#5{\hbox to\scalewidth
{\boxit{#1}\hfil\boxit{#2}\hfil\boxit{#3}\hfil%
\boxit{#4}\hfil\boxit{#5}}}

\def\sevenboxes#1#2#3#4#5#6#7{\hbox to\scalewidth
{\boxit{#1}\hfil\boxit{#2}\hfil\boxit{#3}\hfil%
\boxit{#4}\hfil\boxit{#5}\hfil\boxit{#6}\hfil\boxit{#7}}}

\def\freequestion#1\par{#1\par\nobreak
\begingroup\nobreak
\advance\leftskip by 2pc
\hrule width 0pt height 1.7\baselineskip\hrulefill
\hrule width 0pt height 1.7\baselineskip\hrulefill
\par
\medskip
\endgroup
}
2 changes: 1 addition & 1 deletion docs/src/risk.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ refocus on ever-changing requirements.
In the case of an unreachable goal partial objectives could established that
would be easier to archive, splitting the main goal into several smaller goals,
making it easier to at least accomplish some, if not all.
This is explored on the milestones chapter.
This is explored on the [milestones chapter](#tree).

Performance issues can be countered reducing the data used for processing,
making it more of a proof of concept while retaining the validity of the
Expand Down
2 changes: 1 addition & 1 deletion docs/src/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ compile time (on the literature referred as write time).

The two languages
-----------------
As seen on the previous sections and the implementation chapter Python and
As seen on the previous sections and the [implementation chapter](#implementation) Python and
Persimmon are essentially two different languages, but just how different are
they?

Expand Down
2 changes: 1 addition & 1 deletion docs/src/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ interface being limited on the number of blocks, as not to allow the graphs to
become inscrutable, and as mentioned on the introduction this also allows
making assumptions about the interface which reduce the complexity such as
not needing an explicit flow line, more on the explicit flow line can be read
in the implementation chapter.
in the [implementation chapter](#implementation).


[^plc]: Programable Logic Controllers are industrial digital computers used for
Expand Down
Loading

0 comments on commit e1c8007

Please sign in to comment.