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

feat: one folder build option for packaging SODA #374

Open
wants to merge 16 commits into
base: pre-staging
Choose a base branch
from

Conversation

aaronm-2112
Copy link
Member

@aaronm-2112 aaronm-2112 commented Nov 22, 2024

Summary by Sourcery

Add a new one-folder build option for packaging SODA, update the application version, and modify CI workflows to include the 'folder-build' branch.

New Features:

  • Introduce a new build option for packaging SODA using a one-folder structure.

Enhancements:

  • Update the version of the application from 15.2.3-beta to 15.2.4-beta.

CI:

  • Add 'folder-build' branch to the CI workflows for Linux, Mac, and Windows deployments.

Copy link

Thank you for submitting this pull request! We appreciate your contribution to the project. Before we can merge it, we need to review the changes you've made to ensure they align with our code standards and meet the requirements of the project. We'll get back to you as soon as we can with feedback. Thanks again!

Copy link
Contributor

sourcery-ai bot commented Nov 22, 2024

Reviewer's Guide by Sourcery

This PR implements a one-folder build option for packaging SODA by modifying the build and deployment scripts. The changes switch from using PyInstaller's --onefile to --onedir option, updates version numbers, and adjusts build configurations. The implementation also includes workflow updates and minor code changes.

Updated class diagram for package.json scripts

classDiagram
    class PackageJson {
        +String name
        +String productName
        +String version
        +String description
        +String main
        +String author
        +String[] scripts
    }
    class Scripts {
        +String build:linux
        +String python-onefile-build-win
        +String python-onefile-build-unix
        +String python-folder-build-unix
        +String python-folder-build-win
        +String deploy-win
        +String deploy-linux
        +String deploy-mac
    }
    PackageJson --> Scripts
    note for Scripts "Updated to include folder build options and deployment changes"
Loading

Updated class diagram for electron-builder.yml

classDiagram
    class ElectronBuilderYml {
        +String winExtraResources
        +Boolean asar
        +String[] target
        +String macIcon
        +String macEntitlementsInherit
        +Boolean macNotarize
        +String[] macExtraResources
    }
    note for ElectronBuilderYml "Updated macNotarize to false and winExtraResources path"
Loading

File-Level Changes

Change Details Files
Changed Python build configuration from single-file to folder-based output
  • Added new npm scripts for folder-based builds using PyInstaller's --onedir option
  • Updated deployment scripts to use the new folder-based build commands
  • Modified resource paths in electron-builder config to accommodate folder structure
package.json
electron-builder.yml
Version bump and related updates
  • Updated version from 15.2.3-beta to 15.2.4-beta
  • Updated API version to match new application version
package.json
src/pyflask/startup/minimumApiVersion.py
Build workflow modifications
  • Added 'folder-build' branch to deployment triggers
  • Disabled Mac notarization
.github/workflows/Build-and-deploy-linux.yml
.github/workflows/Build-and-deploy-mac.yml
.github/workflows/Build-and-deploy-win.yml
electron-builder.yml
Minor code changes
  • Added console log statement in renderer.js
src/renderer/src/scripts/others/renderer.js

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

Thanks for making updates to your pull request. Our team will take a look and provide feedback as soon as possible. Please wait for any GitHub Actions to complete before editing your pull request. If you have any additional questions or concerns, feel free to let us know. Thank you for your contributions!

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @aaronm-2112 - I've reviewed your changes - here's some feedback:

Overall Comments:

  • There appears to be debug code left in (console.log in renderer.js) that should be removed
  • The PR disables Mac notarization without explanation. Please provide context for this security-relevant change
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟡 Security: 1 issue found
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@@ -31,7 +31,7 @@ nsis:
mac:
icon: "app-icon/png/icon.png"
entitlementsInherit: ./entitlements.mac.inherit.plist
notarize: true
notarize: false
Copy link
Contributor

Choose a reason for hiding this comment

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

🚨 issue (security): Disabling Mac notarization could cause security warnings for users

Consider the security implications of disabling notarization. Users may receive warnings when running the application, potentially affecting trust and usability.

package.json Outdated
@@ -1,7 +1,7 @@
{
"name": "soda-for-sparc",
"procductName": "SODA for SPARC",
Copy link
Contributor

Choose a reason for hiding this comment

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

issue (typo): Fix typo in 'productName' field

Copy link

sonarcloud bot commented Nov 23, 2024

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.

2 participants