Commit Graph

18 Commits (81a71b2c4756f9d54280c4e2bbcfac36a06a0799)

Author SHA1 Message Date
Sofus Albert Høgsbro Rose 81a71b2c47
feat: extensive improvements 2024-06-13 16:10:00 +02:00
Sofus Albert Høgsbro Rose 353a2c997e
refactor: end-of-day commit (sim symbol flow for data import/export & inverse design) 2024-05-21 22:57:56 +02:00
Sofus Albert Høgsbro Rose f5d19abecd
feat: data file exporter node
As with many things, there seems to be an obvious convergent design
philosophy here wrt. data flow.
We should definitely be using `SimSymbol` for a lot more things; it
solves a lot of the pain points related to figuring out what on Earth
should go into the `InfoFlow` in which situations.

We desperately need to iron out the `*Flow` object semantics

The surprise MVP of the day is `Polars`.
What a gorgeous and fast dataframe library.
We initially wrote it off as being unsuited to multidimensional data,
but case in point, a whole lot of useful data can indeed be expressed as 2D.
For all of these cases, be it loading/saving or processing, `Polars`
is truly an ideal choice.

Work continues.
2024-05-21 08:51:26 +02:00
Sofus Albert Høgsbro Rose b0db0ca072
fix: fix import and remove some TODOs
We're slowly migrating all the random sprinkled TODOs into actual, trackable issues, so we actually have a change of keeping an overview.
2024-05-05 09:51:17 +02:00
Sofus Albert Høgsbro Rose 691ff4a393
bump: version 0.0.1 → 0.1.0 2024-05-04 20:09:16 +02:00
Sofus Albert Høgsbro Rose a7e3c17c86
refactor: applied tooling for predictable lint/fmt/commits
Applied `rye lint --fix`, `rye fmt`, and commitizen checking to better control the project development.
2024-05-04 20:08:33 +02:00
Sofus Albert Høgsbro Rose 3c00530524
fix: Unit conversion of LazyValueRange.
The unit conversion was indeed botched, with a typo causing the start of
the range to be converted as if it were the end of the range.

Closes #3.
2024-05-04 15:51:40 +02:00
Sofus Albert Høgsbro Rose badadfbfc2
fix: Extract fixes incl. draw, array-copy on export. 2024-04-24 19:06:15 +02:00
Sofus Albert Høgsbro Rose 44d61b5639
feat: Safe, practical BLField.
BLField has gotten a huge facelift, to make it practical to wrangle
properties without the sharp edges.
- All the "special" UI-exposed property types can now be directly
  constructed in a BLField marked with 'prop_ui'.
- The most appropriate internal representation will be chosen to
  represent the attribute based on its type annotation, including sized
  vector-like `bool`, `int`, `float` for `tuple[...]`.
- Static EnumProperties can now be derived from a special `StrEnum`, to
  which a `to_name` and `to_icon` method is attached.
- Dynamic `EnumProperty` can now be used safely, with builtin
  workarounds to the real-world reference-loss-crash (realized
  in the Tidy3D Cloud Task node) and jankiness like empty enum.
- The update method is now fully managed, negating all bugs related to
  improper update callback naming.
- Python-side getter caching is preserved for ui-exposed
  properties, with the help of node/socket base class support for
  passing a `Signal.InvalidateCache` to BLFields that are altered in the
  UI.

The cost to all this niceness is rather low, and arguably, positive:
- Dynamic Enum/String searchers no longer "magically" invoke all the
  time, since the values seen by Blender are cached by the BLField.
- To regenerate the searcher output, an `@on_value_changed` should be
  made by the user to pass `Signal.ResetEnumItems` or
  `Signal.ResetStrSearch` to the `BLField`.
- Since searching is no longer eager, there is no danger of
  out-of-reference strings (which crash Blender from EnumProperty), but
  also a greatly reduced performance problems associated with
  the hot-loop regeneration of EnumProperty strings.
- The base classes are now involved with BLField invalidation, to ensure
  that the getter caches are cleared up when the UI changes. For the
  price of that small indirection (done cheaply with set lookup),
  all attribute lookups are generally done in a single lookup, completely
  avoiding Blender until needed.
- This does represent another increase in confidence wrt. the event
  system's integrity, but so far, that has been a very productive
  direction.

**NOTE**: The entire feature set of BLField is not well tested, and will
likely need adjustments as the codebase is converted to use them.
2024-04-23 07:55:54 +02:00
Sofus Albert Høgsbro Rose 9960cd3480
refactor: Big changes to data flow and deps loading 2024-04-19 16:53:24 +02:00
Sofus Albert Høgsbro Rose dfeb65feec
feat: Math nodes (non-working) 2024-04-17 16:03:15 +02:00
Sofus Albert Høgsbro Rose 480679a3c0
refactor: Streamlined graph-update semantics. 2024-04-12 15:39:13 +02:00
Sofus Albert Høgsbro Rose dc76ab7688
fix: Various critical fixes, field preview 2024-04-10 10:46:55 +02:00
Sofus Albert Høgsbro Rose 02c63e3b8f
fix: The rabid __mp_main__ segfault. 2024-04-07 18:39:27 +02:00
Sofus Albert Høgsbro Rose 221d5378e4
feat: ManagedObj Semantics 2024-04-01 16:48:56 +02:00
Sofus Albert Høgsbro Rose 6f665b891d
feat: Working logging, before- and after-deps.
We have a far more sane approach to nodeps now, which
allows us to essentially have two loggers - one that is
very useful, pretty, and clear, but requires a 'rich'
dependency, and one that is simple.
In this spirit, we factored out services/ too.

We can also set the initial console log level now when
packing the .zip.

There's still work to do with the actual flow for deps
installing / uninstalling.
But it should be far more robust now.

Finally, we have a barebones working `quartodoc`-based docs site.
It's super clever; see <https://github.com/machow/quartodoc>.
As it's "just" a quarto project with some python autodiscovery,
fleshing it out with ex. math, images, diagrams, and so forth
should be exceptionally easy.

As we develop, various linter-guided fixes are being realized.
This will be a long process, best done as we spiff everything up
in preparation for general release.
2024-03-21 18:45:38 +01:00
Sofus Albert Høgsbro Rose be4eec2242
feat: Completely revamped dependency system. 2024-03-20 12:55:40 +01:00
Sofus Albert Høgsbro Rose 59a236f33a
packaging: Initialize virtual 'rye' project. 2024-03-14 13:37:30 +01:00