Skip to content

replace PathMixin and RepositoryApiMixin #3076

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

Closed
Panaetius opened this issue Aug 12, 2022 · 0 comments · Fixed by #3109
Closed

replace PathMixin and RepositoryApiMixin #3076

Panaetius opened this issue Aug 12, 2022 · 0 comments · Fixed by #3109
Assignees

Comments

@Panaetius
Copy link
Member

Panaetius commented Aug 12, 2022

To get rid of PathMixin and RepositoryApiMixin move the following properties to the config class from #3081 and use the config dispatcher where they are needed.

  • RepositoryApiMixin.renku_home
  • RepositoryApiMixin.renku_path
  • RepositoryApiMixin.parent
  • RepositoryApiMixin.data_dir
  • RepositoryApiMixin.docker_path
  • RepositoryApiMixin.template_checksums
  • RepositoryApiMixin.database_path

In addition, LOCK_SUFFIX, DATABASE_PATH, DOCKERFILE, TEMPLATE_CHECKSUMS, RENKU_PROTECTED_PATHS and DATABASE_METADATA_PATHshould just be module level constants in renku/core/constant.py.

We should remove attrs and replace it with proper __init__.

with_metadata should be a ProjectContext (or similar) context manager.
is_project_set can be removed, as it's only used in one place and essentially useless.
RepositoryApiMixin.project should be removed as well in favor of using the IProjectGateway directly.
transaction_id can probably be moved to Repository.
All the methods should be normal business logic methods, unless they really need to be on a class.

The locks can be added to the lock class from #3082 that also gets injected.

blocked by #3081

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants