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

Python package set: normalize all attribute names #49691

Closed
FRidh opened this issue Nov 3, 2018 · 11 comments
Closed

Python package set: normalize all attribute names #49691

FRidh opened this issue Nov 3, 2018 · 11 comments

Comments

@FRidh
Copy link
Member

FRidh commented Nov 3, 2018

Issue description

The convention in python-packages.nix is to use normalized names although far from every attribute fulfills this requirement.

Having all packages conform will simplify things for automation.

Note that the scope is only the attribute names, and not the pname attributes.

cc @costrouc

@FRidh
Copy link
Member Author

FRidh commented Nov 3, 2018

@costrouc in #49657 (comment)

I know this would require a lot of rebuilds and would possibly break people's configuration but I think that getting all the python package names in nixpkgs normalized is a first step before update automation could be considered.

Fixing the attribute names won't cause any rebuilds, but indeed, it will break people's configuration.

I think that a generated.nix is very doable and a great idea! With correct normalized package naming the only thing this tool this tool misses is extra packages and checkInputs. default.nix would get a lot shorter and simpler to write.

I would be willing to work on normalizing package names.

We should look at adding a test to Nixpkgs so we can enforce this.

@costrouc
Copy link
Member

costrouc commented Nov 3, 2018

Since I am quite new I am not aware of how to add a test to Nixpkgs. Are you suggesting a GrahamcOfBorg check?

Edit: I see the pkgs tests

@costrouc
Copy link
Member

After the 19.03 release I would like to work on this in an automated fashion to see how far it goes. Having normalized names would allow tools such as https://github.com/t184256/nixpkgs-python-importer and https://github.com/nix-community/nixpkgs-pytools to get the package name correct and in general not force users to guess on the name of a python package. @FRidh do you have suggestions on how this should be approached? Right now I am considering an adhoc approach manual/https://github.com/Mic92/pythonix to read the derivation names.

@FRidh
Copy link
Member Author

FRidh commented Apr 12, 2019

Yes, use pytho(nix) to generate a list of attribute names, and check with the PyPI index whether a package exists with that name. If so, good. If not, then likely it needs to be fixed.

Furthermore, when checking this, it's possible to check whether the attribute name is normalized.

@costrouc
Copy link
Member

costrouc commented Apr 12, 2019

How would we handle renaming? Obviously this would break for a lot of people who depend on nixpkgs if the transition was done immediately. Would there be a way to depreciate the attribute names? (this is likely due to me not knowing enough of nixpkgs).

@FRidh
Copy link
Member Author

FRidh commented Apr 12, 2019

Deprecation is in my opinion just generating work. If we feel this is worth it we should do it and then I think it's best to just get it over with.

@costrouc
Copy link
Member

costrouc commented Apr 12, 2019

Okay I will work on this in the coming weeks. With a goal of making it as automated as possible. I don't want to manually create 500+ commits again 😄

@stale
Copy link

stale bot commented Jun 3, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2020
@FRidh FRidh added this to the 20.09 milestone Aug 29, 2020
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 29, 2020
@FRidh
Copy link
Member Author

FRidh commented Aug 29, 2020

See #96586

@FRidh FRidh modified the milestones: 20.09, 21.03 Dec 20, 2020
@stale
Copy link

stale bot commented Jun 18, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 18, 2021
@FRidh FRidh removed this from the 21.05 milestone Oct 5, 2022
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 5, 2022
@FRidh
Copy link
Member Author

FRidh commented Aug 1, 2023

Replaced by #245383.

@FRidh FRidh closed this as completed Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants