feat: add run_events_pubsub

Adds an Events sample using the CloudEvents SDK for Go for Pub/Sub events.

Looks like the error is in the SDK:
/go/pkg/mod/github.com/cloudevents/sdk-go/v2@v2.0.0/types/value.go:306:27: reflect.ValueOf(v).IsZero undefined (type reflect.Value has no field or method IsZero)
note: module requires Go 1.13

Thanks for the review @grayside. PTAL.

Test failure: Not sure why Go 1.11 passed, but Go 1.12 is not compatible with the Events SDK. If the SDK isn't adjusted for backwards compatibility, this is blocked by #1224.
The current implement plans for that issue are skipping tests for a module in an earlier runtime than the module requires. I can look into a new iteration on solving that problem but odds are it will not land until July.
Extract from the build log:
/go/pkg/mod/github.com/cloudevents/sdk-go/v2@v2.0.0/types/value.go:306:27: reflect.ValueOf(v).IsZero undefined (type reflect.Value has no field or method IsZero)
note: module requires Go 1.13
FAIL	github.com/GoogleCloudPlatform/golang-samples/run/events-pubsub [build failed]

t.Skip() because of Go failures

https://github.com/cloudevents/sdk-go/issues/536

Prefer undescores in package paths. Not written anywhere sorry but it's implied:
https://github.com/GoogleCloudPlatform/golang-samples/blob/master/CONTRIBUTING.md#sample-package-name-file-name-and-directory
Commit messages should follow the Go project style (e.g. functions: add gophers codelab).
https://github.com/GoogleCloudPlatform/golang-samples/blob/master/CONTRIBUTING.md

Prefer undescores in package paths. Not written anywhere sorry but it's implied:
https://github.com/GoogleCloudPlatform/golang-samples/blob/master/CONTRIBUTING.md#sample-package-name-file-name-and-directory

Done. Although almost all other package paths for run don't do this (can we add a lint rule or something?)

Commit messages should follow the Go project style (e.g. functions: add gophers codelab).
https://github.com/GoogleCloudPlatform/golang-samples/blob/master/CONTRIBUTING.md

Can modify with the final squash commit.

Hi @grayside, we talked about skipping this test in the meantime due to the Go CE SDK behavior.
I noticed you added status: blocked, however I think we're not blocked if we have verified the test in the above CI run and agreed to t.Skip right?

I guess we can't just skip because the error is a build error.
Can we somehow skip the build for Go 1.12?

Ah, too true. There's not a graceful way to handle this. Kokoro testing is controlled by system_tests.sh and in order to exempt a sample from even building, we would need to modify the script to exclude this directory in a few places.

To catch all the PR test points, modify $CHANGED_DIRS around line 46
To avoid nightly testing, would need to modify the runTests() function to remove this directory, or perhaps in the loop that calls it around line 204.

@tbpg we are trying to find a way to merge this PR with skipped tests until I can revisit #1224 in July. Do you have any suggestions?

Build tags might work here. @broady mentioned not being a fan, though.

Will wait for @broady to recommend a solution.

@tbpg @broady Is there an interim solution we can apply in the meantime? Can we have the CI skip this repo's folder?
My Go knowledge and repo knowledge doesn't know how to move forward with this PR.

see #1552

Thanks @broady!
I'm not authorized to merge, so please merge when you can.


Log deprecation warning instead of printing

Fix for https://github.com/apollographql/apollo-kotlin/issues/4560

Thanks for the contribution!


Fix allocate_segment hint (add remaning gas parameter)

This is a noop because allocate_segment is a hint but they don't deal with remaining_gas. Syscall handlers define allocate_segment for use in the different syscalls but on itself it does not deal with remaining_gas either.


MavenSettings can now be parsed from settings.xml in well-known environment locations, ...

