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

Make constant values for use with the default image parameter #24

Closed
bsoyka opened this issue Oct 5, 2019 · 5 comments
Closed

Make constant values for use with the default image parameter #24

bsoyka opened this issue Oct 5, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@bsoyka
Copy link
Owner

bsoyka commented Oct 5, 2019

Take a look at @charanjit-singh's comment here.

There are 8 different constants that need to be added in some way, and you can see them here.

Please comment if you'd like to work on this, and make a pull request to the development branch.

@bsoyka bsoyka added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers hacktoberfest Recommended for https://hacktoberfest.digitalocean.com/ labels Oct 5, 2019
@mfaheemakhtar
Copy link
Contributor

mfaheemakhtar commented Oct 5, 2019

Hey @bsoyka, I can take it.

What do you think about using

DEFAULT_IMAGE = {
  '404': '404',
  'MYSTERY_PERSON': 'mp',
  'IDENTICON': 'identicon',
  'MONSTERID': 'monsterid',
  'WAVATAR': 'wavatar',
  'RETRO': 'retro',
  'ROBOHASH': 'robohash',
  'BLANK': 'blank'
}

Usage

gravify.Gravatar.DEFAULT_IMAGE['RETRO']

instead of

  Type_404 = "404"
  Type_mystreyPerson = "mp"

Usage

gravify.Gravatar.RETRO

@bsoyka
Copy link
Owner Author

bsoyka commented Oct 5, 2019

Hey, @mfaheemakhtar! I like your idea! A couple small changes, let me know your thoughts:

DEFAULT_IMAGES = {
  '404': '404',
  'mystery_person': 'mp',
  'identicon': 'identicon',
  'monsterid': 'monsterid',
  'wavatar': 'wavatar',
  'retro': 'retro',
  'robohash': 'robohash',
  'blank': 'blank'
}

Also, when you make your PR, make sure you add a test or two to make sure it works.

@bsoyka bsoyka removed good first issue Good for newcomers hacktoberfest Recommended for https://hacktoberfest.digitalocean.com/ help wanted Extra attention is needed labels Oct 5, 2019
@mfaheemakhtar
Copy link
Contributor

Hey @bsoyka , how do you run unit tests?

python3 ./tests/test_main.py

@bsoyka
Copy link
Owner Author

bsoyka commented Oct 5, 2019

You can run the tests with this:

python -m unittest tests/test_main.py

@bsoyka
Copy link
Owner Author

bsoyka commented Oct 6, 2019

Closed via #25

@bsoyka bsoyka closed this as completed Oct 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants