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
8d7d8194
Commit
8d7d8194
authored
Aug 30, 2013
by
Adam
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #843 from edx/adam/calc-refactor
Adam/calc refactor
parents
ea36b834
5b0194d9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
17 deletions
+23
-17
common/lib/calc/calc/__init__.py
+6
-0
common/lib/calc/calc/calc.py
+13
-13
common/lib/calc/calc/functions.py
+0
-0
common/lib/calc/calc/preview.py
+0
-0
common/lib/calc/calc/tests/test_calc.py
+0
-0
common/lib/calc/calc/tests/test_preview.py
+1
-1
common/lib/calc/setup.py
+2
-2
common/lib/capa/capa/inputtypes.py
+1
-1
No files found.
common/lib/calc/calc/__init__.py
0 → 100644
View file @
8d7d8194
"""
Ideally, we wouldn't need to pull in all the calc symbols here,
but courses were using 'import calc', so we need this for
backwards compatibility
"""
from
calc
import
*
common/lib/calc/calc.py
→
common/lib/calc/calc
/calc
.py
View file @
8d7d8194
...
...
@@ -9,7 +9,7 @@ import operator
import
numbers
import
numpy
import
scipy.constants
import
calc
functions
import
functions
from
pyparsing
import
(
Word
,
Literal
,
CaselessLiteral
,
ZeroOrMore
,
MatchFirst
,
Optional
,
Forward
,
...
...
@@ -20,9 +20,9 @@ DEFAULT_FUNCTIONS = {
'sin'
:
numpy
.
sin
,
'cos'
:
numpy
.
cos
,
'tan'
:
numpy
.
tan
,
'sec'
:
calc
functions
.
sec
,
'csc'
:
calc
functions
.
csc
,
'cot'
:
calc
functions
.
cot
,
'sec'
:
functions
.
sec
,
'csc'
:
functions
.
csc
,
'cot'
:
functions
.
cot
,
'sqrt'
:
numpy
.
sqrt
,
'log10'
:
numpy
.
log10
,
'log2'
:
numpy
.
log2
,
...
...
@@ -31,24 +31,24 @@ DEFAULT_FUNCTIONS = {
'arccos'
:
numpy
.
arccos
,
'arcsin'
:
numpy
.
arcsin
,
'arctan'
:
numpy
.
arctan
,
'arcsec'
:
calc
functions
.
arcsec
,
'arccsc'
:
calc
functions
.
arccsc
,
'arccot'
:
calc
functions
.
arccot
,
'arcsec'
:
functions
.
arcsec
,
'arccsc'
:
functions
.
arccsc
,
'arccot'
:
functions
.
arccot
,
'abs'
:
numpy
.
abs
,
'fact'
:
math
.
factorial
,
'factorial'
:
math
.
factorial
,
'sinh'
:
numpy
.
sinh
,
'cosh'
:
numpy
.
cosh
,
'tanh'
:
numpy
.
tanh
,
'sech'
:
calc
functions
.
sech
,
'csch'
:
calc
functions
.
csch
,
'coth'
:
calc
functions
.
coth
,
'sech'
:
functions
.
sech
,
'csch'
:
functions
.
csch
,
'coth'
:
functions
.
coth
,
'arcsinh'
:
numpy
.
arcsinh
,
'arccosh'
:
numpy
.
arccosh
,
'arctanh'
:
numpy
.
arctanh
,
'arcsech'
:
calc
functions
.
arcsech
,
'arccsch'
:
calc
functions
.
arccsch
,
'arccoth'
:
calc
functions
.
arccoth
'arcsech'
:
functions
.
arcsech
,
'arccsch'
:
functions
.
arccsch
,
'arccoth'
:
functions
.
arccoth
}
DEFAULT_VARIABLES
=
{
'i'
:
numpy
.
complex
(
0
,
1
),
...
...
common/lib/calc/calcfunctions.py
→
common/lib/calc/calc
/
functions.py
View file @
8d7d8194
File moved
common/lib/calc/preview.py
→
common/lib/calc/
calc/
preview.py
View file @
8d7d8194
File moved
common/lib/calc/tests/test_calc.py
→
common/lib/calc/
calc/
tests/test_calc.py
View file @
8d7d8194
File moved
common/lib/calc/tests/test_preview.py
→
common/lib/calc/
calc/
tests/test_preview.py
View file @
8d7d8194
...
...
@@ -4,7 +4,7 @@ Unit tests for preview.py
"""
import
unittest
import
preview
from
calc
import
preview
import
pyparsing
...
...
common/lib/calc/setup.py
View file @
8d7d8194
...
...
@@ -2,8 +2,8 @@ from setuptools import setup
setup
(
name
=
"calc"
,
version
=
"0.
1.1
"
,
p
y_modul
es
=
[
"calc"
],
version
=
"0.
2
"
,
p
ackag
es
=
[
"calc"
],
install_requires
=
[
"pyparsing==1.5.6"
,
"numpy"
,
...
...
common/lib/capa/capa/inputtypes.py
View file @
8d7d8194
...
...
@@ -49,7 +49,7 @@ import pyparsing
from
.registry
import
TagRegistry
from
chem
import
chemcalc
from
preview
import
latex_preview
from
calc.
preview
import
latex_preview
import
xqueue_interface
from
datetime
import
datetime
...
...
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