Metadata-Version: 2.1
Name: reside-porter
Version: 0.0.1
Summary: Tool to backup docker volumes
Project-URL: Documentation, https://github.com/reside-ic/porter#readme
Project-URL: Issues, https://github.com/reside-ic/porter/issues
Project-URL: Source, https://github.com/reside-ic/porter
Author-email: Alex <alex.hill@gmail.com>
License-Expression: MIT
License-File: LICENSE.txt
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.7
Requires-Dist: docker
Requires-Dist: docopt
Requires-Dist: fabric
Description-Content-Type: text/markdown

# porter

[![PyPI - Version](https://img.shields.io/pypi/v/porter.svg)](https://pypi.org/project/porter)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/porter.svg)](https://pypi.org/project/porter)

-----

**Table of Contents**

- [Usage](#usage)
- [Test](#test-and-lint)
- [Installation](#installation)
- [License](#license)

## Usage

"""Usage:
  porter --version
  porter backup <path> --to=HOST [--exclude=TARGETS] [--include=INCLUDE]
  porter restore <path> --from=HOST [--exclude=TARGETS] [--include=INCLUDE]

Options:
  --exclude=TARGETS  Comma separated string of target names to exclude (default is to include all)
  --include=TARGETS  Comma separated string of target names to include (default is to include all)
"""

`<path>` is the path to a directory containing a `porter.json` file. This file should contain at least one target 
and at least one host. See `./config/porter.json` for an example. By default all targets in the config file are used, 
but this can be overridden by explicitly including or excluding targets by name.

## Test and lint

1. `hatch run test`
2. `hatch run lint:fmt`

To get coverage reported locally in the console, use `hatch run cov`. 
On CI, use `hatch run cov-ci` to generate an xml report.

## Installation

```console
pip install porter
```

## Install from local sources

1. `hatch build`
2. `pip install dist/porter-{version}.tar.gz`

## Publish

## Publish to PyPi

Ensure you have built a new version of the package:
1. `hatch clean`
2. `hatch build`

Then publish to the test server:

```console
hatch publish -r test
```

You will be prompted to enter your [test.pypi.org](https://test.pypi.org/legacy/) username and password.
To test the installation, first run Python in a container:

```
docker run --rm -it --entrypoint bash python
```

Then:

```
pip install --index-url https://test.pypi.org/simple reside-porter --extra-index-url https://pypi.org/simple
```

Now you should be able to run `porter` from the command line and see the usage instructions.

If it is working, you can publish to the real PyPi:

```console
hatch publish
```

## License

`porter` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
