Skip to content

feat: add current date to route database filename#49

Open
Warchlik wants to merge 1 commit into
aardjon:mainfrom
Warchlik:main
Open

feat: add current date to route database filename#49
Warchlik wants to merge 1 commit into
aardjon:mainfrom
Warchlik:main

Conversation

@Warchlik
Copy link
Copy Markdown

Changes the route database filename from routedb_v1.sqlite
to routedb_v1-YYYY-MM-DD.sqlite by appending the current date.

Changes:

  • Updated _DB_FILE_NAME in db_v1/__init__.py to include current date
  • Updated integration tests to use the new filename format
  • Extracted filename constant DB_FILE_NAME to module level in tests

Related issue:
Closes #48

Verify:
pytest test/integration/test_filter_dbcreation.py -v

@aardjon
Copy link
Copy Markdown
Owner

aardjon commented Apr 24, 2026

Hi @Warchlik, thank you a lot for your contribution, solving my latest issue 🙇 I'd be happy to include it, but I first have some minor remarks and review comments I'd kindly ask you to have a look at.

Thank you very much!

"""

_DB_FILE_NAME: Final = "routedb_v1.sqlite"
_DB_FILE_NAME: Final = f"routedb_v1-{datetime.datetime.now(tz=datetime.UTC).date().today().strftime('%Y-%m-%d')}.sqlite"
Copy link
Copy Markdown
Owner

@aardjon aardjon Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the .date().today() part needed for? Doesn't datetime.datetime.now(tz=datetime.UTC).strftime('%Y-%m-%d') just do it, or am I missing something?

If it is not necessary, please remove it (also at the similar line in the test file).

Comment thread scraper/.python-version
Copy link
Copy Markdown
Owner

@aardjon aardjon May 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the .python_version file should be added to the repository, so please remove it from your change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scraper: Add current date to the name of created route database files

2 participants