A project constructor, diff generator, and patcher rolled into one
Project description
project_patcher
project_patcher is a project constructor, diff generator, and patcher in one module to better improve and fix the reproducibility of other work.
Project Files
'Project Files' indicate a method of grabbing a file(s) from some location to put into the working directory. Each project file can specify a relative directory to the working directory of where to extract to.
The following project file types are supported:
- osf - An Open Science Framework project
- git - A git repository
- url - An arbitrary url to obtain a file via a GET request
Project Metadata Specification
The project_metadata.json generated with each project looks like so:
{
"files": [
{
"type": "xxx", // Must be "osf", "url", or "git"
"dir": "<path>", // The directory relative to the working directory to put the file in (default: the working directory)
"extra": {
// An object containing user-defined data
}
}
{
"type": "osf",
"id": "<project_id>" // The five alphanumeric character OSF project identifier
},
{
"type": "url",
"url": "<url>" // A url to query a file from via a GET request
},
{
"type": "git",
"repository": "<git_repo>", // The git repository to checkout
"branch|tag|commit": "<branch_name>|<tag_name>|<commit_id>" // The location to checkout to (default: the default branch when cloning the repository)
}
],
"ignore": [
// A list of file patterns to ignore instead of patching if it exists.
"xxx"
],
"overwrite": [
// A list of file patterns to overwrite instead of patching if it exists.
"xxx"
],
"extra": {
// An object containing user-defined data
}
}
Commands
The following commands can be accessed from the command line interface:
project_patcher init [--import_metadata/-I <path_or_url>]- Initializes a new project to be patched either from the metadata in the current directory, an import, or provided via the builder.
- Optional Parameters:
--import_metadata/-I- Takes in a path or url to the metadata JSON to build the project for.
project_patcher clean [--import_metadata/-I <path_or_url>]- Initializes a clean workspace either from the metadata in the current directory, an import, or provided via the builder.
- Optional Parameters:
--import_metadata/-I- Takes in a path or url to the metadata JSON to build the project for.
project_patcher src [--import_metadata/-I <path_or_url>]- Initializes a patched workspace either from the metadata in the current directory, an import, or provided via the builder.
- Optional Parameters:
--import_metadata/-I- Takes in a path or url to the metadata JSON to build the project for.
project_patcher output- Generates any patches from the original files and clones the new files to an output directory.
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
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 project_patcher-0.3.0.tar.gz.
File metadata
- Download URL: project_patcher-0.3.0.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e1ba44f356756ac8933a60abbc9f75e9431270fe444a95a4ea136ad9f8ef602
|
|
| MD5 |
632dd854845e65e2d111ab1656bdb09a
|
|
| BLAKE2b-256 |
1c511042a00927167626bf08994bc0c2aae16dc5aa191acdf82879cd81d54b2d
|
File details
Details for the file project_patcher-0.3.0-py3-none-any.whl.
File metadata
- Download URL: project_patcher-0.3.0-py3-none-any.whl
- Upload date:
- Size: 22.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf73f7ec296dfd05633f69ff198f7d9515129392efed00e849f265c55329cbaa
|
|
| MD5 |
911db11d54b98be2bbff49d8b310f877
|
|
| BLAKE2b-256 |
f1ec3533110265705e3a3889d837690e67bdb8b87239b34817e5d004c293b178
|