text:
TMY3 Files are not been retrieved.

Describe the bug
Looks like the url to the TMY3 link is broken as listed under fetch_tmy3_hourly_temp.  File name is stations.py
url = (
"http://rredc.nrel.gov/solar/old_data/nsrdb/"
"1991-2005/data/tmy3/{}TYA.CSV".format(usaf_id)
)
To Reproduce
Steps to reproduce the behavior:

Go to Scripts/Tutorial
Click on "Run all'
Scroll down to 'Cell 20 or 21.'
See error

Expected behavior
Jupyter Notebook Error: Could not find http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/722880TYA.CSV.
Screenshots

Desktop (please complete the following information):

OS: [e.g. macOS].
Irrelevant

Additional context
Add any other context about the problem here.

Thank you for calling this to our attention. It does appear that the NREL is no longer hosting the files at that location. It does appear that the files are still available for bulk download, so I will see if I can find a place to host the files elsewhere and make a library update to point at that new location. An alternative solution for the longer term might be to update this use the new NREL API, if it is practical to do so. A further solution might be to derive the TMY data directly from the source ISD database, if that is practical. I'll aim for the first short term fix for now.

@philngo,
One other observation in looking through the available methods - is there any reason why there is a method only to retrieve TMY3 temperature ? TMY3 comprises of other useful weather datasets, if and when you look into this, it might be worthwhile to look into expanding beyond just temperature data. I am going to take a stab at NREL API to retrieve the TMY3 data. Feel free to tag me when you start looking at that. If I have anything, I will try and contribute

@philngo,
Is there any update on TMY3 NREL API issue? Do we know by when a new release of this package is planned with this issue resolved?

@philngo I'd also like to know if there is an update on when this issue might make it onto your roadmap?  I found the location where I can do a bulk download of these files (https://nsrdb.nrel.gov/data-sets/archives.html), but now need to decide if I should build a workaround separate from eeweather or if the TMY functionality might show back up soon.  Thanks for all your work on this package!

Sorry for the delay here, I've got a PR for this change. Currently uploading archived files to the new source. Thanks for the link! https://github.com/openeemeter/eeweather/pull/65

This should be ready, let me know if it works for you!

@philngo
Thanks for the update!
However, I am still getting the same error.
RuntimeError: Could not find http://rredc.nrel.gov/solar/old_data/nsrdb/1991-2005/data/tmy3/723440TYA.CSV.

@ajaiswalopinionynamics @zf1990 @bhough199 Oops - my bad! I totally forgot to release a new version. It's up on PyPI now at eeweather==0.3.24 with the fix.

@philngo Thanks! This time it worked.

repo: openeemeter/eeweather


text:
chore: use npm workspaces to manage locking dependencies

Checklist

[x] the contributor license agreement is signed
[x] commit message follows commit guidelines
[x] tests are included
[x] screenshots are included showing significant UI changes
[x] documentation is changed or added

Description of change

https://docs.npmjs.com/cli/v7/using-npm/workspaces
locking for all packages within the project is now handled by the root
lockfile
resolves #3262 and #3265

used --force mode to override warnings about peer dependencies for now

If this is a direction the team wants to go, code build may need to be updated to run install once at the top level.

Have some errors complaining error  Error: Cannot parse filepackage.json``

Have some errors complaining error Error: Cannot parse file package.json

Resolved in 8693b4f
Now there seems to be an issue with RunTypes, which looks to be the same one see in https://github.com/openequella/openEQUELLA/pull/3247

Have some errors complaining error Error: Cannot parse file package.json

Resolved in 8693b4f
Now there seems to be an issue with RunTypes, which looks to be the same one see in #3247

Do you mean the Storybook dependency conflicts ?

Do you mean the Storybook dependency conflicts ?

I think this is RunType related: https://github.com/openequella/openEQUELLA/pull/3275/checks?check_run_id=3305552177#step:10:72 :thinking:
It looks a lot like the error from #3247 (https://github.com/openequella/openEQUELLA/pull/3247/checks?check_run_id=3224768826#step:12:70)

The error in the storybook build https://github.com/openequella/openEQUELLA/pull/3275/checks?check_run_id=3305552249#step:6:72
looks to be related to https://github.com/openequella/openEQUELLA/pull/3275#discussion_r687197538
https://github.com/openequella/openEQUELLA/blob/0ca9e2bdd29c0257670114e445a0c4dacb4b39ef/package.json#L20
is still running even though the root install is not run, will have to see if there's a way to skip the script

Thanks for taking this for a spin @ChristianMurphy :bow:
Long term we still hope to break out the REST Module (oeq-ts-rest-api) and possibly even the Front End (react-front-end) and so I'm trying to understand if this kind of move will make that harder. Thoughts?
Also, some of these are completely independent - such as autotest/IntegTester/ps and Source/Plugins/Core/com.equella.core/test/javascript (and kind of Source/Plugins/Core/com.equella.core/swaggerui) - so do we really want them all linked together?
Lastly, although maybe just a personal perception, doesn't it seems odd to manage this with workspaces and in a monorepo kind of way when first and foremost it's really a Java/Scala project being built via SBT. Could this confuse things? (That said, due to our root package.json this is already a bit blurred.)
I wonder if we're at the point where we do need to push out at least the REST Module. It seems that'd significantly solve the issues we're having. :thinking:
(And as for runtypes, gah! I wonder why that is now raising it's head - something else must be slightly odd with the setup....)

Long term we still hope to break out the REST Module (oeq-ts-rest-api) and possibly even the Front End (react-front-end) and so I'm trying to understand if this kind of move will make that harder. Thoughts?

I think not. It mainly impacts package-lock.json, the packages and scripts themselves are mostly unchanged.
It may even simplify the process, since linked pacakge (which workspaces enables) behave more like packages pulled from npm itself.

Also, some of these are completely independent - such as autotest/IntegTester/ps and Source/Plugins/Core/com.equella.core/test/javascript (and kind of Source/Plugins/Core/com.equella.core/swaggerui) - so do we really want them all linked together?

That is a really good question, which I don't have a good answer for.
I don't think it will cause any harm, lockfile version 2 still allows them to version packages independently, and uses mostly the same folder layout as non-workspace projects would have.

Lastly, although maybe just a personal perception, doesn't it seems odd to manage this with workspaces and in a monorepo kind of way when first and foremost it's really a Java/Scala project being built via SBT. Could this confuse things? (That said, due to our root package.json this is already a bit blurred.)

Maybe?
I don't see oEQ is a project so much as a federation of projects, with loosely tied together build tools.
Wanting them managed by a single build tool is a perfectly fine goal.
I don't think that npm workspaces would stand in the way of that goal.
If SBT will become the one tool to rule them all, it would mostly hinge on SBT having plugins/integrations to manage other build tools.
uPortal is a similarly eclectic project, which also went for unifying under one build tool.
There Gradle is the parent build system, it manages several Gradle sub-projects, several of those sub-projects use https://github.com/node-gradle/gradle-node-plugin to managed node builds (gradle node plugin downloads it's own node and npm on demand and manages npm build steps along side java ones)
With everything under the Gradle unbrella, ./gradle install is the only step needed to setup and build the project.
Maybe SBT has similar integrations, that could be pulled in? or similar integrations could be built out for oEQ?
As an alternative gradle has a lot more integrations pre-built and from my experience is significantly faster than SBT.

Heya @ChristianMurphy
Thank you for your considered response as always.
I think at the end of the day we need to do something here as we're starting to have all manner of things going pear shaped in CI land since upgrading Node/NPM. Yesterday we had a number of odd NPM related build failures on GHA for renovate updates.
I like your assessment that in theory moving to workspaces shouldn't make it any harder to split later, so for now maybe it is the easiest path forward. (And hey, it'll also kind of provide us a catalogue of all the nested JS projects.)
And yes, I still dream and hope for the day when time permits a migration to gradle. Although we do have some custom tasks for SBT to do some of our JS building, it's so slow and heavy that we obviously still run a lot of things independently rather than having any smooth unification of build tooling. (And you definitely wouldn't do any commit hooks reliant on SBT launching first.) One day....
I see we've caused a number of conflicts here - due to package-lock-json updates so should be easy to address. But if we can see this succeed with a green build, then yes, let's proceed and take it for a spin.

source: gharchive/pull-request

authors: ChristianMurphy PenghaiZhang edalex-ian

repo: openequella/openEQUELLA

license_type: permissive

license_source: github-api


text:
CSS validator nitpicking

the CSS parser always returns keys in lower-case. Calling .lower() on them doesn't do much. Also add this to the testcase.
the CSS parser does not support SVG attributes like fill. They never survive stylesheet.valid. Checking for them will thus always fail, as they are never present.

Thanks! :turtle:

authors: luto rixx

repo: openeventstack/pretalx


text:
Update invokefunction to return headers

Task:

Update invokefunction to return the response headers
Update the caller function named Invoke to return the body, statusCode and errors
Update example to print statusCode and body

Suggested by Simon Pezcler and Rishabh Gupta so that connectors can do better debug and potentially use the result for something.
Right now the result is abandoned.

is this the extra header params in
https://github.com/openfaas/connector-sdk/blob/d791db5110e29164b697cb133d39f40812296f01/types/controller.go#L58

source: gharchive/issue

authors: Supesharisuto alexellis

repo: openfaas/connector-sdk

license: MIT


text:
Add rstats templates

Signed-off-by: Peter Solymos psolymos@gmail.com
I created R/rstats templates using different HTTP frameworks and base images. I've decided to add the following 2 to the templates.json file of the store repository for the following reason:

rstats-minimal: vanilla R + classic watchdog on Alpine base image, should be suitable as the smallest build for text/JSON based functions not needing additional R functionality
rstats-base-plumber: R with plumber package installed + of-watchdog on Debian base image, this is the most versatile, plumber is mature with great community support and easy to add serializers/parsers through code annotation.

The https://github.com/analythium/openfaas-rstats-templates repository has other templates that might not be all suitable for mainstream consumption. The repo also has detailed documentation and an increasing number of examples.
R templates was discussed previously on Slack and offline, thanks for the great feedback.
I opened the related #114 request previously.

Hi Peter,
Is this template multi-arch?
Alex

Hi Peter,
Is this template multi-arch?
Alex

The command "jq empty store.json" exited with 0.
0.01s$ jq empty templates.json
parse error: Expected separator between values at line 362, column 5
The command "jq empty templates.json" exited with 4.
```

It seems like the build is failing. Can you look into it please?

The command "jq empty store.json" exited with 0.
0.01s$ jq empty templates.json
parse error: Expected separator between values at line 362, column 5
The command "jq empty templates.json" exited with 4.
```

It seems like the build is failing. Can you look into it please?

Thanks Alex for having a look. I haven't tested multi-arch with these templates. Should I try docker buildx as described here? What's the preferred way to test it?

Thanks Alex for having a look. I haven't tested multi-arch with these templates. Should I try docker buildx as described here? What's the preferred way to test it?

authors: alexellis psolymos

repo: openfaas/store


text:
Question regarding the rotation in BFV

Suppose we have a ciphertext with 8192 slots encrypted using BFV, e.g., C = Enc([1, 2, 3, 4, ..., 8192]).
Then we rotate this ciphertext for 1 step and get C' = EvalRotate(C, 1).
I wanted to get C' = Enc([8192, 1, 2, 3, 4, ..., 8191]) but I noticed that the result is rotated in "2 batches":
C' = Enc([4096, 1, 2, 3, 4, ..., 4095,   8192, 4097, 4098, 4099, ..., 8191]).
That is, both the first and the second half of C are rotated by one step.
Is it possible to disable this feature and just rotate the whole ciphertext by one step? Or can I change the "batch number" and get C' = Enc([128, 1, 2, 3, ..., 127,   256, 129, 130, ..., 255, ...])?

Please ask this question in the OpenFHE discourse forum at https://openfhe.discourse.group/, the main area for OpenFHE discussions. We use issues to track bugs/feature requests/etc.

authors: Qi-Pang yspolyakov

repo: openfheorg/openfhe-development

license_source: bigquery


text:
Different behavior by mouseEnabled property

import openfl.events.MouseEvent;
import openfl.display.Sprite;
class RiotCharView extends Sprite
{

    public function new()
    {
        super();
        var a :Sprite = new Sprite();
        var b:Sprite = new Sprite();
        b.graphics.beginFill(0xff0000);
        b.graphics.drawRect(0,0,100, 100);
        b.graphics.endFill();
        addChild(a);
        a.addChild(b);
        a.mouseEnabled = true;
        b.mouseEnabled = false;
        a.addEventListener(MouseEvent.CLICK, onClick);

    }

    public function onClick(e:MouseEvent):Void{
// if flash - it work
        trace("click");
    }
}

Thanks for the test code! This is working now with the changes that were just made :smile:

repo: openfl/openfl

license: mit


text:
ByteArray.hx:118: characters 9-59 : openfl.utils.ByteArrayData should be openfl.utils.ByteArray

I get
/usr/lib/haxe/lib/openfl/3,5,3/openfl/utils/ByteArray.hx:118: characters 9-59 : openfl.utils.ByteArrayData should be openfl.utils.ByteArray

When trying to compile an android app that uses stablexui. The relevant code is:
 111         @:from @:noCompletion public static function fromBytesData (bytesData:BytesData):ByteArray {
 112
 113                 #if display
 114                 return null;
 115                 #elseif flash
 116                 return bytesData;
 117                 #else
 118                 return ByteArrayData.fromBytes (Bytes.ofData (bytesData));
 119                 #end
 120
 121         }

Once that code is edited (ByteArrayData -> ByteArray), I get:
/usr/lib/haxe/lib/openfl/3,5,3/openfl/utils/ByteArray.hx:92: characters 6-12 : Class<Std> has no field is

