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

doc/python: convention for attributes names #45822

Merged
merged 1 commit into from Aug 31, 2018
Merged

doc/python: convention for attributes names #45822

merged 1 commit into from Aug 31, 2018

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Aug 30, 2018

cc @FRidh, @dotlambda

Motivation for this change

#45644 (comment)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

@@ -1074,4 +1074,5 @@ Following rules are desired to be respected:
* Make sure libraries build for all Python interpreters.
* By default we enable tests. Make sure the tests are found and, in the case of libraries, are passing for all interpreters. If certain tests fail they can be disabled individually. Try to avoid disabling the tests altogether. In any case, when you disable tests, leave a comment explaining why.
* Commit names of Python libraries should reflect that they are Python libraries, so write for example `pythonPackages.numpy: 1.11 -> 1.12`.

* Attribute names in `python-packages.nix` should be normalized according to [PEP 0503](https://www.python.org/dev/peps/pep-0503/#normalized-names).
This means that characters should be converted to lowercase and `.` and `_` should be replaced by a single `-` (Foo_Bar.baz -> foo-bar-baz)
Copy link
Member

@dotlambda dotlambda Aug 30, 2018

Choose a reason for hiding this comment

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

Period is missing. I'd prefer using "instead of" or "→" instead of "->". Maybe use Foo__Bar.baz as example.

@FRidh
Copy link
Member

FRidh commented Aug 31, 2018

Thanks. I thought we had something in it already but it seems not.

@jluttine
Copy link
Member

It says Foo__Bar.baz instead of foo-bar-baz but shouldn't it be the other way around?

@Mic92
Copy link
Member Author

Mic92 commented Aug 31, 2018

fixed

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

6 participants