dan-fritchman / Hdl21

Hardware Description Library
BSD 3-Clause "New" or "Revised" License
69 stars 16 forks source link

Specify package Metadata using a pyproject.toml file #219

Closed curtisma closed 6 months ago

curtisma commented 6 months ago

Closes #218 and closes #49

Updates

Questions & Concerns

Testing

Tested both the pdk and main pyproject.toml by doing an install and editable install of each:

image

image

image

curtisma commented 6 months ago

I still need to add a LICENSE file to the root of each package. That will make sure it is included properly in the package and would be more explicit that all the packages fall under a bsd3 license.

curtisma commented 6 months ago

I still need to add a LICENSE file to the root of each package. That will make sure it is included properly in the package and would be more explicit that all the packages fall under a bsd3 license.

Done

daquintero commented 6 months ago

Just thought to write, thanks for this effort! Installation works for me from a poetry-managed environment with your commit with the new pyproject.toml.

I've just run this successfully based on this branch within pydantic v2 in Ubuntu py 3.10. Working on some examples so if I run into any issues will raise/fix as part of the pydantic v2 new release. Look forward to trying it out in the wild directly from pypi!

import hdl21 as h
import sky130_hdl21

@h.module
class SkyInv:
    """ An inverter, demonstrating using PDK modules """

    # Create some IO
    i, o, VDD, VSS = h.Ports(4)

    p = sky130_hdl21.Sky130MosParams(w=1,l=1)

    # And create some transistors!
    ps = sky130_hdl21.primitives.PMOS_1p8V_STD(p)(d=o, g=i, s=VDD, b=VDD)
    ns = sky130_hdl21.primitives.NMOS_1p8V_STD(p)(d=o, g=i, s=VSS, b=VSS)
dan-fritchman commented 6 months ago

CI fails, although (I think) only on a code-coverage upload step. (There's a lotta tests.)
Which (again I think) is because the source branch is on a fork?
We should test that, and probably make an issue for it.

dan-fritchman commented 6 months ago

OK never mind that codecov/ CI comment.
Seems it was a transient thing that resolved itself.
Both the re-run CI here and those on #221 (same code) both pass.