…and RewriteTest + MavenRecipeTest now use this feature in their default ExecutionContexts (#1801)

One failing test case in the build, and it's mine:
MavenSettingsTest > interpolation() FAILED
    java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Map java.util.Collections$UnmodifiableMap.m accessible: module java.base does not "opens java.util" to unnamed module @3e07d849
        at java.base@17.0.3/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
        at java.base@17.0.3/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
        at java.base@17.0.3/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
        at java.base@17.0.3/java.lang.reflect.Field.setAccessible(Field.java:172)
        at app//org.openrewrite.maven.MavenSettingsTest.updateEnvMap(MavenSettingsTest.kt:388)
        at app//org.openrewrite.maven.MavenSettingsTest.interpolation(MavenSettingsTest.kt:334)

The test case is fundamentally about reading values from System properties/env, but, Java doesn't expose an option to mutate env from code. As a workaround, I added a hacky reflection bit to the test code to forcibly change Java's env Map (not the system's actual env). It works on my local, but the CI build doesn't like it.
I think I'll split the new test method into a few, and disable the case which touches env -- that should let CI pass but keep the option to reference that test case in the future if any regressions.

Let me know if you have any questions on the comments and then we can discuss how to manage things. We are always happy to have our users contributing these types of PRs but also want to be respectful of your time.

No worries, glad to do it. I recognized that I was including some non-trivial design choices in this PR, which would warrant discussion, but I figured finishing the draft and pushing it up could be a good way to facilitate that discussion.


Update Narrowing.md

On line 435, the last example (const underWater3: Fish[] = zoo.filter((pet) => isFish(pet));) throws an error. It does not mention it will throw an error, nor does it say why is the error there.

Thanks - we fixed this in https://github.com/microsoft/TypeScript-Website/pull/1684


Error in fix-db script current.py

As of 965b8af990c3997917bc8136f893506d697b8490, running
poetry run python scripts/fix_db/current.py

with a production DB loaded in postgres leads to an error:
...
WARNING:root:[Project   93] timestamp_created attribute valid, skip

WARNING:root:[Job    1] setting project_dump={'timestamp_created': '0001-01-01T00:00:00+00:49:56', 'name': 'proj-cardiac-test-4', 'read_only': False, 'id': 1}
Traceback (most recent call last):
  File "/somewhere/fractal-server/scripts/fix_db/current.py", line 84, in <module>
    ProjectDump(**project_dump)
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for ProjectDump
timestamp_created
  invalid datetime format (type=value_error.datetime)

Also, possibly related:
If I remove the ProjectDump and ApplyWorkflowRead validation steps from current.py, and then start up fractal-server, I hit another error:
$ poetry run fractalctl start --port 8000
WARNING:root:FRACTAL_TASKS_DIR="Tasks" is not an absolute path; converting it to "/somewhere/fractal-server/tests/data/example_server_startup/Tasks"
fractal_server.app.db
INFO:     Started server process [83253]
INFO:     Waiting for application startup.
ERROR:    Traceback (most recent call last):
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/starlette/routing.py", line 677, in lifespan
    async with self.lifespan_context(app) as maybe_state:
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/starlette/routing.py", line 566, in __aenter__
    await self._router.startup()
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/starlette/routing.py", line 654, in startup
    await handler()
  File "/somewhere/fractal-server/fractal_server/main.py", line 199, in on_startup
    await _create_first_user(
  File "/somewhere/fractal-server/fractal_server/main.py", line 123, in _create_first_user
    res = await session.execute(stm)
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/ext/asyncio/session.py", line 455, in execute
    result = await greenlet_spawn(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 190, in greenlet_spawn
    result = context.throw(*sys.exc_info())
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2308, in execute
    return self._execute_internal(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2190, in _execute_internal
    result: Result[Any] = compile_state_cls.orm_execute_statement(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/orm/context.py", line 296, in orm_execute_statement
    return cls.orm_setup_cursor_result(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/orm/context.py", line 589, in orm_setup_cursor_result
    return loading.instances(result, querycontext)
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/orm/loading.py", line 257, in instances
    _prebuffered = list(chunks(None))
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/orm/loading.py", line 242, in chunks
    post_load.invoke(context, path)
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/orm/loading.py", line 1539, in invoke
    loader(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/orm/strategies.py", line 3206, in _load_for_path
    self._load_via_parent(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/orm/strategies.py", line 3282, in _load_via_parent
    context.session.execute(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2308, in execute
    return self._execute_internal(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2190, in _execute_internal
    result: Result[Any] = compile_state_cls.orm_execute_statement(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/orm/context.py", line 293, in orm_execute_statement
    result = conn.execute(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1416, in execute
    return meth(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 516, in _execute_on_connection
    return connection._execute_clauseelement(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1639, in _execute_clauseelement
    ret = self._execute_context(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1848, in _execute_context
    return self._exec_single_context(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1988, in _exec_single_context
    self._handle_dbapi_exception(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2346, in _handle_dbapi_exception
    raise exc_info[1].with_traceback(exc_info[2])
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1969, in _exec_single_context
    self.dialect.do_execute(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 922, in do_execute
    cursor.execute(statement, parameters)
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 591, in execute
    self._adapt_connection.await_(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 125, in await_only
    return current.driver.switch(awaitable)  # type: ignore[no-any-return]
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 185, in greenlet_spawn
    value = await result
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 569, in _prepare_and_execute
    self._handle_exception(error)
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 520, in _handle_exception
    self._adapt_connection._handle_exception(error)
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 810, in _handle_exception
    raise error
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/sqlalchemy/dialects/postgresql/asyncpg.py", line 557, in _prepare_and_execute
    self._rows = await prepared_stmt.fetch(*parameters)
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/asyncpg/prepared_stmt.py", line 176, in fetch
    data = await self.__bind_execute(args, 0, timeout)
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/asyncpg/prepared_stmt.py", line 241, in __bind_execute
    data, status, _ = await self.__do_execute(
  File "/somewhere/.cache/pypoetry/virtualenvs/fractal-server-cyevISt_-py3.10/lib/python3.10/site-packages/asyncpg/prepared_stmt.py", line 230, in __do_execute
    return await executor(protocol)
  File "asyncpg/protocol/protocol.pyx", line 207, in bind_execute
  File "asyncpg/protocol/coreproto.pyx", line 70, in asyncpg.protocol.protocol.CoreProtocol._read_server_messages
  File "asyncpg/protocol/coreproto.pyx", line 225, in asyncpg.protocol.protocol.CoreProtocol._process__bind_execute
  File "asyncpg/protocol/coreproto.pyx", line 518, in asyncpg.protocol.protocol.CoreProtocol._parse_data_msgs
  File "asyncpg/protocol/protocol.pyx", line 839, in asyncpg.protocol.protocol.BaseProtocol._decode_row
  File "asyncpg/protocol/prepared_stmt.pyx", line 328, in asyncpg.protocol.protocol.PreparedStatementState._decode_row
  File "asyncpg/protocol/codecs/base.pyx", line 330, in asyncpg.protocol.protocol.Codec.decode
  File "asyncpg/protocol/codecs/base.pyx", line 230, in asyncpg.protocol.protocol.Codec.decode_scalar
  File "asyncpg/pgproto/./codecs/datetime.pyx", line 247, in asyncpg.pgproto.pgproto.timestamptz_decode
OverflowError: date value out of range

ERROR:    Application startup failed. Exiting.

I cannot reproduce this anymore (with 1.4.2a1), closing for now.

I can now reproduce again (something was wrong in my tests yesterday).
I'm re-opening and continuing on #1134.


Create Feature Card 25 Blue

One need to make this component using HTML and Tailwind CSS. I would suggest to use Tailwind Playgrounds to make things faster and quicker.
Here is a reference to the component.

Follow Feature Cards Design system &  figma design and to make the button use Button Design System
After building the component please raise a PR with a screenshot of the component and add the component in Feature Cards/src/feature-card-25-blue.html.
If you need to use any icon please use it from Hero Icons
Good luck.

hi I would work on it can u plz assign me this issue #jwoc


Getting started: see more opens a quick pick with duplicated entries

Clicking on the See More opens the quick pick, which is a very strange experience since there are duplicates from what is already displayed, everything should be inlined and clicking on the See More should just open more boxes below the button. If we plan to have just one more option I think it should just be there, and not have a see more at all. But I guess we might introduce more things...
Bonus bug: do not call these castion "See More", some users do not "see"  so it might not be a good choice. I would instead name it "More..."

Updated wording to "Show All", because you are correct that all we can do is show the items, we have no control over whether the user sees them.
Also using "All" does not imply that the items will not be duplicated (as "More" might), as I do want to keep using the quick pick to both be consistant with what happens when there's no items at all showing (link at bottom of page to open the same quick pick), and the Welcome: Open Getting Started Page... command, which also uses the same quick pick. Also quick pick provides some nice filtering capabilities.


WIP: File database refactor

Primary changes in this Pull Request:

Remove root_directory from FileDatabase model.
Add root_directory as argument to FileDatabaseClient constructor and new factory method.
The root_directory is now stored on the FileDatabaseClient.
Added argument for FileDatabaseClient on FileCollectionClient constructor and new factory method (needed to resolve it's path).
Updated other methods on the clients as needed.
Move clients into the same file to address circular import issue (they both depend on each other).
Missed one case of passing file_database_client to FileCollectionClient constructor.
Move file_database_client.py to services and rename file_database.py (separate the clients/api from the model logic and discourage use of the model classes directly).
Fixed broken tests and added new tests for new properties.

Please review the checklist before submitting the Pull Request:

[ ] Pull request has a meaning full name (not just the commit message from of your last commit)
[ ] Code has been linted using flake8
[ ] All methods have accurate Google-Style Docstrings
[ ] 100% test coverage for new content
[ ] Tests for each common use case (please don't write one test that covers all use cases)
[ ] Bonus: Use TypeHints

Explain deviations from original design if applicable:

@gagelarsen wait to review until I've migrated the adapter and app.

@gagelarsen wait to review until I've migrated the adapter and app.


ReduceLROnPlateau scheduler, checking multiple times per epoch

I'm training a model on a very large amount of data, where we evaluate multiple times per epoch. The best performing and most general learning rate scheduler for our domain is the ReduceLROnPlateau scheduler.
I'd like to use Lightning to allow relatively simple multi-gpu training. However, it looks like when you use the ReduceLROnPlateau scheduler, you can either only evaluate at the end of an epoch (not frequently enough) or every training batch where you only have access to training metrics not validation scores.
Is there a simple way to accomplish what I want? Thanks!

It was discussed here:
https://github.com/PyTorchLightning/pytorch-lightning/issues/1156
Conclusion:
Set val_check_interval to how often you want to evaluate (lets say every 50 step)
trainer = Trainer(val_check_interval=50)
Initialize scheduler with the frequency argument. It should be a larger number than your validation frequency:
scheduler = {
    'schduler': ReduceLROnPlateau(optimizer, mode, factor, patience),
    'interval': 'step',
    'frequency': 100
}

This will run validation loop every 50 step and call the scheduler every 100 step.

https://github.com/PyTorchLightning/pytorch-lightning/pull/7032/files#r632921255 contains a useful hint:

If someone wants it to align it with validation, they can set scheduler['frequency'] = check_val_every_n_epoch.


Rmsynth 3D returning zero output

Hello,
This is not exactly an issue with RMsynth but some unexpected output I don't know how to interpret.
I am using RMsynth3D on a set of fits files for a target (T200) in my dataset. I am using stokes I,Q and U cubes as input. Image is 100x100 pixels in size. When I run rmsynth3D with the necessary freq file on this target it runs with no major errors and seems to finish. The output FDF_tot_dirty image is just a blank image with 0 value. hen I try to open the image I get the message saying it has bad data, i.e, maxis not geater than min as max=min=0.
I am attaching a screenshot showing the rmsynth log and the consecutive attempt to open the image.
I do not have this problem with my other target(C215). I am trying to understand why this is happening. For T200 there is almost no signal in the Q channel cubes, the U images however have a strong signal. For C215 there is a strong signal in both Q and U, could this be a reason why RMsynth seems to be unable to process the T200 cubes?
Your insight would be really helpful!

Hi @Jaswanth-Jza:
That's definitely strange behaviour. Since it looks like your (frequency) cubes are fairly small, would you be willing to email them to me (along with the frequency file). That'll make it easier for me to diagnose what's going on. Please send them to<EMAIL_ADDRESS>Cheers,
Cameron

Thank you for your quick response! I just emailed the files to you!

Hi Jaswanth:
Thanks for the files. I've taken a look, and I at least partially understand the issue. The cause seems to be the use of the Stokes I cube. It's not intended that rmsynth3d should be fed an observed Stokes I cube, because those values are used directly for dividing Stokes Q and U and the observed cubes are typically very noisy (this is not very well explained in the documentation; I will improve that). I haven't tracked down the exact reason why the Stokes I cube is causing the outputs to be zeros -- I'll do that soon because there's probably an interesting bug hidden in there -- but I have found that not using the I cube does solve the problem.
The intended usage is to either not incorporate the Stokes I information (just using Q and U), or to use a Stokes I model. There is a tool for creating Stokes I model cubes: rmtools_fitIcube aka RMtools_3D/do_fitIcube.py. This tool can generate a smooth Stokes I model cube given an observed cube. I did find a bug in that script when testing it with your data -- I've released an update here on the Github, but not to Pypy.  Something like: rmtools_fitIcube T200324_I_ncell30_cube_masked.fits Ncell30_FREQ_T200324.dat -p -2 -o model_ -v should work. I've confirmed that if you run rmsynth3d either with no Stokes I cube, or with the model cube, the outputs look reasonable.
As a side note, you've set your Faraday depth sampling (-d option) very small, which increases compute time and output size considerably. Given that your data produces an RMSF of over 400 rad/m2, you don't really need a sampling smaller than 20 rad/m^2. Even a much coarser value like 50 would probably be fine.
Cheers,
Cameron

Hello Cameron,
Thank you! I will try the sokes I model cube, I did not try it without stokes I but I need to do it and the model methods helps me with this.
Thanks again for giving me a solution for this issue!

I've figured out why the output FDF cubes are completely zeros, so I'm going to make some notes here for my own future reference:
When a Stokes I cube is supplied, after RM synthesis it uses the value of Stokes I at lambda^2_0 to re-normalize the FDF cube into the same units as Stokes IQU. Jaswanth's data has an unusual property: the Stokes I cube has two zeroed out channels right in the middle, so when the code goes to re-normalize, it interpolates between those channels (interpolating between 0 and 0, haha), then multiplies the FDF cube by that value (producing the zero cube).
It's quite unexpected. I don't expect this to come up again, so I'm not prioritizing any changes to the code. I suppose the simple solution is that users shouldn't be putting in cubes with completely blank channels (in principle, if it's a Stokes I model and not data with missing channels, this shouldn't happen either). I need to go back and make the documentation more clear that Stokes I cubes must be models, not data...


Update setup_opencv.sh to work on Fedora Linux

@googlebot I signed it!

Thanks for reporting this. Fixed in our internal code base upstream, and will be pushed to GitHub in the next release.

Thank you @jiuqiant

Merged in https://github.com/google/mediapipe/commit/6abec128edd6d037e1a988605a59957c22f1e967.


Getting Error: Error not specified. on getSubscriptions

Please use the Discussion board if you want to get some help. Please use issues to report bugs.

Description
using latest version, i get [Error: Error not specified.] when calling (key is the app_public_key)
useEffect(() => {
    const loadData = async () => {
      setLoading(true);
      try {
        await initConnection(key);
        const subs = await getSubscriptions({ skus: ['our_sku'] });

        console.log({ subs });

        setSubscriptions(subs);
      } catch (e) {
        console.log({ e });
        setError(e);
      } finally {
        setLoading(false);
      }
    };

    loadData();
  }, []);

Expected Behavior
I expect to get the sku details
Screenshots

Environment:

react-native-iap: 12.7.2
react-native: react-native-tvos@latest
Platforms (iOS, Android, emulator, simulator, device): FireTV Stick

To Reproduce
Steps to reproduce the behavior:

Go to '...'
Press '...'
Error '...' is shown

[Optional] Additional Context

@lbusz Did you manage to solve your issue? It was working for me and now for some unkown reason I have the same error as you.

For reference, I typed "adb shell setprop debug.amazon.sandboxmode debug" and it started working.

Perhaps the adb shell setprop debug.amazon.sandboxmode debug command belongs in the docs somewhere? Worked for me as well.

Hello all @lbusz @Pingou  @curiousdustin
For me, it was working fine when I am testing with sandbox (App tester) but when I will submit for live app testing and download from live app testing it gives me an error: Error not specified
My in-app product SKU is in live mode.
Please help me to fix it.
Thank you.


Using Postgres instead of SQlite

I have been evaluating many Database Management + Spreadsheet tools over the years. This is by far the best.
The only issue i have come across so far is the inability to use Postgres as a backend. This adds friction in the path of using other tools such as Knime or PyGWalker, DTALL for python for Data exploration and analysis.
Is there a method where its possible to use postgres as the database as opposed to sqlite?
Thank you for this brilliant piece of software

If you're talking about querying data inside documents using Postgresql, you may take a look at pgloader:
https://pgloader.readthedocs.io/en/latest/
Though it I am not sure whether it would work perfectly without any tweaks.
But can't you use these tools with sqlite? Knime seem to have a sqlite connector.

I guess what he means is that his data already stored in pg. It is silly to export those data to sqlite, modify in grist and then import back to pg. Please keep in mind that data in pg might be modified any time by multiple user. How will you implement transaction and lock on this "export-import" window?
If a pg cluster has been setup and running, you really don't want to use sqlite after enjoying the benefits of high thought-put, multiple user ready(because of transaction and lock), HA, WAL and a lot more. Sqlite is more suitable for POC or hobby projects.
I use Sqlite too, but supporting PG natively will make this software a lot more useful, especially for dev. Think about how many existed system already use PG and how many devs don't want to write a frontend for those non-technical users. ;)

There is an interesting possibility of creating a Grist-like product that's just a UI layer for a database like pg. What's relatively painless to imagine is a product that does not support formulas, and does not support real-time updates (if you want to see changes made to a database by someone other than you, you need to refresh the page). These are fairly key features of Grist as it is normally used, but I can see usefulness without them.
If looking longer-term, there is also a possibility of keeping these features, but that would make this a much harder project. I'll note also that this larger ambition would overlap substantially with another large project to support Grist for larger data (https://github.com/gristlabs/grist-core/issues/43).

I only just found Grist, but so far it seems to be pretty much exactly what we were looking for! However, all of our data is in Postgres...
This database federates a bunch of data sources using foreign data wrappers. It'd be amazing if we could one day use Grist to make this data easily visible and manageable for non-technical users.

Would like that. Also firebird.


Heretic rituals radial menu

About the PR
Adds radial menu to select ritual you need.
Why / Balance
It's much easier to select needed ritual that way.
Media
https://github.com/user-attachments/assets/3d3c58e5-ab7e-40fd-b204-3112dcb3f4df
Requirements

[X] I have read and am following the Pull Request and Changelog Guidelines.
[X] I have added media to this PR or it does not require an ingame showcase.

Summary by CodeRabbit

New Features

Introduced a new user interface for heretic rituals, including a radial menu for easier interaction.
Added several heretic rituals with associated icons for visual representation in the game.
Implemented real-time updates for heretic rituals, enhancing user experience and interaction.
Added an embedded resource for the radial menu's XAML layout.
Enhanced ritual selection process with a user interface for improved user interaction.

Bug Fixes

Improved synchronization of ritual knowledge between server and client.

Documentation

Added structured attributions for texture files used in the project, ensuring proper credit for assets.

he figured out the radial menu :goberserk:

@BombasterDS can you please use whatever icon is in the knowledge store instead? becoz this is plain file copying that does nothing but decrease space on my dying hard drive

also please teach me how to do radial menus and my life is yours!!!

@BombasterDS ping

watch this somehow delete the station upon succesful ritual


Solicit some feedback

@lawrence-dol @barneycarroll @isiahmeadows @pygy @mindeavor @stevenvachon @kuraga @Zolmeister @ciscoheat
Hi guys, thought you may find this interesting....
I've been evaluating isomorphic, component-based, pure-js-template vdom frameworks for a while and something about each one didn't feel "right" to me. For Mithril, it was the somewhat odd MVC terminology/architecture [1], the always-global redraw and speed was not always great. Afterwards I evaluated domchanger, which was small and minimal, but it too was somewhat slow and the component architecture was close, but still didnt feel quite right [2]. Other issues still with virtual-dom. I looked at the blazing fast Inferno and Cito but didn't quite like the verbosity.
[1] https://github.com/lhorie/mithril.js/issues/499
[2] https://github.com/creationix/domchanger/issues/5
So I did what any self-respecting coder suffering from NIH syndrome would do: I wrote yet another vdom lib. It's an interesting mix of ideas from different frameworks and it's near cito in terms of perf on dbmonster and speedtest (see /test/bench). The docs are still a work in progress, but the main API can be seen in the README of this repo. I'm finishing up implementing some of the good ideas from Mithril for magic auto-redraw (m.prop, m.withAttr, m.request) on top of the core. The plan is to leave the Promise and ajax/fetch implementation up to the end user, but add support for handling promises if provided by the user where it makes sense. Routing is also open to evaluation.
The focus has been speed, isomorphism, concise templates, isolated components, minimizing domain-to-view coupling or having to impose a specific structure onto domain models.
DBmonster demo: http://leeoniya.github.io/domvm/test/bench/dbmonster/
I would appreciate some feedback if any of you are interested and have time to test it out, otherwise please ignore/unsubscribe from this thread :) Feel free to ask any questions about how to accomplish specific tasks.
Here's a quick demo of how to compose multiple components and perform independent sub-view redraw. Note that this is just one example, but you don't need create models via constructor functions, they can be plain objects or arrays as well - the coupling can be even looser and external to the models entirely. Nor are models limited to a single view, you can create as many views of a single model as you required and compose those as needed.
Code below also on jsfiddle: https://jsfiddle.net/0Lt4kzLt/
// domain model/data
function List(items) {
	this.items = items;

	this.view = [ListView, this];	// minimal view coupling: [viewFn, model/ctx, _key]
}

// view
function ListView(vm, list, _key) {
	// any view state can be stored in this closure, it executes once on init

	// export the vm back to the model so `vm.redraw()` etc can be invoked from
	// outside this closure. not required but you'll usually want to.
	list.vm = vm;

	return {
		render: function() {
			return ["ul", list.items.map(function(item) {
				return item.view;
			})];
		}
	}
}

function Item(name, qty) {
	this.name = name;
	this.qty = qty;

	this.view = [ItemView, this];
}

function ItemView(vm, item, _key) {
	item.vm = vm;
	return {
		render: function() {
			return ["li", [
				["strong", item.name],
				" ",
				["em", item.qty],
			]];
		}
	}
}

var items = [
	new Item("a", 5),
	new Item("b", 10),
	new Item("c", 25),
];

var myList = new List(items);

// this root function inits and returns the vm of the top-level view but since
// we also export it to <model>.vm, we don't need to use this returned one
var vm = domvm(myList.view);

// append it to a container
myList.vm.mount(document.body);

// now we can modify an item and redraw just that item
setTimeout(function() {
	myList.items[0].qty += 10;
	myList.items[0].vm.redraw();
}, 1000);

// or remove one, add a couple, mod some and redraw everything
setTimeout(function() {
	myList.items.shift();

	myList.items.push(
		new Item("foo", 3),
		new Item("bar", 66)
	);

	myList.items[0].name = "moo";
	myList.items[1].qty = 99;

	myList.vm.redraw();
}, 3000);

cheers!
Leon

There are definitely some interesting ideas here. I like simplicity a lot, there is almost no magic to it.
I would recommend looking at how Zorium (specifically Zorium Seed uses a component model.
Also if you're curious, our companies website (all Zorium) is public sourced here: https://github.com/claydotio/supernova

Cool. Keep that performance coming!

@stevenvachon I think I've picked most of the low-hanging fruit for this design/api. If you find a good perf improvement that doesn't break the diffing/patching tests, please let me know! domvm will never be as fast as Inferno because it makes speed trade-offs to accommodate the flexible and thin API I've chosen. That being said, domvm is more than fast enough for any real-life SPA that doesn't first suffer from other fundamentally flawed and slow design decisions. In addition, there are ways to optimize specific cases above an beyond isolating sub-component redraw, but they will be added to the very bottom of the docs later since using them would truly be premature optimization in 99.95% of cases. I have no intention of developing this lib primarily around synthetic benchmarks :)

The focus has been speed, isomorphism, concise templates, isolated components, minimizing domain-to-view coupling or having to impose a specific structure onto domain models.

After writing the Rediscovering MVC article, I'm a bit sad to see the focus on structure (vm), decoupling and performance (even though there are no performance problems), instead of users, architecture and aligning the computer with the way the users are thinking.

Local apps with lots of data can quickly turn "synthetic" into "real-life".

@ciscoheat if you look at the api of domvm, the vm is simply the necessary abstraction layer between the real dom and the template defined by the user - a layer that exists in some form in any architecture where the domain models and domain api is independent of the multitude of views which can be used as UIs to interact with the former.
domvm does not enforce a specific architecture on your existing code. in fact, you can take any codebase and very quickly develop a fast ui for it with no major restructuring. this cannot be said for view frameworks that enforce class or component inheritance, string-based templates, and a bunch of wiring and boilerplate.
the ultra loose coupling of domvm frees you to compose any MV* architecture that you can imagine. perhaps my use of the term vm is not quite what you're imagining.
pure patterns such as MVC often do not make sense where many responsibilities are fungible and so intimately linked. frequently the "C" is just a concept to describe the collection of event handlers which you define in your templates/views.
for what it's worth, domvm is exactly the mental model i've wanted to be expressable. rather than reading the goals, take a look at the code :)
thanks for your input!

I'm interested, but absolutely swamped with an international release. I'm also pretty invested in Mithril, but not so much so that I wouldn't switch for a cleaner conceptualization of the space.
I think a similar abstraction (or even a drop-in replacement) for Mithril's request is a must have; I've found it makes API interaction very clean and a network API is an essential part of almost any SPA.
I'll certainly take a look over the Christmas break if I don't end up with an avalanche of support requests on the software about to be pushed to production.

@stevenvachon i don't disagree with you in general. however, you would need not just many thousands of dom nodes, but all of them updating rapidly to see real-life performance issues. something like this really only occurs in animation, for which any VDOM framework is a terrible solution.
perhaps with huge infinitely scrolling lists that can accumulate enormous amounts of dom nodes, but even in those cases you dont need to redraw/diff the entire dom if you want the best perf.
my point is, there's no realistic application that will include a dbmonster table. if you need something like this you would simply use Canvas, WebGL, SVG and a dedicated lib, bit not the DOM.
domvm is faster than many frameworks already used for huge apps, including Mithril, React, Ember, etc. So at this time i am not concerned that it won't be able to handle 99.95% of what you throw at it.

@leeoniya I'm happy to give some input. So why do you want to mix data objects (the form of your system) with a mental model that doesn't apply to users? There is no abstraction layer required on this level if you accept that the View is an object, and the same as the vm. And of course I looked at the code, but I cannot see that it is simpler than the ES6 code in the example from @barneycarroll here: https://github.com/lhorie/mithril.js/issues/499#issuecomment-166384107
I cannot say it better than in the article, especially about the coupling:

This means that we can couple MVC objects because they aren't on the actual level of being reusable. We should rather embrace the natural coupling to create small, efficient objects that are easy to understand, using terms based on the end-user mental models.

If you rather prefer to focus on performance, decoupling and things that don't make sense to the user on this level of coding, I think my input is finished...!

I'm definitely interested if you're committed to keeping small, focused, and free of "tooling" to build (IOW, I don't have to download NodeJS and 200 dependencies to contribute). And if you employ strict semicolons so that minimization is simple and doesn't need a language-parsing tool.
I already like that you're using closure-based modules. How about adding "use strict" to the top of them?
Stylistically I'd comment that not using { } for all conditionals is a really bad idea.
My $2 (inflation).

@ciscoheat that proposal looks nice. i do have some questions about it though.

since the view function simply returns a template that compiles to a vnode, how would someone invoke a redraw of the component externally, independent of the rest of the structure?
also, the example does not show component nesting, how would you nest components within the template returned by view and how would you have control over those redraws?

If you rather prefer to focus on performance, decoupling and things that don't make sense to the user on this level of coding, I think my input is finished...!

i think you're missing the fact that domvm does not enforce coupling, nor does it enforce decoupling. by having a decoupled architecture, you can easily build a coupled system over it very easily, for example...
the same construction with domvm (closured/implicit model, integrated view) would look like this (with a couple one-liner tweaks to the codebase to accommodate concatenating arrays of children, like Mithril does now):
function Demo() {
	this.pages = Page.list();
}

Demo.prototype = {
	rotate : function() {
		this.pages().push(this.pages().shift());
	},

	view : function() {
		var self = this;
		return {
			render: function() {
				return ["div", [
					self.pages().map(function(page) {
						return ["a", {href: page.url}, page.title];
					}),
					["button", {onclick: self.rotate}, "Rotate links"]
				]];
			}
		}
	}
};

the one "meh" being var self = this, but this can be avoided by passing the model in during init: domvm(demo.view, demo), or from sub-view templates [demo.view, demo]. this will set the this inside the functions to the passed-in model.
it's not documented yet, but if all you're interested in is returning the render func, you can ditch the wrapping object:
Demo.prototype = {
	rotate : function() {
		this.pages().push(this.pages().shift());
	},

	view : function() {
		var self = this;
		return function() {
			return ["div", [
				self.pages().map(function(page) {
					return ["a", {href: page.url}, page.title];
				}),
				["button", {onclick: self.rotate}, "Rotate links"]
			]];
		}
	}
};

@lawrence-dol

I'm definitely interested if you're committed to keeping small, focused, and free of "tooling" to build (IOW, I don't have to download NodeJS and 200 dependencies to contribute).

No tooling, no deps. just clone and code.

And if you employ strict semicolons so that minimization is simple and doesn't need a language-parsing tool. I already like that you're using closure-based modules. How about adding "use strict" to the top of them?

Sound like easy first contribs to me, pull requests welcome ;)

Stylistically I'd comment that not using { } for all conditionals is a really bad idea.

I like dense code and rely on indentation to keep things civilized. Not sure I'm willing to add 20% to my scrolling effort for pedantic linting. Not yet anyways.

My $2 (inflation).

lawl, keep your $1.98 change, sir.

@ciscoheat here's that proposal implemented in domvm pretty much verbatim:
https://jsfiddle.net/o33zj6fj/

Interesting! I'll need time to play with this (which I won't find in the next week) but my first impressions are:

You're the first person to use 'vm' in a way that's internally coherent. It's a model of the view, ie a virtual DOM structure. Gratified somebody finally used this term without giving me a cognitive seizure.
Well done for developing a construct that is so terse and yet pretty much self-contained, ie able to get hooks for individual component redraws / last rendered view / etc. This provides a nice usable library middle ground between benevolent dictator framework (Mithril) and practically unusable tool (Cito).
Having said that, the demo app looks incredibly ad-hoc in its structure: the author ends up having to do a lot of wiring objects up to each other and passing abstract references about.
Interested you chose to roll your own new virtual DOM notation (or is that JSONML?) — what were the motivations?

A while back I was toying with writing a library which used Mithril for virtual DOM construction and Cito for diff & patch. The goals seem similar to yours: reinvent the component atom to enable greater author independence (specifically, not being bound to one gigantic declarative application tree view, and being able to control the draw step on a granular level). I ended up stuck on trying to create my ideal component API that provided all the necessary hooks (more than Mithril provides) while retaining a simple syntax optimised for declarative use. Again, kudos for actually implementing this — but I feel this API does suffer in terms of idiomatic declarative composition: your component structure allows greater flexibility, at the expense of the author having to wire things up in a combination of declarative and imperative code that isn't intuitive to read. Still, you're not forcing people to write separate controller methods to rely on them being magically bound by some invisible internal process - that kind of explicitness could be seen as an advantage. Was there much back-and-forth in your development of an acceptable combination of declarative and imperative application code?
Couple of suggestions:

Models with view attributes really confused my understanding of the library's model on my first reading. The idea that domain specific model classes would have built-in references to library-specific view code seems contrived, and at first I thought this was an inverted control variation on the render method. For my money it really doesn't help to have the examples structured this way — wouldn't the code end up simpler with a separation of domain-specific model code and library-specific view code?
Where are the author-specified DOM references retrieved? As properties on the vm?
I have a table of shares / scores leaderboard / other dynamic list. A parent view maps over this list with a child view whenever it mutates. I would like to be able to run an animation on an item's DOM before it disappears as a result of DOM patching. How? ;P

BTW I think you're misunderstanding Andreas' 'user'. You're talking about abstractions JS MVC developers have come to resign themselves to when talking shop; he's talking about abstractions that make sense to the application end users.

@leeoniya sorry to follow up one essay with another in short succession. WRT your questions about my proposal for an alternative Mithril component structure:

since the view function simply returns a template that compiles to a vnode, how would someone invoke a redraw of the component externally, independent of the rest of the structure?
also, the example does not show component nesting, how would you nest components within the template returned by view and how would you have control over those redraws?

These are designed as a drop-in syntactic replacement for Mithril, which doesn't offer granular redraw, so those hooks are absent. Mithril does make assumptions about what it calls the 'controller' (and I propose we call the 'component instance' - this in those code samples) — namely in that onunload properties attached to them are a lifecycle hook to be interpreted and executed by the library. This is in the same vein as your after (React's componentDidMount, Ember's didInsetElement, Mithril's config — interpreted by the library). According to my model, this would appear to be the natural host object for the references bound by the library and consumed at will by the author, like vm.
Crucially, both our models allow the author references to:

Library-defined & controlled instance code, ie all our view notation & lifecycle event hooks
Author-defined & controlled instance state, ie closured component data
Data passed in from a higher-order source

A problem I think we're both trying to address is that existing solutions are either not clear enough in their distinctions between these things, or are verbose & convoluted in referencing them, or (most often) both.
I catered for 1 with this, a reference you never need to see if your component doesn't have those concerns; 2 catered for by a closure — again, something that need never be written if it's not wanted; 3 as the arguments passed in to the constructor (on initialisation) and the view (on every draw). domvm shares an infraction with Mithril in having all of these things received by the variadic (?) view/render function signature. According to my model, the view signature matches exactly what the author specified in the component calling code, and author and library state objects never need to be mashed together.

@barneycarroll

i. Having said that, the demo app looks incredibly ad-hoc in its structure: the author ends up having to do a lot of wiring objects up to each other and passing abstract references about.

Perhaps you can elaborate on the specifics. There's not much wiring in that example, but also no magic (other than "this" being bound to the model in various function contexts, which i just added to accomodate the proposed usage pattern). Either way, domvm's flexibility isn't 100% free, it's just 90% off :)

Interested you chose to roll your own new virtual DOM notation (or is that JSONML?) — what were the motivations?

It's JSON-ML inspired, except that the children are explicitly wrapped in arrays rather than being "remaining args". While it's a bit more bracey, there is much less ambiguity given how nodes can be defined and no invokation of de-opt and lengthy sillyness like Array.prototype.slice.apply(arguments). In addition there's no need for doing concat/spread logic in the template definition, etc. If you look at the README/Template Cheat sheet, you'll see why pure json-ml wouldnt work - the structure needs to host more than just DOM node defs, including standalone text nodes and subview defs in various flexible forms that JSON-ML would not be able to accomodate.

Was there much back-and-forth in your development of an acceptable combination of declarative and imperative application code?

I took a lot of inspiration from domchanger's API. At first I thought I had found the holy grail of vdom APIs (as I've imagined them), but then it turned out it required some closure gymnastics (tm) to get the decoupling I was looking for. I tried to patch it, but then the internal diffing strategy and naming didnt make much sense to me, then i benched it on dbmonster and it became clear I was gonna frankenstein its API and start a-fresh. The only major re-work was recent to ensure that the wrapping closure only executes on init and not every redraw, as it does in domchanger - this is something I overlooked and had to rework a lot of the tree diff/reuse logic, but finally it is done.

Models with view attributes really confused my understanding of the library's model on my first reading. The idea that domain specific model classes would have built-in references to library-specific view code seems contrived, and at first I thought this was an inverted control variation on the render method. For my money it really doesn't help to have the examples structured this way — wouldn't the code end up simpler with a separation of domain-specific model code and library-specific view code?

Well, perhaps the first subview examples in the readme can be of the completely isolated flavor, but they are shown lower in the README as a fully decoupled option. There is actually an advantage to defining them inside the model closure in that they can be diffed very quickly do identify unkeyed components just via ===, though i'm struggling to figure out how you would discern the ad-hoc array created within a template vs one defined and static within a constructor. The clarity of this.view = [ChildView, this]; & children.map((kid) => kid.view) is IMO easier to grok for examples than children.map((kid) => [ChildView, kid]) in terms of understanding the required wiring. Although now as i write this i'm thinking the opposite :)

Where are the author-specified DOM references retrieved? As properties on the vm?

yes, vm.refs.*. and given that the refs array changes on every redraw as dom nodes are recycled, you should always access them directly and avoid storing the refs array (or god forbid references to the actual DOM nodes) externally expecting it to be static - it isnt.

I have a table of shares / scores leaderboard / other dynamic list. A parent view maps over this list with a child view whenever it mutates. I would like to be able to run an animation on an item's DOM before it disappears as a result of DOM patching. How? ;P

there's a cleanup that can be returned from the view, though it currently fires after the view is already removed from the DOM.
function SomeView(vm, model, _key) {		// fires on init
	return {
		render:		// fires on every redraw
		after:		// fires after every render/redraw and DOM is live. (usually operate on vm.refs here)
		cleanup:	// fires after destroy() - when the view is removed from the vtree (and dom)
		on: {}		// internal bubbled event system for emit()
	}
}

also, render() can accept arguments passed through from init or redraw(). more on this later...

@steve got me thinking about "real-life" performance claims.
I wrote a little snippet that allows for some objective measurements. The script, pasted into the console of any page of your choosing will convert document.body into a domvm template and dump it into the console. While it does the processing it will also console.log() the total node count, innerHTML length and JSON string length to compare payload size.

Do note that it ignores <script> and <style> nodes and strips all inter-tag leading and trailing spaces to avoid creating a bunch of useless indentation as text nodes - there's prolly some collateral damage that removes actual spaces, but the perf impact should be minimal.

Once you have the generated template, you can paste it into the provided demo page's source, open it and check the console to see the total time it takes domvm to render it.
The demo is preloaded with the current template scraped from http://techcrunch.com/
It takes around 100ms to generate the vtree & detached dom tree on my not-so-fast machine in Chrome and slightly slower in FF. Demo with scrape code:
https://gist.github.com/leeoniya/d9bfcf12a88c8261f19b
You can check the timings for everything and compare them to the actual TechCrunch page in Chrome's or FF's Devtools. There are a lot of factors to take into account, but I leave this dissection up to you guys.
I'm going to evaluate progressive loading at some point so that the render happens incrementally as it would if the it was normal html. This will make it appear more natural rather than blocking the whole 100ms and appearing all at once when the recursive DOM hydration returns back up to root and does the final appendChild(). This should actually be pretty easy to get working by moving a couple statements around. But would likely trigger many DOM re-layouts and might be slower in the end.
Need to test moar!

Tested it with gmail and it's appears to be around 130ms but horribly broken because there's a lot that depends on scripts etc. I would argue that Gmail is waaaaaay slower and heavier than it could/should be for that type of SPA. Fastmail is a good example of things done much faster.

@barneycarroll I started a wiki to throw around some ideas for how to best introduce possible domvm patterns.
https://github.com/leeoniya/domvm/wiki/Usage-Patterns
I think it addresses your initial confusion regarding the view/model integration. However, I want to avoid showing all possible patterns at the beginning of the README (premature cognitive overload).

I would use CSS transitions when adding and removing an element. How would an element's removal be delayed for a transition to complete itself? Or should this be handled in the view model?

I would use CSS transitions when adding and removing an element. How would an element's removal be delayed for a transition to complete itself? Or should this be handled in the view model?

this is still a bit of an open question. if the element is managed by domvm, then it absolutely should be handled, otherwise the dom would differ from the internal vdom and breakage would ensue.
animating on insertion should be easy, just use the after() to add the css transition to the ref'd node.
animating on removal is trickier. but i will add an unload() hook or similar that fires before dom cleanup and can return a promise that must be resolved when your animation completes. there are additional questions about locking the node from other pending redraws until the pending cleanup is done, etc. but there's a  lot of fragility there since resolving that promise is up to the user and not doing so will lock up the and screw the vdom.
need to think about it, but i currently dont see another good solution. i dunno what other libs do. need to research.

this is still a bit of an open question. if the element is managed by domvm, then it absolutely should be handled, otherwise the dom would differ from the internal vdom and breakage would ensue.
animating on insertion should be easy, just use the after() to add the css transition to the ref'd node.
animating on removal is trickier. but i will add an unload() hook or similar that fires before dom cleanup and can return a promise that must be resolved when your animation completes. there are additional questions about locking the node from other pending redraws until the pending cleanup is done, etc. but there's a  lot of fragility there since resolving that promise is up to the user and not doing so will lock up the and screw the vdom.
need to think about it, but i currently dont see another good solution. i dunno what other libs do. need to research.

possibly a better idea would be to return a delay duration from unload and have domvm wait for that amount of time, then do dom cleanup. that setup is less flexible but much less fragile.
also, after() should accept a list of removed, updated, deleted, inserted nodes. so that following any redraw() you could animate in/out. not just on full component init/destroy. this will eliminate the need to wrap everything in components.

possibly a better idea would be to return a delay duration from unload and have domvm wait for that amount of time, then do dom cleanup. that setup is less flexible but much less fragile.
also, after() should accept a list of removed, updated, deleted, inserted nodes. so that following any redraw() you could animate in/out. not just on full component init/destroy. this will eliminate the need to wrap everything in components.

Happy 2016!, hope no one got arrested.
Noticed the ongoing Riot vs Mithril perf discussion:
https://github.com/lhorie/mithril.js/issues/786
Made a quick domvm variant based on @tivac's<EMAIL_ADDRESS>Environment
UA: Chromium 49.0.2598.0
OS: Windows 10 x64
PC: Lenovo T440S
CPU: Core i5 4300U
GPU: Intel HD4400
Test
At 100% mutation rate:
<EMAIL_ADDRESS>http://tivac.github.io/js-repaint-perfs/mithril/
Repaint rate: 12/s
domvm@95df8c2b10ebb801b39fbfe74b92eca1b57e203c
http://leeoniya.github.io/js-repaint-perfs/domvm/
Repaint rate: 23/s

@leeoniya again, thanks for addressing my queries in such depth. My proposal regarding a separation of unique DOM nodes and component instances is a bit of a personal mania and as you say none of the major high level virtual DOM implementations cater for it, for legitimate reasons. As Leo once said, my explanation for Modulator's implementation differences to Mithril 0.2s component resolution logic was 'a wall of text' :)
It's interesting that we started on common ground WRT the arbitrary confusion of such terms as 'controller' & 'vm', yet it emerges that 'view models' are central to DOMVM and distinct in some regards to the idea of 'components'.
In any case, despite not being the biggest fan of the 'model-bound view' paradigm, I appreciate there's a distinct ideology behind it. At this point I am somewhat torn between DOMVM and Cito as the ideal candidate for writing my component implementation on top of: your lifecycle API hooks are more elegant and your VDOM notation much more succinct, but Cito's lower-level control over DOM diff & patch process (infinitely nestable, key-able fragments & granular control of which DOM nodes get patched with which view) is better suited to my megalomanic ideal of structural control.
WRT 'outgoing animations', might I suggest the onunload method allow the user to return either undefined (meaning they are simply using the hook to execute arbitrary teardown side-effects for state management) or a thennable, at which point DOMVM defers DOM patching to the resolution? I think this would be a more robust, flexible and simple implementation than providing a timer — which would mean duplication of animation logic at best (possibility for author error at worst), and would fit nicely with animation libraries that provide a resolution hook which — thereby authors are free to perform logic for variable or unspecified duration in their animations.

this thread is getting long and tiresome to scroll. those interested please continue in #3.


Add the LICENSE file

A LICENSE file with an OSI-approved license is required for continuing inclusion into the General registry.

If you look at this section of the code:
https://github.com/alan-turing-institute/MLJFlux.jl/blob/9e51bf121690c7e0498cd51b642e90150ac489eb/src/MLJFlux.jl#L23-L31
You'll see that it explicitly states that this package is under the MIT license.
Therefore, this pull request is not changing the license of this repository. Rather, it is just adding additional documentation of the license (MIT) that this repository already has.

closed in favour of https://github.com/alan-turing-institute/MLJFlux.jl/pull/80 which does the same thing


Enable/disable or Custom title for images

I wish there was an option to enable, disable or customize the titles of the images.Because if we show these pictures in the side by placing the pointer over an image bar it shows us a title that covers the entire page and looks unsightly

Sorry, not at this time… Added to future enhancements. Thanks!


New package: LinearMapsAA v0.1.0

Registering package: LinearMapsAA
Repository: https://github.com/JeffFessler/LinearMapsAA.jl
Created by: @JeffFessler
Version: v0.1.0
Commit: ce8b59a8cd029758368c7ac48aa9434032d3d03f
Reviewed by: @JeffFessler
Reference: https://github.com/JeffFessler/LinearMapsAA.jl/issues/1#issuecomment-522051781

Please add (at least)
[compat]
julia = "1"

to your project file and retrigger the bot.

Sorry about forgetting the compat line.  I added it now.
You probably get tired of making this reminder!  I wish that generate would put in a line by default based on the version of Julia that ran generate so that the line would be in there in the Project.toml file as a nudge to think about it!  I guess that's a feature request that belongs elsewhere...  Thanks!


1.0.0: coverage issue

I'm running tests for pyproject_fmt 1.0.0 and the coverage fails:
---------- coverage: platform sunos5, python 3.9.16-final-0 ----------
Name                               Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------------------------
tests/test_pyproject_toml_fmt.py      10      1      0      0    90%   16
------------------------------------------------------------------------------
TOTAL                                258      1     18      0    99%

8 files skipped due to complete coverage.
Coverage HTML written to dir $(BUILD_DIR)/.tox/py39/tmp/htmlcov
Coverage XML written to file $(BUILD_DIR)/.tox/coverage.py39.xml

FAIL Required test coverage of 100% not reached. Total coverage: 99.64%

I just found that I explicitly disabled one test and this caused the coverage issue.  Everything works as expected.  Sorry for noise.


Axios missing as a dependency in 1.0.4

In the release 1.0.4 Axios is missing in the dependency list so the whole package doesn't work

@emilsbee Thanks for informing us, we will look into this straight away.

@emilsbee,
This should be fixed now in v1.0.5.


wip: fix(dynamic-plugins): use segment as a dynamic plugin

Description
SSIA, makes segment frontend plugin dynamic
Which issue(s) does this PR fix
Requires https://github.com/janus-idp/backstage-plugins/pull/955, waiting for requirements to be met
PR acceptance criteria
Please make sure that the following steps are complete:

[ ] GitHub Actions are completed and successful
[ ] Unit Tests are updated and passing
[ ] E2E Tests are updated and passing
[ ] Documentation is updated if necessary (requirement for new features)
[ ] Add a screenshot if the change is UX/UI related

How to test changes / Special notes to the reviewer

Closing. Segment is meant to be removed for now.


use db2 connect driver but return an error

I have been installed db2 driver and use official command 'pip install ibm_db_sa' to install.
please tell me how to resolve it !

Looks like there are two ways to connect to DB2: https://superset.apache.org/docs/databases/ibm-db2/
Since this doesn't seem to be a bug (or at least a corroborated one), but more of a configuration issue, I'll close this as stale since it hasn't gotten attention for nearly a year. Please feel free to reach out on Slack or open a Discussion thread if this still needs revisiting. Thanks!


How to train a Gaussian model using a background-removed dataset?

Describe
I use the GS model to train the transparency dataset, but the trained background has many clouds.
Screenshots

Not my area of expertise, but https://github.com/nerfstudio-project/gsplat/pull/70 seems relevant!

thank you for your reply！
I will researching it

A fast but inelegant method is to directly inject white bg colour into GS model, I've test it with LEGO dataset in #2704. I think the main problem is that when training GS model the bg colour is ramdomly picked, we may need a alpha for the bg and add it into the BP and FP I think? https://github.com/nerfstudio-project/gsplat/pull/70 seems only apply alpha output to gaussians? but may immediately work with a little modification.

Yes, I currently use a white background to run training


Put certain dream team members in a position to enable or disable view & voting of dreams

So last year I had the ability to hide dream projects or to make them visibile, as well as to enable voting on the dream with dream tokens once the requirements were checked and there was a green light.
We need to implement that function again, unless you wish to enable every dream by hand, Florian ;). Ideally I find more poeple who wish to take on that task with me. :) These also need have their accounts enabled for that

This feature is there.
If you are an admin you can see all the dreams that don't have granting enabled. They have a lock in the upper right corner of the image in the overview.
If you go to the dream you have several options to approve them ( see screenshots attached )

User accounts can receive admin right by running this in the rails console:

User.find_by(email:"test@example.com").update(admin:true)

PS: @SaskiaFuzzy your account has admin rights now. Let @flov or me know if there is another account that needs to be admin.


DSWx-S1 algorithm parameter schema validation

The DSWx-S1 interface SAS defines two Yamale schema, one for the main SAS runconfig, and another for a separate "parameters" yaml config file. Part of the specific DSWx-S1 PGE functionality then needs to perform validation on this separate yaml file. The SAS section of the runconfig defines the location within the container of the separate config, and the "parameters" schema has been committed to the PGE repository under pge/dswx_s1/schema.
This ticket is to track implementation of the additional validation step to be performed after the main RunConfig has been validated by the logic in base_pge.py. Tasks include:

[x] Update the base_pge_schema.yaml to add a ParametersSchemaPath (or similar) to the PrimaryExecutable section of the schema. Note that this field must be configured as str(required=False) so we don't break backwards compatibility with all previous PGEs
[x] Implement a _validate_parameters_config (or similar) in the DSWxS1PreProcessorMixin class. Note that the function can be called after the super call in DSWxS1PreProcessorMixin.run_preprocessor. This method should perform the steps of reading the parameter schema location and parameter config locations from the RunConfig. Then it should read in the schema (via yamale.make_schema) and the parameter config (via yaml.safe_load), the perform the validation. The validate method of the RunConfig class is a good example of what needs to be done.
[x] Add/update unit tests for valid/invalid parameter config cases

Resolved by #269


Nylas causing xorg to hog cpu

When running Nylas Mail 2.0.32 (configured with 4 gmail accounts and no third party plugins) on my Ubuntu 16.04 LTS box, not only does it consume a high amount of CPU itself, it also causes xorg to do the same. Below is a screenshot of the low end of its CPU usage spectrum.

Here's the hardware I am running Ubuntu 16.04 LTS on:
Computer
Processor | 8x Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz
Memory | 16429MB
Operating System | Ubuntu 16.04.3 LTS
Display
Resolution | 1920x1080 pixels
OpenGL Renderer | GeForce 9600 GT/PCIe/SSE2
X11 Vendor | The X.Org Foundation
Any idea what it could be? A memory leak of sorts?
Thanks!

The repository seems to be no longer supported : see here, a fork is in development and looks promising.


[Feature] Improving Readme.md for Docker compose setup

Problem

The Docker Compose setup doesn't consist of all the steps in brief that one should do to set up a local working environment
Description
The steps present in the Readme for setting up a local development environment by forking and cloning the repository are incomplete. If one wants to setup an environment using a Command prompt or using VS Code integrated terminal or a Git bash client, these steps are not mentioned in the Readme.md file. I have correctly set up the local development environment and I had to go to the Internet to search for a few steps involved. Using this experience, I want to improve the documentation to contribute and help my fellow developers working on CC Resource Archive project.
Alternatives
Adding images to describe various steps can help a lot. I can use Scribe (https://scribehow.com/) to properly document the steps and create a step-by-step guide.
Implementation

[x] I would be interested in implementing this feature.

@Shivangbhatnagar237 this issue is quite similar to #125. If you have something different to add, You can leave it as a comment over there.

Sure, I've added the whole issue template to #125's comment.

@TimidRobot Actually I opened this issue, but @Lakshay-Pruthi and @Xaid-vfx told me to add the issue in the comments of #125

Hey @possumbilities, the suggestions for the amendments in the Readme include:

Adding complete steps informing what will happen (Install Docker and after installing, it will reboot your device)
Adding information (It requires Windows subsystem for linux, or wsl enabled and upgraded to the latest version)
Adding supporting info that might be required like wsl can be upgraded by the command wsl --update

Hey @possumbilities, changing the Readme file may help new contributors, are my suggestions for amendments all correct?

Hey @possumbilities, what are your views on this?

This is a duplicate of #125.

I believe, while the original Issue here is a bit off scope, the comment further in here merits consideration, to further clarify the documentation.:

Hey @possumbilities, the suggestions for the amendments in the Readme include:

Adding complete steps informing what will happen (Install Docker and after installing, it will reboot your device)
Adding information (It requires Windows subsystem for linux, or wsl enabled and upgraded to the latest version)
Adding supporting info that might be required like wsl can be upgraded by the command wsl --update in Windows Powershell

Hey, so can I work on this issue?

I believe, while the original Issue here is a bit off scope, the comment further in here merits consideration, to further clarify the documentation.:

Hey @possumbilities, the suggestions for the amendments in the Readme include:

Adding complete steps informing what will happen (Install Docker and after installing, it will reboot your device)
Adding information (It requires Windows subsystem for linux, or wsl enabled and upgraded to the latest version)
Adding supporting info that might be required like wsl can be upgraded by the command wsl --update in Windows Powershell


Checking for promises now implemented correctly for handler() method in ...

...mixins/views/submitting and runCustomValidations in mixins/controllers/saving

Sick. Published as 0.2.8.


dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'net.clusterhack.ArgonOne': no such name

Hey thanks for creating this, I just got it installed on ubuntu 20.04 but getting the following when i try to use it:
jimmyff@spritz:~$ argonctl speed
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 177, in activate_name_owner
    return self.get_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner
    return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'net.clusterhack.ArgonOne': no such name

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/argonctl", line 11, in <module>
    load_entry_point('argon1==0.1', 'console_scripts', 'argonctl')()
  File "/usr/lib/python3/dist-packages/argonone/cmdline.py", line 150, in argonctl_main
    with dbus_proxy() as dbus:
  File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/usr/lib/python3/dist-packages/argonone/__init__.py", line 627, in dbus_proxy
    proxy = system_bus.get_object('net.clusterhack.ArgonOne',
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object
    return self.ProxyObjectClass(self, bus_name, object_path,
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 250, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 182, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python3/dist-packages/dbus/bus.py", line 277, in start_service_by_name
    return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name net.clusterhack.ArgonOne was not provided by any .service files

Getting the same after a fresh install of Raspberry Pi OS and this tool. Found any solution?


help please comfyui prob 30/05/2024

Error occurred when executing Inference_Core_DWPreprocessor:
'NoneType' object has no attribute 'get_providers'
File "E:\STABLE DIFF\Packages\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "E:\STABLE DIFF\Packages\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "E:\STABLE DIFF\Packages\ComfyUI\custom_nodes\ComfyUI-0246\utils.py", line 381, in new_func
res_value = old_func(*final_args, **kwargs)
File "E:\STABLE DIFF\Packages\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "E:\STABLE DIFF\Packages\ComfyUI\custom_nodes\ComfyUI-Inference-Core-Nodes\src\inference_core_nodes\controlnet_preprocessors\node_wrappers\dwpose.py", line 72, in estimate_pose
model = DwposeDetector.from_pretrained(
File "E:\STABLE DIFF\Packages\ComfyUI\custom_nodes\ComfyUI-Inference-Core-Nodes\src\inference_core_nodes\controlnet_preprocessors\src\controlnet_aux\dwpose_init_.py", line 175, in from_pretrained
t = Wholebody(det_model_path, None, torchscript_device=torchscript_device)
File "E:\STABLE DIFF\Packages\ComfyUI\custom_nodes\ComfyUI-Inference-Core-Nodes\src\inference_core_nodes\controlnet_preprocessors\src\controlnet_aux\dwpose\wholebody.py", line 42, in init
print(f"Failed to load onnxruntime with {self.det.get_providers()}.\nPlease change EP_list in the config.yaml and restart ComfyUI")

Also have this issue. It happens with onnxruntime 1.18 and onnx 1.16.1.

merci , j'ai reussi a reinstalle tous mes noeud par azard


R2R, Single File and IL Link Trim support

Hi, do you have a roadmap of supporting new features from .NetCore 3?
I assume ReadyToRun may benefit general platform dependent script startup while Single File + Trimmed with the distribution of  units of exection that do not depend on host .Net framework.
Given that, i cannot stress to ask if you plan to publish nuget packages that will not depend on .NETCoreApp 2.1 runtime?

Looks like Single File feature is already here (0.50.2, I got it from Build Artifacts)
Also +1 to Trimmed option (/p:PublishTrimmed=true)

@SlowLogicBoy
According to various sources (e.g. Scott Hanselman) there's an IL Linker flag TrimmerRootAssembly specifying the assmeblies, types, methods that not need to be trimmed.
Given that, a trimmed script is feasible although it would cede the burden of describing the untrimmed atrifacts on an end user. So it's tricky.
But the R2R  feature comes hand in hand with single file as i believe it should speed up the CLR stratup since and general scipt execution time because .Net Core isn't the platform for running C#/F# code as scripts.
@filipw can you elaborate please if Ready To Run is expected anytime?