Skip to content

Commit

Permalink
fix getting_started
Browse files Browse the repository at this point in the history
  • Loading branch information
fabridamicelli committed Oct 17, 2024
1 parent 4a19064 commit 47bd0fd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
12 changes: 4 additions & 8 deletions chapters/01_getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"To start a new project run in your terminal:\n",
"\n",
"```bash\n",
"uv init pycourse --lib --python 3.13\n",
"uv init pycourse --lib --python 3.12\n",
"```\n",
"`pycourse` is the name of the project, you can choose anything you want. \n",
"The `--lib` flag tells `uv` to install the current code as a \"library\" (don't worry about this yet, it's just something we need to get things working for now). \n",
Expand Down Expand Up @@ -90,21 +90,17 @@
"If everything worked fine you should be able to run this:\n",
"\n",
"```bash\n",
"uv run pycourse\n",
"uv run python\n",
"```\n",
"and see this output:\n",
"\n",
"```\n",
"Hello from pycourse!\n",
"```"
"and see a python REPL."
]
},
{
"cell_type": "markdown",
"id": "e6ec7541-6fc9-41c4-9947-d965c96d6f5a",
"metadata": {},
"source": [
"Contratulations, you just run your first Python program – we're ready to go 🚀!"
"We're ready to go 🚀!"
]
}
],
Expand Down
9 changes: 4 additions & 5 deletions docs/01_getting_started.html
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ <h2 data-number="1.2" class="anchored" data-anchor-id="install-uv"><span class="
<section id="working-on-a-project" class="level2" data-number="1.3">
<h2 data-number="1.3" class="anchored" data-anchor-id="working-on-a-project"><span class="header-section-number">1.3</span> Working on a project</h2>
<p>To start a new project run in your terminal:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">uv</span> init pycourse <span class="at">--lib</span> <span class="at">--python</span> 3.13</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="sourceCode" id="cb3"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">uv</span> init pycourse <span class="at">--lib</span> <span class="at">--python</span> 3.12</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p><code>pycourse</code> is the name of the project, you can choose anything you want.<br>
The <code>--lib</code> flag tells <code>uv</code> to install the current code as a “library” (don’t worry about this yet, it’s just something we need to get things working for now).<br>
The <code>--python</code> flags specifies the specific python version we want to work with in this project. If the version is already installed in our machine <code>uv</code> will just use it, otherwise <code>uv</code> will download it and keep it for future usage.</p>
Expand All @@ -413,10 +413,9 @@ <h2 data-number="1.3" class="anchored" data-anchor-id="working-on-a-project"><sp
└── pycourse
└── __init__.py</code></pre>
<p>If everything worked fine you should be able to run this:</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">uv</span> run pycourse</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>and see this output:</p>
<pre><code>Hello from pycourse!</code></pre>
<p>Contratulations, you just run your first Python program – we’re ready to go 🚀!</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="ex">uv</span> run python</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<p>and see a python REPL.</p>
<p>We’re ready to go 🚀!</p>


</section>
Expand Down
2 changes: 1 addition & 1 deletion docs/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"href": "01_getting_started.html#working-on-a-project",
"title": "1  Getting Started",
"section": "1.3 Working on a project",
"text": "1.3 Working on a project\nTo start a new project run in your terminal:\nuv init pycourse --lib --python 3.13\npycourse is the name of the project, you can choose anything you want.\nThe --lib flag tells uv to install the current code as a “library” (don’t worry about this yet, it’s just something we need to get things working for now).\nThe --python flags specifies the specific python version we want to work with in this project. If the version is already installed in our machine uv will just use it, otherwise uv will download it and keep it for future usage.\nuv will create a new directory with all the necessary boilerplate to get python running, including a virtual environment (by default, under the hidden directory .venv) and a pyproject.toml file (we’ll look at those later when dealing with dependencies).\nFor more details on uv and projects see the documentation here.\nChange your directory into the newly created folder:\ncd pycourse\nYou should see a structure like this:\npycourse\n├── pyproject.toml\n├── README.md\n└── src\n └── pycourse\n └── __init__.py\nIf everything worked fine you should be able to run this:\nuv run pycourse\nand see this output:\nHello from pycourse!\nContratulations, you just run your first Python program – we’re ready to go 🚀!",
"text": "1.3 Working on a project\nTo start a new project run in your terminal:\nuv init pycourse --lib --python 3.12\npycourse is the name of the project, you can choose anything you want.\nThe --lib flag tells uv to install the current code as a “library” (don’t worry about this yet, it’s just something we need to get things working for now).\nThe --python flags specifies the specific python version we want to work with in this project. If the version is already installed in our machine uv will just use it, otherwise uv will download it and keep it for future usage.\nuv will create a new directory with all the necessary boilerplate to get python running, including a virtual environment (by default, under the hidden directory .venv) and a pyproject.toml file (we’ll look at those later when dealing with dependencies).\nFor more details on uv and projects see the documentation here.\nChange your directory into the newly created folder:\ncd pycourse\nYou should see a structure like this:\npycourse\n├── pyproject.toml\n├── README.md\n└── src\n └── pycourse\n └── __init__.py\nIf everything worked fine you should be able to run this:\nuv run python\nand see a python REPL.\nWe’re ready to go 🚀!",
"crumbs": [
"<span class='chapter-number'>1</span>  <span class='chapter-title'>Getting Started</span>"
]
Expand Down
2 changes: 1 addition & 1 deletion docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</url>
<url>
<loc>https://fabridamicelli.github.io/python-course/01_getting_started.html</loc>
<lastmod>2024-10-15T19:44:05.871Z</lastmod>
<lastmod>2024-10-17T11:39:27.189Z</lastmod>
</url>
<url>
<loc>https://fabridamicelli.github.io/python-course/010_executing_code.html</loc>
Expand Down

0 comments on commit 47bd0fd

Please sign in to comment.