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

Default values for CLI arguments not aligned with documentation #2642

Closed
Pepeze opened this issue Feb 20, 2024 · 1 comment · Fixed by j178/pdm#1
Closed

Default values for CLI arguments not aligned with documentation #2642

Pepeze opened this issue Feb 20, 2024 · 1 comment · Fixed by j178/pdm#1
Labels
🐛 bug Something isn't working

Comments

@Pepeze
Copy link

Pepeze commented Feb 20, 2024

  • [✅] I have searched the issue tracker and believe that this is not a duplicate.

Steps to reproduce

When running certain CLI commands, such as add, sync, or install, the default values for the arguments seem to differ from what is written in the documentation.

Thanks for your help and for maintaining such a great package! :)

Actual behavior

pdm add: By default writes pyproject.toml and syncs the working set.
pdm sync: By default selects dev dependencies.
pdm install: By default selects dev dependencies.

Expected behavior

pdm add: Only writes pyproject.toml and do not sync the working set, as the default of --no-sync is True in the documentation.
pdm sync: Unselects dev dependencies, as the default of --production is True in the documentation.
pdm install: Unselects dev dependencies, as the default of --production is True in the documentation.

Environment Information

# Paste the output of `pdm info && pdm info --env` below:

PDM version:
  2.12.3
Python Interpreter:
  /home/my_user/project_name/.venv/bin/python (3.11)
Project Root:
  /home/my_user/project_name
Local Packages:

{
  "implementation_name": "cpython",
  "implementation_version": "3.11.4",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.15.133.1-microsoft-standard-WSL2",
  "platform_system": "Linux",
  "platform_version": "#1 SMP Thu Oct 5 21:02:42 UTC 2023",
  "python_full_version": "3.11.4",
  "platform_python_implementation": "CPython",
  "python_version": "3.11",
  "sys_platform": "linux"
}
@Pepeze Pepeze added the 🐛 bug Something isn't working label Feb 20, 2024
@frostming
Copy link
Collaborator

frostming commented Feb 22, 2024

The auto-generated CLI doc may be inaccurate for such a negative flag --no-sync. In fact, it is associated with a flag named sync whose default value is True, and the flag negates its value. Similar applies to --production

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants