Skip to content

Commit

Permalink
Merge pull request #10 from eseiler/infra/use_sharg
Browse files Browse the repository at this point in the history
[INFRA] Use sharg includes
  • Loading branch information
eseiler authored Dec 1, 2021
2 parents dc47946 + f6f5a6e commit c6d164b
Show file tree
Hide file tree
Showing 36 changed files with 59 additions and 57 deletions.
8 changes: 4 additions & 4 deletions include/sharg/all.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

#pragma once

#include <seqan3/argument_parser/argument_parser.hpp>
#include <seqan3/argument_parser/auxiliary.hpp>
#include <seqan3/argument_parser/exceptions.hpp>
#include <seqan3/argument_parser/validators.hpp>
#include <sharg/argument_parser.hpp>
#include <sharg/auxiliary.hpp>
#include <sharg/exceptions.hpp>
#include <sharg/validators.hpp>
14 changes: 7 additions & 7 deletions include/sharg/argument_parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
#include <vector>
#include <regex>

// #include <seqan3/argument_parser/detail/format_ctd.hpp>
#include <seqan3/argument_parser/detail/format_help.hpp>
#include <seqan3/argument_parser/detail/format_html.hpp>
#include <seqan3/argument_parser/detail/format_man.hpp>
#include <seqan3/argument_parser/detail/format_parse.hpp>
#include <seqan3/argument_parser/detail/terminal.hpp>
#include <seqan3/argument_parser/detail/version_check.hpp>
// #include <sharg/detail/format_ctd.hpp>
#include <sharg/detail/format_help.hpp>
#include <sharg/detail/format_html.hpp>
#include <sharg/detail/format_man.hpp>
#include <sharg/detail/format_parse.hpp>
#include <sharg/detail/terminal.hpp>
#include <sharg/detail/version_check.hpp>
#include <seqan3/core/debug_stream/detail/to_string.hpp>
#include <seqan3/core/detail/test_accessor.hpp>

Expand Down
8 changes: 4 additions & 4 deletions include/sharg/detail/format_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
#include <sstream>
#include <string>

#include <seqan3/argument_parser/auxiliary.hpp>
#include <seqan3/argument_parser/detail/concept.hpp>
#include <seqan3/argument_parser/exceptions.hpp>
#include <seqan3/argument_parser/validators.hpp>
#include <sharg/auxiliary.hpp>
#include <sharg/detail/concept.hpp>
#include <sharg/exceptions.hpp>
#include <sharg/validators.hpp>
#include <seqan3/utility/detail/type_name_as_string.hpp>
#include <seqan3/version.hpp>

Expand Down
6 changes: 3 additions & 3 deletions include/sharg/detail/format_help.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#include <cassert>
#include <iostream>

#include <seqan3/argument_parser/detail/format_base.hpp>
#include <seqan3/argument_parser/detail/terminal.hpp>
#include <sharg/detail/format_base.hpp>
#include <sharg/detail/terminal.hpp>
#include <seqan3/core/detail/test_accessor.hpp>

