MkDocs documentation for the CMS Open Data Guide.
The main purpose of the CMS Open Data Guide is to facilitate the understanding of the CMS open data, its tools, and their usage for research.
Everyone is welcome to help build and/or improve this guide. If you find a bug or want to make a suggestion, please fill out an issue. If you would like to contribute, there are two options depending on whether you are already a collaborator of the project or not.
git diff
and/or git diff --check
commands../run-tests.sh --check-docstyle
(Note that you might need to install awesome_bot)Make a direct pull request or (preferably) contact us first.
Please follow these simple guidelines:
Run 1
and Run 2
information is required, please use material mkdocs tabs for grouping content.Make sure you have installed the virtualenv and virtualenvwrapper packages. Be sure to source the included virtualenvwrapper.sh script, or add it to your path in your .bashrc. For example, if virtualenvwrapper.sh was installed in /usr/local/bin, then you could type
$ source /usr/local/bin/virtualenvwrapper.sh
You may need to set the variable VIRTUALENVWRAPPER_PYTHON to your python path (verify it with which python
or which python3
) with:
$ export VIRTUALENVWRAPPER_PYTHON='/usr/bin/python3'
Once you have the virtualenvwrapper installed, you can list your virtual environments by typing workon
If this is your first virtual environment, when you type workon
, the output will be empty. But, after installing one (as you will below), you will be able to choose it from the list. For example if you create a virtual environment called cms-opendata-guide, you can work in that environment by typing
$ workon cms-opendata-guide
You can create a virtual environment called cms-data-guide, install dependencies via pip, start up a mkdocs server, and then open a local browser by:
$ mkvirtualenv cms-opendata-guide
$ pip install -r requirements.txt
$ mkdocs serve
$ firefox http://127.0.0.1:8000
You can exit from the virtual environment with deactivate
.
You can run local tests executing ./run-tests.sh
. Testing requires a ruby installation. You will also need to install the ruby gem awesome_bot
by issuing gem install awesome_bot
and make sure that gem in accessible on your path. In addition, npx
is also required by the test script. For this one should install nodejs
and npm
, and install it using the node package manager (npm) as npm i npx
.
Markdownlint is used to check your markdown. However, it does not allow inline HTML. To temporarily allow it, you can wrap your inline HTML as follows:
<!-- markdownlint-disable -->
write your inline HTML code here
<!-- markdownlint-restore -->
Documentation site is deployed on OpenShift.
Once a new commit is pushed to master, OpenShift will automatically trigger a new build with the latest changes.