Skip to content

Rename internal variables and methods to start with _ #304

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

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
dcf11f7
Add pre-commit config
ondras12345 May 26, 2025
5cddad2
Fix codespell warnings
ondras12345 May 26, 2025
1f18f67
Add mypy as pre-commit hook
ondras12345 May 26, 2025
976da26
Fix remaining mypy errors
ondras12345 Jun 11, 2025
d30c133
Run pre-commit in github CI
ondras12345 Jun 11, 2025
4da2eea
Run linters before setting up OpenModelica in CI
ondras12345 Jun 11, 2025
52e86a0
Fix mypy warning
ondras12345 Jun 11, 2025
78a29ea
Fix typo
ondras12345 Jun 12, 2025
8cbda4b
Rename quantitiesList to _quantitiesList
ondras12345 Jun 13, 2025
7af78f5
Rename paramlist to _paramlist
ondras12345 Jun 13, 2025
5466aee
Rename inputlist to _inputlist
ondras12345 Jun 13, 2025
7d06996
Rename outputlist to _outputlist
ondras12345 Jun 13, 2025
c770939
Rename continuouslist to _continuouslist
ondras12345 Jun 13, 2025
c79dd5f
Rename simulateOptions to _simulateOptions
ondras12345 Jun 13, 2025
3cda978
Rename overridevariables to _overridevariables
ondras12345 Jun 13, 2025
e5b4493
Rename simoptionsoverride to _simoptionsoverride
ondras12345 Jun 13, 2025
140c5ae
Rename linearOptions to _linearOptions
ondras12345 Jun 13, 2025
baa069a
Rename optimizeOptions to _optimizeOptions
ondras12345 Jun 13, 2025
f17cb5b
Rename linearinputs to _linearinputs
ondras12345 Jun 13, 2025
b056ab5
Rename linearoutputs to _linearoutputs
ondras12345 Jun 13, 2025
b64fb63
Rename linearstates to _linearstates
ondras12345 Jun 13, 2025
a5a2fc7
Improve docstrings for getLinear*()
ondras12345 Jun 13, 2025
d19247f
Rename xmlFile to _xmlFile
ondras12345 Jun 13, 2025
a0c65d4
Rename lmodel to _lmodel
ondras12345 Jun 13, 2025
6b5cf22
Rename modelName to _modelName
ondras12345 Jun 13, 2025
c16be18
Rename fileName to _fileName
ondras12345 Jun 13, 2025
8735172
Rename inputFlag to _inputFlag
ondras12345 Jun 13, 2025
c9409ce
Rename simulationFlag to _simulationFlag
ondras12345 Jun 13, 2025
99d5809
Remove unused variable outputFlag
ondras12345 Jun 13, 2025
ab54782
Rename csvFile to _csvFile
ondras12345 Jun 13, 2025
dce2587
Rename resultfile to _resultfile
ondras12345 Jun 13, 2025
157c60b
Rename variableFilter to _variableFilter
ondras12345 Jun 13, 2025
05101a3
Rename getconn to _getconn
ondras12345 Jun 13, 2025
df944b9
Rename tempdir to _tempdir
ondras12345 Jun 13, 2025
9fa5bfc
Rename xmlparse() to _xmlparse()
ondras12345 Jun 13, 2025
868306b
Rename checkValidInputs() to _checkValidInputs()
ondras12345 Jun 13, 2025
ed049a3
Rename createCSVData() to _createCSVData()
ondras12345 Jun 13, 2025
65b3a37
Rename loadFile() to _loadFile()
ondras12345 Jun 13, 2025
c718b2e
Rename loadLibrary() to _loadLibrary()
ondras12345 Jun 13, 2025
b995351
Rename requestApi() to _requestApi()
ondras12345 Jun 13, 2025
483b847
Rename setMethodHelper() to _setMethodHelper()
ondras12345 Jun 13, 2025
6104f06
Improve docstrings
ondras12345 Jun 13, 2025
70336b9
Allow float timeouts
ondras12345 Jun 13, 2025
7ca5013
Improve docstring for simulate()
ondras12345 Jun 13, 2025
73fb34a
Improve docstrings
ondras12345 Jun 13, 2025
7a86ef4
Improve ModelicaSystemCmd docstrings
ondras12345 Jun 14, 2025
214c657
Improve docstring for getContinuous()
ondras12345 Jun 14, 2025
d4b2af0
Improve docstring for getSimulationOptions()
ondras12345 Jun 14, 2025
a7a579b
Improve docstring for getLinearizationOptions()
ondras12345 Jun 14, 2025
cfd3577
Improve docstring for getOptimizationOptions()
ondras12345 Jun 14, 2025
28cdcfb
Improve docstring for getSolutions()
ondras12345 Jun 14, 2025
3028854
Improve docstring for optimize()
ondras12345 Jun 14, 2025
8255e68
Improve docstring for convertMo2Fmu()
ondras12345 Jun 14, 2025
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
27 changes: 13 additions & 14 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: "Set up OpenModelica Compiler"
uses: OpenModelica/setup-openmodelica@v1.0
with:
version: ${{ matrix.omc-version }}
packages: |
omc
libraries: |
'Modelica 4.0.0'
- run: "omc --version"

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand All @@ -38,16 +28,25 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install . pytest pytest-md pytest-emoji flake8
pip install . pytest pytest-md pytest-emoji pre-commit

- name: Set timezone
uses: szenius/set-timezone@v2.0
with:
timezoneLinux: 'Europe/Berlin'

- name: Lint with flake8
run: |
flake8 . --count --statistics
- name: Run pre-commit linters
run: 'pre-commit run --all-files'

- name: "Set up OpenModelica Compiler"
uses: OpenModelica/setup-openmodelica@v1.0
with:
version: ${{ matrix.omc-version }}
packages: |
omc
libraries: |
'Modelica 4.0.0'
- run: "omc --version"

- name: Run pytest
uses: pavelzw/pytest-action@v2
Expand Down
39 changes: 39 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: mixed-line-ending
- id: debug-statements
- id: destroyed-symlinks
- id: fix-byte-order-marker
- id: check-merge-conflict
- id: name-tests-test
args: [--pytest-test-first]

- repo: https://github.com/pycqa/flake8
rev: '7.2.0'
hooks:
- id: flake8

- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell

- repo: https://github.com/pre-commit/mirrors-mypy.git
rev: "v1.15.0"
hooks:
- id: mypy
args: []
exclude: tests/
additional_dependencies:
- pyparsing
- types-psutil
- pyzmq
- numpy
Loading
Loading