-
Notifications
You must be signed in to change notification settings - Fork 275
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
[WIP] tuf-client as a standalone installation #1221
Conversation
Modify setup.py with tuf-client information Signed-off-by: Teodora Sechkova <[email protected]>
Split TUF in client and repository side: remove repository-only source code. Signed-off-by: Teodora Sechkova <[email protected]>
Create a dummy test without using repository_tool and repository_lib functionality. test_api is used as an example for test SetUp and TearDown. Signed-off-by: Teodora Sechkova <[email protected]>
In case I have successfully regenerated
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking a stab at this @sechkova! 🎉
My motivation for filing #1181 was the idea that an effort such as this might be useful:
a) for vendoring tuf into pip, to reduce the number of files and LOC added to that project (see pypa/pip#9041)
b) for theoretically providing an as small as possible base for interested parties to pick up if they want/need to continue to use tuf/client/updater.py on a version of the interpreter that will no longer be supported following the refactor towards 1.0 (i.e. 2.7)
I'll leave others to comment on whether they feel this work is worthwhile cc @lukpueh @trishankatdatadog @jku
@@ -124,7 +124,6 @@ | |||
], | |||
packages = find_packages(exclude=['tests']), | |||
scripts = [ | |||
'tuf/scripts/repo.py', | |||
'tuf/scripts/client.py' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well scrap this, too. It's not useful for clients using updater.py
# Metadata role keys are needed by the test cases to make changes to the | ||
# repository (e.g., adding a new target file to 'targets.json' and then | ||
# requesting a refresh()). | ||
self.role_keys = _load_role_keys(self.keystore_directory) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want/need this if we're not using repository_tool?
Change of heart! I think this suggestion achieves the goals listed by Joshua:
while in addition:
As a drawback, one repository will host configuration for two packages. We can use the occasion to experiment with "modern packaging" #1161, however. |
In case there are no objections on the proposal in the last comment, I will close this PR and reopen another one with the suggested approach. |
Closing this based on last comment :) |
Fixes #1181
Description of the changes being introduced by the pull request:
This is a WIP trying to identify whether splitting the client and repository code and maintaining a client as
a separate installation (in a client branch for now) will be useful for client side users of tuf (e.g. pip) as well as for providing some kind of support for older versions.
Up to now I have only removed the pure repository code and generated a tuf-client distribution.
This only reduces the lines of code while the dependencies remain the same, since client and repository share all dependencies (see comment). Client even upgrades them with requests.
I added one dummy test simply calling updater.refresh without using the repository code.
Please give me your opinion on:
Please verify and check that the pull request fulfills the following
requirements: