Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
0981181
Attempt at a power function
PHPirates Jul 14, 2018
7e0cff9
Fix power function signature
PHPirates Jul 16, 2018
914b0ed
This breaks the stack build
PHPirates Jul 19, 2018
c4e4fb7
add haskell to travis build
PHPirates Jul 19, 2018
7728425
Try adding haskell to Travis
PHPirates Jul 19, 2018
855f5cf
Try adding haskell to Travis
PHPirates Jul 19, 2018
694bffc
Set haskell path
PHPirates Jul 19, 2018
ec1aeed
Revert project to template state
PHPirates Jul 19, 2018
c2896d2
This is a working template project
PHPirates Jul 19, 2018
c20de01
Replace template project by other working template project (stack test)
PHPirates Jul 28, 2018
5af7397
Add second module
PHPirates Jul 30, 2018
037ffbb
Fix path
PHPirates Jul 30, 2018
8680bb8
Add tasty test
PHPirates Jul 30, 2018
ce4b5d8
Remove hspec test
PHPirates Jul 30, 2018
62e0922
Remove Data.String template
PHPirates Jul 30, 2018
1a1b07d
Add the real power function
PHPirates Jul 30, 2018
1bff88a
Convert mathematica notebooks to pdf
PHPirates Jul 30, 2018
9353c32
reformat, somehow
PHPirates Jul 30, 2018
03bab5d
Add power tests
PHPirates Jul 30, 2018
973c340
Add sun position package
PHPirates Jul 30, 2018
544df1a
Add sunposition function
PHPirates Jul 31, 2018
b31a56a
Input ymdhms and add mma tests
PHPirates Jul 31, 2018
d8b5154
Add real test on sun position
PHPirates Jul 31, 2018
70eb914
Add shc
PHPirates Jul 31, 2018
27be7e4
Fix ghc version
PHPirates Jul 31, 2018
fe9c25e
Add some sun position tests
PHPirates Jul 31, 2018
a75c653
Reorder some docs
PHPirates Jul 31, 2018
62aebde
Add sun misalignment
PHPirates Aug 1, 2018
057a14f
Remove broken benchmark
PHPirates Aug 1, 2018
6b75745
Add total power function
PHPirates Aug 1, 2018
abb555c
Add total power tests
PHPirates Aug 1, 2018
0b56c3a
Add optimization dependency
PHPirates Aug 6, 2018
edd41e2
Formatting
PHPirates Aug 6, 2018
4e6a728
Add summer/winter time
PHPirates Aug 6, 2018
8024b88
Add summer/winter time, mma
PHPirates Aug 6, 2018
7dd5477
Fix tests by adding timezone to MMa
PHPirates Aug 6, 2018
549acc1
Singe point of toLocalTime: summer/winter time
PHPirates Aug 7, 2018
29fc48b
Change git to https link
PHPirates Aug 7, 2018
afd653a
Add angle function
PHPirates Aug 10, 2018
177381a
More precise summer/winter time
PHPirates Aug 10, 2018
9bd3efa
Relocate some method to util module
PHPirates Aug 11, 2018
63cffb9
Benchmark bestAngle
PHPirates Aug 11, 2018
ad8715d
Add initial best angles of day and sunrise
PHPirates Aug 13, 2018
7772fca
Use sunrise/sunset for angles day
PHPirates Aug 13, 2018
a0eb32e
Fix a summer/winter time bug
PHPirates Aug 14, 2018
d0bbc36
Add best angles day test
PHPirates Aug 14, 2018
7f5334e
Add 0 and 90 degree angle manually to optimization
PHPirates Aug 15, 2018
acbee9f
Test util functions
PHPirates Aug 15, 2018
234d531
Add angles for more days
PHPirates Aug 15, 2018
c313f45
Add juliandate to unix time converter
PHPirates Aug 15, 2018
875fc9d
Run test
PHPirates Aug 15, 2018
3403d24
Fix unix time test
PHPirates Aug 15, 2018
f960c62
Remove cache, it's 1GB but does not seem to be used
PHPirates Aug 15, 2018
888ef0d
Add method to print angles to file
PHPirates Aug 16, 2018
7b32d88
Fix toUnixTime bug by rounding seconds
PHPirates Aug 16, 2018
516a737
add generated file
PHPirates Aug 19, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/*.nb binary
**/*.times binary
**/*.pdf merge=theirs
122 changes: 83 additions & 39 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,83 @@
install:
# Silent install from conda docs
# https://conda.io/docs/user-guide/install/macos.html#install-macos-silent
# adapted using
# https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html

# Needed to check if conda already installed
- export PATH="$HOME/miniconda/bin:$PATH"

# If not yet installed, obtain Miniconda
# and tectonic
# From tectonic docs
# https://tectonic-typesetting.github.io/en-US/install.html#the-anaconda-method
- if ! command -v conda > /dev/null; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda -u;
conda config --add channels conda-forge;
conda config --set always_yes yes;
conda update --all;
conda install tectonic;
fi
- conda info -a
cache:
directories:
- $HOME/miniconda
script: # Change working directory each time so including files will work. Change back so the pdfs can be found for deployment. This way, building multiple files goes well.
- cd ./documentation/src/
- tectonic ./documentation.tex --print
- cd ../../
deploy:
provider: releases
api_key:
secure: rQIugDrSWmIXr7oIIxhcpvPIAql6YYc0+4+yIyHi2iJ3jYuOT7EI/a1q81tKMvPOXs/U+vyLIhyyzstK4KXkRj0wTS+e518PE9VZyysVRkmzX8fQkScjne4ITTXOeAsxpTU9gm7QnS+evtalt5izIbsBl/6lJY0HnrVwtd7PmMB2v9IQhF+FuoZRVJF+MWBUrENNPPP6p4PLXbbZgFUaYDvQuIyZvn5EGSlSnVlUmgggkUJJtjs+H+j0M7Ju+wk1jVhO3e4VQa8lO9NN3m8U2aYz99zgT2yLZQ/gBa1OeKsVfJuhajOfnigUuGhsZD2PXPHZdLlxPI2SuxsSUmFnJesxVaTHTROz+e8d+xL90iyCq/l1p8BUiap1ZNalkbYK637TiPnxLKVKhzDDH0Sf+OjY92HK0cpBSKBCvlH+JYX4EY/DqIBubFCctc5Qd/PqcYZqyKCepadnKB+nXWpmp4n9Sr2/wA4EDdrMsRIlNHOi0cfiGleo9abJ/ZiDVUekW0Bgic3rCIZlN8S05huXuWxWJTBJvMtA1w2XyRCejapVo4EH1w8uxTClwiT4V++bMOpQK9QYd2L9vIMXy7J4h+iFhGO9vkP09ACEo40SS77+zFq79aEYTOIcqjP5uB3RhV8tKAfv4MTuL9x50yPzobr0hzTVxengQPYAmEldQj4=
file:
- ./documentation/src/documentation.pdf
skip_cleanup: true
on:
tags: true
branch: master
jobs:
include:
- stage: core-haskell
# config from https://docs.haskellstack.org/en/stable/travis_ci/#running-tests
# haddock coverage is also shown in the build log

# Use new container infrastructure to enable caching
sudo: false

# Do not choose a language; we provide our own build tools.
language: generic

# Caching so the next build will be fast too.
# cache:
# directories:
# - $HOME/.stack

# Ensure necessary system libraries are present
addons:
apt:
packages:
- libgmp-dev

before_install:
- cd ./SolArduino-core/haskell/solarduino-haskell
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'

install:
# Build dependencies
- stack --no-terminal --install-ghc test --only-dependencies

script:
# Build the package, its tests, and its docs and run the tests
- stack --no-terminal test --haddock --no-haddock-deps --coverage

# Upload to coveralls using Stack HPC Coveralls (SHC)
after_success:
- travis_retry curl -L https://github.com/rubik/stack-hpc-coveralls/releases/download/v0.0.4.0/shc-linux-x64-8.0.1.tar.bz2 | tar -xj
- ./shc solarduino-haskell solarduino-haskell-test
- stage: documentation
language: generic
install:
# Silent install from conda docs
# https://conda.io/docs/user-guide/install/macos.html#install-macos-silent
# adapted using
# https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html

# Needed to check if conda already installed
- export PATH="$HOME/miniconda/bin:$PATH"

# If not yet installed, obtain Miniconda
# and tectonic
# From tectonic docs
# https://tectonic-typesetting.github.io/en-US/install.html#the-anaconda-method
- if ! command -v conda > /dev/null; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda -u;
conda config --add channels conda-forge;
conda config --set always_yes yes;
conda update --all;
conda install tectonic;
fi
- conda info -a
cache:
directories:
- $HOME/miniconda
script: # Change working directory each time so including files will work. Change back so the pdfs can be found for deployment. This way, building multiple files goes well.
- cd ./documentation/src/
- tectonic ./documentation.tex --print
- cd ../../
deploy:
provider: releases
api_key:
secure: rQIugDrSWmIXr7oIIxhcpvPIAql6YYc0+4+yIyHi2iJ3jYuOT7EI/a1q81tKMvPOXs/U+vyLIhyyzstK4KXkRj0wTS+e518PE9VZyysVRkmzX8fQkScjne4ITTXOeAsxpTU9gm7QnS+evtalt5izIbsBl/6lJY0HnrVwtd7PmMB2v9IQhF+FuoZRVJF+MWBUrENNPPP6p4PLXbbZgFUaYDvQuIyZvn5EGSlSnVlUmgggkUJJtjs+H+j0M7Ju+wk1jVhO3e4VQa8lO9NN3m8U2aYz99zgT2yLZQ/gBa1OeKsVfJuhajOfnigUuGhsZD2PXPHZdLlxPI2SuxsSUmFnJesxVaTHTROz+e8d+xL90iyCq/l1p8BUiap1ZNalkbYK637TiPnxLKVKhzDDH0Sf+OjY92HK0cpBSKBCvlH+JYX4EY/DqIBubFCctc5Qd/PqcYZqyKCepadnKB+nXWpmp4n9Sr2/wA4EDdrMsRIlNHOi0cfiGleo9abJ/ZiDVUekW0Bgic3rCIZlN8S05huXuWxWJTBJvMtA1w2XyRCejapVo4EH1w8uxTClwiT4V++bMOpQK9QYd2L9vIMXy7J4h+iFhGO9vkP09ACEo40SS77+zFq79aEYTOIcqjP5uB3RhV8tKAfv4MTuL9x50yPzobr0hzTVxengQPYAmEldQj4=
file:
- ./documentation/src/documentation.pdf
skip_cleanup: true
on:
tags: true
branch: master
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# [Link to website](https://phpirates.github.io/SolArduino/)

Documentation:
[![Build Status](https://api.travis-ci.org/PHPirates/SolArduino.svg)](https://travis-ci.org/PHPirates/SolArduino)

Core 'best angle' calculations (Haskell): [![Coverage Status](https://coveralls.io/repos/github/PHPirates/SolArduino/badge.svg?branch=master)](https://coveralls.io/github/PHPirates/SolArduino?branch=master)
Binary file added SolArduino-core/Mathematica/demonstration.pdf
Binary file not shown.
59 changes: 36 additions & 23 deletions SolArduino-core/Mathematica/realdata.nb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 158, 7]
NotebookDataLength[ 48634, 1031]
NotebookOptionsPosition[ 48188, 1012]
NotebookOutlinePosition[ 48530, 1027]
CellTagsIndexPosition[ 48487, 1024]
NotebookDataLength[ 49326, 1044]
NotebookOptionsPosition[ 48605, 1025]
NotebookOutlinePosition[ 48947, 1040]
CellTagsIndexPosition[ 48904, 1037]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Expand Down Expand Up @@ -214,7 +214,8 @@ Documentation\\\\Mathematica\\\\data17_23.csv\>\"", "]"}]}], ";"}],
3.6805898404778385`*^9, 3.6805898732783995`*^9}, {3.6805933772018414`*^9,
3.6805934321937127`*^9}, {3.680763998307108*^9, 3.680764022006867*^9}, {
3.680935017347929*^9, 3.680935063675138*^9}, {3.6809350955363197`*^9,
3.6809352146378307`*^9}}],
3.6809352146378307`*^9}},ExpressionUUID->"7a6e9e07-914a-47f8-a92d-\
4236bb146c58"],

Cell[BoxData[
TemplateBox[{GraphicsBox[{{}, {{{}, {}, {
Expand Down Expand Up @@ -415,8 +416,9 @@ Sg==
0.4731986666666667], FrameTicks -> None, PlotRangePadding ->
None, ImageSize ->
Dynamic[{
Automatic, 1.35 CurrentValue["FontCapHeight"]/
AbsoluteCurrentValue[Magnification]}]],
Automatic,
1.35 (CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[
Magnification])}]],
"RGBColor[0.368417, 0.506779, 0.709798]"], Appearance ->
None, BaseStyle -> {}, BaselinePosition -> Baseline,
DefaultBaseStyle -> {}, ButtonFunction :>
Expand Down Expand Up @@ -460,8 +462,9 @@ Sg==
0.587148, 0.40736066666666665`, 0.09470066666666668],
FrameTicks -> None, PlotRangePadding -> None, ImageSize ->
Dynamic[{
Automatic, 1.35 CurrentValue["FontCapHeight"]/
AbsoluteCurrentValue[Magnification]}]],
Automatic,
1.35 (CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[
Magnification])}]],
"RGBColor[0.880722, 0.611041, 0.142051]"], Appearance ->
None, BaseStyle -> {}, BaselinePosition -> Baseline,
DefaultBaseStyle -> {}, ButtonFunction :>
Expand Down Expand Up @@ -505,8 +508,9 @@ Sg==
0.37345400000000006`, 0.461046, 0.12992333333333334`],
FrameTicks -> None, PlotRangePadding -> None, ImageSize ->
Dynamic[{
Automatic, 1.35 CurrentValue["FontCapHeight"]/
AbsoluteCurrentValue[Magnification]}]],
Automatic,
1.35 (CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[
Magnification])}]],
"RGBColor[0.560181, 0.691569, 0.194885]"], Appearance ->
None, BaseStyle -> {}, BaselinePosition -> Baseline,
DefaultBaseStyle -> {}, ButtonFunction :>
Expand Down Expand Up @@ -551,8 +555,9 @@ Sg==
0.13945266666666667`], FrameTicks -> None,
PlotRangePadding -> None, ImageSize ->
Dynamic[{
Automatic, 1.35 CurrentValue["FontCapHeight"]/
AbsoluteCurrentValue[Magnification]}]],
Automatic,
1.35 (CurrentValue["FontCapHeight"]/AbsoluteCurrentValue[
Magnification])}]],
"RGBColor[0.922526, 0.385626, 0.209179]"], Appearance ->
None, BaseStyle -> {}, BaselinePosition -> Baseline,
DefaultBaseStyle -> {}, ButtonFunction :>
Expand Down Expand Up @@ -622,7 +627,8 @@ Sg==
3.680583676015376*^9, 3.680583736847559*^9, 3.6805838098134108`*^9,
3.6805839251211615`*^9, {3.6805895003680706`*^9, 3.680589516193618*^9},
3.6805898762683077`*^9, 3.68059341816064*^9, 3.6809352397996964`*^9,
3.6809370898214664`*^9}]
3.6809370898214664`*^9},ExpressionUUID->"a499410e-f4a8-4db8-8a13-\
f13bb5217385"]
}, Open ]],

Cell[BoxData[
Expand Down Expand Up @@ -713,7 +719,8 @@ hR0sy9jDFnawrPz7B/4Cco4=
Scaled[0.02]}, {
Scaled[0.02],
Scaled[0.05]}},
Ticks->{Automatic, Automatic}]], "Input"],
Ticks->{Automatic, Automatic}]], "Input",ExpressionUUID->"36730ec5-2a52-\
4983-ba5d-d2cc17e57ae0"],

Cell[BoxData[{
RowBox[{
Expand Down Expand Up @@ -937,14 +944,17 @@ Cell[BoxData[{
RowBox[{"\"\<17-08-2016 23:45\>\"", ",", "0"}], "}"}]}],
"}"}]}]}], "Input",
CellChangeTimes->{{3.680589796228764*^9, 3.6805898179566164`*^9}, {
3.680589890184986*^9, 3.680589892852271*^9}}],
3.680589890184986*^9,
3.680589892852271*^9}},ExpressionUUID->"08b6f679-25af-4212-92db-\
143ea46c06dc"],

Cell[BoxData[{
RowBox[{
RowBox[{"13", "/", "5"}], " ",
GraphicsBox[{{}, {{}, {},
{RGBColor[0.368417, 0.506779, 0.709798], PointSize[
0.016666666666666666`], AbsoluteThickness[1.6], LineBox[CompressedData["

1:eJxdlE1IVFEYhg9B2CImFxkyKGpEhESZ2Thp6ufYaOqoM+NcszDwJ41AaCpo
IUWHLJA2FRlkfxT9X39auK+hjYGEQbioXeAicCORUNKi5H1PMN+F4eWZ53vv
mXvP3FvSfyY5uMEY0/vvs544VupM9iHZuElxruKtivMVFyguVrxd8Q7FOxXv
Expand All @@ -971,6 +981,7 @@ fg535XGfxJNI7fcvU6V8L1j23JFRbLqyWRRbxRnF5qjqK7aKM4pN93/+C7wd
GridLinesStyle->Directive[
GrayLevel[0.5, 0.4]],
ImagePadding->All,
ImageSize->{587., Automatic},
Method->{"CoordinatesToolOptions" -> {"DisplayFunction" -> ({
(Part[{{Identity, Identity}, {Identity, Identity}}, 1, 2][#]& )[
Part[#, 1]],
Expand Down Expand Up @@ -1008,11 +1019,13 @@ fg535XGfxJNI7fcvU6V8L1j23JFRbLqyWRRbxRnF5qjqK7aKM4pN93/+C7wd
"58.1667", ",", "20.1667", ",", "0", ",", "0", ",", "0", ",", "0", ",",
"0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0"}],
"}"}]}], "Input",
CellChangeTimes->{{3.6805934469706964`*^9, 3.6805934663920503`*^9}}]
CellChangeTimes->{{3.6805934469706964`*^9,
3.6805934663920503`*^9}},ExpressionUUID->"abaa60a3-6ee6-4651-9f07-\
9624aff9d46f"]
},
WindowSize->{942, 960},
WindowMargins->{{Automatic, 206}, {Automatic, 1}},
FrontEndVersion->"11.0 for Microsoft Windows (64-bit) (July 28, 2016)",
FrontEndVersion->"11.3 for Microsoft Windows (64-bit) (March 6, 2018)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)
Expand All @@ -1027,12 +1040,12 @@ CellTagsIndex->{}
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[580, 22, 9281, 194, 867, "Input"],
Cell[9864, 218, 20262, 406, 570, "Output"]
Cell[580, 22, 9338, 195, 865, "Input",ExpressionUUID->"7a6e9e07-914a-47f8-a92d-4236bb146c58"],
Cell[9921, 219, 20411, 411, 241, "Output",ExpressionUUID->"a499410e-f4a8-4db8-8a13-f13bb5217385"]
}, Open ]],
Cell[30141, 627, 4401, 88, 798, "Input"],
Cell[34545, 717, 10048, 222, 696, "Input"],
Cell[44596, 941, 3588, 69, 196, "Input"]
Cell[30347, 633, 4458, 89, 796, "Input",ExpressionUUID->"36730ec5-2a52-4983-ba5d-d2cc17e57ae0"],
Cell[34808, 724, 10108, 224, 675, "Input",ExpressionUUID->"08b6f679-25af-4212-92db-143ea46c06dc"],
Cell[44919, 950, 3682, 73, 505, "Input",ExpressionUUID->"abaa60a3-6ee6-4651-9f07-9624aff9d46f"]
}
]
*)
Expand Down
Binary file added SolArduino-core/Mathematica/realdata.pdf
Binary file not shown.
Loading