Commit Graph

5 Commits

Author SHA1 Message Date
Sybren A. Stüvel
69919510e0 Introduce Python code generator for OpenAPI spec to dataclasses
Add a [Python code generator][1] that takes an OpenAPI definition and
outputs the corresponding data model as [dataclasses][2]

This is intended to be used in the Remote Asset Library project, to
create, download, parse, and validate information of a remote asset
library.

[1]: https://koxudaxi.github.io/datamodel-code-generator/
[2]: https://docs.python.org/3/library/dataclasses.html

## Running the Generator

The generator is a Python script, which creates its own Python
virtualenv, installs the dependencies it needs, and then runs the
generator within that virtualenv.

The script is intended to run via the `generate_datamodels` CMake
target. For example, `ninja generate_datamodels` in the build
directory.

## Details

The virtualenv is created in Blender's build directory, and is not
cleaned up after running. This means that subsequent runs will just
use it directly, instead of reinstalling dependencies on every run.

## Generated Code & Interaction with Build System

It is my intention that the code generation _only_ happens when the
OpenAPI specification changes. This means that the generated code will
be committed to Git like any hand-written code. Building Blender will
therefore _not_ require the code generator to run. Only people working
on the area that uses the generated code will have to deal with this.

Pull Request: https://projects.blender.org/blender/blender/pulls/139495
2025-08-20 01:22:04 +02:00
Jacques Lucke
bdfa4b556b Git: use lfs for csv files
This is useful when adding regression tests for the Import CSV node.

Pull Request: https://projects.blender.org/blender/blender/pulls/138726
2025-05-12 11:34:32 +02:00
Sergey Sharybin
dc8c64f451 Cleanup: Unneeded empty line
Left over from debugging.
2025-05-05 16:24:46 +02:00
Sergey Sharybin
c39266f728 Adjust .gitattributes
Make release/bin/blender-launcher and release/bin/blender-softwaregl not
covered by the filters.

Also tweak the filter for .so libraries, making it so doc/doxygen/doxygen.source.h
is not considered to be covered.
2025-05-05 16:24:24 +02:00
Sergey Sharybin
bbfc97ad6f Move tests/data and assets to the main repository
This change moves the tests data files and publish folder of assets
repository to the main blender.git repository as LFS files.

The goal of this change is to eliminate toil of modifying tests,
cherry-picking changes to LFS branches, adding tests as part of a
PR which brings new features or fixes.

More detailed explanation and conversation can be found in the
design task.

Ref #137215

Pull Request: https://projects.blender.org/blender/blender/pulls/137219
2025-05-05 15:10:22 +02:00