Skip to content

Commit 742ab86

Browse files
Merge branch 'master' into biocontainer
2 parents e9fa353 + 992d5c3 commit 742ab86

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+5531
-3310
lines changed

.github/quay-namespace-info.py

Lines changed: 55 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
55
Caveat being, without an API key, you will only ever see the public repos.
66
"""
7-
PROGRAM = 'quay-namespace-info'
8-
VERSION = '1.0.0'
9-
QUAY_API_URL= 'https://quay.io/api/v1/repository'
7+
8+
PROGRAM = "quay-namespace-info"
9+
VERSION = "1.0.0"
10+
QUAY_API_URL = "https://quay.io/api/v1/repository"
1011

1112
if __name__ == "__main__":
1213
import argparse as ap
@@ -17,18 +18,25 @@
1718

1819
parser = ap.ArgumentParser(
1920
prog=PROGRAM,
20-
conflict_handler='resolve',
21+
conflict_handler="resolve",
2122
description=(
22-
f'{PROGRAM} (v{VERSION}) - Check visibility of containers and optionally set to public\n'
23+
f"{PROGRAM} (v{VERSION}) - Check visibility of containers and optionally set to public\n"
2324
),
24-
formatter_class=ap.RawDescriptionHelpFormatter
25+
formatter_class=ap.RawDescriptionHelpFormatter,
26+
)
27+
parser.add_argument(
28+
"--namespace",
29+
metavar="STR",
30+
type=str,
31+
default="biocontainers",
32+
help="Namespace to query (default: biocontainers)",
33+
)
34+
parser.add_argument(
35+
"--changevisibility",
36+
action="store_true",
37+
help="Any private repos will be set to public, requires QUAY_OAUTH_TOKEN to be set",
2538
)
26-
parser.add_argument('--namespace', metavar="STR", type=str, default="biocontainers",
27-
help='Namespace to query (default: biocontainers)')
28-
parser.add_argument('--changevisibility', action='store_true',
29-
help='Any private repos will be set to public, requires QUAY_OAUTH_TOKEN to be set')
30-
parser.add_argument('--version', action='version',
31-
version=f'{PROGRAM} {VERSION}')
39+
parser.add_argument("--version", action="version", version=f"{PROGRAM} {VERSION}")
3240

3341
if len(sys.argv) == 1:
3442
parser.print_help()
@@ -37,24 +45,30 @@
3745
args = parser.parse_args()
3846

3947
# Set headers, include OAuth token if available
40-
HEADERS = {'Content-Type': 'application/json'}
41-
QUAY_OAUTH_TOKEN = os.getenv('QUAY_OAUTH_TOKEN')
48+
HEADERS = {"Content-Type": "application/json"}
49+
QUAY_OAUTH_TOKEN = os.getenv("QUAY_OAUTH_TOKEN")
4250
if QUAY_OAUTH_TOKEN:
43-
print(f'Quay Token found, using it for {args.namespace}')
44-
HEADERS['Authorization'] = f'Bearer {QUAY_OAUTH_TOKEN}'
51+
print(f"Quay Token found, using it for {args.namespace}")
52+
HEADERS["Authorization"] = f"Bearer {QUAY_OAUTH_TOKEN}"
4553

4654
# Starting querying Quay
4755
next_page = ""
4856
has_next_page = True
4957
repo_status = {}
5058
change_visibility = []
51-
print(f'Starting query against {args.namespace}')
59+
print(f"Starting query against {args.namespace}")
5260
while has_next_page:
5361
r = requests.get(
5462
QUAY_API_URL,
5563
headers=HEADERS,
56-
params={'namespace': args.namespace, 'next_page': next_page} if QUAY_OAUTH_TOKEN else {'public': 'true', 'namespace': args.namespace, 'next_page': next_page},
57-
timeout=10
64+
params={"namespace": args.namespace, "next_page": next_page}
65+
if QUAY_OAUTH_TOKEN
66+
else {
67+
"public": "true",
68+
"namespace": args.namespace,
69+
"next_page": next_page,
70+
},
71+
timeout=10,
5872
)
5973
json_data = r.json()
6074
"""
@@ -81,46 +95,47 @@
8195
"""
8296

8397
# next_page is only available if there are more pages, use it to break out of while loop
84-
if 'next_page' in json_data:
85-
next_page = json_data['next_page']
98+
if "next_page" in json_data:
99+
next_page = json_data["next_page"]
86100
else:
87101
has_next_page = False
88102

89103
# Capture public/private status for each repo
90-
for repo in json_data['repositories']:
91-
repo_status[repo['name']] = {
92-
"namespace": repo['namespace'],
93-
"name": repo['name'],
94-
"is_public": repo['is_public']
104+
for repo in json_data["repositories"]:
105+
repo_status[repo["name"]] = {
106+
"namespace": repo["namespace"],
107+
"name": repo["name"],
108+
"is_public": repo["is_public"],
95109
}
96110

97111
# Collect repos that are private
98-
if repo['is_public'] is False:
112+
if repo["is_public"] is False:
99113
change_visibility.append(repo["name"])
100114

101115
# Couldn't find a specific rate limit in the docs, so limit to max 3 per second
102116
time.sleep(0.3)
103117

104118
# Optionally change visibility
105-
print(f'Found {len(repo_status)} repos under namespace {args.namespace} ({len(change_visibility)} private)')
119+
print(
120+
f"Found {len(repo_status)} repos under namespace {args.namespace} ({len(change_visibility)} private)"
121+
)
106122
if args.changevisibility and QUAY_OAUTH_TOKEN:
107-
print(f'Changing visibility of {len(change_visibility)} repos to public')
108-
with open(f'{args.namespace}-changevisibility.txt', 'w') as fh:
123+
print(f"Changing visibility of {len(change_visibility)} repos to public")
124+
with open(f"{args.namespace}-changevisibility.txt", "w") as fh:
109125
for repo in change_visibility:
110-
111126
r = requests.post(
112-
f'{QUAY_API_URL}/{args.namespace}/{repo}/changevisibility',
127+
f"{QUAY_API_URL}/{args.namespace}/{repo}/changevisibility",
113128
headers=HEADERS,
114-
json={'visibility': 'public'},
115-
timeout=10
129+
json={"visibility": "public"},
130+
timeout=10,
116131
)
117-
repo_status[repo]['is_public'] = "True (changed by script)"
132+
repo_status[repo]["is_public"] = "True (changed by script)"
118133
# Again, be nice to Quay
119134
time.sleep(0.3)
120-
fh.write(f'Changed visibility of {args.namespace}/{repo} to public\n')
135+
fh.write(f"Changed visibility of {args.namespace}/{repo} to public\n")
121136

122137
# Print status
123-
with open(f'{args.namespace}-status.txt', 'w') as fh:
124-
fh.write('namespace\tname\tis_public\n')
125-
for k,v in sorted(repo_status.items()):
126-
fh.write(f'{v["namespace"]}\t{v["name"]}\t{v["is_public"]}\n')
138+
with open(f"{args.namespace}-status.txt", "w") as fh:
139+
fh.write("namespace\tname\tis_public\n")
140+
for k, v in sorted(repo_status.items()):
141+
fh.write(f"{v['namespace']}\t{v['name']}\t{v['is_public']}\n")

.github/workflows/GithubActionTests.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ concurrency:
55
cancel-in-progress: true
66

77
jobs:
8+
qc:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: astral-sh/ruff-action@v3
13+
name: ruff check
14+
- uses: astral-sh/ruff-action@v3
15+
name: ruff format
16+
with:
17+
args: "format --check --diff"
818
test-linux:
919
name: Linux tests
1020
runs-on: ubuntu-latest
@@ -52,7 +62,7 @@ jobs:
5262
fi
5363
test-macosx:
5464
name: OSX tests
55-
runs-on: macos-13
65+
runs-on: macos-15-intel
5666
steps:
5767
- uses: actions/checkout@v4
5868
with:

.github/workflows/changevisibility.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
run:
1111
shell: bash -l {0}
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v6
1414

1515
- name: Check Containers and Set Public
1616
run: |
@@ -20,8 +20,9 @@ jobs:
2020
QUAY_OAUTH_TOKEN: ${{ secrets.QUAY_BIOCONTAINERS_TOKEN }}
2121

2222
- name: Upload logs
23-
uses: actions/upload-artifact@v4
23+
uses: actions/upload-artifact@v6
2424
with:
2525
name: logs
2626
path: biocontainers-*.txt
2727
retention-days: 7
28+

.github/workflows/release-please.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ on:
22
push:
33
branches:
44
- master
5+
workflow_dispatch:
56

67
name: release-please
78

@@ -12,7 +13,7 @@ jobs:
1213
release_created: ${{ steps.release.outputs.release_created }}
1314
tag_name: ${{ steps.release.outputs.tag_name }}
1415
steps:
15-
- uses: GoogleCloudPlatform/release-please-action@v4
16+
- uses: googleapis/release-please-action@v4
1617
id: release
1718
with:
1819
release-type: python
@@ -23,7 +24,7 @@ jobs:
2324
needs: release_please
2425
if: needs.release_please.outputs.release_created
2526
steps:
26-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v6
2728
with:
2829
fetch-depth: 0
2930

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
# Changelog
22

3+
## [4.1.0](https://github.com/bioconda/bioconda-utils/compare/v4.0.0...v4.1.0) (2026-03-04)
4+
5+
6+
### Features
7+
8+
* eliminate redundant host-side solver run for Docker builds ([#1081](https://github.com/bioconda/bioconda-utils/issues/1081)) ([3d4c9e1](https://github.com/bioconda/bioconda-utils/commit/3d4c9e1110ce0f9d7915685f1a43752bdda3e085))
9+
* pre-solved environments for mulled tests ([#1082](https://github.com/bioconda/bioconda-utils/issues/1082)) ([af1ac9c](https://github.com/bioconda/bioconda-utils/commit/af1ac9c8ddfa17f4055aab065aa61b93973f8c30))
10+
11+
12+
### Bug Fixes
13+
14+
* add raise_for_status to CircleCI workflow API call ([#1083](https://github.com/bioconda/bioconda-utils/issues/1083)) ([2f558ee](https://github.com/bioconda/bioconda-utils/commit/2f558ee0664af9fbd4a2435ca8d7001c6c28cb19))
15+
16+
## [4.0.0](https://github.com/bioconda/bioconda-utils/compare/v3.9.2...v4.0.0) (2026-02-11)
17+
18+
19+
### ⚠ BREAKING CHANGES
20+
21+
* also find tests under outputs, ensure all outputs have tests, ensure outputs names are different from package name ([#1057](https://github.com/bioconda/bioconda-utils/issues/1057))
22+
23+
### Bug Fixes
24+
25+
* also find tests under outputs, ensure all outputs have tests, ensure outputs names are different from package name ([#1057](https://github.com/bioconda/bioconda-utils/issues/1057)) ([dd17aa7](https://github.com/bioconda/bioconda-utils/commit/dd17aa76b2410901649fb33c14e876452d26be1b))
26+
* update actions ([#1076](https://github.com/bioconda/bioconda-utils/issues/1076)) ([e301b5c](https://github.com/bioconda/bioconda-utils/commit/e301b5c6d8139ce80fddb7262c9355cf3284320b))
27+
* Update anaconda-client version to 1.14.* ([#1075](https://github.com/bioconda/bioconda-utils/issues/1075)) ([0bdd2a9](https://github.com/bioconda/bioconda-utils/commit/0bdd2a9202ec84e00c0ec923a24fafe68e9ee3a0)), closes [#1074](https://github.com/bioconda/bioconda-utils/issues/1074)
28+
29+
## [3.9.2](https://github.com/bioconda/bioconda-utils/compare/v3.9.1...v3.9.2) (2026-01-09)
30+
31+
32+
### Bug Fixes
33+
34+
* remove deprecated pkg_resources usage ahead of planned removal in Setuptools ≥81 ([#1058](https://github.com/bioconda/bioconda-utils/issues/1058)) ([0ef2df1](https://github.com/bioconda/bioconda-utils/commit/0ef2df1a5395e0111446fe79b9e1efdd5d67a7af))
35+
* unexpected arg 'label' ([#1065](https://github.com/bioconda/bioconda-utils/issues/1065)) ([16f2ab9](https://github.com/bioconda/bioconda-utils/commit/16f2ab9b48b8337647e4e4acfc6263c0592dd4b4))
36+
337
## [3.9.1](https://github.com/bioconda/bioconda-utils/compare/v3.9.0...v3.9.1) (2025-08-13)
438

539

0 commit comments

Comments
 (0)