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

Feat: add minimum save strategy #752

Merged
merged 8 commits into from
Nov 20, 2021
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
2 changes: 1 addition & 1 deletion docs/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The following configuration items can be retrieved and modified by `pdm config`
| `pypi.url` | The URL of PyPI mirror | Read `index-url` in `pip.conf`, or `https://pypi.org/simple` if not found | Yes | `PDM_PYPI_URL` |
| `pypi.verify_ssl` | Verify SSL certificate when query PyPI | Read `trusted-hosts` in `pip.conf`, defaults to `True` | Yes | |
| `pypi.json_api` | Consult PyPI's JSON API for package metadata | `False` | Yes | `PDM_PYPI_JSON_API` |
| `strategy.save` | Specify how to save versions when a package is added | `compatible`(can be: `exact`, `wildcard`) | Yes | |
| `strategy.save` | Specify how to save versions when a package is added | `compatible`(can be: `exact`, `wildcard`, `minimum`) | Yes | |
| `strategy.update` | The default strategy for updating packages | `reuse`(can be : `eager`) | Yes | |
| `strategy.resolve_max_rounds` | Specify the max rounds of resolution process | 1000 | Yes | `PDM_RESOLVE_MAX_ROUNDS` |

Expand Down
1 change: 1 addition & 0 deletions news/feat-add-lb-strategy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add support for saving only the lower bound `x >= VERSION` when adding dependencies.
24 changes: 12 additions & 12 deletions pdm/cli/completions/pdm.bash
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# BASH completion script for pdm
# Generated by pycomplete 0.3.2

_pdm_25182a7ef85b840e_complete()
_pdm_e7edb5cd940e5db5_complete()
{
local cur script coms opts com
COMPREPLY=()
Expand Down Expand Up @@ -29,11 +29,11 @@ _pdm_25182a7ef85b840e_complete()
case "$com" in

(add)
opts="--dev --editable --global --dry-run --group --help --no-editable --no-self --no-sync --project --save-compatible --save-exact --save-wildcard --unconstrained --update-eager --update-reuse --verbose --no-isolation"
opts="--dev --dry-run --editable --global --group --help --no-editable --no-isolation --no-self --no-sync --project --save-compatible --save-exact --save-minimum --save-wildcard --section --unconstrained --update-eager --update-reuse --verbose"
;;

(build)
opts="--config-setting --dest --help --no-clean --no-sdist --no-wheel --project --verbose --no-isolation"
opts="--config-setting --dest --help --no-clean --no-isolation --no-sdist --no-wheel --project --verbose"
;;

(cache)
Expand All @@ -49,11 +49,11 @@ _pdm_25182a7ef85b840e_complete()
;;

(export)
opts="--dev --format --global --group --help --no-default --output --production --project --pyproject --verbose --without-hashes"
opts="--dev --format --global --group --help --no-default --output --production --project --pyproject --section --verbose --without-hashes"
;;

(import)
opts="--dev --format --global --group --help --project --verbose"
opts="--dev --format --global --group --help --project --section --verbose"
;;

(info)
Expand All @@ -65,27 +65,27 @@ _pdm_25182a7ef85b840e_complete()
;;

(install)
opts="--dev --global --group --help --dry-run --no-default --no-editable --no-lock --no-self --production --project --verbose --no-isolation"
opts="--dev --dry-run --global --group --help --no-default --no-editable --no-isolation --no-lock --no-self --production --project --section --verbose"
;;

(list)
opts="--freeze --global --graph --help --json --project --reverse --verbose"
;;

(lock)
opts="--global --help --project --verbose --no-isolation"
opts="--global --help --no-isolation --project --verbose"
;;

(plugin)
opts="--help --verbose"
;;

(remove)
opts="--dev --global --group --help--dry-run --no-editable --no-self --no-sync --project --verbose --no-isolation"
opts="--dev --dry-run --global --group --help --no-editable --no-isolation --no-self --no-sync --project --section --verbose"
;;

(run)
opts="--global --help --list --project --verbose --site-packages"
opts="--global --help --list --project --site-packages --verbose"
;;

(search)
Expand All @@ -97,11 +97,11 @@ _pdm_25182a7ef85b840e_complete()
;;

(sync)
opts="--clean --dev --dry-run --global --group --help --no-clean --no-default --no-editable --no-self --production --project --reinstall --verbose --no-isolation"
opts="--clean --dev --dry-run --global --group --help --no-clean --no-default --no-editable --no-isolation --no-self --production --project --reinstall --section --verbose"
;;

(update)
opts="--dev --global --group --help --no-default --no-editable --no-sync --no-self --outdated --production --project --save-compatible --save-exact --save-wildcard --top --unconstrained --update-eager --update-reuse --verbose --no-isolation"
opts="--dev --global --group --help --no-default --no-editable --no-isolation --no-self --no-sync --outdated --production --project --save-compatible --save-exact --save-minimum --save-wildcard --section --top --unconstrained --update-eager --update-reuse --verbose"
;;

(use)
Expand All @@ -127,4 +127,4 @@ _pdm_25182a7ef85b840e_complete()
fi
}

complete -o default -F _pdm_25182a7ef85b840e_complete pdm
complete -o default -F _pdm_e7edb5cd940e5db5_complete pdm
Loading