eclipse-volttron / copier-poetry-volttron-agent

Other
0 stars 5 forks source link

Copier VOLTTRON Agent

Copier template for Python projects managed by Poetry.

Many thanks to the project copier poetry for starting this project and allowing the reuse of the codebase. Without this starting point the agent templates would not be what they are today!

Quick setup and usage

Prerequisites

This version of copier-poetry-volttron-agent template relies on copier >= 7. To use copier

Please see more detail at Copier Installation

Usage

Use the copier CLI tool to create an agent project from the Volttron Copier templates. The command takes the form of:

copier <URL to copier template repo> <path to agent project on local machine>

The following is an example:

copier "https://github.com/VOLTTRON/copier-poetry-volttron-agent.git" /path/to/your/new/project --vcs-ref=HEAD

Or even shorter:

copier "gh:VOLTTRON/copier-poetry-volttron-agent" /path/to/your/new/project --vcs-ref=HEAD

NOTE: By default, copier use the latest release found in the template git tags. Use --vcs-ref=HEAD to reinforce this behavior. If you want to use a specific template version, use the --vcs-ref flag, which takes a commit hash associated with your desired template version. See documentation for this flag.

Features

Development

Copier Workflow diagram

Copier sequence diagram

After you have created your Agent project with the copier template and have successfully installed all the dependencies, your development workflow would be the following:

Steps:

  1. Modify agent code as needed.
  2. Create a local repository: git init
  3. Add the remote repository to your local repository: git remote add origin <git or gitlab URL>
  4. Stage all code changes to be committed: git add .
  5. Commit your changes: git commit -m "Initial commit"
    • Optional: you can include pre-commit hooks as part of your development workflow so that those hooks are ran before every commit
      • To install pre-commit hooks, run pre-commit install at the root level of your Agent project
  6. Push changes to the remote: git push -u origin main