Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,9 @@ import config_root.config.config_ as crococon

### Code Conventions
- Coding guidelines are in `docs/code_guidelines/all.coding_style_guidelines.reference.md`

- Templates for code are:
- `code_template.py`: template for code
- `unit_test_template.py`: template for unit test
- `dev_scripts_helpers/coding_tools/script_template.py`: template for
self-standing Python script
10 changes: 8 additions & 2 deletions config_root/config/test/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2300,13 +2300,19 @@ def execute_stmt(
raise ValueError(f"Invalid mode={mode}")
_LOG.debug("config=\n%s", actual)
if expected is not None:
self.assert_equal(actual, expected, purify_text=True, fuzzy_match=True)
self.assert_equal(
actual, expected, purify_text=True, fuzzy_match=True
)
# Package the output.
actual = hprint.frame(stmt) + "\n" + actual
return actual

def raise_stmt(
self, stmt: str, assertion_type: Any, expected: Optional[str], globals_: Dict
self,
stmt: str,
assertion_type: Any,
expected: Optional[str],
globals_: Dict,
) -> None:
_LOG.debug("\n" + hprint.frame(stmt))
with self.assertRaises(assertion_type) as cm:
Expand Down
8 changes: 6 additions & 2 deletions config_root/config/test/test_config_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,9 @@ def test1(self) -> None:
config1 = _get_test_config1()
config2 = _get_test_config2()
#
actual = cconfig.build_config_diff_dataframe({"1": config1, "2": config2})
actual = cconfig.build_config_diff_dataframe(
{"1": config1, "2": config2}
)
actual = hpandas.df_to_str(actual, num_rows=None)
#
expected = pd.DataFrame(
Expand All @@ -433,7 +435,9 @@ def test2(self) -> None:
"""
config1 = _get_test_config1()
#
actual = cconfig.build_config_diff_dataframe({"1": config1, "2": config1})
actual = cconfig.build_config_diff_dataframe(
{"1": config1, "2": config1}
)
actual = hpandas.df_to_str(actual, num_rows=None)
#
expected = """
Expand Down
6 changes: 4 additions & 2 deletions dev_scripts_helpers/documentation/render_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ def _get_rendered_file_paths(
# #############################################################################


# Save cache to disk for persistence.
@hcacsimp.simple_cache(write_through=True)
@hcacsimp.simple_cache(
# Save cache to disk for persistence.
write_through=True
)
def _render_image_code(
image_code_txt: str,
image_code_idx: int,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ $GIT_ROOT/dev_scripts_helpers/documentation/preprocess_notes.py --input $GIT_ROO
# render_images
$GIT_ROOT/dev_scripts_helpers/documentation/render_images.py --in_file_name $GIT_ROOT/dev_scripts_helpers/documentation/test/outcomes/Test_notes_to_pdf1.test3/tmp.scratch/tmp.notes_to_pdf.preprocess_notes.txt --out_file_name $GIT_ROOT/dev_scripts_helpers/documentation/test/outcomes/Test_notes_to_pdf1.test3/tmp.scratch/tmp.notes_to_pdf.render_image.txt
# run_pandoc
docker run --rm --user $(id -u):$(id -g) -e AM_GDRIVE_PATH -e AM_TELEGRAM_TOKEN -e CSFY_AWS_PROFILE -e CSFY_AWS_S3_BUCKET -e CSFY_ECR_BASE_PATH -e CSFY_HOST_NAME -e CSFY_HOST_OS_NAME -e CSFY_HOST_OS_VERSION -e CSFY_HOST_USER_NAME -e OPENAI_API_KEY -e OPENROUTER_API_KEY -e QUANDL_API_KEY --workdir /app --mount type=bind,source=$GIT_ROOT,target=/app tmp.pandoc_texlive.arm64.8689d816.xxxxxxxx /helpers_root/dev_scripts_helpers/documentation/test/outcomes/Test_notes_to_pdf1.test3/tmp.scratch/tmp.notes_to_pdf.render_image2.txt --output /helpers_root/dev_scripts_helpers/documentation/test/outcomes/Test_notes_to_pdf1.test3/tmp.scratch/tmp.notes_to_pdf.tex --template /helpers_root/dev_scripts_helpers/documentation/pandoc.latex -V geometry:margin=1in -f markdown --number-sections --highlight-style=tango -s -t latex
docker run --rm --user $(id -u):$(id -g) -e AM_CONTAINER_VERSION -e CSFY_AWS_ACCESS_KEY_ID -e CSFY_AWS_DEFAULT_REGION -e CSFY_AWS_PROFILE -e CSFY_AWS_S3_BUCKET -e CSFY_AWS_SECRET_ACCESS_KEY -e CSFY_AWS_SESSION_TOKEN -e CSFY_CI -e CSFY_ECR_BASE_PATH -e CSFY_ENABLE_DIND -e CSFY_FORCE_TEST_FAIL -e CSFY_GIT_ROOT_PATH -e CSFY_HELPERS_ROOT_PATH -e CSFY_HOST_GIT_ROOT_PATH -e CSFY_HOST_NAME -e CSFY_HOST_OS_NAME -e CSFY_HOST_OS_VERSION -e CSFY_HOST_USER_NAME -e CSFY_REPO_CONFIG_CHECK -e CSFY_REPO_CONFIG_PATH -e CSFY_TELEGRAM_TOKEN -e CSFY_USE_HELPERS_AS_NESTED_MODULE -e OPENAI_API_KEY --workdir $GIT_ROOT --mount type=bind,source=$CSFY_HOST_GIT_ROOT_PATH,target=$GIT_ROOT tmp.pandoc_texlive.aarch64.xxxxxxxx $GIT_ROOT/dev_scripts_helpers/documentation/test/outcomes/Test_notes_to_pdf1.test3/tmp.scratch/tmp.notes_to_pdf.render_image2.txt --output $GIT_ROOT/dev_scripts_helpers/documentation/test/outcomes/Test_notes_to_pdf1.test3/tmp.scratch/tmp.notes_to_pdf.tex --template $GIT_ROOT/dev_scripts_helpers/documentation/pandoc.latex -V geometry:margin=1in -f markdown --number-sections --highlight-style=tango -s -t latex
# latex
cp -f $GIT_ROOT/dev_scripts_helpers/documentation/latex_abbrevs.sty $GIT_ROOT/dev_scripts_helpers/documentation/test/outcomes/Test_notes_to_pdf1.test3/tmp.scratch
docker run --rm --user $(id -u):$(id -g) -e AM_GDRIVE_PATH -e AM_TELEGRAM_TOKEN -e CSFY_AWS_PROFILE -e CSFY_AWS_S3_BUCKET -e CSFY_ECR_BASE_PATH -e CSFY_HOST_NAME -e CSFY_HOST_OS_NAME -e CSFY_HOST_OS_VERSION -e CSFY_HOST_USER_NAME -e OPENAI_API_KEY -e OPENROUTER_API_KEY -e QUANDL_API_KEY --workdir /app --mount type=bind,source=$GIT_ROOT,target=/app tmp.latex.arm64.2f590c86.xxxxxxxx pdflatex -output-directory /helpers_root/dev_scripts_helpers/documentation/test/outcomes/Test_notes_to_pdf1.test3/tmp.scratch --interaction=nonstopmode --halt-on-error --shell-escape /helpers_root/dev_scripts_helpers/documentation/test/outcomes/Test_notes_to_pdf1.test3/tmp.scratch/tmp.notes_to_pdf.tex
docker run --rm --user $(id -u):$(id -g) -e AM_CONTAINER_VERSION -e CSFY_AWS_ACCESS_KEY_ID -e CSFY_AWS_DEFAULT_REGION -e CSFY_AWS_PROFILE -e CSFY_AWS_S3_BUCKET -e CSFY_AWS_SECRET_ACCESS_KEY -e CSFY_AWS_SESSION_TOKEN -e CSFY_CI -e CSFY_ECR_BASE_PATH -e CSFY_ENABLE_DIND -e CSFY_FORCE_TEST_FAIL -e CSFY_GIT_ROOT_PATH -e CSFY_HELPERS_ROOT_PATH -e CSFY_HOST_GIT_ROOT_PATH -e CSFY_HOST_NAME -e CSFY_HOST_OS_NAME -e CSFY_HOST_OS_VERSION -e CSFY_HOST_USER_NAME -e CSFY_REPO_CONFIG_CHECK -e CSFY_REPO_CONFIG_PATH -e CSFY_TELEGRAM_TOKEN -e CSFY_USE_HELPERS_AS_NESTED_MODULE -e OPENAI_API_KEY --workdir $GIT_ROOT --mount type=bind,source=$CSFY_HOST_GIT_ROOT_PATH,target=$GIT_ROOT tmp.latex.aarch64.xxxxxxxx pdflatex -output-directory $GIT_ROOT/dev_scripts_helpers/documentation/test/outcomes/Test_notes_to_pdf1.test3/tmp.scratch --interaction=nonstopmode --halt-on-error --shell-escape $GIT_ROOT/dev_scripts_helpers/documentation/test/outcomes/Test_notes_to_pdf1.test3/tmp.scratch/tmp.notes_to_pdf.tex
# latex again
\cp -af $GIT_ROOT/dev_scripts_helpers/documentation/test/outcomes/Test_notes_to_pdf1.test3/tmp.scratch/tmp.notes_to_pdf.pdf $GIT_ROOT/dev_scripts_helpers/documentation/test/outcomes/Test_notes_to_pdf1.test3/tmp.scratch/output.pdf
# copy_to_gdrive
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
fontsize: 10pt
---
\let\emph\textit
\let\uline\underline
\let\ul\underline
/app/helpers_root/dev_scripts_helpers/documentation/test/outcomes/Test_preprocess_notes_end_to_end1.test_run_all2/input/input.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
fontsize: 10pt
---
\let\emph\textit
\let\uline\underline
\let\ul\underline
# 14, Topics in Demand and Supply Analysis (p. 6, 843)

## Introduction

- **Economics**
- Economics is the study of:
- production
- distribution
- consumption

- Macroeconomics deals with aggregated economic quantities
- E.g., national output and national income

- Microeconomics deals with markets and decision making of individual economic
units
- E.g., consumers, businesses

- Microeconomics classifies private economic units into:
- consumers (aka households)
- consumption (= demand for goods and services)
- utility maximizing individuals (i.e., maximizing satisfaction from
present and future consumption)
- businesses (aka companies, firms)
- supply of goods and services by profit maximizing firms
Loading
Loading