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

Reformat tutorials and delete docker #115

Merged
merged 9 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .dockerignore

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Install dependencies
run: |
poetry env use "${{ matrix.python-version }}"
poetry install --without dev,docker
poetry install --without dev

- name: Test with pytest
run: |
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
push:
branches: [ "main", "develop" ]
workflow_dispatch:
inputs:
forceDeploy:
description: 'Deploy?'
required: true
default: false
type: boolean

permissions:
contents: read
Expand Down Expand Up @@ -70,20 +76,20 @@ jobs:
SPHINXBUILD: poetry run sphinx-build

- name: Upload pages artifact
if: ${{ github.ref == 'refs/heads/main' }}
if: ${{ github.ref == 'refs/heads/main' || inputs.forceDeploy == true }}
uses: actions/upload-pages-artifact@v2
with:
path: "build/html/"

- name: Upload artifact
uses: actions/upload-artifact@v3
if: ${{ github.ref != 'refs/heads/main' }}
if: ${{ !(github.ref == 'refs/heads/main' || inputs.forceDeploy == true) }}
with:
path: "build/html/"

# Deployment job
deploy:
if: ${{ github.ref == 'refs/heads/main' }}
if: ${{ github.ref == 'refs/heads/main' || inputs.forceDeploy == true }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
62 changes: 0 additions & 62 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ above.
Please take a look at our documentation to see how to install and use `roseau-load-flow`.

* [Installation](https://roseautechnologies.github.io/Roseau_Load_Flow/Installation.html)
* [Usage](https://roseautechnologies.github.io/Roseau_Load_Flow/notebooks/Getting_Started.html)
* [Usage](https://roseautechnologies.github.io/Roseau_Load_Flow/usage/index.html)

# Accessing the solver #

Expand Down
8 changes: 6 additions & 2 deletions doc/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

**In development**

* [PR115](https://github.com/RoseauTechnologies/Roseau_Load_Flow/pull/115)
* Reformat the tutorials in the documentation
* Split the "Advanced" tutorial in several smaller files
* Remove the Docker installation option
* [PR114](https://github.com/RoseauTechnologies/Roseau_Load_Flow/pull/114) Use Pint >=0.21 to have the percent unit.
* [PR113](https://github.com/RoseauTechnologies/Roseau_Load_Flow/pull/113) Raise an error when accessing the results of
disconnected elements.
Expand All @@ -19,8 +23,8 @@
* [PR96](https://github.com/RoseauTechnologies/Roseau_Load_Flow/pull/96)
* Add single-phase transformer
* Add center-tapped transformer
* Remove the `TransformerType` enumeration
* [PR93](https://github.com/RoseauTechnologies/Roseau_Load_Flow/pull/93) Add short circuit computation
* Remove the `roseau.load_flow.utils.TransformerType` enumeration
* [PR93](https://github.com/RoseauTechnologies/Roseau_Load_Flow/pull/93) Add short-circuit computation
* [PR92](https://github.com/RoseauTechnologies/Roseau_Load_Flow/pull/92)
* Add the changelog in the documentation
* Use NodeJs 20 in the Dockerfile
Expand Down
87 changes: 3 additions & 84 deletions doc/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

`roseau-load-flow` is available on [PyPI](https://pypi.org/project/roseau-load-flow/). It can be
installed using pip with:

```console
$ python -m pip install roseau-load-flow
```
Expand Down Expand Up @@ -44,6 +45,7 @@ $ . venv/bin/activate
`````

To upgrade to the latest version (recommended), use:

```console
$ python -m pip install --upgrade roseau-load-flow
```
Expand All @@ -52,6 +54,7 @@ $ python -m pip install --upgrade roseau-load-flow

`roseau-load-flow` is also available on [conda-forge](https://anaconda.org/conda-forge/roseau-load-flow).
It can be installed using conda with:

```console
$ conda install -c conda-forge roseau-load-flow
```
Expand All @@ -61,90 +64,6 @@ If you use *conda* to manage your project, it is recommended to use the `conda`
instead of `pip`.
```

## Using `docker`

`roseau-load-flow` provides a *docker image* with all required dependencies pre-installed,
including *Python*. The image runs a *Jupyter* session that you can access in your browser. To
install and run your docker environment, follow the steps corresponding to your operating system
below.

````{tab} Windows

1. Download and install Docker Desktop for Windows, available [here](
https://www.docker.com/products/docker-desktop/).

```{hint}
During the installation, select "WSL **2**" (WSL = Windows Subsystem for Linux).
```

2. Open *Docker Desktop* to start the *Docker Engine*

![Docker Desktop](_static/2022_10_20_Installation_2.png)

```{note}
During the first start of the software, it may require to install some extra files to update
WSL1 to WSL2.
```

3. Go to the [Package page](
https://github.com/RoseauTechnologies/Roseau_Load_Flow/pkgs/container/roseau-load-flow) of
Roseau Load Flow on GitHub and copy the Docker command to pull the image.

![Package](_static/2022_10_20_Installation_1.png)

4. Open a Terminal

```{image} _static/2022_10_20_Installation_3.png
:alt: Terminal
:width: 15cm
```

5. Paste the command line in your terminal to start downloading the Docker image

![Package](_static/2022_10_20_Installation_4.png)

6. In the "Images" tab of *Docker Desktop*, the image should be visible. You can click on `Run` to
start it.

7. Fill the advanced options if you want. It allows you to give a name to the created container,
and to link folders of your system to the container. You can for instance link the folder
`Documents` to the directory `/app/Documents/` in the container (as shown below). When done
click on `Run` to start the container.

![Advanced options](_static/2022_10_20_Installation_6.png)

8. The container should start in a few seconds. Open a web browser and navigate to
[http://localhost:8080](http://localhost:8080) to find the JupyterLab page of the container. A
basic python environment is set up with the `roseau-load-flow` package already installed.

````

````{tab} Linux

1. Install Docker via the [detailed tutorial](https://docs.docker.com/engine/install/#server)
written by the Docker team. Follow instructions specific to your platform like [Ubuntu](
https://docs.docker.com/engine/install/ubuntu/) or [Debian](
https://docs.docker.com/engine/install/debian/).

2. Go to the [Package page](
https://github.com/RoseauTechnologies/Roseau_Load_Flow/pkgs/container/roseau-load-flow) of
Roseau Load Flow on GitHub and copy the Docker command to pull the image.

![Package](_static/2022_10_20_Installation_1.png)

3. Paste it in your terminal to start downloading the Docker image

4. Use `docker run` to start a container; for example with version *0.4.0*:
```console
$ docker run -p 8080:8080 --name rlf-test ghcr.io/roseautechnologies/roseau-load-flow:0.4.0
```

5. Open a web browser and navigate to [http://localhost:8080](http://localhost:8080) to find the
JupyterLab page of the container. A basic python environment is set up with the
`roseau-load-flow` package already installed.

````

<!-- Local Variables: -->
<!-- mode: markdown -->
<!-- coding: utf-8-unix -->
Expand Down
3 changes: 0 additions & 3 deletions doc/_static/2022_10_20_Installation_1.png

This file was deleted.

3 changes: 0 additions & 3 deletions doc/_static/2022_10_20_Installation_2.png

This file was deleted.

3 changes: 0 additions & 3 deletions doc/_static/2022_10_20_Installation_3.png

This file was deleted.

3 changes: 0 additions & 3 deletions doc/_static/2022_10_20_Installation_4.png

This file was deleted.

3 changes: 0 additions & 3 deletions doc/_static/2022_10_20_Installation_5.png

This file was deleted.

3 changes: 0 additions & 3 deletions doc/_static/2022_10_20_Installation_6.png

This file was deleted.

4 changes: 2 additions & 2 deletions doc/_static/Load/American_Star_Load.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading