From 85ff3aeed14b4b67edc6feb407c280dd2dea3fc1 Mon Sep 17 00:00:00 2001 From: Spencer Clark Date: Sun, 30 Apr 2023 14:48:28 -0400 Subject: [PATCH] Update README.md and pre-commit workflow (#16) --- .github/workflows/pre-commit.yaml | 6 +++--- .pre-commit-config.yaml | 2 +- README.md | 11 ++++++++++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index c075950..cf05f4f 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -10,6 +10,6 @@ jobs: name: "pre-commit hooks" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.3 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - uses: pre-commit/action@v3.0.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c27656b..ea9e473 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: rev: 22.6.0 hooks: - id: black - - repo: https://gitlab.com/pycqa/flake8 + - repo: https://github.com/PyCQA/flake8.git rev: 4.0.1 hooks: - id: flake8 diff --git a/README.md b/README.md index 166c03c..2e2bccb 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,13 @@ import xpartition from external import construct_lazy_dataset +parser = argparse.ArgumentParser( + prog="initialize_store", + description="initialize a zarr store for a dataset" +) parser.add_argument("store", help="absolute path to directory to store zarr result") + +args = parser.parse_args() ds = construct_lazy_dataset() ds.partition.initialize_store(args.store) ``` @@ -49,7 +55,10 @@ import xpartition from external import construct_lazy_dataset - +parser = argparse.ArgumentParser( + prog="write_partition", + description="write a partition of a dataset" +) parser.add_argument("store", help="absolute path to directory to store zarr result") parser.add_argument("ranks", type=int, help="total number of available ranks") parser.add_argument("rank", type=int, help="rank of job")