Barebones Copra Project Structure#1
Conversation
There was a problem hiding this comment.
We are using sphinx-book-theme in cocotb master since a while, you might want to follow that.
There was a problem hiding this comment.
Removed the redundancy by composing a better pyproject.toml file here
There was a problem hiding this comment.
Yep, this is something for .gitignore:
Typical Python project gitignore will have.
*.egg-info/
__pycache__/
There was a problem hiding this comment.
We should align on a copyright header early on (if any).
There was a problem hiding this comment.
I'm not sure we need copyright headers, just a single license file in the repo is sufficient.
There was a problem hiding this comment.
Use the license headers as described at https://docs.cocotb.org/en/development/contributing.html#patch-requirements.
There was a problem hiding this comment.
| Copyright (c) 2024, cocotb | |
| Copyright (c) 2024, cocotb contributors |
There was a problem hiding this comment.
| - 🚀 Generate Python type stubs from Verilog/SystemVerilog DUTs | |
| - 🚀 Generate Python type stubs from VHDL and Verilog/SystemVerilog DUTs |
There was a problem hiding this comment.
What made you decide on 1.8 or later?
There was a problem hiding this comment.
I was trying to make it cross compatible across 1.8, and only later realized that's too much of a breadth. Also, got a bit more confused because it wasn't working with 2.0.0 in the pyproject.toml version specifier for cocotb, only realizing it later that it's because it's getting the wheel from pypi.
There was a problem hiding this comment.
Is this internal tests or cocotb test with the Python runner? If so we should support both the runner and Makefiles. This might fall into the dev additional dependencies below and doesn't need a mention here.
There was a problem hiding this comment.
We tend to not document private modules. Here I'd re-export the __version__ in copra.__init__.py and ensure that is called out .. autodata:: copra.__version__ here.
There was a problem hiding this comment.
Yep, this is something for .gitignore:
Typical Python project gitignore will have.
*.egg-info/
__pycache__/
There was a problem hiding this comment.
This is not the canonical import location for Range.
There was a problem hiding this comment.
Only names that start with _ are not public. Names that end with _ are often used to avoid collisions with keywords, such as operator.or_.
cmarqu
left a comment
There was a problem hiding this comment.
Please don't be discouraged by all our nitpicky comments, this is a very good start!
There was a problem hiding this comment.
| ============ | |
| ============= |
There was a problem hiding this comment.
| ------------------ | |
| ------------------- |
There was a problem hiding this comment.
| ================================ | |
| ================================= |
There was a problem hiding this comment.
| .. copra documentation master file, created by | |
| sphinx-quickstart on Wed May 15 15:30:00 2024. | |
| You can adapt this file completely to your liking, but it should at least | |
| contain the root `toctree` directive. |
There was a problem hiding this comment.
| ------------------------ | |
| ------------------------- |
There was a problem hiding this comment.
| This will generate a `dut.pyi` file with type information for your DUT. | |
| This will generate a :file:`dut.pyi` file with type information for your DUT. |
https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-file
There was a problem hiding this comment.
| For example, in VS Code, add this to your `settings.json`: | |
| For example, in VS Code, add this to your :file:`settings.json`: |
There was a problem hiding this comment.
| "License :: OSI Approved :: BSD License", |
Disrecommended these days.
There was a problem hiding this comment.
Yep. The recommendation is to use license and/or license-file field. However, those fields don't work in Python 3.8 for some reason, so either leave them out or move that part of the config to setup.cfg.
There was a problem hiding this comment.
Ideally, ruff check would be happy with the generated files (which it currently wouldn't be).
There was a problem hiding this comment.
Also I'd think instead of appending lines and building the whole file in memory you can just file.write lines.
|
Is there a reason to close it? |
|
@ktbarrett I'm going to resolve all the reviews on this PR and also refer to them on a new one, in which I'll push all new changes. Really sorry for causing the trouble and inconvenience, I'll make sure to document this mistake well so as to make sure people can track it properly too. |
Overview
This PR introduces the initial project structure for Copra, a new project under the cocotb organization. This barebones setup includes the essential configuration files and directory structure to get started with development.
Changes Included
Core Configuration
Project Structure
Development Setup
Next Steps
Set up CI/CD pipelines
Add comprehensive documentation
Implement core functionality
Testing
The project includes a basic test structure. Run nox to execute the test suite.
Documentation
Initial documentation structure is in place in the /docs directory. More comprehensive documentation will be added in subsequent PRs.