Skip to content

Commit 41c390d

Browse files
committed
single line vs complete install
1 parent cf5a999 commit 41c390d

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

docs/conf.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,23 @@ def run(self):
5959
return [paragraph_node]
6060

6161

62+
class CondaInstallVersionDirective(SphinxDirective):
63+
64+
def run(self):
65+
help_text = (
66+
"conda create -n <env_name> python=3.13\n"
67+
"conda activate <env_name>\n"
68+
f"pip install jwst=={version}\n"
69+
)
70+
paragraph_node = nodes.literal_block(text=help_text)
71+
return [paragraph_node]
72+
73+
6274
def setup(app):
6375
# add a custom AttributeDocumenter subclass to handle Step.spec formatting
6476
app.add_autodocumenter(StepSpecDocumenter, True)
6577
app.add_directive('pip_install_literal', PipInstallVersionDirective)
78+
app.add_directive('conda_install_literal', CondaInstallVersionDirective)
6679

6780

6881
conf = ConfigParser()

docs/getting_started/install.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,9 @@ shell.
4747
Installing Latest Release
4848
-------------------------
4949

50-
You can install the latest released version via ``pip``. From a bash/zsh shell::
50+
You can install the latest released version via ``pip``. From a bash/zsh shell:
5151

52-
conda create -n <env_name> python=3.13
53-
conda activate <env_name>
54-
55-
.. pip_install_literal::
52+
.. conda_install_literal::
5653

5754
|version| |release| If no version tag is specified in the install command, `pip` will find the latest release compatible
5855
with the current environment. This could lead to an unintended `jwst` version if the latest release

0 commit comments

Comments
 (0)