Repository Service for TUF API
Note
This service is in Experimental stage.
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.10
- pip
- Pipenv
- Docker
Getting source code
Fork the repository on GitHub and clone it to your local machine:
git clone git@github.com: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/vmware/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, it will update to the
latest versions of the hooks 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:8000/ in your browser.
Changes in the code will automatically update the service.
See 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