Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into amd
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaj committed Jan 22, 2025
2 parents fffd0f9 + f4bc796 commit 6568923
Show file tree
Hide file tree
Showing 47 changed files with 3,168 additions and 688 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/regression_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
run: cargo build --bins

- name: Add Origen to PATH (Linux)
if: matrix.os == 'ubuntu-latest'
if: contains(matrix.os, 'ubuntu')
run: |
echo "${{ github.workspace }}/rust/origen/target/debug" >> $GITHUB_PATH
export PATH="${{ github.workspace }}/rust/origen/target/debug:$PATH"
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
run: origen -v

- name: Show Origen Binary Location (Linux)
if: matrix.os == 'ubuntu-latest'
if: contains(matrix.os, 'ubuntu')
run: which origen
- name: Show Origen Binary Location (Windows)
if: matrix.os == 'windows-latest'
Expand All @@ -153,7 +153,7 @@ jobs:
# run: pip install importlib_metadata

# - name: Cache Poetry Version (Linux)
# if: matrix.os == 'ubuntu-latest'
# if: contains(matrix.os, 'ubuntu')
# working-directory: test_apps/python_app
# run: |
# POETRY_VER=$(python -c "import importlib_metadata; print(importlib_metadata.version('poetry'))")
Expand All @@ -168,7 +168,7 @@ jobs:
# echo "poetry_version=$POETRY_VER" >> $GITHUB_ENV

- name: Show Origen Binary Location (Linux)
if: matrix.os == 'ubuntu-latest'
if: contains(matrix.os, 'ubuntu')
working-directory: test_apps/python_app
run: |
which origen
Expand All @@ -183,14 +183,14 @@ jobs:
# TODO GA: Add to build script?
- name: Move Origen executable (Linux)
if: matrix.os == 'ubuntu-latest'
if: contains(matrix.os, 'ubuntu')
run: cp rust/origen/target/debug/origen python/origen/origen/__bin__/bin
- name: Move Origen executable (Windows)
if: matrix.os == 'windows-latest'
run: cp rust/origen/target/debug/origen.exe python/origen/origen/__bin__/bin

- name: Show Origen Binary Location (Linux)
if: matrix.os == 'ubuntu-latest'
if: contains(matrix.os, 'ubuntu')
working-directory: test_apps/python_app
run: |
which origen
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:

# Copy _origen
- name: Copy Origen Library (Linux)
if: matrix.os == 'ubuntu-latest'
if: contains(matrix.os, 'ubuntu')
working-directory: rust/pyapi
run: cp target/debug/lib_origen.so ../../python/origen/_origen.so

Expand All @@ -244,7 +244,7 @@ jobs:
run: ls ../../python/origen

- name: Show Origen Binary Location (Linux)
if: matrix.os == 'ubuntu-latest'
if: contains(matrix.os, 'ubuntu')
working-directory: test_apps/python_no_app
run: |
which origen
Expand Down Expand Up @@ -301,7 +301,7 @@ jobs:
# 'mv' command should be be fine for both linux & powershell
# Update: remove binary since it is being copied earlier.
- name: Remove Origen executable (Linux)
if: matrix.os == 'ubuntu-latest'
if: contains(matrix.os, 'ubuntu')
run: rm rust/origen/target/debug/origen
# run: rm rust/origen/target/debug/origen python/origen/origen/__bin__/bin
- name: Remove Origen executable (Windows)
Expand Down Expand Up @@ -333,7 +333,7 @@ jobs:
pip install python/origen_metal
- name: Show Origen Binary Location (Linux)
if: matrix.os == 'ubuntu-latest'
if: contains(matrix.os, 'ubuntu')
run: which origen
- name: Show Origen Binary Location (Windows)
if: matrix.os == 'windows-latest'
Expand Down
6 changes: 5 additions & 1 deletion python/origen/origen/core/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import importlib, os
from pathlib import Path
import _origen
from origen_metal.utils.version import pep440

def collect_plugins():
pls = Plugins()
Expand All @@ -20,7 +21,10 @@ def from_origen_cli(plugins):
return origen._plugins

class Plugin:
pass
@property
def version(self):
import importlib_metadata
return pep440(importlib_metadata.version(self.name))

class Plugins(UserDict):
def __init__(self):
Expand Down
3 changes: 1 addition & 2 deletions python/origen/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ origen = 'origen.__bin__:run_origen'

[tool.poetry.dependencies]
python = ">=3.7.0,<3.13"
origen_metal = "~0.4.1.dev2"
origen_metal = "~1.0.0"
termcolor = ">= 1.1.0"
colorama = "^0.4"
bs4 = "0.0.1"
Expand All @@ -38,7 +38,6 @@ Jinja2 = "^3"
importlib-metadata = ">= 1.7.0" # For use with Python pre-3.8

[tool.poetry.dev-dependencies]
pytest = "^6.2.4"
origen_metal = { path = "../origen_metal", develop = true }

[build-system]
Expand Down
3 changes: 3 additions & 0 deletions python/origen_metal/origen_metal/utils/param_str.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from origen_metal import _origen_metal
ParamStr = _origen_metal.utils.param_str.ParamStr
MultiParamStr = _origen_metal.utils.param_str.MultiParamStr
44 changes: 7 additions & 37 deletions python/origen_metal/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 19 additions & 12 deletions python/origen_metal/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ homepage = "https://origen-sdk.org/o2"
license = "MIT"
readme = "README.md"
authors = ["Origen-SDK"]
include = [
"origen_metal/_origen_metal.pyd",
"origen_metal/_origen_metal.so",
]

[tool.poetry.dependencies]
python = ">=3.7.0,<3.13"
Expand All @@ -20,22 +24,25 @@ termcolor = ">= 1.1.0"
colorama = ">= 0.4.4" # Note: colorama is usually installed on the system already, but it isn't actually required (e.g. WSL won't have this by default)
importlib-metadata = ">= 6.7.0" # For use with Python pre-3.8

[project]
name = "origen-metal"
version = "1.0.0"
requires-python = ">=3.7.0,<3.13"
dependencies = [
"colorama (>=0.4.4)",
"importlib-metadata (>=6.7.0)",
"pyreadline3 (>=3.3,<4.0) ; sys_platform == 'win32'",
"termcolor (>=1.1.0)"
]
# [project]
# name = "origen-metal"
# version = "1.0.0"
# description = "Bare metal APIs for the Origen SDK"
# license = "MIT"
# readme = "README.md"
# authors = ["Origen-SDK"]
# requires-python = ">=3.7.0,<3.13"
# dependencies = [
# "colorama (>=0.4.4)",
# "importlib-metadata (>=6.7.0)",
# "pyreadline3 (>=3.3,<4.0) ; sys_platform == 'win32'",
# "termcolor (>=1.1.0)"
# ]

[tool.poetry.dev-dependencies]
pytest = "^7"
pytest-rerunfailures = "13.0" # Last version that supports Python 3.7
pdoc = "^7"
maturin = "1.7.0"
# maturin = "1.7.0"

[tool.pytest.ini_options]
addopts = "--strict-markers"
Expand Down
Loading

0 comments on commit 6568923

Please sign in to comment.