How to install Python dependencies

In https://github.com/yhoiseth/python-prediction-scorer/runs/786096970, pylint is complaining about missing imports. They are already installed in a previous step, but it doesn’t seem like they are “kept”. How can I run e.g. python -m pip install --upgrade pip pip-tools setuptools wheel && pip-sync so that it works with Super-Linter?

This is a great question!
I know we have had to add the lines like below before...
import click # pylint: disable=import-error

But I think it may stem from where the linter actually runs, like directory wise...
I need to do some more testing to help understand this...
I know there is a way to tell it where to find the import like: import click # pylint: import-path: /tmp/here or something like that but can't find the documentation... maybe someone more versed in pylint could help out?

I came here looking for an answer to this same question - just wanted to bump it for visibility.
I had tried the following:
    - name: Pip Installer (application dependencies)
      uses: BSFishy/pip-action@v1
      with:
         requirements: requirements.txt

But I still get import errors.

I attempted to handle this by disabling import-errors using a custom pylint configuration. Prepending import-error to the list of disabled errors at https://github.com/github/super-linter/blob/master/TEMPLATES/.python-lint#L57 prevents this error from being caught.
However, this project runs pylint using the -E/--errors-only flag in addition to using the custom configuration file. See here. The use of this flag seems to override the disabled errors present in the pylint configuration file.
The one workaround I found was to use --disable=R,C,W instead of the -E flag. This seems to disable all other types of checks except for errors, and it properly handles the disabled checks in the config file. I'm not sure if this is the right solution, but it could work.

I finally found a workaround (works with pip + requirements.txt or pipenv). The problem is to find a way to provide your dependencies to the super-linter container, and then to tell pylint where they are.
For the first step, we can install our dependencies in the container running the action, but the super-linter runs in a separate container. So we have to share the dependencies with the super-linter container, something we can do with container volumes. But we can not declare new volumes... So let's look at the volume already mounted when the super-linter runs:
-v "/var/run/docker.sock":"/var/run/docker.sock"
-v "/home/runner/work/_temp/_github_home":"/github/home"
-v "/home/runner/work/_temp/_github_workflow":"/github/workflow"
-v "/home/runner/work/<your_repo>/<your_repo>":"/github/workspace"

We could put our dependencies in /home/runner/work/<your_repo>/<your_repo>, but they will be linted too, so let's use /home/runner/work/_temp/_github_workflow.
Then we can tell pylint where are the dependencies by using the environment variable PYTHONPATH. Right, all together we get:
---
# Beginning is the same than the official documentation
name: Lint Code Base
on:
  push:
    branches-ignore:
      - 'master'
jobs:
  build:
    name: Lint Code Base
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v2
      # Here I use the system Python, which is 3.6.
      # You may install another Python version with the proper action
      - name: Install missing python packages
        run: sudo apt-get install -y --no-install-recommends python3-venv python3-setuptools
      # USE ONLY ONE THE 2 STEPS BELOW
      ## Dependencies with pip + requirements.txt
      - name: Install dependencies with pip + requirements.txt
        run: |
          python3 -m venv .venv
          .venv/bin/pip install -r requirements.txt
      ## Dependencies with pipenv
      - name: Install dependencies with pipenv
        run: |
          python3 -m pip install pipenv
          python3 -m pipenv sync --python 3.6
        env:
          PIPENV_VENV_IN_PROJECT: 1
      # Now we move the dependencies where super-linter can see them
      - name: Move the dependencies
        run: mv .venv /home/runner/work/_temp/_github_workflow
      # Now we set the PYTHONPATH to the path of the dependencies *inside* the container
      - name: Lint Code Base
        uses: docker://github/super-linter:v2.2.0
        env:
          VALIDATE_ALL_CODEBASE: true
          PYTHONPATH: "/github/workspace/:\
            /github/workflow/.venv/lib/python3.6/site-packages"
...

Hope this helps!

The other workaround is to copy the template into .github/linters/.python-lint and then add these to ignored modules at line 246. For example:
# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis. It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=flask,
                flask_talisman,
                matplotlib,
                matplotlib.pyplot,
                mistune,
                pandas,
                scour,
                werkzeug.routing,
                werkzeug.http

@jgaffiot I'm struggling to get your workaround to work, I suspect it is because some of the dependencies I need have binary components (.so libraries), and the super-linter docker image uses Alpine Python, which has musl libc, in contrast to the Ubuntu host where the venv is created, which uses glibc. Do you have any ideas on how we could make it work? :thinking: Thanks!

If the problem really comes from incompatibilities between glibc and musl, I suppose you would have to build your Python dependencies in an Alpine-based image. Unfortunately, it seems that Github does not provide Alpine-based image for actions, neither natively and neither with self-hosted runner. Perhaps by building your own action based on an image taken on DockerHub ?
The other way would be to convince Github to provide another super-linter action, based on Ubuntu, which I suspect would not be much larger than an Alpine-based one once Python is installed.

I'm a bit surprised there is not more mention in the documentation of needing this workaround for linting Python code. As a python newbie, it took me a while to track down why linting with the super-linter was producing errors when linting locally was working fine.
Thanks to jgaffiot's solution, I was able to put together something that works for my use case:

Uses ruff for linting and mypy for type checking, configured using a pyproject.toml file
Uses pipenv for dependency management
Uses .python-version file to specify the Python version

Here is what my lint job looks like:
jobs:
  lint:
    name: Lint Codebase
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        id: checkout
        uses: actions/checkout@v4
        with:
          # super-linter needs the full git history to get the
          # list of files that changed across commits
          fetch-depth: 0
      - name: Set up Python, including cache for pipenv virtual environment
        uses: actions/setup-python@v5
        with:
          python-version-file: .python-version
          cache: pipenv
      - name: Install pipenv
        run: |
          pip install --upgrade pip
          pip install pipenv
      - name: Install project dependencies
        run: pipenv install --deploy --dev
        env:
          # Install in project so that we can move the .venv directory later
          PIPENV_VENV_IN_PROJECT: true
      # Move python dependencies to a location that the super-linter will be
      # able to access when running inside its Docker container
      # /home/runner/work/_temp/_github_workflow will map to /github/workflow
      # in the Docker container
      - name: Move python dependencies
        run: mv .venv /home/runner/work/_temp/_github_workflow
      # Extract MAJOR.MINOR version from .python-version file to be used in
      # Python folder name when setting PYTHONPATH for super-linter
      - name: Get Python version from .python-version file
        id: get-python-version
        run: echo "python-version=$(cut -d '.' -f 1,2 .python-version)" >> "$GITHUB_OUTPUT"
      - name: Lint Codebase
        id: super-linter
        uses: super-linter/super-linter/slim@v6
        env:
          DEFAULT_BRANCH: main
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          LINTER_RULES_PATH: .  # Set linter rules directory to repo root
          MARKDOWN_CONFIG_FILE: .github/linters/.markdown-lint.yml
          PYTHONPATH: "/github/workspace:/github/workflow/.venv/lib/python${{ steps.get-python-version.outputs.python-version }}/site-packages"
          PYTHON_MYPY_CONFIG_FILE: pyproject.toml
          PYTHON_RUFF_CONFIG_FILE: pyproject.toml
          VALIDATE_ALL_CODEBASE: true
          VALIDATE_PYTHON_BLACK: false
          VALIDATE_PYTHON_FLAKE8: false
          VALIDATE_PYTHON_PYLINT: false
          VALIDATE_JSCPD: false
          YAML_CONFIG_FILE: .github/linters/.yaml-lint.yml


Saving to disk as Image

Hi,
Is there a method to save the identicon to disk as image once it is created?
Thanks

