Skip to content

Commit

Permalink
Initial commit, migrating content from the core.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed May 18, 2023
0 parents commit 56a548e
Show file tree
Hide file tree
Showing 11 changed files with 2,531 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
build/
*.swp
docs/html
docs/latex
29 changes: 29 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
cmake_minimum_required(VERSION 3.14)

project(tatami_hdf5
VERSION 1.0.0
DESCRIPTION "tatami bindings for HDF5"
LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)

add_library(tatami_hdf5 INTERFACE)

add_subdirectory(extern)

# Switch between include directories depending on whether the downstream is
# using the build directly or is using the installed package.
target_include_directories(tatami_hdf5
INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
)

# Building the test-related machinery, if we are compiling this library directly.
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
option(INSTALL_GTEST OFF)
include(CTest)
if(BUILD_TESTING)
add_subdirectory(tests)
endif()
endif()
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Aaron Lun

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# tatami for HDF5 matrices

![Unit tests](https://github.com/tatami-inc/tatami_hdf5/actions/workflows/run-tests.yaml/badge.svg)
![Gallery](https://github.com/tatami-inc/tatami_hdf5/actions/workflows/run-gallery.yaml/badge.svg)
![Documentation](https://github.com/tatami-inc/tatami_hdf5/actions/workflows/doxygenate.yaml/badge.svg)
[![Codecov](https://codecov.io/gh/tatami-inc/tatami_hdf5/branch/master/graph/badge.svg?token=Z189ORCLLR)](https://codecov.io/gh/tatami-inc/tatami_hcdf5)

This repository implements [**tatami**](https://github.com/tatami-inc/tatami) bindings for HDF5-backed matrices,
allowing some level of random access without loading the entire dataset into memory.
Matrices can be conventionally stored as 2-dimensional HDF5 datasets,
or in a compressed sparse format with a 1-dimensional dataset for each component (data, indices, pointers).
11 changes: 11 additions & 0 deletions extern/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)

include(FetchContent)

FetchContent_Declare(
tatami
GIT_REPOSITORY https://github.com/LTLA/tatami
GIT_TAG eddc3350b290adcd69a226ffb18bcf3bfe0020ef
)

FetchContent_MakeAvailable(tatami)
Loading

0 comments on commit 56a548e

Please sign in to comment.