gonito/templates/challenge-how-to.hamlet

84 lines
3.0 KiB
Plaintext
Raw Normal View History

2015-11-11 22:10:41 +01:00
<h1>Challenge How To
2017-09-28 20:44:44 +02:00
<h2>Install GEval (recommended, but not obligatory)
2015-11-11 22:10:41 +01:00
2017-09-23 15:45:14 +02:00
<p>In order to evaluate your work locally, you need the GEval tool. First, install <a href="https://docs.haskellstack.org/en/stable/README/">Haskell Stack</a>:
<pre>
curl -sSL https://get.haskellstack.org/ | sh
<p>and then install GEval itself:
2015-11-11 22:10:41 +01:00
<pre>
git clone git://gonito.net/geval
cd geval
stack setup
stack install
2017-09-28 20:44:44 +02:00
<p>Haskell Stack requires some time when run for the first time, also it takes a couple of gigabytes of hard disk space. If this is a problem for you, another option is to just download the GEval binary (it should work on most 64-bit Linuxes):
<pre>
wget <a href="http://filipg-jenkins.wmi.amu.edu.pl:8090/job/geval/lastSuccessfulBuild/artifact/geval/geval">http://filipg-jenkins.wmi.amu.edu.pl:8090/job/geval/lastSuccessfulBuild/artifact/geval/geval</a>
<p>(GEval will make your life easier, but is not obligatory, so if you have any trouble with installing/running GEval, you can skip this step, for the time being.)
2017-09-23 15:45:14 +02:00
2015-11-11 22:10:41 +01:00
<h2>Get your repo
2017-09-25 12:47:01 +02:00
$if not isIDSet || not isSSHUploaded
<p>You need to
$if not isIDSet
\ set up your ID
$if not isSSHUploaded
\ and
$if not isSSHUploaded
\ upload your SSH public key
\ (see <a href="@{YourAccountR}">your account</a>) if you want to have a repo hosted on Gonito.net, then:
2015-11-11 22:10:41 +01:00
<pre>
git clone ssh://gitolite@gonito.net/#{idToBeShown}/#{challengeName challenge}
2017-10-03 22:19:18 +02:00
<p>(Warning about empty repository is expected, don't worry about it.)
<pre>
2015-11-11 22:10:41 +01:00
cd #{challengeName challenge}
git pull ssh://gitolite@gonito.net/#{challengeName challenge}
2017-09-23 15:45:14 +02:00
<p>(Alternatively, you can use any other Git repo, e.g. GitHub, make sure Gonito.net has access to your repo.)
2015-11-11 22:10:41 +01:00
<h2>Work on your solution
<p>You need to generate your solution for the test set as <tt>test-A/out.tsv</tt>. You may also generate the solution for the dev set (<tt>dev-0/out.tsv</tt>).
<p>You can evaluate results for the dev set locally:
<pre>
cd #{challengeName challenge}
geval --test-name dev-0
2017-09-28 16:51:10 +02:00
<h2>Push your solution to the git repo
2015-11-11 22:10:41 +01:00
2017-09-28 16:51:10 +02:00
<p>Commit and push <tt>out.tsv</tt> files to your repo. It is also recommended to push your source codes along with <tt>out.tsv</tt> files.
2015-11-11 22:10:41 +01:00
<pre>
cd #{challengeName challenge}
git add dev-0/out.tsv test-A/out.tsv # also your source codes could be added
git commit -m 'my brilliant solution'
git push origin master
2017-09-28 16:51:10 +02:00
<h3>Repos hosted on Gonito.net
<p>If you use a repo hosted here, a submission and evaluation is triggered automatically. You'll see the evaluation results in your console while pushing.
<h3>External repos
<p>If you use an external repo (e.g. at your own of Gitolite or at GitHub), you can configure a webhook.
$maybe token <- mToken
<p>Your webook is:
<pre>
https://gonito.net/trigger-remotely?token=#{token}&branch=master&challenge=#{challengeName challenge}&url=URL_TO_YOUR_REPO
<p>(must be POSTed)
<h3>Manual submission
<p>In case other methods fail, you can submit your solution manually — go to the <a href="@{ChallengeSubmissionR $ challengeName challenge}">submit form</a>.