Skip to content

Commit

Permalink
Fix GitHub Actions error that caused failures
Browse files Browse the repository at this point in the history
  • Loading branch information
MRichards99 committed May 9, 2023
1 parent f8a7288 commit a55e221
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/ci_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
poetry==1.1.9
poetry==1.3.2
nox==2022.1.7
8 changes: 8 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ def install_with_constraints(session, *args, **kwargs):
f"--output={requirements.name}",
external=True,
)
# Using sed to remove extras from the constraints file, thereby fixing the
# error "Constraints cannot have extras". A better solution might be to
# use `poetry install --only dev` but this requires a newer version of
# Poetry than we're using in our development environments. See
# https://github.com/jazzband/pip-tools/issues/1300#issuecomment-818122483
# for more info relating to the sed solution
sed_expression = r"s/\[.*\]//g"
session.run("sed", "-i", sed_expression, requirements.name, external=True)
session.install(f"--constraint={requirements.name}", *args, **kwargs)

try:
Expand Down

0 comments on commit a55e221

Please sign in to comment.