This file summarizes repo-specific conventions and workflows for contributors and automated changes. It is intentionally concise; use the linked docs for full details.
README.md,CONTRIBUTING.md,ARCHITECTURE.MD,CODE_OF_CONDUCT.md,PULL_REQUEST_TEMPLATE.md.src/pyOpenMS/README.md,src/pyOpenMS/README_WRAPPING_NEW_CLASSES.share/OpenMS/examples/external_code/README.md,src/tests/external/README.md.dockerfiles/README.md,cmake/MacOSX/README.md,tools/jenkins/README.MD.- Doxygen (if built) in
OpenMS-build/doc/html/includingindex.html,developer_coding_conventions.html,developer_cpp_guide.html,developer_how_to_write_tests.html,howto_commit_messages.html,developer_faq.html,developer_tutorial.html,install_linux.html,install_mac.html,install_win.html,pyOpenMS.html.
- Default build directory:
OpenMS-build/(out-of-tree). - Core C++:
src/openms/,src/openms_gui/,src/openswathalgo/,src/topp/. - Tests:
src/tests/class_tests/openms/,src/tests/class_tests/openms_gui/,src/tests/topp/. - pyOpenMS:
src/pyOpenMS/withpxds/,addons/,pyopenms/,tests/.
- Out-of-tree build expected in
OpenMS-build/; build in place for development (install prefixes are for system installs). - Use
CMAKE_BUILD_TYPE=Debugfor development to keep assertions/pre/post-conditions. - Dependencies via distro packages or the contrib tree; set
OPENMS_CONTRIB_LIBSandCMAKE_PREFIX_PATHas needed (Qt, contrib). - pyOpenMS build deps:
src/pyOpenMS/requirements_bld.txt; enable with-DPYOPENMS=ONand optional-DPY_NUM_THREADS/-DPY_NUM_MODULES. - Linux: package manager preferred; contrib is fallback;
QT_QPA_PLATFORM=minimalcan help for remote GUI runs. - macOS: Apple Clang (Xcode), Homebrew; remove older Qt versions if they interfere.
- Windows: Visual Studio 2019+ (MSVC), CMake >= 3.24, 64-bit only, Visual Studio generator, avoid MinGW; keep build paths short.
- Style checks:
ENABLE_STYLE_TESTING=ONruns cpplint atsrc/tests/coding/cpplint.py.
- Unit/class tests:
src/tests/class_tests/<lib>/source/, add toexecutables.cmake; data insrc/tests/class_tests/libs/data/(prefix files with class name). - TOPP tests: add to
src/tests/topp/CMakeLists.txt, data insrc/tests/topp/. - GUI tests:
src/tests/class_tests/openms_gui/source/(Qt TestLib). - Build
all/ALL_BUILDto include tests andFuzzyDiff(TOPP tests depend on it). - Use
NEW_TMP_FILEfor each output file in tests; avoid side effects in comparison macros. - Run with
ctest, use-Rfor subset,-V/-VVfor verbosity,-Cfor multi-config generators. - Use
FuzzyDifffor numeric comparisons; keep test data small; use whitelist for unstable lines. - Test templates:
tools/create_test.php(requiresmake xml). START_SECTIONmacro pitfalls: wrap template methods with 2+ arguments in parentheses.- pyOpenMS tests:
ctest -R pyopenmsorpytestwithPYTHONPATH=/path/to/OpenMS-build/pyOpenMS(run outside the source tree to avoid shadowing).
- Indentation: 2 spaces, no tabs; Unix line endings.
- Spacing: after keywords (
if,for) and around binary operators. - Braces: opening/closing braces align; use braces even for single-line blocks (trivial one-liners may stay single-line).
- File names: class name matches file name; one class per file; always pair
.hwith.cpp. - Templates: use
_impl.honly when needed;.hmust not include_impl.h. - Names: classes/types/namespaces in PascalCase; methods lowerCamel; variables snake_case; private/protected members end with
_. - Enums and macros uppercase with underscores; avoid the preprocessor; prefer
enum class. - Parameters: lower_case with underscores; document ranges/units.
- File extensions: lowercase, except
ML/XMLandmzData. - Use OpenMS primitive types from
OpenMS/CONCEPT/Types.h. - No
using namespaceorusing std::...in headers; allowed in.cpp. - Follow Rule-of-0 or Rule-of-6.
- Accessors: get/set pairs for protected/private members; no reference getters for primitive types.
- Exceptions: derive from
Exception::Base; throw with file/line/OPENMS_PRETTY_FUNCTION; catch by reference; document possible exceptions. - Doxygen:
@brief+ blank line + details; use@defgroup/@ingroup; use.doxygenfiles for free-standing docs;@todoincludes assignee name. - Comments: at least ~5% of code, use
//style, plain English describing the next few lines. - Each file preamble contains the
$Maintainer:$marker. - Formatting: use
./.clang-formatin supporting IDEs.
OPENMS_DLLAPIon all non-template exported classes/structs/functions/vars; not on templates; include in friend operator declarations.- Use OpenMS logging macros and
OpenMS::LogStream; avoidstd::cout/errdirectly. - Use
ProgressLoggerin tools for progress reporting. - Avoid
std::endlfor performance; prefer\n. - Prefer
OpenMS::Stringfor numeric formatting and parsing (precision and speed). - Use
Size/SignedSizefor STL.size()values. - Avoid pointers; prefer references.
- Prefer forward declarations in headers; include only base class headers, non-pointer members, and templates.
- Add new tool source (e.g.,
src/topp/<Tool>.cpp) and register insrc/topp/executables.cmake. - Register tool in
src/openms/source/APPLICATIONS/ToolHandler.cppto generate Doxygen help output. - Define parameters in
registerOptionsAndFlags_(); read withgetStringOption_and related helpers. - Document the tool and add to
doc/doxygen/public/TOPP.doxygenwhere applicable. - Add TOPP tests in
src/tests/topp/CMakeLists.txt.
- Autowrap reads
.pxdinsrc/pyOpenMS/pxds/and generatespyopenms/pyopenms.pyx->pyopenms.cpp-> module. - Addons in
src/pyOpenMS/addons/inject Python-only methods (indent only; nocdef class). - Keep
.pxdsignatures in sync with C++ APIs; update or removewrap-ignorewhen wrapping changes. - Always declare default and copy constructors in
.pxd; usecimport, not Pythonimport. - For non-inheriting classes use
cdef cppclass ClassName:with no base. - Autowrap hints:
wrap-ignore,wrap-as,wrap-iter-begin/end,wrap-instances,wrap-attach,wrap-upper-limit,wrap-inherits. - Avoid custom
__init__unless required; it overrides autowrap dispatchers. - Use snake_case for Python-facing names and DataFrame columns.
- Do not add Python-only methods to
.pxd; use addons or_dataframes.pywrappers. - DataFrame pattern:
get_data_dict()in addon returns numpy arrays;get_df()insrc/pyOpenMS/pyopenms/_dataframes.pywraps with pandas. - Type converters: implement in
src/pyOpenMS/converters/special_autowrap_conversionproviders.py, register insrc/pyOpenMS/converters/__init__.py. - Gotchas: autowrap returns Python strings; do not
.decode(). Avoidcdeffor autowrap string returns. Avoidcdeftyped variables for autowrap return values insidedefmethods; use Python type checks. Keep addons minimal; avoid redundant aliases.# wrap-doc:indentation is strict. - Regenerate after addon changes:
rm OpenMS-build/pyOpenMS/.cpp_extension_generated cmake --build OpenMS-build --target pyopenms -j4
- New C++ class: add
.h/.cpp, Doxygen docs, class test,OPENMS_DLLAPI, register in CMake lists. - C++ API change: update
.pxd/addons, pyOpenMS tests, and relevant docs; tag commits withAPIas needed. - New/changed TOPP tool: register in
src/topp/executables.cmakeandToolHandler.cpp, add docs, add TOPP tests and data. - Parameter or I/O change: update tool docs/CTD, tests, and
CHANGELOG; usePARAM/IOcommit tags. - File format change: update
FileHandler::NamesOfTypes[], schemas/validators, and tests.
- Development follows Gitflow; use forks and open PRs against
develop. - Commit format:
[TAG1,TAG2] short summary(<=120 chars, <=80 preferred), blank line, longer description, andFixes #N/Closes #Nwhen applicable. - Commit tags: NOP, DOC, COMMENT, API, INTERNAL, FEATURE, FIX, TEST, FORMAT, PARAM, IO, LOG, GUI, RESOURCE, BUILD.
- PR checklist: update
AUTHORSandCHANGELOG, run/extend tests, update pyOpenMS bindings when needed. - Minimize pushes on open PRs (CI is heavy).
- Run
tools/checker.phpand/orENABLE_STYLE_TESTINGfor local checks.
- Linux: use
lddto inspect shared libs;nm -Cfor symbols;perf/hotspotfor profiling. - Windows: Dependency Walker or
dumpbin /DEPENDENTSanddumpbin /EXPORTS. - Memory checks: AddressSanitizer or valgrind with
tools/valgrind/openms_external.supp.
- Example external CMake project:
share/OpenMS/examples/external_code/. - External test project:
src/tests/external/. - Use the same compiler/generator as OpenMS; set
OPENMS_CONTRIB_LIBSandOpenMS_DIRwhen configuring.
- CI runs in GitHub Actions; CDash collects nightly results.
- Jenkins packaging uses
tools/jenkins/os_compiler_matrix.tsv(edit only if needed). - PR commands/labels:
/reformat, labelNoJenkins, commentrebuild jenkins. - Container images: see
dockerfiles/README.mdand GHCR packages. - macOS code signing/notarization: see
cmake/MacOSX/README.md.
- http://www.openms.org/
- http://www.OpenMS.de
- https://openms.readthedocs.io/en/latest
- https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/index.html
- https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/nightly/html/index.html
- http://www.openms.de/current_doxygen/html/
- https://pyopenms.readthedocs.io/en/latest/index.html
- https://pyopenms.readthedocs.io/en/latest/apidocs/index.html
- https://abibuilder.cs.uni-tuebingen.de/archive/openms/OpenMSInstaller/
- https://abibuilder.cs.uni-tuebingen.de/archive/openms/OpenMSInstaller/nightly/
- http://www.psidev.info/
- https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/developer_tutorial.html
- https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/developer_coding_conventions.html
- https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/developer_cpp_guide.html
- https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/developer_how_to_write_tests.html
- https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/howto_commit_messages.html
- https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/developer_faq.html
- https://github.com/OpenMS/OpenMS
- https://github.com/OpenMS/OpenMS/issues
- https://github.com/OpenMS/OpenMS/wiki#-for-developers
- https://github.com/OpenMS/OpenMS/wiki/Coding-conventions
- https://github.com/OpenMS/OpenMS/wiki/Write-tests
- https://github.com/OpenMS/OpenMS/wiki/pyOpenMS#wrap
- https://pyopenms.readthedocs.io/en/latest/wrap_classes.html
- https://openms.readthedocs.io/en/latest/contribute-to-openms/pull-request-checklist.html
- https://github.com/OpenMS/OpenMS/wiki/Pull-Request-Checklist
- https://github.com/OpenMS/OpenMS/wiki/Preparation-of-a-new-OpenMS-release#release_developer
- http://nvie.com/posts/a-successful-git-branching-model/
- https://help.github.com/articles/fork-a-repo
- https://help.github.com/articles/syncing-a-fork
- https://help.github.com/articles/using-pull-requests
- http://cdash.seqan.de/index.php?project=OpenMS
- https://github.com/OpenMS/OpenMS/tags
- https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/install_linux.html
- https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/install_mac.html
- https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/install_win.html
- https://github.com/OpenMS/THIRDPARTY
- https://pkgs.org/search/?q=openms
- http://manpages.ubuntu.com/manpages/hardy/man1/ctest.1.html
- http://www.cmake.org
- http://cmake.org/
- https://visualstudio.microsoft.com/de/downloads/?q=build+tools
- http://www.7-zip.org/
- https://www.qt.io/download
- https://wiki.qt.io/Building_Qt_6_from_Git
- https://developer.apple.com/xcode/
- https://brew.sh/
- http://www.OpenMS.de/download/
- https://clang.llvm.org/docs/ClangFormat.html
- https://devblogs.microsoft.com/cppblog/clangformat-support-in-visual-studio-2017-15-7-preview-1/
- https://git-scm.com/
- http://www.doxygen.org
- http://www.doxygen.org/index.html
- https://llvm.org/builds/
- https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2471?view=msvc-170
- https://github.com/OpenMS/autowrap/blob/master/docs/README.md
- https://openms.readthedocs.io/en/latest/docs/topp/adding-new-tool-to-topp.html#how-do-I-add-a-new-TOPP-test
- https://perf.wiki.kernel.org/index.php/Main_Page
- https://github.com/KDAB/hotspot
- http://sandsoftwaresound.net/perf/perf-tutorial-hot-spots/
- http://valgrind.org/docs/manual/
- https://github.com/cbielow/wintime
- http://www.dependencywalker.com/