python-project-template icon indicating copy to clipboard operation
python-project-template copied to clipboard

Potential duplicate stage in asv workflow

Open delucchi-cmu opened this issue 2 years ago • 2 comments

@OliviaLynn pointed out in review of https://github.com/astronomy-commons/hipscat/pull/124 that the asv-pr and asv-main scripts have two stages with action like: Cache Python ${{ env.PYTHON_VERSION }}

Is this duplication intentional and necessary?

delucchi-cmu avatar Aug 11 '23 14:08 delucchi-cmu

Great point @OliviaLynn @delucchi-cmu!

The duplication of this cache action is only required because each job defined in the workflow runs in a fresh (isolated) environment. The first job "setup-python" is responsible for installing Python and caching the environment so that posterior jobs may pick it up and reuse it. At the moment we only have a job succeeding this "setup-python" so we could actually simplify the workflow, use a single job and remove such duplication of caching calls. Issue is in the future we might need them again if we decide to add new jobs to the pipeline.

camposandro avatar Aug 11 '23 15:08 camposandro

@camposandro recommends that we simplify the workflow.

drewoldag avatar Nov 17 '23 18:11 drewoldag

These cache stages have been removed in https://github.com/lincc-frameworks/python-project-template/pull/482.

camposandro avatar Oct 25 '24 18:10 camposandro