Skip to content

Commit

Permalink
Revert docs breakage to settle CI (#2685)
Browse files Browse the repository at this point in the history
  • Loading branch information
akarve authored Feb 16, 2022
1 parent edffa98 commit 12b23cb
Showing 1 changed file with 28 additions and 51 deletions.
79 changes: 28 additions & 51 deletions docs/walkthrough/uploading-a-package.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,38 @@
Once your package is ready it's time to save and distribute it.

## Authentication
## Saving a package manifest locally

To push a Quilt package you need to either
[configure your local AWS credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-config)
with read/write access to the bucket you wish to push to,
or if your company runs a Quilt stack you must log in:
To save a package to your local disk use `build`.

*Registries* are simply S3 buckets where pacakge data and metadata are stored.

```python
# only need to run this once
quilt3.config('https://your-catalog-homepage/')
import quilt3
p = quilt3.Package()

# if and only if your company runs a Quilt stack and you don't have local AWS credentials:
quilt3.login()
top_hash = p.build("aneesh/test_data")
```

## Pushing a package to a remote registry
Building a package requires providing it with a name. Packages names must follow the `"${namespace}/${packagename}"` format. For small teams, we recommend using the package author's name as the namespace.

### New packages
## Authenticating to a remote registry

To share a package with others via a remote registry, use `push`:
To share a package with others via a remote registry you will first need to authenticate against, if you haven't done so already:

```python
p = quilt3.Package()
p.push(
"aneesh/test_data",
"s3://quilt-example",
message="Updated version my package"
)
# only need to run this once
# ie quilt3.config('https://your-catalog-homepage/')
quilt3.config('https://open.quiltdata.com/')

# follow the instructions to finish login
quilt3.login()
```

### Modifying existing packages
## Pushing a package to a remote registry

To modify an existing package, be sure to call `.browse` first.
To share a package with others via a remote registry, use `push`:

```python
p = quilt3.Package.browse("existing/package", registry="s3://my-bucket")
# perform local modifications like p.set()
# ...
p = quilt3.Package()
p.push(
"aneesh/test_data",
"s3://quilt-example",
Expand Down Expand Up @@ -69,6 +62,17 @@ p.push(

>For even more fine-grained control of object landing paths see [Materialization](../advanced-features/materialization.md).
## Saving a package on a remote registry

`push` will send both a package manifest and its data to a remote registry. This will involve copying your data to S3. To save just the package manifest to S3 without any data copying, use `build`:

```python
p = quilt3.Package()
p.build("aneesh/test_data", "s3://quilt-example")
```

This will create a new version of your package with all of its physical keys preserved.

## Delete a package from a registry

To delete a package from a registry:
Expand All @@ -82,30 +86,3 @@ quilt3.delete_package("aneesh/test_data", "s3://quilt-example")
```

Note that this will not delete any package data, only the package manifest.

## Advanced - local packages and manifests

### Saving a package manifest locally

To save a package to your local disk use `build`.


```python
import quilt3
p = quilt3.Package()

top_hash = p.build("aneesh/test_data")
```

Building a package requires providing it with a name. Packages names must follow the `"${namespace}/${packagename}"` format. For small teams, we recommend using the package author's name as the namespace.

### Saving a package on a remote registry

`push` will send both a package manifest and its data to a remote registry. This will involve copying your data to S3. To save just the package manifest to S3 without any data copying, use `build`:

```python
p = quilt3.Package()
p.build("aneesh/test_data", "s3://quilt-example")
```

This will create a new version of your package with all of its physical keys preserved.

0 comments on commit 12b23cb

Please sign in to comment.