Skip to content

Commit 4022a49

Browse files
jaelynlitzactions-user
authored andcommitted
Apply pre-commmit fixes
1 parent fd288e6 commit 4022a49

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

interfaces/python/exago_python_tcopflow.cpp

+6-8
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,11 @@ void init_exago_tcopflow(pybind11::module &m) {
4242
ierr = TCOPFLOWSetTolerance(w.tcopf, tol);
4343
ExaGOCheckError(ierr);
4444
})
45-
.def("get_tolerance",
46-
[](TCOPFLOW_wrapper &w) -> double {
47-
PetscErrorCode ierr;
48-
double tol;
49-
ierr = TCOPFLOWGetTolerance(w.tcopf, &tol);
50-
ExaGOCheckError(ierr);
51-
return tol;
45+
.def("get_tolerance", [](TCOPFLOW_wrapper &w) -> double {
46+
PetscErrorCode ierr;
47+
double tol;
48+
ierr = TCOPFLOWGetTolerance(w.tcopf, &tol);
49+
ExaGOCheckError(ierr);
50+
return tol;
5251
});
53-
5452
}

tests/interfaces/python/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ exago_add_test(
5757
"
5858
export PYTHONPATH=${pythonpath}
5959
cd ${PROJECT_SOURCE_DIR}/tests/interfaces/python
60-
${CMD} -m MPI -v ${TEST_FILES}
60+
${CMD} -m MPI -v ${TEST_FILES}
6161
"
6262
DEPENDS
6363
MPI
6464
)
6565

6666
# add --capture=no flag to pytest to see full output, maybe a --full-trace too
67-
# ${CMD} --capture=no -m MPI -v ${TEST_FILES}
67+
# ${CMD} --capture=no -m MPI -v ${TEST_FILES}

tests/interfaces/python/test_5_tcopflow.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
def test_creating_tcopflow():
1818
tcopf = exago.TCOPFLOW()
1919
'''
20+
21+
2022
def run_tcopflow(solver):
2123
tcopf = exago.TCOPFLOW()
2224
path = exago.prefix()
@@ -25,9 +27,9 @@ def run_tcopflow(solver):
2527
tcopf.set_network_data(os.path.join(
2628
path, 'share', 'exago', 'datafiles', 'case9', 'case9mod_gen3_wind.m'))
2729
tcopf.set_solver(solver)
28-
#set_time_step_and_duration
29-
#set_load_profiles
30-
#set_wind_gen_profiles
30+
# set_time_step_and_duration
31+
# set_load_profiles
32+
# set_wind_gen_profiles
3133

3234
tcopf.setup()
3335
tcopf.solve()
@@ -40,8 +42,8 @@ def run_tcopflow(solver):
4042
n = tcopf.get_num_iterations()
4143
assert isinstance(n, int)
4244

43-
#get_solution
44-
#print_solution
45+
# get_solution
46+
# print_solution
4547

4648
oname = os.path.join(tempfile.gettempdir(), "tcopflow_test_solution.csv")
4749
tcopf.save_solution(0, exago.OutputFormat.CSV, oname)
@@ -68,7 +70,6 @@ def test_tcopflow_1():
6870
run_tcopflow('IPOPT')
6971

7072

71-
7273
''' example
7374
@pytest.mark.nocomm
7475
@pytest.mark.MPI

0 commit comments

Comments
 (0)