@@ -48,10 +48,14 @@ Then you may already have a README.MD file in your project directory.
48
48
<!-- If they use hatch init in the very first lesson -
49
49
the readme will already be there-->
50
50
51
- ### Step 1. Add package badges
51
+ ### Step 1. Add the name of your package as the README title
52
52
53
53
At the top of the ` README.md ` file, add the name of your package.
54
54
55
+ if you are using markdown it should be an header 1 tag which is denoted with a single ` # ` sign.
56
+
57
+ ` # Package-title-here `
58
+
55
59
### Step 2 - add badges to the top of your README file
56
60
57
61
It's common for maintainers to add badges to the top of their README files. Badges allow you and your package users to track things like
@@ -113,15 +117,26 @@ Many packages won't need this section in their README. In that case you can alwa
113
117
### Step 6 - Add a get started section
114
118
115
119
Next add a getting started section that shows how to use your package. This
116
- section should include a small code chunk that demonstrates importing and using
120
+ section should include a small code snippet that demonstrates importing and using
117
121
some of the functionality in your package.
118
122
123
+ :::{admonition} Provide a fully functional code snippet if possible
124
+ :class: important
125
+
126
+ It is important to try to make the code examples that you provide your users as useful as possible.
127
+
128
+ Be sure to provide a copy/paste code example that will work as-is when pasted into a Jupyter Notebook or .py file if that is possible.
129
+
130
+ If there are tokens and other steps needed to run your package, be sure to be clear about what those steps entail.
131
+ :::
132
+
119
133
For the pyosPackage, a short get started demo might look like this:
120
134
121
135
``` python
122
136
>> > from pyospackage.add_numbers import add_num
123
137
>> > add_num(1 , 2 )
124
138
3
139
+ ```
125
140
126
141
Or it could simply be a link to a getting started tutorial that you have created. If
127
142
you don't have this yet, you can leave it empty for the time being.
@@ -176,10 +191,10 @@ To install this package run:
176
191
177
192
Here add a quick code demo showing a user how to use the package after it is installed.
178
193
179
- ```
180
- from packagename.module import xmethod
181
-
182
- a = xmethod.dosomething(var1, var2)
194
+ ```python
195
+ >>> from pyospackage.add_numbers import add_num
196
+ >>> add_num(1, 2)
197
+ 3
183
198
184
199
```
185
200
0 commit comments