<commit_before>= Travis CI
:linkattrs:
:published_at: 2017-08-18

This week I set up continuous integration (CI) with https://travis-ci.org/[travis] for our project. I knew very little about travis -- or CI -- before, and had thought of it more in terms of running automatic tests. And we don't even have unit tests yet.

But it turns out travis also very useful for another reason: to automatically build the package -- including compiling of Java classes, wrappers and all -- and https://docs.travis-ci.com/user/deployment/pypi/[deploy it to PyPI]. With the build script from <<2017-07-16-Brainhack-Vancouver.adoc#,Brainhack Vancouver>> and, as usual, lots of peeking into other packages, it was easier than I had thought to put together the https://github.com/nighres/nighres/blob/master/.travis.yml[travis.yml] script.

We currently deploy to TestPyPI everytime changes are pushed to master. But once Nighres is ready for the official release, it's easy to switch to the real PyPI server and deploy only tagged releases.

And when we have proper tests for the Python code, we can extend the travis script to run the tests against different versions of Python and the dependencies (Numpy and Nibabel), to ensure that changes to the existing code don't break current functionality.

With the current script, travis builds on Linux Ubuntu Trusty x86_64. It will be important to set up similar builds for other architectures and platforms, so that we can make the precompiled package available for more users. But one step after the other.

For now, at the end of the second last week of GSoC, what could be more satisfying:

[#build-passing]
image:https://travis-ci.org/nighres/nighres.svg?branch=master["Build Status", link="https://travis-ci.org/nighres/nighres"]<commit_msg>fix link<commit_after>= Travis CI
:linkattrs:
:published_at: 2017-08-18

This week I set up continuous integration (CI) with https://travis-ci.org/[travis] for our project. I knew very little about travis -- or CI -- before, and had thought of it more in terms of running automatic tests. And we don't even have unit tests yet.

But it turns out travis also very useful for another reason: to automatically build the package -- including compiling of Java classes, wrappers and all -- and https://docs.travis-ci.com/user/deployment/pypi/[deploy it to PyPI]. With the build script from <<../../07/16/Brainhack-Vancouver.html#,Brainhack Vancouver>> and, as usual, lots of peeking into other packages, it was easier than I had thought to put together the https://github.com/nighres/nighres/blob/master/.travis.yml[travis.yml] script.

We currently deploy to TestPyPI everytime changes are pushed to master. But once Nighres is ready for the official release, it's easy to switch to the real PyPI server and deploy only tagged releases.

And when we have proper tests for the Python code, we can extend the travis script to run the tests against different versions of Python and the dependencies (Numpy and Nibabel), to ensure that changes to the existing code don't break current functionality.

With the current script, travis builds on Linux Ubuntu Trusty x86_64. It will be important to set up similar builds for other architectures and platforms, so that we can make the precompiled package available for more users. But one step after the other.

For now, at the end of the second last week of GSoC, what could be more satisfying:

[#build-passing]
image:https://travis-ci.org/nighres/nighres.svg?branch=master["Build Status", link="https://travis-ci.org/nighres/nighres"]
{'fraction_non_alphanumeric': 0.07179054054054054, 'fraction_numerical': 0.010135135135135136, 'mean_word_length': 4.457757296466974, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4129332', 'n_tokens_mistral': 1001, 'n_tokens_neox': 950, 'n_words': 494}