Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/SynBioDex/libSBOL into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
Bryan Bartley committed Jun 14, 2017
2 parents 6cca706 + 7b48170 commit b3d2361
Show file tree
Hide file tree
Showing 17 changed files with 129 additions and 42 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# libSBOL 2.1.1
# libSBOL 2.2.0

[libSBOL](https://github.com/SynBioDex/libSBOL) is a C++ library for reading, writing, and constructing genetic designs according to the standardized specifications of the [Synthetic Biology Open Language (SBOL)](http://www.sbolstandard.org/).

Expand Down
2 changes: 1 addition & 1 deletion installer/Win32_installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "libSBOL"
#define MyAppVersion "2.1.1"
#define MyAppVersion "2.2.0"
#define MyAppSubVersion ""
#define MyPlatform "Win"
#define MyArchitecture "x86"
Expand Down
2 changes: 1 addition & 1 deletion installer/Win64_installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "libSBOL"
#define MyAppVersion "2.1.1"
#define MyAppVersion "2.2.0"
#define MyAppSubVersion ""
#define MyPlatform "Win"
#define MyArchitecture "x64"
Expand Down
2 changes: 1 addition & 1 deletion manual/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = libSBOL
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 2.1.1
PROJECT_NUMBER = 2.2.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
14 changes: 7 additions & 7 deletions manual/installation.dox
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
///
/// On Windows, installation through binary installers is the simplest way to obtain libSBOL. The installer contains pre-compiled libSBOL library. Simply install it to whichever path you want and use it.
///
/// [Get the latest binary installers](https://sourceforge.net/projects/libsbol/files/v2.1.1.1/)
/// [Get the latest binary installers](https://sourceforge.net/projects/libsbol/)
///
/// @section use_brew Using Homebrew
///
Expand Down Expand Up @@ -45,7 +45,7 @@
///
/// 3. Run CMake-gui. For "Where is the source code" enter the path to your libSBOL folder (not libSBOL/source folder). Choose build path by setting "Where to build the binaries". After setting the paths, click Configure, and choose what type of compiler you want to generate instructions for (e.g. Visual Studio 14 2015 for 32 bit and Visual Studio 14 2015 Win64 for 64 bit). See the screenshot above.
///
/// 4. (optional) Set optional targets, e.g. examples, tests, manual, or Python wrapper. To add them check the appropriate boxes and then press Configure again. CMAKE_INSTALL_PREFIX is of particular interest, since it determines the path the output will be located. Building Python wrapper requires SWIG.
/// 4. Set optional targets, e.g. examples, tests, manual, or Python wrapper. To add them check the appropriate boxes and then press Configure again. It is HIGHLY RECOMMENDED to change CMAKE_INSTALL_PREFIX from it's default path (Program Files) to somewhere else. This value determines the path the output files will be located. Building Python wrapper requires SWIG.
///
/// SBOL_BUILD_SHARED: Builds a dynamically linked library. The default is static.
///
Expand Down Expand Up @@ -74,7 +74,7 @@
/// ```
/// You will need administrator privileges for a make install.
///
/// 7. (optional) For Python bindings, copy and paste the sbol folder with Python bindings to your local Python site-packages folder.
/// 7. For Python bindings, copy and paste the sbol folder with Python bindings to your local Python site-packages folder.
///
///
/// Mac
Expand All @@ -95,7 +95,7 @@
///
/// 4. Run CMake-gui (type cmake in terminal or run cmake app). For "Where is the source code" enter the path to your libSBOL folder (not libSBOL/source folder). Choose build path by setting "Where to build the binaries". After setting the paths, click Configure, and choose what type of compiler you want to generate instructions for.
///
/// 5. (optional) Set optional targets, e.g. examples, tests, manual, or Python wrapper. To add them check the appropriate boxes and then press Configure again. CMAKE_INSTALL_PREFIX is of particular interest, since it determines the path the output will be located. By default on Mac OSX, the library will be installed to /usr/local/lib. Building Python wrapper requires SWIG.
/// 5. Set optional targets, e.g. examples, tests, manual, or Python wrapper. To add them check the appropriate boxes and then press Configure again. CMAKE_INSTALL_PREFIX is of particular interest, since it determines the path the output will be located. By default on Mac OSX, the library will be installed to /usr/local/lib. Building Python wrapper requires SWIG.
///
/// SBOL_BUILD_SHARED: Builds a dynamically linked library. The default is static.
///
Expand Down Expand Up @@ -134,7 +134,7 @@
/// sudo apt-get install build-essential libxml2-dev gcc-multilib g++-multilib libraptor2-dev libjsoncpp-dev
/// ```
///
/// 2. (optional) If you want to generate Python wrapper you will need SWIG. To install run:
/// 2. If you want to generate Python wrapper you will need SWIG. To install run:
/// ```
/// sudo apt-get install swig python-dev
/// ```
Expand All @@ -147,7 +147,7 @@
///
/// 4. Run CMake-gui (type cmake-gui or cmake-qt-gui in terminal). For "Where is the source code" enter the path to your libSBOL folder (not libSBOL/source folder). Choose build path by setting "Where to build the binaries". After setting the paths, click Configure, and choose what type of compiler you want to generate instructions for. See the screenshot above.
///
/// 5. (optional) Set optional targets, e.g. examples, tests, manual, or Python wrapper. To add them check the appropriate boxes and then press Configure again. CMAKE_INSTALL_PREFIX is of particular interest, since it determines the path the output will be located. Building Python wrapper requires SWIG.
/// 5. Set optional targets, e.g. examples, tests, manual, or Python wrapper. To add them check the appropriate boxes and then press Configure again. CMAKE_INSTALL_PREFIX is of particular interest, since it determines the path the output will be located. Building Python wrapper requires SWIG.
///
/// SBOL_BUILD_SHARED: Builds a dynamically linked library. The default is static.
///
Expand Down Expand Up @@ -177,7 +177,7 @@
/// ```
/// to compile. The library will be located under the folder you specified in CMAKE_INSTALL_PREFIX.
///
/// 8. (optional) For Python bindings, you might want to add the path of Python bindings as part of PYTHONPATH environment. To do so, run:
/// 8. For Python bindings, you might want to add the path of Python bindings as part of PYTHONPATH environment. To do so, run:
/// ```
/// export PYTHONPATH=$PYTHONPATH:/path-to-your-Python-bindings
/// ```
Expand Down
2 changes: 1 addition & 1 deletion manual/mainpage.dox
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//////////////////////////////////////////////////////////////////////
/// @mainpage
/// libSBOL 2.1.1
/// libSBOL 2.2.0
/// ======================================
///
/// [libSBOL](https://github.com/SynBioDex/libSBOL) is a C++ library for reading, writing, and constructing genetic designs according to the standardized specification of the [Synthetic Biology Open Language (SBOL)](http://www.sbolstandard.org/).
Expand Down
3 changes: 0 additions & 3 deletions manual/sequences.dox
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
/// e0040 = doc.getComponentDefinition('http://synbiohub.org/public/igem/BBa_E0040/1');
/// b0012 = doc.getComponentDefinition('http://synbiohub.org/public/igem/BBa_B0012/1')
/// ```
/// PySBOL supports several search options, including a general search, an exact search, and an advanced search. The easiest search is a general search.
/// ```
///
/// ```
/// @section template_design Design Abstraction with SBOL
/// Design abstraction enables the synthetic biologist to think about the high-level, functional characteristics of a biological system independently of its structural characteristics. This enables a computer-aided design (CAD) approach similar to electronics, in which the functional or schematic representation of an electronic circuit can be represented separately from the physical dimensions of the electronic components.
/// One advantage of the SBOL standard over GenBank is the ability to represent DNA as abstract components without knowing their exact sequence. An abstract design can be used as a template, with sequence information filled in later. A ComponentDefinition represents a biological component whose general function is known while its sequence is currently either unknown or unspecified. The intended function of a component is specified using a term from the Sequence Ontology (SO), a standard vocabulary for describing genetic parts. As the following example shows, some common SO terms are built in to libSBOL as pre-defined constants (see @file constants.h ). This code example defines the new component as a gene. Other terms may be found by browsing the [Sequence Ontology](http://www.sequenceontology.org/browser/obob.cgi) online.
Expand Down
4 changes: 2 additions & 2 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ include_directories( ${CURL_INCLUDE_DIR})
if( SBOL_BUILD_PYTHON2 )
find_package( SWIG REQUIRED )
find_package( PythonLibs 2 EXACT)
include_directories( ${PYTHON_INCLUDE_DIRS} )
include_directories( ${PYTHON_INCLUDE_DIR} )
endif()
if( SBOL_BUILD_PYTHON3 )
find_package( SWIG REQUIRED )
find_package( PythonLibs 3)
include_directories( ${PYTHON_INCLUDE_DIRS} )
include_directories( ${PYTHON_INCLUDE_DIR} )
endif()

# gather source files
Expand Down
2 changes: 1 addition & 1 deletion source/assembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ void Participation::define(ComponentDefinition& species, string role)

ComponentDefinition& ComponentDefinition::build()
{
return *new ComponentDefinition();
};

void ComponentDefinition::participate(Participation& species)
Expand Down
4 changes: 0 additions & 4 deletions source/document.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,6 @@ namespace sbol {
}
};




template < class SBOLClass > void Document::add(std::vector < SBOLClass* > sbol_objects)
{
for (auto i_obj = sbol_objects.begin(); i_obj != sbol_objects.end(); ++i_obj)
Expand Down Expand Up @@ -791,7 +788,6 @@ namespace sbol {
target_doc->add < SBOLClass > (new_obj);
return new_obj;
};

}


Expand Down
4 changes: 4 additions & 0 deletions source/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
#include <map>
#include <unordered_map>

#if defined(SBOL_BUILD_PYTHON2) || defined(SBOL_BUILD_PYTHON3)
#include "Python.h"
#endif

namespace sbol
{
Expand Down Expand Up @@ -207,6 +209,7 @@ namespace sbol

std::vector<std::string>::iterator python_iter;

#if defined(SBOL_BUILD_PYTHON2) || defined(SBOL_BUILD_PYTHON3)
std::string __getitem__(const int nIndex)
{
return this->operator[](nIndex);
Expand Down Expand Up @@ -258,6 +261,7 @@ namespace sbol
{
return this->size();
}
#endif

};
bool operator !=(const SBOLObject &a, const SBOLObject &b);
Expand Down
6 changes: 3 additions & 3 deletions source/properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void VersionProperty::incrementMinor()

// Concatenate new version string
string new_version;
int i_v = 0;
unsigned int i_v = 0;
do
{
new_version += v_tokens[i_v] + v_delimiters[i_v];
Expand Down Expand Up @@ -180,7 +180,7 @@ void VersionProperty::incrementMajor()

// Concatenate new version string
string new_version;
int i_v = 0;
unsigned int i_v = 0;
do
{
new_version += v_tokens[i_v] + v_delimiters[i_v];
Expand Down Expand Up @@ -220,7 +220,7 @@ void VersionProperty::incrementPatch()

// Concatenate new version string
string new_version;
int i_v = 0;
unsigned int i_v = 0;
do
{
new_version += v_tokens[i_v] + v_delimiters[i_v];
Expand Down
16 changes: 13 additions & 3 deletions source/properties.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
#include <utility>
#include <regex>

#if defined(SBOL_BUILD_PYTHON2) || defined(SBOL_BUILD_PYTHON3)
#include "Python.h"
#endif

namespace sbol
{
Expand All @@ -55,6 +57,8 @@ namespace sbol
{
}

#if defined(SBOL_BUILD_PYTHON2) || defined(SBOL_BUILD_PYTHON3)

std::string __getitem__(const int nIndex)
{
return this->operator[](nIndex);
Expand Down Expand Up @@ -103,11 +107,13 @@ namespace sbol
throw SBOLError(END_OF_LIST, "");
return NULL;
}

int __len__()
{
return this->size();
}
#endif

};

/// @ingroup extension_layer
Expand All @@ -117,6 +123,7 @@ namespace sbol
public:
virtual std::string get(); ///< Basic getter for all SBOL literal properties.

#if defined(SBOL_BUILD_PYTHON2) || defined(SBOL_BUILD_PYTHON3)
std::string __getitem__(const int nIndex)
{
return this->operator[](nIndex);
Expand Down Expand Up @@ -170,7 +177,8 @@ namespace sbol
{
return this->size();
}

#endif

TextProperty(sbol_type type_uri, void *property_owner, std::string initial_value = "", ValidationRules validation_rules = {}) :
Property(type_uri, property_owner, "\"" + initial_value + "\"", validation_rules)

Expand All @@ -185,6 +193,7 @@ namespace sbol
public:
virtual int get(); ///< Basic getter for all SBOL literal properties.

#if defined(SBOL_BUILD_PYTHON2) || defined(SBOL_BUILD_PYTHON3)
std::string __getitem__(const int nIndex)
{
return this->operator[](nIndex);
Expand Down Expand Up @@ -238,7 +247,8 @@ namespace sbol
{
return this->size();
}

#endif

IntProperty(sbol_type type_uri, void *property_owner, int initial_value = 0) :
Property(type_uri, property_owner, initial_value)
{
Expand Down
5 changes: 4 additions & 1 deletion source/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ void sbol::libsbol_rule_1(void *sbol_obj, void *arg)
void sbol::libsbol_rule_2(void *sbol_obj, void *arg)
{

string& date_time = (string&)*arg;
//string& date_time = (string&)*arg;
//char *date_time[] = (char *[])arg;
const char *c_date_time = (const char *)arg;
string date_time = string(c_date_time);

bool DATETIME_MATCH_1 = false;
bool DATETIME_MATCH_2 = false;
Expand Down
24 changes: 12 additions & 12 deletions wrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -307,18 +307,18 @@ IF (SBOL_BUILD_PYTHON3)
endif()
endif()

unset( PYTHON_LIBRARIES CACHE )
unset( PYTHONLIBS_FOUND CACHE )
unset(PYTHON_INCLUDE_DIRS CACHE )
unset(PYTHON_INCLUDE_DIR CACHE )
unset(PYTHONLIBS_VERSION_STRING CACHE )
unset(PYTHON_INCLUDE_PATH CACHE)
unset( PYTHON_LIBRARIES )
unset( PYTHONLIBS_FOUND )
unset(PYTHON_INCLUDE_DIRS )
unset(PYTHON_INCLUDE_DIR )
unset(PYTHONLIBS_VERSION_STRING )
unset(PYTHON_INCLUDE_PATH )
#unset( PYTHON_LIBRARIES CACHE )
#unset( PYTHONLIBS_FOUND CACHE )
#unset(PYTHON_INCLUDE_DIRS CACHE )
#unset(PYTHON_INCLUDE_DIR CACHE )
#unset(PYTHONLIBS_VERSION_STRING CACHE )
#unset(PYTHON_INCLUDE_PATH CACHE)
#unset( PYTHON_LIBRARIES )
#unset( PYTHONLIBS_FOUND )
#unset(PYTHON_INCLUDE_DIRS )
#unset(PYTHON_INCLUDE_DIR )
#unset(PYTHONLIBS_VERSION_STRING )
#unset(PYTHON_INCLUDE_PATH )

IF (SBOL_BUILD_PYTHON2)
find_package( PythonLibs 2 EXACT)
Expand Down
2 changes: 1 addition & 1 deletion wrapper/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '2.1.1'
__version__ = '2.2.0'

from libsbol import *
import unit_tests
Loading

0 comments on commit b3d2361

Please sign in to comment.