rxiv-maker 1.16.1__py3-none-any.whl → 1.16.3__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 +1 -1
- rxiv_maker/cli/commands/init.py +4 -5
- rxiv_maker/cli/commands/upgrade.py +1 -1
- rxiv_maker/cli/framework/base.py +3 -0
- rxiv_maker/cli/framework/workflow_commands.py +4 -22
- rxiv_maker/utils/bst_generator.py +23 -6
- {rxiv_maker-1.16.1.dist-info → rxiv_maker-1.16.3.dist-info}/METADATA +1 -1
- {rxiv_maker-1.16.1.dist-info → rxiv_maker-1.16.3.dist-info}/RECORD +11 -11
- {rxiv_maker-1.16.1.dist-info → rxiv_maker-1.16.3.dist-info}/WHEEL +0 -0
- {rxiv_maker-1.16.1.dist-info → rxiv_maker-1.16.3.dist-info}/entry_points.txt +0 -0
- {rxiv_maker-1.16.1.dist-info → rxiv_maker-1.16.3.dist-info}/licenses/LICENSE +0 -0
rxiv_maker/__version__.py
CHANGED
rxiv_maker/cli/commands/init.py
CHANGED
|
@@ -8,7 +8,7 @@ from ..framework import InitCommand
|
|
|
8
8
|
@click.command(context_settings={"help_option_names": ["-h", "--help"]})
|
|
9
9
|
@click.argument("manuscript_path", type=click.Path(), required=False)
|
|
10
10
|
@click.option("--force", "-f", is_flag=True, help="Force overwrite existing files")
|
|
11
|
-
@click.option("--no-interactive", is_flag=True, help="
|
|
11
|
+
@click.option("--no-interactive", is_flag=True, hidden=True, help="Deprecated (command is always non-interactive)")
|
|
12
12
|
@click.option(
|
|
13
13
|
"--validate", is_flag=True, help="Run validation after initialization to ensure template builds correctly"
|
|
14
14
|
)
|
|
@@ -25,6 +25,9 @@ def init(
|
|
|
25
25
|
**MANUSCRIPT_PATH**: Directory to create for your manuscript.
|
|
26
26
|
Defaults to MANUSCRIPT/
|
|
27
27
|
|
|
28
|
+
This command is fully non-interactive and uses sensible defaults for all values.
|
|
29
|
+
You can customize the manuscript details by editing 00_CONFIG.yml after initialization.
|
|
30
|
+
|
|
28
31
|
Creates all required files including configuration, main content, supplementary
|
|
29
32
|
information, bibliography, and figure directory with example scripts.
|
|
30
33
|
|
|
@@ -45,10 +48,6 @@ def init(
|
|
|
45
48
|
**Initialize and validate template builds correctly:**
|
|
46
49
|
|
|
47
50
|
$ rxiv init --validate
|
|
48
|
-
|
|
49
|
-
**Non-interactive initialization:**
|
|
50
|
-
|
|
51
|
-
$ rxiv init --no-interactive
|
|
52
51
|
"""
|
|
53
52
|
# Use centralized InitCommand framework - eliminates 250+ lines of boilerplate!
|
|
54
53
|
command = InitCommand()
|
|
@@ -5,12 +5,12 @@ import subprocess
|
|
|
5
5
|
import sys
|
|
6
6
|
|
|
7
7
|
import click
|
|
8
|
+
from henriqueslab_updater import force_update_check
|
|
8
9
|
from rich.console import Console
|
|
9
10
|
|
|
10
11
|
from ... import __version__
|
|
11
12
|
from ...utils.changelog_parser import fetch_and_format_changelog
|
|
12
13
|
from ...utils.install_detector import detect_install_method, get_friendly_install_name, get_upgrade_command
|
|
13
|
-
from ...utils.update_checker import force_update_check
|
|
14
14
|
from ..interactive import prompt_confirm
|
|
15
15
|
|
|
16
16
|
console = Console()
|
rxiv_maker/cli/framework/base.py
CHANGED
|
@@ -210,6 +210,9 @@ class BaseCommand(ABC):
|
|
|
210
210
|
return self.execute_operation(**kwargs)
|
|
211
211
|
|
|
212
212
|
except CommandExecutionError as e:
|
|
213
|
+
# Print error message to stderr before exiting
|
|
214
|
+
error_console = Console(stderr=True)
|
|
215
|
+
error_console.print(f"❌ Error: {e}", style="red")
|
|
213
216
|
sys.exit(e.exit_code)
|
|
214
217
|
except KeyboardInterrupt:
|
|
215
218
|
self.handle_keyboard_interrupt(operation_name)
|
|
@@ -50,44 +50,26 @@ class InitCommand(BaseCommand):
|
|
|
50
50
|
|
|
51
51
|
Args:
|
|
52
52
|
force: Force overwrite existing files
|
|
53
|
-
no_interactive:
|
|
53
|
+
no_interactive: Deprecated (command is always non-interactive)
|
|
54
54
|
validate: Run validation after initialization
|
|
55
55
|
template: Template type to use (default, minimal, journal, preprint)
|
|
56
56
|
"""
|
|
57
|
-
from rich.prompt import Prompt
|
|
58
|
-
|
|
59
57
|
# Get manuscript path from raw path (set during setup_common_options)
|
|
60
58
|
manuscript_path = self.raw_manuscript_path
|
|
61
59
|
|
|
62
60
|
manuscript_dir = Path(manuscript_path)
|
|
63
61
|
|
|
64
|
-
# Check if directory exists
|
|
62
|
+
# Check if directory exists and fail if --force not used
|
|
65
63
|
if manuscript_dir.exists() and not force:
|
|
66
|
-
|
|
67
|
-
overwrite = Prompt.ask(
|
|
68
|
-
f"Directory '{manuscript_path}' already exists. Overwrite?", choices=["y", "n"], default="n"
|
|
69
|
-
)
|
|
70
|
-
if overwrite == "n":
|
|
71
|
-
self.console.print("❌ Initialization cancelled", style="yellow")
|
|
72
|
-
return
|
|
73
|
-
else:
|
|
74
|
-
raise CommandExecutionError(f"Directory '{manuscript_path}' already exists. Use --force to overwrite.")
|
|
64
|
+
raise CommandExecutionError(f"Directory '{manuscript_path}' already exists. Use --force to overwrite.")
|
|
75
65
|
|
|
76
|
-
#
|
|
66
|
+
# Always use default values (non-interactive mode only)
|
|
77
67
|
title = "Your Manuscript Title"
|
|
78
68
|
author_name = "Your Name"
|
|
79
69
|
author_email = "your.email@example.com"
|
|
80
70
|
author_orcid = "0000-0000-0000-0000"
|
|
81
71
|
author_affiliation = "Your Institution"
|
|
82
72
|
|
|
83
|
-
if not no_interactive:
|
|
84
|
-
self.console.print("\n📝 Enter manuscript details (press Enter for defaults):")
|
|
85
|
-
title = Prompt.ask("Title", default=title)
|
|
86
|
-
author_name = Prompt.ask("Author name", default=author_name)
|
|
87
|
-
author_email = Prompt.ask("Author email", default=author_email)
|
|
88
|
-
author_orcid = Prompt.ask("Author ORCID", default=author_orcid)
|
|
89
|
-
author_affiliation = Prompt.ask("Author affiliation", default=author_affiliation)
|
|
90
|
-
|
|
91
73
|
with self.create_progress() as progress:
|
|
92
74
|
task = progress.add_task(f"Initializing manuscript (template: {template})...", total=2)
|
|
93
75
|
|
|
@@ -50,12 +50,29 @@ def generate_bst_file(format_type: str, output_dir: Path) -> Path:
|
|
|
50
50
|
format_string = BST_FORMAT_MAP[format_type]
|
|
51
51
|
|
|
52
52
|
# Find the template .bst file in the package
|
|
53
|
-
#
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
# Try multiple locations for development and installed configurations
|
|
54
|
+
possible_template_paths = [
|
|
55
|
+
# Installed package location (site-packages/rxiv_maker/tex/style/)
|
|
56
|
+
Path(__file__).parent.parent / "tex" / "style" / "rxiv_maker_style.bst",
|
|
57
|
+
# Development location (src/tex/style/)
|
|
58
|
+
Path(__file__).parent.parent.parent / "tex" / "style" / "rxiv_maker_style.bst",
|
|
59
|
+
# Alternative development location
|
|
60
|
+
Path(__file__).parent.parent.parent.parent / "src" / "tex" / "style" / "rxiv_maker_style.bst",
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
template_path = None
|
|
64
|
+
for path in possible_template_paths:
|
|
65
|
+
if path.exists():
|
|
66
|
+
template_path = path
|
|
67
|
+
break
|
|
68
|
+
|
|
69
|
+
if template_path is None:
|
|
70
|
+
searched_paths = "\n".join(f" - {p}" for p in possible_template_paths)
|
|
71
|
+
raise FileNotFoundError(
|
|
72
|
+
f"Template .bst file not found.\n"
|
|
73
|
+
f"Searched locations:\n{searched_paths}\n"
|
|
74
|
+
f"This may indicate a corrupted installation."
|
|
75
|
+
)
|
|
59
76
|
|
|
60
77
|
# Read the template file
|
|
61
78
|
try:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rxiv-maker
|
|
3
|
-
Version: 1.16.
|
|
3
|
+
Version: 1.16.3
|
|
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=
|
|
2
|
+
rxiv_maker/__version__.py,sha256=Ee6U6W-eWQHTVnWV61WELv3p6G3PUDkO5Vt_RwLkSb0,51
|
|
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
|
|
@@ -22,24 +22,24 @@ rxiv_maker/cli/commands/create_repo.py,sha256=jWPwT1Ai7XBhFAi9JmSAobdFYXPlSgQCD-
|
|
|
22
22
|
rxiv_maker/cli/commands/docx.py,sha256=yFJxwDyQ8F6M9n4R6AUx0lq03iMQevuI_9eY2t6ke24,2849
|
|
23
23
|
rxiv_maker/cli/commands/figures.py,sha256=WraC0BjwxKImzCwt1A3vWs8_T4w2misP1eeW6aznpCw,3250
|
|
24
24
|
rxiv_maker/cli/commands/get_rxiv_preprint.py,sha256=nSPuFpS5xZ9VaUrmwnFZ5RCAAjj0ORAj8x_EJmH0Xtg,8543
|
|
25
|
-
rxiv_maker/cli/commands/init.py,sha256=
|
|
25
|
+
rxiv_maker/cli/commands/init.py,sha256=2UiXtk7a5bklqwevWwhbL9lU1ASBxUwzm7JdrINHcGA,1797
|
|
26
26
|
rxiv_maker/cli/commands/install_deps.py,sha256=7gE9EKwxkWxcsG5xlyMmIOpi4f0JAUqqvDviwkSIf8s,1724
|
|
27
27
|
rxiv_maker/cli/commands/repo_init.py,sha256=FlAdxYi9ST01T47LUZ7zAytR7UkyKVn6MIC6cMRCbv0,6625
|
|
28
28
|
rxiv_maker/cli/commands/repos.py,sha256=SQ9nuhSkyHKFPYn_TrOxyQoGdDRI-OBOgUSGJpRu0wo,6148
|
|
29
29
|
rxiv_maker/cli/commands/repos_search.py,sha256=6sUMvyHlHEX1p88hPtu0_Hf8z6JpOinJ53l9ZI-rirc,7743
|
|
30
30
|
rxiv_maker/cli/commands/setup.py,sha256=9ue4bDETpSPGVkWFDfpuTDsysax5-QKGxmt42Gb7oeU,2294
|
|
31
31
|
rxiv_maker/cli/commands/track_changes.py,sha256=omf_77A7htRSa8naUEPTTtUTxrSwMpzHFOuU0j1xAJw,1163
|
|
32
|
-
rxiv_maker/cli/commands/upgrade.py,sha256=
|
|
32
|
+
rxiv_maker/cli/commands/upgrade.py,sha256=5yA8Aa_zIwJ6PBE94NB_ZqRYhiQkawm-lc43u04NiYY,7301
|
|
33
33
|
rxiv_maker/cli/commands/validate.py,sha256=3JghFQevJvQDQII4p_QWbQXMEUyDpM-t9-WxtaT4edo,1629
|
|
34
34
|
rxiv_maker/cli/commands/version.py,sha256=VMlfSxxsrZH02d24MXLUDZfHBW39yZRpWxUpMhQ-X0Y,2737
|
|
35
35
|
rxiv_maker/cli/framework/__init__.py,sha256=4FPXdP8J6v4eeEn46mwY0VtnwxjR1jnW_kTrXykQlQs,2704
|
|
36
|
-
rxiv_maker/cli/framework/base.py,sha256=
|
|
36
|
+
rxiv_maker/cli/framework/base.py,sha256=GcDFFOGVrLSlRgwDPmMkEAL60TbgT-maTyiCp1g-BrA,7886
|
|
37
37
|
rxiv_maker/cli/framework/cache_commands.py,sha256=J91UYLTsLTRoNdzuhAbNL2bJJovYYfX3T9jI8cNUBWU,9897
|
|
38
38
|
rxiv_maker/cli/framework/config_commands.py,sha256=a1uOQkCCw3d4qlro3OwHIorcoNg03T_R4-HbfVb-hmQ,19336
|
|
39
39
|
rxiv_maker/cli/framework/content_commands.py,sha256=RilxKeG2c1m2fu0CtWAvP3cGh11DGx9P-nh2kIewAg4,22596
|
|
40
40
|
rxiv_maker/cli/framework/decorators.py,sha256=fh085e3k1CaLSMoZevt8hvgnEuejrf-mcNS-dwXoY_A,10365
|
|
41
41
|
rxiv_maker/cli/framework/utility_commands.py,sha256=_P_KwjlyiNS-vVboU-DqkHynGPqzXyoZRWGmLMLTnOs,26214
|
|
42
|
-
rxiv_maker/cli/framework/workflow_commands.py,sha256=
|
|
42
|
+
rxiv_maker/cli/framework/workflow_commands.py,sha256=CFa3c5oJMmy9cUZxTAU97eKC6YrOljzerSAMrywjbKw,29684
|
|
43
43
|
rxiv_maker/config/defaults.py,sha256=vHyLGVxe5-z9TLxu5f6NhquPvqQkER_KZv_j1I4_dHQ,3055
|
|
44
44
|
rxiv_maker/config/validator.py,sha256=9XDPfo_YgasGt6NLkl6HIhaGh1fr6XsFNiXU2DSsivw,38299
|
|
45
45
|
rxiv_maker/converters/__init__.py,sha256=d7WGsRwWqRQWO117IkKDP0Ap0ERiK0N2-dXHInye3_A,685
|
|
@@ -147,7 +147,7 @@ rxiv_maker/utils/__init__.py,sha256=4ya5VR8jqRqUChlnUeMeeetOuWV-gIvjPwcE1u_1OnI,
|
|
|
147
147
|
rxiv_maker/utils/author_name_formatter.py,sha256=UjvarbyQm89EUIYqckygx3g37o-EcNyvipBtY8GJDxs,10222
|
|
148
148
|
rxiv_maker/utils/bibliography_checksum.py,sha256=Jh4VILSpGQ5KJ9UBCUb7oFy6lZ9_ncXD87vEXxw5jbY,10270
|
|
149
149
|
rxiv_maker/utils/bibliography_parser.py,sha256=WZIQoEpVwdbLmbkw9FdkVgoLE5GX7itqnzPnEEb_fFU,6846
|
|
150
|
-
rxiv_maker/utils/bst_generator.py,sha256=
|
|
150
|
+
rxiv_maker/utils/bst_generator.py,sha256=kS4k_cc2GNm3l-bwaVU7uffWbH3VDzHwgCXHn7Ro9xI,5002
|
|
151
151
|
rxiv_maker/utils/changelog_parser.py,sha256=WCDp9Iy6H6_3nC6FB7RLt6i00zuCyvU17sCU4e3pqCY,11954
|
|
152
152
|
rxiv_maker/utils/citation_utils.py,sha256=spIgVxPAN6jPvoG-eOE00rVX_buUGKnUjP1Fhz31sl4,5134
|
|
153
153
|
rxiv_maker/utils/dependency_checker.py,sha256=EdyIvk-W_bhC1DJCpFw5ePhjEU74C9j7RYMm06unBMA,14366
|
|
@@ -187,8 +187,8 @@ rxiv_maker/validators/doi/metadata_comparator.py,sha256=euqHhKP5sHQAdZbdoAahUn6Y
|
|
|
187
187
|
rxiv_maker/tex/template.tex,sha256=zrJ3aFfu8j9zkg1l375eE9w-j42P3rz16wMD3dSgi1I,1354
|
|
188
188
|
rxiv_maker/tex/style/rxiv_maker_style.bst,sha256=jbVqrJgAm6F88cow5vtZuPBwwmlcYykclTm8RvZIo6Y,24281
|
|
189
189
|
rxiv_maker/tex/style/rxiv_maker_style.cls,sha256=F2qtnS9mI6SwOIaVH76egXZkB2_GzbH4gCTG_ZcfCDQ,24253
|
|
190
|
-
rxiv_maker-1.16.
|
|
191
|
-
rxiv_maker-1.16.
|
|
192
|
-
rxiv_maker-1.16.
|
|
193
|
-
rxiv_maker-1.16.
|
|
194
|
-
rxiv_maker-1.16.
|
|
190
|
+
rxiv_maker-1.16.3.dist-info/METADATA,sha256=oM615ZOWCjw_f6jWA7K0rnaI9S19-C9mks2Afm9JLZ0,19818
|
|
191
|
+
rxiv_maker-1.16.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
192
|
+
rxiv_maker-1.16.3.dist-info/entry_points.txt,sha256=ghCN0hI9A1GlG7QY5F6E-xYPflA8CyS4B6bTQ1YLop0,97
|
|
193
|
+
rxiv_maker-1.16.3.dist-info/licenses/LICENSE,sha256=GSZFoPIhWDNJEtSHTQ5dnELN38zFwRiQO2antBezGQk,1093
|
|
194
|
+
rxiv_maker-1.16.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|