Skip to content

Commit

Permalink
MAINT: disable code coverage for now.
Browse files Browse the repository at this point in the history
Strange error.
  • Loading branch information
oddkiva committed Dec 14, 2023
1 parent 0b1c298 commit 8af5680
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
24 changes: 14 additions & 10 deletions cpp/src/DO/Sara/Visualization/Features/Draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using namespace std;


namespace DO { namespace Sara {
namespace DO::Sara {

auto draw(const OERegion& f, const Rgb8& color, float scale,
const Point2f& offset) -> void
Expand All @@ -37,16 +37,18 @@ namespace DO { namespace Sara {
// In slides:
// http://www.cs.unc.edu/~lazebnik/spring11/lec08_blob.pdf
// the blob radius is the scale multiplied sqrt(2).
constexpr auto sqrt_two = static_cast<float>(M_SQRT2);
static constexpr auto sqrt_two = static_cast<float>(M_SQRT2);
const auto a = radii(0) * sqrt_two;
const auto b = radii(1) * sqrt_two;

// Orientation.
const auto ori_degree = atan2(U(1, 0), U(0, 0)) * //
180 / static_cast<float>(M_PI);
const auto& ox = U(0, 0);
const auto& oy = U(1, 0);
static constexpr auto radian_32f = static_cast<float>(180 / M_PI);
const auto ori_degree = std::atan2(oy, ox) * radian_32f;

// Start and end points of orientation line.
const Matrix2f& L = f.affinity().block(0, 0, 2, 2);
const Matrix2f& L = f.affinity().topLeftCorner<2, 2>();
const Vector2f& p1 = z * (f.center() + offset);
const Vector2f& p2 = p1 + z * sqrt_two * L * Vector2f::UnitX();

Expand Down Expand Up @@ -99,16 +101,18 @@ namespace DO { namespace Sara {
// In slides:
// http://www.cs.unc.edu/~lazebnik/spring11/lec08_blob.pdf
// the blob radius is the scale multiplied sqrt(2).
constexpr auto sqrt_two = static_cast<float>(M_SQRT2);
static constexpr auto sqrt_two = static_cast<float>(M_SQRT2);
const auto a = radii(0) * sqrt_two;
const auto b = radii(1) * sqrt_two;

// Orientation.
const auto ori_degree = atan2(U(1, 0), U(0, 0)) * //
180 / static_cast<float>(M_PI);
const auto& ox = U(0, 0);
const auto& oy = U(1, 0);
static constexpr auto radian_32f = static_cast<float>(180 / M_PI);
const auto ori_degree = std::atan2(oy, ox) * radian_32f;

// Start and end points of orientation line.
const Matrix2f& L = f.affinity().block(0, 0, 2, 2);
const Matrix2f& L = f.affinity().topLeftCorner<2, 2>();
const Vector2f& p1 = z * (f.center() + offset);
const Vector2f& p2 = p1 + z * sqrt_two * L * Vector2f::UnitX();

Expand Down Expand Up @@ -142,4 +146,4 @@ namespace DO { namespace Sara {
}
}

}} // namespace DO::Sara
} // namespace DO::Sara
6 changes: 3 additions & 3 deletions python/oddkiva/sara/pybind11/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ add_custom_target(pytest
COMMAND ${CMAKE_COMMAND}
-E env PYTHONPATH=$<TARGET_FILE_DIR:pysara_pybind11>
coverage run -m pytest -s
COMMAND ${CMAKE_COMMAND}
-E env PYTHONPATH=$<TARGET_FILE_DIR:pysara_pybind11>
coverage report
# COMMAND ${CMAKE_COMMAND}
# -E env PYTHONPATH=$<TARGET_FILE_DIR:pysara_pybind11>
# coverage report
WORKING_DIRECTORY ${DO_Sara_DIR}/python
COMMENT "Running Python tests.")
set_target_properties(pytest PROPERTIES FOLDER "Python")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
)


SARA_SOURCE_DIR_PATH = Path('/Users/oddkiva/GitLab/oddkiva/sara')
THIS_FILE = str(__file__)
SARA_SOURCE_DIR_PATH = Path(THIS_FILE[:THIS_FILE.find('sara') + len('sara')])
SARA_DATA_DIR_PATH = SARA_SOURCE_DIR_PATH / 'data'
YOLO_V4_TINY_DIR_PATH = SARA_DATA_DIR_PATH / 'trained_models'

Expand Down
12 changes: 7 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
coverage==4.5.4
pybind11
pytest
coverage

ipython
ipdb
ipdbplugin
nose

numpy
PySide2
scipy
ipython
pybind11
PySide2

0 comments on commit 8af5680

Please sign in to comment.