2.9.1 incompatibility with flask admin

We have jinja2 in Airflow and it throws an error that seems tied to our usage of flask-admin:
======================================================================
ERROR: test_dag_views (tests.WebUiTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/apache/incubator-airflow/tests/core.py", line 1423, in test_dag_views
    '/admin/airflow/graph?dag_id=example_bash_operator')
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/werkzeug/test.py", line 778, in get
    return self.open(*args, **kw)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/flask/testing.py", line 127, in open
    follow_redirects=follow_redirects)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/werkzeug/test.py", line 751, in open
    response = self.run_wsgi_app(environ, buffered=buffered)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/werkzeug/test.py", line 668, in run_wsgi_app
    rv = run_wsgi_app(self.application, environ, buffered=buffered)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/werkzeug/test.py", line 871, in run_wsgi_app
    app_rv = app(environ, start_response)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/flask/app.py", line 1994, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/flask/app.py", line 1985, in wsgi_app
    response = self.handle_exception(e)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/flask/app.py", line 1540, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/flask_admin/base.py", line 69, in inner
    return self._run_view(f, *args, **kwargs)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/flask_admin/base.py", line 368, in _run_view
    return fn(self, *args, **kwargs)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/flask_login.py", line 755, in decorated_view
    return func(*args, **kwargs)
  File "/home/travis/build/apache/incubator-airflow/airflow/www/utils.py", line 221, in view_func
    return f(*args, **kwargs)
  File "/home/travis/build/apache/incubator-airflow/airflow/www/utils.py", line 125, in wrapper
    return f(*args, **kwargs)
  File "/home/travis/build/apache/incubator-airflow/airflow/www/views.py", line 1438, in graph
    edges=json.dumps(edges, indent=2),)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/flask_admin/base.py", line 308, in render
    return render_template(template, **kwargs)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/flask/templating.py", line 134, in render_template
    context, ctx.app)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/flask/templating.py", line 116, in _render
    rv = template.render(context)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/travis/build/apache/incubator-airflow/airflow/www/templates/airflow/graph.html", line 19, in top-level template code
    {% import 'admin/lib.html' as lib with context %}
  File "/home/travis/build/apache/incubator-airflow/.tox/py27-cdh-airflow_backend_sqlite/lib/python2.7/site-packages/jinja2/environment.py", line 551, in _compile
    return compile(source, filename, 'exec')
SyntaxError: duplicate argument 'l_1_caller' in function definition (lib.html, line 255)

Looks like a regression. Until it's fixed I'd recommend requiring jinja2<2.9 in your package requirements

We are now. Thanks.

Would it be possible to get a minimal repro case for this?

Found a minimal repo. Interesting that this worked before:
{% macro x(caller=none) -%}
    [{% if caller %}{{ caller() }}{% endif %}]
{%- endmacro %}

{{ x() }}
{% call x() %}aha!{% endcall %}

Going to investigate what this did.

isn't that caller=none arg pointless anyway? caller is already none (or undefined?) when no caller is being used

@ThiefMaster it's undefined and yes. I assume the correct behavior will be to just silently ignore caller here. However I wonder if you could set it to a different default before.

Eg. Could you do {% macro x(caller=42) %}...{% endmacro %}.

sounds like something that should at least trigger a warning

So you could define a default in the past but only if caller was the last argument I think. If you did {% macro x(caller, foo, bar) %} then it would fail when used with {% call %}.

So turns out this is common. https://github.com/search?q="{%25+macro+"+"caller%3Dnone"&type=Code&utf8=✓

Not sure if that change is good enough to cover all cases but this is a change I am willing to make. This at least gives it a clear behavior now.

That was quick! Thanks, will verify our own code whether we do something "unexpected".


pvdaq io functions

[X] Closes issue #663
[X] I am familiar with the contributing guidelines.
[ ] Fully tested. Added and/or modified tests to ensure correct behavior for all reasonable inputs. Tests (usually) must pass on the TravisCI and Appveyor testing services.
[ ] Updates entries to docs/sphinx/source/api.rst for API changes.
[ ] Adds description and name entries in the appropriate docs/sphinx/source/whatsnew file for all changes.
[x] Code quality and style is sufficient. Passes LGTM and SticklerCI checks.
[ ] New code is fully documented. Includes sphinx/numpydoc compliant docstrings and comments in the code where necessary.
[ ] Pull request is nearly complete and ready for detailed review.

Brief description of the problem and proposed solution (if not already fully described in the issue linked to above): Functions for making data requests to NREL's PVDAQ API. I'm using the year CSV file API, which is the most efficient way of obtaining multi-year, sub-hourly data.

I will fix the lint errors. Other suggestions on what to complete before this can be merged are appreciated. Thanks!

Also, this function relies on requests. What should I do to capture that dependency?

Maybe take a quick look at the other iotools to see how they handle dependencies?

Thanks @bmeyers!
I think requests is already pulled into our test environments for another package. It's probably ok to make it an explicit requirement. The tmy module calls on urllib and I'd be happy to replace that with requests if it's an explicit dependency.
Please add get_pvdaq_data to https://github.com/pvlib/pvlib-python/blob/master/pvlib/iotools/init.py
Have you considered any simple methods for testing? It's not necessary to test the live connection, but it's good to assert that the format is read in the way you expect it to be on a very short file.
The progress bar is interesting. Do you know how it behaves in the different environments that are often used by pvlib community (python terminal, ipython terminal, notebooks, scripts w/ w/o logging)?

The standardize_time_axis function could have use outside the pvdaq.  What does the group think about an iotools.util module?

@wholmgren:
For testing, I could see two options. (1) Test the standardize_time_axis function on a small, minimal test data frame, generated by code, or (2) test a live connection using the DEMO_KEY. Do you have a preference?
The progress bar has been tested in python terminal, ipython terminal, notebooks, and with scripts. My understanding is that server logs will capture the output from the sys.stdout.write command, but I have not tested this. I also haven't tested server deployment without logging, but I believe that the sys.stdout.write command would have no effect.
Should I add the requests dependency to setup.py? Is it an "extra"?
@cwhanse:
Thanks! I'm happy to start a iotools.util module with this in it. The function is from this package I recently put together, and there might be some other nuggets in there that could start to fill out an iotools.util modules. Shall we make this part of the same PR?

The resampling part of standardize_time_axis could be useful in more situations, but I don't know if it should be applied by default.
What's the advantage of the set_index part of this function over calling the pandas functions directly? In my experience using to_datetime is either straightforward (single column in a format very close to ISO 8601) or a pain that is hard to generalize (e.g. #666).
For testing, we'd want a pvlib/test/test_pvdaq.py module that covers most if not all use cases. I'm trying to be less picky about code and test code in iotools to encourage more contributions. Testing small data files bundled in pvlib/data is usually preferable to testing network connections. Tests that need network connections should be wrapped in the pandas network decorator (see the test_tmy module for example).

Hi Will, you're right, I should have made the usage of standardize_time_axis user controllable. Just pushed a commit to do just that. I think having the default be True is nice, but I'm happy to change it if you'd rather the default behavior be not to apply the function.
The set_index makes the Date-Time column the axis for the data frame. This allow the usage of the reindex method later on when applying the standardized time index. What do you mean by calling pandas functions directly? I also rely on to_datetime for parsing the datetime strings. Is that a problem? I haven't hit a request with the PVDAQ API where that didn't work.
10-4 on testing.

What do you mean by calling pandas functions directly?

Hopefully the discussion below is more clear.
The first part of your function contains these lines to create a DatetimeIndex:
    # convert index to timeseries
    try:
        df[datetimekey] = pd.to_datetime(df[datetimekey])
        df.set_index('Date-Time', inplace=True)
    except KeyError:
        time_cols = [col for col in df.columns
                     if np.logical_or('Time' in col, 'time' in col)]
        key = time_cols[0]
        df[datetimekey] = pd.to_datetime(df[key])
        df.set_index(datetimekey, inplace=True)

The first part of the try block is straightforward and I'm questioning if putting it in a pvlib.iotools.utils function is actually helpful. Beyond that, I'm wondering two related things about this part of the function:

Is it general enough to be useful as its own function in a utils module?
Assuming it is general enough, does it actually improve code clarity in other parsing functions?

Here are links to all of the datetime parsing code in iotools:
midc
srml
surfrad
tmy
proposed CRN parser in #666
It seems to me that the answer to question 1 is "not at this point". I don't yet know the answer to 2, but I think writing generic parsing code is hard!

I also rely on to_datetime for parsing the datetime strings. Is that a problem?

No problem. I think that's the right way to do it.
I think the 2nd half of the function merits its own function that assumes a Series/DataFrame that already has a DatetimeIndex.

I implemented a couple of PVDAQ fetch functions over in our Solar Forecast Arbiter project:
https://github.com/SolarArbiter/solarforecastarbiter-core/blob/master/solarforecastarbiter/io/fetch/pvdaq.py
https://github.com/SolarArbiter/solarforecastarbiter-core/blob/master/solarforecastarbiter/io/fetch/tests/test_pvdaq.py
I based them on @bmeyers code but removed most of the DatetimeIndex handling code and the progress bar. I'll describe my motivations here in case they're useful for advancing this PR:
I didn't find that the date/time key control was needed to handle the publicly accessible data. Perhaps it's needed for non-public data?
I also wanted to control how I handled the resampling/reindexing based on my requirements, so I left that to my own function. For example, I wanted to resample sub 1 minute data into 1 minute data using resample.mean but wanted to use resample.first for 5 and 15 minute data with the occasional odd reading.
Finally, while I'd like to return a localized DatetimeIndex, the time zone of the data is not clear. It appears to be in local standard time, but I don't see any metadata or documentation about this (I could have missed it). So, it appears it's up to the user to decipher the UTC offset based on the lat/lon of the separately accessible metadata.
I still think it would be great if the functionality ended up in pvlib in the long run.

My vote would be to add the solar arbiter pvdaq implementation to iotools and close this PR.
Usage is the best user story, pre-mature optimization is the killer (this PR case in point).
I would rather see this in pvlib, observe usage, and have users create issues or discuss on groups/SO, and then we modify as needed, than not have it all or living in PR state indefinitely.


Using component interpolation, break production build

Environment

Operating System: Windows_NT
Node Version:     v18.15.0
Nuxt Version:     3.4.1
Nitro Version:    2.3.3
Package Manager<EMAIL_ADDRESS>Builder:          vite
User Config:      devServer, modules, vite, css
Runtime Modules<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Build Modules:    -

Reproduction
I don't really know how to give a reproduction link, since it seems to be linked to Vercel in some way.
Let me know if giving the prod url would help.
Describe the bug
So I'm using component interpolation without any problem in dev mode, everything work as expected, here is my code:
<i18n-t
  :keypath="`homePage.easy-to-use.list-${index}.text`"
  tag="p"
  scope="global"
>
  <template v-slot:bold1>
    {{ $t(`homePage.easy-to-use.list-${index}.bold-1`) }}
  </template>
  <template v-slot:bold2>
    {{ $t(`homePage.easy-to-use.list-${index}.bold-2`) }}
  </template>
</i18n-t>

When deploying my project with this, I got an error 500 on my build.
I got no error on Vercel side during building, it's only when accessing the URL that I got the error, nothing in the console except the error 500 in itself.
If I comment this specific part, everything is back to normal, so component interpolation is breaking my prod build but i can't figure out why.
Additional context

Logs
I attached an image of the log of the project, I hope it can help.

Thank you for your reporting!
First, Could you try to use edge channel version?
I greatly appreciate your report but would appreciate a repo with minimal reproduction code.
And you seem to be having this problem with Vercel, please give us more information around Vercel environments 🙏
I don't know much about Vercel as I don't use it often 😅

Hi @gbendjaf
Vercel shows the deployment was successful but when you enter the website you're getting 500 error like this:

If I understood your issue correctly. I was getting the same because yarn.lock file in vercel. Here is the way to solve this issue.

Add your yarn.lock file into .gitignore
do some change and commit it
git push

link to nuxt vercel builder: https://github.com/nuxt/vercel-builder/issues/806

Close in-activity.
If you have still the issue, please you will open new issue.
Thanks!


Update version of vault image to latest stable official image 1.15.0

The main purpose of this pull request is to use the latest stable version of vault image on hashicorp/vault instead the already used one vault, as mentioned on https://hub.docker.com/_/vault/  that Upcoming in Vault 1.14, we will stop publishing official Dockerhub images and publish only our Verified Publisher images. Users of Docker images should pull from hashicorp/vault instead of vault. Verified Publisher images can be found at https://hub.docker.com/r/hashicorp/vaulton this pull request, an update of a recent version ofvault` can keep fresh the library and make it fit to the upcoming new changes and prevent the drastic changes when a lot of breaking changes happens on certain versions

Update the vault hub image to use hashicorp/vault
Upgrade the vault version to 1.15.0
Use https instead of http for vault instance
Use CertificateException for testGetCAChain and fix the broken test related to this chnage
Make CRUD_PATH  variable final

@bmscomp Where is -dev-tls being set for this container?

Let me elaborate. You changed the protocol from http to https but this requires -dev-tls to be passed to the started container but that isn't being passed. Also, -dev-tls  requires a minimum of Vault 1.12, meaning for people pinned to older Vault versions this won't work.
I've checked testcontainers which still defaults to Vault 1.1.3 and uses a default http address
I've also tried running a local 1.15 container using docker run --cap-add=IPC_LOCK hashicorp/vault which defaults to using an http address.
So I'm left a bit confused at how this is actually working. DevServicesVaultProcessor wasn't updated to pass -dev-tls and yet, at the very least, this PR passed CI checks.

@vsevel @bmscomp I think we let this slip by. After a bit of a refresher I realized I don't think we ever actually use "dev services" to start vault for the integration tests (or any tests). We use a custom configuration to boot Vault with TLS support but that has nothing to do with this change.
I don't think dev services works at all at the moment. @bmscomp Have you tried actually tried using this in a project with dev services active?
How I discovered this is we are finally upgrade to Q3.5.2 and basically none of our Vault dev services start because the containers are started using http and the address was changed to https

I am working on that right mow

How I discovered this is we are finally upgrade to Q3.5.2 and basically none of our Vault dev services start because the containers are started using http and the address was changed to https

we were not cautious enough on this. thanks @kdubb for raising a flag.

@kdubb  @vsevel  I think it's a good idea to add an integration or system test to make sure such important feature have no regression, rather then let this for a manual test, I'll try next days to work on something like this

@bmscomp It should be very easy. Any integration test having a configuration that does not provide a vault url/credentials should automatically start devservices.


Does not work

I've tried 1.1.1-SNAPSHOT and it does not work.
At least with Pix-Art Messenger. Stable 1.1.0 version works.
Client gets PUT url and then failed.

Although 1.1.1-SNAPSHOT is not a stable release, I'm thinking that this is caused bye #12.


Squash new letter endpoint

@ivanmauricio When something should be merged, do open a PR and assign it to me

👍

Just waiting for check to pass

Thanks @rjmk  will remember to assign in future! Very happy to have our very first additions to master on board 😄


Update to python 3.11 for faster startup

Faster startup time can help command line program has a better user experience.
detail: https://docs.python.org/3.11/whatsnew/3.11.html#faster-cpython

I don't understand. Anyone who doesn't PixivUtil2 in a docker won't benefit from this and the last Travis CI build was over two years ago. If you meant "Update docker file and .travis.yml to Python 3.11", yeah, that will work, but "for faster startup" means nothing. There is no "better user experience" coming from this pull request. The documentation states:

This has a big impact for short-running programs using Python.

As far as I am aware, PixivUtil2 is not a "short-running" program. Furthermore, to prove this, benchmarks are required. What's the startup time for docker versus your branch?

It's just saying that python 3.11 could make console programs startup faster and users will feel happy.
dont see why you use a python file in docker, that way you have to mount the folder anyway.

The docker one can speed up the docker of python; The travis ci can run some pip install tests.
It just notices that updating to python 3.11 has benefitted, and this PR is trivial actually. If the next release is bundling python 3.11, can close this PR.

The next release of PixivUtil2 does not bundle python at all. You can close this PR yourself if you wish, else we're waiting on @Nandaka.


:octocat: [0:15] add hiding button for suggestions

migrated to https://github.com/mprinc/KnAllEdge/issues/20


[KBM] Edit Windows load time is not immediate when there are many saved shortcuts

There seems to be about 0.5-1 second of load time when there are about 6 shortcuts saved and to be loaded into the UI. However after the initial load adding and removing is fast. It may be an issue that might be fixed with migration to ListView (#2170 ) or ItemRepeater.

no one has complained about this.  While perf is important, no one has brought this up to date


Remove Google.Chrome.Dev 128.0.6535.2 to Google.Chrome.Dev.EXE 128.0.6535.2

Microsoft Reviewers: Open in CodeFlow

Hi @SpecterShell,
This manifest has the highest version number for this package. Is it available from another location? (This might be in error if the version is switching from semantic to string, or string to semantic.)
(Automated response - build 886.)


Is this sdk support get test SUI tokens from faucet?

Is this sdk support get test SUI tokens from faucet?
I want to get test SUI tokens from faucet for some address, is there a method in this sdk can achieve this?

Is this sdk support get test SUI tokens from faucet?
I want to get test SUI tokens from faucet for some address, is there a method in this sdk can achieve this?

Hi, currently, it's not supported. You can look forward to future updates. We also warmly welcome collaboration to co-build together.

We already supported this feature for devnet. Feel free to check it out

We already supported this feature for devnet. Feel free to check it out

I saw it yesterday, but please check my comment in the commit, and btw please publish it in the new version, thus I can use it

We already supported this feature for devnet. Feel free to check it out

I saw it yesterday, but please check my comment in the commit, and btw please publish it in the new version, thus I can use it

We already published the new version v1.0.4

We already supported this feature for devnet. Feel free to check it out

I saw it yesterday, but please check my comment in the commit, and btw please publish it in the new version, thus I can use it

We already published the new version v1.0.4

Ok, thanks!


Added a new archived repository list item

Continuation of #1220.
Supercedes #1174.

@daveverwer Can you check my write access again?  I've made the changes locally, but can't push to this branch.

@daveverwer Can you check my write access again? I've made the changes locally, but I still have the notification that I don't have write access. Thanks!

It still says Pending Invite on GitHub so you should have an invite email that you'll need to accept. Did it get caught in spam?

@daveverwer Can you check my write access again? I've made the changes locally, but I still have the notification that I don't have write access. Thanks!

It still says Pending Invite on GitHub so you should have an invite email that you'll need to accept. Did it get caught in spam?

The spam folder always gets me. I have it now. Thank you!

Thanks, Sarah, and welcome to the SPI contributors! :) 🎉


Add support for curl --max-time option

Adds support for curls "--max-time" option. The default is 60 seconds, which is not enough, if you are, for example, building an app before responding to the webhook request.

Thank you. Will review, test and merge.

Maybe it would be even better if we could pass arbitrary arguments to curl that aren't predefined.

That is a good suggestion. I will play around with that. Fairly busy today and tomorrow, but can hopefully get something out after that.

Just a quick update: busy testing. Apologies for being slightly slow on this - crazy busy time. Will have it out soon.

Just a quick update: busy testing. Apologies for being slightly slow on this - crazy busy time. Will have it out soon.


shell

Proxy Error
The proxy server received an invalid response from an upstream server.


At some font sizes, the last log entry becomes hidden

I noticed this when I had the font enlarged, then I reduced the size, the last entry came back, then I reduced it some more and it became hidden again.

What you see here is that scroll positions are not recalculated upon UI resize.
There's just no way to fix that, you need to manually rescroll.
Instead of manually resizing the UI, you can:

set environmental variable NK_SCALE=1.2 (or to whatever multiplier you want)
set Xft.dpi [1] to the proper DPI in your ~/.Xresources (by default 96 is assumed)

[1] https://wiki.archlinux.org/index.php/HiDPI#X_Resources


Allow missing fields in structs

Rust structs allow for setting a default value, but the syntax is verbose:
fn main() {
   #[derive(Debug, Default)]
   struct Pref {
      k: String,
      n: u8,
      b: bool
   }
   let o1 = Pref { k: "Sun".to_string(), n: 10, ..Default::default() };
   println!("{:?}", o1);
}

With other languages like Go, you can just omit whatever fields you like:
package main
import "fmt"
func main() {
   type Pref struct {
      k string
      n int
      b bool
   }
   o1 := Pref { k: "Sun", n: 10 }
   fmt.Printf("%+v\n", o1)
}

https://tour.golang.org/moretypes/5
If you try this with Rust, you get:
error[E0063]: missing field `b` in initializer of `main::Pref`

Rust structs allow for setting a default value

