Skip to content

NINAnor/template-r

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NINA R template

🚀 Skip the boring setup and jump straight into coding! This template gives you everything you need for a modern R project - from code formatting to CI/CD - all configured and ready to go.

Requirements

  • uv - An extremely fast Python package installer and resolver
  • git - Version control system
  • pixi - Package manager

uv is needed just copy the template

How to use it

Creating a new project

Make sure that uv is installed, then run (replace your-project-name with your desired project name):

uvx --with copier_template_extensions copier copy --trust gh:ninanor/template-r your-project-name

Answer the questions and you are done.

Applying to an existing project

To apply this template to an existing project directory:

cd your-existing-project
uvx --with copier_template_extensions copier copy --trust gh:ninanor/template-r .

This will add the template files to your current directory. Be careful as this may overwrite existing files.

Features

Why should I use this template:

  • Auto formatting and code checking using air
  • Updatable template - Easy to keep up to date with latest practices
  • Visual Studio Code configurations included
  • Pre-commit hooks for code quality enforcement
  • GitHub Actions workflows for CI/CD

How to update

You just need to run:

uvx --with copier_template_extensions copier update --trust --defaults

In case you want to change your answers you can drop the --defaults flag:

uvx --with copier_template_extensions copier update --trust

In both cases, copier will try to check differences between your project and the template. It might be necessary to fix some conflicts: in this case it is up to the user to decide whenever to include or reject the improvements of the template into the repository.

Check this page for more specific info about this feature.

Struggling with a template?

Please report any issues you have using the template, even if some documentation is unclear or is missing!

Development

NOTE: Development of the template is supported only on Linux, the scripts used for development/maintenance of the template are Linux-only, while the resulting template can also be used in Windows.

Install development dependencies:

  • pinact: ./template_scripts/install-pinact.sh

Testing the template

To test the template using copier-template-tester, run:

pre-commit run

Maintenance

To update dependencies and tools:

./template_scripts/maintenance.sh

How to version

To create a new release:

./template_scripts/release.sh <patch|minor|major>

Example:

./template_scripts/release.sh minor

About

Basic R project template for NINA

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors