Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
15894833
Commit
15894833
authored
May 21, 2013
by
Calen Pennington
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2046 from edx/fix/cale/pylint-cleanup
Fix/cale/pylint cleanup
parents
ea1bc6b8
cfe220a7
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
181 additions
and
17 deletions
+181
-17
cms/envs/acceptance.py
+5
-0
cms/envs/aws.py
+5
-0
cms/envs/common.py
+4
-0
cms/envs/dev.py
+4
-0
cms/envs/dev_ike.py
+4
-0
cms/envs/dev_with_worker.py
+4
-0
cms/envs/jasmine.py
+4
-0
cms/envs/test.py
+5
-0
lms/envs/acceptance.py
+5
-0
lms/envs/aws.py
+5
-0
lms/envs/cms/acceptance.py
+5
-0
lms/envs/cms/aws.py
+4
-0
lms/envs/cms/dev.py
+4
-0
lms/envs/cms/preview_dev.py
+4
-0
lms/envs/common.py
+5
-0
lms/envs/content.py
+5
-0
lms/envs/dev.py
+5
-0
lms/envs/dev_edx4edx.py
+4
-0
lms/envs/dev_ike.py
+5
-0
lms/envs/dev_int.py
+5
-0
lms/envs/dev_mongo.py
+5
-0
lms/envs/dev_with_worker.py
+4
-0
lms/envs/devgroups/courses.py
+5
-0
lms/envs/devgroups/h_cs50.py
+5
-0
lms/envs/devgroups/m_6002.py
+5
-0
lms/envs/devgroups/portal.py
+5
-0
lms/envs/devplus.py
+5
-0
lms/envs/discussionsettings.py
+4
-0
lms/envs/edx4edx_aws.py
+4
-0
lms/envs/jasmine.py
+4
-0
lms/envs/static.py
+5
-0
lms/envs/test.py
+5
-0
lms/envs/test_ike.py
+5
-0
pylintrc
+0
-0
rakefiles/quality.rake
+28
-13
requirements/edx/base.txt
+1
-4
No files found.
cms/envs/acceptance.py
View file @
15894833
...
...
@@ -2,6 +2,11 @@
This config file extends the test environment configuration
so that we can run the lettuce acceptance tests.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.test
import
*
# You need to start the server in debug mode,
...
...
cms/envs/aws.py
View file @
15894833
"""
This is the default template for our main set of AWS servers.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
import
json
from
.common
import
*
...
...
cms/envs/common.py
View file @
15894833
...
...
@@ -19,6 +19,10 @@ Longer TODO:
multiple sites, but we do need a way to map their data assets.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
import
sys
import
lms.envs.common
from
path
import
path
...
...
cms/envs/dev.py
View file @
15894833
"""
This config file runs the simplest dev environment"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.common
import
*
from
logsettings
import
get_logger_config
...
...
cms/envs/dev_ike.py
View file @
15894833
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
# dev environment for ichuang/mit
# FORCE_SCRIPT_NAME = '/cms'
...
...
cms/envs/dev_with_worker.py
View file @
15894833
...
...
@@ -8,6 +8,10 @@ The worker can be executed using:
django_admin.py celery worker
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
dev
import
*
################################# CELERY ######################################
...
...
cms/envs/jasmine.py
View file @
15894833
...
...
@@ -2,6 +2,10 @@
This configuration is used for running jasmine tests
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.test
import
*
from
logsettings
import
get_logger_config
...
...
cms/envs/test.py
View file @
15894833
...
...
@@ -7,6 +7,11 @@ sessions. Assumes structure:
/mitx # The location of this repo
/log # Where we're going to write log files
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.common
import
*
import
os
from
path
import
path
...
...
lms/envs/acceptance.py
View file @
15894833
...
...
@@ -2,6 +2,11 @@
This config file extends the test environment configuration
so that we can run the lettuce acceptance tests.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.test
import
*
# You need to start the server in debug mode,
...
...
lms/envs/aws.py
View file @
15894833
...
...
@@ -6,6 +6,11 @@ Common traits:
* Use memcached, and cache-backed sessions
* Use a MySQL 5.1 database
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
import
json
from
.common
import
*
...
...
lms/envs/cms/acceptance.py
View file @
15894833
...
...
@@ -3,6 +3,11 @@ This config file is a copy of dev environment without the Debug
Toolbar. I it suitable to run against acceptance tests.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.dev
import
*
# REMOVE DEBUG TOOLBAR
...
...
lms/envs/cms/aws.py
View file @
15894833
...
...
@@ -2,6 +2,10 @@
Settings for the LMS that runs alongside the CMS on AWS
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
..aws
import
*
with
open
(
ENV_ROOT
/
"cms.auth.json"
)
as
auth_file
:
...
...
lms/envs/cms/dev.py
View file @
15894833
...
...
@@ -2,6 +2,10 @@
Settings for the LMS that runs alongside the CMS on AWS
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
..dev
import
*
MITX_FEATURES
[
'AUTH_USE_MIT_CERTIFICATES'
]
=
False
...
...
lms/envs/cms/preview_dev.py
View file @
15894833
...
...
@@ -2,6 +2,10 @@
Settings for the LMS that runs alongside the CMS on AWS
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.dev
import
*
MODULESTORE
=
{
...
...
lms/envs/common.py
View file @
15894833
...
...
@@ -18,6 +18,11 @@ Longer TODO:
3. We need to handle configuration for multiple courses. This could be as
multiple sites, but we do need a way to map their data assets.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
import
sys
import
os
...
...
lms/envs/content.py
View file @
15894833
...
...
@@ -2,6 +2,11 @@
These are debug machines used for content creators, so they're kind of a cross
between dev machines and AWS machines.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.aws
import
*
DEBUG
=
True
...
...
lms/envs/dev.py
View file @
15894833
...
...
@@ -7,6 +7,11 @@ sessions. Assumes structure:
/mitx # The location of this repo
/log # Where we're going to write log files
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.common
import
*
from
logsettings
import
get_logger_config
...
...
lms/envs/dev_edx4edx.py
View file @
15894833
...
...
@@ -8,6 +8,10 @@ sessions. Assumes structure:
/log # Where we're going to write log files
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
import
socket
if
'eecs1'
in
socket
.
gethostname
():
...
...
lms/envs/dev_ike.py
View file @
15894833
...
...
@@ -7,6 +7,11 @@ sessions. Assumes structure:
/mitx # The location of this repo
/log # Where we're going to write log files
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.common
import
*
from
logsettings
import
get_logger_config
from
.dev
import
*
...
...
lms/envs/dev_int.py
View file @
15894833
...
...
@@ -9,6 +9,11 @@ following domains to 127.0.0.1 in your /etc/hosts file:
Note that OS X has a bug where using *.local domains is excruciatingly slow, so
use *.dev domains instead for local testing.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.dev
import
*
MITX_FEATURES
[
'SUBDOMAIN_COURSE_LISTINGS'
]
=
True
...
...
lms/envs/dev_mongo.py
View file @
15894833
"""
This config file runs the dev environment, but with mongo as the datastore
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.dev
import
*
GITHUB_REPO_ROOT
=
ENV_ROOT
/
"data"
...
...
lms/envs/dev_with_worker.py
View file @
15894833
...
...
@@ -8,6 +8,10 @@ The worker can be executed using:
django_admin.py celery worker
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
dev
import
*
################################# CELERY ######################################
...
...
lms/envs/devgroups/courses.py
View file @
15894833
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
..dev
import
*
CLASSES_TO_DBS
=
{
...
...
lms/envs/devgroups/h_cs50.py
View file @
15894833
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.courses
import
*
DATABASES
=
course_db_for
(
'HarvardX/CS50x/2012'
)
lms/envs/devgroups/m_6002.py
View file @
15894833
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.courses
import
*
DATABASES
=
course_db_for
(
'MITx/6.002x/2012_Fall'
)
lms/envs/devgroups/portal.py
View file @
15894833
...
...
@@ -2,6 +2,11 @@
Note that for this to work at all, you must have memcached running (or you won't
get shared sessions)
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
courses
import
*
# Move this to a shared file later:
...
...
lms/envs/devplus.py
View file @
15894833
...
...
@@ -13,6 +13,11 @@ Dir structure:
/log # Where we're going to write log files
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.dev
import
*
WIKI_ENABLED
=
True
...
...
lms/envs/discussionsettings.py
View file @
15894833
# We intentionally define variables that aren't used
# pylint: disable=W0614
DISCUSSION_ALLOWED_UPLOAD_FILE_TYPES
=
(
'.jpg'
,
'.jpeg'
,
'.gif'
,
'.bmp'
,
'.png'
,
'.tiff'
)
lms/envs/edx4edx_aws.py
View file @
15894833
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
# Settings for edx4edx production instance
from
.aws
import
*
COURSE_NAME
=
"edx4edx"
...
...
lms/envs/jasmine.py
View file @
15894833
...
...
@@ -2,6 +2,10 @@
This configuration is used for running jasmine tests
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.test
import
*
from
logsettings
import
get_logger_config
...
...
lms/envs/static.py
View file @
15894833
...
...
@@ -7,6 +7,11 @@ sessions. Assumes structure:
/mitx # The location of this repo
/log # Where we're going to write log files
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.common
import
*
from
logsettings
import
get_logger_config
...
...
lms/envs/test.py
View file @
15894833
...
...
@@ -7,6 +7,11 @@ sessions. Assumes structure:
/mitx # The location of this repo
/log # Where we're going to write log files
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.common
import
*
import
os
from
path
import
path
...
...
lms/envs/test_ike.py
View file @
15894833
...
...
@@ -7,6 +7,11 @@ sessions. Assumes structure:
/mitx # The location of this repo
/log # Where we're going to write log files
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=W0401, W0614
from
.common
import
*
from
logsettings
import
get_logger_config
import
os
...
...
.
pylintrc
→
pylintrc
View file @
15894833
File moved
rakefiles/quality.rake
View file @
15894833
def
run_pylint
(
system
,
report_dir
,
flags
=
''
)
apps
=
Dir
[
"
#{
system
}
"
,
"
#{
system
}
/djangoapps/*"
,
"
#{
system
}
/lib/*"
].
map
do
|
app
|
File
.
basename
(
app
)
end
.
select
do
|
app
|
app
!=~
/.pyc$/
end
.
map
do
|
app
|
if
app
=~
/.py$/
app
.
gsub
(
'.py'
,
''
)
else
app
end
end
pythonpath_prefix
=
"PYTHONPATH=
#{
system
}
:
#{
system
}
/djangoapps:
#{
system
}
/lib:common/djangoapps:common/lib"
sh
(
"
#{
pythonpath_prefix
}
pylint
#{
flags
}
-f parseable
#{
apps
.
join
(
' '
)
}
| tee
#{
report_dir
}
/pylint.report"
)
end
[
:lms
,
:cms
,
:common
].
each
do
|
system
|
report_dir
=
report_dir_path
(
system
)
...
...
@@ -11,21 +28,18 @@
desc
"Run pylint on all
#{
system
}
code"
task
"pylint_
#{
system
}
"
=>
[
report_dir
,
:install_python_prereqs
]
do
apps
=
Dir
[
"
#{
system
}
/*.py"
,
"
#{
system
}
/djangoapps/*"
,
"
#{
system
}
/lib/*"
].
map
do
|
app
|
File
.
basename
(
app
)
end
.
select
do
|
app
|
app
!=~
/.pyc$/
end
.
map
do
|
app
|
if
app
=~
/.py$/
app
.
gsub
(
'.py'
,
''
)
else
app
end
run_pylint
(
system
,
report_dir
)
end
namespace
"pylint_
#{
system
}
"
do
desc
"Run pylint checking for errors only, and aborting if there are any"
task
:errors
do
run_pylint
(
system
,
report_dir
,
'-E'
)
end
pythonpath_prefix
=
"PYTHONPATH=
#{
system
}
:
#{
system
}
/djangoapps:
#{
system
}
/lib:common/djangoapps:common/lib"
sh
(
"
#{
pythonpath_prefix
}
pylint --rcfile=.pylintrc -f parseable
#{
apps
.
join
(
' '
)
}
| tee
#{
report_dir
}
/pylint.report"
)
end
namespace
:pylint
do
task
:errors
=>
"pylint_
#{
system
}
:errors"
end
task
:pylint
=>
"pylint_
#{
system
}
"
end
\ No newline at end of file
requirements/edx/base.txt
View file @
15894833
...
...
@@ -74,6 +74,7 @@ lettuce==0.2.16
mock==0.8.0
nosexcover==1.0.7
pep8==1.4.5
pylint==0.28
rednose==0.3
selenium==2.31.0
splinter==0.5.0
...
...
@@ -81,7 +82,3 @@ django_nose==1.1
django-jasmine==0.3.2
django_debug_toolbar
django-debug-toolbar-mongo
# Install pylint from a specific commit on trunk
# to get the fix for this issue: http://www.logilab.org/ticket/122793
https://bitbucket.org/logilab/pylint/get/e828cb5.zip
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment