mergeron 2024.739123.0__py3-none-any.whl → 2024.739123.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mergeron might be problematic. Click here for more details.

mergeron/__init__.py CHANGED
@@ -9,7 +9,7 @@ from numpy.typing import NDArray
9
9
 
10
10
  _PKG_NAME: str = Path(__file__).parent.stem
11
11
 
12
- VERSION = "2024.739123.0"
12
+ VERSION = "2024.739123.2"
13
13
 
14
14
  __version__ = VERSION
15
15
 
@@ -91,23 +91,27 @@ moe_tmpl = Template(R"""
91
91
 
92
92
  # Define the LaTeX jinja environment
93
93
  # http://eosrei.net/articles/2015/11/LaTeX-templates-python-and-jinja2-generate-pdfs
94
- with resources.as_file(
95
- resources.files(f"{_PKG_NAME}.data.jinja2_LaTeX_templates")
96
- ) as _tmpl_folder:
97
- LaTeX_jinja_env = Environment(
98
- block_start_string=R"((*",
99
- block_end_string="*))",
100
- variable_start_string=R"\JINVAR{",
101
- variable_end_string="}",
102
- comment_start_string=R"((#", # r'#{',
103
- comment_end_string=R"#))", # '}',
104
- line_statement_prefix="##",
105
- line_comment_prefix="%#",
106
- trim_blocks=True,
107
- lstrip_blocks=True,
108
- autoescape=select_autoescape(disabled_extensions=("tex.jinja2",)),
109
- loader=FileSystemLoader(_tmpl_folder),
110
- )
94
+ # The context manager does not point to a templates folder, so it doesn't work here
95
+ # So, we brute-force a solution
96
+
97
+ _tmpl_folder = re.search(
98
+ r"'(.*)'", str(resources.files(f"{_PKG_NAME}.data.jinja2_LaTeX_templates"))
99
+ )[0].strip("'")
100
+
101
+ LaTeX_jinja_env = Environment(
102
+ block_start_string=R"((*",
103
+ block_end_string="*))",
104
+ variable_start_string=R"\JINVAR{",
105
+ variable_end_string="}",
106
+ comment_start_string=R"((#", # r'#{',
107
+ comment_end_string=R"#))", # '}',
108
+ line_statement_prefix="##",
109
+ line_comment_prefix="%#",
110
+ trim_blocks=True,
111
+ lstrip_blocks=True,
112
+ autoescape=select_autoescape(disabled_extensions=("tex.jinja2",)),
113
+ loader=FileSystemLoader(_tmpl_folder),
114
+ )
111
115
 
112
116
  # Place files related to rendering LaTeX in output data directory
113
117
  if not (_out_path := DATA_DIR.joinpath(f"{_PKG_NAME}.cls")).is_file():
@@ -842,7 +846,7 @@ def render_table_pdf(
842
846
  print("\n", file=_table_coll_file)
843
847
 
844
848
  _run_rc = subprocess.run( # noqa: S603
845
- f"LaTeXmk -f -quiet -synctex=0 -interaction=nonstopmode -file-line-error -pdflua {_table_coll_path}".split(),
849
+ f"latexmk -f -quiet -synctex=0 -interaction=nonstopmode -file-line-error -pdflua {_table_coll_path}".split(),
846
850
  check=True,
847
851
  cwd=DATA_DIR,
848
852
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mergeron
3
- Version: 2024.739123.0
3
+ Version: 2024.739123.2
4
4
  Summary: Merger Policy Analysis using Python
5
5
  License: MIT
6
6
  Keywords: merger policy analysis,merger guidelines,merger screening,policy presumptions,concentration standards,upward pricing pressure,GUPPI
@@ -1,5 +1,5 @@
1
1
  mergeron/License.txt,sha256=7iX-y0EyjkbVJKJLS4ZKzuuE1wd0lryfsD_IytLG8lQ,1246
2
- mergeron/__init__.py,sha256=zTKH2ZGVA9d4kLrHyjJPIEV0FI4gCxR8Q4nlz0PNcPs,1479
2
+ mergeron/__init__.py,sha256=Zt57OjmrhFY2ehf7V45O4PHDV5LH1HOoythb8HXGQHo,1479
3
3
  mergeron/core/__init__.py,sha256=KtjBlZOl7jwBCAUhrTJB9PdrN39YLYytNiSUSM_gRmA,62
4
4
  mergeron/core/damodaran_margin_data.py,sha256=rMrgN1Qtw572a0ftY97OOj4otq8ldlLrcOi-bcE-org,8554
5
5
  mergeron/core/ftc_merger_investigations_data.py,sha256=qGAjjXEyqwS1PKKxvJGsSkr0sfI--4oyLss9I1qCNR4,28247
@@ -23,9 +23,9 @@ mergeron/demo/visualize_empirical_margin_distribution.py,sha256=v1xFJumBX2Ooye82
23
23
  mergeron/gen/__init__.py,sha256=0rfcWpKDhYE_jNsw6xKTGFJqgNtfJ-5JFxHS89CIEuI,16575
24
24
  mergeron/gen/data_generation.py,sha256=ZwcVoAfqGTwVBL7PRil_A9kZU8DQK0eCHtsBFA1QElA,16773
25
25
  mergeron/gen/data_generation_functions.py,sha256=bP3E0IPXINRc8s0dUxS_Wqo1byVzheZLX811A17WNbU,28571
26
- mergeron/gen/enforcement_stats.py,sha256=g_mhXd82ZcYHwdfehEFgHXSZkwIp_kXq_MYVvG5OnIY,27368
26
+ mergeron/gen/enforcement_stats.py,sha256=FBtpw9nNZlSr_YDjzsN-yJpzhQ8_Qov8NsFNj5-uOs4,27445
27
27
  mergeron/gen/upp_tests.py,sha256=yzEwWK1bVfjtBYMwXnL5uEWWRiR0_9y0wmjNMB-O3rU,12589
28
28
  mergeron/py.typed,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
29
- mergeron-2024.739123.0.dist-info/METADATA,sha256=AfTsiF29qiGhR3FniZ8q6Gzrl2yJo-HJJDs_wrenBO4,13976
30
- mergeron-2024.739123.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
31
- mergeron-2024.739123.0.dist-info/RECORD,,
29
+ mergeron-2024.739123.2.dist-info/METADATA,sha256=3-KTiy2Dyy-aXDmOmDwT0mbMdNrMI136LBvgZn9omcg,13976
30
+ mergeron-2024.739123.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
31
+ mergeron-2024.739123.2.dist-info/RECORD,,