diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f0cf9d4..67f54c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,10 +19,9 @@ jobs: strategy: matrix: python-version: - - 3.6 - - 3.7 - - 3.8 - - 3.9 + - "3.7" + - "3.8" + - "3.9" - "3.10" - "3.11" - "3.12" @@ -30,20 +29,17 @@ jobs: - os: ubuntu-latest # older versions need older OS - - python-version: 3.6 - os: ubuntu-20.04 + - python-version: "3.7" + os: ubuntu-22.04 + + - python-version: "3.8" + os: ubuntu-22.04 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - name: Set up Python 3.7 to bootstrap py3.6 - if: ${{ matrix.python-version == '3.6' }} - uses: actions/setup-python@v4 - with: - python-version: 3.7 - - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: @@ -53,18 +49,7 @@ jobs: run: | python -m pip install -U -r tests/requirements.txt - # Python 3.6 cannot install directly from a pyproject.toml - # Instead, build a wheel from py3.7 and then install it - - name: Install via wheel - if: ${{ matrix.python-version == '3.6' }} - run: | - python3.7 -m pip install build - python3.7 -m build - python --version - python -m pip install ./dist/*.whl - - name: Install - if: ${{ matrix.python-version != '3.6' }} run: | python -m pip install . @@ -110,7 +95,7 @@ jobs: - name: Install dependencies run: | - python -m pip install -U pylint + python -m pip install -r tests/requirements.txt - name: Install run: | @@ -132,7 +117,11 @@ jobs: - name: Install dependencies run: | - python -m pip install -U mypy peakrdl + python -m pip install -r tests/requirements.txt + + - name: Install + run: | + python -m pip install . - name: Type Check run: | @@ -161,8 +150,9 @@ jobs: - name: Build sdist run: python -m build - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: dist path: | dist/*.tar.gz dist/*.whl @@ -180,9 +170,9 @@ jobs: # Only publish when a GitHub Release is created. if: github.event_name == 'release' steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: artifact + name: dist path: dist - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index 8cbefe3..8b38176 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,9 +5,9 @@ build-backend = "setuptools.build_meta" [project] name = "peakrdl-cheader" dynamic = ["version"] -requires-python = ">=3.6" +requires-python = ">=3.7" dependencies = [ - "systemrdl-compiler >= 1.21.0, < 2", + "systemrdl-compiler >= 1.29.0, < 2", "jinja2", ] @@ -26,13 +26,6 @@ classifiers = [ "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3 :: Only", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", @@ -40,6 +33,11 @@ classifiers = [ "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)", ] +[project.optional-dependencies] +cli = [ + "peakrdl-cli >= 1.2.3", +] + [project.urls] Source = "https://github.com/SystemRDL/PeakRDL-cheader" Tracker = "https://github.com/SystemRDL/PeakRDL-cheader/issues" diff --git a/src/peakrdl_cheader/design_state.py b/src/peakrdl_cheader/design_state.py index 4a39e2f..506e8ad 100644 --- a/src/peakrdl_cheader/design_state.py +++ b/src/peakrdl_cheader/design_state.py @@ -21,11 +21,11 @@ def __init__(self, top_node: AddrmapNode, kwargs: Any) -> None: #------------------------ # Each reg that has overlapping fields generates an entry: # reg_path : list of field names involved in overlap - self.overlapping_fields = {} # type: Dict[str, List[str]] + self.overlapping_fields: Dict[str, List[str]] = {} # Pairs of overlapping registers # first_reg_path : partner_register_name - self.overlapping_reg_pairs = {} # type: Dict[str, str] + self.overlapping_reg_pairs: Dict[str, str] = {} #------------------------ # Extract compiler args