forked from open-energy-transition/pypsa-eur
-
Notifications
You must be signed in to change notification settings - Fork 19
feat: add windows installer #333
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
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
111ccb8
feat: add windows installer
coroa cca7a79
fix: use python unbuffered on windows
coroa 1521ce0
fix: install git into windows environment
coroa 3a57786
fix: windows installer needs to locate binaries first
coroa 6370764
feat: add shell script for building windows installer
coroa 8e12d4b
fix: Speed up uninstalling by batch removing directories first
coroa a32d411
fix: gitignore installer build artifacts
coroa e247c8d
fix: small fixes to windows installer
coroa 23aad3d
fix(installer): clean up wording slightly
coroa 65cdc18
feat: bundle repository into windows installer
coroa c1b01aa
fix: make sure no spaces are in repository directory
coroa e2f573d
feat: add gh workflow to build and attach the windows installer to re…
coroa 3134006
Add documentation and release notes
coroa 70b7287
Update pixi.lock
coroa 413c192
Updates README.md
coroa 5476bb9
fix: remove pixi from installer name
coroa 4a7a7ea
fix: add INSTDIR to PATH
coroa 7f4b99d
fix: install snakemake from open-tyndp channel
coroa 7fc3c91
feat: make pixi environment install optional
coroa 6edcc1b
fix: add version constraints
coroa 13a809e
fix: update snakemake-minimal to 9.14.5+opentyndp.1
coroa 312360e
fix: compatibility of build_gas_* rules with pyogrio >=0.12.0
coroa 4acaff0
fix: apply suggestions from thomas
coroa 4359f3a
Apply suggestion from Thomas on windows-installer Readme
coroa f5b23a7
fix(docs): fix installation heading levels
coroa c3746d7
fix typo
coroa af27714
Update pixi.toml
coroa 73b9de1
doc: add installer in the documentation
tgilon 3adcb15
Merge branch 'master' into feat/add-windows-installer
tgilon 8305723
Merge branch 'master' into feat/add-windows-installer
tgilon d121000
chore: solve merge conflicts
tgilon d76983c
Merge branch 'master' into feat/add-windows-installer
tgilon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # SPDX-FileCopyrightText: Contributors to Open-TYNDP <https://github.com/open-energy-transition/open-tyndp> | ||
| # | ||
| # SPDX-License-Identifier: MIT | ||
|
|
||
| name: Build and Attach Installer to Release | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
| workflow_dispatch: | ||
| inputs: | ||
| release_tag: | ||
| description: 'Release tag to attach installer to' | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| build-and-attach-installer: | ||
| name: Build Windows Installer and Attach to Release | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| ref: ${{ github.event.release.tag_name || inputs.release_tag }} | ||
|
|
||
| - name: Setup Pixi | ||
| uses: prefix-dev/setup-pixi@v0.9.3 | ||
| with: | ||
| pixi-version: v0.59.0 | ||
| cache: true | ||
| cache-write: false | ||
|
|
||
| - name: Get version from release tag | ||
| id: get_version | ||
| run: | | ||
| TAG="${{ github.event.release.tag_name || inputs.release_tag }}" | ||
| VERSION=${TAG#v} | ||
| echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
| echo "tag=$TAG" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Build Windows installer | ||
| env: | ||
| VERSION: ${{ steps.get_version.outputs.version }} | ||
| run: | | ||
| utils/windows-installer/build_installer.sh | ||
|
|
||
| - name: Upload installer to release | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| gh release upload ${{ steps.get_version.outputs.tag }} utils/windows-installer/open-tyndp-*.exe --clobber |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,10 +13,38 @@ The subsequently described installation steps are demonstrated as shell commands | |
| directory in which the commands following the ``%`` should be entered. | ||
|
|
||
|
|
||
| .. _windows_installer: | ||
|
|
||
| Option A: Windows Installer (Recommended for Windows) | ||
| ===================================================== | ||
|
|
||
| For Windows users, the easiest way to install Open-TYNDP is using the automated installer. Download the latest installer executable (e.g., ``open-tyndp-0.4.0-pixi-Windows-x86_64.exe``) from the `GitHub releases page <https://github.com/open-energy-transition/open-tyndp/releases>`__ and run it. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you think about releasing a v0.4.2 to get the installer attached to the latest release?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that would be ideal i think. |
||
|
|
||
| The installer will: | ||
|
|
||
| 1. Install pixi package manager to ``%LOCALAPPDATA%\open-tyndp`` | ||
| 2. Extract the repository files to your chosen installation directory | ||
| 3. Set up the conda environment automatically via ``pixi install`` | ||
| 4. Create Start Menu shortcuts for easy access: | ||
|
|
||
| - **Open-TYNDP PowerShell** - Launch PowerShell with environment activated | ||
| - **Open-TYNDP Command Prompt** - Launch Command Prompt with environment activated | ||
|
|
||
| For more details about the installer, see ``utils/windows-installer/README.md`` in the repository. | ||
|
|
||
| .. note:: | ||
| If you prefer manual installation or need more control over the setup process, follow the instructions below for cloning the repository and installing dependencies manually. | ||
|
|
||
|
|
||
| .. _manual_installation | ||
|
|
||
| Option B: Manual installation (All Platforms) | ||
| ============================================= | ||
|
|
||
| .. _clone_repo: | ||
|
|
||
| Clone the Repository | ||
| ==================== | ||
| -------------------- | ||
|
|
||
| First of all, clone the `Open-TYNDP repository <https://github.com/open-energy-transition/open-tyndp>`__ using the version control system ``git`` in the command line. | ||
|
|
||
|
|
@@ -28,10 +56,10 @@ First of all, clone the `Open-TYNDP repository <https://github.com/open-energy-t | |
| .. _deps: | ||
|
|
||
| Install Python Dependencies | ||
| =============================== | ||
| --------------------------- | ||
|
|
||
| Preferred method: ``pixi`` | ||
| -------------------------- | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| PyPSA-Eur, and consequently Open-TYNDP, relies on a set of other Python packages to function. | ||
| We manage these using `pixi <https://pixi.sh/latest/>`_. | ||
|
|
@@ -49,7 +77,7 @@ Once pixi is installed, you can activate the project environment for your operat | |
| We don't currently support linux operating systems using ARM processors since certain packages, such as ``PySCIPOpt``, require being built from source. | ||
|
|
||
| Legacy method: ``conda`` | ||
| ------------------------ | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| If you cannot access ``pixi`` on your machine, you can also install using `conda <https://docs.conda.io/projects/conda/en/stable/user-guide/install/index.html>`_ (or ``mamba``/``micromamba``). | ||
| To do so, we highly recommend you install from one of our platform-specific environment files: | ||
|
|
@@ -87,7 +115,7 @@ If you are having difficulties with the above files, you can also install direct | |
|
|
||
|
|
||
| Install a Solver | ||
| ================ | ||
| ---------------- | ||
|
|
||
| PyPSA passes the PyPSA-Eur network model to an external solver for performing the optimisation. | ||
| PyPSA is known to work with the free software | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is difficult to review. Have you tested it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is still untested. it would need to be run on an existing release. i think i could run it on 0.4.1.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd propose to merge this and #357 now and try to create a 0.4.2a1 release, ie. an alpha release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good for me to release an alpha. Following the SemVer convention, I would suggest v0.4.2-alpha and mark it as a pre-release.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As always everyone has their own ideas about how stuff ideally looks like: Python packaging user guide, but python is flexible and will be fine with your suggestion too, ie check the section on normalization.