Not really; there are two concepts here:

Functional record update syntax (or whatever the current name is) is a language-level concept. This allows you to create a value using the values from another value.

The Default trait is a standard library concept (really libcore). This allows you to construct a value “from nothing” in a general context.

To do what you propose, the Default trait would have to be more special than it is.

If there is something I truly hate in languages, it’s exactly the kind of you think you seem to want added to Rust. Implicit behaviors. Like, not initializing a field would initialize it to some value. It could be a zeroed-value, a Default::default(), an uninitialized, etc.
Even if it was completely defined, I would still not like it, because implicitly initializing things is always something that is done in your back. It would also make it hard to prevent people from creating values that break invariants.
The syntax , .. Default.:default() is pretty short and is one way to do it. You could also create a function that would initialize the other fields for you.

If there is something I truly hate in languages, it’s exactly the kind of you think you seem to want added to Rust. Implicit behaviors.

@phaazon this is not a constructive way to express your opinion on this topic.

Look in general I dislike implicit behaviors too. I would rather do this:
if ($n1 != 0) {
   console.log('Sunday');
}

than:
if ($n1) {
   console.log('Sunday');
}

and in fact some languages like Go enforce booleans with conditional, likely
for the same reason @phaazon alluded to: because it introduces ambiguity. Each
language may have their own opinion of what to do in these cases, and user
might assume one language will behave the way another language behaves.
The real issue that I have is the Rust doesnt have Map literals:
https://github.com/rust-lang/rfcs/issues/542
So I thought I could work around the problem by using structs. However that
has not worked either as the value can be different types and Rust (to me) has
too verbose a syntax when dealing with missing struct fields. So I am just
barking up different trees trying to find a solution to the root issue, but in
the end Rust just might not be a good fit for this use case.

The real issue that I have is the Rust doesnt have Map literals:

It's off-topic for this issue, but there are plenty of crates that provide that functionality for you, such as maplit.

@shepmaster I appreciate it, but I refuse to use a crate for this purpose, on
principle. A Map literal I consider to be a foundational type. I think every
programming language Ive ever used has defined a Map type, even AWK. So for
someone to say "use a crate" for such a thing is upsetting, as to me it should
be in the language.
I know this may sound silly but its my position, as I refuse to endorse further
balkanization of the Rust ecosystem.

Well, C doesn't. Java doesn't. Don't think C++ does, but maybe. Haskell surely doesn't.
It really doesn't hurt to just make a Thing::default() and then update the fields you want non-default.

If there is something I truly hate in languages, it’s exactly the kind of you think you seem to want added to Rust. Implicit behaviors.

@phaazon this is not a constructive way to express your opinion on this topic.

Sure, that sentence taken out of the whole paragraph I wrote isn’t a constructive way. Please read the rest of the paragraph. I’m mentioning implicit behavior, which is often a source of errors in C/C++.

There are scenarios in which implicitness or defaults actually improve matters of course, like HashMap<K,V,R=RandomState> making good randomness almost unavoidable.  Yet, defaults grow more dangerous the easier applying them becomes.
Invisible global defaults as proposed here are obviously extremely dangerous and make code unreadable.
In particular, invisible defaults would break fearless refactoring and dramatically increase maintenance costs across the rust ecosystem.  Actually this applies to fn default arguments too, although maybe schemes around impl Default for foo::Args { .. } and foo(x, ..Default::default()) work.
Anyways..
I'd suggest this issue be close in deference to https://github.com/Centril/rfcs/pull/19 which raises a sensible question around #[derive(Detault)] syntax.
We previously discussed that sensible question in https://github.com/rust-lang/rfcs/pull/1806 and https://github.com/rust-lang/rfcs/issues/1594 but maybe worth revisiting once the enum discriminant syntax https://github.com/rust-lang/rust/issues/60553 stabilizes and becomes established.

The real issue that I have is the Rust doesnt have Map literals:

It's off-topic for this issue, but there are plenty of crates that provide that functionality for you, such as maplit.

And they are largely not used. They ought to be in the stdlib, just as vec![] is.

And they are largely not used. They ought to be in the stdlib

Again, that’s off topic for this issue. Please discuss that at https://github.com/rust-lang/rfcs/issues/542 instead.

default Fields:
struct Pref {
k: String,
n: u8 = 7,
b: Option = None
}
let s: Pref = Pref {.k: String::from("Hello") };
let s: Pref = Pref {.k: String::from("Hello") };

Somewhere along the way the Default RFC lost the support for private fields, which just bit me; are missing fields sufficiently close that this is a reasonable place to raise this, or should I file a separate bug? Previously #1806 for instance

I case its not obvious, the syntax listed by @cindRoberta isnt actually valid. It seems thats just something they are proposing.

In case its not obvious, the syntax listed by @cindRoberta isnt actually valid.
It seems thats just something they are proposing. However I found another option
thats not been mentioned yet:
fn main() {
   #[derive(Debug)]
   struct Pref {
      k: Option<String>,
      n: Option<u8>,
      b: Option<bool>
   }
   let o1 = Pref {
      k: None,
      n: Some(10),
      b: Some(true)
   };
   println!("{:?}", o1);
}

Its just as verbose (maybe more so) than the Default option, but it doesnt
require the default macro, and I would say its more readable.

//#[derive(Default)] //error not implemented forchrono::datetime::DateTimechrono::offset::local::Local`
struct SomeStruct{
t_date: DateTime,
a:String,
b:String,
c:String,
...
z:String
}
//so
impl Default for SomeStruct {
fn default() -> Self {
Self{
start_date:Local::now(),
//cannot satisfy SomeStruct: std::default::Default
// ..Default::default()
a:...
....
....
//omg
}
}
}
`

We'd ideally have some fields_with_defaults!() proc macro so that roughly SomeStruct { start_date, ..fields_with_defaults!() } worked.


Don't reference grafana.baseImage in CustomResource

When referencing the docker.io path in the CustomResource example,
issues happen when importing and performing a downstream build for
release.
Signed-off-by: Leif Madsen<EMAIL_ADDRESS>

I'm skipping the test because it's not really applicable here as it's not used as part of our testing.
Here's confirmation that everything is working though.
PLAY RECAP **********************************************************************************************************
ceph-0                     : ok=0    changed=0    unreachable=0    failed=0    skipped=5    rescued=0    ignored=0
compute-0                  : ok=0    changed=0    unreachable=0    failed=0    skipped=22   rescued=0    ignored=0
compute-1                  : ok=0    changed=0    unreachable=0    failed=0    skipped=22   rescued=0    ignored=0
controller-0               : ok=0    changed=0    unreachable=0    failed=0    skipped=44   rescued=0    ignored=0
controller-1               : ok=0    changed=0    unreachable=0    failed=0    skipped=28   rescued=0    ignored=0
controller-2               : ok=0    changed=0    unreachable=0    failed=0    skipped=28   rescued=0    ignored=0
hypervisor                 : ok=2    changed=1    unreachable=0    failed=0    skipped=11   rescued=0    ignored=0
localhost                  : ok=2    changed=2    unreachable=0    failed=0    skipped=30   rescued=0    ignored=0
undercloud-0               : ok=29   changed=5    unreachable=0    failed=0    skipped=199  rescued=1    ignored=0

-- deployment completed
>> Cloud name: sample
>> Overcloud domain: osp-cloudops-06
>> STF enabled: true
>> Gnocchi enabled: true
>> OSP version: 16.2
>> OSP build: passed_phase2
>> OSP topology: undercloud:1,controller:3,compute:2,ceph:1

real	110m46.720s
user	9m44.463s
sys	1m42.433s

[stack@undercloud-0 ~]$ cat core_puddle_version
RHOS-16.2-RHEL-8-20210903.n.1

Ummmmmm oops. Thought I had PR #264 loaded on my screen...


Can't find anymore the schema "Props in, events out"

I used to share a lot a part of the documentation that contained the following schema to explain how props and events works. More specifically to explain how to design a component.:

But I can't fin it anymore, what happened?
Did I miss it?

It looks like it was removed in the following PR as part of a refactor to break up the components page: https://github.com/vuejs/vuejs.org/pull/1482. It appears to exists in different versions of the documentation, see, for example, https://it.vuejs.org/v2/guide/components.html#Composing-Components.
The image you reference still exists in the repo here: https://github.com/vuejs/vuejs.org/blob/master/src/images/props-events.png.

I removed it because when rewriting and reflecting on these pages, I felt it wasn't quite accurate. Really, it's more like props, attributes, and slots down, events and slot scopes up, then Vuex omnidirectional (up, down, and lateral). 😄
I'd be open to adding a more complete diagram that we could use as a reference somewhere.

Ok I understand now.
The thing is, for new comers, it was a very good starting point to understand component's design. They usually start by sending tones of data (objects), modify it directly in the child and not emitting anything. And they would complain about vue warning they should not mutate props. Usually at that point I like to remind them they are supposed to emit events.
The thing is, I don't find anymore a section defining how a component should be designed, what are the options. That is a very important part for beginners. To know what's possible, what are the options when it comes to writing a component. I never complained this schema only focused on Props and Events, since it kept things simple. That's the core thinking you want new comers to understand: Components should be self sufficient and scoped.
Hope we can figure something out, maybe even better than what was here before. :wink:

I'd be open to a series of diagrams that act as checkpoints for the components guide. That way, users can get visual summaries of what they've just learned without us implying that it's the full picture. Specifically, I'm thinking about versions of this diagram with:

Props down; events up
Props and slots down; events up
Props, slots, and attributes down; events up
Props, slots, attributes; slot scope and events up

If someone is willing to create these, I'll fit them in at the appropriate points in the docs. 🙂

I think that's great!
Just a few questions about the diagrams:

What are the colors?
What is the font?
Any more details to comply to?

What are the colors?

Any of the colors used in the lifecycle diagram can be used. I recommend using Sip or another color picker to pull those out.

What is the font?

Source Sans Pro

Any more details to comply to?

Nothing formalized, but please try to use similar patterns to the other diagrams we're using. For example, try to match the border radius and padding on boxes - that kind of thing.

Do you have something in mind? (mock-ups of these diagrams?)

Nothing in particular. 🙂 You can use your best judgment and creativity for the first drafts. If something doesn't quite work, we can do multiple iterations. I'm wondering if it might be best to start with the last diagram though (props, slots, and attributes down; slot scope and events up), as it might be easier to simplify a more complex diagram than the other way around. I could be wrong though. 😅


Add travis testing

@mattfarina can you add Travis to this?

Added Appveyor (for windows) and Travis automated testing


users.deleted_at assumed

Hello, following setup instructions i hit this:
exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'users.deleted_at' in 'where clause'' in /home/vagrant/dev/l5-kvarnia/l5/vendor/laravel/framework/src/Illuminate/Database/Connection.php:288
Should be straigtforward to fix, by adding to my users table migration:
 $table->timestamp('deleted_at');

However, it could possibly be mentioned in the readme, or taken care of by the migrations this package creates?
/m

It is in the pre-reqs of the readme, Is easier to have the user place it there themselves instead of already having it and the plugin trying to put it back and erroring.

Okay, so this is the "User model must have soft deletes enabled" step?
I did add the SoftDeletes trait to my User model as you describe in the readme, but it don't seem to get any "deleted_by" column created when i migrate. For now it works when i create the timestamp as i wrote in post 1.
After some more poking, and reading http://laravel.com/docs/5.0/eloquent#soft-deleting
they spell it out:
$table->softDeletes();

thanks for pointing me in the right direction :)

Make sure you add the timestamp to the model as well: http://laravel.com/docs/5.0/eloquent#soft-deleting


Coerce bigint throws TypeError instead of ZodError

Consider the following code:
var zod = require("zod")

const testSchema = (schema, invalidData) => {
   try {
      schema.parse(invalidData);
   } catch (e) {
       if (e instanceof zod.ZodError) {
          console.log("throws ZodError");
       } else {
          console.log(`throws other error (${e.message})`);
       }
   }
}

console.log("case 1");
testSchema(zod.object({
   foo: zod.string(),
}), {}); // throws ZodError

console.log("case 2");
testSchema(zod.object({
   foo: zod.coerce.number()
}), {
  foo: "invalid"
}); // throws ZodError

console.log("case 3");
testSchema(zod.object({
   foo: zod.coerce.bigint(),
}), {}); // throws other error (Cannot convert undefined to a BigInt)

console.log("case 4");
testSchema(zod.object({
   foo: zod.coerce.bigint(),
}), { foo: "invalid" }); // throws other error (Cannot convert invalid to a BigInt)

(Playground: https://runkit.com/embed/bk8jnwfz1tkq)
I would expect that all cases would throw a ZodError, but it seems as BigInt throws a TypeError instead.
Tested with zod 3.20.2 on node 16.18
This is a bug, right?

Everything seems to be working fine to me.
const schema = z.coerce.bigint()
console.log( schema.parse( 42 ) ) // 42n
console.log( BigInt( 42 ) ) // 42n

try {
    schema.parse( undefined )
} catch ( error ) {
    console.error( error )
    // TypeError: Cannot convert undefined to a BigInt
}

try {
    BigInt( undefined )
} catch ( error ) {
    console.error( error )
    // TypeError: Cannot convert undefined to a BigInt
}

I might misunderstand the usage for "coerce", I'm using zod for validating the input in a REST endpoint. If the user forgets to send a value in an object (which I'm planning to check against my database which has id:s of type bigint), I want to handle that in the same way as all my other validation code, i.e throwing a ZodError with zod and catch that in an error handler. It's a bit unexpected IMO that number and bigint doesn't throw the same error-type when they can't parse the provided value. What's the motivation behind that?

perhaps the docs about coerce would help.
https://github.com/colinhacks/zod#coercion-for-primitives


Issue#21: Add TraviCI setup to README

Updated README file. https://github.com/ankitaggarwal011/PyCNN/issues/21

Coverage remained the same at 100.0% when pulling 602e3b5dc1abd17029e9439cfb3e1d1cc9ec95c3 on vpolimenov:feature/update-readme into c16fb6c096b1e3a2ce1dcd401874dcd064e37407 on thesp0nge:master.

This PR will be merged in next master release 1.6.7.


I'm considering a brand new project and LCSK is not maintained anymore

First I would like to say that LCSK in its .NET version is not maintained anymore. I'm no  more a .NET developer for a long time now and this project already exceeded what it was supposed to be at first in 2007, which was a simple getting started project to build a more complete live chat app.
Thanks to everyone that has been involved, tried the project and contribute.
I have another project I'm currently evaluating. I always liked live chat and offering A1 support to users and website visitors. I also know there is not much open source projects that offer similar features of product like Intercom, Drift. This might be something I would like to build and use Live Coding at the same time.
An ambitious project for sure, and some might ask why open source this instead of building a SaaS. Well, I already have a startup Roadmap and does not really want to enter that market and compete. It's just something I'd like to build :)
So depending on reactions and demand, I'm kind of trying to validate this open source project before building it.
Please let me know if it's something you would use.
Thanks

Would you mind if I take over the LCSK?
I have been involved in it for some time now.
From: Dominic St-Pierre<EMAIL_ADDRESS>Sent: Wednesday, November 16, 2016 5:30 AM
To: dstpierre/lcsk
Subject: [dstpierre/lcsk] I'm considering a brand new project and LCSK is not maintained anymore (#53)
First I would like to say that LCSK in its .NET version is not maintained anymore. I'm no more a .NET developer for a long time now and this project already exceeded what it was supposed to be at first in 2007, which was a simple getting started project to build a more complete live chat app.
Thanks to everyone that has been involved, tried the project and contribute.
I have another project I'm currently evaluating. I always liked live chat and offering A1 support to users and website visitors. I also know there is not much open source projects that offer similar features of product like Intercom https://intercom.io , Drift https://www.drift.com . This might be something I would like to build and use Live Coding https://www.livecoding.tv/  at the same time.
An ambitious project for sure, and some might ask why open source this instead of building a SaaS. Well, I already have a startup Roadmap https://roadmap.space  and does not really want to enter that market and compete. It's just something I'd like to build :)
So depending on reactions and demand, I'm kind of trying to validate this open source project before building it.
Please let me know if it's something you would use.
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/dstpierre/lcsk/issues/53 , or mute the thread https://github.com/notifications/unsubscribe-auth/ACxzrMd4C7vyZ9y6U0zf97emRpq4FsBwks5q-ttAgaJpZM4KzqzO .  https://github.com/notifications/beacon/ACxzrN9jWHmEGlwfLf9P7403qRk7ge0Uks5q-ttAgaJpZM4KzqzO.gif

I was actually thinking of renaming and starting a new branch and at some point merge into master.
The project I'm considering would be lot more user friendly thant LCSK and would deploy to a DigitalOcean droplet easily.
In any case @jhermiz I will keep that in mind for sure depending of the decision I take.
Thanks

No problem I can help if you like.
I have taken a local copy of lcsk and integrated it into a full stack using sql server as the back end.
The chat itself can then be stored into a database and file uploads and downloads can be made right within lcsk.
From: Dominic St-Pierre<EMAIL_ADDRESS>Sent: Wednesday, November 16, 2016 12:13 PM
To: dstpierre/lcsk
Cc: JonH; Mention
Subject: Re: [dstpierre/lcsk] I'm considering a brand new project and LCSK is not maintained anymore (#53)
I was actually thinking of renaming and starting a new branch and at some point merge into master.
The project I'm considering would be lot more user friendly thant LCSK and would deploy to a DigitalOcean droplet easily.
In any case @jhermiz https://github.com/jhermiz  I will keep that in mind for sure depending of the decision I take.
Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/dstpierre/lcsk/issues/53#issuecomment-261008359 , or mute the thread https://github.com/notifications/unsubscribe-auth/ACxzrErVtKhJUtK92hcdDwpjPpiu0468ks5q-zmAgaJpZM4KzqzO .  https://github.com/notifications/beacon/ACxzrN8Kdy8HxTR6ILfPMS1y5RmRYr28ks5q-zmAgaJpZM4KzqzO.gif

No problem I can help if you like.

@jhermiz sure. I'm preparing to start the first live stream session. The Livecoding.tv channel is here.
First thing that will be built is the live chat / in-app messaging component, so this will be similar to what LCSK was. But with a 2016 feel to it.
I would suggest keep an eye on the repo and if you are interested in checking the live stream / sharing, would appreciate :). From there I will start using ZenHub to handle what to do and any pull request will be welcome.

any updates? :)

Hi @hbakhtiyor yes actually, I have been distracted in the last months, but I have plans to start working on the product regularly.

great to hear

I don’t think it was a good idea to remove the original lcsk chat client.
We still use it and suddenly losing it completely on github I believe to be a mistake.
Why can we not just keep lcsk on github and create a new “project” on github for your new project?
From: Dominic St-Pierre<EMAIL_ADDRESS>Sent: Thursday, April 06, 2017 7:19 AM
To: parle-io/parle
Cc: JonH; Mention
Subject: Re: [parle-io/parle] I'm considering a brand new project and LCSK is not maintained anymore (#53)
Hi @hbakhtiyor https://github.com/hbakhtiyor  yes actually, I have been distracted in the last months, but I have plans to start working on the product regularly.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/parle-io/parle/issues/53#issuecomment-292143480 , or mute the thread https://github.com/notifications/unsubscribe-auth/ACxzrDlmR-OVtyOVDVU61ladF4kFbnmyks5rtMpAgaJpZM4KzqzO .  https://github.com/notifications/beacon/ACxzrP5bbfLpCLg7Ot_h3veyF6I0Fe29ks5rtMpAgaJpZM4KzqzO.gif

@jhermiz the original lcsk is still in the lcsk branch, feel free to fork this if you want and continue this project if you like. For me I started LCSK in 2007 and I think this new project is really the v2 of this idea I had back than.
If you are using LCSK you'll most certainly love Parle since the first module that will be available will be the messenger, so kind of similar to LCSK but with a 2017 feels.
In any case let me know if I can do anything to get you started if you want to continue LCSK, but I would also suggest that you keep an eye on Parle as it will be way better :)

No problem I will help with parle just as I helped with lcsk.
From: Dominic St-Pierre<EMAIL_ADDRESS>Sent: Friday, April 07, 2017 7:25 AM
To: parle-io/parle
Cc: JonH; Mention
Subject: Re: [parle-io/parle] I'm considering a brand new project and LCSK is not maintained anymore (#53)
@jhermiz https://github.com/jhermiz  the original lcsk is still in the lcsk branch, feel free to fork this if you want and continue this project if you like. For me I started LCSK in 2007 and I think this new project is really the v2 of this idea I had back than.
If you are using LCSK you'll most certainly love Parle since the first module that will be available will be the messenger, so kind of similar to LCSK but with a 2017 feels.
In any case let me know if I can do anything to get you started if you want to continue LCSK, but I would also suggest that you keep an eye on Parle as it will be way better :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/parle-io/parle/issues/53#issuecomment-292512332 , or mute the thread https://github.com/notifications/unsubscribe-auth/ACxzrEFlvaBK3rYM54EPEz9wVkDFmaPYks5rth0GgaJpZM4KzqzO .  https://github.com/notifications/beacon/ACxzrEAeP4n7c8F44Ij2Jk8Z8sNDYea5ks5rth0GgaJpZM4KzqzO.gif


[Hyperledger-Aries] Add support for service=didexchange

@tdiesler is this ready to merge?

@davsclaus yes

@davsclaus when it passes QA, it is always good to go. As I work my way through the TCK, stuff may change in a later PR

the failed test are in core not hyperledger


[Virtual Wan] Fix some command don't migrate to track2

Closed https://github.com/Azure/azure-cli-extensions/issues/3837

This checklist is used to make sure that common guidelines for a pull request are followed.

For new extensions:

[ ] My extension description/summary conforms to the Extension Summary Guidelines.

About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify src/index.json.

Virtual Wan


Parent and URI not populating when creating a Child entry with Eloquent 4.0 / Statamic 5

Trying to create a child entry in eloquent set up (Statamic5, Eloquent 4.0), by setting the URI and the parent id of new entry as shown in code below, but they will remain unchanged. The Entry points to Home, instead of the parent and the URI remains null after saving the entry. Slug and all other fields are updated properly.
$entry = Entry::make()->collection('pages')->slug($slug_article);
$entry->site('default');
$entry->blueprint('pages');
$entry->date(Carbon::parse('now'));
$entry->published(true);
$entry->status('published');
$entry->locale('default');
$entry->set("uri", "/".$parent->slug."/".$slug_article);
$entry->data([
parent' => $parent->id,
...
]);
$entry->save();

The parent field isn't the right approach to creating a child, you need to add it to the tree. Something like:
$collection = Collection::findByHandle('handle');
$collectionStructure = $collection->structure()->in('default');

// make a new entry
$entry = Entry::make()
    ->collection('handle')
    ->locale('default')
    ->slug($termSlug)
    ->published(true)
    ->data([...]);

// parent of entry
$entryParent = Entry::newQuery()->where('x', 'y');

// after save, update tree
$entry->afterSave(function ($entry) use ($entryParent, $collectionStructure) {
    $collectionStructure->syncOriginal(); // this seems to be necessary or you end up with an error about flip() when creating multiple entries in the same request
    if (!$entryParent) {
        $collectionStructure->append($entry);
    } else {
        $collectionStructure->appendTo($entryParent->id(), $entry->id());
    }
    $collectionStructure->save();
});

Thank you - I will try that.
--
Kind Regards,
Dian Kolarov
Increate Ltd
T:<PHONE_NUMBER>0 |<PHONE_NUMBER>2
@.***
On 10/05/2024 12:40, Ryan Mitchell wrote:

The parent field isn't the right approach to creating a child, you
need to add it to the tree. Something like:
$collection  =Collection::findByHandle('handle');
$collectionStructure  =$collection->structure()->in('default');
// make a new entry
$entry  =Entry::make()
->collection('handle')
->locale('default')
->slug($termSlug)
->published(true)
->data([...]);
// parent of entry
$entryParent  =Entry::newQuery()->where('x','y');
// after save, update tree
$entry->afterSave(function  ($entry)use  ($entryParent,$collectionStructure) {
$collectionStructure->syncOriginal();// this seems to be necessary or you end up with an error about flip()
when creating multiple entries in the same request
if  (!$entryParent) {
$collectionStructure->append($entry);
}else  {
$collectionStructure->appendTo($entryParent->id(),$entry->id());
}
$collectionStructure->save();
});
—
Reply to this email directly, view it on GitHub
https://github.com/statamic/eloquent-driver/issues/284#issuecomment-2104459269,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AC6SWHSXBK4MJE5JVAXJYFLZBSWZHAVCNFSM6AAAAABHQO2WE6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBUGQ2TSMRWHE.
You are receiving this because you authored the thread.Message ID:
@.***>

Hi Ryan,
This all worked fine, but I am getting the error below on
CollectionStructure->save() and I get the same error in the Control
Panel as well, if I make a change to the order of entries or try to
delete one.
I have upgraded to Statamic 5 / Eloquent 4 yesterday and did not had
this issue before, but I also wonder if deleting entries directly form
the database (while running tests) can cause something like this? Can't
really think of another reason.
--
Kind Regards,
Dian Kolarov
Increate Ltd
T:<PHONE_NUMBER>0 |<PHONE_NUMBER>2
@.***
On 10/05/2024 12:40, Ryan Mitchell wrote:

The parent field isn't the right approach to creating a child, you
need to add it to the tree. Something like:
$collection  =Collection::findByHandle('handle');
$collectionStructure  =$collection->structure()->in('default');
// make a new entry
$entry  =Entry::make()
->collection('handle')
->locale('default')
->slug($termSlug)
->published(true)
->data([...]);
// parent of entry
$entryParent  =Entry::newQuery()->where('x','y');
// after save, update tree
$entry->afterSave(function  ($entry)use  ($entryParent,$collectionStructure) {
$collectionStructure->syncOriginal();// this seems to be necessary or you end up with an error about flip()
when creating multiple entries in the same request
if  (!$entryParent) {
$collectionStructure->append($entry);
}else  {
$collectionStructure->appendTo($entryParent->id(),$entry->id());
}
$collectionStructure->save();
});
—
Reply to this email directly, view it on GitHub
https://github.com/statamic/eloquent-driver/issues/284#issuecomment-2104459269,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AC6SWHSXBK4MJE5JVAXJYFLZBSWZHAVCNFSM6AAAAABHQO2WE6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBUGQ2TSMRWHE.
You are receiving this because you authored the thread.Message ID:
@.***>

What error? Can you also post the result of ‘php please support:details’

Hi,
It looks like the screenshot did not go through - the error is
"Undefined array key 1 and I am providing screenshot on url
(https://cdn.frontserve.net/screenshot.png) and there is the error  log
entry below...
Support output below...

On 10/05/2024 15:14, Ryan Mitchell wrote:

What error? Can you also post the result of ‘php please support:details’
—
Reply to this email directly, view it on GitHub
https://github.com/statamic/eloquent-driver/issues/284#issuecomment-2104687199,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AC6SWHX3MH25SECGYDUFUMLZBTI6FAVCNFSM6AAAAABHQO2WE6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBUGY4DOMJZHE.
 I'll see if I can get some time on this early next week, if no one else beats me to it.

Hi Ryan,
You were right - I fixed the issue by replacing the "Home page" in the
collection with a new one and clearing all cache. Not sure how this
relates, but I did start from file based set up and later moved to
eloquent and I did stache:clear and static:clear before reporting this.
Not sure if this was a one-off or needs further investigation, but your
reply hinted a direction - thanks!
--
Kind Regards,
Dian Kolarov
Increate Ltd
T:<PHONE_NUMBER>0 |<PHONE_NUMBER>2
@.***
On 10/05/2024 16:33, Ryan Mitchell wrote:

The error is strange as it's hitting the stache repositories for
collections and trees, when your config is showing you using eloquent.
I'll see if I can get some time on this early next week, if no one
else beats me to it.
—
Reply to this email directly, view it on GitHub
https://github.com/statamic/eloquent-driver/issues/284#issuecomment-2104814883,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AC6SWHS2WOLYIRT6KQ42UK3ZBTSEFAVCNFSM6AAAAABHQO2WE6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBUHAYTIOBYGM.
You are receiving this because you authored the thread.Message ID:
@.***>

Ah brilliant. Thanks for the update.


[WIP][OAP-1457][oap-native-sql] Reserve Spark off-heap execution memory after buffer allocation

See #1457

@zhztheplayer thanks for the efforts! could you please modify the travis tests?
https://github.com/Intel-bigdata/OAP/blob/master/.travis.yml#L52-L55
mvn clean package -pl oap-native-sql/core -DskipTests -am should work I think

@zhouyuan Thanks Yuan.
Besides, is there a recommended way to test against the changes to oap-native-sql? So far I am not 100% confident with them.

@zhztheplayer there's a local jenkins cluster to exercise oa-native-sql code with some queires from tpch/tpcds. there are several unit tests for native codes. let me try to enable this in travis.

@xuechendi @zhouyuan @rongma1997 @rui-mo
The changes would make oap-native-sql to depend on module arrow-datasource-common at both compile time and runtime. Which may require developer to pre-install the latter in local maven repository or to run maven with option -pl if you haven't do this yet.
Please review or let me know if any problem with the PR.


Limitation (max elements in list)

Due to memory constraints, we have limited the number of:

list elements
tuple elements

https://github.com/Zondax/ledger-blockstack/pull/1#discussion_r442499011
Can you confirm that this limit is acceptable? or please suggest a number that would be adequate.

This wouldn't be acceptable -- there are likely to be transactions involving much larger lists and tuples. However, it would be acceptable to do something like display 'list of length X with elements of type Y' for large lists and tuples.

We have limitations on the amount of RAM (~2kB) and NVRAM (~8kB) in Nano S. For this reason, we need to set some maximum values. In multiple places, we are already pre-parsing and indexing and later parsing on demand as the user navigates the information. Still, we we need to set some limits and see if we can fit them.
Nano X can definitely have higher limits (~38kB RAM).
What would you suggest as an acceptable limit that still is useful in 90% of the cases?

What's running out of memory in the parser here? Is it the parser itself? Or is the object being constructed too large? I think it should be possible to address this by not parsing large lists/tuples, and instead providing some kind of stand-in/summary value for the large object.

Well, it is a combination of all those.. we need to balance storage, call stack consumption plus workout a way to format and present the information.
Yes, we normally do all these things and many other tricks and somersault.. :)
I think the point is: we try to concentrate the effort in areas that are required. We were not sure what was the value we need to target. Having a number if mind helps to see how/where to spend more time and if we need to use some more complex approaches.

I see -- I think a limit of ~10 is more reasonable and would handle most cases, however, I think an error path that still allows a user to sign more complex transactions while possibly eliding some information from the prompts is preferable to a hard error.

@neithanmo Can we document here the limits of the latest release?
I think we can then close this issue

@kantai @kyranjamie Can we close this?
I think the current limit has been acceptable in practice, right?

We do not have any limit here regarding the list, other than the number of the nested lists it may contain..that limit is 3 at the moment, but it can be increased if needed..


Added "Fast Block Flipper" sample for Inventor

This sample uses 4 motors with overlapped motions and various motor control settings to get 3x the speed of the LEGO Scratch version of the program.

Looks great, thank you so much!


how can i pass safe as an option to cssnano?

cssnano in non-safe mode is messing with my CSS

oh... cssnext's version of cssnano doesn't even support it yet...

I need this as well, it seems the z-indexes get "rebased" (yikes!)

safe option doesn't exist yet (in the version used by cssnext).
Try using postcss + postcss-cssnext + cssnano directly (this will be the recommended version in a week or two ;) ). See https://github.com/cssnext/postcss-cssnext#readme

I did that, and it solved my problem! Thanks!


chore: bump postgresql in docker-compose and github workflows

SUMMARY
This PR bumps to postgresql:15 image version in Dockerfile and GH workflows.
From Postgres release news:

In this latest release, PostgreSQL improves on its in-memory and on-disk sorting algorithms, with benchmarks showing speedups of 25% - 400% based on which data types are sorted. Using row_number(), rank(), dense_rank(), and count() as window functions also have performance benefits in PostgreSQL 15. Queries using SELECT DISTINCT can now be executed in parallel.

TESTING INSTRUCTIONS
./scripts/tests/run.sh and all CI jobs run successfully

Thank you for the PR, you beat me on time !
Only an advice: docs should be updated to add v15, as done in PR #19790

@RealGreenDragon thank you; done!

@villebro @john-bodley @betodealmeida see any risk here?


Converting static strings to string resources

Replace all the static strings in the codebase by creating string resource for each string in the strings.xml file
How to create a string resource?
Go to the strings.xml file and under the resources tag, add a resource in the following format
<string name="name of string res">"The value of string resource"</string>

Example:-
<string name="hello_world">"Hello World!"</string>

Is it okay if I try this issue?

hello @ken1000minus7 , the issue interrests me can you assign it to me please. Thank you 👍

Sure @Sidahmed-ben , good luck! 😄

hi I would like to be assigned to this:)

Go ahead @jyorien 😀✨


[WIP] Default styling

VAMOS NENO!

cc @makella I've created a default-cartography.json file so you can edit defaults. I'll add more there

ohhh great... thank you.
what do i do now?


Feature: Re-Implement "ctx.channel().attr(key)" into MN wrapper interface NetworkClient

Why needed? - Could easly add custom connection data without extending default NettyClient class.
We cant access ctx, since UDP dont provide ctx.
But still we should add attribute functionality for Connection.
We could just extend NetworkClient interface by "attr" methods.
not important, but writing this "issue topic" for future.
(i am anyway waiting you to reply in Question issue first anyway, so later i could create PR myself)

Yes, I think this would be good to bring into the wrapper, I actually did not realize that it was not part of it. I just checked the version in the Outside Engine, and atts is also not part of its abstract interface either. This was an oversight on my part, and it should be part of the NetworkClient interface.

indeed.
its to avoid "upper casting"(that is slow comparing to down-casting) like:
((NettyConnection)client).setAttribute(
and people would not know they can use it via casting. while adding to interface they just ctrl-space and see it in interface.
so it would help much.
i assume we dont need Client provide setAttribute for itself?
but also assume its not problem for client have methods to set attributes for itself.(just not needed code)
or we could jsut throw exception "unsupported method" for client setAttribute itself. Only server NettyConnection really need it.

I think it would be fine to put in both. That way it is consistent, and if someone wants to use it on the Client side, then it is available (even though there are probably better places to put attribute data Client side in a correctly built client application)

added PR https://github.com/tlf30/monkey-netty/pull/18
its small change. Not tested ir yet, but its same code as in NettyConnection so should work fine.


Add Matrix 400k cells perf test

In order to better compare the performance runs from Sharepoint Lists vs Fluid file, we are adding a new test that will populate 400k cells.

Will GC try to run for these tests?  We have that issue where GC is O(total matrix size) not O(nonblank cells).


Update utils provider. Add ignore_errors variable to remote-state

what

Update utils provider
Add ignore_errors variable to remote-state
Update GitHub workflows

why

Use latest utils provider (which uses latest code from atmos with new features and bug fixes)
utils provider is used to read remote state of components. Sometimes we want to ignore errors if a component does not exist in a stack. If ignore_errors = false, the utils provider could throw an error: Could not find config for the component 'xxxx' in the stack 'yyy'. Note that terraform try() does not catch errors from providers, so try(module.remote_state.outputs, {}) will not work and will still crash the process. Setting ignore_errors = true solves this.

references

https://github.com/cloudposse/terraform-provider-utils/pull/105
https://github.com/cloudposse/atmos/pull/120

/test all

/test all

/test all


Do not ignore gradle wrapper's jar file

It's required for bootstrapping.

+1 this would be good. It also goes naturally together with my https://github.com/github/gitignore/pull/1977 for a better .gitgnore for Java Gradle projects.

-1 there already is a Gradle.gitignore for this purposes. But it might be nice to make the gradle-wrapper.jar there a bit more specific.

Closing due to inactivity, pending feedback and the existing Gradle template.


Update README.md

Relates to #155

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Thanks for the PR! I'd rather ensure we publish the charts on charts.timescale.com though.
If we can make that work soon, I'll not merge this PR.

The latest Helm Charts were published on charts.timescaledb.com, so I'm closing this PR.


Rate limit exceeding

I have 3 text files, each about 70 chunks in size, initially I gave all 3 in the input folder, it is saying open ai rate limit exceeded, I tried changing the max llm sync and embedding async, it is not working, I also tried increasing the retries and stop time, it didn't work, I reduced the entities count, It didn't work , finally split each original file into 2 files and tried incremental update, it is failing.
GrapghRag from Microsoft took all 3 files with all the entities and it is working.

hey! had the same error, has to do with the @retry mechanism in llm.py for openai_complete_if_cache(), change the wait parameter to wait=wait_fixed(10), add wait_fixed to tenacity's imports at the top, and this should wait 10 seconds to send the request again after it fails and that should work depending on your openai api rate limits.

@sebeyza00 this is definitely the patch rather, also to note the retry decorator on the other completes will benefit for wait_fixed(10) as well as I've confirmed it for the decorators for bedrock.

@sebeyza00  Actually in the llm.py file I replaced all instances of the wait exponential with wait fixed and kept it to 180 but it is still failing instantly, why is it so, do I need to make any changes to the example file as well?

@sebeyza00 Actually in the llm.py file I replaced all instances of the wait exponential with wait fixed and kept it to 180 but it is still failing instantly, why is it so, do I need to make any changes to the example file as well?

Yeah I think I still hit a concurrency issue, which might need some further investigating, but that's mostly because my request limit is super low, so I need a way to tune the concurrency down to avoid 429s

Actually dug a bit more into concurrency you might need to set   @NIHALPATTANSHETTY   llm_model_max_async=4 parameter
example:
rag = LightRAG(
    working_dir=WORKING_DIR,
    llm_model_func=bedrock_complete,
    llm_model_max_async=4,
    llm_model_name="Anthropic Claude 3 Haiku // Amazon Bedrock",
    embedding_func=EmbeddingFunc(
        embedding_dim=1024, max_token_size=8192, func=bedrock_embedding
    ),
)

hey! had the same error, has to do with the @Retry mechanism in llm.py for openai_complete_if_cache(), change the wait parameter to wait=wait_fixed(10), add wait_fixed to tenacity's imports at the top, and this should wait 10 seconds to send the request again after it fails and that should work depending on your openai api rate limits.

Thanks, this really made my day. Perhaps this setting might be included in the official code as well?


Resource setting tab is not collapsible when edited in an Array

Godot version:

3.2.3 stable
OS/device including version:

Windows
RX 460 GLES2
R5 3600
Issue description:
Opening Up a Resource in the Inspector will show at the bottom a Collapsible tab for said resource settings,

but when they are in an array, opening the array in the inspector and then opening a Resource in it will show the resource setting section fully open with no option to close it

Steps to reproduce:
export an Array var and put a resource in it
Minimal reproduction project:

ArrayResourceIssue.zip

Duplicate of https://github.com/godotengine/godot/issues/23759.


feat(all): Preserve data-pharos-component attribute when Pharos class is subclassed

This change: (check at least one)

[x] Adds a new feature
[ ] Fixes a bug
[ ] Improves maintainability
[ ] Improves documentation
[ ] Is a release activity

Is this a breaking change? (check one)

[ ] Yes
[x] No

Is the: (complete all)

[x] Title of this pull request clear, concise, and indicative of the issue number it addresses, if any?
[x] Test suite(s) passing?
[x] Code coverage maximal?
[x] Changeset added?

What does this change address?
When a Pharos component is subclassed, the subclassed name is placed in the data-pharos-component attribute. Instead, it would be better if the original class name was preserved.
Example:
class HomepagePharosButton extends PharosButton {}

results in data-pharos-component=HomepagePharosButton
This change alters the behavior so that the result is now: data-pharos-component=PharosButton
How does this change work?
Adds a static componentName variable to each component which preserves the original pharos component name. The consumer is then free to subclass the Pharos component for scoped registry purposes.

Oh, the rest just clicked. See that it might not work, unless static works that way—don't have enough of an environment up to test at the moment.

Oh, the rest just clicked. See that it might not work, unless static works that way—don't have enough of an environment up to test at the moment.

@daneah,  good thought. But ya I poked around a little bit trying to get something like that to work, but haven't had any success

@eslawski Think we might need to set the static field in pharos-element.ts to achieve what @daneah is describing

close in favor of #268


Crash on using twitter as client and Webviews

Description:
Crash after line super.handle(url) ... using WebView or WkWebView.
override func handle(_ url: URL) {
targetURL = url
super.handle(url)
self.loadAddressURL()
}
#Error In Xcode
'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller <Influencer.TwitterViewController: 0x7f91ddf0b080>.'
Where TwitterViewController is the controller implementing OAuthViewController
OAuth Provider? (Twitter, Github, ..):
Twitter
OAuth Version:

[x] Version 1
[ ] Version 2

OS (Please fill the version) :

[x] iOS :
[ ] OSX :
[ ] TVOS :
[ ] WatchOS  :

Installation method:

[ ] Carthage
[x] CocoaPods
[ ] Swift Package Manager
[ ] Manually

Library version:

[ ] head
[x] v2.0.0
[ ] v1.4.1
[ ] v1.2.1
[ ] v1.2 (Swift 4.0)
[ ] v1.0.0
[ ] v0.6
[ ] other: (Please fill in the version you are using.)

Xcode version:

[x] 11.x (Swift 5.1)

[ ] 10.x (Swift 5.0)

[ ] 10.x (Swift 4.1)

[ ] 9.3 (Swift 4.1)

[ ] 9.0 (Swift 4.0)

[ ] other: (Please fill in the version you are using.)

[ ] objective c

it depend on your application code. I cannot figure what append
you use OAuthWebViewController ? if yes try change value of useTopViewControlerInsteadOfNavigation
or put OAuthWebViewController as children of your controller

Hey @phimage  ... it worked, the webview was redirected to twitter ... login was done and twitter was given authorization. I was redirected to the url, i received token and verifier but i didn't get any callback in the authorize block.
let _ = oauthswift.authorize(
withCallbackURL: URL(string: "https://api-dev.kyral.app/callback/twitter")!) { result in
switch result {
case .success(let (_, _, _)):
self.testTwitter(oauthswift)
case .failure(let error):
print(error.description)
}
}
^ No callback received here.
Here test twitter is the method to get the timeline of twitter.
func testTwitter(_ oauthswift: OAuth1Swift) {
let stringUrl = "https://api.twitter.com/1.1/statuses/mentions_timeline.json"
let _ = oauthswift.client.get(stringUrl, parameters: [:]) { result in
switch result {
case .success(let response):
let jsonDict = try? response.jsonObject()
print(String(describing: jsonDict))
case .failure(let error):
print(error)
}
}
}
Can you please tell me a way by which i can hit this url after receiving oauth_token and oauth_verifier successfully? Or what did i do wrong that i didn't receive any callback in the authorize block.
Thanks!

did you pass now into handle(_ url: ? (put a breakpoint)
because handle will decode the url and call the callback passed in authorize

@phimage i have implemented the handle method in my webviewcontroller
I tried putting a breakpoint here. i got the url in the handle method but i still didn't get any callback in the authorize block
class WKWebViewController: OAuthWebViewController {
var webView: WKWebView!
var targetURL: URL?
override func viewDidLoad() {
super.viewDidLoad()
}
override func handle(_ url: URL) {
targetURL = url
super.handle(url)
loadAddressURL()
}
func loadAddressURL() {
guard let url = targetURL else { return }
let req = URLRequest(url: url)
self.webView?.load(req)

}
}
extension WKWebViewController: WKUIDelegate, WKNavigationDelegate {
override func loadView() {
let webConfiguration = WKWebViewConfiguration()
webView = WKWebView(frame: .zero, configuration: webConfiguration)
webView.allowsBackForwardNavigationGestures = true
webView.uiDelegate = self
webView.navigationDelegate = self
view = webView
}
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
print("loaded")
}
func webView(_ webView: WKWebView,
decidePolicyFor navigationAction: WKNavigationAction,
decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
// Check for OAuth Callback
if let url = navigationAction.request.url, url.scheme == "oauth-swift" {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
self.dismiss(animated: true, completion: nil)
decisionHandler(.cancel)
return
}
// Restrict URL's a user can access
if let host = navigationAction.request.url?.host {
  if host.contains("twitter") {
    decisionHandler(.allow)
    return
  } else {
    // open link outside of our app
    checkRequestForCallbackURL(request: navigationAction.request)
    decisionHandler(.cancel)
    return
  }
}

decisionHandler(.cancel)

}
func checkRequestForCallbackURL(request: URLRequest) {
if let requestURLString = (request.url?.absoluteString) {
let oauthVerifierSeparatedArray = requestURLString.components(separatedBy: "&oauth_verifier=")
if oauthVerifierSeparatedArray.count == 2 {
let verifier = oauthVerifierSeparatedArray[1]
let oauthTokenSeparatedArray = oauthVerifierSeparatedArray[0].components(separatedBy: "oauth_token=")
let token = oauthTokenSeparatedArray[1]
    if let twitterVC = self.presentingViewController as? TwitterViewController {

      twitterVC.test(token: token, verifier: verifier)
      if let parentNav = twitterVC.presentingViewController as? UINavigationController {
        for controller in parentNav.children {
          if let superParent = controller as? LinkSocialAccountsViewController {
            superParent.dismiss(animated: true, completion: nil)
          }
        }
      }
    }
  }
}

}
}

@phimage Any suggestion?

@sanchgoel did you respond to my question?
https://github.com/OAuthSwift/OAuthSwift#handle-url-in-appdelegate

@phimage I have implemented handle url in app delegate
I am sorry i couldn't explain you my problem properly.
I implemented the twitter login using WKWebView. I am attaching the two files that i created for this ... Can you please see and let me know what i implemented wrong.
I am able to open the twitter login in webview ... then i am able to authorise the app ... I receive the oauth token and verifier from the redirected Url ... But i don't know how to get back to the callback  in twitterViewController. Please have a look at the two files attached.
TwitterFiles.zip
Thanks for helping!

your callback url is https://api-dev.kyral.app/callback/twitter
but you keep code about "oauth-swift" url scheme let url = navigationAction.request.url, url.scheme == "oauth-swift"
Dit https://api-dev.kyral.app/callback/twitter  redirect to oauth-swift://xxxx.? with token etc??
The app delegate code that must be executed is "OAuthSwift.handle(url: url)"
And IT IS my first question, did you put a breakpoint here...
if you implement as you say app delegate, you  have that code
and it is because  UIApplication.shared.open(url, options: [:], completionHandler: nil) will open oauth-swift:// and then the code in app delegate will be executed
if you cannot use url scheme because of your https://api-dev.kyral.app/callback/twitter
you check that the url match your one and make the same call that you can see here :
https://github.com/OAuthSwift/OAuthSwift/blob/1.4.1/Demo/Common/WebViewController.swift#L86
or call directly "OAuthSwift.handle(url: url)" to launch the callback

@phimage Yes it was not being called due to the https://api-dev.kyral.app/callback/twitter
It worked using the OAuthSwift.handle(url: url)
Thanks a lot!


fix(command-dev): ensure no orphaned child process on Windows

- Summary
Fixes #3251.
On Windows, the dev command does not properly terminate the framework process on exit, and leaves them running even though netlify-cli has exited.
This is because execa defaults to windowsHide: true, which seems to interfere with terminating child processes: sindresorhus/execa#433.
Other projects have also encountered this issue with execa's defaults and Windows: snowpackjs/snowpack#1022, lerna/lerna#2946.
Let's set windowsHide: false so that the framework process will terminate properly on exit.
- Test plan
Run netlify dev with this PR and attempt to exit on Windows (e.g. via Ctrl-C). No framework processes should be left running after exit.
- A picture of a cute animal (not mandatory but encouraged)
🦓

Thanks a lot for looking into this @Xenonym.
This is a rather tricky one. Both true and false values for windowsHide have downsides. The two following comments are pointing to many issues discussing this in more details (here and there).
The CTRL-C issue has actually been mentioned in the following core Node.js issue (https://github.com/nodejs/node/issues/29837).
Overall, I think using windowsHide: false might be the lesser evil, so let's give this a go :+1:


Non greedy regex

This fixes an issue where require statements that did something with the required package, e.g.
var majorVersion = require('package.version').split('.')[0];

Would be turned into:
var majorVersion = undefined.split('.')[0];

Because the regex was greedily matching from require( to .split('.')
It depends on #4 being merged.

Bump :)

Thanks! I missed this.
I just pushed as 0.2.2


Add support for local execution with docker container and task groups

We need the support in local scheduler to provide docker container, mounts as well as number of gpus and tasks. We also need it to support task groups, which should accept their own containers/mounts for each task, so that we can launch the same workflows as running on slurm (e.g. server-client). All tasks in a group would start in parallel and run until any of them fail or finish normally

NeMo-Run now supports Docker executor.


Unable to tab into slider in version 1.5.8

Upgrading from v1.5.0 to v1.5.8 I am no longer able to tab into the slider

I just tried to use tab and it's moving between the prev/next buttons and the dots. Try it on this jsfiddle
Or I am missing something?

@ahmadalfy In my config I don't have any next/prev or dots enabled, in version 1.5 you can tab into each slide item but when I upgraded it just skips past the whole slider.

@gunnx Are you by any chance using <a> tags for your slides? It looks like the accessibility updates in 1.5.6 have broken keyboard tabbing when you use <a> tags.

I also ran in to this issue. I'm making a slider where the slide items do not contain any a, button, etc tags, I am instead using a onclick handler on the elements themselves to swap out another element (video iframe).
Introducing an  tag inside each slide to wrap the slide's contents has actually fixed the issue, because activateADA() sets tabindex to 0 for any of a specific set of elements, such as , that are inside active slides.
I believe this problem was introduced in fix #1637 which changed activateADA() to no longer set tabindex to 0 on active slides, which it used to in older versions.

@mbednarek81 Hi, no I using img tag wrapped in a div


In Homekit: My accessory isn't shown here

Following a migration from a raspberry instance of Homebridge to a Synology Docker container all works fine, communication with the TV, all buttons work in the browser - I'm just unable to add the accessory in Homekit, it just doesn't show up.
The homebridge.log shows this:
[1/11/2021, 8:17:14 PM] [webostv] Initializing webostv platform...
[1/11/2021, 8:17:14 PM] [webostv] Init - initializing devices
[1/11/2021, 8:17:14 PM] [webostv] [Monitor] Init - got TV configuration, initializing device with name: Monitor
[1/11/2021, 8:17:14 PM] Monitor 459F is running on port 52178.
[1/11/2021, 8:17:14 PM] Please add [Monitor 459F] manually in Home app. Setup Code: 031-45-154

[1/11/2021, 10:36:11 PM] [webostv] [Monitor] Connected to TV
[1/11/2021, 10:36:11 PM] [webostv] [Monitor] Got TV information
[1/11/2021, 10:36:11 PM] [webostv] [Monitor] TV webOS version: 4.0
[1/11/2021, 10:36:11 PM] [webostv] [Monitor] TV turned on!
[1/11/2021, 10:36:11 PM] [webostv] [Monitor] App launched, current appId: com.webos.app.hdmi1
[1/11/2021, 10:36:11 PM] [webostv] [Monitor] Sound output changed. Current sound output: tv_external_speaker
[1/11/2021, 10:36:11 PM] [webostv] [Monitor] Subscribed to TV services
[1/11/2021, 10:36:11 PM] [webostv] [Monitor] Connected to remote pointer input socket
[1/11/2021, 10:36:11 PM] [webostv] [Monitor] Setup finished
[1/11/2021, 10:36:11 PM] [webostv] [Monitor] TV setup finished, ready to control tv

looks all fine, right?
In the moment the old instance on the pi is revived, the accessory is visible in the Add Accessory flow, add-able, and working.
So, how to convince the new instance to present itself to Homekit?
How to check it's presence independently from Homekit?
Help is appreciated!

Did you follow the README? There are additional steps which you need to do it in order for your tv to appear in HomeKit, it does not appear automatically!

Did you follow the README? There are additional steps which you need to do it in order for your tv to appear in HomeKit, it does not appear automatically!

Lets see:
✅ Installation worked fine
✅ Configuration is copied from the old pi's one
✅ mobile TV on is unchanged on the TV, already worked with the old instance
❌ Adding doesnt work. "Select the tv accessory" is empty. This is the issue here
✅ Input fetch works fine
✅ there is no firewall in my LAN
Please tell me, what did I miss?

Lets see:
✅ Installation worked fine
✅ Configuration is copied from the old pi's one
✅ mobile TV on is unchanged on the TV, already worked with the old instance
❌ Adding doesnt work. "Select the tv accessory" is empty. This is the issue here
✅ Input fetch works fine
✅ there is no firewall in my LAN
Please tell me, what did I miss?

TVs needs to be added manually to the Home app and if you followed the README and it still does not appear then this strongly indicates an issue with your local setup. It might be a homebridge issue (you could try to reinstall it or clear the homebridge cache) or it might be a network issue. Clearly something changed when you did your migration or it would still work so you must find out what that was.

TVs needs to be added manually to the Home app and if you followed the README and it still does not appear then this strongly indicates an issue with your local setup. It might be a homebridge issue (you could try to reinstall it or clear the homebridge cache) or it might be a network issue. Clearly something changed when you did your migration or it would still work so you must find out what that was.

TVs needs to be added manually to the Home app [...]

I am aware of that, see above.

and if you followed the README and it still does not appear then this strongly indicates an issue with your local setup.

I did, see above. Maybe you want to refer to a particular section in the README?
Yes, it's aparently a local setup issue.

It might be a homebridge issue (you could try to reinstall it or clear the homebridge cache)

in Homebridge, the TV was still listed under ⁞ Unpair Bridges / Cameras / TVs / External Accessories
removing that solved this issue.
you might want to mention this issue and resolution in the README ;)

[...] or it might be a network issue.

nope, see above.

Clearly something changed when you did your migration or it would still work so you must find out what that was.

I tried hard to debug this, and with your help we did.
thank you & close.

TVs needs to be added manually to the Home app [...]

I am aware of that, see above.

and if you followed the README and it still does not appear then this strongly indicates an issue with your local setup.

I did, see above. Maybe you want to refer to a particular section in the README?
Yes, it's aparently a local setup issue.

It might be a homebridge issue (you could try to reinstall it or clear the homebridge cache)

in Homebridge, the TV was still listed under ⁞ Unpair Bridges / Cameras / TVs / External Accessories
removing that solved this issue.
you might want to mention this issue and resolution in the README ;)

[...] or it might be a network issue.

nope, see above.

Clearly something changed when you did your migration or it would still work so you must find out what that was.

I tried hard to debug this, and with your help we did.
thank you & close.


Polishing before release

added some more entries to the list of servers that does not support search queries containing is-not-defined

Updated the changelog


Fix a small typo in the sql queries example

When going through the examples I noticed this tiny typo and thought I might as well fix it

Just as a reminder, the description of this repo is still using the name "whitenoise"


add a push notification in app

As a suggestion of app improvement, what about to add an in app push notification for every new post?

Certainly, after we make the MVP version, the all suggestions will are analysed and added in Milestones!
Thank, by the contribute!


Derivation/configuration to download game data from Steam?

I like to use game engines like Quakespasm, Doomsday etc, and wonder if there is a derivation / configuration.nix option to download games or game data from Steam automatically, given credentials. I'd like to automate its downloading and have a provider like those for git, etc. Does this exist or would it be okay to make?
Thanks!

Yeah, it does sound like more of a home-manager thing. Plus, it wouldn't be reverse engineering, it would more so be calling their direct steamcmd.

Yeah, it does sound like more of a home-manager thing. Plus, it wouldn't be reverse engineering, it would more so be calling their direct steamcmd.

I've just set up a starbound server. It boils down to a script like this:
#!/usr/bin/env bash

set -eu

if ! [[ -v STATE_DIRECTORY  &&  -v CREDENTIALS_DIRECTORY ]]; then
    echo "Error: Runtime dir or credential not set"
    exit 1
fi

# Update the server to the latest version
echo "Updating/installing starbound"

mkdir -p "${STATE_DIRECTORY}/.steamcmd"
steamcmd <<EOF
force_install_dir $STATE_DIRECTORY
login tlater $(cat "$CREDENTIALS_DIRECTORY/steam")
app_update 211820
quit
EOF

echo "Updating config"
if [ -f "$1" ]; then
    mkdir -p ./storage
    cp "$1" ./storage/starbound_server.config
fi

echo "Running starbound server"
patchelf --set-interpreter '@interpreter@' ./linux/starbound_server
# Must be run from the directory that the binary is in (why do game
# devs do this?)
cd linux
./starbound_server

Hooked up to a service like this:
{
  pkgs,
  lib,
  ...
}: let
  inherit (lib) concatStringsSep;
in {
  systemd.services.starbound = {
    description = "Starbound";
    after = ["network.target"];

    serviceConfig = {
      ExecStart = "${pkgs.local.starbound}/bin/launch-starbound ${./configs/starbound.json}";

      Type = "simple";

      # Credential loading for steam auth (if necessary; prefer
      # anonymous login wherever possible).
      LoadCredential = "steam:/run/secrets/steam";

      # Security settings
      DynamicUser = true;

      # This is where the StateDirectory ends up
      WorkingDirectory = "/var/lib/starbound";
      # Creates /var/lib/starbound (or rather, a symlink there to
      # /var/lib/private/starbound), and sets it up to be writeable to
      # by the dynamic user.
      StateDirectory = "starbound";

      # Note some settings below are basically tautologous with
      # `NoNewPrivileges`, but they all work slightly differently so
      # add additional layers in case of bugs.

      ## THESE SETTINGS ARE A GOOD IDEA BUT THE STEAM CLIENT IS
      ## REALLY, REALLY ANNOYING:
      ##
      # To guarantee that some settings work (only permits 64-bit syscalls, 32-bit
      # syscalls can circumvent certain restrictions).
      #
      # Obviously, if running a 32 bit game server, change this.
      # SystemCallArchitectures = "native";
      # Game servers shouldn't need to create new namespaces ever.
      #
      # TODO: Since steam uses namespaces for things *entirely
      # unrelated* to installing game servers, we need to allow
      # namespace access. Ideally I'd instead do this in an
      # ExecStartPre, but alas, this isn't possible because of
      # https://github.com/systemd/systemd/issues/19604.
      #
      # RestrictNamespaces = true;

      # Don't need to let the game server see other user accounts
      PrivateUsers = true;
      # *Probably* not harmful for game servers, which probably don't update dynamically
      ProtectHostname = true;
      # Yeah, if a game server tries to edit the hardware clock something's fishy
      ProtectClock = true;
      # Don't let game servers modify kernel settings, duh
      ProtectKernelTunables = true;
      ProtectKernelModules = true;
      ProtectKernelLogs = true;
      # Game servers shouldn't use cgroups themselves either
      ProtectControlGroups = true;
      # Most game servers will never need other socket types
      RestrictAddressFamilies = ["AF_UNIX AF_INET AF_INET6"];
      # Also a no-brainer, no game server should ever need this
      LockPersonality = true;
      # Some game servers will probably try to set this, but they
      # don't need it. It's only required for audio processing and
      # such, which the server end doesn't need to do.
      RestrictRealtime = true;
      # Don't allow a variety of syscalls that gameservers have no
      # business using anyway
      SystemCallFilter =
        "~"
        + (concatStringsSep " " [
          "@clock"
          "@cpu-emulation"
          "@debug"
          "@keyring"
          "@memlock"
          "@module"
          # "@mount"  TODO: Consider adding when steamcmd is run in ExecStartPre
          "@obsolete"
          "@raw-io"
          "@reboot"
          "@resources"
          "@setuid"
          "@swap"
        ]);
      # Normally only "read-only", but steamcmd will puke if there is
      # no home directory to write to (though the nix package will
      # implicitly symlink to the path that we set in its override, so
      # no actual files are created, besides a symlink).
      ProtectHome = "tmpfs";

      # Implied by DynamicUser anyway, but it doesn't hurt to add
      # these explicitly, at least for reference.
      RemoveIPC = true;
      PrivateTmp = true;
      PrivateDevices = true;
      NoNewPrivileges = true;
      RestrictSUIDSGID = true;
      ProtectSystem = "strict";
      # ProtectHome = "read-only"; # See further up
    };
  };
}

The steamcmd restrictions are a bit annoying, I'm unhappy with giving game servers any permissions whatsoever, let alone enough to access namespaces. I might sit down and figure out a way to run steamcmd as a separate set of systemd services that download the servers periodically instead, so that the game servers can have absolute minimal permissions, while giving steamcmd as little as possible too. Maybe I'll build some generic modules out of this, and package it all up in a flake.

It seems that someone's done it here: https://github.com/Siegema/nix-steam

So unless we want to pull it inline I'm pretty happy with that.


don't rely on Events?

I'm working on an issue related to dispose, and I ran across this comment in Node.dispose:
4892       Events.prototype.dispose.call( this ); // TODO: don't rely on Events
What does "don't rely on Events" mean?  Is there a problem with Events.dispose?....

I have no strong preferences on it. If it's helpful to wipe the listeners, go ahead.

If I wipe listeners, I suspect that's going to cause problems throughout PhET code.  I typically check hasListener before calling off, but that doesn't seem to be general practice.

If I wipe listeners, I suspect that's going to cause problems throughout PhET code.  I typically check hasListener before calling off, but that doesn't seem to be general practice.   So I'm not going to make that change.  But something to consider if we ever get around to replacing Events with Emitter.
Closing.