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

Code for moving data files #578

Open
wants to merge 45 commits into
base: master
Choose a base branch
from

Conversation

ashutoshnarayan
Copy link

Code for moving data files from app/ directory

@ashutoshnarayan
Copy link
Author

@gimite I have raised the PR #578 please review

Copy link
Contributor

@nworden nworden left a 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?

@@ -20,7 +20,7 @@
import mimetypes

import config
import const
from utils import const
Copy link
Contributor

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)?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nworden Initially in PR #450 ( closed ) I moved files related to handlers and utils into respective directories. This PR actually reverts them to app/ and copies only contents related to app/data/

Copy link
Contributor

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).

Copy link
Author

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.

Copy link
Author

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).

@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."
Copy link
Contributor

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.

Copy link
Author

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 ?

Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Author

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.

Copy link
Contributor

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.

@@ -16,13 +16,18 @@

import datetime
import unittest
# added by Ashutosh Narayan
Copy link
Contributor

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.

Copy link
Author

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

@@ -20,7 +20,7 @@
import mimetypes

import config
import const
from utils import const
Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Author

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
Copy link
Contributor

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."
Copy link
Contributor

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>.

@@ -16,6 +16,10 @@

"""Tests for utils."""

import sys
Copy link
Contributor

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.

Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants