You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _sources/tutorials/1-installable-code.md.txt
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -258,7 +258,7 @@ pyospackage/
258
258
├── add_numbers.py
259
259
```
260
260
261
-
## Step 3. Add code to your `add_numbers.py` module
261
+
## Step 3: Add code to your `add_numbers.py` module
262
262
263
263
If you are following along and making a Python package from scratch then you can add the code below to your `add_numbers.py` module. The function below adds two integers together and returns the result. Notice that the code below has a few features that we will review in future tutorials:
<h2>Step 3. Add code to your <codeclass="docutils literal notranslate"><spanclass="pre">add_numbers.py</span></code> module<aclass="headerlink" href="#step-3-add-code-to-your-add-numbers-py-module" title="Link to this heading">#</a></h2>
745
+
<h2>Step 3: Add code to your <codeclass="docutils literal notranslate"><spanclass="pre">add_numbers.py</span></code> module<aclass="headerlink" href="#step-3-add-code-to-your-add-numbers-py-module" title="Link to this heading">#</a></h2>
746
746
<p>If you are following along and making a Python package from scratch then you can add the code below to your <codeclass="docutils literal notranslate"><spanclass="pre">add_numbers.py</span></code> module. The function below adds two integers together and returns the result. Notice that the code below has a few features that we will review in future tutorials:</p>
747
747
<olclass="arabic simple">
748
748
<li><p>It has a <aclass="reference internal" href="../documentation/write-user-documentation/document-your-code-api-docstrings.html#numpy-docstring"><spanclass="std std-ref">numpy-style docstring</span></a></p></li>
@@ -779,7 +779,7 @@ <h2>Step 3. Add code to your <code class="docutils literal notranslate"><span cl
<h2>Step 4. Modify metadata in your <codeclass="docutils literal notranslate"><spanclass="pre">pyproject.toml</span></code> file<aclass="headerlink" href="#step-4-modify-metadata-in-your-pyproject-toml-file" title="Link to this heading">#</a></h2>
782
+
<h2>Step 4: Modify metadata in your <codeclass="docutils literal notranslate"><spanclass="pre">pyproject.toml</span></code> file<aclass="headerlink" href="#step-4-modify-metadata-in-your-pyproject-toml-file" title="Link to this heading">#</a></h2>
783
783
<p>Next, you will modify some of the metadata (information) that
784
784
Hatch adds to your <codeclass="docutils literal notranslate"><spanclass="pre">pyproject.toml</span></code> file. You are
785
785
are welcome to copy the file we have in our <aclass="reference external" href="https://github.com/pyOpenSci/pyosPackage">example pyospackage GitHub repository</a>.</p>
@@ -866,8 +866,8 @@ <h2>Step 4. Modify metadata in your <code class="docutils literal notranslate"><
<h2>Step 5. Install your package locally<aclass="headerlink" href="#step-5-install-your-package-locally" title="Link to this heading">#</a></h2>
924
+
<h2>Step 5: Install your package locally<aclass="headerlink" href="#step-5-install-your-package-locally" title="Link to this heading">#</a></h2>
925
925
<p>At this point you should have:</p>
926
926
<olclass="arabic simple">
927
927
<li><p>A project directory structure with a <codeclass="docutils literal notranslate"><spanclass="pre">pyproject.toml</span></code> file at the root</p></li>
@@ -1007,8 +1007,8 @@ <h3>Look for pyospackage in your environment<a class="headerlink" href="#look-fo
1007
1007
</div>
1008
1008
</section>
1009
1009
</section>
1010
-
<sectionid="test-out-your-new-package">
1011
-
<h2>6. Test out your new package<aclass="headerlink" href="#test-out-your-new-package" title="Link to this heading">#</a></h2>
1010
+
<sectionid="step-6-test-out-your-new-package">
1011
+
<h2>Step 6: Test out your new package<aclass="headerlink" href="#step-6-test-out-your-new-package" title="Link to this heading">#</a></h2>
1012
1012
<p>After installing your package, type “python” at the command prompt in your chosen terminal to start
1013
1013
a Python session in your active Python environment.</p>
1014
1014
<p>You can now import your package and access the <codeclass="docutils literal notranslate"><spanclass="pre">add_num</span></code> function.</p>
@@ -1135,16 +1135,16 @@ <h2>Footnotes<a class="headerlink" href="#footnotes" title="Link to this heading
1135
1135
<liclass="toc-h2 nav-item toc-entry"><aclass="reference internal nav-link" href="#time-to-create-your-python-package">Time to create your Python package!</a></li>
1136
1136
<liclass="toc-h2 nav-item toc-entry"><aclass="reference internal nav-link" href="#step-1-set-up-the-package-directory-structure">Step 1: Set Up the Package Directory Structure</a></li>
1137
1137
<liclass="toc-h2 nav-item toc-entry"><aclass="reference internal nav-link" href="#step-2-add-code-to-your-package">Step 2: Add code to your package</a></li>
1138
-
<liclass="toc-h2 nav-item toc-entry"><aclass="reference internal nav-link" href="#step-3-add-code-to-your-add-numbers-py-module">Step 3. Add code to your <codeclass="docutils literal notranslate"><spanclass="pre">add_numbers.py</span></code> module</a></li>
1139
-
<liclass="toc-h2 nav-item toc-entry"><aclass="reference internal nav-link" href="#step-4-modify-metadata-in-your-pyproject-toml-file">Step 4. Modify metadata in your <codeclass="docutils literal notranslate"><spanclass="pre">pyproject.toml</span></code> file</a><ulclass="nav section-nav flex-column">
<liclass="toc-h3 nav-item toc-entry"><aclass="reference internal nav-link" href="#look-for-pyospackage-in-your-environment">Look for pyospackage in your environment</a></li>
1145
1145
</ul>
1146
1146
</li>
1147
-
<liclass="toc-h2 nav-item toc-entry"><aclass="reference internal nav-link" href="#test-out-your-new-package">6. Test out your new package</a></li>
1147
+
<liclass="toc-h2 nav-item toc-entry"><aclass="reference internal nav-link" href="#step-6-test-out-your-new-package">Step 6: Test out your new package</a></li>
1148
1148
<liclass="toc-h2 nav-item toc-entry"><aclass="reference internal nav-link" href="#congratulations-you-created-your-first-python-package">Congratulations! You created your first Python package</a></li>
0 commit comments