-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Readme file to walk someone through using the template #71
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6cab820
Readme updates
lwasser 34de58e
Fix: walk them through the template
lwasser 7f4929c
Merge branch 'main' into get-started
lwasser 032a274
Update README.md
lwasser a7a4be0
fix: edits from @blink1073
lwasser ff8d6d6
Fix: remove extra lines
lwasser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# pyOpenSci Package Template | ||
# pyOpenSci Python Package Template | ||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> | ||
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-) | ||
<!-- ALL-CONTRIBUTORS-BADGE:END --> | ||
|
@@ -7,24 +7,25 @@ | |
|
||
> A Python package template that supports the pyOpenSci | ||
> pure [Python packaging tutorial](https://www.pyopensci.org/python-package-guide/tutorials/intro.html). | ||
|
||
This template can be used with [copier](https://copier.readthedocs.io) to initialize a | ||
new Python package project structure following the practices outlined in the pyOpenSci | ||
tutorial. | ||
|
||
## Getting Started | ||
## Get started | ||
|
||
To use this template: | ||
|
||
1. Install copier using [pipx](https://pipx.pypa.io/stable/) or pip preferably with a [virtual environment](https://www.pyopensci.org/python-package-guide/CONTRIBUTING.html#create-a-virtual-environment). | ||
|
||
```sh | ||
Global Installation: | ||
|
||
```console | ||
pipx install copier | ||
``` | ||
|
||
or | ||
or Environment specific installation: | ||
|
||
```sh | ||
```console | ||
pip install copier | ||
``` | ||
|
||
|
@@ -33,18 +34,87 @@ To use this template: | |
directory, even if it already exists!** That includes your current directory if that | ||
is your target. | ||
|
||
```sh | ||
copier copy gh:pyopensci/pyos-package-template <target> | ||
```console | ||
copier copy gh:pyopensci/pyos-package-template path/here | ||
``` | ||
|
||
The command below will create the package directory in your current working directory. | ||
```console | ||
copier copy gh:pyopensci/pyos-package-template . | ||
``` | ||
|
||
Where `<target>` could be your current directory `.` or some other path. | ||
|
||
Used in the above way, copier will use the latest tagged release, which is probably | ||
the safest option. You can provide an option `--vcs-ref` to choose specific branches | ||
as your source. You can read more about generating your project | ||
in the [copier documentation](https://copier.readthedocs.io/en/stable/generating/). | ||
|
||
### Staying Up-to-date | ||
|
||
## Run the template workflow | ||
|
||
Once you have installed copier, you are ready to create your Python package template. | ||
First, run the command below from your favorite shell. Note that this is copying our template from GitHub so it | ||
will require internet access to run properly. | ||
|
||
The command below will create the package directory in your current working directory. | ||
|
||
`copier copy gh:pyopensci/pyos-package-template .` | ||
|
||
If you wish to create the package directory in another directory you can specify it like this: | ||
|
||
`copier copy gh:pyopensci/pyos-package-template dirname-here` | ||
|
||
## Template overview | ||
The copier template will ask you a series of questions which you can respond to. The questions will | ||
help you customize the template. | ||
|
||
Below is what the template workflow will look like when you run it. In the example below, you | ||
"fully customize" the template. | ||
|
||
|
||
```console | ||
β copier copy gh:pyopensci/pyos-package-template . | ||
π€ Who is the copyright holder, for example, yourself or your organization? Used in the license | ||
pyos | ||
π€ Who is the author of the package to be? Used in the package description. | ||
pyos | ||
π€ The author's email address. Used in the package description. | ||
[email protected] | ||
π€ What is the name of the project? Used as the title in the README.md and other places. | ||
mypkg | ||
π€ Please provide a short description for the package. | ||
(Finish with 'Alt+Enter' or 'Esc then Enter') | ||
> description here | ||
π€ Do you want to skip all remaining questions and simply use the provided default values? | ||
No, I want to fully customize the template. | ||
π€ What is the project slug? Used in hyperlinks. | ||
mypkg | ||
π€ What is the Python package name? Used as the name of the package and the top-level import. | ||
mypkg | ||
π€ Do you want to use dynamic versioning of your package or static? Dynamic means that versions | ||
No | ||
π€ Do you want to use git with a development platform, like GitHub or GitLab? | ||
Yes | ||
π€ Which development platform are you planning to use? Used to generate certain documentation an | ||
GitHub | ||
π€ Your or your organization's username on GitHub. Used to generate certain documentation and hy | ||
pyopensci | ||
π€ Do you want to include documentation for your project and which framework do you want to use? | ||
Sphinx (https://www.pyopensci.org/pyos-sphinx-theme) | ||
π€ Do you want to use hatch environments for running isolated commands like linting, building do | ||
Yes | ||
π€ Do you want to lint your code and generally check the formatting of your files? | ||
Yes | ||
π€ Do you want to use typing annotations and type check your code? | ||
No | ||
π€ Do you want to test your code? Generally, we strongly recommend that you do, but for a quick | ||
Yes | ||
π€ Which license do you want to use? Used in the license file. | ||
MIT | ||
π€ What is the starting year of the project? Used in copyright statements. | ||
2024 | ||
``` | ||
|
||
### Stay up-to-date | ||
|
||
The community will likely continue to develop this template. If at any point, you want | ||
to adopt those changes for your project, you can update it. Read more about that process | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unintended extra lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops thank you for the review, @blink1073 !! i'll fix these! Definitely unintended! I think i'm breaking everything today.