Skip to content

open-space-collective/open-space-toolkit-core

Repository files navigation

Open Space Toolkit ▸ Core

Build and Test Release Code Coverage Documentation GitHub version PyPI version License

Common types, containers and utilities.

Getting Started

Want to get started? This is the simplest and quickest way:

Binder

Nothing to download or install! This will automatically start a JupyterLab environment in your browser with Open Space Toolkit libraries and example notebooks ready to use.

Alternatives

Docker Images

Docker must be installed on your system.

iPython

The following command will start an iPython shell within a container where the OSTk components are already installed:

docker run -it openspacecollective/open-space-toolkit-core-python

Once the shell is up and running, playing with it is easy:

from ostk.core.filesystem import Directory # Directory class

Directory.root().is_empty() # True if the root directory is empty

Tip: Use tab for auto-completion!

JupyterLab

The following command will start a JupyterLab server within a container where the OSTk components are already installed:

docker run --publish=8888:8888 openspacecollective/open-space-toolkit-core-jupyter

Once the container is running, access http://localhost:8888/lab and create a Python 3 Notebook.

Installation

C++

The binary packages are hosted using GitHub Releases:

  • Runtime libraries: open-space-toolkit-core-X.Y.Z-1.x86_64-runtime
  • C++ headers: open-space-toolkit-core-X.Y.Z-1.x86_64-devel
  • Python bindings: open-space-toolkit-core-X.Y.Z-1.x86_64-python

Debian / Ubuntu

After downloading the relevant .deb binary packages, install:

apt install open-space-toolkit-core-*.deb

Python

Install from PyPI:

pip install open-space-toolkit-core

Documentation

Documentation is available here:

Structure

The library exhibits the following structure:

├── Type
│   ├── Integer
│   ├── Real
│   ├── String
│   ├── Byte
│   ├── Byte Array
│   ├── Index
│   ├── Size
│   ├── Sign
│   ├── Unique
│   ├── Shared
│   └── Weak
├── Container
│   ├── Array
│   ├── List
│   ├── Map
│   ├── Ordered Map
│   ├── Object
│   ├── Dictionary
│   ├── Pair
│   ├── Triple
│   ├── Tuple
│   ├── Table
│   ├── Queue
│   ├── Stack
│   ├── Graph
│   └── Tree
├── File System
│   ├── Path
│   ├── File
│   ├── Directory
│   ├── Symbolic Link
│   └── Permission
├── System
│   ├── User
│   ├── Group
│   ├── CPU
│   ├── Memory
│   ├── Disk
│   └── Process
├── Logger
├── Error
│   ├── Exception
│   ├── Runtime Error
│   └── Runtime
│       ├── Undefined
│       ├── Wrong
│       └── To Be Implemented
└── Utility
    ├── Iterator
    └── Version

Tutorials

Tutorials are available here:

Setup

Development Environment

Using Docker for development is recommended, to simplify the installation of the necessary build tools and dependencies. Instructions on how to install Docker are available here.

To start the development environment:

make start-development

This will:

  1. Build the openspacecollective/open-space-toolkit-core-development Docker image.
  2. Create a development environment container with local source files and helper scripts mounted.
  3. Start a bash shell from the ./build working directory.

If installing Docker is not an option, you can manually install the development tools (GCC, CMake) and all required dependencies, by following a procedure similar to the one described in the Development Dockerfile.

Build

From the ./build directory:

cmake ..
make

Tip: The ostk-build command simplifies building from within the development environment.

Test

To start a container to build and run the tests:

make test

Or to run them manually:

./bin/open-space-toolkit-core.test

Tip: The ostk-test command simplifies running tests from within the development environment.

Dependencies

Name Version License Link
Pybind11 2.10.1 BSD-3-Clause github.com/pybind/pybind11
RapidJSON master MIT rapidjson.org
yaml-cpp 0.7.0 MIT github.com/jbeder/yaml-cpp
ordered-map 0.6.0 MIT github.com/Tessil/ordered-map
{fmt} 5.2.0 BSD-2-Clause github.com/fmtlib/fmt
Rapidcsv 6.11 BSD-3-Clause github.com/d99kris/rapidcsv

Contribution

Contributions are more than welcome!

Please read our contributing guide to learn about our development process, how to propose fixes and improvements, and how to build and test the code.

Special Thanks

Loft Orbital

License

Apache License 2.0