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

Save filters in index.html #20

Open
mofeing opened this issue Sep 15, 2022 · 4 comments
Open

Save filters in index.html #20

mofeing opened this issue Sep 15, 2022 · 4 comments

Comments

@mofeing
Copy link
Member

mofeing commented Sep 15, 2022

When you add packages with some filter configuration (like --dev or --platform-specific), it is not saved for later use with the update` command.

In order not to remember them, pypickup should save it into a file and the index.html file inside the package dir already stores the info about the package.

@mofeing mofeing added this to the 0.2 milestone Sep 15, 2022
@HerManNav
Copy link
Collaborator

The update command already applies the specified modifiers (-s, --dev, etc.) and make a delta against the remote repository.

Why do we even need to save that for a later use?

@mofeing
Copy link
Member Author

mofeing commented Sep 16, 2022

How does the update command knows which specifiers or filters did you use with add? You should use the same specifiers because updating is just getting new versions but same filtering.

Also, using the packages' index.html file is a nice structured place where we can save metadata like filters.

@mofeing mofeing modified the milestones: 0.2, 0.3 Sep 16, 2022
@HerManNav
Copy link
Collaborator

HerManNav commented Sep 19, 2022

In the update command, the user can specify which modifiers to use as well. What would happen then?

Besides, I find it counterintuitive to apply some "ghost" filters that the user should go to check them out in an HTML file. Not clear to me.

The expected behaviour that I had in mind when I coded it is, for instance:

  1. The user adds a packages with the add command and -s modifier, which download only the source files.
  2. The user now wants to obtain the wheels, performs the update and gets them too.

In the approach proposed in this issue, this scenario wouldn't be possible, because you will apply the -s modifier again. Not the way to go imo.

@mofeing
Copy link
Member Author

mofeing commented Sep 19, 2022

The filters are not hidden, they are defined when you call the add the first time and you should be able to check them up.

The expected behaviour that I had in mind when I coded it is, for instance:

  1. The user adds a packages with the add command and -s modifier, which download only the source files.
  2. The user now wants to obtain the wheels, performs the update and gets them too.

I see your point of view but I do not agree with the point number of 2: A user most probably will call the update command to download new versions of the packages, not to change the filters. With tens (probably hundreds) of packages, it is unrealistic to think that the user will remember which packages do you want wheels, dev versions, filters to apply...

In my mind, there should be a sync command that adds the package if not present in your local cache and fetches new versions if present, and a config command that controls the modifiers to be applied to each package when synced.
I'm opening a new issue for this but the idea behind this issue is that the configuration should be stored in the index.html files.

EDIT: I guess that the best behavior if you add new modifiers to the sync is to override current configuration?

@HerManNav HerManNav modified the milestones: 0.3, 0.4 Sep 20, 2022
@HerManNav HerManNav removed this from the 0.4 milestone Jun 15, 2023
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