Skip to content

Commit

Permalink
Merge pull request #32 from jeromekelleher/initial-structure
Browse files Browse the repository at this point in the history
Initial structure
  • Loading branch information
jeromekelleher authored Jan 10, 2019
2 parents 63748a7 + aa688f6 commit ec351a1
Show file tree
Hide file tree
Showing 97 changed files with 59,220 additions and 26 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "c/kastore"]
path = c/kastore
url = https://github.com/tskit-dev/kastore.git
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) 2018 tskit-dev

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.
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
# tskit
The tree sequence toolkit

**This repository is a placeholder, and currently only exists to ensure the
name isn't taken on PyPI.**
**This repository is currently under heavy development.**

Currently, the `tskit` tools are still bundled with the Python package [`msprime`](https://github.com/tskit-dev/msprime).
We expect to separate the two soon,
but to use `tskit` in the meantime, [install `msprime`](https://msprime.readthedocs.io/en/latest/installation.html),
and then
```
import msprime as tskit
```
will get you the functionality that `tskit` will provide in the future.
Currently, the `tskit` tools are bundled with the Python package
[`msprime`](https://github.com/tskit-dev/msprime) and we are in the process
of extracting them here.

6 changes: 6 additions & 0 deletions c/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--------------------
[0.0.0] - 2019-01-19
--------------------

Initial extraction of tskit code from msprime. Relicense to MIT.
Code copied at hash 29921408661d5fe0b1a82b1ca302a8b87510fd23
47 changes: 47 additions & 0 deletions c/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
CC=gcc
CFLAGS=-g -O2 -std=c99 -pedantic -Werror -Wall -W \
-Wmissing-prototypes -Wstrict-prototypes \
-Wconversion -Wshadow -Wpointer-arith \
-Wcast-align -Wcast-qual \
-Wwrite-strings -Wnested-externs \
-fshort-enums -fno-common -Dinline= \
-Ikastore/c
LDFLAGS=-lm
OBJECTS=tsk_core.o tsk_tables.o tsk_trees.o tsk_genotypes.o \
tsk_convert.o tsk_stats.o kastore.o
HEADERS=tsk_core.h tsk_tables.h tsk_trees.h tsk_genotypes.h \
tsk_convert.h tsk_stats.h
EXECUTABLES=main test_core test_tables test_trees test_genotypes

all: old_tests ${EXECUTABLES} libtskit.a

main: main.c ${OBJECTS} argtable3.o
${CC} ${CFLAGS} -o $@ $^ ${LDFLAGS}

libtskit.a: ${OBJECTS}
ar rcs $@ $^

test_%: test_%.c testlib.o ${OBJECTS}
${CC} ${CFLAGS} -o $@ $^ ${LDFLAGS} -lcunit

tsk_%.o: tsk_%.c tsk_%.h tsk_core.h
${CC} ${CFLAGS} $< -c

# We can't turn on all the usual compiler checks because of CUnit.
testlib.o: testlib.c
${CC} -Ikastore/c -std=c99 -Wall -g -c $^

argtable3.o: argtable3.c
${CC} -Dlint -Wall -g -O2 -c argtable3.c

old_tests: old_tests.c ${OBJECTS}
${CC} -Ikastore/c -std=c99 -Wall -g $^ ${LDFLAGS} -lcunit -lgsl -lgslcblas

kastore.o: kastore/c/kastore.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $<

clean:
rm -f *.o ${EXECUTABLES}

tags:
ctags *.c *.h
Loading

0 comments on commit ec351a1

Please sign in to comment.