Code Monkey home page Code Monkey logo

scipp's Introduction

License: GPL v3 Build Status Travis Build status Documentation Status Anaconda-Server Badge Docker Cloud Build Status Binder Questions

Scipp

See https://scipp.readthedocs.io for project context and how to use and install the scipp Python module.

See here for a list of frequently asked questions on how to use scipp. This is also the place to ask new questions that have not been answered yet, by opening a new Question issue.

Build instructions

It is not necessary to build scipp from source if only the Python package is required. See installation on how to install using conda or docker instead.

Prerequisites

XCode

XCode 10.2 or greater provides a clang++ implementation with sufficient language support for scipp.

LLVM Clang

You will need to be using LLVM Clang version 7 or greater.

GCC

You will need version 7 of GCC as a minimum.

Getting the code, building, and installing

To build and install the library:

git submodule init
git submodule update
mkdir -p build
mkdir -p install
cd build
cmake -DPYTHON_EXECUTABLE=/usr/bin/python3 -DCMAKE_INSTALL_PREFIX=../install ..
make -j4 all install

Note that the all and install targets do NOT include the tests. Those must be built separately via all-tests. You should use Python 3.5 or greater.

To use the scipp Python module:

cd ../python
python3 -m pip install -r requirements.txt
export PYTHONPATH=$PYTHONPATH:../install

In Python:

import scipp as sc

Running the unit tests

To run the C++ tests, run (in directory build/):

./units/test/scipp-units-test
./core/test/scipp-core-test

Note that simply running ctest also works, but currently it seems to have an issue with gathering templated tests, so calling the test binaries manually is recommended (and much faster).

To run the Python tests, run (in directory python/):

cd python
python3 -m pip install -r requirements.txt
python3 -m pytest

Running the demo notebooks

The demo/tutorial notebooks are using a plugin from nbextension, which needs to be installed separately:

pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user

pip install jupyter_nbextensions_configurator
jupyter nbextensions_configurator enable --user

Use pip3, depending on your environment.

Additional build options

  1. -DDYNAMIC_LIB forces the shared libraries building, that also decreases link time.

For development purposes -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF -DDYNAMIC_LIB=ON is recommended.

scipp's People

Contributors

dannixon avatar dtasev avatar igudich avatar mads-bertelsen avatar nickdraper avatar nvaytet avatar owenarnold avatar peterfpeterson avatar simonheybrock avatar yxqd avatar

Watchers

 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.