Skip to content

Localization - #31

Merged
joshuaRiefman merged 18 commits into
mainfrom
localization
Jun 6, 2026
Merged

Localization#31
joshuaRiefman merged 18 commits into
mainfrom
localization

Conversation

@joshuaRiefman

Copy link
Copy Markdown
Contributor

FEAT: Standardized Localization of Signal Names, Timezone Shifts, and Track Coordinates

  • Linter Check Succeeded
  • All Tests Succeeded
  • Module Documentation
  • Method/Class/Function Documentation
  • Documentation Correctly Builds
  • Sufficent Test Code Coverage
  • Pull Request Completed

What's New

  • Added TemporalLocalization, LanguageLocalization, and SpatialLocalization objects to help in reducing guesswork when querying and working with data.
  • TemporalLocalization automatically handles any timezone shift errors from querying from InfluxDB. LanguageLocalization handles the names of signals changing over time and standardizes them to a CanonicalName. SpatialLocalization keeps track of list of coordinates to use for any position-based analysis.

Deprecated/Removed

poetry has been completed removed and replaced with uv.

Dependencies

poetry has been completed removed.

Notes

  • DBClient has been renamed back to InfluxDBClient.
  • InfluxDBClient now accepts a timeout parameter which controls the timeout in seconds for a query.
  • All localization objects are controlled by a *_localization.toml file in the localization/ module folder.
  • Tests relying on solcast have been marked with a solcast tag. Similarly, tests relying on access to the Tailnet have had a skip_ci mark. This allows for skipping of the tests in certain conditions where the API they test cannot be accessed.

@codecov

codecov Bot commented Mar 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.42424% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
data_tools/localization/versioned_table.py 91.42% 5 Missing and 1 partial ⚠️
data_tools/localization/language_localization.py 94.44% 2 Missing ⚠️
data_tools/localization/temporal_localization.py 66.66% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

# Conflicts:
#	.github/workflows/run_tests.yaml
#	pyproject.toml
#	tests/test_solcast_query.py
#	uv.lock
@joshuaRiefman
joshuaRiefman requested review from MarwanStar and jonahjlee and removed request for MarwanStar April 11, 2026 21:24
MarwanStar

This comment was marked as low quality.

from .spatial_localization import SpatialLocalization
from .versioned_table import VersionedTable
from .localization import Localization
import pathlib

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I appreciate the imports neatly ordered by line length

Comment thread data_tools/localization/versioned_table.py
Comment thread data_tools/localization/versioned_table.py Outdated
Comment thread data_tools/localization/versioned_table.py Outdated
import pathlib


class Localization(ABC):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It would be nice to have a brief docstring describing the purpose of the class. Same goes for the other new classes.

@joshuaRiefman
joshuaRiefman merged commit 46ab022 into main Jun 6, 2026
3 checks passed
@joshuaRiefman
joshuaRiefman deleted the localization branch June 6, 2026 16:46
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.

3 participants