Proposed Order Calculator - [Pos 438] Bug fix

Link to Jira ticket POS-438

Sorry for some of the noise.
I will comment on the "important" pieces.
These changes would not result in a breaking change for any dependent projects.  However, projects would need to update their references to this package once a new release is cut.

Todo:

Revisit the CalculateAdjustedExemptionAmount calculation and make sure, for CalculateCompleteOrderValues();, it makes sense to use the totalTaxAmount instead of adjustedTaxAmount.
Discuss what permutations would exist to add test coverage for split payment scenarios.

(I expect this will be a work-in-progress for the early part of the review)
RFR

RFRR

I created Jira ticket POS-450 to address adding more test coverage.  For now, I'd like to request merging this PR as it does fix the problem experienced by Roti currently.  We can add the test coverage in the next version, which may or may not require other alterations to the Proposed Order Calculator business logic.
RFRR

@devlaf , removed the empty params fields.  RFRR

This LGTM as is.  I would advocate for merging this now and treating some of the other things mentioned above (additional testing, refactoring CalculateCompleteOrderValues(...) for clarity, etc.) as separate work.  I see you already have a new ticket for the additional tests.
Once you tag this, we should discuss how to update the SDK.


Release workflow

Codecov Report
Base: 90.68% // Head: 85.47% // Decreases project coverage by -5.20% :warning:

Coverage data is based on head (e6d63e2) compared to base (a6c6154).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master       #5      +/-   ##
==========================================
- Coverage   90.68%   85.47%   -5.21%
==========================================
  Files           3        3
  Lines         558      592      +34
==========================================
  Hits          506      506
- Misses         52       86      +34

Impacted Files
Coverage Δ

src/error.rs
0.00% <ø> (ø)

src/lib.rs
68.47% <ø> (-13.78%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

CodeCov has a very strange connotation of coverage. I will need to work with it more before I can bump the fixed coverage from 85-90%. 85% is now the minimum to account for this weirdness.


Pal list edit is showing by who captured the Pal not who owns now

Pal list edit is showing by who captured the Pal not who owns now

Which position are u means for? In paledit? or just select the player and show on the instance

paledit, when we choose a player to list the pals

please issue to PalEdit https://github.com/EternalWraith/PalEdit


SAK-48083 Portal add browser push capability to Sakai

https://sakaiproject.atlassian.net/browse/SAK-48083

@csev I think I'm done now. I just added a README in kernel-impl.

@csev Test plan. I need to write a test plan. It's tough though as nothing is consuming these push events yet. Assignments is sending them, yes, but there's no difference in UI behaviour on receipt of those events.

I've made this draft as it needs to be merged after #11092. In fact I'll have to rebase this when that's been approved and merged.

@jonespm I've added auto creation of the keys, so they don't need to be configured. I'm updating the README to reflect that.

@adrianfish , I really want to ask you a question about this - perhaps at the core meeting today.  I really want the implementation of this to send zero personal data through this path - but instead the notification says, hey this sort of thing is available to you - go here to get it - rather than the thing itself.  I don't want to have us trust this channel with private user data - just the notification that such data exists and perhaps where to go get it.

@csev We should talk about it today. The encryption is pretty solid though and I love  the thought that we can just offload our push to an external system. We have end to end encryption, when using SSL: the user authenticates with Sakai before they can subscribe and get the push service's key. Sakai uses that push service public key to encrypt the push data that it sends to the service. The browser has a public key which it sends to the push service during the subscribe operation, and the push service server encrypts everything it sends with that public key so only that browser can decrypt it, so it's secure on that leg of the journey. Anyway, core call ..

this needs to be merged after #11147


Search does not appear if srcDir config is specified in vitepress config

Better title of this issue could be "Support for srcDir config"
Just adding the key srcDir in the config will cause the Search component to disappear from the website.
// file: .vitepress\config.js
import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
  srcDir: './book',
  title: "My Awesome Book",
  }
})

I am also facing this same issue.
Repo to reproduce this error: https://github.com/icaibook/audittrail

@adarshmadrecha , @pranali98-cpu  you are doing something wrong.
the base has other function , it only has meaning after deploying the page. is used to handle subdomains.
@pranali98-cpu , your example has the wrong script, when not using the default docs you must specify the origin.
like vitepress dev book


Fix method name

Q
A

Is bugfix?
✔/❌

New feature?
✔/❌

Breaks BC?
✔/❌

Fixed issues
comma-separated list of tickets # fixed by the PR, if any

Minor or patch?

Minor or patch?

TagHelper marked as internal. I think this is patch.


pywemo, netdisco, and UniFi Controller

Home Assistant 0.28.2
Python 3.5.2
Component: Wemo
Problem: Malformed XML from my UniFi Controller
Expected: Shouldn't be a problem. What does pywemo got to do with my UniFi controller?
The problem is reproducible every time HASS is started. Also, I do have Mr. Coffee Wemo Coffee maker. It's the only Wemo device I have.
16-09-13 11:39:21 pywemo.ssdp: Found malformed XML at http://<IP_ADDRESS>:8080/upnp: <title>Apache Tomcat/7.0.64 - Error report</title>
HTTP Status 404 - /upnp.jsp

type Status report

message /upnp.jsp

description The requested resource is not available.

Apache Tomcat/7.0.64

