Skip to content

Commit

Permalink
v0.6.6 (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
iesahin authored Feb 28, 2024
1 parent 494079d commit 25581cf
Show file tree
Hide file tree
Showing 81 changed files with 764 additions and 294 deletions.
26 changes: 9 additions & 17 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
# - build: beta
# rust: beta
- build: nightly
rust: nightly
test-args: --all-features --no-fail-fast
rust: nightly-2024-01-01
test-args: --features test-s3,test-minio,test-r2,test-rsync,test-generic-rsync --no-fail-fast
## for submitters other than me, I'll add another job here.
# test-args: --no-fail-fast
# test-args: --all-features
Expand All @@ -38,8 +38,8 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DIGITAL_OCEAN_ACCESS_KEY_ID: ${{ secrets.DIGITAL_OCEAN_ACCESS_KEY_ID }}
DIGITAL_OCEAN_SECRET_ACCESS_KEY: ${{ secrets.DIGITAL_OCEAN_SECRET_ACCESS_KEY }}
WASABI_ACCESS_KEY_ID: ${{ secrets.WASABI_ACCESS_KEY_ID }}
WASABI_SECRET_ACCESS_KEY: ${{ secrets.WASABI_SECRET_ACCESS_KEY }}
# WASABI_ACCESS_KEY_ID: ${{ secrets.WASABI_ACCESS_KEY_ID }}
# WASABI_SECRET_ACCESS_KEY: ${{ secrets.WASABI_SECRET_ACCESS_KEY }}
GCS_ACCESS_KEY_ID: ${{ secrets.GCS_ACCESS_KEY_ID }}
GCS_SECRET_ACCESS_KEY: ${{ secrets.GCS_SECRET_ACCESS_KEY }}
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
Expand All @@ -49,7 +49,8 @@ jobs:
MINIO_SECRET_ACCESS_KEY: ${{ secrets.MINIO_SECRET_ACCESS_KEY }}
XVC_TEST_ONE_EMRESULT_COM_KEY: ${{ secrets.XVC_TEST_ONE_EMRESULT_COM_KEY }}
# We don't run xvc-storage and how-to tests here
XVC_TRYCMD_TESTS: core,file,pipeline,intro,start
XVC_TRYCMD_TESTS: core,file,pipeline,intro,start,storage
XVC_TRYCMD_STORAGE_TESTS: minio,generic,local,
steps:
- name: Checkout
uses: actions/checkout@v1
Expand Down Expand Up @@ -131,10 +132,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
target:
[
x86_64-unknown-linux-gnu
]
target: [x86_64-unknown-linux-gnu]
steps:
- name: Checkout
uses: actions/checkout@v1
Expand Down Expand Up @@ -175,10 +173,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
target:
[
x86_64-pc-windows-gnu
]
target: [x86_64-pc-windows-gnu]
steps:
- name: Checkout
uses: actions/checkout@v1
Expand Down Expand Up @@ -218,10 +213,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
target:
[
x86_64-apple-darwin
]
target: [x86_64-apple-darwin]
steps:
- name: Checkout
uses: actions/checkout@v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ Cargo.lock
# Use plain vim for large files and let it create swp
*.swp
flamegraph.svg
workflow_tests/docs
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ tree, and subtasks are marked with indentation.

## Unreleased

## 0.6.6 (2024-01-12)

- Added `xvc pipeline step remove` command
- Added `to` and `for` as aliases to `--step-name` option in `xvc pipeline step dependency`
- Added custom Display implementation for dependency types

## 0.6.5 (2024-01-01)

- Add benchmarks between Xvc and DVC
Expand Down
16 changes: 1 addition & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,24 +458,10 @@ Xvc is licensed under the [GNU GPL 3.0 License](https://github.com/iesahin/xvc/b

## 🌦️ Future and Maintenance

This is mostly a one-man project and users may consider the [bus factor](https://en.wikipedia.org/wiki/Bus_factor) before spending time on it.

I'm using Xvc daily and I'm happy with it. Tracking all my files with Git via arbitrary servers and cloud providers is
something I always need. I'm happy to improve and maintain it as long as I use it.

Also, I'm applying my technical/architectural ideas to see their effectiveness
and I have more ideas to implement. I don't expect to be bored from this soon.

I'm in a phase of my life where material success doesn't entice me.
I have a daily routine that I love, which includes spending 1-2 hours to Xvc.
That probably won't change much even if I earn a billion dollars.
I don't want to convert Xvc to a business.
I may create paid apps that use Xvc as a library if I think they will be useful but these will probably be separate projects.
In my opinion, trying to monetize FOSS prematurely deteriorates it more than other factors.

Xvc is like a _runnable CV_ for me. It signals _I built this and I can built similar software for you._ This is
another motivation for me to keep it alive. I hate updating my [vita](https://emresahin.net/cv/), and instead of
updating it, I prefer to show my work.
Given that I'm working on this for the last two years for pure technical bliss, you can expect me to work on it more.

## ⚠️ Disclaimer

Expand Down
4 changes: 3 additions & 1 deletion book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- [Xvc for Machine Learning](./start/ml.md)
- [Xvc for Software Development](./start/development.md)
- [Xvc for DVC Users](./start/from-dvc.md)
- [Benchmark between Xvc and DVC](./how-to/benchmarks-versus-dvc.md)
- [Benchmark between Xvc and DVC](./how-to/benchmark-versus-dvc.md)

- [User's Guide](./how-to/index.md)
- [How to Compile Xvc](./how-to/compile.md)
Expand Down Expand Up @@ -41,6 +41,7 @@
- [`output`](./ref/xvc-pipeline-step-output.md)
- [`show`](./ref/xvc-pipeline-step-show.md)
- [`update`](./ref/xvc-pipeline-step-update.md)
- [`remove`](./ref/xvc-pipeline-step-remove.md)
- [`xvc pipeline run`](./ref/xvc-pipeline-run.md)
- [`xvc pipeline delete`](./ref/xvc-pipeline-delete.md)
- [`xvc pipeline export`](./ref/xvc-pipeline-export.md)
Expand All @@ -53,6 +54,7 @@
- [`xvc storage new`](./ref/xvc-storage-new.md)
- [`local`](./ref/xvc-storage-new-local.md)
- [`generic`](./ref/xvc-storage-new-generic.md)
- [`rsync`](./ref/xvc-storage-new-rsync.md)
- [`s3`](./ref/xvc-storage-new-s3.md)
- [`gcs`](./ref/xvc-storage-new-gcs.md)
- [`minio`](./ref/xvc-storage-new-minio.md)
Expand Down
118 changes: 118 additions & 0 deletions book/src/ref/xvc-pipeline-step-remove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# xvc pipeline step remove

## Purpose

Remove a step and all its dependencies and outputs from the pipeline.

## Synopsis

```console
$ xvc pipeline step remove --help
Remove a step from a pipeline

Usage: xvc pipeline step remove --step-name <STEP_NAME>

Options:
-s, --step-name <STEP_NAME> Name of the step to remove
-h, --help Print help

```

## Examples

This command works only in Xvc repositories.

```console
$ git init
...
$ xvc init
```

Let's create a few steps and make them depend on each other.
```console
$ xvc pipeline step new --step-name hello --command 'echo hello >> hello.txt'

$ xvc pipeline step new --step-name world --command 'echo world >> world.txt'

$ xvc pipeline step new --step-name from --command 'echo from >> from.txt'

$ xvc pipeline step new --step-name xvc --command 'echo xvc >> xvc.txt'

```
Let's specify the outputs as well.
```console
$ xvc pipeline step output --step-name hello --output-file hello.txt

$ xvc pipeline step output --step-name world --output-file world.txt

$ xvc pipeline step output --step-name from --output-file from.txt

$ xvc pipeline step output --step-name xvc --output-file xvc.txt

```

Now we can add dependencies between them.
```console
$ xvc pipeline step dependency --step-name xvc --step from

$ xvc pipeline step dependency --step-name from --file world.txt

$ xvc pipeline step dependency --step-name world --step hello

```


Now the pipeline looks like this:
```console
$ xvc pipeline step list
hello: echo hello >> hello.txt (by_dependencies)
world: echo world >> world.txt (by_dependencies)
from: echo from >> from.txt (by_dependencies)
xvc: echo xvc >> xvc.txt (by_dependencies)

$ xvc pipeline dag --format mermaid
flowchart TD
n0["hello"]
n1["hello.txt"] --> n0
n2["world"]
n0["hello"] --> n2
n3["world.txt"] --> n2
n4["from"]
n3["world.txt"] --> n4
n5["from.txt"] --> n4
n6["xvc"]
n4["from"] --> n6
n7["xvc.txt"] --> n6


```

When we remove a step, all its dependencies and outputs are removed as well.
```console
$ xvc -vv pipeline step remove --step-name from
[INFO] Removing dep: file(world.txt)
[INFO] Removing dep step(from) from xvc
[INFO] Removing output: File
[INFO] Removing step: from

```

```console
$ xvc pipeline step list
hello: echo hello >> hello.txt (by_dependencies)
world: echo world >> world.txt (by_dependencies)
xvc: echo xvc >> xvc.txt (by_dependencies)

$ xvc pipeline dag --format mermaid
flowchart TD
n0["hello"]
n1["hello.txt"] --> n0
n2["world"]
n0["hello"] --> n2
n3["world.txt"] --> n2
n4["xvc"]
n5["xvc.txt"] --> n4


```

1 change: 1 addition & 0 deletions book/src/ref/xvc-pipeline-step.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Usage: xvc pipeline step <COMMAND>
Commands:
list List steps in a pipeline
new Add a new step
remove Remove a step from a pipeline
update Update step options
dependency Add a dependency to a step
output Add an output to a step
Expand Down
128 changes: 128 additions & 0 deletions book/src/ref/xvc-storage-new-rsync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# xvc storage new s3

## Purpose

Configure an S3 (or a compatible) service as an Xvc storage.

## Synopsis

```console
$ xvc storage new rsync --help
Add a new rsync storage

Uses rsync in separate processes to communicate with the server.

This can be used when you already have an SSH/Rsync connection.

It doesn't prompt for any passwords. The connection must be set up with ssh keys beforehand.

Usage: xvc storage new rsync [OPTIONS] --name <NAME> --host <HOST> --storage-dir <STORAGE_DIR>

Options:
-n, --name <NAME>
Name of the storage.
Recommended to keep this name unique to refer easily.

--host <HOST>
Hostname for the connection in the form host.example.com (without @, : or protocol)

--port <PORT>
Port number for the connection in the form 22. Doesn't add port number to connection string if not given

--user <USER>
User name for the connection, the part before @ in [email protected] (without @, hostname). User name isn't included in connection strings if not given

--storage-dir <STORAGE_DIR>
storage directory in the host to store the files

-h, --help
Print help (see a summary with '-h')

```

## Examples

You must setup an SSH connection

The command works only in Xvc repositories.

```console
$ git init
...
$ xvc init

$ xvc-test-helper create-directory-tree --directories 1 --files 3 --seed 20230211

$ tree dir-0001
dir-0001
├── file-0001.bin
├── file-0002.bin
└── file-0003.bin

1 directory, 3 files

```

Xvc only sends and receives tracked files.

```console
$ xvc file track dir-0001
```

You can define a storage bucket as storage and begin to use it.

```console
$ xvc storage new rsync --name backup --host one.emresult.com --user iex --storage-dir /tmp/xvc-backup/

```

Send files to this storage.

```console
$ xvc file send dir-0001 --to backup

```

You can remove the files you sent from your cache and workspace.

```console
$ xvc file remove --from-cache dir-0001/
[DELETE] [CWD]/.xvc/b3/3c6/70f/e91055c2be2e87890dba1e952d656d1e70dd196bf5530d379243c6e4aa/0.bin
[DELETE] [CWD]/.xvc/b3/3c6/70f/e91055c2be2e87890dba1e952d656d1e70dd196bf5530d379243c6e4aa
[DELETE] [CWD]/.xvc/b3/3c6/70f
[DELETE] [CWD]/.xvc/b3/3c6
[DELETE] [CWD]/.xvc/b3/7aa/354/0225bd33702c239454b63b31d1ea25721cbbfb491d6139d0b85b82d15d/0.bin
[DELETE] [CWD]/.xvc/b3/7aa/354/0225bd33702c239454b63b31d1ea25721cbbfb491d6139d0b85b82d15d
[DELETE] [CWD]/.xvc/b3/7aa/354
[DELETE] [CWD]/.xvc/b3/7aa
[DELETE] [CWD]/.xvc/b3/d7d/629/677c6d8df55ab3a1d694453c59f3ca0df494d3dc190aeef1e00abd96eb/0.bin
[DELETE] [CWD]/.xvc/b3/d7d/629/677c6d8df55ab3a1d694453c59f3ca0df494d3dc190aeef1e00abd96eb
[DELETE] [CWD]/.xvc/b3/d7d/629
[DELETE] [CWD]/.xvc/b3/d7d
[DELETE] [CWD]/.xvc/b3

$ rm -rf dir-0001/
```

Then get back them from the storage.

```console
$ xvc file bring --from backup dir-0001

$ tree dir-0001
dir-0001
├── file-0001.bin
├── file-0002.bin
└── file-0003.bin

1 directory, 3 files

```

If you want to remove a file and all of its versions from a storage, you can use `xvc file remove` command.

```console
$ xvc file remove --from-storage backup dir-0001/

```
Loading

0 comments on commit 25581cf

Please sign in to comment.