examples icon indicating copy to clipboard operation
examples copied to clipboard

Doc build failing when project renamed

Open maximlt opened this issue 1 year ago • 0 comments

Opening a PR and changing the project name multiple times will create multiple folders in the tmp evaluated branch, which are all pulled when building the docs and can cause errors. For instance, it happened in https://github.com/holoviz-topics/examples/pull/430 with

Project(s) that will be built: ['attractors', 'bay_trimesh', 'boids', 'carbon_flux', 'census', 'census2010', 'census2020', 'census_one', 'datashader_dashboard', 'euler', 'exoplanets', 'gapminders', 'genetic_algorithm', 'gerrymandering', 'glaciers', 'goldbach_comet', 'gull_tracking', 'heat_and_trees', 'hipster_dynamics', 'iex_trading', 'landsat', 'landsat_clustering', 'landuse_classification', 'lsystems', 'ml_annotators', 'multichannel_timeseries', 'network_packets', 'nyc_buildings', 'nyc_taxi', 'opensky', 'osm', 'particle_swarms', 'penguin_crossfilter', 'portfolio_optimizer', 'seattle_lidar', 'ship_traffic', 'square_limit', 'sri_model', 'streaming_timeseries', 'template', 'timelapse_microscopy', 'uk_researchers', 'volumetric_imaging', 'walker_lake', 'world_cup']
Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/home/runner/miniconda3/envs/examples-gallery-manage/lib/python3.11/site-packages/sphinx/config.py", line 529, in eval_config_file
    exec(code, namespace)  # NoQA: S102
    ^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/examples/examples/doc/conf.py", line 174, in <module>
    'sections': [gallery_spec(project) for project in projects],
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/examples/examples/doc/conf.py", line 174, in <listcomp>
    'sections': [gallery_spec(project) for project in projects],
                 ^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/examples/examples/doc/conf.py", line 90, in gallery_spec
    with open(path) as f:
         ^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '../census2010/anaconda-project.yml'

See Project(s) that will be built: ['attractors', 'bay_trimesh', 'boids', 'carbon_flux', 'census', 'census2010', 'census2020', 'census_one', ...

Image

A solution would be to override completely the content of the tmp branch whenever we push from the build step.

maximlt avatar Jan 10 '25 14:01 maximlt