Skip to content

Commit

Permalink
Adding tutorial on setting up package using template (#418)
Browse files Browse the repository at this point in the history
Would potentially resolve #205 

This adds a lightly edited (mainly removing references to workshop)
version of the tutorial we used in the _Festival of Digital Research &
Scholarship_ workshop to the top-level of the repository along with some
linking text to tutorial in `README.md`.

I also made a few small fixes to existing set up instructions in
`README.md` that I noticed while adding link to tutorial.

---------

Co-authored-by: Patrick J. Roddy <[email protected]>
Co-authored-by: Sam Cunliffe <[email protected]>
  • Loading branch information
3 people authored Jun 19, 2024
1 parent 32041fc commit 411ff90
Show file tree
Hide file tree
Showing 3 changed files with 327 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ Python packages with our recommended tooling set up and ready to go.

## Using this template

Some quick instructions for using our template are below.
We also have a detailed [tutorial](tutorial.md) that has been given in a couple of workshops geared towards researchers at UCL.
The tutorial goes into much more pedagogical detail, it both describes using the template to create a package
and how to use the newly created package with some of the tools included.

1. Install [cookiecutter] in a Conda or `venv` environment (commented lines for
Conda example).

Expand All @@ -88,7 +93,7 @@ Python packages with our recommended tooling set up and ready to go.
cookiecutter /path/to/your/checkout/of/python-tooling
```
3. A series of questions will pop up to configure the project. Type the answer
or hit return to use the default option (shown in square brackets).
or hit return to use the default option (shown in parenthesis).
Note that these project variables are defined in the `cookiecutter.json`
file.
Expand All @@ -100,6 +105,7 @@ Python packages with our recommended tooling set up and ready to go.
```
project_name [Python Template]: PROJECT_NAME
project_slug [python-template]: PROJECT_SLUG
package_name [python_template]: PACKAGE_NAME
```
we will get a project folder named `PROJECT_SLUG`, structured like this:
Expand All @@ -110,8 +116,8 @@ Python packages with our recommended tooling set up and ready to go.
├── README.md
├── pyproject.toml
├── src
│ └── PROJECT_SLUG
│ └── PROJECT_SLUG.py
│ └── PACKAGE_NAME
│ └── __init__.py
└── tests
└── test_dummy.py
```
Expand All @@ -125,7 +131,7 @@ Python packages with our recommended tooling set up and ready to go.
...
```
5. To work on your project, initialise a git repository and _install_ it in
5. To work on your project, initialise a Git repository and _install_ it in
editable mode.
```
cd PROJECT_SLUG
Expand Down
3 changes: 3 additions & 0 deletions docs/pages/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ The [UCL-ARC/python-tooling](https://github.com/UCL-ARC/python-tooling)
repository contains our recommended package template for new ARC projects. It
pre-configures the recommended tools listed in the other pages of this site. If
you are working on a new project, our template should be a good starting point!
We have a [tutorial](https://github.com/UCL-ARC/python-tooling/blob/main/tutorial.md)
available with detailed instructions for creating a package using the template
and how to use the newly created package with some of the tools included.

If you're making a package for a community that already has a template in
general use (some examples are listed below) we recommend using their template
Expand Down
Loading

0 comments on commit 411ff90

Please sign in to comment.