From ae1c36595ae967e8f4a2ea1f0d33e3459b585933 Mon Sep 17 00:00:00 2001 From: Vanessasaurus <814322+vsoch@users.noreply.github.com> Date: Tue, 2 Jul 2024 08:36:23 -0600 Subject: [PATCH] fix: remove download buttons from UI (#446) * fix: remove download buttons from ui Also removing references to sregistry global client Signed-off-by: vsoch --- .github/dev-requirements.txt | 2 +- .github/workflows/main.yml | 3 +- .github/workflows/update-contributors.yml | 4 +- CHANGELOG.md | 1 + VERSION | 2 +- docs/_docs/client.md | 145 ------------------ .../collections/view_collection.html | 1 - .../containers/container_details.html | 4 - 8 files changed, 6 insertions(+), 156 deletions(-) diff --git a/.github/dev-requirements.txt b/.github/dev-requirements.txt index 0b29a889..6116de38 100644 --- a/.github/dev-requirements.txt +++ b/.github/dev-requirements.txt @@ -1,4 +1,4 @@ pre-commit -black +black==23.3.0 isort flake8 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 705f51ff..89ea4095 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,8 +11,7 @@ jobs: formatting: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - + - uses: actions/checkout@v4 - name: Check for typos in docs uses: crate-ci/typos@7ad296c72fa8265059cc03d1eda562fbdfcd6df2 # v1.9.0 with: diff --git a/.github/workflows/update-contributors.yml b/.github/workflows/update-contributors.yml index 1e749ae9..ee1c74e5 100644 --- a/.github/workflows/update-contributors.yml +++ b/.github/workflows/update-contributors.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Tributors Update # Important! Update to release https://github.com/con/tributors @@ -75,7 +75,7 @@ jobs: echo "PULL_REQUEST_BODY=Tributors update automated pull request." >> $GITHUB_ENV - name: Open Pull Request - uses: vsoch/pull-request-action@1.0.15 + uses: vsoch/pull-request-action@master if: ${{ env.OPEN_PULL_REQUEST == '1' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e9ecf42..e5f7a2f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ represented by the pull requests that fixed them. Critical items to know are: ## [master](https://github.com/singularityhub/sregistry/tree/master) (master) + - remove button uploads, deprecated (2.1.2) - setup LIST_DEFAULTS for list settings. (2.1.1) - update to use Django 4.2 (2.1.0) - consolidate config into one file with environment (2.0.0) diff --git a/VERSION b/VERSION index 3e3c2f1e..eca07e4c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.1 +2.1.2 diff --git a/docs/_docs/client.md b/docs/_docs/client.md index 1b98588b..68db1fe9 100644 --- a/docs/_docs/client.md +++ b/docs/_docs/client.md @@ -194,151 +194,6 @@ Of course, do this at your own risk! That is a *CHONKER*!

-# Singularity Registry Client - -Singularity Registry Global Client, or [sregistry-cli](https://github.com/singularityhub/sregistry-cli), -is a general client to interact with Singularity images at remote endpoints, and it provides -such an endpoint for Singularity Registry Server. We will provide -basic instructions here, and for the full documentation, please see the [getting started guide here](https://singularityhub.github.io/sregistry-cli/client-registry). Note that you will need to [export your credentials](https://singularityhub.github.io/sregistry/credentials) in order to have authenticated interaction with sregistry. - - -## Install - -### sregistry Installation - -`sregistry` is the client for Singularity Registry server. To install, you can do the following: - -```bash -git clone https://github.com/singularityhub/sregistry-cli -cd sregistry-cli -python setup.py install -``` - -To check your install, run this command to make sure the `sregistry` client is found. - -which sregistry - - -### Container Install - -We have provided a Singularity build definition for you, for which you can use to build a container that serves as the sregistry client (and this will likely be provided on Singularity Hub so you don't even need to do that.) To build, do the following: - -```bash -cd sregistry/ - -# Singularity 2.4 and up -sudo singularity build sregistry Singularity - -# For Singularity earlier than 2.4 (deprecated) -singularity create --size 2000 sregistry -sudo singularity bootstrap sregistry Singularity -``` - -If you install via this option, you will want to make sure the container itself is somewhere on your path, with appropriate permissions for who you want to be able to use it. - - -## Commands -This brief tutorial assumes that you have [Singularity installed](https://singularityware.github.io/install-linux). - -### Pull -Not shown in the demo above is the pull command, but it does the same thing as the singularity pull. - -```bash -sregistry pull banana/pudding:milkshake -Progress |===================================| 100.0% -Success! banana-pudding-milkshake.img -``` - -This is useful so that you can (locally from your registry) pull an image without needing to specify the registry url. It's also important because registry support will only be added to Singularity when the entire suite of compoenents are ready to go! - - -### Push - -If you don't have an image handy, you can pull one: - -```bash -singularity pull docker://busybox -``` - -And then a push to your registry looks like this: - -```bash -$ sregistry push -U busybox_latest.sif --name dinosaur/avocado --tag delicious -$ sregistry push -U busybox_latest.sif --name meowmeow/avocado --tag nomnomnom -$ sregistry push -U busybox_latest.sif --name dinosaur/avocado --tag whatinthe -``` - -If you don't specify a tag, `latest` is used. If you have authentication issues, -remember that you need to [export a token](https://singularityhub.github.io/sregistry/credentials) for your user, and ensure that the user is either an admin/manager, or -that you have set the `USER_COLLECTIONS` variable to true. You can read [more about roles here](https://singularityhub.github.io/sregistry/setup-roles), and [more about teams](https://singularityhub.github.io/sregistry/setup-teams) to manage groups of people. - -### List - -List is a general command that will show a specific container, a specific collection, optionally with a tag. Examples are provided below: - -```bash -# All collections -sregistry list - -# A particular collection -sregistry list dinosaur - -# A particular container name across collections -sregistry list /avocado - -# A named container, no tag -sregistry list dinosaur/avocado - -# A named container, with tag -sregistry list dinosaur/avocado:delicious -``` - -In addition to listing containers, `sregistry` can show you metadata! It does this by issuing an inspect command at upload time, so that no processing is needed on the server side. Singularity Registry is a Dockerized application, so it would require --privileged mode, which is a bad idea. Anyway, we can look at environment (`--env/-e`), runscript (`--runscript/-r`), tests (`--test/-t`), or `Singularity` definition recipe (`--deffile/-d`): - -```bash -# Show me environment -sregistry list dinosaur/tacos:delicious --env - -# Add runscript -sregistry list dinosaur/tacos:delicious --e --r - -# Definition recipe (Singularity) and test -sregistry list dinosaur/tacos:delicious --d --t - -# All of them -sregistry list dinosaur/tacos:delicious --e --r --d --t -``` - -### Delete -Delete requires the same authentication as push, and you will need to confirm with `yes/no` - -```bash -sregistry delete dinosaur/tacos:delicious -sregistry list -``` - -if you want to force it, add `--force` - -```bash -sregistry delete dinosaur/tacos:delicious --force -``` - -### Labels -Labels are important, and so they are represented as objects in the database for index, query, etc. Akin to containers, we can list and search: - -```bash -# All labels -sregistry labels - -# A specific key -sregistry labels --key maintainer - -# A specific value -sregistry labels --value vanessasaur - -# A specific key and value -sregistry labels --key maintainer --value vanessasaur -``` # Curl diff --git a/shub/apps/main/templates/collections/view_collection.html b/shub/apps/main/templates/collections/view_collection.html index 05a7116f..ac5f349e 100644 --- a/shub/apps/main/templates/collections/view_collection.html +++ b/shub/apps/main/templates/collections/view_collection.html @@ -125,7 +125,6 @@

{{ collection.name }} collection {% else %} href="{% url 'delete_container' container.id %}">{% endif %} {% endif %} - {% if container.get_storage and request.user.is_authenticated %}{% endif %} diff --git a/shub/apps/main/templates/containers/container_details.html b/shub/apps/main/templates/containers/container_details.html index f54a99bd..f322fc9c 100644 --- a/shub/apps/main/templates/containers/container_details.html +++ b/shub/apps/main/templates/containers/container_details.html @@ -122,10 +122,6 @@

{% endif %} {% if container.image %} - - - {% if edit_permission %}