You'll need to set up your environment before starting development and to see if the all dependancies runs well
-
You'll need:
- Google account working
- working Project on Google APIs
- just go to Google APIs page & create a new project
-
now go to credentials tab
-
click on create credentials
-
choose
OAuth client ID
-
choose
Web application
-
edit your app name
-
edit
Authorized JavaScript origins
andAuthorized redirect URIs
imp: here you'll add multible entries of links that your brouser/server would request data from,
- every entry should be a valid domain
- multiple protocoles (ex: http/https) should have multiple entries
do not miss to add any link even httpsL//localhost this step, otherwise your app won't have access to the api from that domain
other providers like Facebook, Github, twitter and paypal are listed to be added as a third party authintication methods, but only providers that works properly are those which will be documented,
you may find some inside the code you work with incomplete or not working due to changes with there APIs that are not tracked, you could neglect or delete them but I really would be happy to see your contribution even for a small bit of code
testing have several ways that could be done with & several purposes
- app functionality
- first and best method of testing any app is to try it by hands, this makes you find whats wrong as a client not providor
- you could use any browser of any kind to test your app on any device
- API
- using postman is a good choice to see how your response would be like
- I recommend adding API test page to your site to have an idea of what is the easiest way your API could be accessed
- Code
- your editor linter normally helps you to track errors before debugging
- vscode could help experienced users for test and debuging
- for code style we use PEP.8 see code style below
- no encrypted data, any data neded to be secret just read it from a file
within untracked dir in pushing like
APP_DIR/secrets
- deploying
-
some functionalities could work on dev environment with differnt behavoir on the server,
although this is rare, you should keep it in mind especially when you work with any thing related by certificates (ssl) or sys permissions
-
As mentioned before code goes on PEP.8 style guide
you could use pycodestyle ( installed within requirments ) or the it's old name pep8 to test your code and find what is not matching this style guide
you'll notice that testing with both tools is better
if you found yourself stacked with too much errors from either of both tools you could use a tool like autopep8
usage will be like this
# only use autopep8 with python files recrusively
du -a $directory |awk '{print $2}' |grep '\.py$' \
|xargs -n1 autopep8 --in-place --aggressive --aggressive
# test after ending
pycodestyle .
autopep8 is a great tool but not a perfect on that you'll need to test after it for some small guide lines missed or some code which sectioned with an eye non comforting way
any code that meets this style guide, tested and functionally worked with no issues wil be accepted as a pull request unless:
-
being uncomplete step of a functionality
inconplete steps for next step functionality will be accepet if correct
-
an already stable well precoded functionality exists