"Computational Methods for Economists using Python", by Richard W. Evans. Tutorials and executable code in Python for the most commonly used computational methods in economics.
# conf.py

html_static_path = ["./_static"]

# CSS files
html_css_files = [
    "custom.css",
]

# Get rid of transitions error/warning
myst_footnote_transition = False

docs/book/conf.py
OpenSourceEcon/CompMethods
"""This file contains the CompMethods package's metadata and dependencies."""

from setuptools import find_packages, setup

with open("README.md", "r") as readme_file:
    readme = readme_file.read()

setup(
    name="CompMethods",
    version="0.0.2",
    author="Richard W. Evans",
    author_email="rickecon@gmail.com",
    long_description=readme,
    long_description_content_type="text/markdown",
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "License :: OSI Approved :: GNU Affero General Public License v3",
        "Operating System :: POSIX",
        "Programming Language :: Python",
        "Programming Language :: Python :: 3.10",
        "Topic :: Scientific/Engineering :: Information Analysis",
    ],
    description="Computational Methods for Economists using Python",
    keywords="code python git github data science python regression causal inference structural estimation machine learning neural networks deep learning statistics econometrics",
    license="http://www.fsf.org/licensing/licenses/agpl-3.0.html",
    url="https://github.com/OpenSourceEcon/CompMethods",
    include_package_data=True,  # Will read MANIFEST.in
    install_requires=[
        "numpy",
        "scipy",
        "pandas",
        "ipython",
        "matplotlib",
        "bokeh",
        "sphinx",
        "sphinx-argparse",
        "sphinx-exercise",
        "sphinx-proof",
        "sphinxcontrib-bibtex>=2.0.0",
        "sphinx-math-dollar",
        "pydata-sphinx-theme",
        "jupyter-book>=0.11.3",
        "jupyter",
        "black",
        "setuptools",
        "pytest",
        "coverage",
        "linecheck",
        "yaml-changelog",
    ],
    python_requires=">=3.10",
    tests_require=["pytest"],
    packages=find_packages(),
)

setup.py
OpenSourceEcon/CompMethods
# import sys

# sys.path.append("/Users/richardevans/Docs/Economics/OSE/CompMethods/code/")

import pytest

# from junk_funcs import junk_func_add


def junk_func_add(arg1, arg2):
    """
    This is just a junk function that duplicates the `junk_funcs.py` module in
    the `/code/` directory. We can delete this as soon as we have some real
    functions.
    """
    junk_sum = arg1 + arg2

    return junk_sum


@pytest.mark.parametrize(
    "arg1, arg2, expected",
    [(2, 3, 5), (10, 17, 27)],
    ids=[
        "2 plus 3 equals 5",
        "10 plus 17 equals 27",
    ],
)
def test_junk_func_add(arg1, arg2, expected):
    """
    This is just a fake test of code in the `/code/` directory. We can delete
    this as soon as we have some real tests.
    """
    junk_sum = junk_func_add(arg1, arg2)

    assert junk_sum == expected

tests/test_add_junk.py
OpenSourceEcon/CompMethods