Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Repo hack from model.py #210

Open
SeanBryan51 opened this issue Nov 22, 2023 · 2 comments
Open

Remove Repo hack from model.py #210

SeanBryan51 opened this issue Nov 22, 2023 · 2 comments
Labels
priority:medium Medium priority issues to become high priority issues after a release.

Comments

@SeanBryan51
Copy link
Collaborator

On this line:

if isinstance(repo, GitRepo):
self.src_dir = Path("src")

The Model class should not have to know whether repo is a GitRepo or an SVNRepo, we should only be working with the Repo interface. This should be addressed if we want to properly test the model and repo modules.

Originally posted by @SeanBryan51 in #208 (comment)

@ccarouge
Copy link
Collaborator

I wonder if we could use something like Path.rglob() to find the path to the offline/ directory instead of hard-wiring it. I haven't checked if we use Model.src_dir for anything else.

@ccarouge
Copy link
Collaborator

I also think this should be changed:

path_to_repo = self.root_dir / internal.SRC_DIR / self.name

It should probably be given by the repo instead of set in Model.

@ccarouge ccarouge added the priority:medium Medium priority issues to become high priority issues after a release. label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:medium Medium priority issues to become high priority issues after a release.
Projects
None yet
Development

No branches or pull requests

2 participants