<commit_before>PyCon UK 2016 website
=====================

.. image:: https://travis-ci.org/PyconUK/2016.pyconuk.org.svg?branch=master
       :target: https://travis-ci.org/PyconUK/2016.pyconuk.org

This is the website for PyCon UK. It is hosted via GitHub Pages and will be available at http://pyconuk.org/.

If you have a suggestion to make, please feel free to create an issue_.

We welcome pull requests for improvements! (Please see CONTRIBUTING.rst_ for details.)


Development
~~~~~~~~~~~
This site uses wok_.  To install wok and other dendencies, run ``pip install -r requirements.txt``.

wok builds the site by assembling several components:

* Pages are found in ``content/``.  Pages may be HTML, Markdown_ or reStructuredText_, and contain some YAML metadata.
* Static files are found in ``media/``.
* A jinja2_ template for all the pages is found in ``templates/default.html``

To build the site, run ``make build``.  This will pull together all the componenents into a set of HTML files in ``output/``.

Windows users: you need to run the (extensionless) ``wok`` script in c:/pythonxx/scripts. eg ``py -2 c:\python27\scripts\wok``.

Alternatively, if you run ``make serve``, wok will build the site, serve the built site on port 8000, and watch for changes.

Windows users: you need to run the (extensionless) ``wok`` script with the --serve parameter in c:/pythonxx/scripts. eg ``py -2 c:\python27\scripts\wok --serve``.

You can test that the site contains no broken links and that the conference name is capitalised correctly (hint, it's "PyCon UK") by running ``make test``.

Travis will test branches, and branches won't get merged without review and passing tests, so dive right in!


Deployment
~~~~~~~~~~

The site is hosted as a Project Page on GitHub Pages, and so it is the ``gh-pages`` branch of the repository that gets served.  wok generates the site in the ``output/`` directory, and Travis is configured to push any changes to the ``output/`` directory to this branch.  See ``deploy.sh`` for details.

This should be done automatically by Travis after it has built the ``master`` branch, but in case this does not happen, somebody with commit access to the repository can run ``make deploy``.

.. _wok: http://wok.mythmon.com/
.. _Markdown: https://pythonhosted.org/Markdown/
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
.. _jinja2: http://jinja.pocoo.org/
.. _issue: https://github.com/PyconUK/2016.pyconuk.org/issues
.. _CONTRIBUTING.rst: ./CONTRIBUTING.rst<commit_msg>Document how to get Travis up and running initially<commit_after>PyCon UK 2016 website
=====================

.. image:: https://travis-ci.org/PyconUK/2016.pyconuk.org.svg?branch=master
       :target: https://travis-ci.org/PyconUK/2016.pyconuk.org

This is the website for PyCon UK. It is hosted via GitHub Pages and will be available at http://pyconuk.org/.

If you have a suggestion to make, please feel free to create an issue_.

We welcome pull requests for improvements! (Please see CONTRIBUTING.rst_ for details.)


Development
~~~~~~~~~~~
This site uses wok_.  To install wok and other dendencies, run ``pip install -r requirements.txt``.

wok builds the site by assembling several components:

* Pages are found in ``content/``.  Pages may be HTML, Markdown_ or reStructuredText_, and contain some YAML metadata.
* Static files are found in ``media/``.
* A jinja2_ template for all the pages is found in ``templates/default.html``

To build the site, run ``make build``.  This will pull together all the componenents into a set of HTML files in ``output/``.

Windows users: you need to run the (extensionless) ``wok`` script in c:/pythonxx/scripts. eg ``py -2 c:\python27\scripts\wok``.

Alternatively, if you run ``make serve``, wok will build the site, serve the built site on port 8000, and watch for changes.

Windows users: you need to run the (extensionless) ``wok`` script with the --serve parameter in c:/pythonxx/scripts. eg ``py -2 c:\python27\scripts\wok --serve``.

You can test that the site contains no broken links and that the conference name is capitalised correctly (hint, it's "PyCon UK") by running ``make test``.

Travis will test branches, and branches won't get merged without review and passing tests, so dive right in!


Deployment
~~~~~~~~~~

The site is hosted as a Project Page on GitHub Pages, and so it is the ``gh-pages`` branch of the repository that gets served.  wok generates the site in the ``output/`` directory, and Travis is configured to push any changes to the ``output/`` directory to this branch.  See ``deploy.sh`` for details.

This should be done automatically by Travis after it has built the ``master`` branch, but in case this does not happen, somebody with commit access to the repository can run ``make deploy``.

When setting up Travis to run this initially you must provide an OAuth token for authentication in the ``GH_TOKEN`` env var.  To do this create a `Personal Access Token on GitHub <https://github.com/settings/tokens>`_ then create the ``GH_TOKEN`` key pair on the `Travis settings page <https://travis-ci.org/PyconUK/2016.pyconuk.org/settings>`_.

.. _wok: http://wok.mythmon.com/
.. _Markdown: https://pythonhosted.org/Markdown/
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
.. _jinja2: http://jinja.pocoo.org/
.. _issue: https://github.com/PyconUK/2016.pyconuk.org/issues
.. _CONTRIBUTING.rst: ./CONTRIBUTING.rst
{'fraction_non_alphanumeric': 0.11469666236400516, 'fraction_numerical': 0.011063986723215933, 'mean_word_length': 4.150997150997151, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '554196', 'n_tokens_mistral': 1657, 'n_tokens_neox': 1537, 'n_words': 713}