Skip to content

Commit 3dbca3e

Browse files
committed
Update theme name from 'market' to 'retail'
1 parent d75624d commit 3dbca3e

6 files changed

Lines changed: 25 additions & 25 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ print(random_pseudonym_ua) # Example: "Цікавий Слон"
5757

5858
# Use different themes
5959
business_pseudonym = pseudonym("JohnDoe", language="en", theme="business")
60-
market_pseudonym = pseudonym("JohnDoe", language="ua", theme="market")
60+
retail_pseudonym = pseudonym("JohnDoe", language="ua", theme="retail")
6161
```
6262

6363
### From Command Line
@@ -67,7 +67,7 @@ Run the script directly:
6767
python -m pseudomatic
6868
```
6969

70-
This will generate example pseudonyms in English and Ukrainian using the 'market' theme.
70+
This will generate example pseudonyms in English and Ukrainian using the 'retail' theme.
7171

7272
## Project Structure
7373

pseudomatic/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
"en": (names.EN_ADJECTIVES_BUSINESS, names.EN_NOUNS_BUSINESS, names.EN_GENDER_BUSINESS),
1313
"ua": (names.UA_ADJECTIVES_BUSINESS, names.UA_NOUNS_BUSINESS, names.UA_GENDER_BUSINESS)
1414
},
15-
'market': {
16-
"en": (names.EN_ADJECTIVES_MARKET, names.EN_NOUNS_MARKET, names.EN_GENDER_MARKET),
17-
"ua": (names.UA_ADJECTIVES_MARKET, names.UA_NOUNS_MARKET, names.UA_GENDER_MARKET)
15+
'retail': {
16+
"en": (names.EN_ADJECTIVES_RETAIL, names.EN_NOUNS_RETAIL, names.EN_GENDER_RETAIL),
17+
"ua": (names.UA_ADJECTIVES_RETAIL, names.UA_NOUNS_RETAIL, names.UA_GENDER_RETAIL)
1818
}
1919
}
2020

@@ -26,7 +26,7 @@ def pseudonym(seed: str = None, language: str = "en", theme: str = 'default') ->
2626
Args:
2727
seed (str, optional): The input seed string. If None or empty, a random seed will be generated.
2828
language (str): The language code ("en" for English, "ua" for Ukrainian).
29-
theme (str): The theme for the pseudonym ("default", "business", or "market").
29+
theme (str): The theme for the pseudonym ("default", "business", or "retail").
3030
3131
Returns:
3232
str: A pseudonym in the format "Adjective Noun".

pseudomatic/__main__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33

44

55
def main():
6-
print("Testing 'market' theme in English:")
6+
print("Testing 'retail' theme in English:")
77
for i in range(20):
8-
print(pseudonym(f"test-{i}", 'en', 'market'))
8+
print(pseudonym(f"test-{i}", 'en', 'retail'))
99

10-
print("\nTesting 'market' theme in Ukrainian:")
10+
print("\nTesting 'retail' theme in Ukrainian:")
1111
for i in range(20):
12-
print(pseudonym(f"test-{i}", 'ua', 'market'))
12+
print(pseudonym(f"test-{i}", 'ua', 'retail'))
1313

1414
if __name__ == "__main__":
15-
main()
15+
main()

pseudomatic/names.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,22 +90,22 @@
9090
"M"
9191
]
9292

93-
# Market lists
94-
EN_ADJECTIVES_MARKET = {'M': [
93+
# Retail lists
94+
EN_ADJECTIVES_RETAIL = {'M': [
9595
"Affordable", "Attractive", "Bargain", "Branded", "Convenient", "Discounted", "Exclusive", "Fresh", "Handcrafted",
9696
"Limited", "Luxury", "Organic", "Popular", "Premium", "Promotional", "Quality", "Seasonal", "Trendy", "Unique",
9797
"Valuable", "Vintage", "Wholesale", "Retail", "Fashionable", "Bestselling"
9898
]}
9999

100-
EN_NOUNS_MARKET = [
100+
EN_NOUNS_RETAIL = [
101101
"Boutique", "Buyer", "Cashier", "Consumer", "Customer", "Discount", "Display", "Mall", "Marketplace", "Merchant",
102102
"Outlet", "Product", "Promotion", "Purchase", "Retailer", "Sale", "Seller", "Shelf", "Shop", "Shopper",
103103
"Store", "Supermarket", "Vendor", "Warehouse", "Brand"
104104
]
105105

106-
EN_GENDER_MARKET = ['M'] * len(EN_NOUNS_MARKET)
106+
EN_GENDER_RETAIL = ['M'] * len(EN_NOUNS_RETAIL)
107107

108-
UA_ADJECTIVES_MARKET = {
108+
UA_ADJECTIVES_RETAIL = {
109109
'M': [
110110
"Доступний", "Привабливий", "Вигідний", "Брендовий", "Зручний", "Знижений", "Ексклюзивний", "Свіжий",
111111
"Рукотворний",
@@ -127,13 +127,13 @@
127127
]
128128
}
129129

130-
UA_NOUNS_MARKET = [
130+
UA_NOUNS_RETAIL = [
131131
"Бутік", "Покупець", "Касир", "Споживач", "Клієнт", "Знижка", "Вітрина", "Торговий центр", "Ринок", "Торговець",
132132
"Аутлет", "Товар", "Акція", "Покупка", "Роздрібник", "Розпродаж", "Продавець", "Полиця", "Магазин", "Шопер",
133133
"Крамниця", "Супермаркет", "Постачальник", "Склад", "Бренд"
134134
]
135135

136-
UA_GENDER_MARKET = [
136+
UA_GENDER_RETAIL = [
137137
"M", "M", "M", "M", "M", "F", "F", "M", "M", "M",
138138
"M", "M", "F", "F", "M", "M", "M", "F", "M", "M",
139139
"F", "M", "M", "M", "M"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "pseudomatic"
7-
version = "0.1.2"
7+
version = "0.1.3"
88
description = "A tool for generating deterministic pseudonyms based on a seed string and selected language"
99
readme = "README.md"
1010
requires-python = ">=3.10"

tests/test_pseudomatic.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ def test_theme_support(self):
3939
seed = "test-seed"
4040
default_result = pseudonym(seed, theme="default")
4141
business_result = pseudonym(seed, theme="business")
42-
market_result = pseudonym(seed, theme="market")
42+
retail_result = pseudonym(seed, theme="retail")
4343

4444
# Test that different themes produce different results
4545
self.assertNotEqual(default_result, business_result)
46-
self.assertNotEqual(default_result, market_result)
47-
self.assertNotEqual(business_result, market_result)
46+
self.assertNotEqual(default_result, retail_result)
47+
self.assertNotEqual(business_result, retail_result)
4848

4949
def test_invalid_language(self):
5050
# Test that an invalid language raises a ValueError
@@ -76,10 +76,10 @@ def test_random_pseudonyms_are_different(self):
7676
# Test with different themes
7777
default_result = pseudonym(theme="default")
7878
business_result = pseudonym(theme="business")
79-
market_result = pseudonym(theme="market")
79+
retail_result = pseudonym(theme="retail")
8080
self.assertNotEqual(default_result, business_result)
81-
self.assertNotEqual(default_result, market_result)
82-
self.assertNotEqual(business_result, market_result)
81+
self.assertNotEqual(default_result, retail_result)
82+
self.assertNotEqual(business_result, retail_result)
8383

8484
if __name__ == "__main__":
8585
unittest.main()

0 commit comments

Comments
 (0)