Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check up-to-date with not broken versions only #1849

Merged
merged 4 commits into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions conda_smithy/configure_feedstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2188,17 +2188,17 @@ def _load_forge_config(forge_dir, exclusive_config_file, forge_yml=None):
return config


def get_most_recent_version(name):
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()

pkg = max(
request.json()["files"], key=lambda x: VersionOrder(x["version"])
)
files = request.json()["files"]
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"]))

PackageRecord = namedtuple("PackageRecord", ["name", "version", "url"])
return PackageRecord(name, pkg["version"], "https:" + pkg["download_url"])
Expand Down
23 changes: 23 additions & 0 deletions news/1849-not-broken-up-to-date.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* Do not consider broken releases when checking if local version is up to date. (#1848 via #1849)

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
Loading