diff --git a/CHANGELOG.md b/CHANGELOG.md index baffe87a..1d49d7d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to Stability Matrix will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html). -## v2.something +## v2.10.2 ### Fixed - Fixed more crashes when loading invalid connected model info files - Fixed pip installs not parsing comments properly diff --git a/StabilityMatrix.Core/Python/PipInstallArgs.cs b/StabilityMatrix.Core/Python/PipInstallArgs.cs index 8c33f194..558a7db8 100644 --- a/StabilityMatrix.Core/Python/PipInstallArgs.cs +++ b/StabilityMatrix.Core/Python/PipInstallArgs.cs @@ -30,7 +30,9 @@ public record PipInstallArgs : ProcessArgsBuilder { var requirementsEntries = requirements .SplitLines(StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries) - .Where(s => !s.StartsWith('#')); + .Where(s => !s.StartsWith('#')) + .Select(s => s.Contains('#') ? s.Substring(0, s.IndexOf('#')) : s) + .Where(s => !string.IsNullOrWhiteSpace(s)); if (excludePattern is not null) {