Code forensics  0.1
Generate historical information about code changes
PyForensics Class Reference

#include <python_interop.hpp>

Public Member Functions

void set_logger (SPtr< Logger > log)
 
void log_info (CR< Str > text)
 write text as a info-level log record More...
 
void log_warning (CR< Str > text)
 write text as a warning-level log record More...
 
void log_trace (CR< Str > text)
 write text as a trace-level log record More...
 
void log_debug (CR< Str > text)
 write text as a debug-level log record More...
 
void log_error (CR< Str > text)
 write text as a error-level log record More...
 
void log_fatal (CR< Str > text)
 write text as a fatal-level log record More...
 
void set_post_analyze (py::object post)
 set post-analyze hook implementation More...
 
void set_path_predicate (py::object predicate)
 set path filtering predicate for the allow_path predicate More...
 
void set_commit_period_mapping (py::object mapping)
 set period mapping callback for the get_commit_period More...
 
void set_sample_period_mapping (py::object mapping)
 set period mapping callback for the get_sample_period More...
 
void set_sample_predicate (py::object predicate)
 set sample predicate callback for the allow_sample_at_date predicate More...
 
bool allow_path (CR< Str > path) const
 Check whether provided path should be processed for the 'blame' information. More...
 
int get_commit_period (CR< PTime > date) const
 Get period number from the specified commit date. More...
 
int get_sample_period (CR< PTime > date) const
 Get period number from the specified commit date. More...
 
bool allow_sample_at_date (CR< PTime > date, CR< Str > author, CR< Str > id) const
 Check whether commit by. More...
 
void run_post_analyze () const
 

Private Attributes

py::object path_predicate
 
py::object commit_period_mapping
 
py::object sample_period_mapping
 
py::object sample_predicate
 
py::object post_analyze
 
SPtr< Loggerlogger
 

Member Function Documentation

◆ allow_path()

bool PyForensics::allow_path ( CR< Str >  path) const
inline

Check whether provided path should be processed for the 'blame' information.

◆ allow_sample_at_date()

bool PyForensics::allow_sample_at_date ( CR< PTime date,
CR< Str >  author,
CR< Str >  id 
) const
inline

Check whether commit by.

  • author at a
  • date should be sampled for the blame info

◆ get_commit_period()

int PyForensics::get_commit_period ( CR< PTime date) const
inline

Get period number from the specified commit date.

◆ get_sample_period()

int PyForensics::get_sample_period ( CR< PTime date) const
inline

Get period number from the specified commit date.

◆ log_debug()

void PyForensics::log_debug ( CR< Str >  text)
inline

write text as a debug-level log record

◆ log_error()

void PyForensics::log_error ( CR< Str >  text)
inline

write text as a error-level log record

◆ log_fatal()

void PyForensics::log_fatal ( CR< Str >  text)
inline

write text as a fatal-level log record

◆ log_info()

void PyForensics::log_info ( CR< Str >  text)
inline

write text as a info-level log record

◆ log_trace()

void PyForensics::log_trace ( CR< Str >  text)
inline

write text as a trace-level log record

◆ log_warning()

void PyForensics::log_warning ( CR< Str >  text)
inline

write text as a warning-level log record

◆ run_post_analyze()

void PyForensics::run_post_analyze ( ) const
inline

◆ set_commit_period_mapping()

void PyForensics::set_commit_period_mapping ( py::object  mapping)
inline

set period mapping callback for the get_commit_period

◆ set_logger()

void PyForensics::set_logger ( SPtr< Logger log)
inline

◆ set_path_predicate()

void PyForensics::set_path_predicate ( py::object  predicate)
inline

set path filtering predicate for the allow_path predicate

◆ set_post_analyze()

void PyForensics::set_post_analyze ( py::object  post)
inline

set post-analyze hook implementation

◆ set_sample_period_mapping()

void PyForensics::set_sample_period_mapping ( py::object  mapping)
inline

set period mapping callback for the get_sample_period

◆ set_sample_predicate()

void PyForensics::set_sample_predicate ( py::object  predicate)
inline

set sample predicate callback for the allow_sample_at_date predicate

Member Data Documentation

◆ commit_period_mapping

py::object PyForensics::commit_period_mapping
private

◆ logger

SPtr<Logger> PyForensics::logger
private

◆ path_predicate

py::object PyForensics::path_predicate
private

◆ post_analyze

py::object PyForensics::post_analyze
private

◆ sample_period_mapping

py::object PyForensics::sample_period_mapping
private

◆ sample_predicate

py::object PyForensics::sample_predicate
private

The documentation for this class was generated from the following file: