From 84ee6da0eae44304165b3099b0a0f94f2786d723 Mon Sep 17 00:00:00 2001 From: Kristof Cools Date: Wed, 28 Nov 2018 10:58:59 +0100 Subject: [PATCH] Added LICENSE, testing, and travis hooks --- .travis.yml | 20 ++++++++++++++++++++ LICENSE.md | 40 ++++++++++++++++++++++++++++++++++++++++ test/runtests.jl | 16 ++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 .travis.yml create mode 100644 LICENSE.md create mode 100644 test/runtests.jl diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..fa0f866 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,20 @@ +# Documentation: http://docs.travis-ci.com/user/languages/julia/ +language: julia +os: + - linux + - osx +julia: + - 1.0 +notifications: + email: false +# uncomment the following lines to override the default test script +#script: +# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi +# - julia -e 'Pkg.clone(pwd()); Pkg.build("BEAST"); Pkg.test("BEAST"; coverage=true)' +after_success: + #- julia -e 'cd(Pkg.dir("BEAST")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())' + # push coverage results to Codecov + #- julia -e 'cd(Pkg.dir("BEAST")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())' + #- julia -e 'Pkg.add("Documenter")' + #- julia -e 'Pkg.clone("https://github.com/krcools/LinearForms.jl")' + #- julia --depwarn=no -e 'cd(Pkg.dir("BEAST")); include(joinpath("docs", "make.jl"))' diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..5914c61 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,40 @@ +The Makeitso.jl package is licensed under the MIT "Expat" License: + +> Copyright (c) 2017: Kristof Cools. +> +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> +> of this software and associated documentation files (the "Software"), to deal +> +> in the Software without restriction, including without limitation the rights +> +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> +> copies of the Software, and to permit persons to whom the Software is +> +> furnished to do so, subject to the following conditions: +> +> +> +> The above copyright notice and this permission notice shall be included in all +> +> copies or substantial portions of the Software. +> +> +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> +> SOFTWARE. +> +> diff --git a/test/runtests.jl b/test/runtests.jl new file mode 100644 index 0000000..3174de3 --- /dev/null +++ b/test/runtests.jl @@ -0,0 +1,16 @@ +using Makeitso +using Test + +@target A ()->1:10 +@target B ()->[-4,-3,-2,-1,0,1,2,3,4,5] +@target C (A,B)->A.+B +@target D (A,B,C)->A.+B.+C + +x = (@make D)[end] +@test x == 30 + +@target B ()->pi +println("--- Recipe for B modified! ---") + +x = (@make D)[end] +@test x ≈ (20+2pi)