Code Monkey home page Code Monkey logo

cellml-specification's Introduction

CellML Specification

This repository will be used by the CellML editors to develop the CellML specification (starting with the discontinued version 1.2) The content has been reworked to include an informal guide embedded within the normative specification text (in version 2.0).

If things work correctly, changes in this repository will be reflected over at: https://cellml-specification.readthedocs.org/.

Building the documentation locally

The documentation can be built on your local machine with the following instructions. Do take note that the following instructions are suitable for Unix-derived operating systems and may need modification for other operating systems. Also, note that we require at least version 3.5 of Python to build the documentation.

First clone a local copy of the CellML specification repository:

git clone https://github.com/cellml/cellml-specification.git

Next setup a virtual environment:

virtualenv venv_specification

Note: make sure you are creating virtual environment using a suitable Python interpreter, if required use the -p flag to set the Python interpreter (for example virtualenv -p /absolute/path/to/python venv_specification).

Then activate the virtual environment and instal the required packages:

source venv_specification/bin/activate
pip install -r cellml-specification/requirements.txt

That completes the environment setup required for building the documentation. Once the environment is completed, the HTML form of the documentation can be built with the following commands:

cd cellml-specification
make html

The built documentation will be available at:

/absolute/path/to/cellml-specification/build/html/index.html

Any good internet browser will be able to display the documentation (see also Serving the documentation).

To build the documentation into a single page HTML document execute the following command:

make singlehtml

The built documentation will be available at:

/absolute/path/to/cellml-specification/build/singlehtml/index.html

Building PDFs

To build the PDF form of the documentation, simply execute the following command:

make latexpdf

If this fails, please have a look at the following:

Creating the PDF form of the documentation requires that some or all of a tool like Windows/MikTeX, Windows/TeXlive, Linux/TeXlive, and macOS/MacTeX is available to the Sphinx build tool.

In addition, you'll need the following LaTeX packages: babel-greek, capt-of, cbfonts, courier, fncychap, fontspec, framed, greek-fontenc, helvetic, latexmk, needspace, tabulary, textgreek, titlesec, tocloft, varwidth, and wrapfig.

In particular, check that you have latexmk available as this is required for creating the PDF form of the documentation. Information on latexmk can be found at https://ctan.org/pkg/latexmk/.

You may also need to install the "GNU FreeFont" fonts FreeSans, FreeSerif, and FreeMono.

Documentation builds

There are two types of build that can be created from this codebase, they can be selected through the use of the environment variable CELLML_SPEC_BUILD.

  1. Normative only, set CELLML_SPEC_BUILD=Normative (default build).
  2. Normative and informative specification combined, set CELLML_SPEC_BUILD=Full

Serving the documentation

You can serve the documentation locally using a simple Python server. Save the following text to a file named webserver.py (this file can be saved anywhere on your harddrive):

#!/usr/bin/env python

import http.server
import socketserver

PORT = 8008
Handler = http.server.SimpleHTTPRequestHandler

with socketserver.TCPServer(("", PORT), Handler) as httpd:
    print("Serving at port", PORT)
    httpd.serve_forever()

To run the web server, use a terminal type application and change directory into:

cd /absolute/path/to/cellml-specification/build/html/

then run the command:

python /absolute/path/to/webserver.py

Now launch your internet browser and open the location:

http://localhost:8008/

cellml-specification's People

Contributors

kerimoyle avatar michaelclerx avatar hsorby avatar agarny avatar nickerso avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.