lincc-frameworks / python-project-template

Python project best practices for scientific software
https://lincc-ppt.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
60 stars 15 forks source link

Potential duplicate stage in asv workflow #259

Open delucchi-cmu opened 1 year ago

delucchi-cmu commented 1 year ago

@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?

camposandro commented 1 year ago

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.

drewoldag commented 9 months ago

@camposandro recommends that we simplify the workflow.