checklist py2 py3 merge - npalmer-professional/HARK-1 GitHub Wiki

Process: for each executable .py file, meld-compare it to the original I did, and then run both in py2 and py3

steps for each executable file:

  1. run "futurize" on newest file and output results
    • if major "old_div" suggestion made, save where this is suggested: filename and actual file contents suggested, in separate file, so can ask Matt about each of these for integer division.
  2. compare old vs new files in meld
    • also compare this to the futurize suggestions.
  3. if exists, replace if name == 'main': with def demo():
  4. when things look fine, run new edited file in both py2 and py3: from HARK import whatever whatever.demo() # if needed
  5. After all is done, go remove all the ".bak" files created by futurize

This will be a bit painful but should be pretty thorough.

Here are all python files from newest version of HARK. I will basically go through each major chunk and make sure that

  • ./HARK/HARK/

    • estimation.py
    • interpolation.py
    • core.py
    • parallel.py
    • simulation.py
    • init.py
    • utilities.py
  • ./HARK/HARK/ConsumptionSaving/

    • ConsIndShockModel.py
    • ConsAggShockModel.py
      • Run the "simplest" examples x2
  • ./HARK/HARK/ConsumptionSaving/

    • ConsMarkovModel.py
      • Note: need to create an issue formally when get all this done, about the missing thingy definition.
    • TractableBufferStockModel.py
    • ConsRepAgentModel.py
    • ConsGenIncProcessModel.py
    • RepAgentModel.py
    • ConsPrefShockModel.py
    • ConsumerParameters.py
    • init.py
    • ConsMedModel.py
  • ./HARK/HARK/ConsumptionSaving/Demos/

    • Fagereng_demo.py
    • MPC_credit_vs_MPC_income.py
    • Chinese_Growth.py
    • NonDurables_During_Great_Recession.py
    • [.] init.py
  • ./HARK/HARK/ConsumptionSaving/ConsIndShockModelDemos/

    • TryAlternativeParameterValues.py
    • init.py
  • ./HARK/HARK/FashionVictim/

    • FashionVictimParams.py
    • FashionVictimModel.py
    • init.py
  • ./HARK/HARK/SolvingMicroDSOPs/

    • SetupSCFdata.py
    • EstimationParameters.py
    • StructEstimation.py
    • init.py
  • ./HARK/HARK/cstwMPC/

    • cstwMPC.py
    • SetupParamsCSTW.py
    • [?] MakeCSTWfigs.py
    • [?] MakeCSTWfigsForSlides.py
    • init.py
    • cstwMPCold.py
    • SetupParamsCSTWold.py
  • ./HARK/HARK/cAndCwithStickyE/

    • StickyEmodel.py
    • [:] StickyE_NO_MARKOV.py
      • Note: this crashes my computer every time -- fills memory immediately.
    • StickyE_MAIN.py
    • StickyEtools.py
    • StickyEparams.py
    • init.py
  • ./HARK/Testing/

    • MultithreadDemo.py
    • ModelTesting.py
      • unclear if working properly
    • HARKutilities_UnitTests.py
    • Comparison_UnitTests.py
    • TractableBufferStockModel_UnitTests.py
  • ./HARK/Documentation/conf.py

    • This not futurized because not part of HARK
⚠️ **GitHub.com Fallback** ⚠️