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

Posting: init at 1.10.0 #325971

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Posting: init at 1.10.0 #325971

wants to merge 2 commits into from

Conversation

taha-yassine
Copy link
Contributor

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

pkgs/by-name/po/posting/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/po/posting/package.nix Outdated Show resolved Hide resolved
];

pythonImportsCheck = [ "textual_autocomplete" ];

Copy link
Member

Choose a reason for hiding this comment

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

Could you enable tests with pytestCheckHook?

Make sure the tests are enabled using for example pytestCheckHook 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.

https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/python.section.md#contributing-guidelines-contributing-guidelines

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Neither textual-autocomplete nor posting have tests implemented. Pytest returns an error when no test is present and this breaks the build process.
See: https://github.com/darrenburns/textual-autocomplete/tree/version-two/tests

Copy link
Member

Choose a reason for hiding this comment

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

You may add this instead then

Suggested change
doCheck = false; # no tests

@taha-yassine taha-yassine changed the title Posting: init at 1.0.3 Posting: init at 1.1.0 Jul 12, 2024
@Sigmanificient
Copy link
Member

Sigmanificient commented Jul 20, 2024

(refer pr in packaging request)

@taha-yassine taha-yassine changed the title Posting: init at 1.1.0 Posting: init at 1.10.0 Aug 2, 2024
@taha-yassine taha-yassine force-pushed the posting branch 2 times, most recently from 9ecfa7a to 16025c1 Compare August 2, 2024 17:46
@taha-yassine
Copy link
Contributor Author

@natsukium this PR is ready. Can you take a look please?

fetchFromGitHub,
}:

python3.pkgs.buildPythonApplication rec {
Copy link
Member

Choose a reason for hiding this comment

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

Seems like python3.pkgs causes issue with splicing, and the fix is to use python3Packages instead (and below)

src = fetchFromGitHub {
owner = "darrenburns";
repo = "posting";
rev = version;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
rev = version;
rev = f"refs/tags/${version}";

pythonRelaxDeps = true;

pythonImportsCheck = [ "posting" ];

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
nativeCheckInputs = [ pytestCheckHook ];

src = fetchFromGitHub {
owner = "darrenburns";
repo = "textual-autocomplete";
rev = "bbacfa91bfd9ff006dab8930a8a3fe4ba46853ab";
Copy link
Member

Choose a reason for hiding this comment

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

Mayybe add a comment explaining that this commit target the version-two branch

];

pythonImportsCheck = [ "textual_autocomplete" ];

Copy link
Member

Choose a reason for hiding this comment

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

You may add this instead then

Suggested change
doCheck = false; # no tests

@taha-yassine
Copy link
Contributor Author

@Sigmanificient thanks for your feedback. I took into account your suggestions and noticed that tests were added upstream. I tried adding them here but couldn't make them pass. I would appreciate if someone could give it a look. Otherwise should we just disable them?

(Nice seeing a fellow Rennais here, did all my studies in Rennes and only recently left :) )

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

5 participants