Skip to content

Commit

Permalink
fix: fix typos in demo matrix and adjust taxonomic tab hint to reflec…
Browse files Browse the repository at this point in the history
…t reality (#18953)
  • Loading branch information
thmsobrmlr authored Nov 29, 2023
1 parent 8288972 commit 45f3caa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ export function TaxonomicFilter({
<>
You can easily navigate between tabs with your keyboard.{' '}
<div>
Use <b>tab</b> or <b>right arrow</b> to move to the next tab.
Use <b>tab</b> to move to the next tab.
</div>
<div>
Use <b>shift + tab</b> or <b>left arrow</b> to move to the previous tab.
Use <b>shift + tab</b> to move to the previous tab.
</div>
</>
}
Expand Down
4 changes: 2 additions & 2 deletions posthog/demo/matrix/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(self, *, index: int, matrix: "Matrix") -> None:
self.datetime_provider = matrix.datetime_provider
self.finance_provider = matrix.finance_provider
self.file_provider = matrix.file_provider
self.start = matrix.start + (matrix.end - matrix.start) * self.initation_distribution()
self.start = matrix.start + (matrix.end - matrix.start) * self.initiation_distribution()
self.now = matrix.now
self.end = matrix.end
self.radius = int(self.MIN_RADIUS + self.radius_distribution() * (self.MAX_RADIUS - self.MIN_RADIUS))
Expand Down Expand Up @@ -94,7 +94,7 @@ def radius_distribution(self) -> float:
"""Return a value between 0 and 1 signifying where the radius should fall between MIN_RADIUS and MAX_RADIUS."""
return self.random.uniform(self.MIN_RADIUS, self.MAX_RADIUS)

def initation_distribution(self) -> float:
def initiation_distribution(self) -> float:
"""Return a value between 0 and 1 determining how far into the overall simulation should this cluster be initiated."""
return self.random.random()

Expand Down
8 changes: 4 additions & 4 deletions posthog/demo/products/hedgebox/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@


@dataclass
class HedgdboxCompany:
class HedgeboxCompany:
name: str
industry: Industry

Expand All @@ -42,7 +42,7 @@ class HedgeboxCluster(Cluster):
MAX_RADIUS: int = 6

# Properties
company: Optional[HedgdboxCompany] # None means the cluster is a social circle instead of a company
company: Optional[HedgeboxCompany] # None means the cluster is a social circle instead of a company

# Internal state - plain
_business_account: Optional[HedgeboxAccount] # In social circle clusters the person-level account is used
Expand All @@ -51,7 +51,7 @@ def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
is_company = self.random.random() < COMPANY_CLUSTERS_PROPORTION
if is_company:
self.company = HedgdboxCompany(
self.company = HedgeboxCompany(
name=self.finance_provider.company(),
industry=self.properties_provider.industry(),
)
Expand All @@ -65,7 +65,7 @@ def __str__(self) -> str:
def radius_distribution(self) -> float:
return self.random.betavariate(1.5, 5)

def initation_distribution(self) -> float:
def initiation_distribution(self) -> float:
return self.random.betavariate(1.8, 1)


Expand Down
2 changes: 1 addition & 1 deletion posthog/demo/test/test_matrix_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class DummyCluster(Cluster):
MIN_RADIUS = 0
MAX_RADIUS = 0

def initation_distribution(self) -> float:
def initiation_distribution(self) -> float:
return 0 # Start every cluster at the same time


Expand Down

0 comments on commit 45f3caa

Please sign in to comment.