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: editorconfig fixes #96438

Merged
merged 1 commit into from Aug 27, 2020
Merged

python: editorconfig fixes #96438

merged 1 commit into from Aug 27, 2020

Conversation

zowoq
Copy link
Contributor

@zowoq zowoq commented Aug 27, 2020

Motivation for this change

The editorconfig-check hasn't been reenabled yet (probably in the next couple of days) but I though I'd try to get this in while it isn't causing conflicts with staging/staging-next.

This covers everything in python-modules.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@FRidh
Copy link
Member

FRidh commented Aug 27, 2020

@zowoq I noticed it a while ago CI would check for formatting. As far as I know it was never announced on the mailing list (Discourse). I think it should be, especially what the intention of this is. In the past, there was the conclusion we would not enforce style until a formatter was readily available.

@zowoq
Copy link
Contributor Author

zowoq commented Aug 27, 2020

In the past, there was the conclusion we would not enforce style until a formatter was readily available.

If you're referring to a .nix formatter (e.g. nixpkgs-fmt) this isn't just for nix files.

nixpkgs/.editorconfig

Lines 7 to 12 in dbc8f5c

# Unix-style newlines with a newline ending every file, utf-8 charset
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

Copy link
Contributor

@drewrisinger drewrisinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Diff LGTM

@jonringer
Copy link
Contributor

looks like the rebuilds are from script blocks having their extra whitespace truncated

LGTM

for @FRidh 's suggestion (notification of format standardization), I think that's separate from the python modules getting cleaned up (this PR)

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

failures are broken on target branch

https://github.com/NixOS/nixpkgs/pull/96438
2 packages failed to build:
python37Packages.sumo python38Packages.sumo

16 packages built:
python27Packages.palettable python27Packages.rhpl python37Packages.dftfit python37Packages.lammps-cython python37Packages.nassl python37Packages.palettable python37Packages.pymatgen python37Packages.pymatgen-lammps python37Packages.sslyze python38Packages.dftfit python38Packages.lammps-cython python38Packages.nassl python38Packages.palettable python38Packages.pymatgen python38Packages.pymatgen-lammps sslyze

@jonringer jonringer merged commit 0cff30b into NixOS:master Aug 27, 2020
@zowoq zowoq deleted the ecc-python branch August 27, 2020 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants