Remove auto-generated protobuf files from version control - #78
chenkasirer with Copilot wants to merge 8 commits into
Conversation
- Add generated proto files to .gitignore - Move invocations.py to root to avoid circular dependency during generation - Update CI workflows to generate proto files before testing - Update README with development installation instructions - Update pyproject.toml to explicitly include generated files in package - Remove generated files from git tracking Co-authored-by: chenkasirer <3398309+chenkasirer@users.noreply.github.com>
The files were previously tracked in git. This commit removes them from the index so they are properly ignored. Co-authored-by: chenkasirer <3398309+chenkasirer@users.noreply.github.com>
This ensures the generated directory is tracked in git and recognized as a Python package, even when the generated proto files are not present. Co-authored-by: chenkasirer <3398309+chenkasirer@users.noreply.github.com>
- Fix typos: 'class_assests' -> 'class_assets' - Add missing f-string prefix for dist_dir message - Move shutil import to top of file - Add return statement for unsupported target language - Add path traversal protection in tar extraction - Update GitHub Actions to use consistent versions (v5) Co-authored-by: chenkasirer <3398309+chenkasirer@users.noreply.github.com>
|
|
||
| steps: | ||
| - uses: compas-dev/compas-actions.build@v4 | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
@copilot check out version 4.1.0 of the build task, there's a pre-build task invocation there that might be useful for this. would be cool if we don't have to reimplement the build action
There was a problem hiding this comment.
Updated to use compas-actions.build@v4.1.0 with the run_prebuild parameter. Created a new pre-build invoke task that generates the protobuf files. This simplifies the workflow by leveraging the built-in pre-build support instead of reimplementing all the build steps. Commit: 3501071
There was a problem hiding this comment.
@copilot if possible, leave this module where it is. it's relied upon by plugins of this project
There was a problem hiding this comment.
Moved invocations.py back to src/compas_pb/ to maintain plugin compatibility. Used lazy imports in tasks.py to avoid circular dependency issues during proto file generation. Commit: 33c768f
|
|
||
| steps: | ||
| - uses: compas-dev/compas-actions.build@v4 | ||
| - uses: actions/checkout@v4 |
- Added pre-build invoke task to generate protobuf files - Updated build.yml to use compas-actions.build@v4.1.0 with run_prebuild parameter - Updated release.yml to use compas-actions.build@v4.1.0 with run_prebuild parameter - Updated README to reference invoke pre-build instead of longer command - This leverages the built-in pre-build support instead of reimplementing the build action Co-authored-by: chenkasirer <3398309+chenkasirer@users.noreply.github.com>
- Moved invocations.py from root back to src/compas_pb/ as requested - Added lazy imports in tasks.py to avoid circular dependency - Created wrapper tasks that import from compas_pb.invocations at runtime - This maintains backward compatibility for plugins that rely on this module Co-authored-by: chenkasirer <3398309+chenkasirer@users.noreply.github.com>
|
@chenkasirer should we close this? |
Auto-generated protobuf Python files (
*_pb2.py,*_pb2.pyi) were tracked in git despite being generated from.protodefinitions. This creates maintenance overhead and diff noise.Changes
Generation workflow:
.gitignorepatterns for generated filescompas-actions.build@v4.1.0with built-inrun_prebuildsupportpre-buildinvoke task to generate proto files automaticallyREADME.mddocuments generation requirement for developersPlugin compatibility:
invocations.pyinsrc/compas_pb/to maintain backward compatibility with pluginstasks.pyto avoid circular dependency during proto generationcompas_pb.invocationsat runtimesrc/compas_pb/generated/__init__.pyto maintain package structureCode quality:
class_assests→class_assets)Developer workflow
Generated files are included in wheel distributions automatically.
What type of change is this?
Checklist
CHANGELOG.mdfile in theUnreleasedsection under the most fitting heading (e.g.Added,Changed,Removed).invoke test).invoke lint).compas.datastructures.Mesh.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.