Skip to content

Conversation

@llimeht
Copy link
Contributor

@llimeht llimeht commented Nov 6, 2025

Description

This PR achieves two things:

  • it automates collection of the licence information for sasview when distributed in source, wheel, conda, etc form; this needs to be updated as part of the release process
  • it automates collection of all licences when sasview is bundled with other packages such as in the pyinstaller-based installer images
  • it displays these data via a dialogue box accessible from Help → Credits and licenses

As a future UI improvement, we might want to review and merge some of these help items into a tabbed dialogue but that's not necessary right now.

(This PR relies on an enhancement to src/sas/system/resources.py that are also proposed in #3678, so those 3 commits are also shown below)

Fixes #3095
Fixes #3477

How Has This Been Tested?

Running from a git checkout or from an installed wheel, Help → Credits and Licenses shows SasView, SasData and sasmodels licences.

Running from an installer, the dialogue will show the licences of everything that is bundled. (Noting that due to #3664, you have to delete sasmodels/models/two_yukawa.py for sasview to be able to start)

Review Checklist:

[if using the editor, use [x] in place of [ ] to check a box]

Documentation (check at least one)

  • There is nothing that needs documenting
  • Documentation changes are in this PR
  • There is an issue open for the documentation (link?)

Installers

  • There is a chance this will affect the installers, if so
    • Windows installer (GH artifact) has been tested (installed and worked)
    • MacOSX installer (GH artifact) has been tested (installed and worked)
    • Wheels installer (GH artifact) has been tested (installed and worked)

Licensing (untick if necessary)

  • The introduced changes comply with SasView license (BSD 3-Clause)

@krzywon
Copy link
Contributor

krzywon commented Nov 19, 2025

Running dark mode on Windows, the pre sections with the licenses are all white. Otherwise, code looks fine.

With all of the work already here, assuming we are going this route, we should probably close #3678.

image

@llimeht
Copy link
Contributor Author

llimeht commented Nov 19, 2025

Running dark mode on Windows, the pre sections with the licenses are all white. Otherwise, code looks fine.

Good point - I've added a dark-mode block to the stylesheet for the page.

(also rebased to current main to resolve merge conflicts)

With all of the work already here, assuming we are going this route, we should probably close #3678.

Just trying to keep separate things separate and make for smaller PRs that are easier to review. But yes, if you've already looked at this and happy to merge this one then we can it in one merge.

Copy link
Contributor

@krzywon krzywon left a comment

Choose a reason for hiding this comment

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

Taking a second look, the dark mode changes don't seem to be used, but that is a minor issue relative to the larger work here. I think this PR should be merged over #3534, and #3678 which should both be closed.

@llimeht llimeht merged commit f90067c into SasView:main Dec 3, 2025
20 checks passed
@llimeht llimeht deleted the tmp/credits-box branch December 3, 2025 22:42
@llimeht
Copy link
Contributor Author

llimeht commented Dec 3, 2025

@krzywon - changing the stylesheet in build_tools/compile_licenses.py is easy enough for that; perhaps the stylesheet details of colours can simply be removed from this file if the application styling itself flows through to the widget. Someone who does more Qt than me is in a better place to fix this though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shouldn't the licence agreement in the Windows installer include the BSD licence? Licenses aren't accessible from app.

2 participants