Code is:
  84         @:from @:noCompletion public static function fromBytes (bytes:Bytes):ByteArray {
  85
  86                 #if display
  87
  88                 return null;
  89
  90                 #else
  91
  92                 if (Std.is (bytes, ByteArrayData)) {
  93
  94                         return cast bytes;
  95
  96                 } else {

I got the same Error, however I updated Haxe to v3.2.1 and got success!

Guess I'll just close this report, then... thanks @petamoriken!

i'm facing this same problem, but with hxcpp 3.2.205. here is my haxelib list:
actuate: [1.8.2] akifox-transform: [2.2.0] devicelanguage: [1.0.0] foo3d: git [dev:C:\Users\shadowv\foo3d] gamecenter: 1.0.1 [1.1.1] golems: [1.2.2] haxe-gif: [0.3.3] haxelib_client: 3.1.0-rc.4 [3.2.0-rc.3] hxcpp: 3.1.37 3.1.39 3.1.48 3.1.68 3.2.102 3.2.193 [3.2.205] 3.2.81 iap: 1.0.4 [1.0.6] lime-tools: 1.4.0 1.5.6 [1.5.7] lime: 0.9.7 1.0.0 1.0.1 2.0.1 2.0.3 2.1.0 2.1.1 2.1.3 2.3.1 2.3.3 2.4.1 2.4.4 2.7.0 2.8.2 [2.9.0] nme-dev:  nme:  openfl-admob: 1.2.1 [1.3.2] openfl-bitfive: 2.0.0 [2.1.6] openfl-gpg: 1.0.0 [1.1.0] openfl-gps-lib: 1.0.1 [1.0.2] openfl-html5: [1.4.2-beta] openfl-native: [1.4.0] openfl-samples: 1.3.0 [3.1.0] openfl-share: [1.1.0] openfl-unityads: 1.0.1 1.0.3 1.0.4 1.0.5 [1.0.6] openfl-webview: [1.0.0] openfl: 1.4.0 2.0.0 2.0.1 2.1.7 2.1.8 2.2.5 2.2.6 2.2.8 3.0.1 3.0.3 3.0.6 3.1.0 3.4.0 3.5.3 [3.6.0]
i'm doing something wrong?

getting the same error, updating all my libraries at the moment

authors: jeichelbaum petamoriken pqyptixa shadowofsoul


text:
Add Server-side image cropping and rotation in the Photo manager (expanded view accessible from the photo carousel)

What

[ ] Add Server-side image cropping and rotation in the Photo manager (expanded view accessible from the photo carousel)

Part of

#766

Working on it. This is what it will look like:

cropped image
clicked on edit: full image with crop area

authors: monsieurtanuki teolemon

repo: openfoodfacts/smooth-app


text:
[CI] Create a new GitHub Action: when a new release is published -> send to it stores

Hi everyone,
This issue is not for F-Droid, as it already starts itself by relying on Releases.
Instead, the goal here would be that when a new Release is created, automatically:

Build an iOS version and send it to the App Store
Build an Android version and send it to Google Play and the Amazon Store

I don't know what the goal of this is, but a release for android and ios is triggered by release please when it creates a release, the call found in here
https://github.com/openfoodfacts/smooth-app/blob/develop/.github/workflows/release-please.yml

I don't know what the goal of this is, but a release for android and ios is triggered by release please when it creates a release, the call found in here
develop/.github/workflows/release-please.yml

The goal is a bit different here, as we don't want to release on internal on the Google Play, but at least on alpha/beta.
And we want to support the Amazon App Store and in the future more stores, which is not relevant for the current "internal release)

I don't exactly know what your goal is, but here is the current setup (Should probably create a structogram)
We have:
android-release-to-org-openfoodfacts-scanner and ios-release-to-org-openfoodfacts-scanner (the long names due to historic reasons) they are workflow calls, meaning they can be called similar to a function and we can pass parameters.
(Before deactivating we called both from internal-release on push to master, releasing to internal)
Now iOS is called only by release please. Android is called 3 times concurrently when merging the release-please PR:

ML-Kit ARB Play store
ML-Kit APK GitHub release assets
ZXing  APK GitHub release assets

Currently, the release track internal is hard-coded in the Fast lane files (here) but it should be possible to make this a parameter as well or just change the hard-coded value. We had it set to internal intentionally so that there is always the human factor (Pierre) to do the final step: promoting in the play console.
Adding a different store can be done two ways:
Duplicating the android-release-to-org-openfoodfacts-scanner.yml and changing the logic to upload to Amazon instead of the play store (many duplicated lines)
Or my recommendation to edit the current android-release-to-org-openfoodfacts-scanner.yml to accept a different store parameter, would be just adding a new step upload-to-amazon with an conditional

Draft of what I would like :

check the release train for ios matches the build about to be made, and open a new one if necessary in line with the version.txt, and prevent release if that's the case
changelog upload for ios (and prevent release if no changelog is provided)
Update the version number on Android automatically in line with version.txt


text:
Remove tests from public API

Makes docs and other tooling happy. And also makes @Yoshanuikabundi happy. And maybe even me happy.

#662

repo: openforcefield/openff-interchange


text:
Cannot assign partial charges to molecules with 1024+ atoms

Expected behavior

I'm not sure exactly what I expected for a maximum molecule size, but I would guess the network can handle molecules much larger than 1000 molecules.
Actual behavior

As a non-expert of this codebase, it looks like this error stems from checking a lookup table which is keyed by InChI. The toolkit cannot create InChI of molecules more than 1034 atoms long. There might be other errors later in the process, I have yet to dig into this.
https://github.com/openforcefield/openff-toolkit/issues/1977
Code to reproduce the behavior

import time

import numpy

import openff.nagl
import openff.nagl_models
from openff.toolkit import Molecule
from openff.toolkit.utils.nagl_wrapper import NAGLToolkitWrapper
from openff.toolkit.utils.exceptions import EmptyInChiError

print(f"{openff.nagl.__version__=}")
print(f"{openff.nagl_models.__version__=}")

molecule = Molecule.from_smiles(341 * "C")

molecule.assign_partial_charges(
    partial_charge_method="openff-gnn-am1bcc-0.1.0-rc.3.pt",
    toolkit_registry=NAGLToolkitWrapper(),
)

Holy traceback, batman!
openff.nagl.__version__='0.5.0'
openff.nagl_models.__version__='0.3.0'
Warning: OECreateInChI: InChI only supports molecules with between 1 and 1023 atoms! (note: large molecule support is experimental)
---------------------------------------------------------------------------
EmptyInChiError                           Traceback (most recent call last)
Cell In[1], line 17
     12 print(f"{openff.nagl_models.__version__=}")
     15 molecule = Molecule.from_smiles(341 * "C")
---> 17 molecule.assign_partial_charges(
     18     partial_charge_method="openff-gnn-am1bcc-0.1.0-rc.3.pt",
     19     toolkit_registry=NAGLToolkitWrapper(),
     20 )

File ~/micromamba/envs/openff-interchange-env/lib/python3.11/site-packages/openff/toolkit/topology/molecule.py:2687, in FrozenMolecule.assign_partial_charges(self, partial_charge_method, strict_n_conformers, use_conformers, toolkit_registry, normalize_partial_charges)
   2685 elif isinstance(toolkit_registry, ToolkitWrapper):
   2686     toolkit_wrapper: ToolkitWrapper = toolkit_registry
-> 2687     toolkit_wrapper.assign_partial_charges(  # type: ignore[attr-defined]
   2688         self,
   2689         partial_charge_method=partial_charge_method,
   2690         use_conformers=use_conformers,
   2691         strict_n_conformers=strict_n_conformers,
   2692         normalize_partial_charges=normalize_partial_charges,
   2693         _cls=self.__class__,
   2694     )
   2695 else:
   2696     raise InvalidToolkitRegistryError(
   2697         f"Invalid toolkit_registry passed to assign_partial_charges."
   2698         f"Expected ToolkitRegistry or ToolkitWrapper. Got  {type(toolkit_registry)}"
   2699     )

File ~/micromamba/envs/openff-interchange-env/lib/python3.11/site-packages/openff/toolkit/utils/nagl_wrapper.py:142, in NAGLToolkitWrapper.assign_partial_charges(self, molecule, partial_charge_method, use_conformers, strict_n_conformers, normalize_partial_charges, _cls)
    136     raise ChargeMethodUnavailableError(
    137         f"Charge model {partial_charge_method} not supported by "
    138         f"{self.__class__.__name__}."
    139     ) from error
    141 model = GNNModel.load(model_path, eval_mode=True)
--> 142 charges = model.compute_property(
    143     molecule,
    144     as_numpy=True,
    145     readout_name="am1bcc_charges",
    146     check_domains=True,
    147     error_if_unsupported=True,
    148 )
    150 molecule.partial_charges = Quantity(
    151     charges.astype(float),
    152     unit.elementary_charge,
    153 )
    155 if normalize_partial_charges:

File ~/micromamba/envs/openff-interchange-env/lib/python3.11/site-packages/openff/nagl/nn/_models.py:402, in GNNModel.compute_property(self, molecule, readout_name, as_numpy, check_domains, error_if_unsupported, check_lookup_table)
    362 def compute_property(
    363     self,
    364     molecule: "Molecule",
   (...)
    369     check_lookup_table: bool = True
    370 ):
    371     """
    372     Compute the trained property for a molecule.
    373
   (...)
    400     result: torch.Tensor or numpy.ndarray
    401     """
--> 402     properties = self.compute_properties(
    403         molecule=molecule,
    404         as_numpy=as_numpy,
    405         check_domains=check_domains,
    406         error_if_unsupported=error_if_unsupported,
    407         check_lookup_table=check_lookup_table
    408     )
    409     if readout_name is None:
    410         if len(properties) == 1:

File ~/micromamba/envs/openff-interchange-env/lib/python3.11/site-packages/openff/nagl/nn/_models.py:201, in GNNModel.compute_properties(self, molecule, as_numpy, check_domains, error_if_unsupported, check_lookup_table)
    197 fragments, all_indices = split_up_molecule(molecule)
    198 # TODO: this assumes atom-wise properties
    199 # we should add support for bond-wise/more general properties
--> 201 results = [
    202     self._compute_properties(
    203         fragment,
    204         as_numpy=as_numpy,
    205         check_domains=check_domains,
    206         error_if_unsupported=error_if_unsupported,
    207         check_lookup_table=check_lookup_table,
    208     )
    209     for fragment in fragments
    210 ]
    212 # combine the results
    213 combined_results = {}

File ~/micromamba/envs/openff-interchange-env/lib/python3.11/site-packages/openff/nagl/nn/_models.py:202, in <listcomp>(.0)
    197 fragments, all_indices = split_up_molecule(molecule)
    198 # TODO: this assumes atom-wise properties
    199 # we should add support for bond-wise/more general properties
    201 results = [
--> 202     self._compute_properties(
    203         fragment,
    204         as_numpy=as_numpy,
    205         check_domains=check_domains,
    206         error_if_unsupported=error_if_unsupported,
    207         check_lookup_table=check_lookup_table,
    208     )
    209     for fragment in fragments
    210 ]
    212 # combine the results
    213 combined_results = {}

File ~/micromamba/envs/openff-interchange-env/lib/python3.11/site-packages/openff/nagl/nn/_models.py:289, in GNNModel._compute_properties(self, molecule, as_numpy, check_domains, error_if_unsupported, check_lookup_table)
    287 for property_name in expected_value_keys:
    288     try:
--> 289         value = self._check_property_lookup_table(
    290             molecule=molecule,
    291             readout_name=property_name,
    292         )
    293     except KeyError as e:
    294         logger.info(
    295             f"Could not find property in lookup table: {e}"
    296         )

File ~/micromamba/envs/openff-interchange-env/lib/python3.11/site-packages/openff/nagl/nn/_models.py:359, in GNNModel._check_property_lookup_table(self, molecule, readout_name)
    336 """
    337 Check if the molecule is in the property lookup table.
    338
   (...)
    355     if the molecule is not in the property lookup table
    356 """
    358 table = self.lookup_tables[readout_name]
--> 359 return table.lookup(molecule)

File ~/micromamba/envs/openff-interchange-env/lib/python3.11/site-packages/openff/nagl/lookups.py:141, in AtomPropertiesLookupTable.lookup(self, molecule)
    121 """
    122 Look up the property value for a molecule
    123
   (...)
    137     If the property value cannot be found for this molecule
    138 """
    139 from openff.toolkit.topology import Molecule
--> 141 inchi_key = molecule.to_inchi(fixed_hydrogens=True)
    142 try:
    143     entry = self.properties[inchi_key]

File ~/micromamba/envs/openff-interchange-env/lib/python3.11/site-packages/openff/toolkit/topology/molecule.py:1760, in FrozenMolecule.to_inchi(self, fixed_hydrogens, toolkit_registry)
   1732 """
   1733 Create an InChI string for the molecule using the requested toolkit backend.
   1734 InChI is a standardised representation that does not capture tautomers unless specified using the fixed
   (...)
   1756      If an invalid object is passed as the toolkit_registry parameter
   1757 """
   1759 if isinstance(toolkit_registry, ToolkitRegistry):
-> 1760     inchi = toolkit_registry.call(
   1761         "to_inchi", self, fixed_hydrogens=fixed_hydrogens
   1762     )
   1763 elif isinstance(toolkit_registry, ToolkitWrapper):
   1764     toolkit = toolkit_registry

File ~/micromamba/envs/openff-interchange-env/lib/python3.11/site-packages/openff/toolkit/utils/toolkit_registry.py:266, in ToolkitRegistry.call(self, method_name, raise_exception_types, *args, **kwargs)
    264             for exception_type in raise_exception_types:
    265                 if isinstance(e, exception_type):
--> 266                     raise e
    267             errors.append((toolkit, e))
    269 # No toolkit was found to provide the requested capability
    270 # TODO: Can we help developers by providing a check for typos in expected method names?

File ~/micromamba/envs/openff-interchange-env/lib/python3.11/site-packages/openff/toolkit/utils/toolkit_registry.py:262, in ToolkitRegistry.call(self, method_name, raise_exception_types, *args, **kwargs)
    260 method = getattr(toolkit, method_name)
    261 try:
--> 262     return method(*args, **kwargs)
    263 except Exception as e:
    264     for exception_type in raise_exception_types:

File ~/micromamba/envs/openff-interchange-env/lib/python3.11/site-packages/openff/toolkit/utils/openeye_wrapper.py:1942, in OpenEyeToolkitWrapper.to_inchi(self, molecule, fixed_hydrogens)
   1939     inchi = oechem.OEMolToSTDInChI(oemol)
   1941 if len(inchi) == 0:
-> 1942     raise EmptyInChiError(
   1943         "OEChem failed to generate an InChI for the molecule."
   1944     )
   1946 return inchi

EmptyInChiError: OEChem failed to generate an InChI for the molecule.

Current environment

Which version are you using? (run python -c "import openff.nagl; print(openff.nagl.__version__)") 0.5.0
Which version of Python (python -V)? 3.11
Which operating system? macOS 15.1.1
What is the output of pip list?
If you use conda, what is the output of conda list? See linked toolkit issue

Huh, I didn't realize this would be an issue. Thank you -- will put in a workaround for now. However InChi might have just been the wrong choice of key if this can't generalize.

Thanks!

authors: lilyminium mattwthompson

repo: openforcefield/openff-nagl


text:
Use new model for unit-tagged arrays

Description
This PR implements the code in #60

Next up is making the Potential objects based off of this, in order to enable full JSON serialization. Might be tricky to do without defining a new class for each type of .base_unit.
In [6]: off_sys.handlers["Bonds"].json()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-6-3aaccc6b7769> in <module>
----> 1 off_sys.handlers["Bonds"].json()

~/miniconda3/envs/openff-system/lib/python3.7/site-packages/pydantic/main.cpython-37m-darwin.so in pydantic.main.BaseModel.json()

~/miniconda3/envs/openff-system/lib/python3.7/json/__init__.py in dumps(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, default, sort_keys, **kw)
    236         check_circular=check_circular, allow_nan=allow_nan, indent=indent,
    237         separators=separators, default=default, sort_keys=sort_keys,
--> 238         **kw).encode(obj)
    239
    240

~/miniconda3/envs/openff-system/lib/python3.7/json/encoder.py in encode(self, o)
    197         # exceptions aren't as detailed.  The list call should be roughly
    198         # equivalent to the PySequence_Fast that ''.join() would do.
--> 199         chunks = self.iterencode(o, _one_shot=True)
    200         if not isinstance(chunks, (list, tuple)):
    201             chunks = list(chunks)

~/miniconda3/envs/openff-system/lib/python3.7/json/encoder.py in iterencode(self, o, _one_shot)
    255                 self.key_separator, self.item_separator, self.sort_keys,
    256                 self.skipkeys, _one_shot)
--> 257         return _iterencode(o, 0)
    258
    259 def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,

~/miniconda3/envs/openff-system/lib/python3.7/site-packages/pydantic/json.cpython-37m-darwin.so in pydantic.json.pydantic_encoder()

TypeError: Object of type 'Quantity' is not JSON serializable

Superseded by #77

Superseded by #77

repo: openforcefield/openff-system


text:
使用 @ContainerCache 添加缓存后，即使缓存全部命中依然会调用查询方法

测试了一下，貌似foreach 执行 Crane4jTemplate.execute(obj) , 每次都会重新查库，没有使用缓存
换成Crane4jTemplate.execute(list)，就能正常使用缓存，同一个id只查了一次。

测试了一下，貌似foreach 执行 Crane4jTemplate.execute(obj) , 每次都会重新查库，没有使用缓存
换成Crane4jTemplate.execute(list)，就能正常使用缓存，同一个id只查了一次。

首先，参见文档中的缓存部分，如果你指的“缓存”是通过在数据源上添加 @ContainerCache 注解、或者直接在配置文件里面针对数据源配置的缓存，那么这个缓存是全局的，在你描述的两种场景中，只要缓存没有过期，那么它们应该都是生效的。
不过，如果你纠结的是为什么单次批量执行和循环单次执行查库次数不一样，那么批量查询的过程中，实际上并没有任何缓存，只查一次是因为 Crane4j 的执行器自动合并了数据源相同的查询。
如果你感觉有点抽象，那么你可以把 Crane4j 的填充行为理解成这样一个方法：
public void fill(Collection<targets> targets) {
    // 将待填充的对象根据key分组
    Map<Integer, List<Foo>> keyWithTarget = targets.stream()
        .collect(Collectors.groupBy(Foo::getId));
    Set<Integer> keys = keyWithTarget.keySet();

    // 根据key查询数据源
    Map<Integer, Data> dataWithKey = datasource.list(keys).stream()
        .collect(Collectors.toMap(Data::getId, Function::identity));

    // 根据key获取待填充对象对应数据，然后进行填充
    keyWithTarget.forEach((key, foos) -> {
        Data data = dataWithKey.get(key);
        if (Objects.nonNull(data)) {
            // 执行填充
            foos.forEach(foo -> foo.setName(data.getName));
        }
    ]})
}

你每次调用 Crane4jTemplate.execute 方法，都等同于调用一次上面的这个方法，所以你批量执行就会只查一次库，而循环执行则会每次都查一次库。

public class TaskExecutionDataResp{
@Assemble(container = "task", props = @Mapping(src = "name", ref = "taskName"))
    private Long taskId;
private String taskName;
    }

    // TasksServiceImpl

    @GuavaContainerCache
    @ContainerMethod(
            namespace = "task",
            resultType = TasksDO.class, resultKey = "id"
    )
    public TasksDO getById(Long id) {
        return baseMapper.selectById(id);
    }

  // query method
@Override
    public PageResp<TaskExecutionDataResp> page(TaskExecutionDataQuery query, PageQuery pageQuery) {
        QueryWrapper<TaskExecutionDataDO> queryWrapper = this.buildQueryWrapper(query);
        IPage<TaskExecutionDataDO> page = ((BaseMapper) this.baseMapper).selectPage(pageQuery.toPage(), queryWrapper);
        PageResp<TaskExecutionDataResp> pageResp = PageResp.build(page, this.listClass);

        List<TaskExecutionDataResp> list = pageResp.getList();
        Crane4jTemplate bean = SpringUtil.getBean(Crane4jTemplate.class);
        // 触发了10次task getById的查询，正常应该只会触发一次，后续从缓存获取了吧？
        list.forEach(taskExecutionDataResp -> bean.execute(Collections.singleton(taskExecutionDataResp)));
        return pageResp;
    }

我指的就是数据源加缓存的情况，那看起来应该是缓存没生效？还需要其他什么配置么？

cn.crane4j.core.cache.CacheableContainer#get
追了下源码，没太看懂这是什么情况😂，大佬解答一下？

public class TaskExecutionDataResp{
@Assemble(container = "task", props = @Mapping(src = "name", ref = "taskName"))
    private Long taskId;
private String taskName;
    }

    // TasksServiceImpl

    @GuavaContainerCache
    @ContainerMethod(
            namespace = "task",
            resultType = TasksDO.class, resultKey = "id"
    )
    public TasksDO getById(Long id) {
        return baseMapper.selectById(id);
    }

  // query method
@Override
    public PageResp<TaskExecutionDataResp> page(TaskExecutionDataQuery query, PageQuery pageQuery) {
        QueryWrapper<TaskExecutionDataDO> queryWrapper = this.buildQueryWrapper(query);
        IPage<TaskExecutionDataDO> page = ((BaseMapper) this.baseMapper).selectPage(pageQuery.toPage(), queryWrapper);
        PageResp<TaskExecutionDataResp> pageResp = PageResp.build(page, this.listClass);

        List<TaskExecutionDataResp> list = pageResp.getList();
        Crane4jTemplate bean = SpringUtil.getBean(Crane4jTemplate.class);
        // 触发了10次task getById的查询，正常应该只会触发一次，后续从缓存获取了吧？
        list.forEach(taskExecutionDataResp -> bean.execute(Collections.singleton(taskExecutionDataResp)));
        return pageResp;
    }

我指的就是数据源加缓存的情况，那看起来应该是缓存没生效？还需要其他什么配置么？

问题
你是对的，我用下面这个测试用例验证了一下，现在缓存确实存在问题：
@RunWith(SpringRunner.class)
@ContextConfiguration(classes = { DefaultCrane4jSpringConfiguration.class, GitHub304Test.ServiceImpl.class })
public class GitHub304Test {

    @Autowired
    private Crane4jGlobalConfiguration configuration;
    @Autowired
    private ServiceImpl serviceImpl;

    @Test
    public void test() {
        Container<?> container = configuration.getContainer("test");
        Assert.assertTrue(container instanceof CacheableContainer);
        CacheableContainer<?> cacheableContainer = (CacheableContainer<?>) container;
        CacheDefinition cacheDefinition = cacheableContainer.getCacheDefinition();
        Assert.assertEquals(CacheManager.DEFAULT_GUAVA_CACHE_MANAGER_NAME, cacheDefinition.getCacheManager());

        Map<Integer, Foo> data1 = (Map<Integer, Foo>) ((Container<Integer>)container).get(Collections.singletonList(1));
        Assert.assertEquals(1, data1.size());
        Foo foo1 = data1.get(1);
        Assert.assertNotNull(foo1);
        Assert.assertEquals(1, serviceImpl.getCounter().get());

        Map<Integer, Foo> data2 = (Map<Integer, Foo>) ((Container<Integer>)container).get(Collections.singletonList(1));
        Assert.assertEquals(1, data2.size());
        Foo foo2 = data2.get(1);
        Assert.assertNotNull(foo2);

        Assert.assertSame(foo1, foo2); // 缓存确实生效了
        Assert.assertEquals(1, serviceImpl.getCounter().get()); // 断言失败，实际的 counter 为 2
    }

    @Component
    public static class ServiceImpl {
        @Getter
        private AtomicInteger counter = new AtomicInteger(0);
        @GuavaContainerCache
        @ContainerMethod(namespace = "test", resultType = Foo.class)
        public List<Foo> getByIds(Collection<Integer> ids) {
            counter.incrementAndGet();
            return ids.stream()
                .map(Foo::new)
                .collect(Collectors.toList());
        }
    }

    @Data
    @RequiredArgsConstructor
    public static class Foo {
        private final Integer id;
    }
}

根据上面的用例，如果缓存生效，理论上 ServiceImpl#getByIds 方法应该只会被调用一次，但是实际上被调用了两次。
不过问题在于，第二次调用缓存确实生效了，因为前后两次获取的对象都一个对象，然而即使缓存全部命中，依然查了库，只不过第二次查的时候传入的就是一个空集合了。
这个问题在于 CacheableContainer#get 方法有问题，缓存 key 全部命中没有及时返回数据，而是继续查库了：
@SuppressWarnings("unchecked")
@Override
public Map<K, ?> get(Collection<K> keys) {
    CacheObject<K> current = getCurrentCache();
    Map<K, Object> caches = current.getAll(keys);

    // all keys are not cached?
    if (caches.isEmpty()) {
        if (log.isDebugEnabled()) {
            log.debug("get none cached keys [{}] from container [{}]", keys, container.getNamespace());
        }
        Map<K, Object> values = (Map<K, Object>)container.get(keys);
        current.putAll(values);
        return values;
    }

    // some keys are cached?
    keys = keys.stream()
        .filter(k -> !caches.containsKey(k)).collect(Collectors.toSet());
  	// FIX：这个地方如果缓存全部命中，那么 keys 应该是空的，此时应该直接返回数据，而不是继续执行下去

    if (log.isDebugEnabled()) {
        log.debug("get none cached keys [{}] from container [{}]", keys, container.getNamespace());
    }
    Map<K, Object> values = (Map<K, Object>)container.get(keys);
    current.putAll(values);
    // merge cached values and none cached values
    caches.putAll(values);
    return caches;
}

解决方案
目前应该所有的缓存机制都有这个问题，本周内我会发 2.8.2 修复它，在那之前，你可以先用下面这几种方案临时解决一下：

将循环单次填充改为一次批量填充；

使用 SpringCache 或者其他的缓存机制；

在本地项目建一个同路径且同名的类  cn.crane4j.core.cache.CacheableContainer，调整里面的 get 方法，然后覆盖 Crane4j 源码里面的 CacheableContainer：
@Override
public Map<K, ?> get(Collection<K> keys) {
    CacheObject<K> current = getCurrentCache();
    Map<K, Object> caches = current.getAll(keys);

    // all keys are not cached?
    if (caches.isEmpty()) {
        if (log.isDebugEnabled()) {
            log.debug("get none cached keys [{}] from container [{}]", keys, container.getNamespace());
        }
        Map<K, Object> values = (Map<K, Object>)container.get(keys);
        current.putAll(values);
        return values;
    }

    // some keys are cached?
    keys = keys.stream()
        .filter(k -> !caches.containsKey(k))
        .collect(Collectors.toSet());
    if (keys.isEmpty()) {
        return caches;
    }

    // get none cached keys from container
    if (log.isDebugEnabled()) {
        log.debug("get none cached keys [{}] from container [{}]", keys, container.getNamespace());
    }
    Map<K, Object> values = (Map<K, Object>)container.get(keys);
    current.putAll(values);
    // merge cached values and none cached values
    caches.putAll(values);
    return caches;
}

你说的是另一个问题，命中了缓存，但是还是会查DB，且ID都变成了NULL
我碰到的是另一种情况，刚好两种情况都被我碰到了：
cn.crane4j.core.cache.GuavaCacheManager.DefaultCacheFactory#getCache
public Cache<Object, Object> getCache(Long expireTime, TimeUnit timeUnit) {
            Asserts.isNotEquals(expireTime, 0L, "Expire time must not be 0");
            if (expireTime > 1) {
                return CacheBuilder.newBuilder()
                    .expireAfterWrite(expireTime, timeUnit)
                    .build();
            }
            // if expire time less than 0, use weak keys and weak values
            return CacheBuilder.newBuilder()
                .weakKeys().weakValues()
                .build();
        }

这块有点问题，过期时间为1或者不设置过期时间都会走下面的build，weakKeys会导致cache的hash计算使用的com.google.common.base.Equivalence.Identity，其中会使用System.identityHashCode(o); 计算hash，会导致同一个值两次的hashcode不一致，所以命中不到cache

你说的是另一个问题，命中了缓存，但是还是会查DB，且ID都变成了NULL
我碰到的是另一种情况，刚好两种情况都被我碰到了：
cn.crane4j.core.cache.GuavaCacheManager.DefaultCacheFactory#getCache
public Cache<Object, Object> getCache(Long expireTime, TimeUnit timeUnit) {
            Asserts.isNotEquals(expireTime, 0L, "Expire time must not be 0");
            if (expireTime > 1) {
                return CacheBuilder.newBuilder()
                    .expireAfterWrite(expireTime, timeUnit)
                    .build();
            }
            // if expire time less than 0, use weak keys and weak values
            return CacheBuilder.newBuilder()
                .weakKeys().weakValues()
                .build();
        }

这块有点问题，过期时间为1或者不设置过期时间都会走下面的build，weakKeys会导致cache的hash计算使用的com.google.common.base.Equivalence.Identity，其中会使用System.identityHashCode(o); 计算hash，会导致同一个值两次的hashcode不一致，所以命中不到cache

好家伙，坑算是给你都踩出来了。
我研究了一下，System.identityHashCode(o) 返回是原始的 hashCode，即等同于调用了对象未被重写的 hashCode，这个相当于通过 “==” 直接比较内存地址了。
也就是说，如果某个类重写了 hashCode，那么这个类的两个实例即使 equals 返回 true，且 hashCode 相等，但是通过 System.identityHashCode(o) 计算得到的依然是不相等的值。
这个问题最终会导致对于常用的 Key 类型 —— 比如 Integer、Long、String —— 来说，一旦值超过了常量池的范围，那么即使理论上 Key 应该可以命中缓存，但是实际上依然无法从 GuavaCache 中获取到缓存的数据。比如 Integer.valueOf(10086) 跟 Integer.valueOf(10086) 在匹配的时候就会被认为不是一个 Key。
这个问题在 2.8.2 会一并修复。

这个问题会在关联到 PR 以后关闭，在确认修复代码提交之前先开着吧。

authors: CrazyMelody Createsequence


text:
[BUG] Incorrect instruction counting (MINSTRET) when executing a DRET in Machine mode.

Bug Description
On the execution of dret when in machine mode, the DUT is incrementing minstret.  As the dret causes an exception it is not retired and as such should not increment minstret.  Found during simulation of the debug_test with step-and-compare.
Privileged Specification, 3.1.10 Hardware Performance Monitor: The minstret CSR counts the number of instructions the hart has retired

Related bug: https://github.com/lowRISC/ibex/issues/1132

According the Unprivileged ISA, Document Version 20191213, in Section 3.3.1:
ECALL and EBREAK cause synchronous exceptions, they are not considered to retire, and should not increment the minstret CSR.

Although this is not explicitly stated anywhere else, the above implies that no synchronous exceptions are considered to retire.  Assuming that interpretation is correct and knowing that the execution of dret when not in debug-mode is a synchronous exception, I agree that we should not be incrementing minstret in this case.

To duplicate this error, make this one line change to the cv32e20/tb/uvmt/uvmt_cv32e20_imperas_dv_wrap.sv file:
line 587 was :
void'(rvviRefCsrSetVolatile(hart_id, CSR_MINSTRET_ADDR     )); change it to: //    void'(rvviRefCsrSetVolatile(hart_id, CSR_MINSTRET_ADDR     ));
Then run the debug_test with USE_ISS=YES.  This is the command line I use with some extra logging that Duncan G. from Imperas suggested:
make test TEST=debug_test USE_ISS=YES WAVES=YES USER_RUN_FLAGS="+cve2_tracer_enable=1 +IDV_TRACE2LOG=1 +UVM_MAX_QUIT_COUNT=10,NO"
The first error I get has this output:
Info 89246: 'refRoot/cpu', 0x000000000000078a(main+606): Machine 7b200073 dret
Warning (RISCV_ILL) CPU 'refRoot/cpu' 0x0000078a 7b200073 dret: Illegal instruction - not debug mode
Info   mstatus 00000080 -> 00001800 [SD:0 TW:0 MPRV:0 XS:0(Off) FS:0(Off) MPP:0->3 VS:0(Off) MPIE:1->0 UBE:0 MIE:0]
Info   mepc 00000742 -> 0000078a
Info   mtval 7b0027f3 -> 7b200073
Info 89247: 'refRoot/cpu', 0x0000000000000100(vector_table): Machine 4170006f j       d16
Info (IDV) Instruction executed prior to mismatch '0x100(vector_table+0): 4170006f j       d16'
Error (IDV) CSR register value mismatch (HartId:0, PC:0x00000100 vector_table+0):
Error (IDV) Mismatch 0> CSR b02 (minstret)
Error (IDV)   . dut:0x00015c83
Error (IDV)   . ref:0x00015c82
UVM_ERROR @ 1689001.800 ns : idvPkg.sv(59) reporter [] uvmt_cv32e20_tb.imperas_dv.trace2api.state_compare @ 1689002.000 ns: MISMATCH

authors: LeeHoff MikeOpenHWGroup szbieg


text:
Add arxiv target

The preprint target outputs a very plain file without any styling. It is nice when the preprint version of a paper has similar formatting to the published version.
There have been requests and discussions concerning a smooth way to do this:

https://github.com/openjournals/joss/issues/132
https://github.com/openjournals/inara/pull/16 - very similar PR, but with lualatex/pdflatex issues.
https://github.com/openjournals/joss/issues/1161#issuecomment-1327657330
https://github.com/openjournals/joss/issues/1229

Some issues were raised, the biggest one being possible confusion about the publication status of a preprint. (See for example https://github.com/openjournals/joss/issues/132#issuecomment-1230300142 and https://github.com/openjournals/joss/issues/132#issuecomment-1231338773.)
In this PR I have configured pandoc to output a LaTeX file somewhat closer to that which would generate the official PDFs. In order to distinguish it from a published article, this style:

Removes the journal logo from the header.
Replaces the DOI and review details in the sidebar with Preprint: Prepared for submission to $journal.title$.
This is borrowed from JCAP's LaTeX style.
Removes the self-citation in the footer.

There are other minor differences in fonts and PDF tags because arxiv.org only supports pdflatex, not lualatex:

remove \pdfvariable omitcidset=*
remove \setmonofont{Hack}
remove \usepackage{fontsetup}

Possible issues/room for improvement:

I haven't tested this in the docker image. I could not build the docker image locally, even on main (possibly due to https://github.com/alpinelinux/docker-alpine/issues/59).
Should the references go in a .bbl, more in line with arxiv's usual processes?
Is it acceptable to use the journal logo, DOI, etc for an arxiv submission after an article is accepted?
The arxiv stamp overlaps slightly with the sidebar.

Here is  the PDF preview generated by arxiv:

This PR may not be merged here, but I figured I would put the changes out there in case they are useful to someone.

I really like this idea since it means that the regular publication and preprint can be managed in the same template

authors: cthoyt musoke

repo: openjournals/inara


text:
Clarify documentation of Image source ratio option.

Clarifies documentation for the ratio option of ImageWMS, ImageMapGuide, ImageVector and ImageCanvas. Should make it clear that the ratio should be at least 1, and that the ratio is in relation to width/height (not area).
Fixes https://github.com/openlayers/ol3/issues/3926

All the Image sources with ratios use 1.5 as default, except MapGuideImage which uses 1. Is this intended?

Thanks for the doc improvement @alvinlindstam.  I think 1.5 makes a sensible default.
The MapGuide source started out with an unconfigurable ratio of 1.  This was later extracted as an option with the same default value.  If there is a good reason to change it, it would make a pretty simple pull request.

Ok. 1.5 seems like a reasonable default. I was thinking of changing to 1.5 for MapGuide as well, for consistency but backwards comparability is more important.

authors: alvinlindstam tschaub


text:
Remove extra options from icon example

Before:

After:

I'd rather see us add dedicated examples that showcase specific options where they are useful.  In this case, I think color and opacity make for an uglier example.

I agree. Looks good to me, please merge.

authors: marcjansen tschaub


text:
Don't use goog.string.newlines.*

…instead simply use String.prototype.split with a regular expression.
I was also thinking of inlining the regular expression, so if everybody likes that better, I can update this PR.
Please review.

Looks good.  I think it is nice to create once and reuse the regex.  Please merge.

Thanks again, Tim.

I had to rebase. Will merge once everything is green again.


text:
Openlayers doesn't work with Angular+JEST

Describe the bug
I have an Angular application that is attempting to use openlayers (7.1.0) inside an Angular component. However, any unit test that imports the module in which the component is defined fails with the following error:
import BaseObject from './Object.js';
    ^^^^^^

SyntaxError: Cannot use import statement outside a module

  1 | import { Component, OnInit } from '@angular/core';
> 2 | import Map from 'ol/Map';
    | ^
  3 | import View from 'ol/View';
  4 | import { GisBaseLayer } from 'src/app/gis/models/gis-base-layer';
  5 | import { GisLayer } from '../../models/gis-layer';

  at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1796:14)

I have tried adding '/node_modules/(?!(ol|geotiff)).+\\.js$' or 'node_modules/(?!(ol)/)' to my jest.config.js, but it makes no difference. The test still fails with the same error.
To Reproduce

Create an angular application with a module containing a component that uses an openlayers map (ng generate component my-map).
Attempt to run the auto-generated unit test with JEST
Test fails with the above error

Expected behavior
Ability to use openlayers in an Angular application with jest unit tests.

We use Angular + OpenLayers and Jest just fine in https://github.com/B3Partners/tailormap-viewer

I have not been able to get this working. I looked at the tailormap-viewer and the only thing I noticed is that the tailormap-viewer jest setup is way simpler than the one for my project. I haven't been able to determine why that one works and mine doesn't. Here is a link (on stackexchange) to someone else having the same problem. No solution exists for that post.

@mkelly1495 This simple regex saved me many hours! Thank you @mprins!
transformIgnorePatterns: [
  'node_modules/(?!(.*\\.mjs$|ol|observable-fns|quick-lru|nanoid))',
],

Any updates on this issue?

Adding the suggested transformIgnorePatterns makes no difference. I still get the same result. I had actually tried that suggestion prior to posting this issue since it seems to have worked for some cases.

This is driving us mad. We can not figure out how to configure Jest to allow tests that include OpenLayers imports.
We are using Jest 28 and OpenLayers 6.5.0 but, as I'm reading here, the OpenLayers version does not make any difference.
Can someone help and prioritize this, please?
Thanks

Hi @aalbericio, do you have an error similar to the one shown in the OP? can you maybe post it here so that we can make sure that the problem isn't somewhere else?

Hi @jahow , I'm working hand in hand with @aalbericio in the same issue.
We figured out what is exactly producing the issue. This a very simple function:
import { Coordinate } from 'ol/coordinate';
import { Polygon } from 'ol/geom';

export function coordinatesToGeometry(): any {
    return new Polygon(null as Coordinate[][]);
}

When doing a simple unit test invoking such function, it is failing. This is jest output:
    ^^^^^^

    SyntaxError: Unexpected token 'export'

      2 | import { Polygon } from 'ol/geom';
      3 |
    > 4 | export function coordinatesToGeometry(): any {
        |                ^
      5 |     return new Polygon(null as Coordinate[][]);
      6 | }
      7 |

      at Runtime.createScriptFromCode (../../node_modules/jest-runtime/build/index.js:1796:14)
      at Object.<anonymous> (src/lib/core/utils/utils.ts:4:16)

As you can see the problem comes with imports from "ol/geom". Nevertheless, errors do not happen with the imports from "ol/coordinate", which are working fine.
Appreciate you can help us 🙏

Thanks, @jahow
If we call that function from a Jest test, the error arises.
This may probably affect more packages other than ol/geom
Thanks

It looks like this is still the same issue: Jest does not understand ES Modules by default, and throws an error when it encounters import/export syntax.
What does your Jest tests look like? are you able to write import { ... in jest files, or do you use require instead? In any case to use OL in your tests you will need some kind of transformer for Jest, for example babel-jest or ts-jest.
Then the transformIgnorePatterns setting comes into play because by default everything in node_modules will not processed by the Jest transformers, so you need to specifically ask Jest to not ignore OL and process its files also.
HTH

Thanks @jahow for your answer.
This is my jest test:
import { coordinatesToGeometry } from '../../core/utils/utils2';

describe('Signals shared utils tests', () => {

    describe('Check OL problem', () => {

        it('Checks that OL imports from geom are failing', () => {
            expect(coordinatesToGeometry()).toBeNull();
        });

    });
});

What I don't understand is why some imports from OL are working (e.g. "ol/coordinate") while others don't.

Wait, I just re-read your previous message and it seems Jest is actually failing on a file that is part of your project, and not on OL code. This is most likely a Jest configuration error, but I'm surprised that you didn't have a similar problem elsewhere.

What I don't understand is why some imports from OL are working (e.g. "ol/coordinate") while others don't.

Most likely because you're writing Typescript and Coordinate is a type here, and not an actual symbol (like Polygon is). This means that the code is correctly processed by Typescript before being run by Jest, but the ES6 syntax is still there and not transformed to ES5.

Thank you very much for your clarification.
Yes, seems a Jest configuration error but we don't know how to fix it. We tried several solutions but unfortunately none of them worked.

Unfortunately this is reaching a little bit too far for this issue tracker, especially since OL doesn't really seem involved here, or at least only indirectly... In any case, the issue lies almost certainly with the transfomers used by Jest and how they are configured.

Same error.

Hello all,
This may help anyone that faces this same issue:
In jest.preset.js:
moduleNameMapper: {
        '^ol/(.*)$': 'node_modules/.compiled/ol/$1.js',
}

In jest.config.ts:
moduleDirectories: [
        'node_modules/.compiled',
        'node_modules'
]

Before running any test (script in package.json):
"ol-prepare": "npx babel node_modules/ol --extensions .js --out-dir node_modules/.compiled/ol --presets @babel/preset-env",
So, you get the idea:

Transpile OL into a ".compiled" folder
Configure Jest to also rely on that folder
Configure Jest to map ol names against that folder

It works for us, and we have used this same approach for quite a few other libraries.
I hope this helps!

Hello all,
This may help anyone that faces this same issue:
In jest.preset.js:
moduleNameMapper: {
        '^ol/(.*)$': 'node_modules/.compiled/ol/$1.js',
}

In jest.config.ts:
moduleDirectories: [
        'node_modules/.compiled',
        'node_modules'
]

Before running any test (pretest script in package.json):
"ol-prepare": "npx babel node_modules/ol --extensions .js --out-dir node_modules/.compiled/ol --presets @babel/preset-env",
So, you get the idea:

Transpile OL into a ".compiled" folder
Configure Jest to also rely on that folder
Configure Jest to map ol names against that folder

It works for us, and we have used this same approach for quite a few other libraries.
I hope this helps!

Thank you for your answer.
I had the same problem, I tried your solution, it didn't work as is, but for a test that imported a file that had the following import which used to be problematic:
import { Extent, getWidth } from 'ol/extent';
changing
'^ol/(.*)$': 'node_modules/.compiled/ol/$1.js'
to
'^ol/extent/(.*)$': 'node_modules/.compiled/ol/extent/$1.js'
solved the problem. But then other imports from other direcotories in other tests are still failing.
Apparently I have to add those lines for all imports in my moduleNameMapper, e.g.:
'^ol/source/(.*)$': 'node_modules/.compiled/ol/source/$1.js'
in a file that imports:
import { TileImage } from 'ol/source';
Can all of these statements be shortened to only one?
and for some reason the following still has the same problem:
import:
import { Tile } from 'ol/layer';
map:
'^ol/layer/(.*)$': 'node_modules/.compiled/ol/layer/$1.js'
error:
    Configuration error:

    Could not locate module ol/layer/Image.js mapped as:
    node_modules/.compiled/ol/layer/$1.js.

    Please check your configuration for these entries:
    {
      "moduleNameMapper": {
        "/^ol\/layer\/(.*)$/": "node_modules/.compiled/ol/layer/$1.js"
      },
      "resolver": undefined
    }

Any ideas?
Cheers

Hello,
This configuration should work for almost all imports in OL:
'^ol(.*)$': 'node_modules/.compiled/ol$1.js',
But it's also true that is does not work with imports exported from @types/ol root index file like (Feature, etc):
import { Feature } from 'ol'
I've been reading a bit more, and the author seems to have deprecated @types/ol:
https://www.npmjs.com/package/@types/ol?activeTab=versions
So, I suggest you to rewrite those (only) imports to something like:
import Feature from 'ol/Feature
Which seems to be an accepted way of doing the import (even though some IDEs will automatically go for the wrong one in this case).
Give it a try!

@aalbericio
Thanks for your answer.
I was fiddling around with this issue for most of the last week, and I finally made it work using another approach:
My jest.config.ts:
const config: JestConfigWithTsJest = {
    extensionsToTreatAsEsm: ['.ts'],
    verbose: true,
    preset: 'ts-jest/presets/default-esm',
    testEnvironment: 'jsdom',
    transform: {
        '^.+\\.(ts|tsx)?$': ['ts-jest', { useESM: true }],
        "^.+\\.jsx?$": "babel-jest"
    },
    testPathIgnorePatterns: [
        './dist',
    ],
    moduleNameMapper: {
        '^.+\\.(css|less)$': '<rootDir>/src/config/CSSStub.js',
        '^.+\\.(jpg|png)$': '<rootDir>/src/config/ImageStub.js'
    },
    transformIgnorePatterns: [] // to override default settings
}

That empty array assigned to transformIgnorePatterns is actually important.
And then my babel.config.cjs:
module.exports = { // for babel-jest
    "presets": [
        [
            '@babel/preset-env',
            {
                targets: {
                    node: 'current'
                }
            }
        ],
        '@babel/preset-react'
    ],
}

The cjs extension is also important here, won't work as js.
I didn't have to make any changes to any code or test files. All the imports are the same.

The @types/ol package is no longer needed. OpenLayers ships with types now.

This seemed to work for me with Angular and NX
Test is just hello world map component at this point
/* eslint-disable */
export default {
  displayName: 'angular-libs-map',
  preset: '../../../jest.preset.js',
  setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
  coverageDirectory: '../../../coverage/packages/angular-libs/map',
  transform: {
    '^.+\\.(ts|mjs|js|html)$': [
      'jest-preset-angular',
      {
        tsconfig: '<rootDir>/tsconfig.spec.json',
        stringifyContentPathRegex: '\\.(html|svg)$',
      },
    ],
  },
  transformIgnorePatterns: ['node_modules/(?!(ol|ol-mapbox-style|.*\\.mjs$))'],
  snapshotSerializers: [
    'jest-preset-angular/build/serializers/no-ng-attributes',
    'jest-preset-angular/build/serializers/ng-snapshot',
    'jest-preset-angular/build/serializers/html-comment',
  ]
};

^^^^ I just updated the transformIgnorePatterns
import {enableFetchMocks} from 'jest-fetch-mock'
// @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-environment
globalThis.ngJest = {
  testEnvironmentOptions: {
    errorOnUnknownElements: true,
    errorOnUnknownProperties: true,
  },
};
import 'jest-preset-angular/setup-jest';
enableFetchMocks()
global.ResizeObserver = jest.fn().mockImplementation(() => ({
  observe: jest.fn(),
  unobserve: jest.fn(),
  disconnect: jest.fn(),
}))

^^^ I also had to add a mock for fetch and resize observer

Hello all,
This may help anyone that faces this same issue:
In jest.preset.js:
moduleNameMapper: {
        '^ol/(.*)$': 'node_modules/.compiled/ol/$1.js',
}

In jest.config.ts:
moduleDirectories: [
        'node_modules/.compiled',
        'node_modules'
]

Before running any test (pretest script in package.json):
"ol-prepare": "npx babel node_modules/ol --extensions .js --out-dir node_modules/.compiled/ol --presets @babel/preset-env",
So, you get the idea:

Transpile OL into a ".compiled" folder
Configure Jest to also rely on that folder
Configure Jest to map ol names against that folder

It works for us, and we have used this same approach for quite a few other libraries.
I hope this helps!

Hey thanks for your answer, I suspect NX may be contributing to this error, not sure how. Getting this error now:
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){export default class QuickLRU extends Map {
                                                                                ^^^^^^

SyntaxError: Unexpected token 'export'

  at Runtime.createScriptFromCode (../../node_modules/jest-runtime/build/index.js:1796:14)
  at Object.<anonymous> (../../node_modules/geotiff/dist-module/source/blockedsource.js:1:1)

Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 1.678 s Ran all test suites.

I have the same issue and same error message with QuickLRU. Did you manage to fix this problem?

Hi! We have the same problem when using react and openlayers (we get the error "SyntaxError: Cannot use import statement outside a module") and we got this when bumping to openlayers 8.2.0 but version 8.1.0 works fine.
In the release notes it says  "Nothing special is required when upgrading from 8.1. Only TypeScript users might have to make minor changes, because some types have been made more strict." but since I do not get any build errors and if I remove the tests related to OpenLayers I can run the application with no problems it does not feel like its typescript related.
I have read the comments/solutions in this issue and tried some of them... but I do not understand what has changed in 8.2.0 that would require changes in any jest/babel configs...
/Hans

We had exactly the same problem and it took us days to solve it.  We found the solution in the Jest documentation 😎
Our setup WITH PNPM AND NX : Angular 17 + JEST + OpenLayer 9.1.0
See config for transformIgnorePatterns, scroll down to TIP

Additionaly, in our jest.config.ts we added the following transformIgnorePatterns
{
  transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$|.pnpm|ol/|ol|quick-lru|lodash-es|color-(space|parse|rgba|name)/)'],
}

the tests with OL are now running successfully🍻

authors: ArashChaychi JuxhinB aalbericio ahocevar fang0rnz gest01 hoaol jahow jakwarrior mkelly1495 mprins ricardojbertolin vespertilian vkrepkiy

repo: openlayers/openlayers


text:
No Labs or samples provided

Course Details
GitHub
Description
The PDFs reference source files (CBL0001, etc) which appear to exist in #2, but no reference is made in #1.
...
Additional Context
No response

Hi, we recently re-arranged the course with release 3.0.0. As a result of the arrangement, the old Course 1 is split into 2 different courses: Course 1 (Getting Started) and Course 2 (Learning COBOL).
Course 1 details all the background information regarding the toolings that the course utilized, while Course 2 is the actual course content. The Labs are available on the Course 2 folder: https://github.com/openmainframeproject/cobol-programming-course/tree/master/COBOL Programming Course %232 - Learning COBOL


text:
[master]support create swap device with vdisk

https://github.ibm.com/zvc/planning/issues/10607
previous config:
swap_force_mdisk: False only works for swap only case( disk_pool is None, bfv + swap)
new config:
swap_default_with_mdisk: True   applies for all the cases when disk_pool is not None (including bfv+swap), if True, create swap with mdisk, if False, create swap device with vdisk

@jichenjc @SeanHQF Did above tests, except for swap only case(it hungs for the issue:https://github.ibm.com/zvc/planning/issues/17425), all the other cases are as expected(keep the current default behavior and can controled by the new config swap_default_with_mdisk)
will continue to test swap only case.

@trenxiaof this is great, can you help fix the failed test then we can merge this

please hold on the merge!!

test the swap only case on  non-ssi host， all the results are OK
On ssi host, sometime the deployement is OK, sometimes failed for the placement update problem
should be the same reason as https://github.ibm.com/zvc/planning/issues
so we can merge the pr first. Thanks @jichenjc  @SeanHQF

authors: jichenjc trenxiaof

repo: openmainframeproject/feilong


text:
fix small spelling mistake: s/oma/ome

fix small spelling mistake: s/oma/ome

Well spotted!

authors: hflynn kennethgillen

repo: openmicroscopy/ome-documentation


text:
Remove pyramids large system

Mention --wait flag
running on system like eel will fail without passing the parameter
cc @pwalczysko

Display correctly on staging. Merging


text:
Ome k8s lochy

Building on https://github.com/openmicroscopy/prod-playbooks/pull/39 referencing org's tag rather than personal branch.

Re-opening now that gh-42 is merged

@sbesson  - yes, it builds on #39

Green. Thanks guys. A few things:

Can either the description be updated or a README be added to describe what's going on here, when it should be used, by whom, etc.?
Are there plans for any testing of these playbooks?
What other files are foreseen to live in this directory? e.g. why are bootstrap and postgres subdirectories and not playbook names?

k8s: A top level directory for Kubernetes-related playbooks

bootstrap, postgres: These follow the pattern used for www and web-proxy of having one directory per server.

A few other comments, questions, & notes from the recent chat:

k8s apps are not intended for these directories (see https://github.com/openmicroscopy/kubernetes-apps)
From the inventory, what holds ome-k8s-pg-01 together with the other [kubernetes-lochy] machines? Is this PG for use by others outside k8s or will that have networking issues?
for testing of the PG setup, the contents of ome-k8s-pg-01.openmicroscopy.org.yml (minus the vault usage) should likely come back here
How did the pg box get spun up? terraform?

See https://github.com/kennethgillen/prod-playbooks/pull/1

Merging to get the 2 PRs with secrets sorted out. Thanks both.

authors: joshmoore kennethgillen manics

repo: openmicroscopy/prod-playbooks


text:
Optimize a chain or multiple residues

Is your feature request related to a problem? Please describe.
Some times I wish to optimize the geometry of specific atoms and not the whole structure.
If the atoms belong to the same residue I can use the OPT("residue") keyword to do that.
If the atoms I wish to optimize are spread among different residues or different chains, this is not possible. I can use OPT("residue"=A.AA) to optimize a sphere around the residue, which however is problematic if I do not wish to change the geometry of certain neighboring atoms or if I wish to simultaneously optimize the geometry of two areas which are distant in space.
It is not possible to specify multiple residues, for example NOOPT OPT("A2") OPT("A3") will only optimize the geometry of residue A2.
Describe the solution you'd like
An option to optimize a full chain, maybe OPT("B*") and a way to specify several residues to be optimized.
It would be nice to be able to choose atom by atom (specially if working with protein-ligand systems).
Describe alternatives you've considered
Manually edit the input file to set all interested atoms inside the same residue? Probably it would fail for residues which are distant in space however.

Multiple residues can be specified as a comma-separated list using one instance of the OPT keyword, as described in its manual entry (e.g. OPT("A2","A3") instead of OPT("A2") OPT("A3")). Also, OPT is only a convenience keyword for specifying which atomic coordinates to optimize. The more fine-grained way to do this is to use one of the extended (non-PDB) input-file formats for specifying geometry,
element_symbol x_coordinate x_opt y_coordinate y_opt z_coordinate z_opt
instead of
element_symbol x_coordinate y_coordinate z_coordinate
where the ?_opt flags are either 0 for frozen coordinates or 1 for relaxed coordinates. There are various ways of switching back and forth between PDB files and standard input files that retain PDB information as atom labels, if you want to use the more fine-grained optimization.

Thank you Jonathan, sorry while reading the documentation I was not able to grasp all these different ways to set the input.
This input file format is exactly what I was searching for, I must have missed it while reading the documentation; I'm sorry for troubling you.

authors: davidoskky godotalgorithm

repo: openmopac/mopac


text:
Try to remove excess libs pulled in by qt.

qml stuff is not actually unused. Remove it from plugins to remove it being needed.

Done

repo: openmv/openmv-ide


text:
213 rfc

References https://github.com/openownership/register/issues/213 .

For the PSC dataset, inserting new statement IDs into the destination index takes a long time, because the destination index has to be resorted each time. Optimise by introducing a second index, both of which are used for deduplication and sizes, but with usually only the second index resorted. This ensures by both indexes are kept in order at all times. Periodically (every 100K statements), merge the indexes and rewrite them, requiring a sort over all elements.
This reduces full indexing and combining of DK dataset from 1342s to 682s—almost a 2x increase in speed. Improvements are anticipated to be even better for larger datasets such as PSC.

repo: openownership/register-sources-bods


text:
LEI-4: Add LEI mappings from mappings file for existing data

One source of information needing to be synced is when a new list of LEI mappings is obtained from the bulk data. In this circumstance, each new row should be checked so that any previously unprocessed rows are processed. For any of these rows matching companies in our BODS statements with OpenCorporate identifiers that don’t include a GLEIF identifier, the statement should be republished with the new identifier.
Tasks

[ ] Can simply loop through in the initial version, querying in batches of whether any of the opencorporates identifiers have corresponding statements. If they do, without the LEI identifier, use LEI-3 (https://github.com/openownership/register-sources-oc/issues/13) to republish the statements with the new identifiers.

Estimate
6h
References

Estimate for adding LEIs identifiers (PDF)—
T4: Add LEI mappings for each row of a mappings file
T4A: Add LEI mappings from mappings file for existing data
https://github.com/openownership/register-sources-oc/issues/8

cc @StephenAbbott, @spacesnottabs

Clarifications and Questions from Discussion

See BodsStatementRepository list_matching_at_least_one_identifier.

cc @spacesnottabs

After catching up with @spacesnottabs, this issue still needs to be done, and isn't covered by LEI-1 or LEI-2 work.

The above PRs are important fixes to the LEI work. After those are in, this issue should be complete.

repo: openownership/register-sources-oc


text:
Add validation for auctions, special classification model, status workflow, deleted validation , rectificationPeriod

depends on https://github.com/openprocurement/openregistry.lots.core/pull/28
https://github.com/openprocurement/openprocurement.api/pull/294

Fix travis

authors: Leits oleksiyVeretiuk


text:
Markup failure for org.openrewrite.maven.AddRuntimeConfig generation

https://docs.openrewrite.org/recipes/maven/addruntimeconfig doesn't correctly render the separator options:

Thanks for pointing that out! That line is converted to markdown here:
https://github.com/openrewrite/rewrite-recipe-markdown-generator/blob/24bec1c9a320e07269a63fa2b76d8156f6f85c68/src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt#L947-L949
Based on the valid options in the recipe
https://github.com/openrewrite/rewrite/blob/0ed38dc6c5759fab604afd322f9eb5aa1e191019/rewrite-maven/src/main/java/org/openrewrite/maven/AddRuntimeConfig.java#L60-L64
Not quite sure what would have to change, but I'll tag @mike-solomon to have a look.

authors: Bananeweizen timtebeek

repo: openrewrite/rewrite-docs


text:
feat(editing): process remove action events

Closes #49 .

@ca-d This can be closed isn't it?

@ca-d This can be closed isn't it?

Yes, I'm closing this in favor of #61 , where I've transported these changes over to the new open-wc recommendation based project infrastructure. Thanks @juancho0202 for putting this together in preparation, I just copied the relevant parts of the code over and it worked.

authors: JakobVogelsang ca-d

repo: openscd/open-scd-core


text:
Create Editor Plugin desinged to configure IEDs

As a user of OpenSCD I want to manage IED configuration. For an easier overview IED's shall be allocated in bays in the substation and other IED'a that are connected with it shall be highlighted.
Requirement:

TBD

Type Definition:

TBD

Restriction :

TBD

Edition 1 vs Edition 2

TBD

We decided to show IEDs in the substation pane. At the moment there is noch need for another editor.

repo: openscd/open-scd


text:
cropping viewer

Hi I would like to crop the image shown in the viewer. I know that this can be done, to an extent, with the clip feature. Unfortunately a clipped image still behaves as if it wasn't clipped e.g home and minzoomlevel etc all leave an empty space. Is there a (easy) way in which I can clip the image so that OSD only recognises the visible section?
Thanks in advance any help. OSD is a fantastic product.

Hmm... we don't really have a good mechanism for this. Might be something worth adding. Some possibilities for enhancements:

Maybe we should automatically cut out the clipped portions of images when calculating the home bounds.
Maybe we should provide an explicit "setHomeBounds" method to override the automatic one. Looks like we actually had a feature like this a while ago, but it didn't survive the changes required for multi-image, rotation, etc.

If you'd be up for tackling an enhancement like that, that would be lovely.
Meanwhile, possible alternative approaches include:

Play with the defaultZoomLevel option to see if it'll give you what you want (i.e. zooming in enough to cut out the empty space).
Monkey patch OpenSeadragon.World.prototype.getHomeBounds() to return an OpenSeadragon.Rect of your choosing.

Im afraid I'd be rather out of my depth. I can only marvel at your skill. Thanks for the quick response, sounds like I'll just have to recreate the images.

Such flattery! Well, OpenSeadragon is the result of many people's work. :)
Anyway, playing with the hacks suggested above should be pretty easy if you want... defaultZoomLevel is just:
var viewer = OpenSeadragon({
  ...,
  defaultZoomLevel: 1.5 // Play with this number as needed
});

...and getHomeBounds would be:
OpenSeadragon.World.prototype.getHomeBounds = function() {
  return new OpenSeadragon.Rect(0.1, 0.1, 0.8, 0.8); // Play with these numbers
};

The only caveat with the second one is that there's a chance future versions of OpenSeadragon could break it, since what you're doing is patching the library itself. Still, probably worth giving a try.

Related issue: https://github.com/openseadragon/openseadragon/issues/643

repo: openseadragon/openseadragon


text:
Rectangle selection

Hi,
i have rotated open sea dragon viewer after that if i use rectangle selection it is drawing some other  place

Are you referring to the https://github.com/picturae/openseadragonselection/ plugin? Looks like there's already an issue filed for this:
https://github.com/picturae/openseadragonselection/issues/1
...And it looks like someone has even proposed a fix there.

Hi,
Thanks for your replay i have attached the image in that i have mention
what's the issue i am facing.
And my code :
var rectButton = document.getElementById("rect");
$scope.viewerSelection = $scope.viewer.selection({
restrictToImage: true,
toggleButton: rectButton,
onSelection: function (rectangle) {
$scope.strokeArray.length = 0;
var x1 = parseInt(rectangle.x);
var y1 = parseInt(rectangle.y);
var arr = [x1, y1];
$scope.strokeArray.push(arr);
var x2 = x1 + rectangle.width;
var y2 = y1 + rectangle.height;
var arr2 = [x2, y2];
$scope.strokeArray.push(arr2);
}
});
On Wed, Sep 25, 2019 at 3:47 AM Ian Gilman notifications@github.com wrote:

Are you referring to the
https://github.com/picturae/openseadragonselection/ plugin? Looks like
there's already an issue filed for this:
picturae/openseadragonselection#1
https://github.com/picturae/openseadragonselection/issues/1
...And it looks like someone has even proposed a fix there.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/openseadragon/openseadragon/issues/1712?email_source=notifications&email_token=AGBURRFQVUBIGCPUVCFU4MLQLKGYHA5CNFSM4IZ3MTP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7P7IEY#issuecomment-534770707,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGBURRCZURUB53M6YR3XXW3QLKGYHANCNFSM4IZ3MTPQ
.

You should try the fix I mentioned above... It's the code in this PR:
https://github.com/picturae/openseadragonselection/pull/24

Did you saw my output
On Wed, 25 Sep 2019, 3:14 pm Mohanraj R, ppy.mohan@gmail.com wrote:

Hi,
Thanks for your replay i have attached the image in that i have mention
what's the issue i am facing.
And my code :
var rectButton = document.getElementById("rect");
$scope.viewerSelection = $scope.viewer.selection({
restrictToImage: true,
toggleButton: rectButton,
onSelection: function (rectangle) {
$scope.strokeArray.length = 0;
var x1 = parseInt(rectangle.x);
var y1 = parseInt(rectangle.y);
var arr = [x1, y1];
$scope.strokeArray.push(arr);
var x2 = x1 + rectangle.width;
var y2 = y1 + rectangle.height;
var arr2 = [x2, y2];
$scope.strokeArray.push(arr2);
}
});
On Wed, Sep 25, 2019 at 3:47 AM Ian Gilman notifications@github.com
wrote:

Are you referring to the
https://github.com/picturae/openseadragonselection/ plugin? Looks like
there's already an issue filed for this:
picturae/openseadragonselection#1
https://github.com/picturae/openseadragonselection/issues/1
...And it looks like someone has even proposed a fix there.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/openseadragon/openseadragon/issues/1712?email_source=notifications&email_token=AGBURRFQVUBIGCPUVCFU4MLQLKGYHA5CNFSM4IZ3MTP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7P7IEY#issuecomment-534770707,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGBURRCZURUB53M6YR3XXW3QLKGYHANCNFSM4IZ3MTPQ
.

Yes, the image you shared looks consistent with the bug described in https://github.com/picturae/openseadragonselection/issues/1 so I expect it can be fixed by the code changes listed in https://github.com/picturae/openseadragonselection/pull/24/files.

Thanks for your reply. I will check this
On Fri, 27 Sep 2019, 10:37 pm Ian Gilman, notifications@github.com wrote:

Yes, the image you shared looks consistent with the bug described in
picturae/openseadragonselection#1
https://github.com/picturae/openseadragonselection/issues/1 so I expect
it can be fixed by the code changes listed in
https://github.com/picturae/openseadragonselection/pull/24/files.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/openseadragon/openseadragon/issues/1712?email_source=notifications&email_token=AGBURRHEFYN4ZAZWPGXRPZ3QLY4TXA5CNFSM4IZ3MTP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7ZQYKI#issuecomment-536022057,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGBURRD3RP4WI2XN5LXK7KLQLY4TXANCNFSM4IZ3MTPQ
.

I tried it. but not working same problem.

So you applied those changes to the plugin and used that one instead? Did you see any difference at all?
You might try posting in https://github.com/picturae/openseadragonselection/issues/1 and seeing if they have any thoughts.

authors: PpyMohan iangilman


text:
[BUG] Gradle clean failing after a failed gradle check

Describe the bug
I am facing the following error in ./gradlew clean after a failed gradle check:
> Task :distribution:docker:clean FAILED
> Task :qa:remote-clusters:clean FAILED

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':distribution:docker:clean'.
> java.io.IOException: Unable to delete directory '/home/ubuntu/OpenSearch/distribution/docker/build'
    Failed to delete some children. This might happen because a process has files open or has its working directory set in the target directory.
    - /home/ubuntu/OpenSearch/distribution/docker/build/logs/1
    - /home/ubuntu/OpenSearch/distribution/docker/build/logs/2
    - /home/ubuntu/OpenSearch/distribution/docker/build/logs

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':qa:remote-clusters:clean'.
> java.io.IOException: Unable to delete directory '/home/ubuntu/OpenSearch/qa/remote-clusters/build'
    Failed to delete some children. This might happen because a process has files open or has its working directory set in the target directory.
    - /home/ubuntu/OpenSearch/qa/remote-clusters/build/logs/1
    - /home/ubuntu/OpenSearch/qa/remote-clusters/build/logs/2
    - /home/ubuntu/OpenSearch/qa/remote-clusters/build/logs

The ./gradlew check fails with the following error:
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':qa:remote-clusters:composeUp'.
> Container 9e86c7459baccbc08abe6e6d07d6d8f5807844d19901429c0f8fc5626e8f1208 of opensearch-1_1 is not running. Logs:

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':distribution:docker:integTest'.

I tried cleaning up docker containers but this issue keeps happening. Not sure if there is some problem with my environment or a bigger issue.
To Reproduce
Steps to reproduce the behavior:

Run ./gradlew check on OpenSearch

Expected behavior
The check and clean should run successfully.
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):

OS: Linux
Version

Additional context
Add any other context about the problem here.

I also suffered from the ./gradlew clean failed after ./gradlew check was interrupted or failed, maybe only a system reboot can recover. 😒 Since then, I tried avoiding using Ctrl+C to terminate the ./gradlew check process, in case the cleaning up procedure of a test is not triggered. 😅

I tried that too, but the ':qa:remote-clusters:clean' and ':distribution:docker:integTest' keeps failing for me in the gradle check.

That's so annoying even the problem is not solved after system reboot. 🙁
I think the ultimate solution for the issue should be enhancing those tests so that they can start whatever the current status is. and also don't leave leftover. My comment mainly aims to prove the issue is present, instead of being closed. 😏

@VachaShah Sad to admit, but I also see a similar problems from time to time when build fails, the majority of them (for me) are related to the fact that some files are created by root user (everything points - Docker to blame), so the cleanup tasks cannot remove or overwrite them. If you still have the problematic build available, could you please share the owners of the files/folders:
ls -Alc /home/ubuntu/OpenSearch/distribution/docker/build/
ls -Alc /home/ubuntu/OpenSearch/distribution/docker/build/

Thank you.

@VachaShah Sad to admit, but I also see a similar problems from time to time when build fails, the majority of them (for me) are related to the fact that some files are created by root user (everything points - Docker to blame), so the cleanup tasks cannot remove or overwrite them. If you still have the problematic build available, could you please share the owners of the files/folders:
ls -Alc /home/ubuntu/OpenSearch/distribution/docker/build/
ls -Alc /home/ubuntu/OpenSearch/distribution/docker/build/logs

Thank you.

@reta I don't have the problematic build available but for me as well, it is the same problem. The build folders created under root user and the cleanup is not able to perform any actions on them.

Thanks @VachaShah , I will try to look into it shortly, but for now the workaround I have to use is sudo + manual remove :-(  (if it helps)

Ok, @VachaShah at least this particular issue is clear, the composeUp needs  preProcessFixture to be executed before, otherwise the folders:
distribution/docker/build/logs/1
distribution/docker/build/logs/2

won't exists and will be created by Docker under root user:
drwxrwxr-x 3 user.user user.user 4.0K Nov 29 15:40 classes
drwxrwxr-x 4 user.user user.user 4.0K Nov 30 10:03 docker
drwxrwxr-x 3 user.user user.user 4.0K Nov 29 15:38 forbidden-apis-config
drwxrwxr-x 3 user.user user.user 4.0K Nov 29 15:40 generated
drwxrwxr-x 2 user.user user.user 4.0K Nov 29 15:45 heapdump
drwxr-xr-x 4 root         root         4.0K Dec 14 11:24 logs
drwxrwxr-x 2 user.user user.user 4.0K Nov 29 15:44 markers
drwxrwxrwx 2 user.user user.user 4.0K Dec 13 09:20 repo
drwxrwxr-x 4 user.user user.user 4.0K Nov 29 15:45 reports

The fix is on the way

Ok, @VachaShah at least this particular issue is clear, the composeUp needs preProcessFixture to be executed before, otherwise the folders:
distribution/docker/build/logs/1
distribution/docker/build/logs/2

won't exists and will be created by Docker under root user:
drwxrwxr-x 3 user.user user.user 4.0K Nov 29 15:40 classes
drwxrwxr-x 4 user.user user.user 4.0K Nov 30 10:03 docker
drwxrwxr-x 3 user.user user.user 4.0K Nov 29 15:38 forbidden-apis-config
drwxrwxr-x 3 user.user user.user 4.0K Nov 29 15:40 generated
drwxrwxr-x 2 user.user user.user 4.0K Nov 29 15:45 heapdump
drwxr-xr-x 4 root         root         4.0K Dec 14 11:24 logs
drwxrwxr-x 2 user.user user.user 4.0K Nov 29 15:44 markers
drwxrwxrwx 2 user.user user.user 4.0K Dec 13 09:20 repo
drwxrwxr-x 4 user.user user.user 4.0K Nov 29 15:45 reports

The fix is on the way

Thank you @reta for looking into this!

authors: VachaShah reta tlfeng

repo: opensearch-project/OpenSearch