Skip to content

Commit 6ff9167

Browse files
authored
Merge pull request #26 from JJ/master
Post commit hook to run hugo automatically.
2 parents 368b99f + 9bc9464 commit 6ff9167

File tree

6 files changed

+67
-4
lines changed

6 files changed

+67
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.DS_Store
2+
*~
23

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: "Good practices & good quality code"
3+
date: 2018-05-10
4+
---
5+
6+
Here are a few things that will help you create good habit when
7+
creating scientific code and thus produce better quality code.
8+
9+
## Resources
10+
11+
* [Software carpentry](https://software-carpentry.org/) - resources to
12+
learn and teach coding practices for scientists.
13+
*
14+
[Scientific computing for the rest of us](https://github.com/tpoisot/ScientificComputingForTheRestOfUs)
15+
16+
## Sites to host code
17+
18+
* [FigShare](http://figshare.com), hosts code and issues DOIs.
19+
* [Open Science Framework](https://osf.io), offers resources, storage,
20+
even virtual machines.
21+
* [GitXiv](https://gitxiv.com) Matches code in Github with articles in
22+
ArXiV.
23+
24+
## Articles with best practices
25+
26+
* [Good enough practices in scientific computing](http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005510), PLoS Comput Biol, 2017.
27+
28+
* [Best Practices in Scientific Computing, Wilson et al., 2014](http://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.1001745)
29+
30+

docs/index.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,21 @@
66
<description>Recent content in Code Is Science : Welcome! on Code Is Science</description>
77
<generator>Hugo -- gohugo.io</generator>
88
<language>en-gb</language>
9-
<lastBuildDate>Sun, 29 Oct 2017 15:16:54 +0100</lastBuildDate>
9+
<lastBuildDate>Thu, 10 May 2018 00:00:00 +0000</lastBuildDate>
1010

1111
<atom:link href="http://www.codeisscience.com/index.xml" rel="self" type="application/rss+xml" />
1212

1313

14+
<item>
15+
<title>Good practices &amp; good quality code</title>
16+
<link>http://www.codeisscience.com/posts/good-practices-code/</link>
17+
<pubDate>Thu, 10 May 2018 00:00:00 +0000</pubDate>
18+
19+
<guid>http://www.codeisscience.com/posts/good-practices-code/</guid>
20+
<description>Here are a few things that will help you create good habit when creating scientific code and thus produce better quality code.
21+
Resources Software carpentry - resources to learn and teach coding practices for scientists. * Scientific computing for the rest of us Sites to host code FigShare, hosts code and issues DOIs. Open Science Framework, offers resources, storage, even virtual machines. GitXiv Matches code in Github with articles in ArXiV.</description>
22+
</item>
23+
1424
<item>
1525
<title>Mozfest Session 2017</title>
1626
<link>http://www.codeisscience.com/posts/mozfest-session-2017/</link>

docs/posts/index.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,21 @@
66
<description>Recent content in Posts on Code Is Science</description>
77
<generator>Hugo -- gohugo.io</generator>
88
<language>en-gb</language>
9-
<lastBuildDate>Sun, 29 Oct 2017 15:16:54 +0100</lastBuildDate>
9+
<lastBuildDate>Thu, 10 May 2018 00:00:00 +0000</lastBuildDate>
1010

1111
<atom:link href="http://www.codeisscience.com/posts/index.xml" rel="self" type="application/rss+xml" />
1212

1313

14+
<item>
15+
<title>Good practices &amp; good quality code</title>
16+
<link>http://www.codeisscience.com/posts/good-practices-code/</link>
17+
<pubDate>Thu, 10 May 2018 00:00:00 +0000</pubDate>
18+
19+
<guid>http://www.codeisscience.com/posts/good-practices-code/</guid>
20+
<description>Here are a few things that will help you create good habit when creating scientific code and thus produce better quality code.
21+
Resources Software carpentry - resources to learn and teach coding practices for scientists. * Scientific computing for the rest of us Sites to host code FigShare, hosts code and issues DOIs. Open Science Framework, offers resources, storage, even virtual machines. GitXiv Matches code in Github with articles in ArXiV.</description>
22+
</item>
23+
1424
<item>
1525
<title>Mozfest Session 2017</title>
1626
<link>http://www.codeisscience.com/posts/mozfest-session-2017/</link>

docs/sitemap.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
33
xmlns:xhtml="http://www.w3.org/1999/xhtml">
44

5+
<url>
6+
<loc>http://www.codeisscience.com/posts/good-practices-code/</loc>
7+
<lastmod>2018-05-10T00:00:00+00:00</lastmod>
8+
</url>
9+
510
<url>
611
<loc>http://www.codeisscience.com/posts/mozfest-session-2017/</loc>
712
<lastmod>2017-10-29T15:16:54+01:00</lastmod>
@@ -14,7 +19,7 @@
1419

1520
<url>
1621
<loc>http://www.codeisscience.com/</loc>
17-
<lastmod>2017-10-29T15:16:54+01:00</lastmod>
22+
<lastmod>2018-05-10T00:00:00+00:00</lastmod>
1823
</url>
1924

2025
<url>
@@ -23,7 +28,7 @@
2328

2429
<url>
2530
<loc>http://www.codeisscience.com/posts/</loc>
26-
<lastmod>2017-10-29T15:16:54+01:00</lastmod>
31+
<lastmod>2018-05-10T00:00:00+00:00</lastmod>
2732
<priority>0</priority>
2833
</url>
2934

post-commit

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
if git diff --name-only HEAD^ HEAD | grep content
4+
then
5+
echo "Running hugo"
6+
hugo
7+
fi

0 commit comments

Comments
 (0)