-
Notifications
You must be signed in to change notification settings - Fork 3
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
fixed up user_profile.py #6
Conversation
.vscode/settings.json
Outdated
"python.linting.pylintEnabled": false, | ||
"python.linting.flake8Enabled": true, | ||
"python.linting.pylamaEnabled": false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add settings.json to .gitignore
I'm using something called black for linting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
black is one way of doing it, we can also look into some other options like pylint. We should figure out which linting tool will be the best for our needs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im using black right now but lmk if you find anything better
app/config.py
Outdated
DIRECTOR_CREDENTIALS = { | ||
"email": "", | ||
"password": "" | ||
} | ||
|
||
|
||
# uri should contain auth and default database(database name) | ||
DB_URI = "" | ||
DB_URI = "mongodb://127.0.0.1:27017/hackrd" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can make a .gitignore for this page so we don't expose any credentials.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should implement a config.example.py
like LCS, so that each developer stores their own copy of the config.py
file locally, and the repo only maintains a template file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove config.py so that github doesn't track it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup let's remove this file, you already added in config.example.py
so we're good to go!
app/config.py
Outdated
DIRECTOR_CREDENTIALS = { | ||
"email": "", | ||
"password": "" | ||
} | ||
|
||
|
||
# uri should contain auth and default database(database name) | ||
DB_URI = "" | ||
DB_URI = "mongodb://127.0.0.1:27017/hackrd" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should implement a config.example.py
like LCS, so that each developer stores their own copy of the config.py
file locally, and the repo only maintains a template file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall great work! I touched upon a few small things, but this is a great step for user_profile.py
. You can go ahead and start working on some of the other files as well, and add those changes to this PR and we can merge it all in together.
app/config.py
Outdated
DIRECTOR_CREDENTIALS = { | ||
"email": "", | ||
"password": "" | ||
} | ||
|
||
|
||
# uri should contain auth and default database(database name) | ||
DB_URI = "" | ||
DB_URI = "mongodb://127.0.0.1:27017/hackrd" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove config.py so that github doesn't track it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only thing left is to remove config.py
, everything else looks good to me.
app/config.py
Outdated
DIRECTOR_CREDENTIALS = { | ||
"email": "", | ||
"password": "" | ||
} | ||
|
||
|
||
# uri should contain auth and default database(database name) | ||
DB_URI = "" | ||
DB_URI = "mongodb://127.0.0.1:27017/hackrd" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup let's remove this file, you already added in config.example.py
so we're good to go!
team_size = len(coll("teams").find_one({"_id": team_name})['members']) | ||
team_name = coll("teams").find_one({"members": {"$all": [email]}}, {"_id"})[ | ||
"_id" | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
black has some weird formatting lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(you don't actually need to do anything here, just a comment)
Let me know if this is what you want for user_profile.py