From f9ed0463f7670ecbe7972daf03e66d3ce9a1fac2 Mon Sep 17 00:00:00 2001 From: Konstantin Fickel Date: Sun, 15 Feb 2026 17:30:44 +0100 Subject: [PATCH] refactor: rename test/ to tests/ --- .../localize/test_extract_datetime.py | 2 +- .../test_repository_configuration_merge.py | 0 {test => tests}/parse/test_parse.py | 3 +-- {test => tests}/query/test_find.py | 4 ++-- {test => tests}/test_localize.py | 24 +++++++++---------- .../timesheet/test_extract_timesheets.py | 0 6 files changed, 16 insertions(+), 17 deletions(-) rename {test => tests}/localize/test_extract_datetime.py (99%) rename {test => tests}/localize/test_repository_configuration_merge.py (100%) rename {test => tests}/parse/test_parse.py (99%) rename {test => tests}/query/test_find.py (96%) rename {test => tests}/test_localize.py (93%) rename {test => tests}/timesheet/test_extract_timesheets.py (100%) diff --git a/test/localize/test_extract_datetime.py b/tests/localize/test_extract_datetime.py similarity index 99% rename from test/localize/test_extract_datetime.py rename to tests/localize/test_extract_datetime.py index 279f194..8758ebf 100644 --- a/test/localize/test_extract_datetime.py +++ b/tests/localize/test_extract_datetime.py @@ -1,6 +1,6 @@ from datetime import date, datetime, time -from streamer.localize.extract_datetime import ( +from streamd.localize.extract_datetime import ( extract_date_from_marker, extract_datetime_from_file_name, extract_datetime_from_marker, diff --git a/test/localize/test_repository_configuration_merge.py b/tests/localize/test_repository_configuration_merge.py similarity index 100% rename from test/localize/test_repository_configuration_merge.py rename to tests/localize/test_repository_configuration_merge.py diff --git a/test/parse/test_parse.py b/tests/parse/test_parse.py similarity index 99% rename from test/parse/test_parse.py rename to tests/parse/test_parse.py index b692120..ef72e5a 100644 --- a/test/parse/test_parse.py +++ b/tests/parse/test_parse.py @@ -1,6 +1,5 @@ from faker import Faker - -from streamer.parse import Shard, StreamFile, parse_markdown_file +from streamd.parse import Shard, StreamFile, parse_markdown_file fake = Faker() diff --git a/test/query/test_find.py b/tests/query/test_find.py similarity index 96% rename from test/query/test_find.py rename to tests/query/test_find.py index 725d3b2..6b72e87 100644 --- a/test/query/test_find.py +++ b/tests/query/test_find.py @@ -2,8 +2,8 @@ from __future__ import annotations from datetime import datetime -from streamer.localize import LocalizedShard -from streamer.query.find import find_shard, find_shard_by_position +from streamd.localize import LocalizedShard +from streamd.query.find import find_shard, find_shard_by_position def generate_localized_shard( diff --git a/test/test_localize.py b/tests/test_localize.py similarity index 93% rename from test/test_localize.py rename to tests/test_localize.py index 678604b..ecdb864 100644 --- a/test/test_localize.py +++ b/tests/test_localize.py @@ -1,14 +1,14 @@ from datetime import datetime -from streamer.localize.localize import localize_stream_file -from streamer.localize.localized_shard import LocalizedShard -from streamer.localize.repository_configuration import ( +from streamd.localize.localize import localize_stream_file +from streamd.localize.localized_shard import LocalizedShard +from streamd.localize.repository_configuration import ( Dimension, Marker, MarkerPlacement, RepositoryConfiguration, ) -from streamer.parse.shard import Shard, StreamFile +from streamd.parse.shard import Shard, StreamFile repository_configuration = RepositoryConfiguration( dimensions={ @@ -29,8 +29,8 @@ repository_configuration = RepositoryConfiguration( ), }, markers={ - "Streamer": Marker( - display_name="Streamer", + "Streamd": Marker( + display_name="Streamd", placements=[ MarkerPlacement(dimension="project"), MarkerPlacement( @@ -49,39 +49,39 @@ class TestLocalize: def test_project_simple_stream_file(self): stream_file = StreamFile( file_name="20250622-121000 Test File.md", - shard=Shard(start_line=1, end_line=1, markers=["Streamer"]), + shard=Shard(start_line=1, end_line=1, markers=["Streamd"]), ) assert localize_stream_file( stream_file, repository_configuration ) == LocalizedShard( moment=datetime(2025, 6, 22, 12, 10, 0, 0), - markers=["Streamer"], + markers=["Streamd"], tags=[], start_line=1, end_line=1, children=[], - location={"project": "Streamer", "file": stream_file.file_name}, + location={"project": "Streamd", "file": stream_file.file_name}, ) def test_timesheet_use_case(self): stream_file = StreamFile( file_name="20260131-210000 Test File.md", - shard=Shard(start_line=1, end_line=1, markers=["Timesheet", "Streamer"]), + shard=Shard(start_line=1, end_line=1, markers=["Timesheet", "Streamd"]), ) assert localize_stream_file( stream_file, repository_configuration ) == LocalizedShard( moment=datetime(2026, 1, 31, 21, 0, 0, 0), - markers=["Timesheet", "Streamer"], + markers=["Timesheet", "Streamd"], tags=[], start_line=1, end_line=1, children=[], location={ "file": stream_file.file_name, - "project": "Streamer", + "project": "Streamd", "timesheet": "coding", }, ) diff --git a/test/timesheet/test_extract_timesheets.py b/tests/timesheet/test_extract_timesheets.py similarity index 100% rename from test/timesheet/test_extract_timesheets.py rename to tests/timesheet/test_extract_timesheets.py