Comments (9)
Just a reminder, if you work on tests at all, please mark them out so we don't duplicate work. Feel free to work either through a fork or the tests
branch (whichever is applicable), but regardless please comment here on what you are working on.
from quantecon.py.
I have written a few tests for the asset pricing module, but need some help.
I am trying to think of a very simple example that we can "know" the answer to so that I can check the accuracy of the lucas_tree
, consol_price
, and call_option
methods. Does anyone have any ideas?
from quantecon.py.
#45 Test Branch Merged.I have one more item before this issue is closed.
For the examples\
folder which contains the website code, I am looking through them to see if a few tests need to be written to ensure the website examples remain consistent etc. Any thoughts on the following:
plot_directives
: these contain an explicit link between the plot python file and the output of the embedded graphic in sphinx. Therefore these probably don't need testing. Any changes would be captured in changes to the underlying py file.
@jstac do you want to know if the graphics change from what is currently shown? If so we could use md5hash's of the generated plots. For example3dplot.pdf
has checksumfb0eb23d8821237fa519057c5480d88b
but this would then flag a change notice when 3dplot.py might be changed for some valid reason (updating colors etc). The alternative is not pretty (http://matplotlib.org/devel/testing.html)- Given the underlying test coverage of the formal
QuantEcon
package. Perhaps a runtime test is all that is really needed to ensure the examples have been updated as the API changes in QuantEcon etc.
@jstac There are some files that contain functions in theexamples
folder. An example is:ar1sim.py
has functionsproto1
,proto2
,ols_estimates
andope_estimates
. Would you like these to be tested with the example input which has been written for the website (i.e. usingtheta=0.8
,num_reps=100000
,n = 1000
andx_obs=proto2(....)
and checking those functions produce expected output?
from quantecon.py.
@sanguineturtle Thanks for looking into this. Just a runtime test for examples is completely fine. No need to do anything beyond that. In fact the ar1sim.py file was something I threw together that doesn't actually get used anywhere.
from quantecon.py.
I have pushed a new tests
branch to the repository. I am still trying to figure out the best way to suppress matplotlib
figures and capture stderr
when each file executes to report back in an assert
Message. Currently this test runs but doesn't "work" as the stderr
and stdout
are streamed into the terminal screen.
I have posted a stackoverflow question on this topic: http://stackoverflow.com/questions/25215477/supress-matplotlib-figures-when-running-py-file-via-python-or-ipython-terminal
Any thoughts would be most welcome.
from quantecon.py.
@sanguineturtle Can we close this?
from quantecon.py.
Ping
from quantecon.py.
@mmcky is this ready to close?
from quantecon.py.
Closing as we have some basic test infrastructure in place to run the examples.
We can improve this later on possibly with: https://github.com/paulgb/runipy
from quantecon.py.
Related Issues (20)
- Migrate Commit History? HOT 5
- Update badges on README.md
- [Bug]: Error with period of Markov Chain with custom state_values HOT 3
- Bring estimate_mc into top level namespace
- Add function fit_discrete_mc HOT 6
- Register `cartesian_nearest_index` also to `__all__` in gridtools.py? HOT 1
- DOC: Update or remove broken links to QE lectures HOT 2
- Organise a new release `v0.7` with new features HOT 1
- Missing options for tie_breaking in QuantEcon/GameTheory HOT 1
- Error Raised in `qe.random.draw`
- FIX: DOC: Fix build error with Sphinx v7.0.1 HOT 1
- Warning when importing `quantecon` package HOT 2
- License mismatch between repo and JOSS paper HOT 2
- ENH: Example Gallery HOT 3
- Linprog Incorrect Outputs HOT 2
- Add examples to docstring for `linprog_simplex`
- conda releases stalled HOT 3
- Fix numba deprecation notice HOT 3
- ENH: Add basic interpolation routine HOT 8
- MAINT: Deprecations and Test Warnings HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quantecon.py.