Skip to content

Commit

Permalink
Merge branch 'main' into fix/network_bounday_node_issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzovecchietti authored Sep 18, 2023
2 parents de4c097 + 2aa9906 commit 8194713
Show file tree
Hide file tree
Showing 32 changed files with 1,193 additions and 259 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/full_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,16 @@ jobs:
echo "::set-output name=PYAEDT_VERSION::$(python -c "from pyaedt import __version__; print(__version__)")"
echo "PyAEDT version is: $(python -c "from pyaedt import __version__; print(__version__)")"
- name: Create Documentations
- name: Create HTML Documentations
run: |
testenv\Scripts\Activate.ps1
sphinx-build -j auto --color -b html -a doc/source doc/_build/html
- name: Create PDF Documentations
run: |
testenv\Scripts\Activate.ps1
sphinx-build -j auto --color -b pdf -a doc/source doc/_build/pdf
- name: Upload HTML documentation artifact
uses: actions/upload-artifact@v3
with:
Expand All @@ -86,6 +91,21 @@ jobs:
path: doc/_build/html/EDBAPI
retention-days: 7

- name: Upload PDF documentation artifact
uses: actions/upload-artifact@v3
with:
name: documentation-pdf
path: doc/_build/pdf
retention-days: 7

- name: Release
uses: softprops/action-gh-release@v1
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
with:
generate_release_notes: true
files: |
doc/_build/pdf
doc-deploy-stable:
name: Deploy stable documentation
runs-on: ubuntu-latest
Expand Down Expand Up @@ -148,5 +168,4 @@ jobs:
host-url: ${{ vars.MEILISEARCH_HOST_URL }}
api-key: ${{ env.MEILISEARCH_API_KEY }}
doc-artifact-name: documentation-html-edb # Add only EDB API as page in this index.
pymeilisearchopts: --port \"8001\" #serve in another port

pymeilisearchopts: --port 8001 #serve in another port
2 changes: 1 addition & 1 deletion .github/workflows/nightly-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
host-url: ${{ vars.MEILISEARCH_HOST_URL }}
api-key: ${{ env.MEILISEARCH_API_KEY }}
doc-artifact-name: documentation-html-edb # Add only EDB API as page in this index.
pymeilisearchopts: --port \"8001\" # serve in another port as 8000 is deafult
pymeilisearchopts: --port 8001 # serve in another port as 8000 is deafult

# docstring_testing:
# runs-on: Windows
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/unit_test_prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ jobs:
pytest --tx 6*popen --durations=50 --dist loadfile -v --cov=pyaedt --cov-report=xml --junitxml=junit/test-results.xml --cov-report=html _unittest
- uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: matrix.python-version == '3.8'
name: 'Upload coverage to Codecov'

Expand Down
67 changes: 64 additions & 3 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,65 @@ concurrency:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build_solvers:
# The type of runner that the job will run on
runs-on: [ windows-latest, pyaedt ]
strategy:
matrix:
python-version: [ '3.10' ]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: 'Create virtual env'
run: |
Remove-Item D:\Temp\* -Recurse -Force -ErrorAction SilentlyContinue
python -m venv testenv_s
testenv_s\Scripts\Activate.ps1
python -m pip install pip -U
python -m pip install wheel setuptools -U
python -c "import sys; print(sys.executable)"
- name: 'Install pyaedt'
run: |
testenv_s\Scripts\Activate.ps1
pip install .
pip install .[tests]
pip install pytest-azurepipelines
Copy-Item -Path "C:\actions-runner\opengl32.dll" -Destination "testenv_s\Lib\site-packages\vtkmodules" -Force
mkdir tmp
cd tmp
python -c "import pyaedt; print('Imported pyaedt')"
# - name: "Check licences of packages"
# uses: pyansys/pydpf-actions/[email protected]

- name: 'Unit testing'
timeout-minutes: 40
run: |
testenv_s\Scripts\Activate.ps1
Set-Item -Path env:PYTHONMALLOC -Value "malloc"
pytest --durations=50 -v --cov=pyaedt --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest_solvers
- uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
name: 'Upload coverage to Codecov'

- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results
path: junit/test-results.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}


build:
# The type of runner that the job will run on
runs-on: [windows-latest, pyaedt]
Expand All @@ -44,7 +103,7 @@ jobs:

- name: 'Create virtual env'
run: |
Remove-Item D:\Temp\* -Recurse -Force
Remove-Item D:\Temp\* -Recurse -Force -ErrorAction SilentlyContinue
python -m venv testenv
testenv\Scripts\Activate.ps1
python -m pip install pip -U
Expand Down Expand Up @@ -73,8 +132,10 @@ jobs:
pytest -n 6 --dist loadfile --durations=50 -v --cov=pyaedt --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest
- uses: codecov/codecov-action@v3
if: matrix.python-version == '3.10'
name: 'Upload coverage to Codecov'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
name: 'Upload coverage to Codecov'

