Skip to content
Snippets Groups Projects
Select Git revision
  • 872c08e26b4fe2cee945070f1e66d5022bb4483b
  • master default protected
  • marco-development
  • development
  • fix-missing-weatherdata
  • fix-eichsfeld-weather
  • marco/dev-aquacrop
  • precompile-statements
  • precompile-tools
  • tmp-faster-loading
  • skylark
  • testsuite
  • code-review
  • v0.7.0
  • v0.6.1
  • v0.6.0
  • v0.5.5
  • v0.5.4
  • v0.5.3
  • v0.5.2
  • v0.2
  • v0.3.0
  • v0.4.1
  • v0.5
24 results

Makefile

Blame
  • Daniel Vedder's avatar
    xo30xoqa authored
    closes #91
    8a75a899
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Makefile 1.47 KiB
    SHELL = /bin/bash
    .PHONY: run test docs release install
    
    run:
    	# run an example simulation
    	if [ -d "example_results" ]; then rm -r example_results; fi
    	julia run.jl -o example_results
    	#src/analysis/analyse_nature.R example_results
    
    test:
    	# running test suite
    	cd test; julia runtests.jl
    
    date = $(shell date +%F)
    commit = $(shell git log --format="%h" -1)
    version = $(shell grep "version" Project.toml | sed 's/[[:alpha:]|=|"|[:space:]]//g')
    
    docs:
    	# building documentation
    	# include the version, date, and latest commit in the footer of the index page
    	sed -i -e "s/\*This documentation was last updated.*/\*This documentation was last updated on ${date} for \*\*Persefone.jl v${version}\*\* (commit [${commit}](https\:\/\/git\.idiv\.de\/persefone\/persefone\-model\/\-\/commit\/${commit})).\*/" docs/src/index.md
    	sed -i -e "s/v[0-9]\+\.[0-9]\+\.[0-9]\+/v${version}/" docs/src/assets/titlepage.tex
    	cd docs; julia builddocs.jl
    	mv docs/build/Persefone.jl.pdf docs/manual.pdf
    
    profile:
    	# run and profile an example simulation
    	if [ -d "profile_results" ]; then rm -r profile_results; fi
    	./runprofile.jl -o profile_results
    
    container:
    	#TODO create a Singularity container
    	echo "Not yet implemented (#43)."
    
    release:
    	echo "Not yet implemented."
    
    install:
    	# install Julia and/or package dependencies TODO needs testing
    	echo "Installing Julia and juliaup"
    	curl -fsSL https://install.julialang.org | sh
    	echo "Installing package dependencies"
    	julia -e "Pkg.activate(\".\"); Pkg.instantiate()"