Skip to content

Commit 82495aa

Browse files
committed
enh: coc and readme update
1 parent ef4fd05 commit 82495aa

File tree

3 files changed

+54
-32
lines changed

3 files changed

+54
-32
lines changed

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# pyOpenSci Code of Conduct
2+
3+
[The pyOpenSci Code of Conduct can be found here.](https://www.pyopensci.org/handbook/CODE_OF_CONDUCT.html)

README.md

Lines changed: 48 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
> A Python package template that supports the pyOpenSci
99
> pure [Python packaging tutorial](https://www.pyopensci.org/python-package-guide/tutorials/intro.html).
1010
This template can be used with [copier](https://copier.readthedocs.io) to initialize a
11-
new Python package project structure following the practices outlined in the pyOpenSci
12-
tutorial.
11+
new Python package project structure following the practices outlined in the
12+
[pyOpenSci pure Python packaging tutorial](https://www.pyopensci.org/python-package-guide/tutorials/installable-code.html).
13+
14+
If you want to learn more about packaging, check out our [Python packaging guide](https://www.pyopensci.org/python-package-guide/).
1315

1416
## Get started
1517

@@ -73,49 +75,55 @@ short. This workflow creates the simplest version of a Python package including
7375
`tests\` directory and a `docs\` directory using Sphinx.
7476

7577
```console
76-
pyos-package-template (☊ minimal) [🏎️ 💨 ×6] via 🐍 v3.12.5 (test.py3.12)
77-
copier copy . _law_tests --vcs-ref minimal
78-
🎤 Who is the copyright holder, for example, yourself or your organization? Used in the license file and project description.
79-
Your Name
80-
🎤 Who is the author of the package to be? Used in the package description.
81-
Your Name
82-
🎤 The author's email address. Used in the package description.
83-
email@youremail.com
84-
🎤 What is the name of the project? Used as the title in the README.md and other places.
85-
project_name
78+
copier copy gh:pyopensci/pyos-package-template .
79+
🎤 "Welcome to the pyOpenSci package template.
80+
Please select the type of template that you want to create today."
81+
>> MINIMAL: I want a minimal setup (package, tests and docs; typing); linting not included).
82+
FULL DEFAULT: I want to use the default settings but I want it setup for me.
83+
FULL CUSTOM: I want it all but I want to fully customize all template elements.
84+
🎤 What is the name of the project? Used as the README.md title, in the
85+
pyospackage_juno
8686
🎤 Please provide a short description for the package.
8787
(Finish with 'Alt+Enter' or 'Esc then Enter')
88-
> An example Python package with a minimal setup.
89-
🎤 Do you want to skip all remaining questions and use the default values?
90-
>> Yes, but with a minimal setup (package, tests and docs only).
88+
> A great package that adds and subtracts numbers.
89+
90+
🎤 Who is the author of the package? Used in the package description.
91+
juno dawg
92+
🎤 Provide you or your organization's GitHub username. Used to generate
93+
pyopensci
9194

92-
Copying from template version 0.6.1.post44.dev0+7863796
95+
Copying from template version 0.6.4.1
96+
identical .
9397
create CODE_OF_CONDUCT.md
98+
create .gitignore
9499
create CHANGELOG.md
95-
create CONTRIBUTING.md
96100
create LICENSE
97101
create README.md
98102
create tests
99103
create tests/unit
100-
create tests/unit/.keep
101-
create tests/integration
102-
create tests/integration/.keep
103-
create tests/system
104-
create tests/system/test_import.py
105-
create tests/system/.keep
104+
create tests/unit/test_example.py
106105
identical .editorconfig
107-
identical .gitignore
106+
create .github
107+
create .github/workflows
108+
create .github/workflows/release.yml
109+
create .github/workflows/test.yml
110+
create .github/PULL_REQUEST_TEMPLATE.md
111+
create .github/ISSUE_TEMPLATE
112+
create .github/ISSUE_TEMPLATE/config.yml
113+
create .github/ISSUE_TEMPLATE/01-bug-report.yml
114+
create CONTRIBUTING.md
108115
create docs
109116
create docs/conf.py
110117
create docs/index.md
111118
create pyproject.toml
112119
create src
113-
create src/pyopensci
114-
create src/pyopensci/example.py
115-
create src/pyopensci/__init__.py
120+
create src/pyospackage_juno
121+
create src/pyospackage_juno/example.py
122+
create src/pyospackage_juno/__init__.py
116123
```
117124

118-
Once you have created your package, you can install it in editable mode using pip:
125+
Once you have created your package, you can install it in editable mode using
126+
pip.
119127

120128
First, CD to the directory where your new package lives and install the package in editable mode:
121129

@@ -126,7 +134,8 @@ $ pip install -e . # install your package in editable mode
126134
$ python # open up a python prompt
127135
```
128136

129-
We have included a small module in the package in case you want to test it out.
137+
We have included a small module in the package template in case you want to
138+
test drive that package in an environment before adding to it.
130139

131140
```python
132141
>>> from your_package import example # we have called the sample module, example.py
@@ -136,6 +145,9 @@ We have included a small module in the package in case you want to test it out.
136145
```
137146

138147
### Build your package
148+
149+
The template has Hatch environments setup.
150+
139151
You can build your package using `Hatch` which is included in the template.
140152
First, make sure you have `Hatch` installed in your environment. Then,
141153
run `hatch build`.
@@ -148,6 +160,13 @@ dist/yourpackage-0.1.0.tar.gz
148160
dist/yourpackage-0.1.0-py2.py3-none-any.whl
149161
```
150162

163+
To use the hatch build environment run:
164+
165+
`hatch run build:check`
166+
167+
This will create a new `venv` environment and build your package's wheel and
168+
source distributions.
169+
151170
### Full customization: A more complex example package
152171

153172
If you want to fully customize your package, then the template workflow will

copier.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ template_mode:
66
"Welcome to the pyOpenSci package template.
77
Please select the type of template that you want to create today."
88
choices:
9-
"Yes, but with a minimal setup (package, tests and docs; typing, linting not included).": "minimal"
10-
"I want to use the default settings but I want it setup for me. ": "full"
11-
"I want it all but I want to fully customize all elements of the template.": "custom" # changed from no to to custom
9+
"MINIMAL: I want a minimal setup (package, tests and docs; typing); linting not included).": "minimal"
10+
"FULL DEFAULT: I want to use the default settings but I want it setup for me.": "full"
11+
"FULL CUSTOM: I want it all but I want to fully customize all template elements.": "custom" # changed from no to to custom
1212

1313
default: "minimal"
1414

0 commit comments

Comments
 (0)