Skip to content

Commit

Permalink
Merge pull request #19 from camillescott/rename
Browse files Browse the repository at this point in the history
Rename Repo
  • Loading branch information
camillescott authored Feb 27, 2020
2 parents 8f8e0d9 + 577f316 commit d7d960e
Show file tree
Hide file tree
Showing 295 changed files with 1,477 additions and 3,299 deletions.
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,13 @@ cython_debug/
Debug/

*.o
**boink.pc
**libboink.*
**goetia.pc
**libgoetia.*
**a.out
_libbuild/
src/boink/test_assembly
src/boink/benchmark_boink_consume
src/boink/benchmark_oxli_consume
src/goetia/test_assembly
src/goetia/benchmark_goetia_consume
src/goetia/benchmark_oxli_consume
*.pyx.pxi
*.pxd.pxi

Expand Down
19 changes: 19 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/include/**",
"${workspaceFolder}/include"
],
"defines": [],
"compilerPath": "/usr/lib/ccache/g++-7",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "gcc-x64",
"compileCommands": "${workspaceFolder}/Debug/compile_commands.json"
}
],
"version": 4
}
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"python.pythonPath": "/home/camille/miniconda/envs/boink-sourmash/bin/python",
"python.linting.pylintPath": "/home/camille/miniconda/envs/boink/bin/pylint",
"cmake.configureOnOpen": false,
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true,
"**/tox_build/*/**": true,
"**/.tox/*/**": true
}


}
68 changes: 34 additions & 34 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.9)
cmake_policy(SET CMP0063 NEW)

#
# libboink
# libgoetia
#

if(DEFINED ENV{BOINK_VERSION})
Expand All @@ -20,11 +20,11 @@ else()
endif()
message(STATUS "version: ${python_pkg_version}")

project(boink
project(goetia
LANGUAGES CXX C
VERSION ${sharedlib_version}
DESCRIPTION "streaming cDBG and dBG sketching algorithms"
HOMEPAGE_URL "https://github.com/camillescott/boink"
HOMEPAGE_URL "https://github.com/camillescott/goetia"
)

if(DEFINED ENV{CONDA_PREFIX})
Expand Down Expand Up @@ -79,93 +79,93 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O2")
set(CMAKE_CXX_FLAGS_DEBUG "-O0")

#
# The boink shared library needs all the source files, the direct object
# The goetia shared library needs all the source files, the direct object
# targets, and the gfakluge static library.
#
add_library(boink SHARED
add_library(goetia SHARED
${LIB_SOURCES}
)
set_target_properties(boink PROPERTIES LINKER_LANGUAGE CXX)
set_target_properties(boink PROPERTIES CXX_VISIBILITY_PRESET default)
set_property(TARGET boink PROPERTY LINK_WHAT_YOU_USE TRUE)
set_property(TARGET boink PROPERTY VISIBILITY_INLINES_HIDDEN 0)
set_target_properties(boink PROPERTIES
set_target_properties(goetia PROPERTIES LINKER_LANGUAGE CXX)
set_target_properties(goetia PROPERTIES CXX_VISIBILITY_PRESET default)
set_property(TARGET goetia PROPERTY LINK_WHAT_YOU_USE TRUE)
set_property(TARGET goetia PROPERTY VISIBILITY_INLINES_HIDDEN 0)
set_target_properties(goetia PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION 1
)

#set_target_properties(boink PROPERTIES PUBLIC_HEADER ${LIB_HEADERS})
target_include_directories(boink
#set_target_properties(goetia PROPERTIES PUBLIC_HEADER ${LIB_HEADERS})
target_include_directories(goetia
PUBLIC
${CMAKE_SOURCE_DIR}/include
)
target_include_directories(boink PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(boink
target_include_directories(goetia PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(goetia
Threads::Threads
${ZLIB_LIBRARIES}
${LIBSOURMASH}
)


#
# Add all the include directories. Includes that are only used in boink's
# Add all the include directories. Includes that are only used in goetia's
# source files are set private, so that they are not installed.
#
target_include_directories(boink PRIVATE third-party/)
target_include_directories(boink PRIVATE include/)
target_include_directories(goetia PRIVATE third-party/)
target_include_directories(goetia PRIVATE include/)

#
# Configure the boink pc.
# Configure the goetia pc.
#
configure_file(src/boink/boink.pc.in boink.pc @ONLY)
configure_file(src/goetia/goetia.pc.in goetia.pc @ONLY)


#
# Benchmark exes
#
add_executable(do_bench_storage EXCLUDE_FROM_ALL ${CMAKE_SOURCE_DIR}/src/boink/benchmarks/do_bench_storage.cc)
target_link_libraries(do_bench_storage boink)
add_executable(do_bench_storage EXCLUDE_FROM_ALL ${CMAKE_SOURCE_DIR}/src/goetia/benchmarks/do_bench_storage.cc)
target_link_libraries(do_bench_storage goetia)

add_executable(test_hashing EXCLUDE_FROM_ALL ${CMAKE_SOURCE_DIR}/src/boink/benchmarks/benchmark_hashing.cc)
target_link_libraries(test_hashing boink)
add_executable(test_hashing EXCLUDE_FROM_ALL ${CMAKE_SOURCE_DIR}/src/goetia/benchmarks/benchmark_hashing.cc)
target_link_libraries(test_hashing goetia)

#
# Set up the Cppyy bindings generation. This is a customized version defined
# in boink's cmake/ dir; it uses genreflex rather than calling rootcling directly.
# in goetia's cmake/ dir; it uses genreflex rather than calling rootcling directly.
# I did this because I couldn't get rootcling to properly include/exclude classes
# via the LinkDef header, and I wanted to be able to use the better syntax in
# the genreflex selection XML anyhow. Also, I think this is now the recommended /
# more modern way anyhow? Code was modified from the versions cppyy distributes.
#
cppyy_add_bindings(
"boink" ${python_pkg_version} "Camille Scott" "[email protected]"
"goetia" ${python_pkg_version} "Camille Scott" "[email protected]"
LICENSE "MIT"
LANGUAGE_STANDARD "17"
SELECTION_XML ${CMAKE_SOURCE_DIR}/boink_select.xml
INTERFACE_FILE ${BOINK_INCLUDE_ROOT}/include/boink/interface.hh
PKG_SRC_DIR ${CMAKE_SOURCE_DIR}/boink
SELECTION_XML ${CMAKE_SOURCE_DIR}/goetia_select.xml
INTERFACE_FILE ${BOINK_INCLUDE_ROOT}/include/goetia/interface.hh
PKG_SRC_DIR ${CMAKE_SOURCE_DIR}/goetia
TESTS_DIR ${CMAKE_SOURCE_DIR}/tests
HEADERS ${LIB_HEADERS}
INCLUDE_DIRS ${BOINK_INCLUDE_ROOT}/include
${CMAKE_CURRENT_SOURCE_DIR}/third-party
${ZLIB_INCLUDE_DIRS}
LINK_LIBRARIES boink
LINK_LIBRARIES goetia
)

#
# libboink's install commands. Installs the libboink shared so,
# libgoetia's install commands. Installs the libgoetia shared so,
# its headers, the prometheus headers, and any other public includes.
#
install(TARGETS boink
install(TARGETS goetia
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

#install(DIRECTORY include/boink/
# DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/boink
#install(DIRECTORY include/goetia/
# DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/goetia
#)

install(FILES ${CMAKE_BINARY_DIR}/boink.pc
install(FILES ${CMAKE_BINARY_DIR}/goetia.pc
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig
)

Expand Down
4 changes: 2 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Source and deps

$ git clone https://github.com/camillescott/boink.git && cd boink
$ git clone https://github.com/camillescott/goetia.git && cd goetia
$ pip install numpy jinja2 doit pyyaml cython sh pandas
$ git submodule update --init --remote --recursive

Expand All @@ -24,4 +24,4 @@ $ pip install .
$ pip install pytest-benchmark
$ pip install git+https://github.com/camillescott/debruijnal-enhance-o-tron.git
$ pip install git+https://github.com/dib-lab/khmer.git
$ pytest boink
$ pytest goetia
18 changes: 9 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.. image:: https://travis-ci.org/camillescott/boink.svg?branch=master
:target: https://travis-ci.org/camillescott/boink
.. image:: https://travis-ci.org/camillescott/goetia.svg?branch=master
:target: https://travis-ci.org/camillescott/goetia

.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/camillescott/boink/master?filepath=examples%2FStreaming%20Sourmash%20Demo.ipynb
:target: https://mybinder.org/v2/gh/camillescott/goetia/master?filepath=examples%2FStreaming%20Sourmash%20Demo.ipynb

boink
goetia
-----

Installation
Expand All @@ -16,23 +16,23 @@ Conda
We recommend using `conda <https://docs.conda.io/en/latest/miniconda.html>`_. Within a conda
environment, install with::

conda install graph-boink
conda install graph-goetia

This will install the boink python package, and install the `libboink` shared library
This will install the goetia python package, and install the `libgoetia` shared library
and its headers into your conda prefix.

Building from Source
~~~~~~~~~~~~~~~~~~~~

To build and install from source, first clone the repo::

git clone https://github.com/camillescott/boink && cd boink
git clone https://github.com/camillescott/goetia && cd goetia
git submodule update --init --recursive

Then create a conda environment::

conda create -y -n libboink -c conda-forge python=3 cppyy cmake cxx-compiler c-compiler clangdev libcxx libstdcxx-ng libgcc-ng pytest numpy scipy openmp python-clang screed blessings pytest-benchmark pyfiglet py-cpuinfo
conda activate libboink
conda create -y -n libgoetia -c conda-forge python=3 cppyy cmake cxx-compiler c-compiler clangdev libcxx libstdcxx-ng libgcc-ng pytest numpy scipy openmp python-clang screed blessings pytest-benchmark pyfiglet py-cpuinfo
conda activate libgoetia

Then build and install with cmake::

Expand Down
6 changes: 0 additions & 6 deletions boink/alphabets.py

This file was deleted.

17 changes: 0 additions & 17 deletions boink/hashing.py

This file was deleted.

43 changes: 0 additions & 43 deletions boink_select.xml

This file was deleted.

4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: boink
name: goetia
channels:
- bioconda
- conda-forge
Expand All @@ -9,5 +9,5 @@ dependencies:
- ficus
- sourmash
- screed
- graph-boink
- graph-goetia
- numpy
10 changes: 5 additions & 5 deletions examples/Streaming Sourmash Demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"## Streaming Sourmash\n",
"\n",
"This notebook demonstrates how to use boink to perform a streaming analysis of sourmash minhash signatures. Boink includes the sourmash C++ header and exposes it with cpppy, and wraps it so it can be used with boink's sequence processors. This enables a simple way to perform fast streaming signature analysis in Python."
"This notebook demonstrates how to use goetia to perform a streaming analysis of sourmash minhash signatures. Goetia includes the sourmash C++ header and exposes it with cpppy, and wraps it so it can be used with goetia's sequence processors. This enables a simple way to perform fast streaming signature analysis in Python."
]
},
{
Expand All @@ -24,9 +24,9 @@
"metadata": {},
"outputs": [],
"source": [
"from boink import libboink\n",
"from boink.alphabets import DNAN_SIMPLE\n",
"from boink.signatures import SourmashSignature\n",
"from goetia import libgoetia\n",
"from goetia.alphabets import DNAN_SIMPLE\n",
"from goetia.signatures import SourmashSignature\n",
"\n",
"from sourmash import load_one_signature, MinHash\n",
"import screed\n",
Expand All @@ -47,7 +47,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The boink `SourmashSignature.Signature` is derived from `sourmash::MinHash`, and so follows the same interface. This signature will contain 10000 hashes at a $K$ of 31."
"The goetia `SourmashSignature.Signature` is derived from `sourmash::MinHash`, and so follows the same interface. This signature will contain 10000 hashes at a $K$ of 31."
]
},
{
Expand Down
Loading

0 comments on commit d7d960e

Please sign in to comment.