Skip to content

Commit

Permalink
Deprecate applications with replacements or with little use
Browse files Browse the repository at this point in the history
  • Loading branch information
berland committed Feb 14, 2025
1 parent 350e917 commit 5042bd8
Show file tree
Hide file tree
Showing 16 changed files with 44 additions and 15 deletions.
1 change: 1 addition & 0 deletions applications/resdata/convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ void file_convert(const char *src_file, const char *target_file,
}

int main(int argc, char **argv) {
fprintf(stderr, "** Warning: convert.x is deprecated. Use resfo instead\n");
if (argc == 1) {
fprintf(stderr,
"Usage: convert.x <filename1> <filename2> <filename3> ...\n");
Expand Down
2 changes: 2 additions & 0 deletions applications/resdata/grdecl_grid.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include <resdata/rd_kw_magic.hpp>

int main(int argc, char **argv) {
fprintf(stderr, "** Warning: grdecl_grid is deprecated. Use OPM to parse "
"the deck instead\n");
FILE *stream = util_fopen(argv[1], "r");
rd_kw_type *gridhead_kw =
rd_kw_fscanf_alloc_grdecl_dynamic__(stream, SPECGRID_KW, false, RD_INT);
Expand Down
2 changes: 2 additions & 0 deletions applications/resdata/grdecl_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include <resdata/rd_kw.hpp>

int main(int argc, char **argv) {
fprintf(stderr,
"** Warning: grdecl_test.x is deprecated. Use res2df instead\n");
FILE *stream = util_fopen(argv[1], "r");
{
while (true) {
Expand Down
1 change: 1 addition & 0 deletions applications/resdata/grid_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <resdata/rd_grid.hpp>

int main(int argc, char **argv) {
fprintf(stderr, "** Warning: grid_dump.x is deprecated\n");
if (argc < 2) {
fprintf(stderr, "%s: filename \n", argv[0]);
exit(1);
Expand Down
1 change: 1 addition & 0 deletions applications/resdata/grid_dump_ascii.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <resdata/rd_grid.hpp>

int main(int argc, char **argv) {
fprintf(stderr, "** Warning: grid_dump_ascii.x is deprecated\n");
if (argc < 2) {
fprintf(stderr, "%s: filename \n", argv[0]);
exit(1);
Expand Down
3 changes: 3 additions & 0 deletions applications/resdata/grid_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
#include <resdata/rd_grid.hpp>

int main(int argc, char **argv) {
fprintf(
stderr,
"** Warning: grid_info is deprecated. Use res2df and pandas instead\n");
if (argc < 2) {
fprintf(stderr, "%s: filename \n", argv[0]);
exit(1);
Expand Down
1 change: 1 addition & 0 deletions applications/resdata/kw_extract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/

int main(int argc, char **argv) {
fprintf(stderr, "** Warning: kw_extract is deprecated\n");
if (argc < 4) {
fprintf(stderr, "%s src_file target_file kw1 kw2 kw3 \n", argv[0]);
exit(0);
Expand Down
2 changes: 2 additions & 0 deletions applications/resdata/kw_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ void kw_list(const char *filename) {
}

int main(int argc, char **argv) {
fprintf(stderr,
"** Warning: kw_list.x deprecated. Use resfo in python instead\n");
int i;
for (i = 1; i < argc; i++)
kw_list(argv[i]);
Expand Down
1 change: 1 addition & 0 deletions applications/resdata/load_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ void test_case(const char *base, bool load_all) {
}

int main(int argc, char **argv) {
fprintf(stderr, "** Warning: load_test.x is deprecated\n");
bool load_all = true;
int i;
for (i = 1; i < argc; i++)
Expand Down
2 changes: 2 additions & 0 deletions applications/resdata/make_grid.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include <resdata/rd_grid.hpp>

int main(int argc, char **argv) {
fprintf(stderr,
"** Warning: make_grid is deprecated. Use python instead\n");
if (argc != 5) {
fprintf(stderr, "%s: basename nx ny nz \n", argv[0]);
exit(1);
Expand Down
2 changes: 2 additions & 0 deletions applications/resdata/select_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <resdata/rd_kw.hpp>

int main(int argc, char **argv) {
fprintf(stderr,
"** Warning: select_test.x is deprecated. Use res2df instead\n");
const char *path = argv[1];
const char *base = argv[2];
stringlist_type *names = stringlist_alloc_new();
Expand Down
3 changes: 3 additions & 0 deletions applications/resdata/view_summary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ static void build_key_list(const rd_sum_type *rd_sum, stringlist_type *key_list,
}

int main(int argc, char **argv) {
fprintf(
stderr,
"** Warning: summary.x is deprecated. Use res2df summary instead\n");
install_SIGNALS();
{
bool report_only = false;
Expand Down
2 changes: 2 additions & 0 deletions applications/well/ri_well_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ void usage() {
}

int main(int argc, char **argv) {
fprintf(stderr,
"** Warning: ri_well_test is deprecated and will be removed\n");
if (argc < 3)
usage();
else {
Expand Down
3 changes: 3 additions & 0 deletions applications/well/segment_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
#include <resdata/well/well_segment_collection.hpp>

int main(int argc, char **argv) {
fprintf(
stderr,
"** Warning: segment_info is deprecated. Use res2df rft instead.\n");
const char *Xfile = argv[1];
rd_file_type *rst_file = rd_file_open(Xfile, 0);
rd_rsthead_type *rst_head = rd_rsthead_alloc(
Expand Down
3 changes: 3 additions & 0 deletions applications/well/well_CF_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@
for more details.
*/

#include <stdio.h>
#include <resdata/rd_grid.hpp>
#include <resdata/well/well_state.hpp>
#include <resdata/well/well_info.hpp>

int main(int argc, char **argv) {
fprintf(stderr,
"** Warning: CF_dump is deprecated. Use res2df rft instead\n");
char *grid_file = argv[1];
char *rst_file = argv[2];
rd_grid_type *grid = rd_grid_alloc(grid_file);
Expand Down
30 changes: 15 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@ def utility_wrappers():
return [
name + " = resdata.bin:main"
for name in (
"CF_dump",
"convert.x",
"CF_dump", # deprecated
"convert.x", # deprecated
"rd_pack.x",
"rd_unpack.x",
"grdecl_grid",
"grdecl_test.x",
"grid_dump.x",
"grid_dump_ascii.x",
"grid_info.x",
"kw_extract",
"kw_list.x",
"load_test.x",
"make_grid",
"ri_well_test",
"segment_info",
"select_test.x",
"summary.x",
"grdecl_grid", # deprecated
"grdecl_test.x", # deprecated
"grid_dump.x", # deprecated
"grid_dump_ascii.x", # deprecated
"grid_info.x", # deprecated
"kw_extract", # deprecated
"kw_list.x", # deprecated
"load_test.x", # deprecated
"make_grid", # deprecated
"ri_well_test", # deprecated
"segment_info", # deprecated
"select_test.x", # deprecated
"summary.x", # deprecated
)
]

Expand Down

0 comments on commit 5042bd8

Please sign in to comment.