- name: Upload pytest test results
uses: actions/upload-artifact@v3
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exclude: |
repos:
- repo: https://github.com/psf/black
rev: 23.7.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
rev: 23.9.1 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
hooks:
- id: black
args:
Expand Down Expand Up @@ -60,7 +60,7 @@ repos:
rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.7.0]
additional_dependencies: [black==23.9.1]

# - repo: https://github.com/pycqa/pydocstyle
# rev: 6.1.1
Expand Down
Binary file added _unittest/example_models/T15/channel_4.sss
Binary file not shown.
Binary file not shown.
Binary file not shown.
25 changes: 25 additions & 0 deletions _unittest/example_models/T15/ibis_ami_example_rx.ami
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
(IBIS_AMI_EXAMPLE
(Reserved_Parameters
(AMI_Version (Usage Info) (Type String) (Value "5.1")
(Description "Valid for AMI_Version 5.1 and above"))
(Ignore_Bits (Usage Info)(Type Integer)(Default 4)
(Description "Ignore 4 bits to fill up tapped delay line"))
(Max_Init_Aggressors (Usage Info) (Type Integer)(Default 10)
(Description "Number of aggressors supported by the model"))
(Init_Returns_Impulse (Usage Info) (Type Boolean)(Default True)
(Description "AMI_Init function returns impulse and parameters_out"))
(GetWave_Exists (Usage Info)(Type Boolean)(Default True)
(Description "yes, it exists"))
) | End Reserved_Parameters
(Model_Specific
| method = 1 applies the tap weights inside AMI_Init() to the channel impulse.
| method = 2 applies the tap weights inside AMI_Getwave() to the wave.
| Results of both methods should be nearly identical in AMI, but not in VerifEye
| because we ignore the GetWave function there! method = 1 is faster
(method (Usage In)(Type Integer)(Default 1) )
(clock_threshold (Usage In)(Type Float)(Default 0.4)
(Description "clock threshold for the receiver"))
(ffe_weight_1 (Usage In)(Type Float)(Default 1.0))
(ffe_weight_2 (Usage In)(Type Float)(Default 0.0))
(ffe_weight_3 (Usage In)(Type Float)(Default 0.0))
))
59 changes: 59 additions & 0 deletions _unittest/example_models/T15/ibis_ami_example_rx.ibs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[IBIS Ver] 5.1
[Disclaimer]
Example IBIS file that refers to example
Algorithmic Model. This file does not
contain a model for an actual physical
device.
[File Name] ibis_ami_example_rx.ibs
|
[Date] March 29, 2018 10:59:00 AM EDT
[File Rev] 0.2
[Source]
|
[Notes]
|
[Component] example_device_rx
|
[Manufacturer] ANSYS, Inc.
|
[Package]
R_pkg 0.01m NA NA
L_pkg 0.001nH NA NA
C_pkg 0.001pF NA NA
|
[Pin] signal_name model_name R_pin L_pin C_pin
11 example_rx_P example_model_rx NA NA NA
12 example_rx_N example_model_rx NA NA NA
|
[Diff Pin] inv_pin vdiff tdelay_typ tdelay_min tdelay_max|
11 12 0.2 NA NA NA


| ------------------------------------
|
| model example_model_rx
|
[Model] example_model_rx
Model_type Input
C_comp 166.88f 166.88f 166.88f
Vinl = .5
Vinh = .5
[Temperature Range] 85 100 0
[Voltage Range] 1. 1. 1.
[Algorithmic Model]
Executable Windows_Intel7_32 ibis_ami_example_w32.dll ibis_ami_example_rx.ami
Executable Windows_Intel10_64 ibis_ami_example_w64.dll ibis_ami_example_rx.ami
Executable Linux_Intel10_32 ibis_ami_example_l32.so ibis_ami_example_rx.ami
Executable Linux_Intel10_64 ibis_ami_example_l64.so ibis_ami_example_rx.ami
[End Algorithmic Model]
[GND_clamp]
-1 0.0 0.0 0.0
1.5 0.0 0.0 0.0
[POWER_clamp]
-1 0.0 0.0 0.0
1.5 0.0 0.0 0.0
|
| ------------------------------------
|
|
[End]
24 changes: 24 additions & 0 deletions _unittest/example_models/T15/ibis_ami_example_tx.ami
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
(IBIS_AMI_EXAMPLE
(Reserved_Parameters
(AMI_Version (Usage Info) (Type String) (Value "5.1")
(Description "Valid for AMI_Version 5.1 and above"))
(Ignore_Bits (Usage Info)(Type Integer)(Default 4)
(Description "Ignore 4 bits to fill up tapped delay line"))
(Max_Init_Aggressors (Usage Info) (Type Integer)(Default 10)
(Description "Number of aggressors supported by the model"))
(Init_Returns_Impulse (Usage Info) (Type Boolean)(Default True)
(Description "AMI_Init function returns impulse and parameters_out"))
(GetWave_Exists (Usage Info)(Type Boolean)(Default True)
(Description "yes, it exists"))
) | End Reserved_Parameters
(Model_Specific
| method = 1 applies the tap weights inside AMI_Init() to the channel impulse.
| method = 2 applies the tap weights inside AMI_Getwave() to the wave.
| Results of both methods should be nearly identical in AMI, but not in VerifEye
| because we ignore the GetWave function there! method = 1 is faster
(method (Usage In)(Type Integer)(Default 1))
(ffe_weight_1 (Usage In)(Type Float)(Default 1.0))
(ffe_weight_2 (Usage In)(Type Float)(Default 0.0))
(ffe_weight_3 (Usage In)(Type Float)(Default 0.0))
)
)
63 changes: 63 additions & 0 deletions _unittest/example_models/T15/ibis_ami_example_tx.ibs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[IBIS Ver] 5.1
[Disclaimer]
Example IBIS file that refers to example
Algorithmic Model. This file does not
contain a model for an actual physical
device.
[File Name] ibis_ami_example_tx.ibs
|
[Date] March 29, 2018 10:59:00 AM EDT
[File Rev] 0.3
[Source]
|
[Notes]
|
[Component] example_device_tx
|
[Manufacturer] ANSYS, Inc.
|
[Package]
R_pkg 0.01m NA NA
L_pkg 0.001nH NA NA
C_pkg 0.001pF NA NA
|
[Pin] signal_name model_name R_pin L_pin C_pin
14 example_tx_P example_model_tx NA NA NA
15 example_tx_N example_model_tx NA NA NA

[Diff Pin] inv_pin vdiff tdelay_typ tdelay_min tdelay_max|
14 15 0.2 NA NA NA


|Model row 3
|
|model example_model_tx
|
[Model] example_model_tx
Model_type Output
C_comp 64f 64f 64f
Cref =0
[Model Spec]
Vmeas 0.0882 0.0882 0.0882
Vref 0.0882 0.0882 0.0882
[Algorithmic Model]
Executable Windows_Intel7_32 ibis_ami_example_w32.dll ibis_ami_example_tx.ami
Executable Windows_Intel10_64 ibis_ami_example_w64.dll ibis_ami_example_tx.ami
Executable Linux_Intel10_32 ibis_ami_example_l32.so ibis_ami_example_tx.ami
Executable Linux_Intel10_64 ibis_ami_example_l64.so ibis_ami_example_tx.ami
[End Algorithmic Model]
[Temperature Range] 85.0000 85.0000 85.0000
[Voltage Range] 0.1694 0.1694 0.1694
[Pulldown]
-2.50 -5.3821E-02 -5.3821E-02 -5.3821E-02
0.00 0.0000E+00 0.0000E+00 0.0000E+00
2.50 5.3821E-02 5.3821E-02 5.3821E-02
[Pullup]
-2.50 5.3821E-02 5.3821E-02 5.3821E-02
0.00 0.0000E+00 0.0000E+00 0.0000E+00
2.50 -5.3821E-02 -5.3821E-02 -5.3821E-02
[Ramp]
dV/dt_r 0.052/16.573p 0.052/16.573p 0.052/16.573p
dV/dt_f 0.052/17.251p 0.052/17.251p 0.052/17.251p

[End]
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions _unittest/test_00_EDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -1610,6 +1610,9 @@ def test_120_edb_create_port(self):
assert wave_port.pec_launch_width
assert not wave_port.deembed
assert wave_port.deembed_length == 0.0
assert wave_port.do_renormalize
wave_port.do_renormalize = False
assert not wave_port.do_renormalize
assert edb.hfss.create_differential_wave_port(
traces[0].id,
trace_paths[0][0],
Expand Down
12 changes: 9 additions & 3 deletions _unittest/test_15_ibs_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ def test_01_read_ibis(self):
assert ibis.components["MT47H64M4BP-3_25"].pins["A1_MT47H64M4BP-3_25_u26a_800_modified"].c_value == "0.59pF"

# Add pin
ibis.components["MT47H32M8BP-3_25"].pins["A7_MT47H32M8BP-3_25_u26a_800_modified"].add()
ibis.components["MT47H32M8BP-3_25"].pins["A8_MT47H32M8BP-3_25_u26a_800_modified"].add()
pin = (
ibis.components["MT47H32M8BP-3_25"]
.pins["A7_MT47H32M8BP-3_25_u26a_800_modified"]
.pins["A8_MT47H32M8BP-3_25_u26a_800_modified"]
.insert(0.1016, 0.05334, 0.0)
)
assert pin.name == "CompInst@A7_MT47H32M8BP-3_25_u26a_800_modified"
assert pin.name == "CompInst@DQS#_MT47H32M8BP-3_25_u26a_800_modified"

# Add buffer
ibis.buffers["RDQS#_u26a_800_modified"].add()
Expand All @@ -72,3 +72,9 @@ def test_02_read_ibis_from_circuit(self):
)
assert len(ibis_model.components) == 6
assert len(ibis_model.models) == 17

def test_03_read_ibis_ami(self):
ibis_model = self.aedtapp.get_ibis_model_from_file(
os.path.join(local_path, "example_models", test_subfolder, "ibis_ami_example_tx.ibs"), is_ami=True
)
assert ibis_model.buffers["example_model_tx_ibis_ami_example_tx"].insert(0, 0)
Loading

0 comments on commit 8194713

Please sign in to comment.