Skip to content

Commit

Permalink
Getting ready for PyPi; Cleanup of documentation (#35)
Browse files Browse the repository at this point in the history
* Everything is now wrapped in the `namespace gamer`
* Cleanup of MANIFEST to get ready for PyPi
* Updates to install instructions
* Added implementation of inplace edge flip (although this is unused in preference for the concerted flip)
* `edgeFlip()` now updates the local orientation preventing the need to check the whole mesh
* Fix for tetmesh write out Cells with correct orientation
  • Loading branch information
ctlee authored Jun 25, 2019
1 parent 3e5ff3f commit 196b416
Show file tree
Hide file tree
Showing 65 changed files with 6,094 additions and 3,562 deletions.
12 changes: 11 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,26 @@ notifications:
on_build_status_changed: true
incoming_webhook:
secure: bmfSFbqVVCm0/XYaDqAVMGeBP6RNW1f/yzolevVJ1GXCZZHejnpU1aPG8LIYDskbaudyf1Obaf5ua5WTKRqQJm79EGCYiH6NGPq6qhTyMV0=

version: 2.0.2.{build}

branches:
only:
- master
- development

image:
- Visual Studio 2017
platform:
- x64

environment:
matrix:
- PYTHON: "C:\\Python36-x64"
- PYTHON: "C:\\Python37-x64"

matrix:
fast_finish: true

install:
- SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
- python --version
Expand All @@ -23,7 +31,9 @@ install:
- mkdir build_64
- cd build_64
- cmake -DGETEIGEN=on -DGAMER_TEST=on -DBUILD_PYGAMER=on -A x64 ..

build_script:
- cmake --build . --config Release

test_script:
- ctest -C Release -V
22 changes: 16 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
*.swp
.~

# Ignore the build directory
build/
release/
debug/
# Ignore some build directory patterns
build*/
release*/
debug*/

# C++ gitignore
# Prerequisites
Expand Down Expand Up @@ -52,11 +52,21 @@ debug/
# Mac Files
*.DS_Store

# Files from setuptools
# Files from setuptools and python
.eggs/
gamer.egg-info/
dist/
_skbuild/
*/__pycache__/
MANIFEST
pygamer/__init__.py

*.whl
*.egg-info
*.egg-info

# Dont save generated/linked documentation files
docs/src/_doxyoutput/
docs/src/_cppapi/
docs/src/_pythonapi/
docs/src/tutorials/
docs/src/conf.py
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ before_install:

install:
- mkdir build; cd build;
- cmake -DGETEIGEN=on -DGAMER_TEST=on -DBUILD_PYGAMER=on -GNinja ..
- cmake -DGETEIGEN=on -DGAMER_TESTS=on -DBUILD_PYGAMER=on -GNinja ..
- cmake --build . --config Release

script:
Expand Down
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ if(MATCH_RESULT)
${CMAKE_CURRENT_SOURCE_DIR}/VERSION)
else()
message(STATUS "No GIT VCS found pulling version from file")
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/VERSION VERSION NEWLINE_CONSUME)
string(REGEX MATCH "^v([0-9]+)\\.([0-9]+)\\.([0-9]+)-*(alpha|beta|dev|)$" MATCH_RESULT "${VERSION}")
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/VERSION VERSION)
string(STRIP "${VERSION}" VERSION)
string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)-*(alpha|beta|dev|)$" MATCH_RESULT "${VERSION}")
if(MATCH_RESULT)
set(VERSION_MAJOR ${CMAKE_MATCH_1})
set(VERSION_MINOR ${CMAKE_MATCH_2})
Expand Down Expand Up @@ -95,7 +96,7 @@ list(APPEND GAMER_SOURCES "${version_file}")
option(SINGLE "Use single precision floating point numbers?" OFF)

option(BUILD_PYGAMER "Build GAMer python extension?" OFF)
option(BUILD_BLENDER "Build the GAMer addon for Blender?" OFF)
option(BUILD_BLENDGAMER "Build the GAMer addon for Blender?" OFF)
option(BLENDER_PLUGIN_INSTALL "Have CMake install the Blender plugin?" OFF)
option(BLENDER_VERSION_STRICT "Have CMake verify compatibility of plugin with Blender?" OFF)

Expand Down Expand Up @@ -132,7 +133,7 @@ if(MSVC)
endif()

