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

(Partially) Fix #2100: add cache slugs. #2208

Merged
merged 34 commits into from
Jul 23, 2016
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
126df37
Added cache slugs for images and modified all references to the images.
gvishal Jul 2, 2016
8125aa9
Added interpolation service to get static image url, modified non-pag…
gvishal Jul 3, 2016
e0f0ff3
Modified /script tags
gvishal Jul 3, 2016
7e5a68f
Added cache slugs for i18n
gvishal Jul 3, 2016
5be7fdd
Fixed failing test and added i18n/prod to git ignore.
gvishal Jul 5, 2016
d9e18a4
Cache slugs new approach POC
gvishal Jul 9, 2016
35bb24b
Modified references for images, scripts and i18n.
gvishal Jul 9, 2016
10df46d
Modified gulp file and references to oppia.css and third_party css an…
gvishal Jul 10, 2016
77da86a
Added slugs to extensions
gvishal Jul 10, 2016
1350392
Fixed test for get_cache_slug
gvishal Jul 12, 2016
4b49a9b
Modified build.py and deploy.py
gvishal Jul 12, 2016
1d3c232
Addressed review comments
gvishal Jul 13, 2016
60f33a4
Modify imports
gvishal Jul 13, 2016
5f8bf7f
Modified src to ng-src and other review comments fixed.
gvishal Jul 15, 2016
9d85731
Modified build.py
gvishal Jul 15, 2016
48c4039
Minor change
gvishal Jul 15, 2016
883e1c5
Removed feconf.CACHE_SLUG_DEV and refactored
gvishal Jul 16, 2016
aa4be4e
Added random cache slug
gvishal Jul 16, 2016
b165745
Refactored code.
gvishal Jul 16, 2016
88c91e7
Modified references for extensions, added extensions to build process…
gvishal Jul 17, 2016
bbc31fb
Merge remote-tracking branch 'upstream/develop' into implement-cache-…
gvishal Jul 17, 2016
9daa7b0
Fixed bug
gvishal Jul 17, 2016
89a0196
Addressed review comments.
gvishal Jul 18, 2016
c5aa6c6
Fix failing tests
gvishal Jul 19, 2016
1312642
Fixed bug.
gvishal Jul 19, 2016
55d1b29
Added tests for urlinterpolationservice.
gvishal Jul 19, 2016
f8d95ed
Added interpolation for interactions and logic_proof.html
gvishal Jul 20, 2016
57f6fdb
Merge remote-tracking branch 'upstream/develop' into implement-cache-…
gvishal Jul 20, 2016
8cb8624
Addressed review comments
gvishal Jul 21, 2016
eeb9b5b
Addressed review comments
gvishal Jul 22, 2016
74781cb
Removed unnecessary include from templates
gvishal Jul 22, 2016
238c896
Merge branch 'develop' into implement-cache-slugs-2100
gvishal Jul 23, 2016
ad26ae9
Modified precommit linter script to fix endless waiting
gvishal Jul 23, 2016
3b83d27
Commented script and added assets/scripts to exclusions.
gvishal Jul 23, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Modified precommit linter script to fix endless waiting
  • Loading branch information
gvishal committed Jul 23, 2016
commit ad26ae9f8020cf6451fc345278f2ac316b88cb96
17 changes: 12 additions & 5 deletions scripts/pre_commit_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@
}

EXCLUDED_PATHS = (
'third_party/*', '.git/*', '*.pyc', 'CHANGELOG',
'third_party/*', 'build/*', '.git/*', '*.pyc', 'CHANGELOG',
'scripts/pre_commit_linter.py', 'integrations/*',
'integrations_dev/*', '*.svg', '*.png', '*.zip', '*.ico', '*.jpg')
'integrations_dev/*', '*.svg', '*.png', '*.zip', '*.ico', '*.jpg',
'*.min.js')

if not os.getcwd().endswith('oppia'):
print ''
Expand Down Expand Up @@ -235,8 +236,10 @@ def _lint_js_files(node_path, jscs_path, config_jscsrc, files_to_lint, stdout,
print 'There are no JavaScript files to lint.'
return

print 'Total js files: ', num_js_files
jscs_cmd_args = [node_path, jscs_path, config_jscsrc]
for _, filename in enumerate(files_to_lint):
print 'Linting: ', filename
proc_args = jscs_cmd_args + [filename]
proc = subprocess.Popen(
proc_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Expand All @@ -258,6 +261,8 @@ def _lint_js_files(node_path, jscs_path, config_jscsrc, files_to_lint, stdout,
result.put('%s %s JavaScript files linted (%.1f secs)' % (
_MESSAGE_TYPE_SUCCESS, num_js_files, time.time() - start_time))

print 'Js linting finished.'


def _lint_py_files(config_pylint, files_to_lint, result):
"""Prints a list of lint errors in the given list of Python files.
Expand Down Expand Up @@ -309,6 +314,7 @@ def _lint_py_files(config_pylint, files_to_lint, result):
result.put('%s %s Python files linted (%.1f secs)' % (
_MESSAGE_TYPE_SUCCESS, num_py_files, time.time() - start_time))

print 'Python linting finished.'

def _get_all_files():
"""This function is used to check if this script is ran from
Expand Down Expand Up @@ -395,7 +401,8 @@ def _pre_commit_linter(all_files):
process.start()

for process in linting_processes:
process.join()
process.join(timeout=600)


js_messages = []
while not js_stdout.empty():
Expand All @@ -405,8 +412,8 @@ def _pre_commit_linter(all_files):
print '\n'.join(js_messages)
print '----------------------------------------'
summary_messages = []
summary_messages.append(js_result.get())
summary_messages.append(py_result.get())
summary_messages.append(js_result.get(block=False))
summary_messages.append(py_result.get(block=False))
print '\n'.join(summary_messages)
print ''
return summary_messages
Expand Down