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

Add minimal environment option #822

Open
s3alfisc opened this issue Mar 2, 2025 · 4 comments · May be fixed by #830
Open

Add minimal environment option #822

s3alfisc opened this issue Mar 2, 2025 · 4 comments · May be fixed by #830
Labels
dependencies Pull requests that update a dependency file question Further information is requested

Comments

@s3alfisc
Copy link
Member

s3alfisc commented Mar 2, 2025

Should we add a "minimal" environment that allows to use core functionality but drops many dependencies only required for select operations?

Currently, the "main" env has the following dependencies:

  • "scipy>=1.6",
  • "formulaic>=1.1.0",
  • "pandas>=1.1.0",
  • "numba>=0.58.0",
  • "seaborn>=0.13.2",
  • "tabulate>=0.9.0",
  • "tqdm>=4.0.0",
  • "great-tables>=0.10.0",
  • "numpy>=1.19.0",
  • "narwhals>=1.13.3",
  • "joblib>=1.4.2,<2",

Instead, the "minimal" environment would contain only

  • "scipy>=1.6",
  • "formulaic>=1.1.0",
  • "pandas>=1.1.0",
  • "numba>=0.58.0",
  • "numpy>=1.19.0",
  • "narwhals>=1.13.3",

As a result, plotting methods would not work (no seaborn), etable and summary would not work (no tabulate, great-tables), some inference methods that depend on tqdm and joblib might not work (ritest, ccv, gelbach).

Is there a use case for such an environment?

@s3alfisc s3alfisc added the question Further information is requested label Mar 2, 2025
@elchorro
Copy link
Contributor

elchorro commented Mar 3, 2025

Not sure how complicated this would be, but I'd say that it would be useful. I mentioned elsewhere that I want to bring in pyfixest to my company's internal codebase: no conda/pip, all dependencies have to be carefully managed.

I'd definitely start with the minimal distribution, if it was available.

@s3alfisc
Copy link
Member Author

s3alfisc commented Mar 3, 2025

Thanks for the feedback @elchorro! I think this should be fairly easy to do, we'd simply have to add the "small" env to the pyproject - the summarization and report functions live in separate standalone scripts, and so does most of the core implementation of outside methods. Though I'd have to verify this. Beyond a bit of dependency management in the script, I think no code adjustments would be needed as whenever a dependency is missing, pyfixest should fail quite loudly?

@s3alfisc
Copy link
Member Author

s3alfisc commented Mar 3, 2025

Ok just tested this a bit and it will be more work than I had hoped for (in the sense that it's not a 60 minutes effort) ... it will require to reorganize import statements by quite a lot. I have to tinker about this a bit & have to come up with a plan - but I definitely would love to help you to get pyfixest into prod @elchorro =)

@s3alfisc s3alfisc linked a pull request Mar 8, 2025 that will close this issue
6 tasks
@s3alfisc s3alfisc added the dependencies Pull requests that update a dependency file label Mar 8, 2025
@s3alfisc
Copy link
Member Author

s3alfisc commented Mar 8, 2025

Actually, not that much work after all, apparently =) Very MVP PR here: #830

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants