Skip to content

Commit

Permalink
Merge pull request #171 from RoseauTechnologies/develop
Browse files Browse the repository at this point in the history
Version 0.7.0-alpha
  • Loading branch information
benoit9126 authored Jan 24, 2024
2 parents 6eb6507 + 5569374 commit a407fda
Show file tree
Hide file tree
Showing 85 changed files with 4,514 additions and 3,453 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Minimal Working Example to understand the problem
from roseau.load_flow import *

# Your code here
# Please do not add username/or password here
# Please do not add username, password or API keys here
```

**Expected behavior**
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

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

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
run: pipx install poetry

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
Expand All @@ -59,11 +59,13 @@ jobs:
- name: Test with pytest
run: |
poetry run pytest -n=auto --durations=25 --cov=roseau --cov-report html \
--cov-config pyproject.toml --cov-fail-under 75 roseau
poetry run pytest -vv -n=auto --durations=25 --cov-report html \
--cov-config pyproject.toml roseau
env:
ROSEAU_LOAD_FLOW_LICENSE_KEY: ${{ secrets.ROSEAU_LOAD_FLOW_LICENSE_KEY }}

- name: Archive code coverage results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: code-coverage-report-${{ runner.os }}-python-${{ matrix.python-version }}
Expand Down
68 changes: 0 additions & 68 deletions .github/workflows/conda.yml

This file was deleted.

101 changes: 0 additions & 101 deletions .github/workflows/doc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v4
with:
lfs: false
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: pre-commit/[email protected]
11 changes: 4 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
exclude: ^.idea/|^conda/meta.yaml
exclude: ^.idea/|.vscode/|^conda/meta.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-builtin-literals
- id: check-json
exclude: ^.vscode/
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
Expand All @@ -17,7 +15,7 @@ repos:
hooks:
- id: poetry-check
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6 # keep in sync with pyproject.toml
rev: v0.1.14 # keep in sync with pyproject.toml
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
Expand All @@ -28,12 +26,11 @@ repos:
rev: 1.16.0
hooks:
- id: blacken-docs
entry: bash -c "blacken-docs -l 90 $(find doc/ -name '*.md')"
files: ^doc/.*\.md$
args: [-l 90]
additional_dependencies: [black==23.10.1] # keep in sync with black above
additional_dependencies: [black==23.12.1]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
args: ["--print-width", "120"]
exclude: ^.vscode/
6 changes: 5 additions & 1 deletion .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"words": [
"abcn",
"absolufy",
"acsr",
"asarray",
"astype",
"bysource",
Expand Down Expand Up @@ -34,10 +35,13 @@
"susceptance",
"transfo",
"ureg",
"xlpe",
"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"]
"flagWords": [
"hte"
]
}
5 changes: 0 additions & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
"recommendations": [
"charliermarsh.ruff",
"esbenp.prettier-vscode",
"ms-python.black-formatter",
"ms-python.python",
"ms-python.vscode-pylance",
],
"unwantedRecommendations": [
"ms-python.flake8", // We use ruff
"ms-python.isort" // We use ruff
]
}
8 changes: 6 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"python.testing.pytestEnabled": true,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports.ruff": "explicit",
Expand All @@ -25,5 +25,9 @@
"[markdown][yaml][html][css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
}
},
// Json
"[json]": {
"editor.indentSize": 2,
},
}
18 changes: 9 additions & 9 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"options": { "cwd": "${workspaceFolder}" },
"presentation": {
"showReuseMessage": true,
"clear": true
"clear": true,
},
"tasks": [
{
Expand All @@ -15,13 +15,13 @@
"command": "make -C doc html",
"group": {
"kind": "build",
"isDefault": true
"isDefault": true,
},
"problemMatcher": [],
"presentation": {
"reveal": "silent",
"focus": true
}
"focus": true,
},
},
{
"label": "Open docs",
Expand All @@ -32,13 +32,13 @@
"reveal": "never",
"close": true,
"focus": false,
"panel": "dedicated"
"panel": "dedicated",
},
"group": {
"kind": "build",
"isDefault": true
"isDefault": true,
},
"isBackground": true
}
]
"isBackground": true,
},
],
}
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2023, Roseau Technologies
Copyright (c) 2018, Roseau Technologies

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down
Loading

0 comments on commit a407fda

Please sign in to comment.