Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add pandas to pyproject.toml#964

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

KybernetikJo
Copy link
Contributor

Adds pandas to pyproject.toml.

Allows optional install

pip install control[pandas]pip install control[pandas,slycot]...

@coveralls
Copy link

coveralls commentedJan 22, 2024
edited
Loading

Coverage Status

coverage: 94.784%. remained the same
when pullingac5a4d1 on KybernetikJo:add_pandas_to_pyproject
intoa8a54d1 on python-control:main.

@bnavigator
Copy link
Contributor

I don't really see a big enough benefit of adding a single optionalwell known package with the same name as the package.

What's the effective difference betweenpip install control pandas andpip install 'control[pandas]'?

@bnavigator
Copy link
Contributor

FTR, I am guilty of starting that kind of extra with Slycot in#678. Probably would not do it again.

@KybernetikJo
Copy link
ContributorAuthor

KybernetikJo commentedJan 22, 2024
edited
Loading

What's the effective difference betweenpip install control pandas andpip install 'control[pandas]'?

You are right. There is no real difference. It was just for the sake of completeness.

What do you think about apip install[full] orpip install[all]?

[project.optional-dependencies]test = ["pytest", "pytest-timeout"]slycot = [ "slycot>=0.4.0" ]cvxopt = [ "cvxopt>=1.2.0" ]pandas = [ "pandas>=1.5.0" ]all = [    "control[test]",    "control[slycot]",    "control[cvxopt]",    "control[pandas]",    ]

or

[project.optional-dependencies]test = ["pytest", "pytest-timeout"]all = [    "control[test]",    "slycot>=0.4.0" ]    "cvxopt>=1.2.0" ,    "pandas>=1.5.0" ,    ]

https://hynek.me/articles/python-recursive-optional-dependencies/

I do not have strong feelings about it. I am OK not merging it.

@KybernetikJo
Copy link
ContributorAuthor

KybernetikJo commentedJan 23, 2024
edited
Loading

I don't really see a big enough benefit of adding a single optionalwell known package with the same name as the package.

What's the effective difference betweenpip install control pandas andpip install 'control[pandas]'?

These are valid points, so I looked for other projects that use the pattern. I was able to find two well known packages:

The reason could be

  • to document all dependencies (also optional) in pyproject.toml
  • to indicate that a single option is a valid installationpip install control[pandas]
  • to ensure the right version of optional packages
    • pip install control[slycot] is actuallypip install "slycot>=0.4.0" control
    • pip install control[pandas] would bepip install "pandas>=1.5.0" control

Remark:
Well, the benefits don't seem to be big enough. I will keep the PR open for a few weeks, and then I will close it.

@KybernetikJo
Copy link
ContributorAuthor

Well, the benefits were not big enough.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@KybernetikJo@coveralls@bnavigator

[8]ページ先頭

©2009-2025 Movatter.jp