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

Use pip-compile-multi option --autoresolve #106

Merged
merged 10 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
4 changes: 2 additions & 2 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ packaging==23.2
# via
# pyproject-api
# tox
platformdirs==3.11.0
platformdirs==4.0.0
# via
# tox
# virtualenv
Expand All @@ -35,5 +35,5 @@ tomli==2.0.1
# tox
tox==4.11.3
# via -r ci.in
virtualenv==20.24.6
virtualenv==20.24.7
# via tox
6 changes: 3 additions & 3 deletions requirements/static.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ distlib==0.3.7
# via virtualenv
filelock==3.13.1
# via virtualenv
identify==2.5.31
identify==2.5.32
# via pre-commit
nodeenv==1.8.0
# via pre-commit
platformdirs==3.11.0
platformdirs==4.0.0
# via virtualenv
pre-commit==3.5.0
# via -r static.in
pyyaml==6.0.1
# via pre-commit
virtualenv==20.24.6
virtualenv==20.24.7
# via pre-commit

# The following packages are considered to be unsafe in a requirements file:
Expand Down
4 changes: 0 additions & 4 deletions template/requirements/docs.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@ sphinx
sphinx-autodoc-typehints
sphinx-copybutton
sphinx-design
platformdirs<4 # temporary until virtualenv has release with support for this
# Temporary until questionary (dep of copier) updates
# See https://github.com/tmbo/questionary/blob/2df265534f3eb77aafcf70902e53e80beb1793e0/pyproject.toml#L36C43-L36C110
prompt-toolkit==3.0.36
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2023 Scipp contributors (https://github.com/scipp)

import glob
import sys
from argparse import ArgumentParser
from pathlib import Path
Expand Down Expand Up @@ -65,3 +69,12 @@ def as_nightly(repo: str) -> str:
nightly_dependencies += [as_nightly(arg) for arg in nightly]

write_dependencies("nightly", nightly_dependencies)

# Write a file with all dependencies
# This is needed by pip-compile-multi's --autoresolve option
all_dependencies = [f"-r {dep}" for dep in glob.glob("*.in")]
path = Path("all.in")
with path.open("w") as f:
f.write("# This file was generated by make_deps.py, DO NOT EDIT MANUALLY!\n\n")
f.write("\n".join(all_dependencies))
f.write("\n")
4 changes: 2 additions & 2 deletions template/tox.ini.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ deps =
tomli
skip_install = true
changedir = requirements
commands = python ./make_base.py{% if nightly_deps %} --nightly {{nightly_deps}}{% endif %}
pip-compile-multi -d .
commands = python ./make_deps.py{% if nightly_deps %} --nightly {{nightly_deps}}{% endif %}
pip-compile-multi --autoresolve -d .
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ description = Update dependencies by running pip-compile-multi
deps = pip-compile-multi
skip_install = true
changedir = requirements
commands = pip-compile-multi -d .
commands = pip-compile-multi --autoresolve -d .