-
Notifications
You must be signed in to change notification settings - Fork 1
Tidy up the repository to be published to Pypi #9
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
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
290f748
Tidy up the repository to be published to Pypi
engdoreis c2ce5d0
Run uv run ruff check --fix
engdoreis 9c031f6
Fix linting errors pointed by ruff
engdoreis 298bb4c
[ci] Test the build of both packages
engdoreis 553af7a
Add readme files for each packaged
engdoreis f2a2c4b
Fix relative module paths
engdoreis 0c0f196
[rdl2ot] Add support to regfile
engdoreis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # rdl2ot cli tool | ||
| A PeakRDL extension to generate Opentitan style source files from SystemRDL files. | ||
|
|
||
| ## How to generate the Opentitan register interfaces from a RDL file | ||
| ```sh | ||
| rdl2ot export-rtl <input_rdl> <output_dir> | ||
| ``` | ||
|
|
||
| Example: | ||
| ```sh | ||
| mkdir -p /tmp/lc_ctrl | ||
| rdl2ot export-rtl tests/snapshots/lc_ctrl.rdl /tmp/lc_ctrl/ | ||
| ``` | ||
|
|
||
| ## Contributing | ||
| ### How to run tests | ||
| ```sh | ||
| cd rdl2ot | ||
| pytest | ||
| ``` | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,9 +3,38 @@ name = "rdl2ot" | |
| version = "0.1.0" | ||
| description = "An extension of PeakRDL to generate Opentitan RTL." | ||
| requires-python = ">=3.10" | ||
| keywords = ["SystemRDL", "Opentitan", "Codegen"] | ||
| readme = "README.md" | ||
| dependencies = [ | ||
| "click>=8.2.1", | ||
| "jinja2>=3.1.6", | ||
| "peakrdl>=1.4.0", | ||
| ] | ||
|
|
||
| authors = [ | ||
| { name = "lowRISC contributors"}, | ||
| ] | ||
|
|
||
| [project.scripts] | ||
| rdl2ot = "rdl2ot.cli:main" | ||
|
|
||
| [project.urls] | ||
| Homepage = "https://github.com/lowrisc/benevisrdl" | ||
| Issues = "https://github.com/lowrisc/benevisrdl/issues" | ||
| Documentation = "https://github.com/lowrisc/benevisrdl" | ||
|
|
||
| [build-system] | ||
engdoreis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [tool.pyright] | ||
| include = ["src"] | ||
| reportMissingImports = "error" | ||
| reportMissingTypeStubs = false | ||
| venv = ".venv" | ||
| executionEnvironments = [ | ||
| { root = "src" }, | ||
| ] | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no ruff tool config here. Which is fine if the defaults are okay, but it might be worth explicitly specifying in case the defaults change? |
||
| [tool.hatch.build.targets.wheel] | ||
| packages = ["src/rdl2ot", "src/templates"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| # Copyright lowRISC contributors (OpenTitan project). | ||
| # Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| """Init.""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed you have the ruff config here. If the LSPs pick this up okay then great! Might be worth checking they don't stop at the package level
pyproject.tomlwhen discovering theruffconfig.A quick test could be to set the line length to
10or something and then run ruff inside one of the package directories?Actually I guess the IDE may pick up the
pyproject.tomlfrom the root of the repo first? Not sure, but it might be worth openingneovimfrom the context of a subdir within a package and then again at the repo root and see if there is a difference in terms of rule discovery.