Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Change the name of the altorg test files for Windows, to fix issue #341
Browse files Browse the repository at this point in the history
  • Loading branch information
cdmatters committed Nov 1, 2022
1 parent 4559ba9 commit 6f8e584
Show file tree
Hide file tree
Showing 20 changed files with 17 additions and 14 deletions.
5 changes: 4 additions & 1 deletion nle/dataset/populate_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import datetime
import glob
import os
import re
import time
from functools import partial

Expand Down Expand Up @@ -37,10 +38,12 @@
]

FIVE_MINS = 5 * 60

ALT_TIMEFMT = re.compile(r"(.*\.\d\d)_(\d\d)_(\d\d.*)")

def altorg_filename_to_timestamp(filename):
ts = filename.split("/")[-1][:-11]
# We accept time format HH_MM_SS or HH:MM:SS, but convert for ISO format.
ts = ALT_TIMEFMT.sub(r"\1:\2:\3", ts)
try:
ts = datetime.datetime.fromisoformat(ts)
except AttributeError:
Expand Down
2 changes: 1 addition & 1 deletion nle/tests/altorg/blacklist.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
aanderson/2019-08-03.18:44:49.ttyrec.bz2
aanderson/2019-08-03.18_44_49.ttyrec.bz2
24 changes: 12 additions & 12 deletions nle/tests/altorg/db.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[
["FlamingKetchup/2019-07-25.22:03:29.ttyrec.bz2", 0, 22, 1649954022.624912, 8, 8, "3.6.3", 1254, 2, 4, 5, 0, 43, 1, 20190726, 20190725, 5, "Kni", "Hum", "Mal", "Law", "Player0", "killed by an elf zombie while frozen by a monster's gaze", "0xf88", 2662, "0x0", 7243, 1564092226, 1564100187, "Mal", "Law", "0x4", 8, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["FlamingKetchup/2019-07-25.22:08:03.ttyrec.bz2", 1, 22, 1649954022.628631, 8, 8, "3.6.3", 1254, 2, 4, 5, 0, 43, 1, 20190726, 20190725, 5, "Kni", "Hum", "Mal", "Law", "Player0", "killed by an elf zombie while frozen by a monster's gaze", "0xf88", 2662, "0x0", 7243, 1564092226, 1564100187, "Mal", "Law", "0x4", 8, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["FlamingKetchup/2019-07-25.22:16:19.ttyrec.bz2", 2, 22, 1649954022.63341, 8, 8, "3.6.3", 1254, 2, 4, 5, 0, 43, 1, 20190726, 20190725, 5, "Kni", "Hum", "Mal", "Law", "Player0", "killed by an elf zombie while frozen by a monster's gaze", "0xf88", 2662, "0x0", 7243, 1564092226, 1564100187, "Mal", "Law", "0x4", 8, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["aanderson/2019-07-21.15:10:27.ttyrec.bz2", 0, 22, 1649954022.644775, 9, 9, "3.6.3", 533, 0, 4, 4, 0, 20, 1, 20190729, 20190721, 5, "Wiz", "Elf", "Mal", "Cha", "Player1", "killed by a wererat", "0xf88", 882, "0x0", 7995, 1563721850, 1564435194, "Mal", "Cha", "0x4", 9, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["aanderson/2019-07-29.21:13:49.ttyrec.bz2", 1, 22, 1649954022.649788, 9, 9, "3.6.3", 533, 0, 4, 4, 0, 20, 1, 20190729, 20190721, 5, "Wiz", "Elf", "Mal", "Cha", "Player1", "killed by a wererat", "0xf88", 882, "0x0", 7995, 1563721850, 1564435194, "Mal", "Cha", "0x4", 9, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["FlamingKetchup/2019-07-30.16:06:23.ttyrec.bz2", 0, 22, 1649954022.640018, 10, 10, "3.6.3", 746, 2, 5, 6, 0, 43, 1, 20190730, 20190730, 5, "Val", "Hum", "Fem", "Law", "Player0", "killed by a gnome", "0xfc0", 1875, "0x0", 1577, 1564502799, 1564504378, "Fem", "Law", "0x4", 10, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["aanderson/2019-08-03.16:56:46.ttyrec.bz2", 0, 22, 1649954022.655513, 11, 11, "3.6.3", 464, 0, 3, 5, 0, 25, 1, 20190803, 20190803, 5, "Wiz", "Gno", "Mal", "Neu", "Player1", "killed by a homunculus while sleeping", "0xf88", 1140, "0x0", 764, 1564851435, 1564852201, "Mal", "Neu", "0x4", 11, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["aanderson/2019-08-04.09:40:55.ttyrec.bz2", 0, 22, 1649954022.673842, 13, 13, "3.6.3", 1035, 2, 6, 6, 0, 46, 1, 20190804, 20190804, 5, "Wiz", "Gno", "Mal", "Neu", "Player1", "killed by a rothe", "0xe88", 1003, "0x0", 8447, 1564911667, 1564935411, "Mal", "Neu", "0x4", 13, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["aanderson/2019-08-04.15:56:08.ttyrec.bz2", 1, 22, 1649954022.678656, 13, 13, "3.6.3", 1035, 2, 6, 6, 0, 46, 1, 20190804, 20190804, 5, "Wiz", "Gno", "Mal", "Neu", "Player1", "killed by a rothe", "0xe88", 1003, "0x0", 8447, 1564911667, 1564935411, "Mal", "Neu", "0x4", 13, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["aartist/2008-09-08.06:45:16.ttyrec.bz2", 0, 22, 1649954022.692907, 14, 14, "3.4.3", 537, 0, 2, 2, 31, 31, 0, 20080909, 20080908, 5, "Val", "Hum", "Fem", "Neu", "Player2", "quit", "0xfce", 1346, "0x0", 1149, 1220856342, 1220926886, "Fem", "Neu", "-1", 14, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["aartist/2008-09-09.02:02:56.ttyrec.bz2", 1, 22, 1649954022.699497, 14, 14, "3.4.3", 537, 0, 2, 2, 31, 31, 0, 20080909, 20080908, 5, "Val", "Hum", "Fem", "Neu", "Player2", "quit", "0xfce", 1346, "0x0", 1149, 1220856342, 1220926886, "Fem", "Neu", "-1", 14, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["aartist/2008-09-09.02:21:28.ttyrec.bz2", 0, 22, 1649954022.704478, 15, 15, "3.4.3", 134, 0, 2, 2, 14, 15, 1, 20080909, 20080909, 5, "Sam", "Hum", "Mal", "Law", "Player2", "choked on a gunyoki", "0xf88", 251, "0x0", 373, 1220926913, 1220927313, "Mal", "Law", "-1", 15, "altorgtest", "altorgtest", "/path/to/altorg", 1]
["FlamingKetchup/2019-07-25.22_03_29.ttyrec.bz2", 0, 22, 1649954022.624912, 8, 8, "3.6.3", 1254, 2, 4, 5, 0, 43, 1, 20190726, 20190725, 5, "Kni", "Hum", "Mal", "Law", "Player0", "killed by an elf zombie while frozen by a monster's gaze", "0xf88", 2662, "0x0", 7243, 1564092226, 1564100187, "Mal", "Law", "0x4", 8, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["FlamingKetchup/2019-07-25.22_08_03.ttyrec.bz2", 1, 22, 1649954022.628631, 8, 8, "3.6.3", 1254, 2, 4, 5, 0, 43, 1, 20190726, 20190725, 5, "Kni", "Hum", "Mal", "Law", "Player0", "killed by an elf zombie while frozen by a monster's gaze", "0xf88", 2662, "0x0", 7243, 1564092226, 1564100187, "Mal", "Law", "0x4", 8, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["FlamingKetchup/2019-07-25.22_16_19.ttyrec.bz2", 2, 22, 1649954022.63341, 8, 8, "3.6.3", 1254, 2, 4, 5, 0, 43, 1, 20190726, 20190725, 5, "Kni", "Hum", "Mal", "Law", "Player0", "killed by an elf zombie while frozen by a monster's gaze", "0xf88", 2662, "0x0", 7243, 1564092226, 1564100187, "Mal", "Law", "0x4", 8, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["aanderson/2019-07-21.15_10_27.ttyrec.bz2", 0, 22, 1649954022.644775, 9, 9, "3.6.3", 533, 0, 4, 4, 0, 20, 1, 20190729, 20190721, 5, "Wiz", "Elf", "Mal", "Cha", "Player1", "killed by a wererat", "0xf88", 882, "0x0", 7995, 1563721850, 1564435194, "Mal", "Cha", "0x4", 9, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["aanderson/2019-07-29.21_13_49.ttyrec.bz2", 1, 22, 1649954022.649788, 9, 9, "3.6.3", 533, 0, 4, 4, 0, 20, 1, 20190729, 20190721, 5, "Wiz", "Elf", "Mal", "Cha", "Player1", "killed by a wererat", "0xf88", 882, "0x0", 7995, 1563721850, 1564435194, "Mal", "Cha", "0x4", 9, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["FlamingKetchup/2019-07-30.16_06_23.ttyrec.bz2", 0, 22, 1649954022.640018, 10, 10, "3.6.3", 746, 2, 5, 6, 0, 43, 1, 20190730, 20190730, 5, "Val", "Hum", "Fem", "Law", "Player0", "killed by a gnome", "0xfc0", 1875, "0x0", 1577, 1564502799, 1564504378, "Fem", "Law", "0x4", 10, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["aanderson/2019-08-03.16_56_46.ttyrec.bz2", 0, 22, 1649954022.655513, 11, 11, "3.6.3", 464, 0, 3, 5, 0, 25, 1, 20190803, 20190803, 5, "Wiz", "Gno", "Mal", "Neu", "Player1", "killed by a homunculus while sleeping", "0xf88", 1140, "0x0", 764, 1564851435, 1564852201, "Mal", "Neu", "0x4", 11, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["aanderson/2019-08-04.09_40_55.ttyrec.bz2", 0, 22, 1649954022.673842, 13, 13, "3.6.3", 1035, 2, 6, 6, 0, 46, 1, 20190804, 20190804, 5, "Wiz", "Gno", "Mal", "Neu", "Player1", "killed by a rothe", "0xe88", 1003, "0x0", 8447, 1564911667, 1564935411, "Mal", "Neu", "0x4", 13, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["aanderson/2019-08-04.15_56_08.ttyrec.bz2", 1, 22, 1649954022.678656, 13, 13, "3.6.3", 1035, 2, 6, 6, 0, 46, 1, 20190804, 20190804, 5, "Wiz", "Gno", "Mal", "Neu", "Player1", "killed by a rothe", "0xe88", 1003, "0x0", 8447, 1564911667, 1564935411, "Mal", "Neu", "0x4", 13, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["aartist/2008-09-08.06_45_16.ttyrec.bz2", 0, 22, 1649954022.692907, 14, 14, "3.4.3", 537, 0, 2, 2, 31, 31, 0, 20080909, 20080908, 5, "Val", "Hum", "Fem", "Neu", "Player2", "quit", "0xfce", 1346, "0x0", 1149, 1220856342, 1220926886, "Fem", "Neu", "-1", 14, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["aartist/2008-09-09.02_02_56.ttyrec.bz2", 1, 22, 1649954022.699497, 14, 14, "3.4.3", 537, 0, 2, 2, 31, 31, 0, 20080909, 20080908, 5, "Val", "Hum", "Fem", "Neu", "Player2", "quit", "0xfce", 1346, "0x0", 1149, 1220856342, 1220926886, "Fem", "Neu", "-1", 14, "altorgtest", "altorgtest", "/path/to/altorg", 1],
["aartist/2008-09-09.02_21_28.ttyrec.bz2", 0, 22, 1649954022.704478, 15, 15, "3.4.3", 134, 0, 2, 2, 14, 15, 1, 20080909, 20080909, 5, "Sam", "Hum", "Mal", "Law", "Player2", "choked on a gunyoki", "0xf88", 251, "0x0", 373, 1220926913, 1220927313, "Mal", "Law", "-1", 15, "altorgtest", "altorgtest", "/path/to/altorg", 1]
]

0 comments on commit 6f8e584

Please sign in to comment.