GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add pandas to pyproject.toml by KybernetikJo · Pull Request #964 · python-control/python-control

Conversation

@KybernetikJo

@KybernetikJo KybernetikJo commented Jan 22, 2024

Copy link
Copy Markdown
Contributor

Adds pandas to pyproject.toml.

Allows optional install

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@coveralls

coveralls commented Jan 22, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Coverage Status

coverage: 94.784%. remained the same
when pulling ac5a4d1 on KybernetikJo:add_pandas_to_pyproject
into a8a54d1 on python-control:main.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@KybernetikJo
Add pandas to pyproject.toml
fa9dae2
@KybernetikJo
KybernetikJo force-pushed the add_pandas_to_pyproject branch from 615e774 to fa9dae2 Compare January 22, 2024 18:52
@bnavigator

bnavigator commented Jan 22, 2024

Copy link
Copy Markdown
Contributor

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

What's the effective difference between pip install control pandas and pip install 'control[pandas]'?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnavigator

bnavigator commented Jan 22, 2024

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@KybernetikJo

KybernetikJo commented Jan 22, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

What's the effective difference between pip install control pandas and pip install 'control[pandas]'?

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

What do you think about a pip install[full] or pip 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@KybernetikJo
Add full as optional install in pyproject.toml
ac5a4d1
@KybernetikJo

KybernetikJo commented Jan 23, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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

What's the effective difference between pip install control pandas and pip 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:

  • polars https://github.com/pola-rs/polars/blob/main/py-polars/pyproject.toml
  • cvxpy https://github.com/cvxpy/cvxpy/blob/master/pyproject.toml

The reason could be

  • to document all dependencies (also optional) in pyproject.toml
  • to indicate that a single option is a valid installation pip install control[pandas]
  • to ensure the right version of optional packages
    • pip install control[slycot] is actually pip install "slycot>=0.4.0" control
    • pip install control[pandas] would be pip 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@KybernetikJo KybernetikJo closed this Feb 8, 2024
@KybernetikJo

KybernetikJo commented Feb 8, 2024

Copy link
Copy Markdown
Contributor Author

Well, the benefits were not big enough.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@KybernetikJo @coveralls @bnavigator
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.