Skip to content

Commit

Permalink
do not include broken by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Feb 25, 2024
1 parent a1945d3 commit d68a685
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions conda_smithy/configure_feedstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2188,15 +2188,15 @@ def _load_forge_config(forge_dir, exclusive_config_file, forge_yml=None):
return config


def get_most_recent_version(name, only_not_broken=False):
def get_most_recent_version(name, include_broken=False):
from conda_build.conda_interface import VersionOrder

request = requests.get(
"https://api.anaconda.org/package/conda-forge/" + name
)
request.raise_for_status()
files = request.json()["files"]
if only_not_broken:
if not include_broken:
files = [f for f in files if "broken" not in f.get("labels", ())]
pkg = max(files, key=lambda x: VersionOrder(x["version"]))

Expand All @@ -2207,9 +2207,7 @@ def get_most_recent_version(name, only_not_broken=False):
def check_version_uptodate(name, installed_version, error_on_warn):
from conda_build.conda_interface import VersionOrder

most_recent_version = get_most_recent_version(
name, only_not_broken=True
).version
most_recent_version = get_most_recent_version(name).version
if installed_version is None:
msg = "{} is not installed in conda-smithy's environment.".format(name)
elif VersionOrder(installed_version) < VersionOrder(most_recent_version):
Expand Down

0 comments on commit d68a685

Please sign in to comment.