Skip to content

Latest commit

 

History

History
165 lines (103 loc) · 4.05 KB

CONTRIBUTING.rst

File metadata and controls

165 lines (103 loc) · 4.05 KB

Contributing to Repository Service for TUF CLI

We welcome contributions from the community and first want to thank you for taking the time to contribute!

Please familiarize yourself with the Code of Conduct before contributing.

DCO

Before you start working with Repository Service for TUF, please read our Developer Certificate of Origin. All contributions to this repository must be signed as described on that page.

To acknowledge the Developer Certificate of Origin (DCO), sign your commits by appending a Signed-off-by: Your Name <[email protected]> to each git commit message (see git commit --signoff). Your signature certifies that you wrote the patch or have the right to pass it on as an open-source patch.

Getting started

We welcome many different types of contributions and not all of them need a Pull Request. Contributions may include:

  • New features and proposals
  • Documentation
  • Bug fixes
  • Issue Triage
  • Answering questions and giving feedback
  • Helping to onboard new contributors
  • Other related activities

Development

Requirements

  • Python >=3.9
  • Pipenv

Getting the source code

Fork the repository on GitHub and clone it to your local machine:

git clone [email protected]:YOUR-USERNAME/repository-service-tuf-cli.git

Add a remote and regularly sync to make sure you stay up-to-date with our repository:

git remote add upstream https://github.com/repository-service-tuf/repository-service-tuf-cli
git checkout main
git fetch upstream
git merge upstream/main

Preparing the environment

After installing Python, install the pipenv tool:

$ pip install pipenv

Create a virtual environment for this project:

$ pipenv shell

Install the requirements from the Pipfile.

The flag -d will install the development requirements:

$ pipenv install -d

Note

macOS running on MacBook M1

For developers, after the above command, run:

$ pip uninstall cryptography cffi -y
$ pip cache purge
$ LDFLAGS=-L$(brew --prefix libffi)/lib CFLAGS=-I$(brew --prefix libffi)/include pip install cffi cryptography

Running checks with pre-commit

The pre-commit tool is installed as part of the development requirements.

To automatically run checks before you commit your changes you should run:

$ make precommit

This will install the git hook scripts for the first time, update to the latest versions of the hooks and run the pre-commit tool. Now pre-commit will run automatically on git commit.

Running RSTUF CLI

$ rstuf

Usage: rstuf [OPTIONS] COMMAND [ARGS]...

Repository Service for TUF Command Line Interface (CLI).

How to add new requirements

Install the requirements package.

The flag -d will install the development requirements.

$ pipenv install -d <package>
$ pipenv install <package>

Update all project requirements

$ make requirements

Tests

Perform automated testing with the tox tool:

$ tox