namespace seqan3::detail
Expand Down Expand Up @@ -453,7 +453,7 @@ class format_version : public format_help
* meta information (e.g. long_copyright) on construction of the parser. Thus the meta information is collected
* and only evaluated when calling seqan3::detail::format_version::parse.
*
* \remark For a complete overview, take a look at \ref argument_parser
* \remark For a complete overview, take a look at \ref argument_parser
*/
class format_copyright : public format_help
{
Expand Down
6 changes: 3 additions & 3 deletions include/sharg/detail/format_html.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#include <iostream>

#include <seqan3/argument_parser/detail/format_base.hpp>
#include <seqan3/argument_parser/detail/terminal.hpp>
#include <sharg/detail/format_base.hpp>
#include <sharg/detail/terminal.hpp>
#include <seqan3/version.hpp>

namespace seqan3::detail
Expand All @@ -31,7 +31,7 @@ namespace seqan3::detail
* Thus the calls are stored (parser_set_up_calls and positional_option_calls)
* and only evaluated when calling format_help::parse().
*
* \remark For a complete overview, take a look at \ref argument_parser
* \remark For a complete overview, take a look at \ref argument_parser
*/
class format_html : public format_help_base<format_html>
{
Expand Down
4 changes: 2 additions & 2 deletions include/sharg/detail/format_man.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#include <iostream>

#include <seqan3/argument_parser/detail/format_base.hpp>
#include <seqan3/argument_parser/detail/terminal.hpp>
#include <sharg/detail/format_base.hpp>
#include <sharg/detail/terminal.hpp>
#include <seqan3/version.hpp>

namespace seqan3::detail
Expand Down
2 changes: 1 addition & 1 deletion include/sharg/detail/format_parse.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <string>
#include <vector>

#include <seqan3/argument_parser/detail/format_base.hpp>
#include <sharg/detail/format_base.hpp>
#include <seqan3/utility/char_operations/predicate.hpp>

namespace seqan3::detail
Expand Down
4 changes: 2 additions & 2 deletions include/sharg/detail/version_check.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include <optional>
#include <regex>

#include <seqan3/argument_parser/auxiliary.hpp>
#include <seqan3/argument_parser/detail/terminal.hpp>
#include <sharg/auxiliary.hpp>
#include <sharg/detail/terminal.hpp>
#include <seqan3/io/detail/misc.hpp>
#include <seqan3/io/detail/safe_filesystem_entry.hpp>
#include <seqan3/std/charconv>
Expand Down
2 changes: 1 addition & 1 deletion include/sharg/validators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <regex>
#include <sstream>

#include <seqan3/argument_parser/exceptions.hpp>
#include <sharg/exceptions.hpp>
#include <seqan3/core/debug_stream/detail/to_string.hpp>
#include <seqan3/core/debug_stream/range.hpp>
#include <seqan3/io/detail/misc.hpp>
Expand Down
1 change: 1 addition & 0 deletions test/snippet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ macro (sharg_snippet test_name_prefix snippet snippet_base_path)

add_executable (${target} "${snippet_base_path}/${snippet}")
target_link_libraries (${target} PUBLIC snippet_main sharg::sharg)
target_include_directories (${target} PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../../include)
set_target_properties(${target}
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${snippet_target_path}"
Expand Down
2 changes: 1 addition & 1 deletion test/snippet/argument_parser_1.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/all.hpp>
#include <sharg/all.hpp>
#include <seqan3/core/debug_stream.hpp>

int main(int argc, char ** argv)
Expand Down
2 changes: 1 addition & 1 deletion test/snippet/argument_parser_2.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/all.hpp>
#include <sharg/all.hpp>
#include <seqan3/core/debug_stream.hpp>

int main(int argc, char ** argv)
Expand Down
2 changes: 1 addition & 1 deletion test/snippet/argument_parser_3.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/all.hpp>
#include <sharg/all.hpp>

int main(int argc, char ** argv)
{
Expand Down
2 changes: 1 addition & 1 deletion test/snippet/auxiliary.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/all.hpp>
#include <sharg/all.hpp>

int main(int argc, const char ** argv)
{
Expand Down
2 changes: 1 addition & 1 deletion test/snippet/custom_argument_parsing_enumeration.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <system_error>

#include <seqan3/argument_parser/all.hpp>
#include <sharg/all.hpp>
#include <seqan3/std/ranges>

namespace seqan3::custom
Expand Down
2 changes: 1 addition & 1 deletion test/snippet/custom_enumeration.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/all.hpp>
#include <sharg/all.hpp>

namespace foo
{
Expand Down
2 changes: 1 addition & 1 deletion test/snippet/is_option_set.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/all.hpp>
#include <sharg/all.hpp>
#include <seqan3/core/debug_stream.hpp>

int main(int argc, char ** argv)
Expand Down
2 changes: 1 addition & 1 deletion test/snippet/validators_1.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/all.hpp>
#include <sharg/all.hpp>
#include <seqan3/core/debug_stream.hpp>

int main(int argc, const char ** argv)
Expand Down
2 changes: 1 addition & 1 deletion test/snippet/validators_2.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/all.hpp>
#include <sharg/all.hpp>
#include <seqan3/core/debug_stream.hpp>

int main(int argc, const char ** argv)
Expand Down
2 changes: 1 addition & 1 deletion test/snippet/validators_3.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/all.hpp>
#include <sharg/all.hpp>
#include <seqan3/core/debug_stream.hpp>
#include <seqan3/std/filesystem>

Expand Down
2 changes: 1 addition & 1 deletion test/snippet/validators_4.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/all.hpp>
#include <sharg/all.hpp>
#include <seqan3/core/debug_stream.hpp>

int main(int argc, const char ** argv)
Expand Down
2 changes: 1 addition & 1 deletion test/snippet/validators_chaining.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/all.hpp>
#include <sharg/all.hpp>
#include <seqan3/std/filesystem>

int main(int argc, const char ** argv)
Expand Down
2 changes: 1 addition & 1 deletion test/snippet/validators_input_directory.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/all.hpp>
#include <sharg/all.hpp>
#include <seqan3/core/debug_stream.hpp>
#include <seqan3/std/filesystem>

Expand Down
2 changes: 1 addition & 1 deletion test/snippet/validators_input_file.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/all.hpp>
#include <sharg/all.hpp>
#include <seqan3/core/debug_stream.hpp>
#include <seqan3/std/filesystem>

Expand Down
2 changes: 1 addition & 1 deletion test/snippet/validators_input_file_ext_from_file.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/validators.hpp>
#include <sharg/validators.hpp>
#include <seqan3/core/debug_stream.hpp>
#include <seqan3/io/sequence_file/input.hpp>

Expand Down
2 changes: 1 addition & 1 deletion test/snippet/validators_output_directory.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/all.hpp>
#include <sharg/all.hpp>
#include <seqan3/core/debug_stream.hpp>
#include <seqan3/std/filesystem>

Expand Down
2 changes: 1 addition & 1 deletion test/snippet/validators_output_file.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/all.hpp>
#include <sharg/all.hpp>
#include <seqan3/core/debug_stream.hpp>
#include <seqan3/std/filesystem>

Expand Down
2 changes: 1 addition & 1 deletion test/snippet/validators_output_file_ext_from_file.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <seqan3/argument_parser/validators.hpp>
#include <sharg/validators.hpp>
#include <seqan3/core/debug_stream.hpp>
#include <seqan3/io/sequence_file/output.hpp>

Expand Down
1 change: 1 addition & 0 deletions test/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ macro (sharg_test unit_test_cpp)

add_executable (${target} ${unit_test_cpp})
target_link_libraries (${target} seqan3::test::unit sharg::sharg)
target_include_directories (${target} PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../../include)
add_include_dependencies (${target} "${SHARG_TEST_CYCLIC_DEPENDING_INCLUDES}")
collect_used_test (${target})
if (SHARG_VERBOSE_TESTS)
Expand Down
2 changes: 1 addition & 1 deletion test/unit/argument_parser_design_error_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <gtest/gtest.h>

#include <seqan3/argument_parser/argument_parser.hpp>
#include <sharg/argument_parser.hpp>

TEST(design_error, app_name_validation)
{
Expand Down
4 changes: 2 additions & 2 deletions test/unit/detail/format_help_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

#include <gtest/gtest.h>

#include <seqan3/argument_parser/argument_parser.hpp>
#include <seqan3/argument_parser/detail/format_help.hpp>
#include <sharg/argument_parser.hpp>
#include <sharg/detail/format_help.hpp>

// reused global variables
std::string std_cout;
Expand Down
4 changes: 2 additions & 2 deletions test/unit/detail/format_html_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#include <gtest/gtest.h>

#include <seqan3/argument_parser/argument_parser.hpp>
#include <seqan3/argument_parser/detail/format_html.hpp>
#include <sharg/argument_parser.hpp>
#include <sharg/detail/format_html.hpp>
#include <seqan3/utility/char_operations/predicate.hpp>

TEST(html_format, empty_information)
Expand Down
4 changes: 2 additions & 2 deletions test/unit/detail/format_man_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

#include <gtest/gtest.h>

#include <seqan3/argument_parser/argument_parser.hpp>
#include <seqan3/argument_parser/detail/format_man.hpp>
#include <sharg/argument_parser.hpp>
#include <sharg/detail/format_man.hpp>

// Reused global variables
struct format_man_test : public ::testing::Test
Expand Down
2 changes: 1 addition & 1 deletion test/unit/detail/version_check_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <chrono>
#include <stdlib.h>

#include <seqan3/argument_parser/argument_parser.hpp>
#include <sharg/argument_parser.hpp>
#include <seqan3/test/tmp_filename.hpp>

//------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion test/unit/format_parse_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <gtest/gtest.h>

#include <seqan3/argument_parser/argument_parser.hpp>
#include <sharg/argument_parser.hpp>

TEST(parse_type_test, add_option_short_id)
{
Expand Down
6 changes: 3 additions & 3 deletions test/unit/format_parse_validators_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <fstream>
#include <seqan3/std/ranges>

#include <seqan3/argument_parser/argument_parser.hpp>
#include <sharg/argument_parser.hpp>
#include <seqan3/test/file_access.hpp>
#include <seqan3/test/tmp_filename.hpp>

Expand Down Expand Up @@ -481,7 +481,7 @@ TEST(validator_test, output_directory)
seqan3::test::tmp_filename tmp_child_name{"dir/child_dir"};
std::filesystem::path tmp_child_dir{tmp_child_name.get_path()};
std::filesystem::path tmp_parent_path{tmp_child_dir.parent_path()};

std::filesystem::create_directory(tmp_parent_path);

EXPECT_TRUE(std::filesystem::exists(tmp_parent_path));
Expand Down Expand Up @@ -542,7 +542,7 @@ TEST(validator_test, inputfile_not_regular)
{
seqan3::test::tmp_filename tmp{"my_file.test"};
std::filesystem::path filename = tmp.get_path();
mkfifo(filename.c_str(), 0644);
mkfifo(filename.c_str(), 0644);

EXPECT_THROW(seqan3::input_file_validator{}(filename), seqan3::validation_error);
}
Expand Down

0 comments on commit c6d164b

Please sign in to comment.