Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package maeparser for openSUSE:Factory checked in at 2023-02-02 18:08:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/maeparser (Old) and /work/SRC/openSUSE:Factory/.maeparser.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "maeparser" Thu Feb 2 18:08:39 2023 rev:3 rq:1062538 version:1.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/maeparser/maeparser.changes 2022-09-07 11:06:39.896502349 +0200 +++ /work/SRC/openSUSE:Factory/.maeparser.new.32243/maeparser.changes 2023-02-02 18:28:18.191435348 +0100 @@ -1,0 +2,7 @@ +Wed Feb 1 19:51:01 UTC 2023 - Antoine Belvire <antoine.belv...@opensuse.org> + +- Update to version 1.3.1: + * Allow property names to include colons + (gh#schrodinger/maeparser#77). + +------------------------------------------------------------------- Old: ---- maeparser-1.3.0.tar.gz New: ---- maeparser-1.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ maeparser.spec ++++++ --- /var/tmp/diff_new_pack.TKscQb/_old 2023-02-02 18:28:18.503437259 +0100 +++ /var/tmp/diff_new_pack.TKscQb/_new 2023-02-02 18:28:18.507437283 +0100 @@ -1,7 +1,7 @@ # # spec file for package maeparser # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define abiver 1 Name: maeparser -Version: 1.3.0 +Version: 1.3.1 Release: 0 Summary: Maestro file parser License: MIT ++++++ maeparser-1.3.0.tar.gz -> maeparser-1.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maeparser-1.3.0/CMakeLists.txt new/maeparser-1.3.1/CMakeLists.txt --- old/maeparser-1.3.0/CMakeLists.txt 2022-09-06 20:31:33.000000000 +0200 +++ new/maeparser-1.3.1/CMakeLists.txt 2023-02-01 20:22:56.000000000 +0100 @@ -55,7 +55,7 @@ SET_TARGET_PROPERTIES (maeparser PROPERTIES - VERSION 1.3.0 + VERSION 1.3.1 SOVERSION 1 ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maeparser-1.3.0/MaeBlock.hpp new/maeparser-1.3.1/MaeBlock.hpp --- old/maeparser-1.3.0/MaeBlock.hpp 2022-09-06 20:31:33.000000000 +0200 +++ new/maeparser-1.3.1/MaeBlock.hpp 2023-02-01 20:22:56.000000000 +0100 @@ -275,8 +275,8 @@ public: // Prevent copying. - IndexedProperty<T>(const IndexedProperty<T>&) = delete; - IndexedProperty<T>& operator=(const IndexedProperty<T>&) = delete; + IndexedProperty(const IndexedProperty<T>&) = delete; + IndexedProperty& operator=(const IndexedProperty<T>&) = delete; using size_type = typename std::vector<T>::size_type; @@ -286,14 +286,14 @@ * * The optional boost::dynamic_bitset is owned by the created object. */ - explicit IndexedProperty<T>(std::vector<T>& data, + explicit IndexedProperty(std::vector<T>& data, boost::dynamic_bitset<>* is_null = nullptr) : m_data(), m_is_null(is_null) { m_data.swap(data); } - ~IndexedProperty<T>() + ~IndexedProperty() { if (m_is_null != nullptr) { delete m_is_null; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maeparser-1.3.0/MaeParser.cpp new/maeparser-1.3.1/MaeParser.cpp --- old/maeparser-1.3.0/MaeParser.cpp 2022-09-06 20:31:33.000000000 +0200 +++ new/maeparser-1.3.1/MaeParser.cpp 2023-02-01 20:22:56.000000000 +0100 @@ -463,7 +463,6 @@ while (buffer.current < buffer.end || buffer.load(save)) { switch (*buffer.current) { case WHITESPACE: - case ':': case '{': case '[': return buffer.current != start; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maeparser-1.3.0/test/MaeParserTest.cpp new/maeparser-1.3.1/test/MaeParserTest.cpp --- old/maeparser-1.3.0/test/MaeParserTest.cpp 2022-09-06 20:31:33.000000000 +0200 +++ new/maeparser-1.3.1/test/MaeParserTest.cpp 2023-02-01 20:22:56.000000000 +0100 @@ -235,15 +235,6 @@ BOOST_AUTO_TEST_CASE(BlockBody) { - double tolerance = std::numeric_limits<double>::epsilon(); - { - auto ss = - std::make_shared<std::stringstream>("b_m_foo b_m_bar::: 1 0 }"); - MaeParser mp(ss); - auto bl = mp.blockBody(CT_BLOCK); - BOOST_REQUIRE(bl->getBoolProperty("b_m_foo")); - BOOST_REQUIRE(!bl->getBoolProperty("b_m_bar")); - } { auto ss = std::make_shared<std::stringstream>(" b_m_foo b_m_bar ::: 1 0 }"); @@ -261,6 +252,7 @@ BOOST_REQUIRE(bl->getBoolProperty("b_m_foo")); BOOST_REQUIRE(!bl->getBoolProperty("b_m_bar")); BOOST_REQUIRE_EQUAL(bl->getStringProperty("s_m_foo"), "svalue"); + double tolerance = std::numeric_limits<double>::epsilon(); BOOST_REQUIRE_CLOSE(bl->getRealProperty("r_m_foo"), 3.1415, tolerance); BOOST_REQUIRE_EQUAL(bl->getIntProperty("i_m_foo"), 22); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maeparser-1.3.0/test/ReaderTest.cpp new/maeparser-1.3.1/test/ReaderTest.cpp --- old/maeparser-1.3.0/test/ReaderTest.cpp 2022-09-06 20:31:33.000000000 +0200 +++ new/maeparser-1.3.1/test/ReaderTest.cpp 2023-02-01 20:22:56.000000000 +0100 @@ -329,14 +329,16 @@ check_msg); } -void write_block_names(const Block& block, int tabs, std::vector<std::pair<std::string, unsigned int>>& res) { - for (auto& subblock_name : block.getBlockNames()) { - res.push_back({subblock_name,tabs}); - write_block_names(*block.getBlock(subblock_name), tabs + 1, res); - } - for (auto& indexed_subblock_name : block.getIndexedBlockNames()) { - res.push_back({indexed_subblock_name,tabs}); - } +void write_block_names(const Block& block, int tabs, + std::vector<std::pair<std::string, unsigned int>>& res) +{ + for (auto& subblock_name : block.getBlockNames()) { + res.push_back({subblock_name, tabs}); + write_block_names(*block.getBlock(subblock_name), tabs + 1, res); + } + for (auto& indexed_subblock_name : block.getIndexedBlockNames()) { + res.push_back({indexed_subblock_name, tabs}); + } } BOOST_AUTO_TEST_CASE(TestGetSubBlockNames) @@ -357,26 +359,44 @@ m_test_indexed_block */ - std::vector<std::pair<std::string, unsigned int>> expected_subblocks = { - {"m_test_block", 0}, - {"m_nested_block", 1}, - {"m_test_nested_indexed_block", 2}, - {"m_test_block", 1}, - {"m_test_repeated_block", 1}, - {"m_test_indexed_block", 1}, - {schrodinger::mae::ATOM_BLOCK, 0}, - {schrodinger::mae::BOND_BLOCK, 0}, - }; - std::vector<std::pair<std::string, unsigned int>> actual_subblocks; - write_block_names(*b, 0, actual_subblocks); - - BOOST_REQUIRE(actual_subblocks.size() == expected_subblocks.size()); - for (unsigned int i = 0; i < actual_subblocks.size(); ++i) { - auto actual = actual_subblocks[i]; - auto expected = expected_subblocks[i]; - BOOST_CHECK_EQUAL(actual.first, expected.first); - BOOST_CHECK_EQUAL(actual.second, expected.second); - } + std::vector<std::pair<std::string, unsigned int>> expected_subblocks = { + {"m_test_block", 0}, + {"m_nested_block", 1}, + {"m_test_nested_indexed_block", 2}, + {"m_test_block", 1}, + {"m_test_repeated_block", 1}, + {"m_test_indexed_block", 1}, + {schrodinger::mae::ATOM_BLOCK, 0}, + {schrodinger::mae::BOND_BLOCK, 0}, + }; + std::vector<std::pair<std::string, unsigned int>> actual_subblocks; + write_block_names(*b, 0, actual_subblocks); + + BOOST_REQUIRE(actual_subblocks.size() == expected_subblocks.size()); + for (unsigned int i = 0; i < actual_subblocks.size(); ++i) { + auto actual = actual_subblocks[i]; + auto expected = expected_subblocks[i]; + BOOST_CHECK_EQUAL(actual.first, expected.first); + BOOST_CHECK_EQUAL(actual.second, expected.second); + } } +BOOST_AUTO_TEST_CASE(TestParsingPropertyNameWithColon) +{ + auto ss = std::make_shared<std::stringstream>(); + *ss << R"( + f_m_ct { + s_m_prop:name::with:::many::::colons + ::: + 1.1.0 + } + )"; + + Reader r(ss); + + auto b = r.next(CT_BLOCK); + BOOST_REQUIRE(b); + BOOST_CHECK_EQUAL(b->getStringProperty("s_m_prop:name::with:::many::::colons"), + "1.1.0"); +} BOOST_AUTO_TEST_SUITE_END()