-
Notifications
You must be signed in to change notification settings - Fork 196
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
Code for moving data files #578
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks for the new PR! It looks like this includes a lot of changes unrelated to the data files though; did you mean to include them in this PR?
app/admin_resources.py
Outdated
@@ -20,7 +20,7 @@ | |||
import mimetypes | |||
|
|||
import config | |||
import const | |||
from utils import const |
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.
Did you intend to include all these changes related to const.py in this PR (the title says it's just for moving the data files)?
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.
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.
The diffs I'm looking at are your current PR compared to our master branch, and there are a lot of changes unrelated to the data files. In particular, in many places it changes imports of const
from import const
to from utils import const
(along with changes to sys.path and the django.po files).
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.
Did you intend to include all these changes related to const.py in this PR (the title says it's just for moving the data files)?
@nworden It was actually the part of handlers which were supposed to be moved from app directory. Now since handlers are kept under app/ we can keep const.py here itself.
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.
The diffs I'm looking at are your current PR compared to our master branch, and there are a lot of changes unrelated to the data files. In particular, in many places it changes imports of
const
fromimport const
tofrom utils import const
(along with changes to sys.path and the django.po files).
@nworden I have reverted that change to import const
@@ -695,6 +695,10 @@ msgstr "Vergelyk hierdie rekords" | |||
msgid "Contact information" | |||
msgstr "Kontakinligting" | |||
|
|||
#, python-format | |||
msgid "Content purported to be compressed with %s but failed to decompress." |
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'm not sure exactly why, but it looks like messages from files in app/vendors
is getting added to the django.po files. That's not necessary -- we only need our own messages in here.
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.
Even am trying to understand how messages are getting added to django.po files. Neither any of regular expression in my code is appending so. What exactly is the ask here ?
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.
Please undo the changes you made to these files, we can't pull them into master. If you committed just the django.po file changes by themselves in a particular commit, it might be as easy as running git revert <that commit>
.
@@ -19,6 +19,9 @@ | |||
See here for usage examples: | |||
https://github.com/google/personfinder/wiki/DeveloperFaq | |||
""" | |||
import sys |
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'm not sure exactly what this is for (?), but it shouldn't be necessary to modify sys.path
within our code.
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.
@nworden sys.path was present since directory named handlers and utils were having config.py in it and it was supposed to be imported.
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 think you can remove the sys
import as well.
tests/test_importer.py
Outdated
@@ -16,13 +16,18 @@ | |||
|
|||
import datetime | |||
import unittest | |||
# added by Ashutosh Narayan |
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.
Although there are names from the earlier Person Finder authors still in the codebase, in recent years we haven't been adding individual names to the source code (I think I've only seen gimite's name once or twice, and I've never added my name anywhere); the commit log is the record of who did what. If you'd like us to start an AUTHORS
file, feel free to open an issue for that and assign it to me (Google might have rules about how exactly I do it, I'd have to check), but I don't think it's practical to have names inline in the source considering how many people have contributed different pieces over time.
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.
@nworden I have removed name from source code ; it was added as part of testing to remove later if there are any failures due to lines appended by me. Yes, we can have an AUTHORS file
app/admin_resources.py
Outdated
@@ -20,7 +20,7 @@ | |||
import mimetypes | |||
|
|||
import config | |||
import const | |||
from utils import const |
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.
The diffs I'm looking at are your current PR compared to our master branch, and there are a lot of changes unrelated to the data files. In particular, in many places it changes imports of const
from import const
to from utils import const
(along with changes to sys.path and the django.po files).
app/config.py
Outdated
|
||
from google.appengine.ext import db | ||
import UserDict, model, random, simplejson | ||
import logging | ||
import datetime | ||
import utils | ||
#import utils |
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 think you may have accidentally commented this import out.
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.
@nworden have uncommented it in this commit
@@ -19,6 +19,9 @@ | |||
See here for usage examples: | |||
https://github.com/google/personfinder/wiki/DeveloperFaq | |||
""" | |||
import sys |
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 think you can remove the sys
import as well.
@@ -695,6 +695,10 @@ msgstr "Vergelyk hierdie rekords" | |||
msgid "Contact information" | |||
msgstr "Kontakinligting" | |||
|
|||
#, python-format | |||
msgid "Content purported to be compressed with %s but failed to decompress." |
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.
Please undo the changes you made to these files, we can't pull them into master. If you committed just the django.po file changes by themselves in a particular commit, it might be as easy as running git revert <that commit>
.
tests/test_utils.py
Outdated
@@ -16,6 +16,10 @@ | |||
|
|||
"""Tests for utils.""" | |||
|
|||
import sys |
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.
As with the other file, please remove any changes to the path.
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.
@nworden have removed sys path in this commit
Code for moving data files from app/ directory