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

Replace add, update commands with sync, config commands #25

Closed
7 tasks
mofeing opened this issue Sep 19, 2022 · 1 comment
Closed
7 tasks

Replace add, update commands with sync, config commands #25

mofeing opened this issue Sep 19, 2022 · 1 comment
Milestone

Comments

@mofeing
Copy link
Member

mofeing commented Sep 19, 2022

From the very beginning we have seen some frictions with the semantics behind the add and update commands. One example is the discussion in #20.

My proposal is to

  1. Implement modifiers/filters as entrypoints
  2. Refactor add, update functionality to sync,config commands

The sync command would fetch a list of filenames from PyPI and

  1. If the package is not present in the local cache, then create a new subdir, a new index.html, apply default filters (e.g. dev versions filter) unless modifier flags are present and download them. If modifier flags are present, store them in the index.html metadata.
  2. If the package is present, then load configuration/filters and list of already downloaded files from index.html. Afterwards, apply the loaded filters to the list of filenames downloaded from PyPI, compute the diff with the list of local files and download the result. If modifier flags are present, then override default filters.

Roadmap

  • New entry-point group for filters pypickup.filter
    • Implement dev version filter as entrypoint
    • Implement alpha, beta version filter as entrypoint
    • Implement wheels filter as entrypoint
  • Store package configuration (i.e. filters) in packages' index.html as metadata (Save filters in index.html #20)
  • New config command to check and edit packages' index.html metadata
  • New sync command to fetch packages from PyPI
    • Acts like add if package is not in local cache
    • Acts like update if package is in local cache
    • May add some filters as default
@mofeing mofeing added this to the 0.3 milestone Sep 19, 2022
@HerManNav HerManNav modified the milestones: 0.3, 0.4 Sep 20, 2022
@HerManNav HerManNav modified the milestones: 0.4, 0.4.1 Jun 15, 2023
@HerManNav
Copy link
Collaborator

Commit 0298774

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

No branches or pull requests

2 participants