Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(person): add short bio #1696

Merged
merged 4 commits into from
Dec 31, 2022
Merged

feat(person): add short bio #1696

merged 4 commits into from
Dec 31, 2022

Conversation

matthewmayer
Copy link
Contributor

I was working on some fake user profiles recently using Faker, and one thing I felt was missing which is pretty common on social sites is a user bio.
Had a go at adding some patterns for making bios in this draft PR, using a combination of common bio phrases, nouns and emoji
Not fully tested yet

Here's 100 outputs from faker.person.bio()

gamer, veteran
dreamer, business owner
diary supporter, designer
fava supporter, developer 🔙
clank lover
dealing advocate
uncertainty devotee  😋
zoot-suit lover
ego lover, friend 🐀
animal junkie, environmentalist
damage advocate  🚘
person, founder, creator 🏜️
artist, grad
circumference advocate, author 🟣
baby devotee  👇🏼
spiral junkie  ✉️
model
bonfire devotee
justification advocate, friend
significance enthusiast, philosopher
foodie, coach
scientist, traveler
miss enthusiast, student
philosopher, patriot
vol devotee, designer 🧦
purity devotee, dreamer
patriot, philosopher, patriot
lounge fan
leader
mouser fan, gamer
friend
overexertion fan
skill advocate
patrimony devotee, dreamer
manifestation advocate, coach
pudding lover  🧑🏽‍🎓
product junkie, patriot
designer
gamer, founder, entrepreneur 😴
economics junkie, leader 👎🏿
atmosphere advocate, developer 📐
numismatist junkie
patriot, business owner
engineer, foodie, leader 🍚
veteran, nerd
bulldozer fan, gamer
founder, traveler
exaggeration advocate  🙇🏾‍♀️
reluctance advocate
plate supporter, coach 🇰🇬
leader
dory lover, artist
traveler
mezzanine enthusiast  🐵
disk supporter  🤞🏾
inventor, leader, entrepreneur
doc advocate, artist
traveler, engineer, film lover 🧑🏽‍💻
bribery devotee, geek
lyrics enthusiast, nerd 🌆
nerd, geek
pat devotee, geek
artist
tolerant supporter, entrepreneur
going fan  ⛪
maker lover, author
gamer
nerd
sushi fan
estimate fan  🇲🇭
educator, veteran, author
contrail supporter, streamer 😬
starboard junkie  👩‍❤️‍👨
driving supporter  🇱🇺
veteran, environmentalist
nickname fan, foodie ♠️
timber advocate, scientist
editing junkie
geek, leader
coach
SUV enthusiast, scientist
implementation advocate
environmentalist, artist, philosopher 😢
bugle enthusiast, coach
blogger
leader, educator, person 🐾
complaint fan
friend, veteran
government devotee, creator
cornerstone enthusiast
student, patriot, engineer
vaulting lover, dreamer ✊🏽
typeface junkie, engineer
film lover, traveler, developer 🈵
dependency enthusiast  😜
scientist, educator, traveler
variety junkie
earplug enthusiast, foodie 👆🏻
anise enthusiast, singer 👨🏻‍🤝‍👨🏽
fulfillment advocate  🚄

@ST-DDT ST-DDT added c: feature Request for new feature p: 1-normal Nothing urgent s: needs decision Needs team/maintainer decision m: person Something is referring to the person module labels Dec 27, 2022
@import-brain
Copy link
Member

I really like this feature, we should accept it

@codecov
Copy link

codecov bot commented Dec 29, 2022

Codecov Report

Merging #1696 (9572c0f) into next (351f8f0) will decrease coverage by 0.00%.
The diff coverage is 97.61%.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1696      +/-   ##
==========================================
- Coverage   99.64%   99.64%   -0.01%     
==========================================
  Files        2242     2245       +3     
  Lines      240185   240269      +84     
  Branches     1068     1069       +1     
==========================================
+ Hits       239325   239407      +82     
- Misses        839      841       +2     
  Partials       21       21              
Impacted Files Coverage Δ
src/definitions/person.ts 0.00% <0.00%> (ø)
src/locales/en/person/bio_part.ts 100.00% <100.00%> (ø)
src/locales/en/person/bio_patterns.ts 100.00% <100.00%> (ø)
src/locales/en/person/bio_supporter.ts 100.00% <100.00%> (ø)
src/locales/en/person/index.ts 100.00% <100.00%> (ø)
src/modules/person/index.ts 99.72% <100.00%> (+0.01%) ⬆️

@matthewmayer matthewmayer marked this pull request as ready for review December 29, 2022 01:21
@matthewmayer matthewmayer requested a review from a team as a code owner December 29, 2022 01:21
Copy link
Member

@Shinigami92 Shinigami92 left a comment

Choose a reason for hiding this comment

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

I don't have strong opinion with this feature 🤔 🤷

I can assume that later there could also be a long version because bios I know are written in multiple lines
This can be extended with options: { format: 'short' | 'long' = 'short' } or anything like that

@ST-DDT
Copy link
Member

ST-DDT commented Dec 29, 2022

  1. I'm not sure about the bio supporter and bio parts.
    IMO that is just a job title and we could use our job name generation for that.

  2. Also we should probably use a custom separator. Or are bios always like this?
    - vs ,

  3. Maybe instead of using a complex pattern we could just repeat it (multiple) and join them together.

@matthewmayer
Copy link
Contributor Author

  1. I'm not sure about the bio supporter and bio parts.
    IMO that is just a job title and we could use our job name generation for that.
  2. Also we should probably use a custom separator. Or are bios always like this?
    - vs ,
  3. Maybe instead of using a complex pattern we could just repeat it (multiple) and join them together.
  1. My feeling is that social bios are more informal. faker.person.jobTitle() gives you something like "Principal Research Producer" which you might display on your LinkedIn, but if you're faking something like Twitter or TikTok, people tend to not put formal job titles, but fuzzier things and more personal things "Dreamer, Influencer, Parent, FOO Lover" etc.

2/3 I tried to keep the implementation as simple as possible, which means the patterns are a bit more complex (though IMHO still fairly readable). An alternative would be to do more work in code and less in patterns, but i felt that might make future localization harder.

@ST-DDT ST-DDT enabled auto-merge (squash) December 31, 2022 17:36
@ST-DDT ST-DDT added s: accepted Accepted feature / Confirmed bug and removed s: needs decision Needs team/maintainer decision labels Dec 31, 2022
@ST-DDT ST-DDT merged commit 2a2e054 into faker-js:next Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: feature Request for new feature m: person Something is referring to the person module p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants