Skip to content

Commit

Permalink
make cities data available outside Data class
Browse files Browse the repository at this point in the history
  • Loading branch information
hoishing committed Dec 10, 2024
1 parent 59ac988 commit 1102918
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion natal/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,12 @@ def composite_aspects_pairs(self, data2: Self) -> BodyPairs:
"""
return itertools.product(self.aspectables, data2.aspectables)

@staticmethod
def get_cities() -> pd.DataFrame:
"""make cities data available outside Data class"""
return pd.read_csv(data_folder / "cities.csv.gz")

@cached_property
def cities(self) -> pd.DataFrame:
return pd.read_csv(data_folder / "cities.csv.gz")
"""cached cities data"""
return Data.get_cities()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "natal"
version = "0.8.7"
version = "0.8.8"
description = "create Natal Chart with ease"
license = "MIT"
repository = "https://github.com/hoishing/natal"
Expand Down

0 comments on commit 1102918

Please sign in to comment.