Overwrite if encounters stale symlinks to ekos

Open Beginner friendly
#264 0 comments 0 reactions 0 assignees View on GitHub

@ashishsoni-ai is already working on this.

Since Nov 14, 2026.

  • #265 by @ashishsoni-ai — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Read inherit_ekos in src/pineko/theory.py and check how it handles existing paths and symlinks when --overwrite is unset. Reproduce the FileExistsError with a stale symlink, then verify the behavior for both overwrite settings; done when inheriting handles stale symlinks as described without breaking existing eko handling.

Written by the indexing model from the issue text.

Description

bug

In inherit_ekos in src/pineko/theory.py, currently the program crashes if a stale symlink is found for an eko when attempting to inherit. If the tag --overwrite is not set, the program crashes. We could automatically overwrite the bad symlink if this happens.

Could do something like

if new.exists() or new.is_symlink():
    if not self.overwrite:
        rich.print(f"Skipping existing eko {new}")
        continue
    new.unlink()

instead of crashing with a FileExistsError.

Dominant language
Python
Stars
2
Forks
0
Avg merge
10d 34m
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NNPDF/pineko

All issues in NNPDF/pineko

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.