Skip to content
Permalink
Browse files

Merge remote-tracking branch 'upstream/develop' into develop

  • Loading branch information...
agarny committed Feb 12, 2019
2 parents 9db1335 + a51fa1d commit 021dd2b34dedba3082f3294ae0b30f053cf5c8ae
Showing with 737 additions and 507 deletions.
  1. +27 −24 CMakeLists.txt
  2. +14 −21 README.rst
  3. +5 −1 cmake/environmentchecks.cmake
  4. +3 −3 docs/contributors.rst
  5. +6 −3 docs/coverage_statistics.rst
  6. +7 −7 docs/current_thinking.rst
  7. +43 −27 docs/dev_building.rst
  8. +15 −13 docs/dev_coding_standard.rst
  9. +0 −3 docs/dev_configuration_options.rst
  10. +71 −38 docs/dev_contribution.rst
  11. +22 −10 docs/dev_review.rst
  12. +68 −41 docs/dev_setup.rst
  13. +8 −5 docs/dev_testing_code.rst
  14. +2 −2 docs/glossary.rst
  15. +0 −1 docs/index.rst
  16. +7 −6 docs/object_model.rst
  17. +23 −22 docs/roadmap.rst
  18. +7 −8 docs/usecases.rst
  19. +0 −1 src/api/libcellml/component.h
  20. +2 −2 src/api/libcellml/entity.h
  21. +2 −2 src/api/libcellml/error.h
  22. +2 −2 src/api/libcellml/importedentity.h
  23. +1 −1 src/api/libcellml/importsource.h
  24. +2 −2 src/api/libcellml/logger.h
  25. +2 −2 src/api/libcellml/model.h
  26. +2 −2 src/api/libcellml/namedentity.h
  27. +29 −0 src/api/libcellml/namespaces.h
  28. +2 −2 src/api/libcellml/parser.h
  29. +2 −2 src/api/libcellml/printer.h
  30. +2 −2 src/api/libcellml/reset.h
  31. +1 −0 src/api/libcellml/types.h
  32. +3 −3 src/api/libcellml/units.h
  33. +3 −3 src/api/libcellml/validator.h
  34. +2 −2 src/api/libcellml/variable.h
  35. +3 −3 src/api/libcellml/version.h
  36. +2 −2 src/api/libcellml/when.h
  37. +4 −10 src/bindings/CMakeLists.txt
  38. +2 −4 src/component.cpp
  39. +2 −3 src/componententity.cpp
  40. +1 −2 src/entity.cpp
  41. +1 −2 src/error.cpp
  42. +2 −3 src/logger.cpp
  43. +5 −6 src/model.cpp
  44. +1 −2 src/namedentity.cpp
  45. +87 −77 src/parser.cpp
  46. +8 −9 src/printer.cpp
  47. +1 −3 src/reset.cpp
  48. +3 −3 src/units.cpp
  49. +2 −2 src/utilities.cpp
  50. +2 −2 src/utilities.h
  51. +41 −39 src/validator.cpp
  52. +3 −3 src/variable.cpp
  53. +2 −3 src/version.cpp
  54. +0 −1 src/when.cpp
  55. +14 −3 src/xmlattribute.cpp
  56. +25 −9 src/xmlattribute.h
  57. +2 −3 src/xmldoc.cpp
  58. +2 −2 src/xmldoc.h
  59. +31 −5 src/xmlnode.cpp
  60. +65 −12 src/xmlnode.h
  61. +0 −1 tests/component/component.cpp
  62. +2 −2 tests/component/encapsulation.cpp
  63. +1 −1 tests/coverage/coverage.cpp
  64. +0 −2 tests/error/error.cpp
  65. +0 −1 tests/model/component_import.cpp
  66. +0 −1 tests/model/model.cpp
  67. +0 −1 tests/model/units_import.cpp
  68. +2 −4 tests/parser/file_parser.cpp
  69. +1 −2 tests/parser/libxml_user.cpp
  70. +29 −3 tests/parser/parser.cpp
  71. +0 −1 tests/printer/printer.cpp
  72. +2 −3 tests/resolve_imports/file_parser.cpp
  73. +0 −3 tests/test_utils.cpp
  74. +0 −1 tests/test_utils.h
  75. +0 −1 tests/units/units.cpp
  76. +3 −1 tests/validator/validator.cpp
  77. +0 −1 tests/variable/variable.cpp
  78. +1 −2 tests/version/version.cpp
@@ -29,7 +29,7 @@ set(_PARAM_ANNOTATION "Enable coverage testing.")
if(COVERAGE_TESTING_AVAILABLE)
set(LIBCELLML_COVERAGE ON CACHE BOOL ${_PARAM_ANNOTATION})
endif()
if(COVERAGE AND COVERAGE_TESTING_AVAILABLE)
if(DEFINED COVERAGE AND COVERAGE_TESTING_AVAILABLE)
set(LIBCELLML_COVERAGE "${COVERAGE}" CACHE BOOL ${_PARAM_ANNOTATION} FORCE)
elseif(COVERAGE)
message(WARNING "Coverage testing requested but gcov or its requirements not found!")
@@ -41,7 +41,7 @@ set(_PARAM_ANNOTATION "Enable memcheck testing.")
if(VALGRIND_TESTING_AVAILABLE)
set(LIBCELLML_MEMCHECK ON CACHE BOOL ${_PARAM_ANNOTATION})
endif()
if(MEMCHECK AND VALGRIND_TESTING_AVAILABLE)
if(DEFINED MEMCHECK AND VALGRIND_TESTING_AVAILABLE)
set(LIBCELLML_MEMCHECK "${MEMCHECK}" CACHE BOOL ${_PARAM_ANNOTATION} FORCE)
elseif(MEMCHECK)
message(WARNING "Memcheck testing requested but valgrind or its requirements not found!")
@@ -50,66 +50,69 @@ unset(MEMCHECK CACHE)

# BINDINGS_PYTHON ==> LIBCELLML_BINDINGS_PYTHON
set(_PARAM_ANNOTATION "Build Python wrappers.")
set(LIBCELLML_BINDINGS_PYTHON ON CACHE BOOL ${_PARAM_ANNOTATION})
if(BINDINGS_PYTHON)
if (BINDINGS_AVAILABLE)
set(LIBCELLML_BINDINGS_PYTHON ON CACHE BOOL ${_PARAM_ANNOTATION})
endif ()
if(DEFINED BINDINGS_PYTHON AND BINDINGS_AVAILABLE)
set(LIBCELLML_BINDINGS_PYTHON "${BINDINGS_PYTHON}" CACHE BOOL ${_PARAM_ANNOTATION} FORCE)
endif()
unset(BINDINGS_PYTHON CACHE)

# UNIT_TESTS ==> LIBCELLML_UNIT_TESTS
set(_PARAM_ANNOTATION "Enable libCellML tests.")
set(LIBCELLML_UNIT_TESTS ON CACHE BOOL ${_PARAM_ANNOTATION})
if(UNIT_TESTS)
if(DEFINED UNIT_TESTS)
set(LIBCELLML_UNIT_TESTS "${UNIT_TESTS}" CACHE BOOL ${_PARAM_ANNOTATION} FORCE)
endif()
unset(UNIT_TESTS CACHE)

if(LIBCELLML_COVERAGE OR LIBCELLML_MEMCHECK)
if(NOT LIBCELLML_UNIT_TESTS)
message(STATUS "Configuration confusion:
Memchecking or coverage testing has been requested but unit tests have not.
This is not possible so forcing the unit tests to 'on' to make it possible.
")
endif()
set(LIBCELLML_UNIT_TESTS ON CACHE BOOL ${_PARAM_ANNOTATION} FORCE)
if(NOT LIBCELLML_UNIT_TESTS)
message(STATUS "Configuration confusion:
Memchecking or coverage testing has been requested but unit tests have not.
This is not possible so forcing the unit tests to 'on' to make it possible.
")
set(LIBCELLML_UNIT_TESTS ON CACHE BOOL ${_PARAM_ANNOTATION} FORCE)
endif()
endif()

# TWAE ==> LIBCELLML_TREAT_WARNINGS_AS_ERRORS -- Note: This excludes third party code, where warnings are never treated as errors.
set(_PARAM_ANNOTATION "Treat warnings as errors, this setting applies only to compilation units built by this project.")
set(LIBCELLML_TREAT_WARNINGS_AS_ERRORS ON CACHE BOOL ${_PARAM_ANNOTATION})
if(TWAE)
if(DEFINED TWAE)
set(LIBCELLML_TREAT_WARNINGS_AS_ERRORS "${TWAE}" CACHE BOOL ${_PARAM_ANNOTATION} FORCE)
endif()
unset(TWAE CACHE)

# BUILD_TYPE ==> LIBCELLML_BUILD_TYPE
set(_PARAM_ANNOTATION "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
set(LIBCELLML_BUILD_TYPE "Debug" CACHE STRING ${_PARAM_ANNOTATION})
if(BUILD_TYPE)
if(DEFINED BUILD_TYPE)
set(LIBCELLML_BUILD_TYPE ${BUILD_TYPE} CACHE STRING ${_PARAM_ANNOTATION} FORCE)
endif()
unset(BUILD_TYPE CACHE)
if(LIBCELLML_MEMCHECK OR LIBCELLML_COVERAGE)
if(LIBCELLML_BUILD_TYPE STREQUAL "Release")
message(STATUS "Configuration confusion:
Release build requested but memchecking or coverage has also been requested.
This is not possible so forcing the build type to 'Debug' to make it possible.
")
endif()
set(LIBCELLML_BUILD_TYPE "Debug" CACHE STRING ${_PARAM_ANNOTATION} FORCE)
if(LIBCELLML_BUILD_TYPE STREQUAL "Release")
message(STATUS "Configuration confusion:
Release build requested but memchecking or coverage has also been requested.
This is not possible so forcing the build type to 'Debug' to make it possible.
")
set(LIBCELLML_BUILD_TYPE "Debug" CACHE STRING ${_PARAM_ANNOTATION} FORCE)
endif()
endif()
unset(BUILD_TYPE CACHE)

# INSTALL_PREFIX ==> LIBCELLML_INSTALL_PREFIX
set(_PARAM_ANNOTATION "Install path prefix, prepended onto install directories.")
set(LIBCELLML_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE STRING ${_PARAM_ANNOTATION})
if(INSTALL_PREFIX)
if(DEFINED INSTALL_PREFIX)
set(LIBCELLML_INSTALL_PREFIX ${INSTALL_PREFIX} CACHE STRING ${_PARAM_ANNOTATION} FORCE)
endif()
unset(INSTALL_PREFIX CACHE)

# BUILD_SHARED ==> LIBCELLML_BUILD_SHARED
set(_PARAM_ANNOTATION "Build shared libraries (so, dylib, DLLs).")
set(LIBCELLML_BUILD_SHARED ON CACHE BOOL ${_PARAM_ANNOTATION})
if(BUILD_SHARED)
if(DEFINED BUILD_SHARED)
set(LIBCELLML_BUILD_SHARED ${BUILD_SHARED} CACHE BOOL ${_PARAM_ANNOTATION} FORCE)
endif()
unset(BUILD_SHARED CACHE)
@@ -1,43 +1,36 @@
libCellML
=========

libCellML aims to become an easy to use library that will be useful to developers of CellML applications.
libCellML aims to become an easy to use library that will be useful to developers of `CellML <https://www.cellml.org/>`_ applications.

The prime libCellML repository is located at: https://github.com/cellml/libcellml.
The prime libCellML repository is located at https://github.com/cellml/libcellml.

The documentation for the libCellML project is available at: http://libcellml.readthedocs.io/.
The documentation for the libCellML project is available at https://libcellml.readthedocs.io/.

Scope
-----

The purpose of libCellML is to create, manipulate, serialise, deserialise, validate and instantiate
CellML models. In the first instance, all serialising and deserialising will be to and from standard
strings and using the CellML XML format.
The purpose of libCellML is to create, manipulate, serialise, deserialise, validate and instantiate `CellML <https://www.cellml.org/>`_ models.
In the first instance, all serialising and deserialising will be to and from standard strings and using the `CellML <https://www.cellml.org/>`_ `XML <https://www.w3.org/XML/>`_ format.

The library is intended to be lightweight and focused purely in dealing with CellML models. In achieving this,
some of the convenience methods/objects that we might expect will not be part of libCellML.
For example, in our current thoughts, libCellML would not be concerned with the actual mechanics of
resolving and retrieving external resources - calling applications would be required to resolve and
retrieve import URLs and provide the serialised documents to libCellML in the form of strings for
instantiation as part of the CellML hierarchical model description.
The library is intended to be lightweight and focused purely in dealing with `CellML <https://www.cellml.org/>`_ models.
In achieving this, some of the convenience methods/objects that we might expect will not be part of libCellML.
For example, in our current thoughts, libCellML would not be concerned with the actual mechanics of resolving and retrieving external resources - calling applications would be required to resolve and retrieve import URLs and provide the serialised documents to libCellML in the form of strings for instantiation as part of the `CellML <https://www.cellml.org/>`_ hierarchical model description.

Example code will be provided which demonstrates how such tasks can be achieved using standard tools,
i.e., libcurl for C/C++ and requests for Python to resolve and retrieve imported models.
Example code will be provided that demonstrates how such tasks can be achieved using standard tools, i.e. `libcurl <https://curl.haxx.se/libcurl/>`_ for C/C++ and requests for Python to resolve and retrieve imported models.

Continuous Integration
----------------------

libCellML makes use of Buildbot for continuous integration testing, all code is run through the
test suite when a pull request is created or added to. More information on how Buildbot is
integrated in to the development process is available from the documentation http://libcellml.readthedocs.io/.
libCellML makes use of `Buildbot <https://buildbot.net/>`_ for continuous integration testing, all code is run through the test suite when a pull request is created or added to.
More information on how `Buildbot <https://buildbot.net/>`_ is integrated in to the development process is available from the documentation at http://libcellml.readthedocs.io/.

Contribute
----------

libCellML is an open-source project, thus, welcoming contributions.
If you are interested you may (in short):

* Fork libCellML on GitHub (https://github.com/cellml/libcellml) and submit a pull request with your modifications.
For more information on contributing code see the documentation http://libcellml.readthedocs.io/
* Subscribe to the libCellML mailing list https://lists.cellml.org/sympa/info/cellml-tools-developers

* Fork `libCellML on GitHub <https://github.com/cellml/libcellml>`_ and submit a pull request with your modifications.
For more information on contributing code see the documentation at http://libcellml.readthedocs.io/.
* Subscribe to the libCellML mailing list at https://lists.cellml.org/sympa/info/cellml-tools-developers.
@@ -19,12 +19,16 @@ find_program(GCOV_EXE NAMES ${PREFERRED_GCOV_NAMES} gcov)
find_program(FIND_EXE NAMES ${PREFERRED_FIND_NAMES} find)
find_package(Doxygen)
find_package(Sphinx)
find_package(SWIG 3)

if(VALGRIND_EXE AND Python_Interpreter_FOUND)
set(VALGRIND_TESTING_AVAILABLE TRUE CACHE BOOL "Executables required to run valgrind testing are available.")
endif()
if(GCOV_EXE AND FIND_EXE AND Python_Interpreter_FOUND)
set(COVERAGE_TESTING_AVAILABLE TRUE CACHE BOOL "Executables required to run the coverage testing are available.")
endif()
mark_as_advanced(VALGRIND_EXE VALGRIND_TESTING_AVAILABLE GCOV_EXE FIND_EXE COVERAGE_TESTING_AVAILABLE)
if (SWIG_EXECUTABLE)
set(BINDINGS_AVAILABLE TRUE CACHE BOOL "Executables required to generate bindings are available.")
endif ()
mark_as_advanced(VALGRIND_EXE VALGRIND_TESTING_AVAILABLE GCOV_EXE FIND_EXE COVERAGE_TESTING_AVAILABLE SWIG_EXECUTABLE BINDINGS_AVAILABLE)

@@ -4,10 +4,10 @@
Contributors
============

All contributors to the libCellML software project agree to the terms and conditions of the APACHE 2 license.
All contributors to the libCellML software project agree to the terms and conditions of the `Apache v2.0 <https://opensource.org/licenses/Apache-2.0>`_ license.

List of Contributors
====================

* University of Auckland
* VPR
* `University of Auckland <https://www.auckland.ac.nz/>`_
* `VPR <http://www.virtualrat.org/>`_
@@ -7,6 +7,9 @@ The output from the coverage testing using gcov is available `here <coverage/ind

.. note::

The coverage testing pages are **not** currently available on `readthedocs <http://libcellml.readthedocs.io/en/latest/>`_.
The coverage test sometimes (this behaviour has been observed on OS X using clang) reports single lines containing only a closing curly brace as not covered. This is currently being treated as a false positive. This can be seen in the 'Missing' column of the test report where only single lines are reported, for the case discussed here the reported line should only contain a single closing curly brace. In this situation we will accept the missed coverage report.

The coverage testing pages are **not** currently available on `Read the Docs <http://libcellml.readthedocs.io/en/latest/>`_.
The coverage test sometimes (this behaviour has been observed on `macOS <https://en.wikipedia.org/wiki/MacOS>`_ using `Clang <https://clang.llvm.org/>`_) reports single lines containing only a closing curly brace as not covered.
This is currently being treated as a false positive.
This can be seen in the 'Missing' column of the test report where only single lines are reported.
For the case discussed here, the reported line should only contain a single closing curly brace.
In this situation, we will accept the missed coverage report.
@@ -8,15 +8,15 @@ This document simply outlines some of the current rationale that has an influenc

- Not dealing with external documents.

- Absolves libcellml from fetching files and communicating across the internet.
- Absolves libcellml from fetching files and communicating across the Internet.
- Expect to provide another layer that would perform this role as a separate thing.
- No avenue to retrieve external references.

- Serialise and deserialise from a string.
- Present a useful interface not one tied to XML structure.
- Validation is going to be quite separate (you are free to make invalid CellML models).
- Not creating our own MathML object model
- Present a useful interface not one tied to `XML <https://www.w3.org/XML/>`_ structure.
- Validation is going to be quite separate (you are free to make invalid `CellML <https://www.cellml.org/>`_ models).
- Not creating our own `MathML <https://www.w3.org/Math/>`_ object model.

- Treat MathML as a string.
- Enables libCellML development to focus on getting core "CellML" support.
- Expect to provide another layer that would handle MathML as a separate thing.
- Treat `MathML <https://www.w3.org/Math/>`_ as a string.
- Enables libCellML development to focus on getting core "`CellML <https://www.cellml.org/>`_" support.
- Expect to provide another layer that would handle `MathML <https://www.w3.org/Math/>`_ as a separate thing.
Oops, something went wrong.

0 comments on commit 021dd2b

Please sign in to comment.
You can’t perform that action at this time.