rxiv-maker 1.15.5__py3-none-any.whl → 1.15.7__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.
rxiv_maker/__version__.py CHANGED
@@ -1,7 +1,7 @@
1
1
  """Version information for rxiv-maker."""
2
2
 
3
- __version__ = "1.15.5"
4
- __version_tuple__ = (1, 15, 5)
3
+ __version__ = "1.15.7"
4
+ __version_tuple__ = (1, 15, 7)
5
5
 
6
6
  # Note: Docker images v1.8+ use mermaid.ink API for diagram processing
7
7
  # This improves cross-platform compatibility and performance
@@ -146,35 +146,34 @@ class TrackChangesManager:
146
146
  tag_manuscript_dir = temp_dir / "tag_manuscript"
147
147
  tag_manuscript_dir.mkdir()
148
148
 
149
- # Extract each manuscript file from the tag
150
- for file_name in self.manuscript_files:
151
- file_path = self.manuscript_path / file_name
152
- if not file_path.exists():
153
- self.log(f"Skipping {file_name} (not found in current manuscript)")
154
- continue
155
-
156
- try:
157
- # Try to extract file from git tag
158
- result = subprocess.run(
159
- [
160
- "git",
161
- "show",
162
- f"{self.git_tag}:{self.manuscript_path.name}/{file_name}",
163
- ],
164
- capture_output=True,
165
- text=True,
166
- check=True,
167
- )
168
-
169
- # Write extracted content to temp directory
170
- (tag_manuscript_dir / file_name).write_text(result.stdout, encoding="utf-8")
171
- self.log(f"Extracted {file_name} from tag {self.git_tag}")
172
-
173
- except subprocess.CalledProcessError as e:
174
- self.log(f"Warning: Could not extract {file_name} from tag {self.git_tag}: {e}")
175
- continue
149
+ try:
150
+ # Use git archive to extract the entire repository state at the tag
151
+ # This ensures all helper scripts, data files, and assets are present
152
+ # pipe git archive output to tar extraction
153
+
154
+ # Note: We need to run this from the repo root or use the correct path
155
+ # The current working directory is expected to be the manuscript repo root
156
+
157
+ archive_cmd = ["git", "archive", "--format=tar", self.git_tag]
158
+ tar_cmd = ["tar", "-x", "-C", str(tag_manuscript_dir)]
159
+
160
+ # Create pipe
161
+ ps = subprocess.Popen(archive_cmd, stdout=subprocess.PIPE, cwd=self.manuscript_path.parent)
162
+ subprocess.check_call(tar_cmd, stdin=ps.stdout)
163
+ ps.wait()
164
+
165
+ if ps.returncode != 0:
166
+ raise subprocess.CalledProcessError(ps.returncode, archive_cmd)
167
+
168
+ self.log(f"Extracted full repository from tag {self.git_tag}")
169
+ return True
176
170
 
177
- return True
171
+ except subprocess.CalledProcessError as e:
172
+ self.log(f"Error extracting files from tag {self.git_tag}: {e}", force=True)
173
+ return False
174
+ except Exception as e:
175
+ self.log(f"Unexpected error during extraction: {e}", force=True)
176
+ return False
178
177
 
179
178
  def generate_latex_files(self, manuscript_dir: Path, output_subdir: str) -> bool:
180
179
  """Generate LaTeX files from a manuscript directory.
@@ -461,12 +460,28 @@ class TrackChangesManager:
461
460
  return False
462
461
 
463
462
  self.log("Generating LaTeX files for tag version...")
464
- if not self.generate_latex_files(tag_manuscript_dir, "tag"):
463
+
464
+ # Locate the manuscript directory within the extracted tag
465
+ # Try the same directory name as the current manuscript
466
+ target_manuscript_dir = tag_manuscript_dir / self.manuscript_path.name
467
+
468
+ # If not found there, check the root (in case the repo IS the manuscript dir)
469
+ if not (target_manuscript_dir / "01_MAIN.md").exists():
470
+ if (tag_manuscript_dir / "01_MAIN.md").exists():
471
+ target_manuscript_dir = tag_manuscript_dir
472
+ else:
473
+ self.log(f"Warning: Could not create locate 01_MAIN.md in extracted tag files at {target_manuscript_dir} or root", force=True)
474
+ # We continue with the guess, though it will likely fail in generation
475
+
476
+ if not self.generate_latex_files(target_manuscript_dir, "tag"):
465
477
  return False
466
478
 
467
479
  # Find the main LaTeX files
468
480
  current_tex = self.output_dir / "current" / f"{self.manuscript_path.name}.tex"
469
- tag_tex = self.output_dir / "tag" / f"{tag_manuscript_dir.name}.tex"
481
+
482
+ # The generated tex file will be named after the manuscript directory name (MANUSCRIPT -> MANUSCRIPT.tex)
483
+ # regardless of whether it's in the tag extraction or current
484
+ tag_tex = self.output_dir / "tag" / f"{self.manuscript_path.name}.tex"
470
485
 
471
486
  # Generate custom filename using the same convention as regular PDF
472
487
  # generation
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rxiv-maker
3
- Version: 1.15.5
3
+ Version: 1.15.7
4
4
  Summary: Write scientific preprints in Markdown. Generate publication-ready PDFs efficiently.
5
5
  Project-URL: Homepage, https://github.com/HenriquesLab/rxiv-maker
6
6
  Project-URL: Documentation, https://github.com/HenriquesLab/rxiv-maker#readme
@@ -1,5 +1,5 @@
1
1
  rxiv_maker/__init__.py,sha256=p04JYC5ZhP6dLXkoWVlKNyiRvsDE1a4C88f9q4xO3tA,3268
2
- rxiv_maker/__version__.py,sha256=hJ6I3XG0lIO85FvPwmP2npVwzzgbRuS86j79MmtBCRE,230
2
+ rxiv_maker/__version__.py,sha256=SMokkfMA9YCiVIlBz4aeYm6SkxgNSAj_Hdbl5TCMz1E,230
3
3
  rxiv_maker/rxiv_maker_cli.py,sha256=9Lu_mhFPXwx5jzAR6StCNxwCm_fkmP5qiOYdNuh_AwI,120
4
4
  rxiv_maker/validate.py,sha256=AIzgP59KbCQJqC9WIGfUdVv0xI6ud9g1fFznQkaGz5Q,9373
5
5
  rxiv_maker/cli/__init__.py,sha256=Jw0DTFUSofN-02xpVrt1UUzRcgH5NNd-GPNidhmNwpU,77
@@ -100,7 +100,7 @@ rxiv_maker/engines/operations/generate_figures.py,sha256=3oIuS0wryO9WpPZ3UD2qm0Y
100
100
  rxiv_maker/engines/operations/generate_preprint.py,sha256=EtWSL1-LGm8N61_CLABSswgvVw61haEx8m4727pdzgM,2650
101
101
  rxiv_maker/engines/operations/prepare_arxiv.py,sha256=cd0JN5IO-Wy9T8ab75eibyaA8_K8Gpwrz2F-95OMnx4,21551
102
102
  rxiv_maker/engines/operations/setup_environment.py,sha256=gERuThHTldH0YqgXn85995deHBP6csY1ZhCNgU6-vFg,12691
103
- rxiv_maker/engines/operations/track_changes.py,sha256=sGnuPr5DJOIaSdqreq5Tb9EvG3Ycg71H41Fm9RH7aQ4,21998
103
+ rxiv_maker/engines/operations/track_changes.py,sha256=q0WTV2PNwF3f8UWFAVBvCt_uGlc6b8j4Y5RMLLuZTz4,23196
104
104
  rxiv_maker/engines/operations/validate.py,sha256=OVmtRVtG-r1hoA8IqYaNC-ijN1a5ixM3X5Z8Gda-O2M,17142
105
105
  rxiv_maker/engines/operations/validate_pdf.py,sha256=qyrtL752Uap3i6ntQheY570soVjFZRJe8ANrw5AvHFs,5899
106
106
  rxiv_maker/exporters/__init__.py,sha256=NcTD1SDb8tTgsHhCS1A7TVEZncyWbDRTa6sJIdLqcsE,350
@@ -185,8 +185,8 @@ rxiv_maker/validators/doi/metadata_comparator.py,sha256=euqHhKP5sHQAdZbdoAahUn6Y
185
185
  rxiv_maker/tex/template.tex,sha256=zrJ3aFfu8j9zkg1l375eE9w-j42P3rz16wMD3dSgi1I,1354
186
186
  rxiv_maker/tex/style/rxiv_maker_style.bst,sha256=jbVqrJgAm6F88cow5vtZuPBwwmlcYykclTm8RvZIo6Y,24281
187
187
  rxiv_maker/tex/style/rxiv_maker_style.cls,sha256=F2qtnS9mI6SwOIaVH76egXZkB2_GzbH4gCTG_ZcfCDQ,24253
188
- rxiv_maker-1.15.5.dist-info/METADATA,sha256=OQex7fSr5rhnQVasXA_zStz9HcD7O3PPrkZIgq1r65w,19656
189
- rxiv_maker-1.15.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
190
- rxiv_maker-1.15.5.dist-info/entry_points.txt,sha256=ghCN0hI9A1GlG7QY5F6E-xYPflA8CyS4B6bTQ1YLop0,97
191
- rxiv_maker-1.15.5.dist-info/licenses/LICENSE,sha256=GSZFoPIhWDNJEtSHTQ5dnELN38zFwRiQO2antBezGQk,1093
192
- rxiv_maker-1.15.5.dist-info/RECORD,,
188
+ rxiv_maker-1.15.7.dist-info/METADATA,sha256=sqbLf9V-WQv79DaWv1DQqhiAj0Rqx_OOIVqEWxfT5k8,19656
189
+ rxiv_maker-1.15.7.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
190
+ rxiv_maker-1.15.7.dist-info/entry_points.txt,sha256=ghCN0hI9A1GlG7QY5F6E-xYPflA8CyS4B6bTQ1YLop0,97
191
+ rxiv_maker-1.15.7.dist-info/licenses/LICENSE,sha256=GSZFoPIhWDNJEtSHTQ5dnELN38zFwRiQO2antBezGQk,1093
192
+ rxiv_maker-1.15.7.dist-info/RECORD,,