diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 16afc2b7d..f4d38a885 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -6,13 +6,13 @@ on: - master paths-ignore: - ".github/workflows/documentation.yml" - - "Documentation/**" + - "docs/**" pull_request: branches: - master paths-ignore: - ".github/workflows/documentation.yml" - - "Documentation/**" + - "docs/**" jobs: build: diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 75f363b7c..3fb88aada 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -49,7 +49,7 @@ jobs: - name: Run Sphinx run: > sphinx-build - -M html Documentation HARK-docs + -M html docs HARK-docs -T -W -j 1 @@ -91,8 +91,8 @@ jobs: - name: Lint documentation with sphinx-lint run: > sphinx-lint - --ignore Documentation/example_notebooks/GenIncProcessModel.py + --ignore docs/example_notebooks/GenIncProcessModel.py --enable all --max-line-length 85 README.md - Documentation/ + docs/ diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 4c3204092..6936ce8b3 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -6,13 +6,13 @@ on: - master paths-ignore: - ".github/workflows/documentation.yml" - - "Documentation/**" + - "docs/**" pull_request: branches: - master paths-ignore: - ".github/workflows/documentation.yml" - - "Documentation/**" + - "docs/**" schedule: - cron: 0 0 * * * diff --git a/.github/workflows/hark.yml b/.github/workflows/hark.yml index eca382a58..2a419bb7a 100644 --- a/.github/workflows/hark.yml +++ b/.github/workflows/hark.yml @@ -6,13 +6,13 @@ on: - master paths-ignore: - ".github/workflows/documentation.yml" - - "Documentation/**" + - "docs/**" pull_request: branches: - master paths-ignore: - ".github/workflows/documentation.yml" - - "Documentation/**" + - "docs/**" jobs: build: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a37085f8e..47454c1d2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -exclude: Documentation/example_notebooks/ +exclude: docs/example_notebooks/ ci: autoupdate_commit_msg: "chore: update pre-commit hooks" autofix_commit_msg: "style: pre-commit fixes" diff --git a/docs/NARK/NARK.tex b/docs/NARK/NARK.tex index a92818d44..70bf65384 100644 --- a/docs/NARK/NARK.tex +++ b/docs/NARK/NARK.tex @@ -32,7 +32,7 @@ by using names consistent with our guidelines. \end{abstract} -\centerline{html version at \url{https://econ-ark.github.io/HARK/Documentation/NARK}} +\centerline{html version at \url{https://econ-ark.github.io/HARK/docs/NARK}} % \thanks{The \texttt{NARK} repo that generates this document also contains \LaTeX~configuration files that permit you to use the same name for an object in your writing (your \texttt{paper.tex} file) and in your code (helping to minimize confusion in translating between paper and code).} @@ -42,11 +42,11 @@ \section{Principles} Our aim has been to balance: \begin{itemize} -\item Brevity -\item Mnemonic quality -\item Uniqueness (enabling global search-and-replace) -\item Ubiquity (definitions useful for many projects) -\item Combinatoriality (which encourages mashups) + \item Brevity + \item Mnemonic quality + \item Uniqueness (enabling global search-and-replace) + \item Ubiquity (definitions useful for many projects) + \item Combinatoriality (which encourages mashups) \end{itemize} @@ -74,9 +74,9 @@ \subsection{Single-Letter} \begin{table}[ht] \centering \begin{tabular}{|lcl|} \hline - Letter & & Meaning + Letter & & Meaning \\ \hline - \ALev & & \textit{A}ssets \textit{A}fter \textit{A}ll \textit{A}ctions \textit{A}re \textit{A}ccomplished (end of period) + \ALev & & \textit{A}ssets \textit{A}fter \textit{A}ll \textit{A}ctions \textit{A}re \textit{A}ccomplished (end of period) \\ \BLev & & \textit{B}eginning \textit{B}ank \textit{B}alances \textit{B}efore any \textit{B}ehavior (\textit{b}eginning-of-period) \\ \CLev & & \textit{C}onsumption \textit{C}hoice \textit{C}onnects $B$ to $A$ \\ \DLev & & \textit{D}ebt @@ -125,9 +125,9 @@ \subsection{Standard Variable Names} \centering \begin{tabular}{|rcl|} \hline - Name & - & Description + Name & - & Description \\ \hline - \texttt{CND} & - & Consumption of Nondurable Good + \texttt{CND} & - & Consumption of Nondurable Good \\ \texttt{CNS} & - & Consumption of Nondurables and Services \\ \texttt{Cst} & - & Cost of something \\ \texttt{Dgd} & - & Stock of durable good @@ -165,9 +165,9 @@ \section{Factors and Rates} \centering \begin{tabular}{|ccc|} \hline - Code & Output & Description + Code & Output & Description \\ \hline - \verb|\Rfree| & $\Rfree$ & Riskfree interest factor + \verb|\Rfree| & $\Rfree$ & Riskfree interest factor \\ \verb|\rfree| & $\rfree$ & Riskfree interest rate \\ \verb|\Risky| & $\Risky$ & The return factor on a risky asset \\ \verb|\risky| & $\risky$ & The return rate on a risky asset @@ -191,9 +191,9 @@ \section{Factors and Rates} \centering \begin{tabular}{|>{\ttfamily}cccl|} \hline - Code & \LaTeX & Description & \\ + Code & \LaTeX & Description & \\ \hline - \verb|\DiePrb| & $\DiePrb$ & Probabilty of death & + \verb|\DiePrb| & $\DiePrb$ & Probabilty of death & \\ \verb|\LivPrb| & $\LivPrb$ & Probability to not die $=(1-\DiePrb)$ & \\ \hline \end{tabular} @@ -217,9 +217,9 @@ \section{Parameters} \centering \begin{tabular}{|>{\ttfamily}rcll|} \hline - Name & \LaTeX & Description & Illustration + Name & \LaTeX & Description & Illustration \\ \hline - \verb|\CARA| & $\CARA$ & Coefficient of Absolute Risk Aversion &$\uFunc(\bullet)=-\CARA^{-1} e^{-\CARA \bullet}$ + \verb|\CARA| & $\CARA$ & Coefficient of Absolute Risk Aversion & $\uFunc(\bullet)=-\CARA^{-1} e^{-\CARA \bullet}$ \\ \verb|\CRRA| & $\CRRA$ & Coefficient of Relative Risk Aversion & $\uFunc(\bullet)=(1-\CRRA)^{-1}\bullet^{1-\CRRA}$ \\ \verb|\DiscFac| & $\DiscFac$ & Time Discount Factor & $\uFunc^{\prime}(\cLev_{t}) = \Rfree \DiscFac \uFunc^{\prime}(\cLev_{t+1})$ \\ \verb|\discRte| & $\discRte$ & Time Discount rate & $\discRte=\DiscFac^{-1}-1$ @@ -250,10 +250,10 @@ \section{Parameters} Mnemonics: \begin{itemize} -\item Hebrew \texttt{daleth} is the fourth letter of the Hebrew alphabet (as d and $\delta$ are of the Roman and Greek) and is an etymological and linguistic cousin of those letters -\item $\discRte$ is the lower case Greek letter \texttt{omega}, because people say ``OMG, I've got to think about the future.'' -\item You are invited to scrutinize $\Xi$ yourself to imagine reasons it could represent something to do with population growth. -\item The glorious letter $\Pat$ (pronounced `\href{https://en.wikipedia.org/wiki/Thorn_(letter)}{thorn}') enriched Old English, Gothic, and some other defunct alphabets; sadly, it remains in use today only in Iceland. It is useful because having to type the many symbols in the object $(\Rfree \DiscFac)^{1/\CRRA}$ over and over again is a \textit{thorn} in the side of economists working with dynamic models! (It is the `absolute patience factor' because if it is less than one the consumer wants to bring resources from the future to the present and is therefore absolutely impatient; for a fuller discussion of this terminology, see \cite{carrollTractable}.) + \item Hebrew \texttt{daleth} is the fourth letter of the Hebrew alphabet (as d and $\delta$ are of the Roman and Greek) and is an etymological and linguistic cousin of those letters + \item $\discRte$ is the lower case Greek letter \texttt{omega}, because people say ``OMG, I've got to think about the future.'' + \item You are invited to scrutinize $\Xi$ yourself to imagine reasons it could represent something to do with population growth. + \item The glorious letter $\Pat$ (pronounced `\href{https://en.wikipedia.org/wiki/Thorn_(letter)}{thorn}') enriched Old English, Gothic, and some other defunct alphabets; sadly, it remains in use today only in Iceland. It is useful because having to type the many symbols in the object $(\Rfree \DiscFac)^{1/\CRRA}$ over and over again is a \textit{thorn} in the side of economists working with dynamic models! (It is the `absolute patience factor' because if it is less than one the consumer wants to bring resources from the future to the present and is therefore absolutely impatient; for a fuller discussion of this terminology, see \cite{carrollTractable}.) \end{itemize} @@ -265,9 +265,9 @@ \section{Operators} \centering \begin{tabular}{|>{\ttfamily}rccll|} \hline - Name & \LaTeX & Code & Description & Illustration + Name & \LaTeX & Code & Description & Illustration \\ \hline - \verb|\Ex| & $\Ex$ & \texttt{Ex\_} & The expectation as of date $t$ & $\Ex_{t}[\uFunc^{\prime}(\cRat_{t+1})]$ + \verb|\Ex| & $\Ex$ & \texttt{Ex\_} & The expectation as of date $t$ & $\Ex_{t}[\uFunc^{\prime}(\cRat_{t+1})]$ \\ \verb|\PDV| & $\PDV$ & \texttt{PDV\_} & Present Discounted Value & $\PDV_{t}^{T}(y)$ is human wealth \\ \hline \end{tabular} @@ -283,8 +283,8 @@ \section{Modifiers} \centering \begin{tabular}{|>{\ttfamily}lcl|} \hline - \textit{[object]}\texttt{P} & - & ``Prime'' means derivative, e.g.\ \texttt{vPP} is the second derivative of value: $\vFunc^{\prime\prime}$ -\\ \hline + \textit{[object]}\texttt{P} & - & ``Prime'' means derivative, e.g.\ \texttt{vPP} is the second derivative of value: $\vFunc^{\prime\prime}$ + \\ \hline \textit{[object]}\texttt{Agg} & - & Value of something at the aggregate level (as opposed to \texttt{Ind}) \\ \textit{[object]}\texttt{Ind} & - & Value of something at the level of an individual (as opposed to \texttt{Agg}) \\ \textit{[object]}\texttt{Lvl} & - & Level diff --git a/docs/conf.py b/docs/conf.py index 8eb5a3d24..4f9af8457 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -110,7 +110,7 @@ "github_user": "econ-ark", "github_repo": "HARK", "github_version": "master", - "doc_path": "Documentation/", + "doc_path": "docs/", } # Use Econ-ARK URL to host the website diff --git a/docs/guides/contributing.md b/docs/guides/contributing.md index 4057346fd..60807f16f 100644 --- a/docs/guides/contributing.md +++ b/docs/guides/contributing.md @@ -204,7 +204,7 @@ Object naming conventions in HARK are fairly different than existing standards, - Class names should use no underscores and capitalize the first letter of each word; moreover, a class name _must include a noun_. E.g. **_ConsPerfForesightSolver_**. -When naming variables in model modules, the HARK team strongly discourages using single letter names, like **_c_** for consumption. Instead, we encourage contributors to use longer, more descriptive variable names using additional words and common abbreviations to specify the variable more precisely. In [NARK](https://github.com/econ-ark/HARK/blob/master/Documentation/NARK/NARK.pdf), we list standard single letter variable ''bases'' and an array of prefixes and suffixes to adjust them. Economic variables in model modules should (usually) not use underscores, instead using camel case to the greatest extent possible. For ''non-economic'' variables that are only used temporarily, underscores are permissible. The development team prefers this standard so that users can translate between Python code and LaTeX script with minimal work. +When naming variables in model modules, the HARK team strongly discourages using single letter names, like **_c_** for consumption. Instead, we encourage contributors to use longer, more descriptive variable names using additional words and common abbreviations to specify the variable more precisely. In [NARK](https://github.com/econ-ark/HARK/blob/master/docs/NARK/NARK.pdf), we list standard single letter variable ''bases'' and an array of prefixes and suffixes to adjust them. Economic variables in model modules should (usually) not use underscores, instead using camel case to the greatest extent possible. For ''non-economic'' variables that are only used temporarily, underscores are permissible. The development team prefers this standard so that users can translate between Python code and LaTeX script with minimal work. Conventions for naming variables in HARK's tool modules are significantly closer to more commonly used standards. Variable names should be in all lower case, with underscores between words, e.g. **_data_to_match_**. The functions and classes in these modules are more general and almost surely do not have any inherent ''economic content''; they are numerical or algorithmic objects, not variables that might appear in an equation in an article for a (non-computational) economics journal. Variable names in application modules (e.g. the files that execute the **_cstwMPC_** estimations) are a mix of the conventions for tool and model files, as appropriate for each variable. That is, variables that are directly related to ''economic variables'' in model modules should follow those conventions, while objects created solely for data manipulation or reporting should use the style of tool modules. @@ -272,7 +272,7 @@ multiple entries. If no output, this is just "None". - Provide ample comments within a function or method so that a relatively intelligent reader can follow along with your algorithm. Short comments can follow at the end of a line, longer comments (or descriptions of the step or task about to be performed) should precede a block of code on the line(s) above it. -Finally, if you write a new model module, the HARK team asks that you also provide a short mathematical writeup of the model as a PDF. This document does not need to go into great detail about the solution method for the model or the functions and classes included in the module, merely specify the economic model and provide a summary of how it is solved. See [ConsumptionSavingModels.pdf](https://github.com/econ-ark/HARK/blob/master/Documentation/ConsumptionSavingModels.pdf) for an example of this. +Finally, if you write a new model module, the HARK team asks that you also provide a short mathematical writeup of the model as a PDF. This document does not need to go into great detail about the solution method for the model or the functions and classes included in the module, merely specify the economic model and provide a summary of how it is solved. See [ConsumptionSavingModels.pdf](https://github.com/econ-ark/HARK/blob/master/docs/ConsumptionSavingModels.pdf) for an example of this. ### Testing diff --git a/src/HARK/Calibration/Income/__init__.py b/src/HARK/Calibration/Income/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/HARK/Calibration/Income/tests/__init__.py b/src/HARK/Calibration/Income/tests/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/HARK/Calibration/__init__.py b/src/HARK/Calibration/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/HARK/ConsumptionSaving/__init__.py b/src/HARK/ConsumptionSaving/__init__.py deleted file mode 100644 index 44b489c35..000000000 --- a/src/HARK/ConsumptionSaving/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -# from HARK.ConsumptionSaving.ConsumerParameters import * -# from HARK.ConsumptionSaving.ConsAggShockModel import * -# from HARK.ConsumptionSaving.ConsGenIncProcessModel import * -# from HARK.ConsumptionSaving.ConsIndShockModel import * -# from HARK.ConsumptionSaving.ConsMarkovModel import * -# from HARK.ConsumptionSaving.ConsMedModel import * -# from HARK.ConsumptionSaving.ConsPortfolioModel import * -# from HARK.ConsumptionSaving.ConsPrefShockModel import * -# from HARK.ConsumptionSaving.ConsRepAgentModel import * -# from HARK.ConsumptionSaving.TractableBufferStockModel import * diff --git a/src/HARK/ConsumptionSaving/tests/__init__.py b/src/HARK/ConsumptionSaving/tests/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/HARK/datasets/SCF/WealthIncomeDist/__init__.py b/src/HARK/datasets/SCF/WealthIncomeDist/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/HARK/datasets/SCF/__init__.py b/src/HARK/datasets/SCF/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/HARK/datasets/cpi/__init__.py b/src/HARK/datasets/cpi/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/HARK/datasets/cpi/us/__init__.py b/src/HARK/datasets/cpi/us/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/HARK/datasets/life_tables/__init__.py b/src/HARK/datasets/life_tables/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/HARK/datasets/life_tables/us_ssa/__init__.py b/src/HARK/datasets/life_tables/us_ssa/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/HARK/models/__init__.py b/src/HARK/models/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/HARK/simulation/__init__.py b/src/HARK/simulation/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/HARK/tests/__init__.py b/tests/__init__.py similarity index 100% rename from src/HARK/tests/__init__.py rename to tests/__init__.py diff --git a/src/HARK/Calibration/Income/tests/test_IncomeTools.py b/tests/test_Calibration/test_IncomeTools.py similarity index 100% rename from src/HARK/Calibration/Income/tests/test_IncomeTools.py rename to tests/test_Calibration/test_IncomeTools.py diff --git a/src/HARK/ConsumptionSaving/tests/test_ConsAggShockModel.py b/tests/test_ConsumptionSaving/test_ConsAggShockModel.py similarity index 99% rename from src/HARK/ConsumptionSaving/tests/test_ConsAggShockModel.py rename to tests/test_ConsumptionSaving/test_ConsAggShockModel.py index 0bce3ffbc..59634bc36 100644 --- a/src/HARK/ConsumptionSaving/tests/test_ConsAggShockModel.py +++ b/tests/test_ConsumptionSaving/test_ConsAggShockModel.py @@ -12,7 +12,7 @@ KrusellSmithType, ) from HARK.distribution import Uniform -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class testAggShockConsumerType(unittest.TestCase): diff --git a/src/HARK/ConsumptionSaving/tests/test_ConsGenIncProcessModel.py b/tests/test_ConsumptionSaving/test_ConsGenIncProcessModel.py similarity index 99% rename from src/HARK/ConsumptionSaving/tests/test_ConsGenIncProcessModel.py rename to tests/test_ConsumptionSaving/test_ConsGenIncProcessModel.py index 8a040a88e..e6524ff4b 100644 --- a/src/HARK/ConsumptionSaving/tests/test_ConsGenIncProcessModel.py +++ b/tests/test_ConsumptionSaving/test_ConsGenIncProcessModel.py @@ -7,7 +7,7 @@ IndShockExplicitPermIncConsumerType, PersistentShockConsumerType, ) -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION GenIncDictionary = { "CRRA": 2.0, # Coefficient of relative risk aversion diff --git a/src/HARK/ConsumptionSaving/tests/test_ConsLabeledModel.py b/tests/test_ConsumptionSaving/test_ConsLabeledModel.py similarity index 98% rename from src/HARK/ConsumptionSaving/tests/test_ConsLabeledModel.py rename to tests/test_ConsumptionSaving/test_ConsLabeledModel.py index 0ebafda37..2557b85a0 100644 --- a/src/HARK/ConsumptionSaving/tests/test_ConsLabeledModel.py +++ b/tests/test_ConsumptionSaving/test_ConsLabeledModel.py @@ -6,7 +6,7 @@ PerfForesightLabeledType, PortfolioLabeledType, ) -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class test_PerfForesightLabeledType(unittest.TestCase): diff --git a/src/HARK/ConsumptionSaving/tests/test_ConsLaborModel.py b/tests/test_ConsumptionSaving/test_ConsLaborModel.py similarity index 100% rename from src/HARK/ConsumptionSaving/tests/test_ConsLaborModel.py rename to tests/test_ConsumptionSaving/test_ConsLaborModel.py diff --git a/src/HARK/ConsumptionSaving/tests/test_ConsMarkovModel.py b/tests/test_ConsumptionSaving/test_ConsMarkovModel.py similarity index 100% rename from src/HARK/ConsumptionSaving/tests/test_ConsMarkovModel.py rename to tests/test_ConsumptionSaving/test_ConsMarkovModel.py diff --git a/src/HARK/ConsumptionSaving/tests/test_ConsMedModel.py b/tests/test_ConsumptionSaving/test_ConsMedModel.py similarity index 100% rename from src/HARK/ConsumptionSaving/tests/test_ConsMedModel.py rename to tests/test_ConsumptionSaving/test_ConsMedModel.py diff --git a/src/HARK/ConsumptionSaving/tests/test_ConsPortfolioFrameModel.py b/tests/test_ConsumptionSaving/test_ConsPortfolioFrameModel.py similarity index 100% rename from src/HARK/ConsumptionSaving/tests/test_ConsPortfolioFrameModel.py rename to tests/test_ConsumptionSaving/test_ConsPortfolioFrameModel.py diff --git a/src/HARK/ConsumptionSaving/tests/test_ConsPortfolioModel.py b/tests/test_ConsumptionSaving/test_ConsPortfolioModel.py similarity index 99% rename from src/HARK/ConsumptionSaving/tests/test_ConsPortfolioModel.py rename to tests/test_ConsumptionSaving/test_ConsPortfolioModel.py index f7bbcb19a..338f796db 100644 --- a/src/HARK/ConsumptionSaving/tests/test_ConsPortfolioModel.py +++ b/tests/test_ConsumptionSaving/test_ConsPortfolioModel.py @@ -4,7 +4,7 @@ import HARK.ConsumptionSaving.ConsPortfolioModel as cpm from HARK import make_one_period_oo_solver -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class PortfolioConsumerTypeTestCase(unittest.TestCase): diff --git a/src/HARK/ConsumptionSaving/tests/test_ConsPrefShockModel.py b/tests/test_ConsumptionSaving/test_ConsPrefShockModel.py similarity index 98% rename from src/HARK/ConsumptionSaving/tests/test_ConsPrefShockModel.py rename to tests/test_ConsumptionSaving/test_ConsPrefShockModel.py index 045bfa7cf..56842980a 100644 --- a/src/HARK/ConsumptionSaving/tests/test_ConsPrefShockModel.py +++ b/tests/test_ConsumptionSaving/test_ConsPrefShockModel.py @@ -6,7 +6,7 @@ KinkyPrefConsumerType, PrefShockConsumerType, ) -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class testPrefShockConsumerType(unittest.TestCase): diff --git a/src/HARK/ConsumptionSaving/tests/test_ConsRepAgentModel.py b/tests/test_ConsumptionSaving/test_ConsRepAgentModel.py similarity index 97% rename from src/HARK/ConsumptionSaving/tests/test_ConsRepAgentModel.py rename to tests/test_ConsumptionSaving/test_ConsRepAgentModel.py index 53aa7883a..bf27dcd31 100644 --- a/src/HARK/ConsumptionSaving/tests/test_ConsRepAgentModel.py +++ b/tests/test_ConsumptionSaving/test_ConsRepAgentModel.py @@ -4,7 +4,7 @@ RepAgentConsumerType, RepAgentMarkovConsumerType, ) -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class testRepAgentConsumerType(unittest.TestCase): diff --git a/src/HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py b/tests/test_ConsumptionSaving/test_ConsRiskyContribModel.py similarity index 99% rename from src/HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py rename to tests/test_ConsumptionSaving/test_ConsRiskyContribModel.py index e823e5733..e5872a7b6 100644 --- a/src/HARK/ConsumptionSaving/tests/test_ConsRiskyContribModel.py +++ b/tests/test_ConsumptionSaving/test_ConsRiskyContribModel.py @@ -13,7 +13,7 @@ RiskyContribConsumerType, init_risky_contrib, ) -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class test_(unittest.TestCase): diff --git a/src/HARK/ConsumptionSaving/tests/test_IndShockConsumerType.py b/tests/test_ConsumptionSaving/test_IndShockConsumerType.py similarity index 99% rename from src/HARK/ConsumptionSaving/tests/test_IndShockConsumerType.py rename to tests/test_ConsumptionSaving/test_IndShockConsumerType.py index 45a202259..88a3fb507 100644 --- a/src/HARK/ConsumptionSaving/tests/test_IndShockConsumerType.py +++ b/tests/test_ConsumptionSaving/test_IndShockConsumerType.py @@ -9,7 +9,7 @@ init_idiosyncratic_shocks, init_lifecycle, ) -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class testIndShockConsumerType(unittest.TestCase): @@ -169,9 +169,9 @@ def test_GICRawFails(self): GICRaw_fail_dictionary = dict(self.base_params) GICRaw_fail_dictionary["Rfree"] = 1.08 GICRaw_fail_dictionary["PermGroFac"] = [1.00] - GICRaw_fail_dictionary[ - "cycles" - ] = 0 # cycles=0 makes this an infinite horizon consumer + GICRaw_fail_dictionary["cycles"] = ( + 0 # cycles=0 makes this an infinite horizon consumer + ) GICRawFailExample = IndShockConsumerType(**GICRaw_fail_dictionary) diff --git a/src/HARK/ConsumptionSaving/tests/test_IndShockConsumerTypeFast.py b/tests/test_ConsumptionSaving/test_IndShockConsumerTypeFast.py similarity index 97% rename from src/HARK/ConsumptionSaving/tests/test_IndShockConsumerTypeFast.py rename to tests/test_ConsumptionSaving/test_IndShockConsumerTypeFast.py index 5bebe1ba7..8f805a00d 100644 --- a/src/HARK/ConsumptionSaving/tests/test_IndShockConsumerTypeFast.py +++ b/tests/test_ConsumptionSaving/test_IndShockConsumerTypeFast.py @@ -8,12 +8,12 @@ init_lifecycle, ) from HARK.ConsumptionSaving.ConsIndShockModelFast import IndShockConsumerTypeFast -from HARK.ConsumptionSaving.tests.test_IndShockConsumerType import ( +from HARK.ConsumptionSavingtest_HARK.test_IndShockConsumerType import ( CyclicalDict, IdiosyncDict, LifecycleDict, ) -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class testIndShockConsumerTypeFast(unittest.TestCase): @@ -127,9 +127,9 @@ def test_GICRawFails(self): GICRaw_fail_dictionary = dict(self.base_params) GICRaw_fail_dictionary["Rfree"] = 1.08 GICRaw_fail_dictionary["PermGroFac"] = [1.00] - GICRaw_fail_dictionary[ - "cycles" - ] = 0 # cycles=0 makes this an infinite horizon consumer + GICRaw_fail_dictionary["cycles"] = ( + 0 # cycles=0 makes this an infinite horizon consumer + ) GICRawFailExample = IndShockConsumerTypeFast(**GICRaw_fail_dictionary) diff --git a/src/HARK/ConsumptionSaving/tests/test_KinkedRconsumerType.py b/tests/test_ConsumptionSaving/test_KinkedRconsumerType.py similarity index 96% rename from src/HARK/ConsumptionSaving/tests/test_KinkedRconsumerType.py rename to tests/test_ConsumptionSaving/test_KinkedRconsumerType.py index c53d0e19a..bbb61e69c 100644 --- a/src/HARK/ConsumptionSaving/tests/test_KinkedRconsumerType.py +++ b/tests/test_ConsumptionSaving/test_KinkedRconsumerType.py @@ -1,7 +1,7 @@ import unittest from HARK.ConsumptionSaving.ConsIndShockModel import KinkedRconsumerType -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class testKinkedRConsumerType(unittest.TestCase): diff --git a/src/HARK/ConsumptionSaving/tests/test_PerfForesightConsumerType.py b/tests/test_ConsumptionSaving/test_PerfForesightConsumerType.py similarity index 99% rename from src/HARK/ConsumptionSaving/tests/test_PerfForesightConsumerType.py rename to tests/test_ConsumptionSaving/test_PerfForesightConsumerType.py index 2f37ae64c..2ada42bec 100644 --- a/src/HARK/ConsumptionSaving/tests/test_PerfForesightConsumerType.py +++ b/tests/test_ConsumptionSaving/test_PerfForesightConsumerType.py @@ -3,7 +3,7 @@ import numpy as np from HARK.ConsumptionSaving.ConsIndShockModel import PerfForesightConsumerType -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class testPerfForesightConsumerType(unittest.TestCase): diff --git a/src/HARK/ConsumptionSaving/tests/test_PerfForesightFastConsumerType.py b/tests/test_ConsumptionSaving/test_PerfForesightFastConsumerType.py similarity index 91% rename from src/HARK/ConsumptionSaving/tests/test_PerfForesightFastConsumerType.py rename to tests/test_ConsumptionSaving/test_PerfForesightFastConsumerType.py index 4d249232c..ee471f5ac 100644 --- a/src/HARK/ConsumptionSaving/tests/test_PerfForesightFastConsumerType.py +++ b/tests/test_ConsumptionSaving/test_PerfForesightFastConsumerType.py @@ -1,6 +1,6 @@ from HARK.ConsumptionSaving.ConsIndShockModel import PerfForesightConsumerType from HARK.ConsumptionSaving.ConsIndShockModelFast import PerfForesightConsumerTypeFast -from HARK.ConsumptionSaving.tests.test_PerfForesightConsumerType import ( +from HARK.ConsumptionSavingtest_HARK.test_PerfForesightConsumerType import ( testPerfForesightConsumerType, ) diff --git a/src/HARK/ConsumptionSaving/tests/test_SmallOpenEconomy.py b/tests/test_ConsumptionSaving/test_SmallOpenEconomy.py similarity index 100% rename from src/HARK/ConsumptionSaving/tests/test_SmallOpenEconomy.py rename to tests/test_ConsumptionSaving/test_SmallOpenEconomy.py diff --git a/src/HARK/ConsumptionSaving/tests/test_TractableBufferStockModel.py b/tests/test_ConsumptionSaving/test_TractableBufferStockModel.py similarity index 100% rename from src/HARK/ConsumptionSaving/tests/test_TractableBufferStockModel.py rename to tests/test_ConsumptionSaving/test_TractableBufferStockModel.py diff --git a/src/HARK/ConsumptionSaving/tests/test_modelInits.py b/tests/test_ConsumptionSaving/test_modelInits.py similarity index 100% rename from src/HARK/ConsumptionSaving/tests/test_modelInits.py rename to tests/test_ConsumptionSaving/test_modelInits.py diff --git a/src/HARK/ConsumptionSaving/tests/test_modelcomparisons.py b/tests/test_ConsumptionSaving/test_modelcomparisons.py similarity index 100% rename from src/HARK/ConsumptionSaving/tests/test_modelcomparisons.py rename to tests/test_ConsumptionSaving/test_modelcomparisons.py diff --git a/src/HARK/tests/OpenCLtest.py b/tests/test_HARK/OpenCLtest.py similarity index 100% rename from src/HARK/tests/OpenCLtest.py rename to tests/test_HARK/OpenCLtest.py diff --git a/src/HARK/tests/test_HARKutilities.py b/tests/test_HARK/test_HARKutilities.py similarity index 100% rename from src/HARK/tests/test_HARKutilities.py rename to tests/test_HARK/test_HARKutilities.py diff --git a/src/HARK/tests/test_TractableBufferStockModel.py b/tests/test_HARK/test_TractableBufferStockModel.py similarity index 100% rename from src/HARK/tests/test_TractableBufferStockModel.py rename to tests/test_HARK/test_TractableBufferStockModel.py diff --git a/src/HARK/tests/test_approxDstns.py b/tests/test_HARK/test_approxDstns.py similarity index 100% rename from src/HARK/tests/test_approxDstns.py rename to tests/test_HARK/test_approxDstns.py diff --git a/src/HARK/tests/test_core.py b/tests/test_HARK/test_core.py similarity index 100% rename from src/HARK/tests/test_core.py rename to tests/test_HARK/test_core.py diff --git a/src/HARK/tests/test_dcegm.py b/tests/test_HARK/test_dcegm.py similarity index 100% rename from src/HARK/tests/test_dcegm.py rename to tests/test_HARK/test_dcegm.py diff --git a/src/HARK/tests/test_discrete.py b/tests/test_HARK/test_discrete.py similarity index 100% rename from src/HARK/tests/test_discrete.py rename to tests/test_HARK/test_discrete.py diff --git a/src/HARK/tests/test_distribution.py b/tests/test_HARK/test_distribution.py similarity index 99% rename from src/HARK/tests/test_distribution.py rename to tests/test_HARK/test_distribution.py index ec685eaa3..ed1770d00 100644 --- a/src/HARK/tests/test_distribution.py +++ b/tests/test_HARK/test_distribution.py @@ -22,7 +22,7 @@ distr_of_function, expected, ) -from HARK.tests import HARK_PRECISION +from tests import HARK_PRECISION class DiscreteDistributionTests(unittest.TestCase): diff --git a/src/HARK/tests/test_econforgeinterp.py b/tests/test_HARK/test_econforgeinterp.py similarity index 100% rename from src/HARK/tests/test_econforgeinterp.py rename to tests/test_HARK/test_econforgeinterp.py diff --git a/src/HARK/tests/test_frame.py b/tests/test_HARK/test_frame.py similarity index 100% rename from src/HARK/tests/test_frame.py rename to tests/test_HARK/test_frame.py diff --git a/src/HARK/tests/test_interpolation.py b/tests/test_HARK/test_interpolation.py similarity index 100% rename from src/HARK/tests/test_interpolation.py rename to tests/test_HARK/test_interpolation.py diff --git a/src/HARK/tests/test_mat_methods.py b/tests/test_HARK/test_mat_methods.py similarity index 100% rename from src/HARK/tests/test_mat_methods.py rename to tests/test_HARK/test_mat_methods.py diff --git a/src/HARK/tests/test_parallel.py b/tests/test_HARK/test_parallel.py similarity index 100% rename from src/HARK/tests/test_parallel.py rename to tests/test_HARK/test_parallel.py diff --git a/src/HARK/tests/test_simulate.py b/tests/test_HARK/test_simulate.py similarity index 100% rename from src/HARK/tests/test_simulate.py rename to tests/test_HARK/test_simulate.py diff --git a/src/HARK/tests/test_simulation.py b/tests/test_HARK/test_simulation.py similarity index 100% rename from src/HARK/tests/test_simulation.py rename to tests/test_HARK/test_simulation.py diff --git a/src/HARK/tests/test_validators.py b/tests/test_HARK/test_validators.py similarity index 100% rename from src/HARK/tests/test_validators.py rename to tests/test_HARK/test_validators.py diff --git a/src/HARK/datasets/tests/test_load_data.py b/tests/test_datasets/test_load_data.py similarity index 100% rename from src/HARK/datasets/tests/test_load_data.py rename to tests/test_datasets/test_load_data.py diff --git a/src/HARK/simulation/test_monte_carlo.py b/tests/test_simulation/test_monte_carlo.py similarity index 100% rename from src/HARK/simulation/test_monte_carlo.py rename to tests/test_simulation/test_monte_carlo.py