16-09-13 11:39:21 pywemo.ssdp: Error fetching description at http://[fe80::d250:99ff:fe1e:9720]:6544/getDeviceDesc
16-09-13 11:39:21 pywemo.ssdp: Error fetching description at http://[fe80::344b:74ff:febe:4141]:6544/getDeviceDesc
16-09-13 11:39:21 pywemo.ssdp: Error fetching description at http://[fe80::fcce:1eff:fe9b:7f99]:6544/getDeviceDesc
16-09-13 11:39:27 homeassistant.bootstrap: Error during setup of component wemo
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/homeassistant/bootstrap.py", line 102, in _setup_component
    result = component.setup(hass, config)
  File "/usr/lib/python3.5/site-packages/homeassistant/components/wemo.py", line 97, in setup
    discovery_info = (device.name, device.model_name, url, device.mac,
AttributeError: 'NoneType' object has no attribute 'name'
16-09-13 11:40:21 netdisco.ssdp: Found malformed XML at http://<IP_ADDRESS>:8080/upnp: <title>Apache Tomcat/7.0.64 - Error report</title>
HTTP Status 404 - /upnp.jsp

type Status report

message /upnp.jsp

description The requested resource is not available.

Apache Tomcat/7.0.64

I also found another of "malformed XML" that netdisco gave an error and this is what I got so far.

The complaint is actually coming from netdisco.ssdp scan, but that is just a detail.
Either way I have a UniFi controller and Wemo devices and had not seen your error. I finally managed to reproduce it by turning on "Make controller discoverable on L2 Network" which is located in the Unify controller settings section. I think it defaults to off because I don't think I ever messed with the setting.
What is interesting is that the Unify controller reports that '/upnp' url as a response to SSDP discovery requests, but when it is retrieved it really does return an Apache Tomcat 404 error page, so I think that is a bug in the unifi controller discovery implementation, there is nothing home-assistant/pywemo/netdisco can do to fix that. If it annoys you too much either disable L2 discovery on the Unifi controller, or file a bug report with Ubiquity so they can fix it.
About the second part of your report, I don't think pywemo  supports the Coffee maker yet. It probably is quite similar to the wemo switch or wemo maker devices, but uses a different unique identifier and the default wemo discovery doesn't pick it up.

Okay, so both of the issues makes sense. But I am wondering where I can turn off "Make controller discoverable on L2 network?"

If you go to the Unifi Controller webpage, in the bottom left there is a pair of gears (settings), then pick 'Controller', which has a 'Controller Settings' section where you find a 'Network Discovery' checkbox. Uncheckung that checkbox will make the controller not respond to SSDP discovery requests.

Thanks. I appreciate your help. I think I'm going to close the issue since the only issue left is getting Mr.Coffee to discoverable in Home Assistant via Wemo.


CSS styles

how to change a color for body and main font from georgia to Roboto or Helvetica?

Hey @owner  👋 We ask that you please do not use GitHub for help or support, the default issue template pointed you to our forum for this type of question 😄 We use GitHub solely for bug-tracking and on-going feature development so we try to keep it noise free.
Many questions can be answered by reviewing our docs for self-hosters, our theme API, or our public API. If you can't find an answer then our forum is a great place to get community support, plus it helps create a central location for searching problems/solutions.
FYI: Many projects have their own support guidelines and GitHub will highlight them for you, or the project owners will use issue templates to point you in the right direction, please read them before opening issues


Full rebuild of the VHX Client SDK

Bundle is generated in UMD format so that this can be used in both node and in a browser

Can be easily imported into ES6 or modern JS with:
1: import VhxApi from 'vhxjs';
2: const VhxApi = require('vhxjs')'
or through a generic script tag:
3: <script src="your_path/vhx.js"></script>

Now uses rollup instead of gulp for the build process

TODO:
The pagination endpoints are currently not working in this version. Since no one is using this SDK, I don't think it's critical to include in this initial version.

btoa is undefined in node
this is bundling a browser version of superagent, need to add a node version? or find a different fetching library

The following is a list of tested endpoints (using mhzchoice), with their examples.
Note that console.log is just used as a generic callback.
PRODUCTS

retrieve product
-- GET /products/:id

vhx.products.retrieve(14440, console.log);
vhx.products.retrieve('http://api.crystal.dev/products/16455', console.log);

list all products
-- GET /products
vhx.products.all(console.log);

BROWSE

list all items
GET /browse/:product_id
vhx.browse.list({product: 14440}, console.log);

VIDEOS

retrieve video
-- GET /videos/:id

vhx.videos.retrieve(142476, console.log);
vhx.videos.retrieve('http://api.crystal.dev/videos/142476', console.log);

list all videos
GET /videos
vhx.videos.all(console.log);

list all files
GET /videos/:id/files

vhx.videos.files(142476, console.log);
vhx.videos.files('http://api.crystal.dev/videos/142476', console.log);

COLLECTIONS

retrieve collection
GET /collections/:id

vhx.collections.retrieve(1907, console.log);
vhx.collections.retrieve('http://api.crystal.dev/collections/1907', console.log);

list all collections
GET /collections
vhx.collections.all(console.log);

list all items
GET /collections/:id/items

vhx.collections.items(1907, console.log);
vhx.collections.items('http://api.crystal.dev/collections/1907', console.log);

CUSTOMERS

retrieve customer
-- GET /customers/:id

vhx.customers.retrieve(2774040, console.log);
vhx.customers.retrieve('http://api.crystal.dev/customers/2774040', console.log);

list all customers
-- GET /customers
vhx.customers.all(console.log);

retrieve watching items
-- GET /customers/:id/watching

vhx.customers.watching(2774040, console.log);
vhx.customers.watching('http://api.crystal.dev/customers/2774040', console.log);

retrieve watchlist items
-- GET /customers/:id/watchlist

vhx.customers.watchlist(2774040, console.log);
vhx.customers.watchlist('http://api.crystal.dev/customers/2774040', console.log);

ANALYTICS

retrieve report
GET /analytics
-- param: type ->traffic, income_statement, units, subscribers, churn, video, video.platform, video.geography, video.subtitles

vhx.analytics.retrieve({ type: "traffic" }, console.log);
vhx.analytics.retrieve({ type: "units" }, console.log);

@sebastiansandqvist I gitignored the DS_STORE file, but it seems that we should keep the dist/ builds. Aren't these needed for the npm package?


Please adjust version bound of ghc-prim for GHC 8.10 compat

For GHC 8.10 the version bound of ghc-prim needs to be:
ghc-prim    >= 0.1 && < 0.7

I see this is already covered in #27. Please merge #27 when you get a chance...

Done, and the cabal metadata on Hackage has been updated to adjust the bound accordingly, as well.


Update categories and add categories to apps

Could we have a scroll bar for the categories drop down? We have a lot more categories now.


Include publisher rewards in allocations csv

Fixes #486
Changes proposed in this PR:

[x] Include publisher rewards in allocations csv
[x] Remove publisher reward calculations from calcreward function
[ ] Add a test

What's the status on this?


Windows Rtti Analyzer. Cannot find existing Vftables

Describe the bug
The Windows Rtti Analyzer cannot find vftables which are known to exist in the program.
Additional context
I skipped all the unnecessary stuff. The cause is RttiAnalyzer.java line 168/169.  Vftables can reside in ".data" also. In my GccRttiAnalyzer I search through all the data blocks, but I don't think this is necessary for Visual Studio binaries as I think the sections it creates are standard/unchangable.

Resolved by 024a619


Go to definition stopped working

Type: Bug
Go to definition stopped working.

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.
Happy Coding!

I am sorry, this was automatic report.
This is for python. It worked till the moment of opening this issue.
When I press Ctrl+LeftClick on module definition (eg. on import numpy):
2023-10-30 20:29:54.569 [info] [KeybindingService]: / Soft dispatching keyboard event
2023-10-30 20:29:54.605 [info] [KeybindingService]: \ Keyboard event cannot be dispatched
2023-10-30 20:29:54.605 [info] [KeybindingService]: / Received  keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 17, key: Control
2023-10-30 20:29:54.605 [info] [KeybindingService]: | Converted keydown event - modifiers: [ctrl], code: ControlLeft, keyCode: 5 ('Ctrl')
2023-10-30 20:29:54.606 [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
2023-10-30 20:29:55.015 [info] [KeybindingService]: + Storing single modifier for possible chord ctrl.
2023-10-30 20:29:55.317 [info] [KeybindingService]: + Clearing single modifier due to 300ms elapsed.
Also modules, classes, functions are not colored.

Started working with installing addon pylint and setting "python.languageServer":** "Pylance" in settings.json

Most definitely not working! I somehow managed to fix this issue by doing an extension bisect and disabling/enabling extensions, but now it appeared again. Problem seems to be Microsoft/python extension but not sure.
System info:

CPUs
11th Gen Intel(R) Core(TM) i7-11370H @ 3.30GHz (8 x 3300)

GPU Status
2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok video_decode: enabled video_encode: disabled_software vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off

Load (avg)
2, 2, 2

Memory (System)
15.33GB (6.13GB free)

Process Argv
--crash-reporter-id 06ab2cb6-83a3-4e20-ad97-cebf08f32f95

Screen Reader
yes

VM
0%

Hello to everyone 😄
Thank you very much for opening this discussion!
I was facing the same issue and after following the valuable advice made by @harpone everything starts working again.
I am really grateful for the extraordinary help.


Travis CI not being triggered properly?

It seems that lately (new PRs/commits (maybe)) are not triggering Tavis CI 🤔
Could be some limit we have hit? Or this repo might have broken webhooks on the GitHub side of things?
Anyways, just wanted to officially keep track of this behavior!
For example these two:

https://github.com/hyperapp/hyperapp/pull/355
https://github.com/hyperapp/hyperapp/pull/358

/cc @lukejacksonn @jbucaran

@selfup I don't understand what happened, but they were all unchecked. Now they are all checked.

Great! Thanks 🙏

Should be good, so let's close here.


Missing owl:FunctionalProperty in GS1 Vocabulary Fields

The owl:FunctionalProperty is often desired for certain fields in the GS1 WebVoc. However, it appears to be missing/not specificed in some cases in the version 1.11 (found at https://github.com/gs1/WebVoc/blob/master/v1.11/gs1Voc_v1_11.jsonld).
For example, the productName field is defined as follows:
{
"@id": "gs1:productName",
"@type": [
"rdf:Property",
"owl:DatatypeProperty"
],
"rdfs:comment": {
"@language": "en",
"@value": "Consumer friendly short description of the product suitable for compact presentation."
},
"rdfs:domain": {
"@id": "gs1:Product"
},
"rdfs:isDefinedBy": {
"@id": "gs1:"
},
"rdfs:label": {
"@language": "en",
"@value": "Product Name"
},
"rdfs:range": {
"@id": "rdf:langString"
},
"rdfs:subPropertyOf": {
"@id": "schema:name"
},
"skos:related": {
"@id": "schema:Product"
},
"sw:term_status": "stable"
}
To help improve it further, I plan to review all fields in the vocabulary and identify any similar corrections that may be needed.
Let me know your thoughts!

Hi Mark,
Thank you for providing the spreadsheet. I’ll review the properties, check for any errors or missing declarations, and add my remarks in the new column as suggested. Once completed, I’ll share an update.
Thanks again for your guidance!
Best regards,
Anish

Hi Mark,
I hope you're doing well.
As per your suggestions, we’ve updated the spreadsheet (https://docs.google.com/spreadsheets/d/1WIuSC4d7wqBhYnMFy3og4y_uaqPNXxonPRNnS5-ZPzM/edit?gid=0#gid=0).
We’ve added remarks with respect to the functional property and rdfs:range.
Could you please review it and share your feedback?
Thank you!
Best regards,
Anish


[bug] relaunch application after installUpdate - the args are lose

Describe the bug
relaunch application after installUpdate - the args are lose
Reproduction
Declare cli args in tauri.conf.json
Open the application with args (e.g via Windows: cmd.exe /k AppName arg1 arg2)
Do relaunch - the args appear.
Do installUpdate and then relaunch - the args lose.
Expected behavior
The args to stay after install updates
Platform and versions
[✔] Environment
    - OS: Windows 10.0.19045 X64
    ✔ WebView2: 114.0.1823.67
    ✔ MSVC: Visual Studio Professional 2022
    ✔ rustc: 1.67.0 (fc594f156 2023-01-24)
    ✔ Cargo: 1.67.0 (8ecd4f20a 2023-01-10)
    ✔ rustup: 1.25.2 (17db695f1 2023-02-01)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 18.14.0
    - npm: 9.3.1

[-] Packages
    - tauri [RUST]: 1.3.0
    - tauri-build [RUST]: 1.3.0
    - wry [RUST]: 0.24.3
    - tao [RUST]: 0.16.2
    - @tauri-apps/api [NPM]: 1.3.0
    - @tauri-apps/cli [NPM]: 1.3.1

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist/apps/locota
    - devPath: http://localhost:4200/
    - framework: Angular
    - bundler: Webpack

Stack trace
No response
Additional context
No response

@FabianLars  Can you take a look on this issue please?
it it relevant for me also.
when I open Tauri with args and then auto-update is executed - the original args are missed..

Any uppdate on this issue? or some workaround for temp solution?


"No file system provider found for resource" error in Codespaces

ADD ISSUE DESCRIPTION HERE
Version: 1.82.2
Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36
Embedder: codespaces

Auto-resolved now after waiting for about an hour.


[type: feature] add nacos, etcd, eureka discovery service

Because OSPP requires a submission before September 30, I will submit a PR first. I'll add more later as I haven't passed all the tests yet.
Make sure that:

[ ] You have read the contribution guidelines.
[ ] You submit test cases (unit or integration tests) that back your changes.
[ ] Your local test passed ./mvnw clean install -Dmaven.javadoc.skip=true.

Codecov Report

Merging #5193 (981085c) into master (a9ca7fd) will decrease coverage by 0.12%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master    #5193      +/-   ##
============================================
- Coverage     61.90%   61.79%   -0.12%
+ Complexity     8579     8567      -12
============================================
  Files          1244     1244
  Lines         37631    37624       -7
  Branches       3557     3555       -2
============================================
- Hits          23296    23248      -48
- Misses        12302    12342      +40
- Partials       2033     2034       +1

Files
Coverage Δ

...g/apache/shenyu/admin/discovery/DiscoveryMode.java
0.00% <0.00%> (ø)

...nyu/admin/discovery/DefaultDiscoveryProcessor.java
10.30% <0.00%> (ø)

...enyu/admin/discovery/DiscoveryProcessorHolder.java
26.66% <0.00%> (-17.78%)
:arrow_down:

... and 35 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Fix panic with new workspaces

Bug fix
Fixed bug
Fixes #130.
Fix applied
The fix is reasonably straightforward, just change the Default implementation of sites to have a new empty level. I'm not 100% sure putting a site ID of 0 is sound, and whether this would create any issue if we had multiple workspaces open

I don't think this is the way we should fix the issue. rmf_site_format is meant to be used by more than the editor GUI. It's also meant for use by scripts or other programs which may be surprised when a default initialization of a site gets automatically filled with exactly one level.
If anything, I think we should modify this code to create a default (empty) site and add one level before we dispatch it to load_site.

I don't think this is the way we should fix the issue. rmf_site_format is meant to be used by more than the editor GUI. It's also meant for use by scripts or other programs which may be surprised when a default initialization of a site gets automatically filled with exactly one level.
If anything, I think we should modify this code to create a default (empty) site and add one level before we dispatch it to load_site.

Alright! Reverted the original fix and changed at the event sending level https://github.com/open-rmf/rmf_site/pull/131/commits/2be086317ffc06c95109c6784fa3523fc3462dbc
Added a Default derive for Level as well, all the fields implement default anyway so that helps reducing boilerplate


TypeScript anonymous types

TypeScript supports anonymous types of the form { x: boolean, y: string }. How do we represent them in Ceylon?

I think it would be a good idea to create one interface per member of the type, and to map the final anonymous type to an intersection of those types. That is:
function foo(bar: { x: boolean, y: string }): void {}

interface HasBooleanX { shared formal variable Boolean x; }
interface HasStringY { shared formal variable String y; }
shared void foo(HasBooleanX&HasStringY bar) {}

This preserves most of the subtype relationships between those types in TypeScript, though interfaces and classes will still be apart from this hierarchy.
However, as elsewhere (e. g. #6590), we should look for name hints to reduce the amount of generated names. If a type alias is defined, we use that type alias; otherwise, we try to use the parameter name. This goes for both the individual types and the final intersection. That means that with these additional type aliases
type XFlag = { x: boolean };
type Something = { x: boolean, y: string };

we would map the model instead to:
interface XFlag { shared formal variable Boolean x; }
interface HasStringY { shared formal variable String y; }
alias Something => XFlag & HasStringY;
shared void foo(Something bar) {}

and without the second TypeScript alias, the Ceylon alias Something would instead be called Bar, after the parameter name. (Well, I’m not sure about this last part. As soon as it appears in several parameters of unrelated functions with different names, it’s probably rubbish to introduce the first name into the signature of the second function. Perhaps only do this if the type is unique to that signature, and otherwise just use the intersection directly?)
Any comments or suggestions?

Are you sure this is a worthwhile thing to do? Given that we don't have structural types, I, personally, would just fall back to dynamic.

Alternatively, map it to a tuple.

Well, with dynamic, we lose all the type information, which depending on the library is a big loss. As far as I can tell people use these type fairly frequently.
But this reminds me – when looking for name hints, interfaces should also be considered. I think an interface and an anonymous type with the exact same members are mutually assignable to each other, which in Ceylon land means they’re the same type.


Update/fix pip install

Not sure what is wrong with the install but running pip3 install rumps does not install the version that is currently on the master branch.
This is crucial as the version downloaded by pip is missing notifications.py which fixes notifications on newer versions of OS X.

This is effectively a duplicate of #173.


Disable/Not use the vcgencmd script

A feature that enables/disables this info would be great as many do not need to check the state of the temperature and other information on the device. I see a lot of chatter within the log for information i do not use or need.
How can one disable that?

You cannot.
I'm working on a new version that will allow you change the level of logging.  Also, it will allow you to retrieve the state of the local Pi directly, without going through the pigpio socket.
I do need the script to check whether the remote Pi has rebooted.  While making that call, I might as well pass the CPU temperature etc.  I need the Pi accessory: the GPIO accessories are linked to it.  I could not expose the service, but then Home would show a Not Supported tile.

Thank you.
I understand the need for the script, however there might not be a need for all the other information (CPU temp and etc) as that generates additional data especially when monitoring several raspberries, so an option to i suppose, "select" what data is used within the options, would be great ...

In v1.1.0.


⚠ GitLab Server has degraded performance

In f96ab2a, GitLab Server (https://gitlab01.its-telekom.eu) experienced degraded performance:

HTTP code: 200
Response time: 11654 ms

Resolved: GitLab Server performance has improved in 55482a8.


converter not running?

When I run the script below, I get the subsequent terminal output.
The print of c0 shows that the dates field is not a tuple.
Notably, the validator does not seem to be catching that dates is not a tuple.
Is there anything obviously wrong I'm doing here?
import pandas as pd

import attr
from attr import (
    field,
    frozen,
)
from attr.validators import (
    instance_of,
    deep_iterable,
)

@frozen
class Calendar0:
    dates: field(validator=deep_iterable(instance_of(pd.Timestamp), instance_of(tuple)), converter=tuple)

print(f'attr version: {attr.__version__}')
dti = pd.date_range('2023-01-01', freq='D', periods=10)
c0 = Calendar0(dti)
print(c0)

attr version: 22.2.0
Calendar0(dates=DatetimeIndex(['2023-01-01', '2023-01-02', '2023-01-03', '2023-01-04',
               '2023-01-05', '2023-01-06', '2023-01-07', '2023-01-08',
               '2023-01-09', '2023-01-10'],
              dtype='datetime64[ns]', freq='D'))

derp, I was using :, not =


Absurd error in a very specific case of assert_eq! inside select!

Making a minimal example took a while because I could not reproduce it at first due to the very narrow circumstances that triggers this error. I don't know exactly what these circumstances are but my best guess is assert_eq! inside futures::select!. (however only when asserting equivalence of bools and not Strings, as explained further down.
Cargo.toml
[package]
name = "reproduce"
version = "0.1.0"
authors = ["Erlend Langseth<EMAIL_ADDRESS>edition = "2018"

[dependencies]
# Actix
actix-web = "2.0"
actix-rt = "1.0.0"
actix-http = "1.0.0"

# Serde
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# Other
futures = "0.3.1"

src/main.rs
use actix_http::http::StatusCode;
use futures::{FutureExt, select};
use serde::{Serialize, Deserialize};
use actix_web::{
    test::TestServer,
    App
};
use std:: time::Duration;

#[derive(Serialize, Deserialize)]
struct Foo {
    a: String,
}
impl Foo {
    pub fn get_id(&self) -> &str {
        &self.a
    }
    pub fn is_success(&self) -> bool {
        true
    }
}

macro_rules! response_to_string {
    ($response:expr) => {
        std::str::from_utf8($response.body().await.unwrap().as_ref())
            .unwrap()
            .to_string()
    };
}
macro_rules! assert_status {
    ($response:expr, $expected_status:expr) => {
        if $response.status() != $expected_status {
            panic!(
                "Expected status {:?}, got {:?}.\nBODY:{}",
                $expected_status,
                $response.status(),
                response_to_string!($response)
            );
        }
    }
}

macro_rules! create_test_server {
    ($srv:ident) => {
        let $srv = actix_web::test::start({
            move || App::new()
        });
    };
}

async fn poll_operation_until_done(id: String, srv: &TestServer) -> Foo {
    loop {
        // now, poll operation
        let mut response = srv.get(format!("/admin/v1/operations/{}", id))
            .send() .await.unwrap();
        match response.status() {
            StatusCode::OK => {
                return response.json::<Foo>().await.unwrap();
            }
            StatusCode::NOT_FOUND => {
                // ok -  not finished yet
            }
            status => panic!("Unexpected HTTP status code {}", status)
        }
        // assert_status!(response, StatusCode::OK);
        actix_rt::time::delay_for(Duration::from_millis(60)).await;
    }
}

#[actix_rt::test]
async fn test_delete_articles() {
    create_test_server!(srv);

    macro_rules! run_test {
        ($should_succeed:expr) => {
            let mut response = srv.post("/api/v1/lala")
                .send_json(&Foo {a: "abc".to_string()}).await.unwrap();
            assert_status!(response, StatusCode::OK);

            let id = response.json::<Foo>().await.unwrap().get_id().to_owned();

            select! {
                op_info = poll_operation_until_done(id, &srv).fuse() =>
                    assert_eq!(op_info.is_success(), $should_succeed), // line 85
                _ = actix_rt::time::delay_for(Duration::from_secs(30)).fuse() =>
                    panic!("timeout reached")
            }
        }
    }
    run_test!(false);
}

fn main() {
}

Running it with cargo c --tests we get the error
error[E0425]: cannot find value `id` in this scope
  --> src/main.rs:91:5
   |
91 |     run_test!(false);
   |     ^^^^^^^^^^^^^^^^^
   |     |
   |     not found in this scope
   |     in this macro invocation
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
help: possible candidate is found in another module, you can import it into scope
   |
1  | use std::process::id;
   |

(look below for more output)
Now... a small change I found that could fix this error is to replace line 85 (annotated with a comment) with assert_eq!(op_info.a, "heyhey"),.
So definitely something strange is going on - this line doesn't even have anything to do with id.
Appendix
Maybe it's useful with the output of
RUSTFLAGS="-Z external-macro-backtrace" cargo c --tests

error[E0425]: cannot find value `id` in this scope
   --> <::futures_util::async_await::select_mod::select macros>:4:20
    |
1   |                           /  ($ ($ proc_macro : tt) *) =>
2   |                           |  {
3   |                           |      {
4   |                           |          # [derive ($ crate :: proc_macro_hack_select)] enum ProcMacroHack
    |                           |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |                           |                     |
    |                           |                     not found in this scope
    |                           |                     in this expansion of `proc_macro_call_2!` (#28)
5   |                           |          { Nested = (stringify ! { $ ($ proc_macro) * }, 0) . 1, } $ crate ::
    |  _________________________|____________________________________________________________________-
6   | |                         |          proc_macro_call_select ! { ($ ($ proc_macro) *) }
    | |_________________________|__________________________________________________________- in this macro invocation (#4)
7   |                           |      }
8   |                           |  } ;
    |                           |____- in this expansion of `$crate::inner_macro::select!` (#3)
    |
   ::: src/main.rs:75:5
    |
75  | /                                macro_rules! run_test {
76  | |                                    ($should_succeed:expr) => {
77  | |                                        let mut response = srv.post("/api/v1/lala")
78  | |                                            .send_json(&Foo {a: "abc".to_string()}).await.unwrap();
...   |
83  | /                                        select! {
84  |                                              op_info = poll_operation_until_done(id, &srv).fuse() =>
85  |                                                  assert_eq!(op_info.is_success(), $should_succeed),
86  |                                              _ = actix_rt::time::delay_for(Duration::from_secs(30)).fuse() =>
87  |                                                  panic!("timeout reached")
88  | |                                        }
    | |________________________________________- in this macro invocation (#2)
89  | |                                    }
90  | |                                }
    | |________________________________- in this expansion of `run_test!` (#1)
91  |                                  run_test!(false);
    |                                  ----------------- in this macro invocation (#1)
    |
   ::: <::proc_macro_nested::dispatch macros>:1:29
    |
1   |                              (() $ ($ bang : tt) *) => { $ crate :: count ! ($ ($ bang) *) } ;
    |                              -                           --------------------------------- in this macro invocation (#27)
    |     _________________________|
    |    |
2   |    |                         ((($ ($ first : tt) *) $ ($ rest : tt) *) $ ($ bang : tt) *) =>
3   |    |                         { $ crate :: dispatch ! (($ ($ first) * $ ($ rest) *) $ ($ bang) *) } ;
    |    |                           -----------------------------------------------------------------
    |    |                           |
    |    |                           in this macro invocation (#5)
    |    |                           in this macro invocation (#7)
    |    |                           in this macro invocation (#9)
    |    |                           in this macro invocation (#13)
    |    |                           in this macro invocation (#15)
    |    |                           in this macro invocation (#17)
    |    |                           in this macro invocation (#19)
    |    |                           in this macro invocation (#21)
    |    |                           in this macro invocation (#25)
4   |    |                         (([$ ($ first : tt) *] $ ($ rest : tt) *) $ ($ bang : tt) *) =>
...      |
9   |    |                         { $ crate :: dispatch ! (($ ($ rest) *) $ ($ bang) * !) } ;
    |    |                           -----------------------------------------------------
    |    |                           |
    |    |                           in this macro invocation (#12)
    |    |                           in this macro invocation (#24)
...      |
12  |    |                         (($ first : tt $ ($ rest : tt) *) $ ($ bang : tt) *) =>
13  |    |                         { $ crate :: dispatch ! (($ ($ rest) *) $ ($ bang) *) } ;
    |    |                           ---------------------------------------------------   -
    |    |                           |                                                     |
    |    |                           |                                                     in this expansion of `$crate::proc_macro_call_select!` (#4)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#5)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#6)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#7)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#8)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#9)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#10)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#11)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#12)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#13)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#14)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#15)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#16)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#17)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#18)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#19)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#20)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#21)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#22)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#23)
    |    |                           |                                                     in this expansion of `$crate::dispatch!` (#24)
    |    |___________________________|_____________________________________________________in this expansion of `$crate::dispatch!` (#25)
    |                                |                                                     in this expansion of `$crate::dispatch!` (#26)
    |                                in this macro invocation (#6)
    |                                in this macro invocation (#8)
    |                                in this macro invocation (#10)
    |                                in this macro invocation (#11)
    |                                in this macro invocation (#14)
    |                                in this macro invocation (#16)
    |                                in this macro invocation (#18)
    |                                in this macro invocation (#20)
    |                                in this macro invocation (#22)
    |                                in this macro invocation (#23)
    |                                in this macro invocation (#26)
    |
   ::: <::proc_macro_nested::count macros>:1:1
    |
1   |   /                          () => { proc_macro_call_0 ! () } ; (!) => { proc_macro_call_1 ! () } ; (! !)
2   |   |                          => { proc_macro_call_2 ! () } ; (! ! !) => { proc_macro_call_3 ! () } ;
    |   |                               ---------------------- in this macro invocation (#28)
3   |   |                          (! ! ! !) => { proc_macro_call_4 ! () } ; (! ! ! ! !) =>
4   |   |                          { proc_macro_call_5 ! () } ; (! ! ! ! ! !) => { proc_macro_call_6 ! () } ;
...     |
104 |   |                           ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !) =>
105 |   |                          { proc_macro_call_64 ! () } ;
    |   |______________________________________________________- in this expansion of `$crate::count!` (#27)
    |
   ::: <::futures::select macros>:1:1
    |
1   |                            / ($ ($ tokens : tt) *) =>
2   |                            | {
3   |                            |     $ crate :: inner_macro :: select !
    |  __________________________|_____-
4   | |                          |     { futures_crate_path (:: futures) $ ($ tokens) * }
    | |__________________________|______________________________________________________- in this macro invocation (#3)
5   |                            | }
    |                            |_- in this expansion of `select!` (#2)
    |
help: possible candidate is found in another module, you can import it into scope
    |
1   | use std::process::id;
    |

error: aborting due to previous error

For more information about this error, try `rustc --explain E0425`.
error: could not compile `reproduce`.

Seems like it's not due to assert_eq! at all but rather the usage of $should_succeed that determines whether or not the error happens.

This will probably be fixed by https://github.com/dtolnay/proc-macro-hack/issues/62. (Rust 1.45+)


Use Electron APIs for packaged / unpackaged paths to assets

Some code paths in the app are not taking advantage of the Electron APIs that tell us where the app is currently living in the file structure:
Ex.
electron.app.getAppPath()

@justinwilaby mentioned that this was not returning the correct path in his dev environment back when we were trying to fix the preload.js path issue in the extensions. (#1505)
I don't think we should move forward with this fix if it's unreliable.


Numerical results?

In the TRAPI interface, if I query for e.g. chemicals correlated with asthma, I don't think I'm getting back any p-values, r-squared, effect sizes, or other statistical results.
With some such results, downstream ARAs could devise a way to prioritize these edges more effectively (especiallly in the case when more than 1000 are returned, as in this query)

Sorry, the edge I was looking at did not originate in ICEES.


For Making the Navbar active when clicked

This feature is for making the navbar highlight for making user experience better
Task:
When clicked on Home it will highlight home and similarly to tohers
here is the demo images

this show the active link in the navbar

Hi sir,
I would like to contribute but I am new to this, would you help me get started

i have added pull request can you go through it ?

How should i do it can you help me

Sir, I have forked and created a clone to my local system and opened the repository in VScode. But how do I see the changes that I've made to the website can you help me with this

Sir, I have forked and created a clone to my local system and opened the repository in VScode. But how do I see the changes that I've made to the website can you help me with this

You can run the website and see the changes in your browser


Feature Request: support for Secrets when deploying a stack from a compose file

Hi,
I have been playing around with the newly introduced feature to deploy a stack using a compose file with Docker 1.13 in swarm mode.
This is really a fantastic feature that will make our lives so much easier :-) However, I am missing a way of specifying the Docker secrets that a service should get access to within the compose file. I can imagine having another sub-option for deploy, e.g. secrets which can then have an array of names as its value.

Just saw that there already is #29968

Yes, this will be added in docker 1.13.1, which will be released soon


Resolve symbolic links for jar files added to HadoopSecurityManagerClassloader

Jar files added to HadoopSecurityManagerClassloader as search paths could be located under symbolic links.
For example, let's say there are two jars, A-0.0.1.jar and B-0.0.1.jar under a symbolic link /export/apps/hadoop/latest
When these jars are added, effectively two paths are added to HadoopSecurityManagerClassloader,
/export/apps/hadoop/latest/A-0.0.1.jar and /export/apps/hadoop/latest/B-0.0.1.jar
When the symbolic link moves, HadoopSecurityManagerClassloader breaks. Let's say the symbolic link /export/apps/hadoop/latest is updated to point to a newer version of hadoop that contains newer version of A and B, A-0.0.2.jar and B-0.0.2.jar respectively. Once the symlink is updated, there are no longer /export/apps/hadoop/latest/A-0.0.1.jar and /export/apps/hadoop/latest/B-0.0.1.jar, but existing HadoopSecurityManagerClassloader instances continue to load classes from them, therefore may fail all jobs launch post the Hadoop upgrade.
Note an instance of HadoopSecurityManagerClassloader is created per Hadoop cluster, and shared by every job that's submitted to that cluster.

Pull Request Test Coverage Report for Build 5959

3 of 4 (75.0%)  changed or added relevant lines in 1 file are covered.
21 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.06%) to 43.15%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

azkaban-common/src/main/java/azkaban/cluster/Cluster.java
3
4
75.0%

Files with Coverage Reduction
New Missed Lines
%

azkaban-exec-server/src/main/java/azkaban/execapp/event/JobCallbackRequestMaker.java
21
56.25%

Totals

Change from base Build 5958:
-0.06%

Covered Lines:
16123

Relevant Lines:
37365

💛  - Coveralls


Copy track icon into language track repository

Right now all of the icons used for the language tracks (which can be seen at http://exercism.io/languages) are stored in the exercism/exercism.io repository in public/img/tracks/. It would make a lot more sense to keep these images along with all of the other language-specific stuff in each individual language track repository.
There's a pull request that is adding support for serving up the track icon from the x-api, which deals with language-specific stuff.
In order to support this change, each track will need to

create a directory named img/ at the root of this repository if it doesn't already exist, then
find the correct icon in https://github.com/exercism/exercism.io/tree/master/public/img/tracks, and
stick it in the img/ directory, and importantly
name the image icon.png

In other words, at the end of it you should have the following file:
./img/icon.png

See https://github.com/exercism/exercism.io/issues/2925 for more details.

I added good first patch and first-timers only to this issue because I think it's a great opportunity to get over the fear of start contributing to a project.
If it has to be done before a given date, we can wait for one or two weeks before that date. If nobody took care of it, any maintainer should do it.
The icon is just waiting to be added.


Better test discovery: Add dotnet test -t test discovery for NUnit

After successfully implementing a post_process step for xUnit in #83, implement the same for NUnit.

Run through post process of xUnit and replicate for NUnit
Unit tests for the same scenarios of position discovery
Add results tests when given a trx file (and also do this for xUnit result parsers)
Move duplicate code into helper functions to reduce duplication (but make functions small)

See #41 for related discussion

It may be worth also investigate the abstraction provided by vstest see (https://github.com/microsoft/vstest) or more specific for test discovery (https://github.com/microsoft/vstest/blob/main/docs/RFCs/0002-Test-Discovery-Protocol.md) this should allow test discovery in an runner agnostic way, in theory :D.
I currently looking into it because I wanna implement it in Build Server Protocol Implementation I write for dotnet and try to solve the same problem. Because I currently use your plugin for tests, I thought you maybe interested in it.

It's an interesting thought, and thanks for bringing it to my attention @616b2f !
I wonder how we could go about passing and receiving messages from the API via the TCP connection to the test platform port. Looking at the docs briefly, there are other considerations about mapping the structure of the protocol messages back to the discovered tests in the adapter.
If all that could work, then it could really consolidate the neotest-dotnet adapter code, and make it less liable to breaking changes from the various test runners!
It's not something I will have time to invest in looking at any time soon though, so it's something to stick on the roadmap. If you make any progress with your work and can offer any tips, that would be great!

From what I could find, vstest's API is based on actual DLLs, which are non-trivial to find and attribute to specific test files.
I am exploring using omnisharp LSP instead of vstest, do you see that being the path forward and having a chance of being merged? I am currently working in my branch here https://github.com/Issafalcon/neotest-dotnet/compare/main...kostya9:neotest-dotnet:omnisharp_tests.
The latest version can query omnisharp for tests, build the tree correctly, and integrates into existing functionality of running tests

Hi @kostya9 . Thanks for looking into this! I was also having the same battle trying to find a good way of integrating with vstest test platform.
I also (in the early days of this plugin) used Omnisharp as the way of discovering and running tests, but found a few issues with it (can't quite remember the specifics off hand). However, given the rise of the Roslyn LSP, and others like c_sharp_language_server etc, it doesn't feel right to make Omnisharp the LSP dependency of this plugin. It would rule out using this for users who want to use one of the other LSPs (I use roslyn lsp myself now).
I have recently come across https://github.com/GustavEikaas/easy-dotnet.nvim/issues/74. This, is, I think, the way forward, an will be something I will try as soon as I get time.

I didn't knew that it's possible to run F# scripts with the dotnet cli tool directly, the solution you linked is great, that's basically what I am also using in BSP.
I tried to make it work with neotest (kind of neotest-bsp adapter) but the interface for the adapter is designed around the idea that neotest does the file discovery and the adapter's responsibility is to parse those and provide test cases that it finds there. While the dotnet approach is to find the test cases inside an assembly, you can still find from which file the test case is coming from but you can't ask to parse specific file, it's really on an assembly level and it handles all the test file discovery on it's own.
It's not a show stopper but it's not fitting the design of neotest adapters, at least this is how I currently understood the design.


Step 4 refactoring + Scanpy updates

The majority of these commits are for refactoring the "Step 4" figures into multiple sub-steps. Also miscellaneous duplicate code deletion and documentation changes, and makes the notebook compatible with the GenePattern Notebook Python 3.7 environment with Scanpy 1.3.4. It is worth noting that this pull request also makes the notebook incompatible with the Python 3.6 GenePattern Notebook environment due to its significantly older version of Scanpy.

Also removed the "save plot" buttons as they appear to be broken in GenePattern notebooks at the moment and users can save most plots with Plotly functionality as well.


Out of range conditional branches

The following patch code:
if (x == 0) {
  goto L_0x1234;
}

may be lowered to the following BIR:
00000001:
00000002: when x = 0 goto 0x1234

and then the following ARM assembly:
blk00000001:
cmp x, #0
beq <something>

However, depending on where this patch is actually situated in the binary, the address 0x1234  may be out of range, and the assembler will reject the program.
This can sometimes be fixed by lowering instead to:
00000001:
00000002: when x = 0 goto %00000004
00000003: goto %00000006

00000004:
00000005: goto 0x1234

00000006:

which may have the following assembly:
blk00000001:
cmp x, #0
beq blk00000004
b blk00000006
blk00000004:
b <something>
blk00000006:

Since unconditional branches in ARM have a wider range of addresses, the assembler may accept this code.
The ARM manual speaks about "veneers" which are inserted by the linker for branch targets that are out of range:
https://www.keil.com/support/man/docs/armlink/armlink_pge1406301797482.htm
We should investigate whether this is an option for us, or whether we need to look into other solutions.

It is applicable to many architectures and the common approach is to delay the choice of the branch kind and perform branch relaxation at the later stages. See this article as an example.

This is (kind of) fixed in #210.


Announcement Banner Fixes

Description
This addresses a few issues that are specific to the developer site when it comes to using the Announcement Banner:

Fixes an issue where Gatsby would try to create a new page for an announcement MDX file
Fixes an issue where the sidebar was appearing under the header when a banner was present

Reviewer Notes
I added a hook called useResizeObserver that uses ResizeObserver under the hood. This may be helpful in other locations. At the moment, it's just set up to work with height, but we can make it more generalized if we want.
Related Issue(s) / Ticket(s)
N/A
Screenshot(s)
With a Banner:

Without a Banner:

It looks like we may need to polyfill the ResizeObserver when building.

I fixed the build issue with ResizeObserver but it looks like the build fails on some new functionality that comes from the AnnouncementBanner in the theme. Going to work on a fix there and then bump the version in this branch.


Limit frequency at which an account can attempt new payment, especially over failed lightning payment.

the idea would be to prevent someone to do a jam channel attack, by sending 100 or 1000 of payments to a node that would not validate the payment (using holdinvoice for instance)

stale PR that is worth looking at: https://github.com/GaloyMoney/galoy/pull/148


Add unittest module

Also included fnmatch module
Also added os.path.basename
Only added sequence helper, and sample tuple test.
Still minimal working, need tuning

./run third_party/stdlib/test/test_tuple.py                                                                                [add_unittest]$
['__class__', '__delattr__', '__dict__', '__enter__', '__exit__', '__getattribute__', '__hash__', '__init__', '__iter__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', 'close', 'next', 'read', 'readline', 'readlines', 'write']
test_constructors (__main__.TupleTest)
<unittest_runner._WritelnDecorator object at 0xc4200f23c0>
test_constructors (__main__.TupleTest) ... ERROR
test_hash (__main__.TupleTest)
<unittest_runner._WritelnDecorator object at 0xc4200f23c0>
test_hash (__main__.TupleTest) ... ok
test_iadd (__main__.TupleTest)
<unittest_runner._WritelnDecorator object at 0xc4200f23c0>
test_iadd (__main__.TupleTest) ... ok
test_imul (__main__.TupleTest)
<unittest_runner._WritelnDecorator object at 0xc4200f23c0>
test_imul (__main__.TupleTest) ... ok
test_len (__main__.TupleTest)
<unittest_runner._WritelnDecorator object at 0xc4200f23c0>
test_len (__main__.TupleTest) ... ok
test_repr (__main__.TupleTest)
<unittest_runner._WritelnDecorator object at 0xc4200f23c0>
test_repr (__main__.TupleTest) ... ok
test_truth (__main__.TupleTest)
<unittest_runner._WritelnDecorator object at 0xc4200f23c0>
test_truth (__main__.TupleTest) ... ok
test_tupleresizebug (__main__.TupleTest)
<unittest_runner._WritelnDecorator object at 0xc4200f23c0>
test_tupleresizebug (__main__.TupleTest) ... ok

======================================================================
ERROR: test_constructors (__main__.TupleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "third_party/stdlib/test/test_tuple.py", line 13, in test_constructors
    super(TupleTest, self).test_constructors()
  File "third_party/stdlib/test/seq_tests.py", line 136, in test_constructors
    self.assertEqual(self.type2test(g(s)), self.type2test(s))
  File "third_party/stdlib/test/seq_tests.py", line 21, in __getitem__
    return self.seqn[i]
TypeError: 'xrange' object has no attribute '__getitem__'

----------------------------------------------------------------------
Ran 8 tests in 0.419044s

FAILED (errors=1)
Traceback (most recent call last):
  File "third_party/stdlib/test/test_tuple.py", line 166, in <module>
    test_main()
  File "third_party/stdlib/test/test_tuple.py", line 162, in test_main
    test_support.run_unittest(TupleTest)
  File "third_party/stdlib/test/test_support.py", line 1466, in run_unittest
    _run_suite(suite)
  File "third_party/stdlib/test/test_support.py", line 1449, in _run_suite
    raise TestFailed(err)
TestFailed: Traceback (most recent call last):
  File "third_party/stdlib/test/test_tuple.py", line 13, in test_constructors
    super(TupleTest, self).test_constructors()
  File "third_party/stdlib/test/seq_tests.py", line 136, in test_constructors
    self.assertEqual(self.type2test(g(s)), self.type2test(s))
  File "third_party/stdlib/test/seq_tests.py", line 21, in __getitem__
    return self.seqn[i]
TypeError: 'xrange' object has no attribute '__getitem__'

None

This is fantastic! Would you mind moving fnmatch to a separate PR?

unittest depends on it, but will do.

Done #141, will remove from this PR, once that is merged.

Rebased.

Let me remove one debugging codes, or may be in another PR.

Done

Hmm, rebase, rollback something, one more

Should be ok now.


jazz_hands for non-rails projects

This gets jazz_hands working for non-rails projects. Gems are automatically required on requiring jazz_hands.

anything new here?

@MichaelSp take a look at my fork: jazz_fingers.
This project is abandoned.


Issue with stage 4 lightcurve modeling

I'm facing a problem while running Stage 4 to fit the lightcurves using fit_lightcurves.py and fit_lightcurves.yaml. It is unable to fit the mid-transit time. There is always a large random shift in the time axis.

Can you provide some more information about this? I have never encountered such an issue before.

I'm working on a NIRSpec/G395 transmission spectra. The stage1 to stage 3 of data reduction worked perfectly. However, at stage 4, I'm using the 'fit_lightcurves' files with the default set of model parameters, but it is never able to fit the lightcurves. There seems to be always some error with the mid-transit time (see the figure), and the shift is also not constant between each trial.

What do you mean by the "default set of model parameters"? Are you attempting to fit the mid-transit time, or fixing it?
Are you able to produce some minimal working example that reproduces this issue? That would be the easiest way to diagnose what is going wrong here.

I'm trying to fit the mid-transit time. Below is how my ''Fit Priors + Parameters'' look like.
params : ['per_p1', 't0_p1', 'rp_p1', 'inc_p1',           'u1_inst', 'u2_inst', 'ecc_p1', 'w_p1', 'a_p1',           'sigma_inst'] dists : ['fixed', 'uniform', 'uniform', 'fixed',          'uniform', 'uniform', 'fixed', 'fixed', 'fixed',          'loguniform'] values : [3.3448285, [60010, 60012], [0.08, 0.16], 85.7,           [0., 1.], [0., 1.], 0.0, 90., 7.17,           [0.000001, 0.1]]
The mid-transit time is approx. 60010.5. Below is the corner plot from the fit.

I've tried changing the priors widely and even ran on the other set, i.e. nrs2. However, the problem persists. It seems like the model isn't generating a transit function to fit the data, although I've selected lc_model_type : 'transit'

No, I don't think the issue is that the code is producing an eclipse as opposed to a transit model. Have you tried fixing the mid-transit time to the value that you expect? What happens then?
Also, from where are you getting the expected mid-transit time? Does this come from a white light curve fit, or is it a literature value? If it's a literature value, keep in mind that the JWST timestamps are in MJD, so BJD-2450000.5.
Also, where do the fixed a/R* and inclination values come from? Are they from the white light curve fit? How does the white light fit look?

Fixing the mid-transit doesn't change anything either (see below).

The expected mid-transit time is from the JWST time-stamps in MJD. The fixed a/R* and inclination values are from literature. I have also tried keeping them free, but that does not work either.
The white and chromatic lightcurve fits using Eureka! looks just fine (see below), which uses similar priors. However, I haven't been able to produce any correct fit using exoTEDRF yet.

Interesting.
Would you be willing to share with me the exact fit_lightcurves files that you're using as well as some example light curves (just a couple would be fine) so that I can try and reproduce this? It's difficult for me to diagnose what could be going wrong without knowing exactly what you're doing. If so, you can send everything to<EMAIL_ADDRESS>or share whatever private google drive, dropbox etc, link that you wish.

Thanks Radica for extending your help. I'm in the midst of some deadlines in here now, so let me get back to you in a few days with the LCs and the model parameters. In the meantime, I have modeled the LCs using other packages, and I'm really impressed with the reduced data from exoTEDRF. Expect to see us using your pipeline in several works in future :)


Update diffx-scalatest to 0.4.2

Updates com.softwaremill.diffx:diffx-scalatest from 0.3.30 to 0.4.2.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.softwaremill.diffx", artifactId = "diffx-scalatest" } ]

labels: test-library-update, semver-minor

Superseded by #72.


Show Onboarding Tours once and remove "Do not show me this again" checkbox

** To be done after https://github.com/CartoDB/cartodb/issues/13281 is merged. **
The goal of this issue is to re-do #13003.
It was already done in #13039 but it also applied to analysis result screen, which should always be displayed. After this change is reverted (https://github.com/CartoDB/cartodb/issues/13281), let's re-implement this (only considering onboarding tour screens).

[ ] Show Onboarding Tours only once.
[ ] Remove "Do not show me this again" checkbox for onboarding tour screens
[ ] Ensure other "onboarding" modals continue being displayed:

[ ] Analysis result screens
[ ] ?

cc: @matallo

Hi! I just wanted to know what the correct behavior should be  here, I talked with @arianaescobar and ended we came up with:

Show general (Builder) onboarding only once
Show data, style and analysis tabs onboardings only once
For every analysis applied, show the respective onboarding only once

One of the things we talked about analysis onboardings was showing them only once per map instead of per user, this will lead us to have:

General onboarding: ONCE PER USER
Layer content onboarding: ONCE PER USER
Analysis onboarding: ONCE PER MAP

What do you think @alonsogarciapablo @urbanphes?

Analysis onboarding: ONCE PER MAP

@ramiroaznar what do you think? do you think this is enough or should it be displayed every single time?

I really like the idea of having an analysis onboarding message once per map. So yes, I think it is enough.

👍

Looks good to me!

In production! 🚀


Archive blueprint_api

CMS will not continue the Rapid ATO initiative, and so this repository will be archived.

Archiving now.


Nether background ambient sounds persist when entering the overworld through an immersive portal

1.16 version.
They play of their own accord even when in the overworld and far from the portal.

Fixed. will be in the next version


ViewNode not rendering

Hi guys,
I want to track an image, and show some text above it. There is an "ar-augmented-image" sample, so I changed the part of the code where a "rabbit" image is detected. Instead of adding ModelNode() I'm adding ViewNode, but for some reason my text is not rendering.
ViewRenderable.builder()
         .setView(sceneView.context, R.layout.view_text)
          .build(sceneView.engine)
          .thenAccept {
                 sceneView.addChildNode(ViewNode(
                        engine = sceneView.engine,
                        modelLoader = sceneView.modelLoader,
                        viewAttachmentManager = viewAttachmentManager
                   ).apply {
                         quaternion = dev.romainguy.kotlin.math.Quaternion.fromEuler(-90f, 0f, 0f)
                         it.view.findViewById<TextView>(R.id.tvContent).text = "TEST TEST TEST"
                         setRenderable(it)
                         isEditable = true
                         scale = Scale(5f, -5f, 5f)
                         Toast.makeText(requireContext(), "IMAGE DETECTED", Toast.LENGTH_SHORT).show()
                    })
           }

In onViewCreated:
sceneView = view.findViewById<ARSceneView>(R.id.sceneView)
viewAttachmentManager = ViewAttachmentManager(requireContext(), sceneView)

and view_text.xml:
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:id="@+id/tvContent"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@android:color/holo_purple"
        android:text="DUGACAK TEkST"
        android:textColor="@android:color/black"
        android:textSize="20sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

I read in other issue that onViewLoaded might be needed but something like this didn't help as well:
onViewLoaded = { renderableInstance, view ->
     sceneView.addChildNode(this)
}

What am I doing wrong?

augmentedImage.trackingState is in state PAUSED, and it triggers only once, even in sample project, that's unexpected.

What worked in 0.9.5 no longer works in 2.0.2 regarding ViewNodes. In my case the ViewRenderable builder never completes.

Seems like it behaves the same on my side with 0.9.5 sadly.

I think there was some unnecessary code in the first post, but this cleaner version is still not working:
val node = ViewNode(        engine = sceneView.engine,        modelLoader = sceneView.modelLoader,        viewAttachmentManager = viewAttachmentManager        )        node.apply {                loadView(                       requireContext(),                       R.layout.view_text                )        quaternion = dev.romainguy.kotlin.math.Quaternion.fromEuler(-90f, 0f, 0f)         isEnabled = true         scale = Scale(5f)         Toast.makeText(requireContext(), "IMAGE DETECTED", Toast.LENGTH_SHORT).show() } sceneView.addChildNode(node)
I noticed there is different ViewNode in ModelViewer sample, but ViewNode which is used with ARSceneView is not working.

Thanks for answering, but still no luck.
Here is a whole MainFragment if somebody wants to take a look, there are minimal changes from ar-augmented-image sample.

Thank you so much, it works! No idea why my code doesn't work.
When I try to create AnchorNode with anchor(centerPose) to be the rootNode for your solution it crashes, and when I set sceneView as parent, the view is a bit away and rotated but it renders! :) So, I'll need to figure out some more stuff but your solution renders.

I am using the Geospatial API which will create a terrain anchor via "earth.resolveAnchorOnTerrainAsync". Then I create an AnchorNode via "AnchorNode(engine, terrainAnchor).

Ok so you are not using centerPose and createAnchor which are crashing for me.


Reorganize source files

For source files, an organizing principle is:

In folder where there are many subfolders, there should not be files, with the exception of small number of files.

This does not currently hold for several folders, e.g.:

src has many chain subfolders, and also many generic files

Some recommendations:

Move src/CHAIN subfolders to src/blockchains/CHAIN
Move src/SOURCE.cpp to src/generic/SOURCE.cpp, but src/interface can stay.
Similar structure under tests

It is important that any move is done properly via git, to correctly preserve history.

https://coinmarketcap.com/currencies/chainlink/

let's close this for now


Updated HiPS catalog support

Overview
This PR supersedes #289, building on the improved foundation that I've been working on. Namely:

Unifying all modes to to use the "app" as the viewer backend
Here, adding foundational support for async operations

The async support turns out to require an extremely gross hack of the Jupyter kernel framework but I believe that the approach is fundamentally OK, if hacky and fragile.
Checklist

[ ] No test coverage :-(
[ ] No docs :-(

YOLO.

Interesting hack of the kernel :)
To make it less fragile, we should probably control the allowed versions of the kernel a bit more. At least adding a minimum version for the ipykernel. It did not work with my previous ipykernel (5.5.4), but upgrading to the latest version (6.3.1) seems to solve the problem. So somewhere inbetween this hack starts to work, probably at 6.0.

@imbasimba Yes, that's a good idea. I'm hoping that this approach won't turn into a maintenance nightmare, but that depends a bit on how the ipykernel code evolves :-/


Fix cellids

This updates the example to use the exact perfect shape cell ID's used within the original app.
It returns a perfect shape (s2maps.com, fill in all the ids it returns) of the surrounding area. Matching the one within the app, including the ordering of the app.
It also updates the requirement to s2-geometry which is pure JS instead of Native binding.

This is great, just two small things:

The JSDoc comment says "lat lang" which is not a thing, please change to "latitude and longitude" or maybe just "coordinates"
Add documentation for the new method to README please

Also while we're at it, maybe (additonally) add something similar to this to get cells within a variable radius?
https://github.com/tejado/pgoapi/pull/162

I'll add radius later, for now the main prio was to mimic the real app.


nixos/users-groups: allow changing default home directory

Allows changing the default home directory instead of hardcoding /home, similarly to editing /etc/default/useradd on other distros.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/4927


Simplification pass for ACIR

Related issue(s)
Resolves #573
Description
Summary of changes
Add a simplification pass which removes gates of the form x=field value, by replacing x by its value in all the other gates.
The simplification is done on the fly, every-time a gate is added to the circuit. If it can be simplified, we update the previous gates using the solved value until nothing is solved. Usually only one pass is needed (so two in total to see that the second one did not solve anything)
Checklist

[X] I have tested the changes locally.
[X] I have formatted the changes with Prettier and/or cargo fmt with default settings.
[X] I have linked this PR to the issue(s) that it resolves.
[X] I have reviewed the changes on GitHub, line by line.
[X] I have ensured all changes are covered in the description.

For reference, why is this done on the fly instead of at the end like the other passes?
(Doing it on the fly seems to have made a lot of the code now need to take a Result)

There's been quite a bit of merge conflicts on this, that I will resolve

What is the status on this PR? Do we want to try to fix the conflicts and merge it, restart it, or abandon it?

What is the status on this PR? Do we want to try to fix the conflicts and merge it, restart it, or abandon it?

I think the acvm changes are too big for solving the conflicts. I will create another PR (probably we need two now) and then we can abandon this one.

Closing in favour of https://github.com/noir-lang/acvm/pull/151


I cannot call EventBus.getDefault().Register() in service

I cannot call EventBus.getDefault().register() and  add  onMessageEvent in service

Please share an example that we can use to reproduce this issue.

Please share an example that we can use to reproduce this issue.

maybe in service module ,u did not add the implementation of Eventbus

Closing this issue due to inactivity. :zzz: Feel free to comment with more details or submit a new issue.


Use consistent dtypes

We are not guaranteed that users will always use the default double precision for the input images and the output model (eg. LSST uses single precision). Internally we occasionally use numpy.zeros, numpy.ones, and perhaps other functions that generate an array of type np.float64, which results in unnecessary casting operations and can even give output models of the wrong type.
We should go back through the code, make sure that we are always using the proper dtype, and add an assert to nearly all of our tests to make sure that we are getting the expected output types.

Agreed. I also came to this problem with my RandomSource code which doesn't even require an observation and thus has no way of know what the dtype is.
How about adding dtype to Frame?

I think that's a good idea. We can have it default to numpy.float64 since that is the numpy default.

np.float32 should do and give us 2x memory


Mint page UI wrongly hidden.

In mint page, if drag the "screenshot square", the UI will disappear, then stuck in this state, can't move forward/backward.
---UPDATE---
The buttons still there, can click, just invisible.
And if resize the window, the UI will restore, haven't find other ways to to restore.
Looks this issue just happen on my side.
Tested with windows 10 + chrome 106.
https://user-images.githubusercontent.com/10785634/215415853-986b8bcb-ef5c-4a82-a748-119afab61220.mp4

@memelotsqui Fixed it on different-resizable branch, can close when merged.

Fixed by https://github.com/webaverse-studios/CharacterCreator/pull/229


Fix minizinc configuration

When importing skdecide.hub, the path to minizinc binaries and to
solvers definition is updated with embedded versions of minizinc.
This worked great with install from releases but was not working when
using poetry, because paths are different.
Moreover, more folders than needed were potentially added to PATH
variable.
For release install, it is actually sufficient to look at directory
containing skdecide.hub.__init__.py as it should contain the solvers
configuration files *.msc and the bin/ directory with minizinc (and
the C++ library __skdecide_hub_cpp)
For poetry, except for gecode.msc, the solver configurations and the bin/
directory with minizinc are in the build directory generated by poetry install,
together with the C++ library  __skdecide_hub_cpp, which is used to find the proper
directory.
=> skdecide/hub/__init__.py is modified consequently.
For this to work, gecode.msc needs also to be copied to the directory in build/
containing the other solvers configurations like chuffed.msc. Indeed, gecode.msc
"mznlib" field refers to a path relative to it which actually exists in the latter directory.
=> a postbuild_dev.py script is added doing this and the documentation
for developpers is amended to show how to use it.

I have tested the changes on unix, but it would be nice to check it also on macos and windows.
To do so, checkout the branch, download this small example script which uses the minizinc+gecode embedded in scikit-decide, and
poetry install --extras all
poetry run python postbuild_dev.py
poetry run python gecode.py

I tried that at first but did not find how to do that with poetry. So this is the best solution i found. (Actually other people wanted to do that during building process and poetry people answered that it was not possible but i do not remember the post now)


Drop arduino String class at the FirebaseArduino layer.

We should translate from String to std::string at the FirebaseArduino layer and use std::string on all internal classes. This will make the library portable and will make testing easier.
Once this is done we can stop patching ArduinoJson releases to address our conflicting String overrides as well.

We should also make sure if possible that the conversion doesn't add too many extra copies.
Maybe we could have overrides that also accept char* + size.

I don't think this will be feasible. Unfortunately I did not find out until pretty late that Arduino IDE cannot link std::string at all :(
I will keep looking for a way to make it happen but you just get a bunch of:
undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
I have a branch pretty much ready to go otherwise as this is a linking error so all compilation issues are fixed:
https://github.com/googlesamples/firebase-arduino/compare/master...ed7coyne:remove-arduino-string

So you should only need to force the instantiation of the std::string template to make that work:
template class std::basic_string<char>;

See https://github.com/esp8266/Arduino/issues/1136#issuecomment-162331360

hmm good find. Addressed most of them. Now I am just left with:
sketch/FirebaseDemo_ESP8266.ino.cpp.o: In function `loop': /usr/local/google/home/edcoyne/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/bits/basic_string.tcc:732: undefined reference to `std::__throw_out_of_range(char const*)' sketch/FirebaseDemo_ESP8266.ino.cpp.o: In function `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_check(unsigned int, char const*) const': /usr/local/google/home/edcoyne/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/xtensa-lx106-elf/include/c++/4.8.2/bits/basic_string.tcc:732: undefined reference to `std::__throw_out_of_range(char const*)' collect2: error: ld returned 1 exit status

If they will accept https://github.com/esp8266/Arduino/pull/2062 it will fix it. We may need a temporary fix on our side until then.

my code cannot be compiled for Arduino since adding this library:
#include <FirebaseArduino.h>
Error:
/Users/dirkvranckaert/Documents/Arduino/libraries/firebase-arduino-master/src/FirebaseArduino.h:20:18: fatal error: string: No such file or directory  #include <string>
I guess that's what this issue is all about. How can I get passed this issue and still compile? Why is this an issue with my arduino uno?

@dirkvranckaert this library currently only works with esp8266 boards. I'd be tricky to get it to work with Uno unless you get a Wifi shield.

Allright, I have one around (a Wemos D1), just gave it a try and indeed compilation succeeds! Will try one of the examples! Thanks a lot!

Fixed with #169

my code cannot be compiled for Arduino since adding this library:
#include <FirebaseArduino.h>
Error:
/Users/dirkvranckaert/Documents/Arduino/libraries/firebase-arduino-master/src/FirebaseArduino.h:20:18: fatal error: string: No such file or directory #include <string>
I guess that's what this issue is all about. How can I get passed this issue and still compile? Why is this an issue with my arduino uno?

Even I am facing the same issue. I don't have a builtIn WiFi Board. Can you help me out please?


Connection seems to connect to <IP_ADDRESS> instead of proper URL:

Although I specify a non-localhost server, the library seems to ignore it and try to connect to localhost anyway.
The code works when I actually have an Elasticsearch instance listening on localhost:9200. Also possibly relevant: If I use a Docker container running the official Elasticsearch image, and forward local port 9200 to the Docker port 9200, everything is fine. But if I forward another port, say 10200 to the Docker port 9200, it also fails.
Code:
// connectToElasticsearch sets the global es variable to an Elasticsearch connection.
func connectToElasticsearch() {
        var err error
        esURL := os.Getenv("HAYSTACK_URL")
    log.Println("esURL: ", esURL)
        es, err = elastic.NewClient(elastic.SetURL(esURL))
        if err != nil {
                log.Fatalf("Unable to connect to Elasticsearch at URL %s: %s\n", esURL, err)
        }
        _, _, err = es.Ping().Do()
        if err != nil {
                log.Fatal("Unable to ping Elasticsearch: ", err)
        }
        index = os.Getenv("HAYSTACK_INDEX")
        if index == "" {
                index = "haystack"
        }
}

Output:
2015/10/04 17:12:52 esURL:  http://<IP_ADDRESS>:9200
2015/10/04 17:12:52 Unable to ping Elasticsearch: Get http://<IP_ADDRESS>:9200/: dial tcp <IP_ADDRESS>:9200: getsockopt: connection refused
Command exited with non-zero status 1

Please set the URL when using the Ping service. The Ping service is special in that, by default, it uses <IP_ADDRESS>:9200. Search the issues and/or the wiki for an explanation (on my iPhone, sorry).

Am 04.10.2015 um 19:17 schrieb Shawn Milochik<EMAIL_ADDRESS>Although I specify a non-localhost server, the library seems to ignore it and try to connect to localhost anyway.
The code works when I actually have an Elasticsearch instance listening on localhost:9200. Also possibly relevant: If I use a Docker container running the official Elasticsearch image, and forward local port 9200 to the Docker port 9200, everything is fine. But if I forward another port, say 10200 to the Docker port 9200, it also fails.
Code:
// connectToElasticsearch sets the global es variable to an Elasticsearch connection.
func connectToElasticsearch() {
var err error
esURL := os.Getenv("HAYSTACK_URL")
log.Println("esURL: ", esURL)
es, err = elastic.NewClient(elastic.SetURL(esURL))
if err != nil {
log.Fatalf("Unable to connect to Elasticsearch at URL %s: %s\n", esURL, err)
}
_, _, err = es.Ping().Do()
if err != nil {
log.Fatal("Unable to ping Elasticsearch: ", err)
}
index = os.Getenv("HAYSTACK_INDEX")
if index == "" {
index = "haystack"
}
}
Output:
2015/10/04 17:12:52 esURL:  http://<IP_ADDRESS>:9200
2015/10/04 17:12:52 Unable to ping Elasticsearch: Get http://<IP_ADDRESS>:9200/: dial tcp <IP_ADDRESS>:9200: getsockopt: connection refused
Command exited with non-zero status 1
—
Reply to this email directly or view it on GitHub.

Yeah, sorry -- I found out that this is a dupe of #86.
I was having two different problems and got them confused. First it was failing to connect (not ping). It turns out that the environment variable was missing the http:// prefix, adding that fixed it. However, after adding the http://, I saw it was still getting an error and failed to notice that it was a different problem.
Thanks!


Support GraphQL (AppSync)

GraphQL has a really nice way of modeling APIs and Types and how they're fulfilled by many different backend calls (via adapters). This creates an interesting opportunity to leverage Punchcard's abstraction of Build and Run time to build generic and re-usable APIs on top of diverse and complex AWS resources.

Interesting code-first approach for GraphQL: https://github.com/MichalLytek/type-graphql

Woah! I really like the look of type-graphql. Nice usage of decorators - something we haven't used in Punchcard yet. This might be a better way to define things like Shapes!
I'm gonna see if Punchcard can integrate with its dependency injection framework. It would be amazing to have an end-to-end of a type-graphql app backed by the CDK.
Then, if we can figure out how to do UI (integrate with React), then we'd have a full stack.

Also: https://oss.prisma.io/graphqlgen/

decorators plus the generation of metadata from them are really powerful ❤ and also fits perfectly for the shapes in general
food for thought: create another example of how the full react stack should look like (like using Cloudfront, S3, and even Route53 with an "graphql" endpoint). this one will surely attract a lot of people to know more about how great is punchcard and CDK in general

Just not quite sure how to generate the DSLs for things like DynamoDB if we move to annotated classes.
E.g.
const MyShape = struct({
  key: string({maxLength: 1})
});

// vs

class MyShape {
  @string({maxLength: 1})
  public key: string;
}

If we use MyShape in a Table:
const table = new DynamoDB.Table(..,.., {
  attributes: MyShape,
  partitionKey: 'key'
});

// and then the generated DSL:

await table.put({
  item: ...,
  if: item => item.key.equals('key')
});

Perhaps a JS proxy could help us here?
We'd have to change how the type-mapping works. Shapes currently encode the "runtime shape" in the type: e.g. class StringShape extends Shape<string>. I.e. the runtime type is annotated on the build-time value. A decorated class is the other way around: you define the runtime type and then use decorators to assign build-time details. It's also more idiomatic, so I like that. But is it as capable?

Here's a succinct way to integrate Shapes with Classes:
const dataShape = Symbol();

class MyShape implements RuntimeShape<MyShape[typeof dataShape]> {
  public readonly [dataShape] = struct({
    key: string()
  });

  public key: string;
}

Simplifying this further - remove the struct concept and use a class instead:
class MyShape {
  @Annotation
  public readonly key = string();
}

Only caveat is that a runtime value is not an instance of this class, it is an instance of RuntimeShape<MyShape>.

This seems really clean.
export interface ClassType<T = any> {
  new (...args: any[]): T;
}

type Value<T> = {
  [prop in keyof T]:
    T[prop] extends Shape ? RuntimeShape<T[prop]> :
    T[prop] extends ClassType<infer V> ? Value<V> :
    never;
};

class OtherType {
  key = string();
}

class Rate {
  rating = integer();
  key = string();
  otherType = OtherType;
  nested = Rate;
}

const rate = new Rate();
const rateValue: Value<Rate>;
rateValue.key; // string
rateValue.otherType; // Value<OtherType>
rateValue.nested.key; // string

Even supports recursive types by the looks of it.

I was checking the struct-overhaul branch, it reminded me of how kotlin does json (de)serialization, the readability is really nice! even though the code itself is over my head, the generated metadata is really interesting and the use o Proxy while providing type-safety recursively without having to mutate the input 🥇

Do you have a link to an example of how Kotlin does it?
It reminds me of Django/Google App Engine for Python, where class members are values that represent a type.
https://docs.djangoproject.com/en/3.0/topics/db/models/
from django.db import models

class Person(models.Model):
    first_name = models.CharField(max_length=30)
    last_name = models.CharField(max_length=30)

Except I de-coupled the constraints (such as max_length) from the type itself with a new concept, Trait. Traits are a lot like Decorators, except they augment the type of what they are decorating. Ordinary decorators are also supported, but they don't maintain type information.
An example of this in action:
class MyType {
  /**
   * Field documentation.
   */
  id = string
    .apply(MaxLength(1))
    .apply(MinLength(0))
    .apply(Pattern('.*'));

  // can be thought of like
  // @MaxLength(1)
  // @MinLength(0)
  // @Pattern('.*)
  // id = string
}

// the type of the derived schema retains all information, even the literal values
// such as maxLength: 1, instead of maxLength: number
// note: the type is inferred, I've explicitly included it here to illustrate
const schema: ObjectSchema<{
  id: StringSchema<{
    maxLength: 1;
    minLength: 0;
    pattern: ".*";
  }>;
}> = JsonSchema.of(MyType);

This issue is related: https://github.com/Microsoft/TypeScript/issues/7169 - support for the reification of generic types by the TS compiler for use with JS reflection.
My plan for the struct-overhaul change is to provide a modular/re-usable framework for defining types and then deriving type-safe Abstract Syntax Trees (ASTs) from them. E.g. JSON Schema, JSON Path, the DDB DSL already built in Punchcard, etc. This one type-system will support any data format - i'm envisioning Avro, Parquet, Thrift, Smithy and even an ORM for type-safe SQL DSLs.
The framework in its current state already supports all the features I need. I'm just in the middle of porting the existing work in punchcard to separate @punchcard/shape-* libraries. I'm super excited to have these libraries as stand-alone - the dynamodb library, for example, will be usable without punchcard, which should (in my opinion) provide a better experience than https://github.com/awslabs/dynamodb-data-mapper-js

Some cool (potentially useful) type-machinery is the use of this metadata to build type-safe predicates:
class MyType {
  count = number
    .apply(Maximum(1))
    .apply(Minimum(1, true))
    .apply(MultipleOf(2))
}

function requireEven(schema: NumberSchema<{multipleOf: 2}>) {
  // this function requires the schema to represent even numbers
}

const schema = JsonSchema.of(MyType);

// compiles
requireEven(schema.properties.count);

Compilation breaks if I now comment out the .apply(MultipleOf(2)).
I wonder if we could do operations like <, >, etc. It would likely require machinery similar to Shapeless's Nat, a type-level representation of natural numbers: https://github.com/milessabin/shapeless/blob/master/core/src/main/scala/shapeless/nat.scala
I found this, https://github.com/thomaseding/nat-ts, not sure how useful it is though.

This has turned out so much better than I'd expected. It's a generic, type-safe AST transformer. Shapes + Traits modeled in the TS compile-time type-system mean I can transform a Shape declaration into any other format (AST) without loss of type information metadata. In fact, that metadata information can even be used to influence the result.
This is effectively a generic code generator that doesn't generate code - it generates types. Look how easy it is to generate code:
class MyType {
  /**
   * Field documentation.
   */
  id = string
    .apply(MaxLength(1))
    .apply(MinLength(0))
    .apply(Pattern('.*'))
    ;

  count = number
    .apply(Maximum(1))
    .apply(Minimum(1, true))
    .apply(MultipleOf(2))
    ;

  nested = Nested;
  array = array(string);
  complexArray = array(Nested);
  set = set(string);
  complexSet = set(Nested);
  map = map(string);
  complexMap = map(Nested);
}

// generate an interface representing this object at runtime
interface MyRuntimeRepresentation extends Runtime.OfType<MyType> {}

// generate an interface representing this object's JSON schema reprsentation
interface MyJsonSchemaRepresentation extends JsonSchema.OfType<MyType> {}

Implementing a AST transformer is relatively simple too. This is all that's required to map a Shape to its JavaScript runtime value:
https://github.com/punchcard/punchcard/blob/3d27a962155ffcdc5928a7b9c248a3e0d6cd554e/packages/%40punchcard/shape-runtime/lib/runtime.ts#L1-L49

well, I'm 5 minutes'ish late, but here's how kotlin + moshi does it https://proandroiddev.com/getting-started-using-moshi-for-json-parsing-with-kotlin-5a460bf3935a
android Room is similar, but using SQLite but needs a lot of boilerplate to generate the relations (for obvious reasons), but they all use decorators https://android.jlelse.eu/android-room-using-kotlin-f6cc0a05bf23

Bundling (#100) refers to the running of webpack to create a minified JS file for running inside Lambda. It shouldn't clash with this change - the new Shape system is ordinary JS/TS.


Correct interpretation of proxy.config.ssl.client.verify.server

Correcting the documentation and the implementation.  The current implementation reads the potentially overridable proxy.config.ssl.client.verify.server in HttpSM, but throws that away and reads it again in SSLNetVConnection and uses the ssl_server_name value for the override instead.  So this commit removes the overrideable mechanics for the setting and updates the documentation to point to the ssl_server_name documentation instead.
There was also a change in interpretation in the values for proxy.config.ssl.client.verify.server as the sni_server_name integration was done which caused the values for 2 and 1 to swap meetings.  This PR changes the logic back to the original meaning.  1 is enforcing and 2 is logging only on verification errors.

@shinrich There are conflicts on this cherry picking this PR, can you please open another PR for the 8.0.x branch if you want this backported.

Because of conflict a new PR was created to merge into 8.1.0: #5234