Comments (5)
You can run the tests with this:
python -m unittest tests/test_main.py
from gravify.
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
from gravify.
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.
from gravify.
Hey @bsoyka , how do you run unit tests?
python3 ./tests/test_main.py
from gravify.
Closed via #25
from gravify.
Related Issues (14)
- Make a basic README file HOT 4
- Remove the ? in the URL when there are no optional parameters HOT 3
- Using Kwargs instead of Args in init function
- Email address isn't cleaned per Gravatars requirements HOT 3
- Add unit tests
- Colors of logo don't match HOT 4
- Add support for a default image parameter HOT 4
- Add support for a size parameter HOT 1
- Add support for a force default parameter HOT 2
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- Add support for a max rating parameter HOT 6
- Add property to retrieve hash only HOT 6
- Check types and values when creating Gravatar instances HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gravify.