Skip to content

Commit

Permalink
fix running-code cross linking
Browse files Browse the repository at this point in the history
  • Loading branch information
ucodery committed Dec 13, 2024
1 parent a4a6c1f commit a064e5e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,23 +193,23 @@ There are different sessions in nox related to building the docs: `docs`, `docs-
* `docs`: this session builds the guide and opens it in your browser.

```bash
nox -e docs
nox -s docs
```

To see the guide built locally, open the file `_build/html/index.html` in your browser.

* `docs-test`: this session runs the tests for the guide.

```bash
nox -e docs-test
nox -s docs-test
```

If the tests fail, you will see an error message in your terminal. You need to fix the errors before submitting your pull request.

* `docs-live`: this session builds the guide and opens it in your browser with live reloading.

```bash
nox -e docs-live
nox -s docs-live
```

open the local version of the guide in your browser at ``localhost`` shown in the terminal.
Expand All @@ -219,7 +219,7 @@ There are different sessions in nox related to building the docs: `docs`, `docs-
Before submitting your pull request, make sure to run the tests and check the formatting of your code.

```bash
nox -e docs-test
nox -s docs-test
```

If the tests fail, you will see an error message in your terminal. You need to fix the errors before submitting your pull request.
Expand Down
8 changes: 4 additions & 4 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
* [Write Conditionals to redirect code](conditionals)
* [Common Python exceptions](common-exceptions)

<!--
<!--
TODO: let's merge this with the conditional lesson
* [Conditionals with alternatives](conditionals-alternatives)
* [Conditionals with alternatives](conditionals-alternatives)
-->
:::
::::
Expand All @@ -45,8 +45,8 @@ TODO: let's merge this with the conditional lesson
:::{card} [✿ Running Code ✿](running-code/intro)
:class-card: left-aligned

* [Execute a Python Package](execute-package)
* [Execute a Python Script](execute-script)
* [Execute a Python Package](running-code/execute-package)
* [Execute a Python Script](running-code/execute-script)

:::
::::
Expand Down
7 changes: 3 additions & 4 deletions running-code/execute-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ kernelspec:
name: python3
---

(execute-package)=
# How to Execute a Python Package

In [How to Execute a Python Script](execute-script) you learned about two primary ways to execute a stand-alone Python script.
In [How to Execute a Python Script](./execute-script) you learned about two primary ways to execute a stand-alone Python script.
There are two other ways to execute Python code from the command line, both of which work for code that has been formatted as a package.

1. You can [**execute modules**](#executable-modules) using their import name
2. You can [**execute packages**](#executable-packages) using a `__main__.py` file
2. You can [**execute packages**](#executable-packages) using a `__main__.py` file
3. A package can provide arbitraty command names that execute parts of themselves

## 1. Executable modules
Expand Down Expand Up @@ -161,4 +160,4 @@ On your own or in small groups:
- List some disadvantages of making a Python package executable over providing a script entry point.
- Review the Pros section from [How to Execute a Python Script](execute-script-comparison)
- Do you see any similarities between executable packages and executable script files?
- Do you notice any similarities between entrypoint scripts and executable script files?
- Do you notice any similarities between entrypoint scripts and executable script files?
1 change: 0 additions & 1 deletion running-code/execute-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ kernelspec:
name: python3
---

(execute-script)=
# How to Execute a Python Script

There are two primary ways to execute a Python script.
Expand Down

0 comments on commit a064e5e

Please sign in to comment.