Hi @dbd5, there is no method yet to do that. Feel free to open a PR I'll be happy to merge it :)

Ok, thanks

Maybe it's easy to write few lines of code, like this:
$img = new \Identicon\Identicon();

ob_start();
    $img->getImage('foo@bar.baz');
    $identicon = ob_get_contents();
ob_end_clean();

$path = '/your/path/to/save/img/';
$filename = 'foo_at_bar_baz';
if (!file_exists($path . $filename)
    file_put_contents($path . $filename, $identicon);

Or maybe it could be possible to inject a method (named, for ex.: saveImageToFile($filepath, $filename, $size)) with those lines of code?

I think it should be interesting to have this feature directly inside the lib.

@dbd5 Do you plan to submit a PR or should I close your issue?

Hi @blaugueux , will be glad to but a bit tied up for the present.
This is more of a feature request now so I will go ahead and close the issue, we will revisit this again


Clarification on lifecycle of refundOffers

We need clarification on what happens when another refundOffer is requested while a previously requested refundOffer exists in the booking. Can we specify the behaviour?

Should also go to the documentation:

after the validUntil has passed, the refundOffer is gone and can be re-created
before that time has passed, no other refundOfferRequests can be sent, they would fail.
-- either need to delete or confirm the previous refundOffer before creating a new one (or wait for it to be expire)

BookingParts also have afterSaleConditions where you have afterSaleFee for Refund or Exchange, and you do not need to get a refund offer. Would these amount match in Condition and RefundOffer?

Sqills: Can't have multiple refund offers in the same time.
Proposed as recommendation in the standard.


kconfig: Use 'CONFIG_FOO_*' in #endif comments to avoid CI failures

https://github.com/zephyrproject-rtos/ci-tools/pull/65 tweaks the check
for references to undefined Kconfig symbol to whitelist anything on the
form CONFIG_FOO_* (or CONFIG_FOO_*_...). This is meant for #endif
comments that talk about many related symbols.
Fix two existing #endif comments to use that format, so that some
entries can be removed from the whitelist in the CI check.

https://github.com/zephyrproject-rtos/ci-tools/pull/65 needs to go in first.

(This is fine to merge now btw, despite that comment I deleted. Had a thought accident and thought https://github.com/zephyrproject-rtos/ci-tools/pull/65 needed to go in first, but since these are currently whitelisted, it doesn't matter.)


Update browser-automation.md

Some brackets are missing.

Hi @skokovsergey,
Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾
In return for this generous offer we hope you will:

✅ Continue to use branches and pull requests. When someone on the core team approves a pull request (yours or someone else's), you're welcome to merge it yourself.
💚 Commit to setting a good example by following and upholding our code of conduct in your interactions with other collaborators and users.
💬 Join the community Slack channel to meet the rest of the team and make yourself at home.
ℹ Don't feel obliged to help, just do what you can if you have the time and the energy.
🙋 Ask if you need anything. We're looking for feedback about how to make the project more welcoming, so please tell us!

On behalf of the Cucumber core team,
Aslak Hellesøy
Creator of Cucumber

Thank you @skokovsergey for pointing out the code example wasn't correct. I found & fixed some more typos!


Symlink issue in NFCORE_RNASEQ:RNASEQ:QUANTIFY_STAR_SALMON:TX2GENE

Description of the bug
When running the pipeline, I get an error during the TX2GENE step:

Traceback (most recent call last):
File "/XXX/.nextflow/assets/nf-core/rnaseq/bin/tx2gene.py", line 167, in
if not map_transcripts_to_gene(args.quant_type, args.gtf, args.quants, args.id, args.extra, args.output):
File "/XXX/.nextflow/assets/nf-core/rnaseq/bin/tx2gene.py", line 125, in map_transcripts_to_gene
transcripts = read_top_transcripts(quant_dir, "quant.sf" if quant_type == "salmon" else "abundance.tsv")
File "/XXX/.nextflow/assets/nf-core/rnaseq/bin/tx2gene.py", line 40, in read_top_transcripts
raise FileNotFoundError("Quantification file not found.")
FileNotFoundError: Quantification file not found.

I did some digging an found out that, in my case, the quantification files are stored in a different folder and are only linked to with symlinks from the actual "quants" folder. Since glob doesn't follow symlinks (there is an ongoing discussion how and if to make this work), it will fail and say it can't find the quantification files. I'm not sure why this is the case for me, it might be because of the -resume flag?
In case anyone else comes across this issue, I fixed it by editing the .nextflow/assets/nf-core/rnaseq/bin/tx2gene.py file and adding the following code:
import shutil

def copy_folders(quant_dir):
    for folder in os.listdir(quant_dir):
        folder_path = os.path.join(quant_dir, folder)
        if not os.path.islink(folder_path):
            continue
        link_to = os.readlink(folder_path)
        print("Symlink found: " + link_to)
        print("Copying to " + folder_path)
        os.unlink(folder_path)
        shutil.copytree(link_to, folder_path, dirs_exist_ok = True)

and then calling copy_folders(quant_dir) inside the read_top_transcripts() function just before the line quant_file_path = glob.glob(os.path.join(quant_dir, "*", file_pattern))[0]
This will check if symlinks are present and if so, copy them to the source quant_dir folder.

  Traceback (most recent call last):
    File "/XXXnextflow/assets/nf-core/rnaseq/bin/tx2gene.py", line 33, in read_top_transcripts
      quant_file_path = glob.glob(os.path.join(quant_dir, "*", file_pattern))[0]
  IndexError: list index out of range

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/XXX/.nextflow/assets/nf-core/rnaseq/bin/tx2gene.py", line 167, in <module>
      if not map_transcripts_to_gene(args.quant_type, args.gtf, args.quants, args.id, args.extra, args.output):
    File "/XXX/.nextflow/assets/nf-core/rnaseq/bin/tx2gene.py", line 125, in map_transcripts_to_gene
      transcripts = read_top_transcripts(quant_dir, "quant.sf" if quant_type == "salmon" else "abundance.tsv")
    File "/XXX/.nextflow/assets/nf-core/rnaseq/bin/tx2gene.py", line 40, in read_top_transcripts
      raise FileNotFoundError("Quantification file not found.")
  FileNotFoundError: Quantification file not found.

Relevant files
No response
System information
Nextflow version <IP_ADDRESS>91
Hardware: Ubuntu VM with CIFS attached storage
Execturor: Local
Container: Docker
OS: Ubuntu
Version: nf-core/rnaseq v3.14.0-gb89fac3

Thank you very much for reporting this issue and your thorough investigation into the underlying cause, which helps to fix the bugs more easily.
In this particular case, the tx2gene.py has since been moved into a separate module for the upcoming release 3.15. If you feel confident about opening a pull request, you could propose your changes directly on the modules repo. Fixing the module upstream ensures that the changes are propagated to all pipelines using this script.
What strikes me as odd though is, why the script needs to perform the Glob expansion within Python? After all, it is meant to be used inside a Nextflow pipeline and should thus just consume a channel containing the explicit paths to the Quant files. If need be, this channel could be constructed on a pipeline level using channel.fromPath() Glob expansion.
So while I think your fix is important for the module as it is now, I'd favor an update to the input channels of the module to handle all files and the Glob expansion with Nextflow. Maybe @pinin4fjords can elaborate, why he opted for this approach when creating the new module?

The salmon and kallisto modules output directories due to the complexity of the outputs, necessitating this approach. I will say that this is a strategy inherited from @drpatelh , even if I later tidied up the script ;-). If this is truly problematic I'm kind of surprised it hasn't come up before.
In any case, we can exploit the ** in glob to address this:
quant_file_path = glob.glob(os.path.join(quant_dir, "**", file_pattern), recursive=True)[0]

From the python docs:
If recursive is true, the pattern “**” will match any files and zero or more directories, subdirectories and symbolic links to directories. If the pattern is followed by an [os.sep](https://docs.python.org/3/library/os.html#os.sep) or [os.altsep](https://docs.python.org/3/library/os.html#os.altsep) then files will not match.

@TimFaro could you just double-check that that modification would work for you (minus your own changes)? Then I can PR to the modules repo.

The pipeline is running right now so I can't test it again (takes a long time...) but I'm like 95% sure that I first tried it with ** (as well as with pathlib.Path.glob) and it didn't follow it as well. It can find the symlink, and it would work if it would link the files directly (I think), but it's not possible to recursively iterate through a symlinked folder. I created a short test which I think shows this. orig is the original folder with the sample folders (here E1) and the quantification file (1.test) and the workdir from which the tx2gene.py script is called and quants/E1 being the symlink it should follow.
(base) xxx@xxx:~/testenv$ tree
.
├── orig
│   └── E1
│       └── 1.test
└── workdir
    └── quants
        └── E1 -> orig/E1

4 directories, 2 files
(base) xxx@xxx:~/testenv$ cd workdir/
base) xxx@xxx:~/testenv/workdir$ python
>>> import glob, os
>>> glob.glob(os.path.join("quants", "**", "*.test"), recursive=True)
[]

If you run it from the original folder, it correctly iterates the folder and finds the file
>>> glob.glob(os.path.join("../orig", "**", "*.test"), recursive=True)
['../orig/E1/1.test']

I hope I didn't miss anything :)

Why do you os.path.join("quants", "**", "*.test") upfront?
>>> glob.glob("**/*.test", recursive=True) also works on Symlinks, at least when I quickly tested on Python 3.9.

I just used os.path.join() for robustness and because it was used in the original code.
When testing it with the example file/folder structure I showed above, both glob.glob("**/*.test", recursive=True) and glob.glob("quants/*.test",  recursive=True) result in [] (specifying the folder directly with glob.glob("quants/E1/*.test",  recursive=True) doesn't work either).


fix: reject ddl rather than panic when no available parallel units to schedule

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Fix panic in creating streaming jobs when no compute nodes are alive.
Checklist For Contributors

[x] I have written necessary rustdoc comments
[x] I have added necessary unit tests and integration tests
[x] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features #7934).
[x] I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer to the issue)
[x] All checks passed in ./risedev check (or alias, ./risedev c)

Checklist For Reviewers

[ ] I have requested macro/micro-benchmarks as this PR can affect performance substantially, and the results are shown.

Documentation

[x] My PR DOES NOT contain user-facing changes.

Click here for Documentation
Types of user-facing changes
Please keep the types that apply to your changes, and remove the others.

Installation and deployment
Connector (sources & sinks)
SQL commands, functions, and operators
RisingWave cluster configuration changes
Other (please specify in the release note below)

Release note

Why did we panic with the current implementation? 👀


TypeError: unsupported array index type list(int64)<iv=None> in Tuple(slice<a:b>, list(int64)<iv=None>, slice<a:b>)

hello,I meet some troubles when I trained the CLOCs:
There are 22 candidate implementations:

Of which 20 did not match due to:
Overload of function 'getitem': File: : Line N/A.
With argument(s): '(array(float32, 3d, C), Tuple(slice<a:b>, list(int64)<iv=None>, slice<a:b>))':
No match.
Of which 2 did not match due to:
Overload in function 'GetItemBuffer.generic': File: numba/core/typing/arraydecl.py: Line 162.
With argument(s): '(array(float32, 3d, C), Tuple(slice<a:b>, list(int64)<iv=None>, slice<a:b>))':
Rejected as the implementation raised a specific error:
TypeError: unsupported array index type list(int64)<iv=None> in Tuple(slice<a:b>, list(int64)<iv=None>, slice<a:b>)

When I finished 3700 steps,I meet the above question,Can you give me some help or advice？Thanks.

I find some solutions on the Internet,just like change the function predict_v2:
opp_labels=(box_preds[...,-1] >0) ^dir_lables.byte()  →  opp_labels=(box_preds[...,-1] >0) ^dir_lables.to(torch.bool)
But it doesn't work.....

Hello @SunshineKK456 , I think I need more information regarding your error. May I know in what situation you encountered these errors? are you training with other 2D or 3D detections? Could you paste all the error message from the terminal? Thank you.

@pangsu0613  hello, I have solved the trouble. Thanks for your excellent work !

@pangsu0613 I see a same issue before, and followed the steps. Someone suggest me to change the labels‘ data type. As you can see, I tried to change the 'byte()' into the 'bool' in pred(there are no mistakes in the training), but it doesn't work. By the way, I like saber too.

@SunshineKK456 hello,I had the same problem, how did you end up solving it? I also tried to change the 'byte()' into the 'bool' in pred,but it doesn't work.


duk_def_prop() doesn't allow index as key

At least, the last time I tried to use an index instead of a string for the key, it didn't work.  If it's indeed the case that numeric indices are not allowed as keys for duk_def_prop(), would it be difficult to change it so they are?

Should be easy to change if that's the case - ultimately the index is string coerced anyway as there are no numeric properties in Ecmascript.

Yep, the internal implementation uses duk_require_hstring() at the moment so it'll reject non-string arguments.

Yeah, I just use duk_to_string() for now, but it'd be nice for API convenience if the extra step wasn't necessary. :)

Agree: duk_put_prop() accepts integers too, and so does Object.defineProperty():
((o) Duktape 1.5.0 (v1.4.0-421-g8e90d3d-dirty)
duk> x = {};
= [object Object]
duk> Object.defineProperty(x, 1, {value:'foo'})
= [object Object]
duk> x[1]
= foo

By the way isn't the string coercion avoided if the object has an array part?

Not for duk_def_prop(); it doesn't have the same fast paths as get/put prop.

I guess the defprop would discard the array part anyway since the property attributes are being restricted (I think I remember seeing something about that in the internal docs?)
Anyway I'm actually not using this for arrays but instead to make TypeScript-style serializable enums, i.e.
MyEnum[MyEnum.MyValue = 1] = "MyValue";

I use duk_def_prop() for this because I don't want the properties to be writable.

That's the behavior currently; technically it should only discard the array part if the attributes are no longer compatible with the array part assumptions (that is, writable, enumerable, configurable).

@svaarala How easy would this be to fix?  I can do it if you want. ;-)

The most trivial fix would be to change duk_require_hstring() to duk_to_hstring() so should be quite easy. Testcase changes take more time :)


