Skip to content

Commit

Permalink
Merge pull request #124 from RoseauTechnologies/develop
Browse files Browse the repository at this point in the history
Version 0.5.0
  • Loading branch information
benoit9126 authored Aug 29, 2023
2 parents cfa229f + ad423d2 commit 7497076
Show file tree
Hide file tree
Showing 611 changed files with 394,056 additions and 173,903 deletions.
10 changes: 0 additions & 10 deletions .dockerignore

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Bug report
about: Something is not working as expected
title: 'BUG: '
title: "BUG: "
labels: bug
assignees: benoit9126

---

**Describe the bug**
Expand All @@ -26,6 +25,7 @@ A clear and concise description of what you expected to happen.
**Version details**

Please copy/paste here the output of the function `show_versions`

```python
from roseau.load_flow import show_versions

Expand Down
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/documentation-improvement.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Documentation Improvement
about: An improvement to the documentation
title: 'DOC: '
title: "DOC: "
labels: documentation
assignees: benoit9126

---

**Location of the document**
Expand Down
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature request
about: A proposal for a new feature
title: 'ENH: '
title: "ENH: "
labels: enhancement
assignees: benoit9126

---

**Describe the feature you want. What problem does it solve?**
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@ name: CI

on:
push:
branches: [ main, develop ]
branches: [main, develop]
tags:
- '*'
- "*"
pull_request:
branches: [ main, develop ]
branches: [main, develop]

env:
CI: true

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -56,7 +55,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
9 changes: 4 additions & 5 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@ name: Conda

on:
push:
branches: [ main ]
branches: [main]
tags:
- '*'
- "*"
pull_request:
branches: [ main ]
branches: [main]

env:
CI: true

jobs:
build:

runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
python-version: [ "3.9" ]
python-version: ["3.9"]

steps:
- uses: actions/checkout@v3
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ name: Documentation

on:
push:
branches: [ "main", "develop" ]
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' }}
uses: actions/upload-pages-artifact@v1
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
6 changes: 3 additions & 3 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: pre-commit

on:
push:
branches: [ main, develop ]
branches: [main, develop]
paths-ignore:
- ".vscode/**"
- ".idea/**"
tags:
- '*'
- "*"
pull_request:
branches: [ main, develop ]
branches: [main, develop]
paths-ignore:
- ".vscode/**"
- ".idea/**"
Expand Down
26 changes: 20 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-builtin-literals
- id: check-json
exclude: ^.vscode/
- id: check-merge-conflict
Expand All @@ -11,16 +12,29 @@ repos:
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
- repo: https://github.com/python-poetry/poetry
rev: 1.6.0
hooks:
- id: absolufy-imports
- repo: https://github.com/psf/black
rev: 23.3.0
- id: poetry-check
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.7.0 # keep in sync with pyproject.toml
hooks:
- id: black-jupyter
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.270
rev: v0.0.286 # keep in sync with pyproject.toml
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
hooks:
- id: blacken-docs
entry: bash -c "blacken-docs -l 90 $(find doc/ -name '*.md')"
args: [-l 90]
additional_dependencies: [black==23.7.0] # keep in sync with black above
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.2
hooks:
- id: prettier
args: ["--print-width", "120"]
84 changes: 41 additions & 43 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,43 @@
{
// Version of the setting file. Always 0.2
"version": "0.2",
// language - current active spelling language
"language": "en",
// words - list of words to be always considered correct
"words": [
"abcn",
"absolufy",
"asarray",
"astype",
"bysource",
"cython",
"dropna",
"dtype",
"furo",
"htmlcov",
"isort",
"mathjax",
"mathrm",
"nbsphinx",
"ndarray",
"nplin",
"phasor",
"pipx",
"pmatrix",
"pmax",
"pyproj",
"pyproject",
"pytest",
"pyupgrade",
"raphson",
"rtol",
"susceptance",
"transfo",
"ureg",
"yesqa"
],
// flagWords - list of words to be always considered incorrect
// This is useful for offensive words and common spelling errors.
// For example "hte" should be "the"
"flagWords": [
"hte"
]
// Version of the setting file. Always 0.2
"version": "0.2",
// language - current active spelling language
"language": "en",
// words - list of words to be always considered correct
"words": [
"abcn",
"absolufy",
"asarray",
"astype",
"bysource",
"cython",
"dropna",
"dtype",
"furo",
"htmlcov",
"isort",
"mathjax",
"mathrm",
"nbsphinx",
"ndarray",
"nplin",
"phasor",
"pipx",
"pmatrix",
"pmax",
"pyproj",
"pyproject",
"pytest",
"pyupgrade",
"raphson",
"rtol",
"susceptance",
"transfo",
"ureg",
"yesqa"
],
// flagWords - list of words to be always considered incorrect
// This is useful for offensive words and common spelling errors.
// For example "hte" should be "the"
"flagWords": ["hte"]
}
20 changes: 10 additions & 10 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"recommendations": [
"charliermarsh.ruff",
"ms-python.black-formatter",
"ms-python.python",
"ms-python.vscode-pylance",
],
"unwantedRecommendations": [
"ms-python.flake8", // We use ruff
"ms-python.isort", // We use ruff
]
"recommendations": [
"charliermarsh.ruff",
"ms-python.black-formatter",
"ms-python.python",
"ms-python.vscode-pylance"
],
"unwantedRecommendations": [
"ms-python.flake8", // We use ruff
"ms-python.isort" // We use ruff
]
}
42 changes: 23 additions & 19 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
{
// Jupyter
"jupyter.notebookFileRoot": "${workspaceFolder}",
// Jupyter Notebook
"jupyter.notebookFileRoot": "${workspaceFolder}",
"notebook.formatOnSave.enabled": true,
"notebook.codeActionsOnSave": {
"source.organizeImports.ruff": true
},

// Python
"python.analysis.diagnosticSeverityOverrides": {
"reportInvalidStringEscapeSequence": "warning",
"reportImportCycles": "warning",
"reportUnusedImport": "warning",
},
"python.formatting.provider": "none",
"python.testing.pytestArgs": [],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports.ruff": true,
},
},
// Python
"python.analysis.diagnosticSeverityOverrides": {
"reportInvalidStringEscapeSequence": "warning",
"reportImportCycles": "warning",
"reportUnusedImport": "warning"
},
"python.formatting.provider": "none",
"python.testing.pytestArgs": [],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports.ruff": true
}
}
}
Loading

0 comments on commit 7497076

Please sign in to comment.