Skip to content

Conversation

Tommimon
Copy link
Contributor

@Tommimon Tommimon commented Jun 1, 2025

Added modularcalculator python package.

Project repository: https://github.com/JordanL2/ModularCalculator.

The main purpose of this package is to run the modularcalculator-qt graphical application. I will do a pull request for the graphical application when the python library is merged.

Graphical application repository: https://github.com/JordanL2/ModularCalculatorInterface

I have been using the graphical application for a while without issues, so I can confirm the underlying library is working. If you want to play with the library itself here is a small test you can try:

from modularcalculator.modularcalculator import *
calculator = ModularCalculator('Computing')
print(calculator.calculate('(10+5)/3').results[0].value.num)

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/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (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.

@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Jun 1, 2025
@nix-owners nix-owners bot requested a review from natsukium June 1, 2025 09:03
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jun 1, 2025
@Tommimon Tommimon force-pushed the modularcalculator-python branch from b0f4fca to cc3c6f2 Compare June 1, 2025 09:10
@Tommimon Tommimon force-pushed the modularcalculator-python branch from 0329b94 to b48d2ed Compare June 1, 2025 09:53
@Tommimon Tommimon requested a review from Aleksanaa June 1, 2025 09:59
];

dependencies = [ strct ];

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@Tommimon Tommimon Jun 2, 2025

Choose a reason for hiding this comment

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

I didn't manage to get unittestCheckHook working, I'm not sure if it is possible with the upstream tests layout.
I added a checkPhase that runs tests.py in e0dd82d. If everything looks good to you now I can squash the commits.

Edit: Also updated the package to the last version in the process.
Edit2: I also patched testrunner.py in b231dda to make it crash if some test fails.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Aleksanaa do the last changes remove the need for adding unittestCheckHook?

@Tommimon Tommimon marked this pull request as draft June 2, 2025 11:47
@Tommimon Tommimon force-pushed the modularcalculator-python branch from b22fcfb to e0dd82d Compare June 2, 2025 11:53
@Tommimon Tommimon changed the title python3Packages.modularcalculator: init at 1.4.3 python3Packages.modularcalculator: init at 1.5.0 Jun 2, 2025
@Tommimon Tommimon requested a review from Aleksanaa June 2, 2025 12:00
@Tommimon Tommimon changed the title python3Packages.modularcalculator: init at 1.5.0 WIP: python3Packages.modularcalculator: init at 1.5.0 Jun 2, 2025
@Tommimon Tommimon marked this pull request as ready for review June 4, 2025 13:53
@Tommimon
Copy link
Contributor Author

There have been no updates in the last month, I just want to make it clear that I'm waiting for somebody to confirm that the current implementation of the checkPhase is correct.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/5688

@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants