Skip to content

repository-service-tuf/repository-service-tuf-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repository Service for TUF API

Note

This service is in Experimental stage.

OpenSSF Scorecard Test Docker Image build Tests and Lint Coverage

Repository Service for TUF API is part of Repository Service for TUF.

Usage

Repository Service for TUF Repository API Docker Image documentation

Development tools

  • Python >=3.12
  • pip
  • Pipenv
  • Docker

Getting source code

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

git clone [email protected]:YOUR-USERNAME/repository-service-tuf-api.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-api
git checkout main
git fetch upstream
git merge upstream/main

Installing project requirements

This repository has the requirements.txt and the requirements-dev.txt files to help build your virtual environment.

We also recommend using Pipenv to manage your virtual environment.

$ pip install pipenv
$ pipenv shell

Install development requirements

$ pipenv install -d

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 and run the pre-commit tool. Now pre-commit will run automatically on git commit.

Running API development

Running the API locally

$ make run-dev

Open http://localhost:80/ in your browser.

Changes in the code will automatically update the service.

See the Makefile for more options.

Tests

We use Tox to manage running the tests.

Running tests

$ tox

Managing requirements

Installing new requirements

Project requirements

$ pipenv install {package}

Development requirements

$ pipenv install -d {package}

Updating requirements files from Pipenv

$ make requirements