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

Fco (SWU) #53

Closed
wants to merge 14 commits into from
Closed

Fco (SWU) #53

wants to merge 14 commits into from

Conversation

opotowsky
Copy link
Member

This is the swu required per year for the FCO work

@opotowsky
Copy link
Member Author

Two questions (probably for @scopatz):

  1. This is happening and I don't know why:
======================================================================
ERROR: test_metrics.test_fco_u_mined
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/slots/01/dir_17374/userdir/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/slots/01/dir_17374/userdir/cymtests/test_metrics.py", line 199, in test_fco_u_mined
    obs = metrics.fco_u_mined.func(series)
  File "/slots/01/dir_17374/userdir/anaconda/lib/python2.7/site-packages/cymetric/metrics.py", line 262, in fco_u_mined
    feed = enr.feed(0.0072, x_prod, 0.0025, product=prods[obj]) / 1000
NameError: global name 'enr' is not defined

----------------------------------------------------------------------
  1. I am confused at the amounts of SWU generated by this metric in your test 60 year simulation. There are about 200 LWRs in it (approx half of the current world #), and the current worldwide SWU capacity is something on the order of 50 million SWU, right? This simulation has yearly requirements no larger than 200k. I've checked all my units but maybe you can have a look?

@opotowsky
Copy link
Member Author

I tried the pyne checks but this is still failing. The tests that use pyne have been skipping and the first one that uses pyne.enrichment is failing even with the skip command. Any thoughts, @scopatz?

@scopatz
Copy link
Member

scopatz commented Apr 22, 2015

What is the error that you are seeing?

@opotowsky
Copy link
Member Author

The same as before on CI:

test_evaluator.test_eval(<cymetric.cyclus.SqliteBack object at 0x2b3015a38cf8>, 'test.sqlite', <class 'cymetric.cyclus.SqliteBack'>) ... ok
test_metrics.test_agents ... ok
test_metrics.test_materials ... ok
test_metrics.test_activity ... SKIP
test_metrics.test_decayheat ... SKIP
test_metrics.test_fco_u_mined ... ERROR

and

======================================================================
ERROR: test_metrics.test_fco_u_mined
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/slots/01/dir_49462/userdir/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/slots/01/dir_49462/userdir/cymtests/test_metrics.py", line 199, in test_fco_u_mined
    obs = metrics.fco_u_mined.func(series)
  File "/slots/01/dir_49462/userdir/anaconda/lib/python2.7/site-packages/cymetric/metrics.py", line 262, in fco_u_mined
    feed = enr.feed(0.0072, x_prod, 0.0025, product=prods[obj]) / 1000
NameError: global name 'enr' is not defined

----------------------------------------------------------------------

I'm just not sure why pyne isn't being found?

@opotowsky
Copy link
Member Author

@scopatz I'm wondering if we should figure out the pyne issue this week? It will block some of these FCO metrics. I'm not really sure where to start but can look at it if you point me in the right direction.

@scopatz
Copy link
Member

scopatz commented Apr 27, 2015

I don't think that this is worth figuring out on CI, personally.

@scopatz
Copy link
Member

scopatz commented Apr 27, 2015

Mainly because we'll probably want to migrate to Travis anyway.

@scopatz
Copy link
Member

scopatz commented Apr 29, 2015

This also has a merge conflict now @opotowsky, please update.

@opotowsky
Copy link
Member Author

I'm not understanding this test failure - can you explain this @scopatz?

======================================================================
FAIL: __main__.test_fco_swu
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "tests/test_metrics.py", line 236, in test_fco_swu
    assert_frame_equal(exp, obs)
  File "/usr/lib/python2.7/dist-packages/pandas/util/testing.py", line 648, in assert_frame_equal
    check_exact=check_exact)
  File "/usr/lib/python2.7/dist-packages/pandas/util/testing.py", line 595, in assert_series_equal
    assert_almost_equal(left.values, right.values, check_less_precise)
  File "testing.pyx", line 58, in pandas._testing.assert_almost_equal (pandas/src/testing.c:2552)
  File "testing.pyx", line 93, in pandas._testing.assert_almost_equal (pandas/src/testing.c:1875)
  File "testing.pyx", line 136, in pandas._testing.assert_almost_equal (pandas/src/testing.c:2384)
AssertionError: expected 0.00241 but got 0.00241, with decimal 5

----------------------------------------------------------------------
Ran 7 tests in 0.235s

FAILED (failures=1)

@scopatz
Copy link
Member

scopatz commented Apr 29, 2015

This is because your testing floats and you have the assert_almost_equal() probably set to the default 7 sig figs after the decimal. Try bumping it up to 5.

@opotowsky
Copy link
Member Author

not ready to merge because:
(1) test still fails
(2) need to consider a name besides FcoSWU

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.

None yet

2 participants