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.7.0.tar.gz
(13.9 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.7.0.tar.gz.
File metadata
- Download URL: repo_smith-0.7.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17042bd4560600a949070f653c58a5bf1ef4105c4c28ce133828ce4e2120ca95
|
|
| MD5 |
672d40c17dbf8f50c16a7f5acfd3fb54
|
|
| BLAKE2b-256 |
39bee0c3543444e91ecebe02c7a4c51b96487c6b438a79c4f1c59fec1a53dbae
|
File details
Details for the file repo_smith-0.7.0-py3-none-any.whl.
File metadata
- Download URL: repo_smith-0.7.0-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c86b27e56b5ef9d9eec84a6951db6fdfa583393fadb2a2950f6d2b4cab4eb46
|
|
| MD5 |
84229c8b7a52faf5ff00478209c8d9e6
|
|
| BLAKE2b-256 |
1c97fb8bfc683887322f714d8ee55d9d8e04e86a30a57eb119653a928bb491f4
|