close transformer state dumps even if overrides threw an error

Haven't been able to reproduce locally by running tests in a loop, but getting CI failures with new transformer resumption tests that are trying to delete for reuse a filepath for state dumps, but the file is locked so sqlite probably still has it open. My current assumption is that closedb is never called when an error is thrown by code editing the db, so this PR just uses finally to make sure that errors don't prevent closing the db

@mergifyio backport release/3.2.x

there is one remaining contention but I am testing a fix right now

now using a separate directory for the default version0 of LocalHub to prevent a race condition, and also close HubMock in more error cases to prevent false positives about it being left unclosed.
Since this change I have been unable to reproduce the failures in parallel backend/transformer test runs. I am still going to run a few more attempts at reproducing while the CI goes


Using URL anchors in markdown docs repo's vs 'user-content' prefix.

Gitea version (or commit ref): 1.12.3 (Codeberg)

Description
When using anchors within the same Markdown doc, then upon save everything works fine. The anchors are processed and the prefix user-content- is added.
But when referencing an anchor in another Markdown document in the same repo, then this doesn't work, and the prefix must be manually added to the anchor text. E.g.
- [Header 1 works](#header-1-works)
- [Subpage Header 1 does not](subfolder/subpage.md#subpage-header-1-does-not)
- [Subpage Header 1 prefixed does](subfolder/subpage.md#user-content-subpage-header-1-prefixed-does)

And does not work either.

# Header 1 works

Maybe it is hard to change this behavior, as it would require more parsing and checks of the referenced page, probably. But for working in a documentation repository with potentially many pages and cross-references (I intend to follow readme-driven development) this will be very confusing for all the people involved in refining said docs.

Please show an example on https://try.gitea.io.

You can see the issue fixes in these commits on the main README: 551e76518f, 56da6688c9

This looks to have been fixed in 1.13.0 (see #12062)

Closed as fixed. Please feel free to reopen it.


Names for gauge collectors

Hello there,
I'm using the lastest master so I fully appreciate things are still under work. I just wanted to see if I'm miunderstanding something.
In https://github.com/prometheus/client_python/blob/master/prometheus_client/registry.py#L59, we have no entry for "gauge" types. Only "gaugehistogram" meaning no additional suffixes are added to gauges. Is that expected?
Thanks,

Sylvain

Yes, that's correct. Gauges have no suffix.

Haa. Thank you for clarifying :)


heatmap options - add pheatmap

[ ] add pheatmap r package (but is it interactive like
[ ] assess zscores for stats to avoid distortion from single datapoints
[ ] check data distributions

Probably only needed for deeper analysis with diverse clustering algos


Running remind.py returns an error.
Line 153 in get_credentials
store=oauth2client.file.Storage(credential_path)
attributeError: module 'oauth2client' has no attribute 'file'
I read that oauth2 is deprecated is there a chance this script may be updated?
Sorry i am a hobbiest and not proficient in Python (although i tried)

I don't know, I haven't tested this project in years. When people have had problems like this before (with the other Pi Remind projects) it came down to the version of raspbian they installed.
https://github.com/tokland/youtube-upload/issues/245 they mention changing the import statement to fix it.

Apparently someone posted a Pull Request to implement the same fix in https://github.com/johnwargo/pi-remind-zero-blinkt/pull/1. So it must work. I'll merge it, you can try it again.

Hi John,
Your merge has indeed fixed the Script. I have successfully registered the token and have pi-remind running. Thanks

Hi, the instruction to install the Blinkt library has changed slightly from your github instruction it is now....
curl https://get.pimoroni.com/blinkt | bash

updated, thanks


Fix torii indexing models having >1 same nested types

This PR changes the names of sqlite tables for nested members from
{model_name}${type_name}${...}
to
{model_name}$(member_name}${...}
This creates a table for every nested member instead of only for distinct nested types which was causing conflicts between same nested members. Resolves issue #1320
However, this change affects model tables which are created dynamically and we don't currently have a robust way to apply migrations to these. So Slot deployed Toriis would require a restart and re-index the world.

Codecov Report
Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (1840d72) 60.31% compared to head (01eab98) 64.66%.
Report is 11 commits behind head on main.

Files
Patch %
Lines

crates/torii/core/src/model.rs
92.85%
1 Missing :warning:

crates/torii/core/src/sql.rs
75.00%
1 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1331      +/-   ##
==========================================
+ Coverage   60.31%   64.66%   +4.34%
==========================================
  Files         225      229       +4
  Lines       18953    19738     +785
==========================================
+ Hits        11431    12763    +1332
+ Misses       7522     6975     -547

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


NETOBSERV-1471 capture using gRPC

This PR implements gRPC connection from https://github.com/netobserv/flowlogs-pipeline/pull/621 & https://github.com/netobserv/netobserv-ebpf-agent/pull/291
Since the server can't run using port-forward, I took the opportunity to use oc run command instead. The pod is now running inside the cluster and only the terminal view is exposed outside.
Based on https://github.com/netobserv/network-observability-cli/pull/2
~TODO: update eBPF agent and image URL when ready before merging~

Merging this to work on https://github.com/netobserv/network-observability-cli/pull/4
Feel free to open PRs if you have any issue


[Manifest][Minorupdate]

Docs Build status updates of commit b6b0997:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error-IMDS-connectivity-error] Could not connect to DHS due to IMDS connectivity issue. Please retry building your content again. If the issue persists, please open a ticket in http://SiteHelp and include the URL of publishing report.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit 7ad3242:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/resources/schema/manifest-schema.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Docker Image URI CfnOutput Not Working

Description of the bug:
I want to create a docker image using CDK DockerImageAsset and pass the image URI to the cronjob tutorial example as an environment variable. My intention is to ultimately use the image URI for creating my service pods.
Reproduction Steps:
Just modify the example code at cdk8s-awscdk-resolver and add cdk code for building an image. Then use the CfnOutput for imageUri same way as bucket name is passed in the example:
import * as aws from 'aws-cdk-lib';
import * as k8s from 'cdk8s';
import * as kplus from 'cdk8s-plus-27';

import { AwsCdkResolver } from '@cdk8s/awscdk-resolver';
import { DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';
import { CfnOutput } from 'aws-cdk-lib';

const awsApp = new aws.App();
const stack = new aws.Stack(awsApp, 'aws');

const k8sApp = new k8s.App({ resolvers: [new AwsCdkResolver()] });
const manifest = new k8s.Chart(k8sApp, 'Manifest');

const bucket = new aws.aws_s3.Bucket(stack, 'Bucket');
const bucketName = new aws.CfnOutput(stack, 'BucketName', {
  value: bucket.bucketName,
});

const image = new DockerImageAsset(stack, 'Image', {
  directory: 'app',
});
const imageUri = new CfnOutput(stack, 'imageUri', { value: image.imageUri });

new kplus.CronJob(manifest, 'CronJob', {
  schedule: k8s.Cron.daily(),
  containers: [{
    image: 'job',
    envVariables: {
      // directly passing the value of the `CfnOutput` containing
      // the deploy time bucket name
      BUCKET_NAME: kplus.EnvValue.fromValue(bucketName.value),
      IMAGE_NAME: kplus.EnvValue.fromValue(imageUri.value)
    }
 }]
});

awsApp.synth();
k8sApp.synth();

Error Log:

Error: Failed serializing construct at path 'Manifest/CronJob/Resource' with name 'manifest-cronjob-c86481e8': Error: Unable to find output defined for ${Token[TOKEN.28]} (Inspected stacks: )
Environment:

^0.0.57:
MacOS:

Other:
I tried creating an iam role and passing the role name as env variable. That seemed to work fine.

This is :bug: Bug Report

I'm encountering this too. I did a little debugging and it appears as if the issue is the tokens for the docker image uri isn't a "Reference" like most other CfnOutput values are. Instead, it's a FnSub:

In this case, the evaluation of IsReference() resolves to false and the output isn't resolved.

I think a short-term hacky solution to this would be save the image uri to an SSM parameter and then set the CfnOutput value to the SSM Parameter's .value attribute. Thus, the output wouldn't be a FnSub but instead would be just a normal reference.


align public and private link titles

hi, can you consider removing the margin-left here and moving the private link bg image a bit (like in the image below) so that the public and private link titles are aligned?

I'll see what I can do :)

The change will be part of the next release v0.12.0 ;)


Add optional costs plugin and fix overwhelming err message size

Adds an optional table under task history in the case a SINGUALRITY_COSTS_API_URL_FORMAT is supplied. At the moment this is really for internal use but we don't have an internal-only UI build. So, I'm going to make this a configurable thing and it will be off by default
Fix the fact that large errors can cause the Messenger pop up to take over the screen. Limit the err window and scroll for overflow

:ship:


PORO Policy receiving incorrect (unexpected) type

Hey, first of all, thanks for making this! Its easy integration with Pundit and its good documentation are pretty great.
Running into an issue here - I'm looking to provide authorization and not_authorized handling on the field level. So, I copy-pasted your example, swapped out constants ... and found that the procs in the GraphqlPolicy weren't being executed.
This may be a misunderstanding of graphql-ruby itself.
Here are snippets:
the schema (verbatim from documentation, except for Types:: prefix):
  use GraphQL::Guard.new(
    policy_object: Types::GraphqlPolicy,
    not_authorized: ->(type, field) {
      handler = Types::GraphqlPolicy.not_authorized_handler(type, field)
      handler.call(type, field)
    }
  )

graphql/types/graphql_policy.rb
(named and placed that way to put it in the same load path as UserType etc, definitely open to suggestions) (pretty much copy-pasted)
module Types
  class GraphqlPolicy
    RULES = {
      UserType => {
        '*': {
          guard: ->(obj, args, ctx) { byebug; nil; UserPolicy.new(ctx[:current_user], obj.object).show? },
        },
        summary: {
          guard: ->(obj, args, ctx) { byebug; nil; UserPolicy.new(ctx[:current_user], obj.object).show_progress? },
          not_authorized: ->(type, field) { nil } # simply return nil if not authorized, no errors
        }
      }
    }

    def self.guard(type, field)
      byebug # This is the only byebug that is evaluated, and produces the output in next snippet
      RULES.dig(type, field, :guard)
    end

    def self.not_authorized_handler(type, field)
      Rails.logger.error("Calling not_authorized_handler for #{type.class}: #{type}, #{field}")
      RULES.dig(type, field, :not_authorized) || RULES.dig(type, :'*', :not_authorized)
    end
  end

The output (one of many) from that byebug statement, showing it's not matching the rule:
(byebug)
1: type = User
2: field = :*
3: RULES.dig(type, field, :guard) = nil

The output from the logger:
Calling not_authorized_handler for GraphQL::ObjectType: User, summary

Attempted workarounds:

UserType to User -> No change

UserType to GraphQL::ObjectType::User -> .../rails-root/app/graphql/types/graphql_policy.rb:4: warning: toplevel constant User referenced by GraphQL::ObjectType::User

RULES.dig("#{type.to_s}Type", field, :not_authorized) || RULES.dig("#{type.to_s}Type", :'*', :not_authorized), and using a string as the key in RULES -> it works, but is hacky and adds unnecessary overhead in string conversions

So, the problem seems to be that the parameters sent to guard don't line up with that object's shape.
What's weird, to me, is that the type is User, which isn't the graphql type name at all:
module Types
  class UserType < Types::BaseObject

User is the model's class name.
The entire point of using the PORO was to be able to deny access only to that field, returning nil (but still returning an error, ideally, and definitely errors for other fields in other queries). Unfortunately, the best I can do with this is block the whole query:
{
  "data": {
    "user": null
  },
  "errors": [
    {
      "message": "Not authorized to access summary on this User.",
      "locations": [
        {
          "line": 8,
          "column": 5
        }
      ],
      "path": [
        "user",
        "summary"
      ]
    }
  ]
}

IMO it would intuitive if we could just define not_authorized right there in the type definition:
field :summary, UserSummaryType, null: false do
not_authorized ->(type, field) { nil }
guard ->(obj, args, ctx) { UserPolicy.new(ctx[:current_user], obj.object).show_progress? }
end
but unfortunately
undefined method `not_authorized' for #<GraphQL::Schema::Field:>

PS, in the example for not_authorized_handler, there's a good chance of that returning nil, which throws a NoMethodError on call(). Shouldn't there also be a fallback to a default handler in the schema?
not_authorized: ->(type, field) {
      handler = Types::GraphqlPolicy.not_authorized_handler(type, field)
      handler ? handler.call(type, field) : GraphQL::ExecutionError.new("Not authorized to access #{field} on this #{type}.")
    }

I was able to reproduce it with graphql-ruby gem version 1.8 and class-based definitions:
module PolicyObject
  class PostType < GraphQL::Schema::Object
    field :id, ID, null: false
    field :title, String, null: true
  end

  class QueryType < GraphQL::Schema::Object
    field :posts, [PostType], null: false do
      argument :user_id, ID, required: true
    end

    def posts(user_id:)
      Post.where(user_id: user_id)
    end
  end

  class GraphqlPolicy
    RULES = {
      QueryType => {
        posts: ->(_obj, args, ctx) { args[:userId] == ctx[:current_user].id }
      },
      PostType => {
        '*': ->(_post, args, ctx) { ctx[:current_user].admin? }
      }
    }

    def self.guard(type, field)
      RULES.dig(type, field)
    end
  end

  class Schema < GraphQL::Schema
    query QueryType
    use GraphQL::Guard.new(policy_object: GraphqlPolicy)
  end
end

[14] pry(PolicyObject::GraphqlPolicy)> @

graphql-guard/spec/fixtures/policy_object_schema.rb @ line 30 PolicyObject::GraphqlPolicy.guard:

    29: def self.guard(type, field)
 => 30:   require 'pry'; binding.pry
    31:   RULES.dig(type, field)
    32: end

[15] pry(PolicyObject::GraphqlPolicy)> type
=> Post

[16] pry(PolicyObject::GraphqlPolicy)> type.class
=> GraphQL::ObjectType

[17] pry(PolicyObject::GraphqlPolicy)> type.class.ancestors
=> [GraphQL::ObjectType,
 GraphQL::BaseType,
 GraphQL::Relay::TypeExtensions,
 GraphQL::Define::InstanceDefinable,
 GraphQL::Define::NonNullWithBang,
 Object,
 PP::ObjectMixin,
 JSON::Ext::Generator::GeneratorMethods::Object,
 Kernel,
 BasicObject]

It is related to this issue https://github.com/rmosolgo/graphql-ruby/issues/1429. A workaround for now is to use type.metadata[:type_class], for example:
def self.guard(type, field)
  RULES.dig(type.metadata[:type_class], field)
end

I'm going to add a note to the readme and add tests to cover this case.

Added tests and some notes to the README in https://github.com/exAspArk/graphql-guard/pull/24

Wow, good eye for the underlying graphql-ruby issue! That's definitely it. That workaround is super easy and will make for a quick fix once he works out the kinks in the class-based schema. Thanks!


1.0.0-beta3 Handle transition in Router.run (server side)

I have  a universal application I just upgraded to<EMAIL_ADDRESS>and<EMAIL_ADDRESS>When I hit a react-router transition server side, I want to redirect at HTTP level but I cannot convert transition route name into a full path.
Server side, I use Router.run to get initial state and load data required from routes:
const location = new Location(req.path, req.query);
Router.run(routes, location, (error, initialState, transition) => {
  // error management
  if (error) return next(error);
  if (transition.isCancelled && transition.abortReason) return next(transition.abortReason);
  // handle redirection
  if (transition.isCancelled && transition.redirectInfo) {
    const { to, query, state } = transition.redirectInfo;
    // How can I transform route name into a url?
    // Because obviously I cannot access router's instance
    const url = router.makePath(to, query);
    return res.redirect(url);
  }

  // Do some store initialization
  // then...
  return res.send(ReactDOMServer.renderToString(
    <Router {...initialState} onError={next} />
  ));
});

I used to create a router instance with<EMAIL_ADDRESS>and use the onAbort event as advised in #1290 or here but Router.createElement now throws an error.
What did I miss?

might be a docs issue, might be an oversight in the rewrite

still baking SSR, this is what it will look like, and redirects should be really easy https://github.com/rackt/react-router/blob/master/docs/ServerRendering.md

Thanks a lot !

This is the correct link :runner:
https://github.com/rackt/react-router/blob/master/docs/guides/advanced/ServerRendering.md


refactor(ast/ast_builder)!: shorter allocator utility method names.

This PR serves two purposes, First off it would lower the amount of characters we have to type in for a simple operation such as wrapping an expression in a vector. Secondly, it would follow the generated names more closely since nowhere else in the builder we do have new_xxx, We always say xxx since a builder always constructs something.
new_vec -> vec
new_vec_single -> vec1*
new_vec_from_iter -> vec_from
new_vec_with_capacity -> vec_with_capacity
new_str -> str
new_atom -> atom

* This one is the main motivation behind this PR, It saves 10 characters!

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#4122  👈
#4117
#4116
#3890
#4098
#4090
#4088
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @rzvxa and the rest of your teammates on  Graphite

I agree with the logic of this change. I'd suggest vec_from_iter rather than vec_from. That might be an abbreviation too far (from what?) - and also it's not much used.

I agree with the logic of this change. I'd suggest vec_from_iter rather than vec_from. That might be an abbreviation too far (from what?) - and also it's not much used.

Sorry, my summary didn't cover all of the changes, I've changed the signature of our former new_vec_from_iter to this:
    #[inline]
    pub fn vec_from<T, I: IntoIterator<Item = T>>(self, iter: I) -> Vec<'a, T> {
        Vec::from_iter_in(iter, self.allocator)
    }

So it's no longer just "from_iter", It accepts anything that can be iterated even something like Some(T). That's why I've made the name more generic as well.

I still prefer vec_from_iter as it matches std's naming convention. We could conceivably want to add e.g. vec_from_slice later on. But I don't feel so strongly about it.

I agree with the logic of this change. I'd suggest vec_from_iter rather than vec_from. That might be an abbreviation too far (from what?) - and also it's not much used.

At first, I thought it was accepting iterators before so I sent a false comment. I removed it to write an accurate answer instead.
I chose this name because it doesn't accept Iterator, It accepts IntoIterator which can be a variety of things such as Some(T) so that's why I went with this generic name. Let me know if you don't follow my reasoning or if you have a relatively strong objection, I'm flexible for changing it.

I still prefer vec_from_iter as it matches std's naming convention (Vec::from_iter also accepts anything which can be iterated). We could conceivably want to add e.g. vec_from_slice later on. But I don't feel so strongly about it.

I agree with your reasoning, Just pushed a new commit addressing this.


🤖 - left menu opens when scrolling horizontally in a multiselect

Description
https://github.com/Tinkoff/taiga-ui/assets/12021443/7883fa42-5705-4b1b-b2f7-91cd25404580

@splincode I would like to work on it

@splincode hope you are doing well, would you like to link me to the component where this issue is occurring


Assuming rotor directions even though they are defined in parameter files

https://github.com/spencerfolk/rotorpy/blob/b6ccd20ce125474c64fc39c2a970525be629f00c/rotorpy/controllers/quadrotor_control.py#L63
This line assumes that the yaw moments alternate starting from positive r1, however, the directions are given in the vehicle parameter file under rotor_dir variable, thus they can just be taken from there.
np.array([k*(-1)**i for i in range(self.num_rotors)]).reshape(1,-1)
# Can be replaced with
(k * self.rotor_dir).reshape(1,-1)

It is hard to understand how exactly is the TM matrix created and what do the letters 'TM' are supposed to mean. I guess it's thrust mixing to forces/forces to thrust mixing.
@spencerfolk @shaoyifei96

I implemented your suggestion in  29ff3b9ddf91eeff39b01d725912a08143057bea
Thanks!!


Element-Ui The text in the el-table is crossed in the middle

Environment
npm
Reproduction
Vue.js
Describe the bug
When I use el-table then inside el-table-column there is text and the text is crossed in the middle of the word it drops a line even before the space what to do?!!?!
Additional context
No response
Logs
No response

This is likely not a Nuxt issue. Let me suggest you ask for help on the Nuxt Discord. You'll probably want to create a minimal reproduction so people can see what you are trying and better help you.


StateError when reusing undisposed PhoneController

Using the PhoneFormField in a bottomsheet with a PhoneController. When reopening the bottomsheet (using the same PhoneController), we get this error:
// _StreamControllerLifeCycle interface

  StreamSubscription<T> _subscribe(void onData(T data)?, Function? onError,
      void onDone()?, bool cancelOnError) {
    if (!_isInitialState) {
      throw StateError("Stream has already been listened to.");
    }

Specifically, the line throw StateError("Stream has already been listened to."); gets triggered. It looks like once a value is pulled once, the stream no longer emits values, even if the controlled has yet to be disposed. Is this issue known? What is the current workaround? Thank you for your help!

This issue is not known and needs a repro from you side

Hello, and thank you for your reply!
This issue occurs because I set the value of the PhoneController multiple times (which is expected behavior with other controllers, like TextEditingController, for example).
I instantiate the controller like so:
@override
void initState() {
    phoneController = PhoneController(initialPhoneNumber);
    ....

I dispose of it when it's no longer needed:
  @override
  void dispose() {
    super.dispose();
    phoneController.dispose();
    ....

I assign it to a PhoneFormField widget:
PhoneFormField(
                        autovalidateMode: AutovalidateMode.onUserInteraction,
                        controller: phoneController,
                        validator: PhoneValidator.validMobile(),
                        keyboardType: TextInputType.phone,
                        decoration: const InputDecoration(
                          border: OutlineInputBorder(),
                          labelText: 'Phone',
                          hintText: 'eg. 1-212-555-1212',
                        ),
                      ),

And I clear it's value when I want to reuse it:
phoneController.reset();

However, if I want to re-open the bottomsheet where this PhoneFormField is used, I get the error.
Here is the stacktrace:
════════ Exception caught by widgets library ═══════════════════════════════════
The following StateError was thrown building _FormScope:
Bad state: Stream has already been listened to.

The relevant error-causing widget was
Form-[LabeledGlobalKey<FormState>#a2031]
When the exception was thrown, this was the stack
#3      _PhoneFormFieldState.initState
#4      StatefulElement._firstBuild
#5      ComponentElement.mount
...     Normal element mounting (4 frames)
#9      Element.inflateWidget
#10     MultiChildRenderObjectElement.inflateWidget
#11     MultiChildRenderObjectElement.mount
...     Normal element mounting (384 frames)
#395    Element.inflateWidget
#396    MultiChildRenderObjectElement.inflateWidget
#397    Element.updateChild
#398    RenderObjectElement.updateChildren
#399    MultiChildRenderObjectElement.update
#400    Element.updateChild
#401    ComponentElement.performRebuild
#402    StatefulElement.performRebuild
#403    Element.rebuild
#404    StatefulElement.update
#405    Element.updateChild
#406    ComponentElement.performRebuild
#407    Element.rebuild
#408    ProxyElement.update
#409    Element.updateChild
#410    ComponentElement.performRebuild
#411    Element.rebuild
#412    ProxyElement.update
#413    _InheritedNotifierElement.update
#414    Element.updateChild
#415    SingleChildRenderObjectElement.update
#416    Element.updateChild
#417    ComponentElement.performRebuild
#418    StatefulElement.performRebuild
#419    Element.rebuild
#420    StatefulElement.update
#421    Element.updateChild
#422    SingleChildRenderObjectElement.update
#423    Element.updateChild
#424    SingleChildRenderObjectElement.update
#425    Element.updateChild
#426    ComponentElement.performRebuild
#427    Element.rebuild
#428    ProxyElement.update
#429    Element.updateChild
#430    ComponentElement.performRebuild
#431    StatefulElement.performRebuild
#432    Element.rebuild
#433    BuildOwner.buildScope
#434    WidgetsBinding.drawFrame
#435    RendererBinding._handlePersistentFrameCallback
#436    SchedulerBinding._invokeFrameCallback
#437    SchedulerBinding.handleDrawFrame
#438    SchedulerBinding._handleDrawFrame
#442    _invoke (dart:ui/hooks.dart:151:10)
#443    PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:308:5)
#444    _drawFrame (dart:ui/hooks.dart:115:31)
(elided 6 frames from dart:async)
════════════════════════════════════════════════════════════════════════════════

Do you have the line number for  #3      _PhoneFormFieldState.initState.
Could you change the line I provided above to see if that fixes the issue ?

Thank you for your reply! The line of code on line #3 is on lines 23/24 of phone_form_field_state.dart:
_selectionSubscription = _controller.selectionRequest$
        .listen((event) => _childController.selectNationalNumber());

Can you try the latest dev branch. I just pushed a fix.

Thank you so much! It works when using the git url dependency in the pubspec.yaml file option you suggested! What was the issue that needed to be updated?

I needed to make the StreamController broadcast, as it was being listened to multiple times when you were repassing the controller.
In other words, in dart, StreamController().stream can be listened to only once. Broadcasting changes that.

fixed in 5.0.3 released on pub dev.
Thank you.


Better error messages when failure to parse Many (n..) P

Anytime we have non-zero minimum as an argument to Many (n..) P1, any errors in the parser P1 are not displayed, all we ever see is
Not enough entries, found UInt 0, but need at least UInt _

Is there a way to [also] display the error that happens in P1?
Way back in b6d4bd7d I did this refactor, which GREATLY improved the usefulness of the error message:
 def CrossRefSection = {
-  KW "xref";
-  Many (1..) CrossRefSubSection;
+  Match "xref"; Many $simpleWS; EOL;
+  @x  = CrossRefSubSection;
+  @xs = Many CrossRefSubSection;
+  ^ concat [[x],xs];  -- this greatly improves error messages when errors in 'x'
 }

It would be great to not need to do this hack/refactor.

#181 might improve the situation for this


Convert build system to Gradle

Can we convert the build system to use Gradle?
Maven vs Gradle

I'll  get it done


How to Embed Casdoor Login Page in My System's Login Page?

Describe the issue
I am integrating Casdoor as the third-party authentication platform in my application. I want to embed the Casdoor login page within my own system's login page. I tried using an iframe to achieve this, but after a successful login, the redirection happens within the iframe instead of the whole parent page.
Steps to reproduce
Create a Casdoor application and configure the redirect URI to point to a callback handler on my backend.
Embed the Casdoor login page in an iframe on my front-end.
After successful login, Casdoor redirects to the callback URI within the iframe.
Expected behavior
After successful login, I want the entire parent page to be redirected to a new URL, not just the iframe content.
Actual behavior
The iframe content gets redirected to the callback URI, while the parent page remains unchanged.
Question
How can I correctly embed the Casdoor login page into my system's login page and handle the redirection so that the parent page URL changes after a successful Casdoor login, instead of just the iframe content? or is there a better approach to achieve this?

No way to do this


Sonar: remove svelte files

Svelte is not supported

In fact, Svelte was supported but disabled because of lack of interest

@pascalgrimaud ok


Failed to watch xxx: failed to list xxx net/http: TLS handshake timeout

What happened:
When I deployed edgemesh-agent-cloud, I found that it did not work properly. And when I execute docker logs -f <edgemesh_container_id>:
I0824 12:14:27.885528       1 trace.go:205] Trace[1396859110]: "Reflector ListAndWatch" name:/code/common/informers/informers.go:87 (24-Aug-2021 12:14:17.883) (total time: 10001ms):
Trace[1396859110]: [10.001600982s] [10.001600982s] END
E0824 12:14:27.885553       1 reflector.go:127] /code/common/informers/informers.go:87: Failed to watch *v1.Service: failed to list *v1.Service: Get "https://<IP_ADDRESS>:443/api/v1/services?limit=500&resourceVersion=0": net/http: TLS handshake timeout
I0824 12:14:27.885771       1 trace.go:205] Trace[1046529680]: "Reflector ListAndWatch" name:/code/common/informers/informers.go:87 (24-Aug-2021 12:14:17.883) (total time: 10002ms):
Trace[1046529680]: [10.002072265s] [10.002072265s] END
E0824 12:14:27.885780       1 reflector.go:127] /code/common/informers/informers.go:87: Failed to watch *v1alpha3.DestinationRule: failed to list *v1alpha3.DestinationRule: Get "https://<IP_ADDRESS>:443/apis/networking.istio.io/v1alpha3/destinationrules?limit=500&resourceVersion=0": net/http: TLS handshake timeout

The log of edgemesh-agent-cloud will print a lot of net/http: TLS handshake timeout.
Why?
This may be due to the residual iptables or  ip route rules.

Iptables rules remain like:

// in edgemesh-agent-cloud container
/ # iptables -t nat -nvL
Chain PREROUTING (policy ACCEPT 83 packets, 3968 bytes)
 pkts bytes target     prot opt in     out     source               destination
   83  3968 EDGE-MESH  all  --  *      *       <IP_ADDRESS>/0            <IP_ADDRESS>/0            /* edgemesh root chain */
    0     0 EDGE-MESH  tcp  --  *      *       <IP_ADDRESS>/0            <IP_ADDRESS>/12

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 5 packets, 342 bytes)
 pkts bytes target     prot opt in     out     source               destination
   50  3042 EDGE-MESH  all  --  *      *       <IP_ADDRESS>/0            <IP_ADDRESS>/0            /* edgemesh root chain */
   81  4860 EDGE-MESH  tcp  --  *      *       <IP_ADDRESS>/0            <IP_ADDRESS>/12

Chain POSTROUTING (policy ACCEPT 50 packets, 3042 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain EDGE-MESH (4 references)
 pkts bytes target     prot opt in     out     source               destination
   45  2700 EDGE-MESH-TCP  tcp  --  *      *       <IP_ADDRESS>/0            <IP_ADDRESS>/12         /* tcp service proxy */

Chain EDGE-MESH-TCP (1 references)
 pkts bytes target     prot opt in     out     source               destination
   45  2700 DNAT       tcp  --  *      *       <IP_ADDRESS>/0            <IP_ADDRESS>/0            to:<IP_ADDRESS>:40001

PREROUTING chain and OUTPUT chain will have two EDGE-MESH targets. Then we need to delete the second rule later, for example:
iptables -t NAT -D PREROUTING 2
iptables -t NAT -D OUTPUT 2

IP ruote table rules remain like:

[root@k8s-node1 ~]# ip route show
default via <IP_ADDRESS> dev eth0 proto dhcp metric 100
<IP_ADDRESS>/12 via <IP_ADDRESS> dev cni0
<IP_ADDRESS>/24 dev cni0 proto kernel scope link src <IP_ADDRESS>
<IP_ADDRESS>/24 via <IP_ADDRESS> dev flannel.1 onlink
<IP_ADDRESS> via <IP_ADDRESS> dev eth0 proto dhcp metric 100
<IP_ADDRESS>/16 dev docker0 proto kernel scope link src <IP_ADDRESS> linkdown
<IP_ADDRESS>/24 dev eth0 proto kernel scope link src <IP_ADDRESS> metric 100

The second route rule <IP_ADDRESS>/12 via <IP_ADDRESS> dev cni0 is residual. Generally speaking, route rule will be cleared automatically when edgemesh-agent is shut down. If not, you need to clear it manually, for example:
ip route del <IP_ADDRESS>/12 via <IP_ADDRESS> dev cni0

Finally, redeploy edgemesh-agent.

/assign

The latest edgemesh-agent and can guarantee that these things will not happen. 👏

fix PR #63
/close


Delete operation for reference requests are missing

Example with v1
DELETE /groups/{id}/acceptedSenders/$ref?$id=https://graph.microsoft.com/v1.0/users/{user-id}
is not present in the OpenAPI Description, where accepted senders is a non contained collection in the group entity.
GET and POST operations on the same path item are present though.

closing as duplicate of #111


Add external link page

Allow user to add external page in the sidebar (absolute URL like https://www.google.com/) in https://github.com/premieroctet/next-admin/blob/main/apps/example/options.tsx#L150C3-L150C8

Released in 3.5.0


gunsmoke = gun + cowboy + tls + websocket

Hi,
I have problems getting gun + cowboy talking over TLS using websockets to work.
I have created a minimal example that reproduces the problem.
https://github.com/etnt/gunsmoke
It seems like a TLS "handshake" is successful but then the connection goes down
and the client side gets a:
gunsmoke_client169: handle_info, client got: {gun_error,<0.308.0>,
                                              #Ref<0.3146592152.1217134599.144411>,
                                              {stream_error,protocol_error,
                                               'Stream reset by server.'}}

Could perhaps be something wrong with my self-signed certs...or something else...?

Forgot to mention that I'm using OTP-25.

You are connecting over HTTP/2 which requires a setting to be set for it to work (extended connect). You need to set enable_connect_protocol to true in both Cowboy and Gun. Please check test/rfc8441_SUITE.erl for examples.

Ahh...I missed that part in the docs saying the prefered protocols for TLS per default is: [http2,http];
so I just removed http2 from that protocols option list and it worked.
Great, thanks!


python311Packages.openusd: 24.03 -> 24.05

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python311Packages.openusd is: Universal Scene Description
meta.homepage for python311Packages.openusd is: https://openusd.org/
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 24.05 in filename of file in /nix/store/kz3j7gydz24jnycnnrh689ilp9rgy2mv-python3.11-openusd-24.05

Rebuild report (if merged into master) (click to expand)

6 total rebuild path(s)

6 package rebuild(s)

First fifty rebuilds by attrpath

blender
blender-hip
openusd
python311Packages.openusd
python312Packages.openusd

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/kz3j7gydz24jnycnnrh689ilp9rgy2mv-python3.11-openusd-24.05 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python311Packages.openusd https://github.com/r-ryantm/nixpkgs/archive/2959257c4074f2ff0b21511ff65682ec21152048.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/2959257c4074f2ff0b21511ff65682ec21152048#python311Packages.openusd

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/kz3j7gydz24jnycnnrh689ilp9rgy2mv-python3.11-openusd-24.05
ls -la /nix/store/kz3j7gydz24jnycnnrh689ilp9rgy2mv-python3.11-openusd-24.05/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' run on x86_64-linux 1

2 packages failed to build:

blender
blender-hip

3 packages built:

openusd
python311Packages.openusd
python312Packages.openusd

Maintainer pings
cc @ShaddyDC for testing.

Oh wait, I only just noticed that blender is now broken. Will investigate

I didn't find an upstream issue yet, but this error is in the blender build logs:
blender> [ 94%] Building CXX object source/blender/io/usd/CMakeFiles/bf_io_usd.dir/hydra/material.cc.o
blender> /build/blender-4.1.1/source/blender/io/usd/hydra/instancer.cc: In member function 'virtual pxrInternal_v0_24__pxrReserved__::VtValue blender::io::hydra::InstancerData::get_data(const pxrInternal_v0_24__pxrReserved__::TfToken&) const':
blender> /build/blender-4.1.1/source/blender/io/usd/hydra/instancer.cc:55:38: error: 'struct pxrInternal_v0_24__pxrReserved__::HdInstancerTokens_StaticTokenType' has no member named 'instanceTransform'; did you mean 'instancerTransform'?
blender>    55 |   if (key == pxr::HdInstancerTokens->instanceTransform) {
blender>       |                                      ^~~~~~~~~~~~~~~~~
blender>       |                                      instancerTransform
blender> /build/blender-4.1.1/source/blender/io/usd/hydra/instancer.cc: In member function 'pxrInternal_v0_24__pxrReserved__::HdPrimvarDescriptorVector blender::io::hydra::InstancerData::primvar_descriptors(pxrInternal_v0_24__pxrReserved__::HdInterpolation) const':
blender> /build/blender-4.1.1/source/blender/io/usd/hydra/instancer.cc:78:33: error: 'struct pxrInternal_v0_24__pxrReserved__::HdInstancerTokens_StaticTokenType' has no member named 'instanceTransform'; did you mean 'instancerTransform'?
blender>    78 |         pxr::HdInstancerTokens->instanceTransform, interpolation, pxr::HdPrimvarRoleTokens->none);
blender>       |                                 ^~~~~~~~~~~~~~~~~
blender>       |                                 instancerTransform

It might be this point from the OpenUSD changlog:

Important: Removed HD_USE_DEPRECATED_INSTANCER_PRIMVAR_NAMES. In 23.11, we introduced new names for the internal instancer primvars Hydra uses for instance transforms. The rename was important to avoid accidental collisions between custom authored primvars and the internal ones. At the same time, we introduced the HD_USE_DEPRECATED_INSTANCER_PRIMVAR_NAMES option to allow authors of Hydra render delegates time to update their implementations. We announced that the setting would be removed in 24.05. Render delegate authors who need more time to update their code should not adopt 24.05 until they have completed the transition.

So I guess we'll have to wait until they fix it upstream with one of the coming releases or until a patch is available. I assume more people care about having blender build and work than having the most recent OpenUSD version, so I figure we delay this until then?

Thanks for your investigation.
Let's make it a draft so we don't accidentally merge.

Done in #320924


Forms

Hello Reviewer!
In this milestone, I have implemented the following:

[ ] Created a method current_user in your ApplicationController to make current user data available to all controllers.
[ ] Created forms to perform the following functions:

Creates a Post on behalf of the current_user
Create a comment on behalf of the current_user

[ ] Allow Users to add likes to Posts

Ps: Can you kindly add a star to this repo

Hi @thecodechaser
Can you please advise on what could be the reason for this error, on my end, it is working perfectly and I am really confused sir


Implement and observe specified scene graph traversal order

For 3DOM, we have tentatively agreed to the following scene graph traversal semantic below. We need to implement this traversal order in the current implementation of 3DOM.
Scene Graph
A scene graph is a finite, hierarchical tree structure.
In scene graph order is preorder, depth-first traversal of a scene graph.
A scene graph element is an object that participates in a scene graph.
A scene graph root is a scene graph element from which all other scene graph elements can be referenced during scene graph traversal.
A descendant of scene graph element A is any scene graph element B that may be referenced from scene graph element A, and also has a reference to the scene graph root.
A recurring scene graph element is any scene graph element that can be said to be a descendant of at least two other scene graph elements of the same scene graph.
Basic traversal
Basic traversal visits all scene graph elements in scene graph order.
Recurring scene graph elements are visited every time they are encountered during traversal.
Sparse traversal
Sparse traversal visits all scene graph elements in scene graph order.
Recurring scene graph elements are only visited the first time they are encountered during traversal.

I think this is done, at least for material nodes.


Thanks!

I only want to say THANKS for developing this tool!!! <3 <3

Happily to know you like this.