# Blender Addon requires Python extension
if(BUILD_BLENDER)
if(BUILD_BLENDGAMER)
set(BUILD_PYGAMER ON)
endif()

Expand Down Expand Up @@ -209,7 +210,7 @@ if(BUILD_PYGAMER)
add_subdirectory(pygamer)
endif()

if(BUILD_BLENDER)
if(BUILD_BLENDGAMER)
add_subdirectory(tools)
endif()

Expand Down
32 changes: 27 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
include pygamer/*
include libraries/*
include include/*
include VERSION
include README.md
include pyproject.toml

# CMake Helpers
include cmake-modules/*
include CMakeLists.txt

# C++ sources
include include/gamer/*
include src/*
include tools/*
recursive-include libraries *

# PyGAMer sources
recursive-include pygamer *

# Unit Tests
include tests/*

# Blender addon
recursive-include tools *

include CMakeLists.txt
# Documentation
recursive-include docs *
prune docs/src/_cppapi
prune docs/src/_doxyoutput
prune docs/src/_pythonapi
prune docs/src/tutorials
exclude docs/src/conf.py
83 changes: 50 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,65 @@

GAMer is a surface mesh improvement library developed to condition surface meshes derived from noisy biological imaging data.
Using Tetgen, GAMer can generate tetrahedral meshes suitable for finite elements simulations of reaction-diffusion systems among others.
Currently this version of GAMer is available only as a library, Blender addon, and python module.
In the future, we will reintroduce CLI programs for mesh processing.
GAMer has the following main features:

* Surface mesh improvement and decimation algorithms
* Boundary marking and other features
* Estimation of surface curvatures
* Generation of mesh surfaces around biological molecules

**Technical Features:**

* Code is implemented in C++ and supports Python using a pybind11 wrapper (pygamer).
* Cross system compilation using CMake and runs on Linux (64 bit), Windows (32 or 64 bit) or MacOS (64 bit).
* Blender addon which enables easy access to GAMer features using the pygamer API.
* Uses the Colored Abstract Simplicial Complex data ([CASC](http://github.com/ctlee/casc/) structure as the flexible underlying representation of surface and tetrahedral meshes.
* Code is hosted by [GitHub](http://github.com/ctlee/gamer/) under the Lesser GNU public license (LGPLv2). Please post issues or reports there.


## Build Status
Master: [![Master Build Status](https://travis-ci.org/ctlee/gamer.svg?branch=master)](https://travis-ci.org/ctlee/gamer)
Development: [![Development Build Status](https://travis-ci.org/ctlee/gamer.svg?branch=development)](https://travis-ci.org/ctlee/gamer)
Pybind11:[![Build status](https://ci.appveyor.com/api/projects/status/urffu7062fnohidl/branch/pybind11?svg=true)](https://ci.appveyor.com/project/ctlee/gamer/branch/pybind11)
**Master:**<br/>
[![Master Build Status](https://travis-ci.org/ctlee/gamer.svg?branch=master)](https://travis-ci.org/ctlee/gamer)
[![Build status](https://ci.appveyor.com/api/projects/status/urffu7062fnohidl/branch/master?svg=true)](https://ci.appveyor.com/project/ctlee/gamer)
[![Documentation Status](https://readthedocs.org/projects/gamer/badge/?version=latest)](https://gamer.readthedocs.io/en/latest/?badge=latest)

## Installing
Prebuilt binaries of the GAMer Blender-addon are available under [releases](https://github.com/ctlee/gamer/releases).
Download the corresponding `.zip` for your platform and follow Blender's instructions to [install from file](https://docs.blender.org/manual/fi/dev/preferences/addons.html#header).

### Prerequisites
To build the GAMer library you will need access to a working C++ compiler with full C++14 support.
<!-- If you wish to use build and use the GAMer Python extensions, you will also need [SWIG > 3.0](http://www.swig.org/), access to a python intepreter, and the corresponding python shared library (`python.so` or `python.dylib`). -->
In order to use the GAMer Blender addon you should also have a working installation of Blender.
**Development:**<br/>
[![Development Build Status](https://travis-ci.org/ctlee/gamer.svg?branch=development)](https://travis-ci.org/ctlee/gamer)
[![Build status](https://ci.appveyor.com/api/projects/status/urffu7062fnohidl/branch/development?svg=true)](https://ci.appveyor.com/project/ctlee/gamer/branch/development)

## Acknowledging your use of GAMer
Thanks for using GAMer! The developers would love to hear how you are using the tool. Please send us an email or post on GitHub letting us know.

Please cite the above Zenodo DOI to acknowledge the software version and cite the following paper:\
Please cite the above Zenodo DOI to acknowledge the software version and cite the following paper:<br/>
[Lee, C. T.; Laughlin, J. G.; Angliviel de La Beaumelle, N.; Amaro, R.; McCammon, J. A.; Ramamoorthi, R.; Holst, M. J.; Rangamani, P. GAMer 2: A System for 3D Mesh Processing of Cellular Electron Micrographs. bioRxiv 2019, 534479.](https://www.biorxiv.org/content/10.1101/534479v1)

## Authors
**[Christopher Lee](https://github.com/ctlee)**\
Department of Chemistry & Biochemistry\
University of California, San Diego

**John Moody**\
Department of Mathematics\
University of California, San Diego

### Contributors to GAMer
* Zeyun Yu (UCSD) and Yuhui Cheng(UCSD)\
Development of GAMer v1. To acknowledge your use of GAMer 1, please cite:\
[Yu, Z.; Holst, M. J.; Cheng, Y.; McCammon, J. A. Feature-Preserving Adaptive Mesh Generation for Molecular Shape Modeling and Simulation. J. Mol. Graph. Model. 2008, 26 (8), 1370–1380.](https://doi.org/10.1016/j.jmgm.2008.01.007)

* Tom Bartol (Salk Institute) and Johan Hake\
Development of Blender GAMer addon.

See also the list of [contributors](https://github.com/ctlee/gamer/contributors) who participated in this project.
## Installation
The following instructions are to build the base GAMer library.
If you wish to additionally compile the Blender GAMer addon, GAMer documentation, or other features please refer to the Additional Options section prior to building.

First, download a copy of the source from [releases](https://github.com/ctlee/gamer/releases) or clone the master branch.<br/>
```bash
git clone https://github.com/ctlee/gamer.git
cd gamer
```

Linux and Mac:
```bash
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DGAMER_TESTS=on -DCMAKE_BUILD_TYPE=Release ..
make
```

For Windows, we support building using Microsoft Visual Studio (MSVS) through the use of CMake generators:
```bash
mkdir build64
cd build64
cmake -DBUILD_BLENDGAMER=TRUE -G "Visual Studio 15 2017 Win64" -A x64 ..
cmake --build . --config Release
```

For a complete guide to installation, including configuration of PyGAMer and BlendGAMer please checkout the [online installation documentation](https://gamer.readthedocs.io/en/latest/install.html).

## External libraries bundled/downloaded with/by GAMer
* GAMer uses [Tetgen](http://wias-berlin.de/software/tetgen/) to generate
Expand All @@ -58,7 +75,7 @@ complex data structure.

* GAMer uses [GoogleTest](https://github.com/google/googletest) to handle testing.

* GAMer uses Pybind11...
* GAMer uses [Pybind11](https://pybind11.readthedocs.io/en/stable/)

* Mesh checks in the GAMer Blender addon are inspired or borrowed from 3D Print Toolbox by Campbell Barton and Meshalyzer from CellBlender.

Expand Down
7 changes: 7 additions & 0 deletions cmake-modules/__init__.py.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
def __bootstrap__():
global __bootstrap__, __loader__, __file__
import sys, pkg_resources, imp
__file__ = pkg_resources.resource_filename(__name__,"$<TARGET_FILE_NAME:pygamer>")
__loader__ = None; del __bootstrap__, __loader__
imp.load_dynamic(__name__,__file__)
__bootstrap__()
8 changes: 7 additions & 1 deletion cmake-modules/version.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,11 @@

#include "gamer/version.h" //update as appropriate

/// Namespace for all things gamer
namespace gamer
{

const std::string gVERSION = "@VERSION@";
const std::string gVERSION_SHORT = "@VERSION_SHORT@";
const std::string gVERSION_SHORT = "@VERSION_SHORT@";

} // end namespace gamer
6 changes: 0 additions & 6 deletions docs/.gitignore

This file was deleted.

Loading

0 comments on commit 196b416

Please sign in to comment.