Skip to content

[MNT] homogenize CI workflows with GC.OS repositories#702

Merged
fkiraly merged 27 commits intoPyPortfolio:mainfrom
tingiskhan:ci/homogenize-workflows-with-sktime
Mar 8, 2026
Merged

[MNT] homogenize CI workflows with GC.OS repositories#702
fkiraly merged 27 commits intoPyPortfolio:mainfrom
tingiskhan:ci/homogenize-workflows-with-sktime

Conversation

@tingiskhan
Copy link
Contributor

@tingiskhan tingiskhan commented Feb 21, 2026

Homogenizes the main workflows of pyportfolioopt with that of GC.OS repositories - template used is sktime @fkiraly

@tingiskhan tingiskhan marked this pull request as draft February 21, 2026 12:41
@tingiskhan
Copy link
Contributor Author

@fkiraly Would it make sense to have a dedicated devops repo associated with sktime where re-usable workflow components are stored?

@fkiraly
Copy link
Collaborator

fkiraly commented Feb 26, 2026

@fkiraly Would it make sense to have a dedicated devops repo associated with sktime where re-usable workflow components are stored?

Yes, that sounds like an excellent idea. I think @tschm has set this up for their repos.

However, I think it is not a priority currently when compared to getting ppfopt back on track.

@fkiraly fkiraly changed the title Ci/homogenize workflows with sktime Ci/homogenize workflows with GC.OS repositories Feb 26, 2026
@fkiraly fkiraly added the maintenance Continuous integration, unit testing & package distribution label Feb 26, 2026
run: uv pip install ".[dev,all_extras]" --no-cache-dir
env:
UV_SYSTEM_PYTHON: 1
run: uv sync --extra all_extras --extra dev --no-cache
Copy link
Collaborator

@fkiraly fkiraly Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would go for uv pip install rather than uv sync. See long discussion on the topic in sktime.

pyproject.toml Outdated
line-ending = "auto"
skip-magic-trailing-comma = false

[dependency-groups]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why move it here? I think we should just leave it in non-uv format

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually the pip standard as of 25.1: https://packaging.python.org/en/latest/specifications/dependency-groups/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The biggest benefit is that you can install just the dependencies inside that group, without having to install the full suite of packages - something I've longed for!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, you are right - introduced in 2025! I must have missed this.

Yes, `notebook-test´ should then also be here.

We should also think about how and whether to move this in the other GC.OS packages. sktime will move to 1.0 soon, that is an opportunity to move all the dev/testing related depsets to dependency-groups.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted, since it would be a breaking change for environment setup - pip install pyportfolioopt[dev] no longer works

Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Looks mostly good, but in some places it notably diverges from the "close to pip setup" to more uv based idioms. I think these may be problematic and shuld be reverted:

  • use of uv sync instead of uv pip install, this can cause problems with incompatible depsets
  • use of uv depset definition in pyproject.toml which no longer conforms with PEP

Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks!

  • opinion on uv sync remains
  • also, we should not rename release.yml, since it is registered as a trusted publisher with pypi now. Not uniform, but less of a hassle...

@fkiraly
Copy link
Collaborator

fkiraly commented Mar 1, 2026

the yml now has conflicts with main, I think due to a dependabot update

@tingiskhan tingiskhan marked this pull request as ready for review March 1, 2026 14:11
enable-cache: true
python-version: '3.11'

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accidentally added some tabs here, I think?

@fkiraly fkiraly changed the title Ci/homogenize workflows with GC.OS repositories [MNT] homogenize CI workflows with GC.OS repositories Mar 5, 2026
Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now - I think there is are a few stray whitespaces though, if you want to remove them. Does the code quality workflow not check the actions ymls?

@tingiskhan
Copy link
Contributor Author

I'll take a look at the white spaces and fix the errors in the workflow

Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wanted to merge but noticed that there are substantial changes in notebook 2 - is this an accident that should be reverted?

@tingiskhan
Copy link
Contributor Author

tingiskhan commented Mar 7, 2026

Wanted to merge but noticed that there are substantial changes in notebook 2 - is this an accident that should be reverted?

The notebook fails stochastically due to yfinance not always being able to fetch the prices for the optimization universe for the latest date - it fails between runs both locally and in CI. We could either (i) do as I do and simply drop the partia NaN rows, (ii) forward fill the prices, or (iii) select the previous day (no guarantee for non-missing observations though).

But just to make sure, you are referring to the NaN-handling, right? Shouldn’t be any other differences (other than adding plotly to pip install)

@fkiraly
Copy link
Collaborator

fkiraly commented Mar 7, 2026

I would suggest to revert changes in the notebook, since otherwise this PR would conflict with the more programmatic fix in #721

@tingiskhan
Copy link
Contributor Author

I would suggest to revert changes in the notebook, since otherwise this PR would conflict with the more programmatic fix in #721

Ah, nice, had missed that - fixing!

Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@fkiraly fkiraly merged commit 267b233 into PyPortfolio:main Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Continuous integration, unit testing & package distribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants