YAML-based configuration for initializing Git repositories for unit testing
Project description
repo-smith
YAML-based configuration for Git repository initialization for unit testing
Installation
pip install -U repo-smith
Usage
Create a new configuration file (following the specification).
# File path: tests/specs/basic_spec.yml
name: Basic spec
description: Starting basic spec
initialization:
steps:
- name: Create filea.txt
type: new-file
filename: filea.txt
contents: |
Hello world
- name: Add filea.txt
type: add
files:
- filea.txt
- name: Initial commit
type: commit
message: Initial commit
id: initial-commit
- name: v0 tag
type: tag
tag-name: v0
Create a unit test accordingly.
from repo_smith.initialize_repo import initialize_repo
from git import Repo
def test_dummy():
repo_initializer = initialize_repo("test/specs/basic_spec.yml")
with repo_initializer.initialize() as repo:
# All unit testing code for the dummy repository goes here
print(repo)
For more use cases of repo-smith, refer to:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
repo_smith-0.11.3.tar.gz
(15.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file repo_smith-0.11.3.tar.gz.
File metadata
- Download URL: repo_smith-0.11.3.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b999a53d31899e45f3240c012575c26d71c0dff862d263ea91692b6dff36c1e
|
|
| MD5 |
c09ace6daf0e9ebebf3fba63548110a9
|
|
| BLAKE2b-256 |
9d5c1c28c77bc77418f34e7048127445b4124c66e25e0f72eea4e76ccc7c78ca
|
File details
Details for the file repo_smith-0.11.3-py3-none-any.whl.
File metadata
- Download URL: repo_smith-0.11.3-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bab4f143a2f6d09bab900fc23aec57edf25f6676c0febb25fe6a59261804066
|
|
| MD5 |
758ab517ca58641b01c5ea70b676136a
|
|
| BLAKE2b-256 |
b481a70bbbe34434885902948a33048a2467fbc39c1e2ca4b73846ee68a93da4
|