Skip to content

Commit

Permalink
Migration Pull request (#1)
Browse files Browse the repository at this point in the history
* Updated Actions to Work on GitHub

* Commented out Windows CI test due to use of sudo

* Removed x86 test due to issues with Makie.jl
  • Loading branch information
JulStraus authored Jun 19, 2024
1 parent dcc765a commit c5957b3
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 41 deletions.
36 changes: 16 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
- version: '1' # The latest point-release (Linux)
os: ubuntu-latest
arch: x64
- version: '1' # The latest point-release (Windows)
os: windows-latest
arch: x64
# - version: '1' # The latest point-release (Windows)
# os: windows-latest
# arch: x64
- version: '1.9' # 1.9
os: ubuntu-latest
arch: x64
- version: '1.9' # 1.9
os: ubuntu-latest
arch: x86
# - version: '1.9' # 1.9
# os: ubuntu-latest
# arch: x86
- version: 'nightly'
os: ubuntu-latest
arch: x64
Expand All @@ -37,22 +37,18 @@ jobs:
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v3
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/cache@v1
- run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
with:
prefix: DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=monorepo -e
depwarn: error
- name: Run the tests
id: EMGUI_tests
continue-on-error: true
run: >
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=. -e 'using Pkg; Pkg.test(; coverage=true)'
&& echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV
- name: Fail if tests failed
if: ${{ env.TESTS_SUCCESSFUL != 'true' }}
run: exit 1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
- uses: julia-actions/setup-julia@latest
with:
version: '1'
- run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils
- name: Install dependencies
shell: julia --color=yes --project=docs/ {0}
run: |
using Pkg
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' 'Pkg.develop(PackageSpec(path=pwd()))
DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' 'Pkg.instantiate()
Pkg.develop(PackageSpec(path=pwd()))
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
Expand Down
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
# EnergyModelsGUI
[![Pipeline: passing](https://gitlab.sintef.no/clean_export/energymodelsgui.jl/badges/main/pipeline.svg)](https://gitlab.sintef.no/clean_export/energymodelsgui.jl/-/jobs)
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://energymodelsx.github.io/EnergyModelsBase.jl/stable/)

[![Build Status](https://github.com/EnergyModelsX/EnergyModelsGUI.jl/workflows/CI/badge.svg)](https://github.com/EnergyModelsX/EnergyModelsGUI.jl/actions?query=workflow%3ACI)
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://energymodelsx.github.io/EnergyModelsGUI.jl/stable/)
[![In Development](https://img.shields.io/badge/docs-dev-blue.svg)](https://energymodelsx.github.io/EnergyModelsGUI.jl/dev/)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/JuliaDiff/BlueStyle)

EnergyModelsGUI enables a graphical user interface for the [EnergyModelsBase](https://gitlab.sintef.no/clean_export/energymodelsbase.jl) package and other packages building upon this package (like [EnergyModelsInvestments](https://gitlab.sintef.no/clean_export/energymodelsinvestments.jl) and [EnergyModelsGeography](https://gitlab.sintef.no/clean_export/energymodelsgeography.jl)). It is designed to give a simple visualization of the topology of the model and enable the user to interactively navigate through the different layers of the model design. Visualization of the results after simulations will be added at a later stage.
EnergyModelsGUI enables a graphical user interface for the [EnergyModelsBase](https://github.com/EnergyModelsX/EnergyModelsBase.jl) package and other packages building upon this package (like [EnergyModelsInvestments](https://github.com/EnergyModelsX/EnergyModelsInvestments.jl) and [EnergyModelsGeography](https://github.com/EnergyModelsX/EnergyModelsGeography.jl)).
It is designed to give a simple visualization of the topology of the model and enable the user to interactively navigate through the different layers of the model design.
Visualization of the results after simulations will be added at a later stage.

The EnergyModelsGUI package has taken inspiration from the source code of [ModelingToolkitDesigner](https://github.com/bradcarman/ModelingToolkitDesigner.jl) as a starting point for development.

## Usage

If you already have constructed a `case` in EMX you can view this case with

```julia
using EnergyModelsGUI

Expand All @@ -20,7 +26,7 @@ Please refer to the [documentation](https://clean_export.pages.sintef.no/energym

See examples of usage of the package and a simple guide for running them in the folder [`examples`](examples).

I.e. running the example [`EMI_geography`](examples/EMI_geography.jl) will result in a view like the following:
*I.e.*, running the example [`EMI_geography`](examples/EMI_geography.jl) will result in a view like the following:

![Example image for EMI_geography](docs/src/figures/EMI_geography.png)

Expand Down
4 changes: 1 addition & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,4 @@ makedocs(;
checkdocs=:all,
)

deploydocs(;
repo = "github.com/EnergyModelsX/EnergyModelsGUI.jl.git",
)
deploydocs(; repo="github.com/EnergyModelsX/EnergyModelsGUI.jl.git")
10 changes: 1 addition & 9 deletions docs/src/manual/simple-example.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
# Examples

For the content of the individual examples, see the [examples](https://gitlab.sintef.no/clean_export/energymodelsgui.jl/-/tree/main/examples) directory in the project repository.
For the content of the individual examples, see the [examples](https://github.com/EnergyModelsX/EnergyModelsGUI.jl/tree/main/examples) directory in the project repository.

## The package is installed with `] add`

First, add the [*Clean Export* Julia packages repository](https://gitlab.sintef.no/clean_export/registrycleanexport). Then run

```
~/some/directory/ $ julia # Starts the Julia REPL
julia> ] # Enter Pkg mode
pkg> add EnergyModelsGUI # Install the package EnergyModelsBase to the current environment.
```

From the Julia REPL (*i.e*, command-line in julia; `julia> `), run

```julia
Expand Down
6 changes: 3 additions & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ using EnergyModelsGUI
exdir = joinpath(pkgdir(EnergyModelsGUI), "examples")

# Install required packages (use the project.toml file in the test folder of the repository)
using Pkg
Pkg.activate(exdir)
using Pkg
Pkg.activate(exdir)
Pkg.instantiate()

# Include the code into the Julia REPL to run an example (i.e., EMI_geography.jl):
include(joinpath(exdir, "EMI_geography.jl"))
```
```

2 comments on commit c5957b3

@JulStraus
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/109338

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.0 -m "<description of version>" c5957b385f76bd0ee339ccff451accb18162d725
git push origin v0.5.0

Also, note the warning: This looks like a new registration that registers version 0.5.0.
Ideally, you should register an initial release with 0.0.1, 0.1.0 or 1.0.0 version numbers
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

Please sign in to comment.