Note

This documentation is for a development version. Click here for the latest stable release (v0.11.1).

Command line interface

Generating files

In general, the only command that downstream repos will ever need to run is

bones generate

from the root directory containing .nengobones.yml. This updates all of the templated files that need to be manually updated and committed to the downstream repository. Note that there are other files that bones generate can generate, but this is done automatically (i.e., dynamically) by nengo-bones during continuous integration.

However, it may be helpful when debugging a .nengobones.yml configuration to be able to see the rendered output, so we expose all the nengo-bones functionality through different command line options, which can be found below.

bones generate

Loads config file and sets up template environment.

By default, this updates all templated files that are to be committed to the repository.

We look in the current directory for a .templates folder. If it exists, any templates defined in that folder will be loaded first. Otherwise, built-in templates will be loaded from the nengo_bones/templates directory.

If you are overriding a template in the .templates folder, the original built-in version of that template can be accessed with the templates/ prefix. This is useful in include and extends tags. For example, to add text to the default LICENSE.rst template, put the following in .templates/LICENSE.rst.template:

{% include "templates/LICENSE.rst.template %}

Additional license info
=======================
...
bones generate [OPTIONS] COMMAND [ARGS]...

Options

--conf-file <conf_file>

Filepath for config file

--output-dir <output_dir>

Output directory for scripts

ci-scripts

Generate CI shell scripts.

bones generate ci-scripts [OPTIONS]

contributing-rst

Generate CONTRIBUTING.rst file.

bones generate contributing-rst [OPTIONS]

contributors-rst

Generate CONTRIBUTORS.rst file.

bones generate contributors-rst [OPTIONS]

docs-conf-py

Generate docs/conf.py file.

bones generate docs-conf-py [OPTIONS]

license-rst

Generate LICENSE.rst file.

bones generate license-rst [OPTIONS]

manifest-in

Generate MANIFEST.in file.

bones generate manifest-in [OPTIONS]

py-typed

Generate {{ pkg_name }}/py.typed file.

bones generate py-typed [OPTIONS]

pyproject-toml

Generate pyproject.toml file.

bones generate pyproject-toml [OPTIONS]

setup-cfg

Generate setup.cfg file.

bones generate setup-cfg [OPTIONS]

setup-py

Generate setup.py file.

bones generate setup-py [OPTIONS]

version-py

Generate {{ pkg_name }}/version.py file.

bones generate version-py [OPTIONS]

bones check

Validates auto-generated project files.

Note: This does not check the ci scripts, because those are generated on-the-fly during CI (so any ci files we do find are likely local artifacts).

bones check [OPTIONS]

Options

--root-dir <root_dir>

Directory containing files to be checked

--conf-file <conf_file>

Filepath for config file

--verbose

Show more information about failed checks.

Other development support scripts

This repository also contains scripts to automate various development tasks.

bones pr-number

Get the next available PR number for a repository.

When writing a CHANGELOG entry, it helpful to predict the PR number for the branch before the PR has actually been made. This script counts the issues in the repository and returns the next available number.

This command will read –conf-file to determine the current repository. To check for another repository, pass it as an argument.

bones pr-number [OPTIONS] [REPO]

Options

--conf-file <conf_file>

Filepath for config file

Arguments

REPO

Optional argument

bones format-notebook

Apply standardized formatting to Jupyter notebooks.

bones format-notebook [OPTIONS] FILES...

Options

--target-version <target_version>

Version of notebook format to save.

--verbose, --no-verbose

Enable/disable verbose output.

--check, --no-check

Check that notebook is already formatted instead of modifying content.

--prettier, --no-prettier

Enable/disable markdown cell formatting with Prettier.

Arguments

FILES

Required argument(s)