diff --git a/.gitmodules b/.gitmodules index a8299d0..0bc74f1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ [submodule "Catch2"] - path = Catch2 + path = submodules/Catch2 url = https://github.com/catchorg/Catch2 [submodule "msgpack-c"] - path = msgpack-c + path = submodules/msgpack-c url = https://github.com/msgpack/msgpack-c [submodule "mmtf_spec"] - path = mmtf_spec + path = submodules/mmtf_spec url = https://github.com/rcsb/mmtf diff --git a/CHANGELOG.md b/CHANGELOG.md index 8962d68..3421e27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/). [MMTF specification](https://github.com/rcsb/mmtf/pull/35). - New methods to find polymer chains and HETATM following discussions in [rcsb/mmtf#28](https://github.com/rcsb/mmtf/issues/28). +- Altered submodule locations [rcsb/mmtf-cpp#36](https://github.com/rcsb/mmtf-cpp/pull/36) + from the base directory to the new submodules directory. ## v1.0.0 - 2019-02-05 ### Added diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d95e07..7acffed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,11 +15,11 @@ target_include_directories(MMTFcpp INTERFACE if (mmtf_build_local) # use header only - set(MSGPACKC_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/msgpack-c/include) + set(MSGPACKC_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/submodules/msgpack-c/include) add_library(msgpackc INTERFACE) target_include_directories(msgpackc INTERFACE ${MSGPACKC_INCLUDE_DIR}) if (BUILD_TESTS) - set(CATCH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Catch2/single_include) + set(CATCH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/submodules/Catch2/single_include) add_library(Catch INTERFACE) target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR}) endif() diff --git a/README.md b/README.md index d6964a5..2ff16df 100644 --- a/README.md +++ b/README.md @@ -83,18 +83,18 @@ Example codes: - mmtf_demo.cpp: Loads an MMTF file and checks internal consistency using mmtf::StructureData::hasConsistentData. ```bash -./examples/mmtf_demo ../mmtf_spec/test-suite/mmtf/173D.mmtf +./examples/mmtf_demo ../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf ``` - traverse.cpp: Loads an MMTF file and dumps it in human-readable forms. ```bash -./examples/traverse ../mmtf_spec/test-suite/mmtf/173D.mmtf -./examples/traverse ../mmtf_spec/test-suite/mmtf/173D.mmtf json -./examples/traverse ../mmtf_spec/test-suite/mmtf/173D.mmtf print +./examples/traverse ../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf +./examples/traverse ../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf json +./examples/traverse ../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf print ``` - print_as_pdb.cpp: Loads an MMTF file and prints it in pdb format. ```bash -./examples/print_as_pdb ../mmtf_spec/test-suite/mmtf/173D.mmtf +./examples/print_as_pdb ../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf ``` ## Benchmark diff --git a/ci/travis-test-example.sh b/ci/travis-test-example.sh index 220e025..6772ac3 100644 --- a/ci/travis-test-example.sh +++ b/ci/travis-test-example.sh @@ -10,13 +10,13 @@ set -e cd $TRAVIS_BUILD_DIR/examples if [ -z "$EMSCRIPTEN" ]; then # Compile with C++03 forced - $CXX -I"../msgpack-c/include" -I"../include" -std=c++03 -O2 \ + $CXX -I"../submodules/msgpack-c/include" -I"../include" -std=c++03 -O2 \ -o read_and_write read_and_write.cpp - ./read_and_write ../mmtf_spec/test-suite/mmtf/3NJW.mmtf test.mmtf + ./read_and_write ../submodules/mmtf_spec/test-suite/mmtf/3NJW.mmtf test.mmtf else # Cannot do C++03 here and need to embed input file for running it with node - cp ../mmtf_spec/test-suite/mmtf/3NJW.mmtf . - $CXX -I"../msgpack-c/include" -I"../include" -O2 \ + cp ../submodules/mmtf_spec/test-suite/mmtf/3NJW.mmtf . + $CXX -I"../submodules/msgpack-c/include" -I"../include" -O2 \ -o read_and_write.js read_and_write.cpp --embed-file 3NJW.mmtf node read_and_write.js 3NJW.mmtf test.mmtf fi diff --git a/Catch2 b/submodules/Catch2 similarity index 100% rename from Catch2 rename to submodules/Catch2 diff --git a/mmtf_spec b/submodules/mmtf_spec similarity index 100% rename from mmtf_spec rename to submodules/mmtf_spec diff --git a/msgpack-c b/submodules/msgpack-c similarity index 100% rename from msgpack-c rename to submodules/msgpack-c diff --git a/tests/mmtf_tests.cpp b/tests/mmtf_tests.cpp index 163e957..d84a392 100644 --- a/tests/mmtf_tests.cpp +++ b/tests/mmtf_tests.cpp @@ -42,7 +42,7 @@ msgpack_obj_to_map(const msgpack::object& obj) { } TEST_CASE("assignment operator") { - std::string working_mmtf = "../mmtf_spec/test-suite/mmtf/173D.mmtf"; + std::string working_mmtf = "../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf"; mmtf::StructureData sd; mmtf::decodeFromFile(sd, working_mmtf); SECTION("basic assignment operator") { @@ -78,7 +78,7 @@ TEST_CASE("assignment operator") { TEST_CASE("copy constructor") { - std::string working_mmtf = "../mmtf_spec/test-suite/mmtf/173D.mmtf"; + std::string working_mmtf = "../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf"; mmtf::StructureData sd; mmtf::decodeFromFile(sd, working_mmtf); SECTION("Basic copy constructor") { @@ -99,32 +99,32 @@ TEST_CASE("copy constructor") { // Tests for structure_data.hpp TEST_CASE("Test round trip StructureData working") { std::vector works; - works.push_back("../mmtf_spec/test-suite/mmtf/173D.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/1AA6.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/1AUY.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/1BNA.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/1CAG.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/1HTQ.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/1IGT.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/1L2Q.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/1LPV.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/1MSH.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/1O2F.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/1R9V.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/1SKM.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/3NJW.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/3ZYB.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/4CK4.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/4CUP.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/4OPJ.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/4P3R.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/4V5A.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/4Y60.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/5EMG.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/5ESW.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/empty-all0.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/empty-numChains1.mmtf"); - works.push_back("../mmtf_spec/test-suite/mmtf/empty-numModels1.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/1AA6.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/1AUY.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/1BNA.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/1CAG.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/1HTQ.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/1IGT.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/1L2Q.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/1LPV.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/1MSH.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/1O2F.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/1R9V.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/1SKM.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/3NJW.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/3ZYB.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/4CK4.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/4CUP.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/4OPJ.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/4P3R.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/4V5A.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/4Y60.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/5EMG.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/5ESW.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/empty-all0.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/empty-numChains1.mmtf"); + works.push_back("../submodules/mmtf_spec/test-suite/mmtf/empty-numModels1.mmtf"); works.push_back("../temporary_test_data/all_canoncial.mmtf"); works.push_back("../temporary_test_data/1PEF_with_resonance.mmtf"); for (size_t i=0; i doesnt_work; - doesnt_work.push_back("../mmtf_spec/test-suite/mmtf/empty-mmtfVersion99999999.mmtf"); + doesnt_work.push_back("../submodules/mmtf_spec/test-suite/mmtf/empty-mmtfVersion99999999.mmtf"); for (size_t i=0; i& sd_map, // test round trips with all extra data set TEST_CASE("extra data fields") { // Randomly chosen, small example MMTF - std::string working_mmtf = "../mmtf_spec/test-suite/mmtf/173D.mmtf"; + std::string working_mmtf = "../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf"; mmtf::StructureData sd, sd2, sd3; mmtf::decodeFromFile(sd, working_mmtf); @@ -863,7 +863,7 @@ TEST_CASE("extra data fields") { } TEST_CASE("Test export_helpers") { - std::string working_mmtf = "../mmtf_spec/test-suite/mmtf/3NJW.mmtf"; + std::string working_mmtf = "../submodules/mmtf_spec/test-suite/mmtf/3NJW.mmtf"; mmtf::StructureData sd; mmtf::decodeFromFile(sd, working_mmtf); size_t numbonds_ref = sd.numBonds; @@ -942,7 +942,7 @@ TEST_CASE("Test export_helpers") { } TEST_CASE("Test mapdecoder from raw mmtf") { - std::string working_mmtf = "../mmtf_spec/test-suite/mmtf/173D.mmtf"; + std::string working_mmtf = "../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf"; mmtf::MapDecoder md; mmtf::mapDecoderFromFile(md, working_mmtf); std::vector bonds; @@ -955,7 +955,7 @@ TEST_CASE("Test mapdecoder from raw mmtf") { TEST_CASE("Test various encode and decode options") { // fetch reference data - std::string working_mmtf = "../mmtf_spec/test-suite/mmtf/173D.mmtf"; + std::string working_mmtf = "../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf"; mmtf::StructureData sd_ref; mmtf::decodeFromFile(sd_ref, working_mmtf); // write into buffer diff --git a/tests/multi_cpp_test.cpp b/tests/multi_cpp_test.cpp index b68ee5d..1bb9900 100644 --- a/tests/multi_cpp_test.cpp +++ b/tests/multi_cpp_test.cpp @@ -9,7 +9,7 @@ int main(int argc, char** argv) { // decode MMTF file - std::string filename = "../mmtf_spec/test-suite/mmtf/173D.mmtf"; + std::string filename = "../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf"; mmtf::StructureData data; read_check_file(data, filename);