Skip to content

Commit 425bc02

Browse files
committed
remove upgrade parser. Update documentation
1 parent ad70755 commit 425bc02

7 files changed

Lines changed: 5 additions & 29 deletions

File tree

c/tskit/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ tsk_strerror_internal(int err)
168168
break;
169169
case TSK_ERR_FILE_VERSION_TOO_OLD:
170170
ret = "tskit file version too old. Please upgrade using the "
171-
"'tskit upgrade' command. (TSK_ERR_FILE_VERSION_TOO_OLD)";
171+
"'tskit upgrade' command from tskit version<0.6.2. (TSK_ERR_FILE_VERSION_TOO_OLD)";
172172
break;
173173
case TSK_ERR_FILE_VERSION_TOO_NEW:
174174
ret = "tskit file version is too new for this instance. "

c/tskit/core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ A file could not be read because it is in the wrong format
283283
/**
284284
The file is in tskit format, but the version is too old for the
285285
library to read. The file should be upgraded to the latest version
286-
using the ``tskit upgrade`` command line utility.
286+
using the ``tskit upgrade`` command line utility from tskit version<0.6.2.
287287
*/
288288
#define TSK_ERR_FILE_VERSION_TOO_OLD -101
289289
/**

docs/file-formats.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ stored as well as the top-level metadata.
4242
### Legacy Versions
4343

4444
Tree sequence files written by older versions of tskit are not readable by
45-
newer versions of tskit. For major releases of tskit, `tskit upgrade`
45+
newer versions of tskit. For tskit releases<0.6.2, `tskit upgrade`
4646
will convert older tree sequence files to the latest version.
4747

4848

python/_tskitmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ handle_library_error(int err)
223223
const char *not_kas_format_msg
224224
= "File not in kastore format. Either the file is corrupt or it is not a "
225225
"tskit tree sequence file. It may be a legacy HDF file upgradable with "
226-
"`tskit upgrade` or a compressed tree sequence file that can be decompressed "
226+
"`tskit upgrade` from tskit version<0.6.2 or a compressed tree sequence file that can be decompressed "
227227
"with `tszip`.";
228228
const char *ibd_pairs_not_stored_msg
229229
= "Sample pairs are not stored by default "

python/tests/test_cli.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -310,16 +310,6 @@ def test_vcf_allow_position_zero(self, flags, expected):
310310
assert args.tree_sequence == tree_sequence
311311
assert args.allow_position_zero == expected
312312

313-
def test_upgrade_default_values(self):
314-
parser = cli.get_tskit_parser()
315-
cmd = "upgrade"
316-
source = "in.trees"
317-
destination = "out.trees"
318-
args = parser.parse_args([cmd, source, destination])
319-
assert args.source == source
320-
assert args.destination == destination
321-
assert not args.remove_duplicate_positions
322-
323313
def test_info_default_values(self):
324314
parser = cli.get_tskit_parser()
325315
cmd = "info"

python/tskit/cli.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -170,20 +170,6 @@ def get_tskit_parser():
170170
)
171171
parser.set_defaults(runner=run_trees)
172172

173-
parser = subparsers.add_parser(
174-
"upgrade", help="Upgrade legacy tree sequence files."
175-
)
176-
parser.add_argument(
177-
"source", help="The source tskit tree sequence file in legacy format"
178-
)
179-
parser.add_argument("destination", help="The filename of the upgraded copy.")
180-
parser.add_argument(
181-
"--remove-duplicate-positions",
182-
"-d",
183-
action="store_true",
184-
default=False,
185-
help="Remove any duplicated mutation positions in the source file. ",
186-
)
187173
# suppress fasta visibility until we have a reference sequence
188174
# See https://github.com/tskit-dev/tskit/issues/1888
189175
# parser = subparsers.add_parser(

python/tskit/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ def raise_known_file_format_errors(open_file, existing_exception):
867867
"The specified file appears to be in HDF5 format. This file "
868868
"may have been generated by msprime < 0.6.0 (June 2018) which "
869869
"can no longer be read directly. Please convert to the new "
870-
"kastore format using the ``tskit upgrade`` command from tskit version 0.6.2"
870+
"kastore format using the ``tskit upgrade`` command from tskit version<0.6.2"
871871
) from existing_exception
872872
if header[:2] == b"\x50\x4b":
873873
raise tskit.FileFormatError(

0 commit comments

Comments
 (0)