IPv6 problems in resolvers.conf and more

Hello,
I get the following error:

[app] starting Nginx Proxy Manager...
[nginx] starting...
nginx: [emerg] invalid port in resolver "fd00::de39:6fff:feb8:f93e" in /etc/nginx/conf.d/include/resolvers.conf:1
[3/25/2020] [10:59:12 PM] [Migrate ] › ℹ info Current database version:<PHONE_NUMBER>5017
[3/25/2020] [10:59:12 PM] [IP Ranges] › ℹ info Fetching IP Ranges from online services...
[3/25/2020] [10:59:12 PM] [IP Ranges] › ℹ info Fetching https://ip-ranges.amazonaws.com/ip-ranges.json
[nginx] starting...
nginx: [emerg] invalid port in resolver "fd00::de39:6fff:feb8:f93e" in /etc/nginx/conf.d/include/resolvers.conf:1
[3/25/2020] [10:59:12 PM] [IP Ranges] › ℹ info Fetching https://www.cloudflare.com/ips-v4
[3/25/2020] [10:59:12 PM] [IP Ranges] › ℹ info Fetching https://www.cloudflare.com/ips-v6
[3/25/2020] [10:59:12 PM] [SSL ] › ℹ info Let's Encrypt Renewal Timer initialized
[3/25/2020] [10:59:12 PM] [SSL ] › ℹ info Renewing SSL certs close to expiry...
[3/25/2020] [10:59:12 PM] [IP Ranges] › ℹ info IP Ranges Renewal Timer initialized
Uncaught Error: listen EADDRINUSE: address already in use :::3000
FROM
Server.emit (events.js:167:7)
emitErrorNT (net.js:1317:8)
process._tickCallback (internal/process/next_tick.js:63:19)
2020-03-25 22:59:12 63 [Warning] Aborted connection 63 to db: 'nginxproxymanager' user: 'nginxproxymanager' host: 'localhost' (Got an error reading communication packets)

The first problem is easy:
resolvers.conf looks like this:
resolver <IP_ADDRESS> fd00::de39:6fff:feb8:f93e ;
but to my understanding should look like this:
resolver <IP_ADDRESS> [fd00::de39:6fff:feb8:f93e] ;
This will fix the "invalid port in resolver" error.
I think the resolver.conf is generated in /etc/cont-init.d/nginx-proxy-manager.sh:147
echo resolver $(awk 'BEGIN{ORS=" "} $1=="nameserver" {print $2}' /etc/resolv.conf) ";" > /config/nginx/resolvers.conf
Second problem is EADDRINUSE error.
I don't know where it originates from but :::3000 seems to be another IPv6 related syntax problem.
I think it should be [::]:3000 instead.
I just don't know why the second error appeared after my last container update, I already had it running on IPv6 after hot-fixing the first problem myself directly on the resolvers.conf.
Thank you for this great container/app!

I just noticed that the second error is no syntax problem, I really do have port 3000 in use on my machine.
But the problem is that it would be a lot of work (> 2 days) to move / change everything connected to my database running at that port.
Could you please map the backend app port via container variable so we can change it we want to?

Could you provide the content of your /etc/resolv.conf ?
For the port, if you use the "bridge" network mode, you can map the port of the container to any port on your host.

I agree if using the bridge network mode, but while my unraid OS has IPv6 connectivity, I was unable to get it to work for containers in bridge mode.
Thats why this might not be an option for everyone.
Content of /etc/resolv.conf

/tmp # cat /etc/resolv.conf
Generated by dhcpcd from br0.dhcp, br0.dhcp6, br0.ra
/etc/resolv.conf.head can replace this line
domain fritz.box
nameserver <IP_ADDRESS>
nameserver fd00::de39:6fff:feb8:f93e
/etc/resolv.conf.tail can replace this line

Thanks for the help

Issue with resolvers.conf is now fixed.


Replace PropTypes from react with form prop-types package

see https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html#migrating-from-react.proptypes

Thanks <3

3.1.2 is out


Review haikro workflow

Note: you can configure grunt compress target to a tar or tgz mode.

https://www.npmjs.com/package/grunt-heroku-build-api


Change Request Dita

I am trying to run a CR though the DDPM.
I generated CR8000 from the Orchestrator yesterday.
change-paper-CR8000-20-08-2024.zip
I get this message to say the Dita isn't correct.
Is there a problem with the Orchestrator generation?

I have also tried to run CR8001 through the DDPM and get the same error:

change-paper-CR8001-21-08-2024.zip

I have tried to run the dita file for the newly ingested CR1915 and get the same error:

The actual publication of the change papers/websites is outside of the scope of System C's statement of work. However, the zip file does contain the nhs_data_dictionary.ditamap file. If you open the zip file, you will see a sub-folder called dita, then all files below that. This sounds like your DDPM tool needs to be aware of this file structure.

@likin1 - can you have a look at this please?

Hi  @AngelaFaulding This has been fixed and deployed on dev environment

Hi @likin1 - I ran a CR yesterday and I wanted to run another couple this morning before I spoke to Steve. They seem to run OK but now it says there are no CRs. Can you help please?

This issue is not related to Mauro. Please could the "System C" label be removed?

@AngelaFaulding Hi i have fixed the issue where in you were unable to generate the CR if you change the id. Its fixed now .You can choose whatever id you want

I have tested this and it worked OK. We now need to test some further branches to ensure the fix works permanently.

Likin has tested and works ok - Kate & Angela to test


Add Barbados Calendar.

refs #

For information, read and make sure you're okay with the CONTRIBUTING document.

[x] Tests with a significant number of years to be tested for your calendar.
[x] Docstrings for the Calendar class and specific methods.
[x] Use the workalendar.registry.iso_register decorator to register your new calendar using ISO codes (optional).
[x] Calendar country / label added to the README.rst file,
[x] Changelog amended with a mention like: "Added <country> by @pseudo (#)"

I've not found much of official sources, here are examples of two years on the official websites:
https://web.archive.org/web/20090806030650/http://www.barbados.gov.bb/bdospublichol2.htm
https://labour.gov.bb/wp-content/uploads/PDF/Public-Holidays-for-the-Year-2019.pdf

Hi, I think I've closed all the open points, let me know if there are still some outstanding.
Thanks.

released and available on PyPI.


feat(#2): Add Fist JavaProgram Class

Create project skeleton with deployment pipeline.
Closes: #2.

History:

feat(#2): add remove redundant code from pom.xml
feat(#2): ignore .idea folder
feat(#2): add dummy class

@rultor merge

@rultor merge

@volodya-lombrozo OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@rultor merge

@volodya-lombrozo OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@volodya-lombrozo Done! FYI, the full log is here (took me 1min)

@rultor release, tag is 0.0.1, title is 0.0.1.

@rultor release, tag is 0.0.1, title is 0.0.1.

@volodya-lombrozo OK, I will release it now. Please check the progress here

@rultor release, tag is 0.0.1, title is 0.0.1.

@volodya-lombrozo Done! FYI, the full log is here (took me 1min)


hyprland.conf error at the sensitivity setting.

Hyprland Version
 System/Version info
Hyprland, built from branch HEAD at commit c5e28ebcfe00a510922779b2c568cfa52a317445  (props: bump ver 0.37.1).
Date: Sat Mar 16 14:51:49 2024
Tag: v0.37.1

flags: (if any)

System Information:
System name: Linux
Node name: archlinux
Release: 6.8.1-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Sat, 16 Mar 2024 17:15:35 +0000

GPU information:
07:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X] [1002:67ef] (rev e5) (prog-if 00 [VGA controller])

os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo

Bug or Regression?
Bug
Description
So i start my computer today after an update. And now i get this error.

Did something change on the config file? If so what i need to do?
All i understand from the massage is that i need to specify the device name... on the setting but i am not sure what the syntax is... I need to specify like mouse model after the device: or something like that ?
This is the line/block from my config file.
device:epic-mouse-v1 {
    sensitivity = -0.5
}

If my full config is needed is available here.
How to reproduce
I thing you can paste my config block
device:epic-mouse-v1 {
    sensitivity = -0.5
}

On a hyprland.conf file. And load the config.
Crash reports, logs, images, videos
No response

use hyprctl devices to find your real mouse name and replace epic-mouse-v1 with the name of your mouse.

So i did that nothing change.
device:logitech-g502-hero-gaming-mouse {
    sensitivity = -0.5
}

hyprctl devices | grep mouse
logitech-g502-hero-gaming-mouse
logitech-g502-hero-gaming-mouse-keyboard-1
logitech-g502-hero-gaming-mouse-keyboard
This is the out put.

I added the first think.

sorry made a mistake, ignore my comment
try
input {
sensitivity = -0.5
}
instead of the mouse

Replace device:logitech-g502-hero-gaming-mouse with input basically

Ok.
This is working. Thenx you for your help.

If you still want to seperately edit your mouse sensitivity by any chance, the syntax changed and the new one would be:

where you replace epic-mouse-v1 with your logitech mouse name (if you need it)
cheers

Nah, input is global stuff. It will work, but not the same if you have several devices. Basically per-device config is changed in new version, see here https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs
You need something like this
device {
    name = epic-mouse-v1
    sensitivity = -0.5
}

instead of
device:epic-mouse-v1 {
    sensitivity = -0.5
}

This setting was this way by default... I did not want to change anything about the mouse.... sooo...
Its better to comment it out then, and keep it here as comment for documentation?.


@retry decorator seems to have no effect

Hullo,
On CentOS 7 (python 2.7.5)  I'm trying to validate a trivial script, and the @retry decorator seems to be completely ignored:
import sys
import os
from retrying import retry

@retry
def do_something_unreliable():
    print sys.argv[1]
    if os.system(sys.argv[1]):
        return "fail"
    else:
        return "Awesome sauce!"

print do_something_unreliable()

Transcript showing that there is no competition for the name retry
[root@jenkins ~]# python /usr/local/bin/retry.py false
Traceback (most recent call last):
  File "/usr/local/bin/retry.py", line 3, in <module>
    from retrying import retry
ImportError: No module named retrying
[root@jenkins ~]# pip install retrying
Collecting retrying
  Using cached retrying-1.3.3.tar.gz
Requirement already satisfied (use --upgrade to upgrade): six>=1.7.0 in /usr/lib/python2.7/site-packages (from retrying)
Installing collected packages: retrying
  Running setup.py install for retrying
Successfully installed retrying-1.3.3
[root@jenkins ~]# python /usr/local/bin/retry.py false
false
fail

I was expecting to see false\nfail\n shooting up the screen, but the @retry appears to simply not happen :/ Any advice would be warmly welcomed!
Cheers,
Gavin.

First, sys.argv[1] is of type str, not Boolean. Therefore, you're if will always be true, and fail will be printed onto the screen.
@retry only retries if an exception is raised. Your function is not raising any exception, therefore it is never retried.


Feature request: Exporting the UTXO table to CSV

Thanks - already implemented in https://github.com/sparrowwallet/sparrow/commit/fc9cdaabb4b7b602dfd93b26d1fc53a2e92144b2 :)


Mismatching path in Windows when loading UCF101

🐛 Describe the bug
I tried to load UCF-101 by torchvision.datasets.UCF101 on my Windows laptop. However, I cannot get correct indices by _select_fold. Line 113 may go wrong in Windows.
Variable i is 'path_to_video/ApplyEyeMakeup\\v_ApplyEyeMakeup_g01_c01.avi', while
selected_files is 'path_to_video/ApplyEyeMakeup/v_ApplyEyeMakeup_g01_c01.avi'
The reason is that i is created by os.path.joint() using the double right slash. But selected_files is extracted from annotation files. Paths in these files are using the left slash, e.g. 'ApplyEyeMakeup/v_ApplyEyeMakeup_g01_c01.avi'.
May I know how to fix this, please? Many thanks!
Versions
Collecting environment information...
PyTorch version: 1.10.0+cu102
Is debug build: False
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A
OS: Microsoft Windows 10
GCC version: Could not collect
Clang version: Could not collect
CMake version: Could not collect
Libc version: N/A
Python version: 3.8.12 (default, Oct 12 2021, 03:01:40) [MSC v.1916 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.18363-SP0
Is CUDA available: True
CUDA runtime version: 10.2.89
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\cudnn64_7.dll
HIP runtime version: N/A
MIOpen runtime version: N/A
Versions of relevant libraries:
[pip3] mypy==0.910
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.21.4
[pip3] pytorch-lightning==1.5.5
[pip3] pytorch-memlab==0.2.4
[pip3] torch==1.10.0+cu102
[pip3] torch-geometric==2.0.2
[pip3] torch-scatter==2.0.9
[pip3] torch-sparse==0.6.12
[pip3] torchaudio==0.10.0+cu102
[pip3] torchmetrics==0.6.1
[pip3] torchsummary==1.5.1
[pip3] torchvision==0.11.1+cu102
[conda] libblas                             3.9.0                 12_win64_mkl    conda-forge
[conda] libcblas                           3.9.0                 12_win64_mkl    conda-forge
[conda] liblapack                         3.9.0                 12_win64_mkl    conda-forge
[conda] mkl                                  2021.4.0           h0e2418a_729    conda-forge
[conda] mypy                               0.910                pypi_0    pypi
[conda] mypy-extensions            0.4.3                  pypi_0    pypi
[conda] numpy                            1.21.4                py38h089cfbf_0    conda-forge
[conda] pytorch-lightning           1.5.5                  pypi_0    pypi
[conda] pytorch-memlab            0.2.4                   pypi_0    pypi
[conda] torch                               1.10.0+cu102    pypi_0    pypi
[conda] torch-geometric             2.0.2                   pypi_0    pypi
[conda] torch-scatter                  2.0.9                   pypi_0    pypi
[conda] torch-sparse                  0.6.12                  pypi_0    pypi
[conda] torchaudio                     0.10.0+cu102     pypi_0    pypi
[conda] torchmetrics                  0.6.1                    pypi_0    pypi
[conda] torchsummary              1.5.1                     pypi_0    pypi
[conda] torchvision                    0.11.1+cu102      pypi_0    pypi
cc @pmeier

This issue has been discussed in stackoverflow.

Hey @XianyuanLiu, thanks a lot for the report. I send a PR that fixes this, but it will only be included in the next release in ~3 months.
Until then, the answer on SO is spot on. I suggest you follow the first proposal and modify the files in-place.
import os
import pathlib

root = ...

for path in pathlib.Path(root).glob("*list*.txt"):
    with open(path, "r+") as file:
        content = [line.replace("/", os.sep) for line in file]
        file.seek(0)
        file.writelines(content)

Don't forget to make a backup of them to be able to restore them after the patch is released.

Many thanks! I will close this.


Switch to rquickjs

Description of the change
Historically, the Javy project has relied on its own QuickJS bindings in order to consume QuickJS's functionality. When the project started, there were very limited options for bindings that could work for our use-case and more importantly, bindings that would compile to wasm32-wasi. That said, bindings under this project are "good enough" for Javy, but they are probably not the most ergonomic for use-cases that require more complex interactions with QuickJS.
The Rust <> QuickJS landscape has changed in the past few years, which means that it's probably a good time to reconsider our initial decisions.
This draft PR (incomplete at this time!) proposes migrating to rquickjs and dropping support for quickjs-wasm-rs and quickjs-wasm-sys. The rquickjs bindings are more ergonomic and enable more natural interactions between Rust and QuickJS's API.
With the adoption of rquickjs, we'd be able to address issues like: https://github.com/bytecodealliance/javy/issues/605, https://github.com/bytecodealliance/javy/issues/608, https://github.com/bytecodealliance/javy/pull/617 and https://github.com/bytecodealliance/javy/pull/611.
Checklist

[ ] I've updated the relevant CHANGELOG files if necessary. Changes to javy-cli and javy-core do not require updating CHANGELOG files.
[ ] I've updated the relevant crate versions if necessary. Versioning policy for library crates
[ ] I've updated documentation including crate documentation if necessary.

Ok, so all tests are passing here. I'm working on migrating our json/msgpack ser/de and that should be the last step (aside from vetting the new dependencies) to get this in a review-ready state.

We should update the READMEs for quickjs-wasm-sys and quickjs-wasm-rs to indicate they are deprecated in favour of rquickjs. Would that make sense to do as part of this PR or in a follow up one?

I'll do that as a follow-up. I added an entry in the PR description.

Oops meant to push https://github.com/bytecodealliance/javy/pull/618/commits/5fde19c7316d693bb895e0b169a038622a83e657, into a copy branch to do some testing -- I'll revert it.

Thanks a lot for doing switching to rquickjs work .Till when can I expect the new release on github roughly ?

Mid June is my estimate: we're doing more extensive testing and working on other improvements before releasing the next version.

I'm trying to figure out which version of QuickJS that the Javy's master branch is using.
Is it 2024-01-13 or 2023-12-09?
https://bellard.org/quickjs/

https://github.com/bellard/quickjs/blob/3b45d155c77bbdfe9177b1e03db830d2aff0b2a8/VERSION -- we currently rely on rquickjs version 0.6.1, which points to the link above, which defines version 2024-02-14

Thanks @saulecabrera!


(WIP): PT-913: autoAcceptance and enquiry reservation buttons, texts and styles

Description :sparkles:
Issues :bug:
Testing :alembic:
Screenshots :camera_flash:
Additional notes :spiral_notepad:

Codecov Report

Merging #105 (f32cc4d) into master (fe05fcf) will increase coverage by 0.02%.
The diff coverage is 89.47%.

@@            Coverage Diff             @@
##           master     #105      +/-   ##
==========================================
+ Coverage   90.92%   90.94%   +0.02%
==========================================
  Files          87       87
  Lines        2204     2220      +16
  Branches      416      424       +8
==========================================
+ Hits         2004     2019      +15
- Misses        196      197       +1
  Partials        4        4

Impacted Files
Coverage Δ

src/domain/event/EventPage.tsx
89.74% <33.33%> (-2.26%)
:arrow_down:

src/domain/enrolment/CreateEnrolmentPage.tsx
87.95% <100.00%> (+0.29%)
:arrow_up:

...c/domain/enrolment/enrolmentForm/EnrolmentForm.tsx
98.24% <100.00%> (+0.09%)
:arrow_up:

src/domain/event/occurrences/Occurrences.tsx
95.56% <100.00%> (+0.90%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe05fcf...f32cc4d. Read the comment docs.

Codecov Report

Merging #105 (86aeddf) into master (59c4768) will increase coverage by 0.24%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #105      +/-   ##
==========================================
+ Coverage   91.10%   91.35%   +0.24%
==========================================
  Files          87       87
  Lines        2226     2243      +17
  Branches      420      429       +9
==========================================
+ Hits         2028     2049      +21
+ Misses        194      190       -4
  Partials        4        4

Impacted Files
Coverage Δ

src/domain/enrolment/CreateEnrolmentPage.tsx
87.95% <100.00%> (+0.29%)
:arrow_up:

...c/domain/enrolment/enrolmentForm/EnrolmentForm.tsx
100.00% <100.00%> (ø)

src/domain/event/EventPage.tsx
96.15% <100.00%> (+4.15%)
:arrow_up:

src/domain/event/occurrences/Occurrences.tsx
95.56% <100.00%> (+0.90%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59c4768...86aeddf. Read the comment docs.


mock-array detailed routing violations

Describe the bug
To reproduce, use https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/pull/1210, create settings.mk
export DESIGN_CONFIG?=designs/asap7/mock-array/config.mk
export MOCK_ARRAY_DATAWIDTH?=8
export MOCK_ARRAY_TABLE?=8 8 4 4 5 5
export MOCK_ARRAY_SCALE?=320

Run make verilog and then make

Expected Behavior
Detailed route errors don't happen with smaller multiples of MOCK_ARRAY_SCALE.
Environment
lastet master

To Reproduce
See above.
make detail_route_issue generated a file that's 500mBytes...
Relevant log output
No response
Screenshots
No response
Additional Context
No response

Also happens with:
export DESIGN_CONFIG?=designs/asap7/mock-array/config.mk
export MOCK_ARRAY_DATAWIDTH?=8
export MOCK_ARRAY_TABLE?=8 8 4 4 5 5
export MOCK_ARRAY_SCALE?=80

stripped down make detail_route_issue
detail_route_mock-array_asap7_8-8-80-8-8-4-4-5-5_2023-07-08_22-04.tar.gz

Are you sure the pins are aligned?

Are you sure the pins are aligned?

I dont know how to check... thought positioning macros on mutiples of 0.048 would take care of it...
Could you provide some "pin alignment check for dummies" instructions?
If you teach me how to fish, I should be filing fewer.bogus ssues....

@maliberty I believe that this is showing that the pins are misaligned by 1nm. That's not intentional, the pins should be on multiples of 0.048, rounding error somewhere?

It's really best to work in integer dbu not microns. I expect it related to your script changes

It's really best to work in integer dbu not microns. I expect it related to your script changes

Agreed. I can't get to the set units [$block getDefUnits] API from my Python code though.

Should be fixed by https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/pull/1212, will re-open if needed.


[SPARK-16407][STREAMING] Allow users to supply custom streamsink provider

What changes were proposed in this pull request?
This change allows the user to supply a specific instance of a stream sink provider rather than using reflection to construct it from a class name. The useful of this is illustrated within the testcase where we provide a custom ForeachSink which behaves more like the old foreachRDD in the DStream API than the current foreach implementation. This can serve as part of a useful building block for creating ML systems on top of Structured Streaming (see https://github.com/holdenk/spark-structured-streaming-ml for a use case).
How was this patch tested?
Additional unit tests using the new API.

Test build #63934 has started for PR 14691 at commit 70e663c.

Test build #63934 has finished for PR 14691 at commit 70e663c.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63934/
Test PASSed.

cc @tdas let me know your thoughts on exposing this API to the users - I think the use case is pretty clear but we could expose it in another way if you don't like this API.

Test build #64551 has started for PR 14691 at commit c7bbffc.

jenkins, test this please

Test build #64568 has started for PR 14691 at commit c7bbffc.

Test build #64568 has finished for PR 14691 at commit c7bbffc.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64568/
Test PASSed.

In general, we don't want to use any source or sink classes to an API of DataStreamWriter because they are not as stable as DataStreamWriter. This is similar to DataFrameWriter.

@zsxwing I'm not sure I understand - the current API allows users to specify the class name and uses reflection to create it - this allows users to specify a specific instance of the class but the types remain the same - you can already use a sink class with the DataStreamWriter API.

Test build #65118 has started for PR 14691 at commit 7bb643c.

Test build #65118 has finished for PR 14691 at commit 7bb643c.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/65118/
Test PASSed.

Merged build finished. Test PASSed.

I like the idea! This is might not be the best place to start a discussion, but I reckon that the sink provider api could also eventually be used to provision builtin sinks. It would make the current, stringly-typed api optional and provide more compile-time safety.

It also lets you do things with dynamically created sink providers with custom functions which the string based API really doesn't have good support for (beside the string based param API for configuring the sink but that doesn't work for a lot of things).

I totally agree! This PR LGTM, but I think a discussion on enabling truly pluggable sources through providers will require more discussion on a more visible channel. @zsxwing, what do you think?

Agreed. Let's continue to discuss on JIRA for more visibility.

Based on the JIRA discussion and then the resulting mailing list discussion I'm closing this PR while we investigate options for an improved Sink API in general.


Make Data and DataItem similar to Pytorch

Addresses #397

oh, okay. I have the changes ready offline so do let me know whenever this thing is ready to go.

If it's just the name change, how about I just do it as part of the reimplementation of Data()?


[aws-sdk-cpp] Update AWS SDK for C++ and its dependencies to 1.11.132

I noticed a memory leak in S3 so I updated all of AWS SDK while I'm at it to the most recent tagged version that contains a fix.
I updated the dependencies based on the listed upstream ones in the builder.json files.
I also replaced two aws-sdk-cpp patches with a new option as that is preferred.

[X] Changes comply with the maintainer guide
[X] SHA512s are updated for each updated download
[X] The "supports" clause reflects platforms that may be fixed by this new version
[X] Any fixed CI baseline entries are removed from that file.
[X] Any patches that are no longer applied are deleted from the port's directory.
[X] The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
[X] Only one version is added to each modified port's versions file.

@microsoft-github-policy-service agree

Note: I will be converting your PR to draft status. When you respond, please revert to "ready for review". That way, I can be aware that you've responded since you can't modify the tags.


SSL_set_tmp_ECDH API should be marked as deprecated

The SSL_set_tmp_ECDH() API call will override the values set by SSL_set1_groups(), at the same time it is more limited than the latter.
As such, it should be documented as deprecated in all releases that include both of those APIs.
See also: https://mta.openssl.org/pipermail/openssl-users/2019-May/010554.html

As such, it should be documented as deprecated in all releases that include both of those APIs.

As a matter of policy we can't go back in time and deprecate it for current stable releases. We definitely can (and should) deprecate it in master.

"deprecate" for me means "warning, this is an old function/method, it will be removed in future release"
Given ABI stability guarantees of OpenSSL, that of course means that they will continue to work in 1.0.2 or 1.1.1 as long as they are supported.
so, just to be clear: I do not expect any changes to code in stable branches
At the same time, I think updating the documentation is useful, as that will tell users of those versions that they should use different API to reduce the future maintenance burden of applications they write now.

If you mark functions as deprecated using our deprecation macros then they automatically get compiled out if you compile with "no-deprecated" or using the "--api" flag with Configure. If those markings are backported to stable releases then suddenly applications using those options may stop working.
I have no objections to updating the documentation only in stable releases to suggest that it will be deprecated in a future version.

We all agree that it is changed on master? So this issue is solved by adding an update to the pod files in the current active branches (1.0.2, 1.1.0, 1.1.1)? I can help with that.

Side note: no-deprecated shouldn't be used in production.

Side note: no-deprecated shouldn't be used in production.

Why not?

Side note: no-deprecated shouldn't be used in production.

Why not?

Because it breaks expectations that deprecated functions are functions that are marked for future removal.  Since no-deprecated removes functions marked as deprecated, it defeats the normal purpose of deprecation as a warning.
In other words no-deprecated is a tool for application authors that really want to modify their applications for the bleeding edge nownownow.
I should have said "generally", of course.  For example, I would be terribly upset if Debian started building their openssl packages with no-deprecated.

I disagree that this should not be used in production. There is nothing about no-deprecated that means it is unsuitable for production use.
It does have an impact on our backwards compatibility guarantees. So if you build with no-deprecated then you lose that guarantee. That is a decision for packagers to make though. In some circumstances it may be perfectly fine to lose that guarantee. For example, in many cases, the packager and the application author are the same person (such as where static linking is being used).
In this sense no-deprecated is no different to any other "no" option. If you build with no-ec then you're not going to be able to use any ec functions, and you're going to break any applications that do. But that might be ok, depending on your situation.

Yeah, no-deprecated should not be used when openssl is built as system-wide crypto library. It does not mean it should not be used when openssl is built as bundled library for a particular application for example.

We all agree that it is changed on master? So this issue is solved by adding an update to the pod files in the current active branches (1.0.2, 1.1.0, 1.1.1)? I can help with that.

@frederikwh
yes, it does look like there is consensus about doing that.
small tip: if the patches needed to update the docs would be the same on different branches, it's not necessary to propose multiple PRs

We all agree that it is changed on master? So this issue is solved by adding an update to the pod files in the current active branches (1.0.2, 1.1.0, 1.1.1)? I can help with that.

@frederikwh
yes, it does look like there is consensus about doing that.
small tip: if the patches needed to update the docs would be the same on different branches, it's not necessary to propose multiple PRs

I have searched the branches but I cannot find any reference to the functions SSL_set_tmp_ecdh() and SSL_CTX_set_tmp_ecdh().
Does it make sense to create documentation on something that will be deprecated on later releases?

Does it make sense to create documentation on something that will be deprecated on later releases?

I think so. I think it makes sense to have them documented even if they are deprecated (and of course mention in the documentation that they are deprecated... Or possibly only have the deprecation notice as doc)

This was already done in #7522


Kanban board setup

Link to the project
In our team, there're only two people.

Status: Approved :tada: :heavy_check_mark:
Hi @team,
Your project is complete!  There is nothing else to say other than... it's time to merge it :shipit:
Congratulations! 🎉
Highlights

Kanban board set up properly. :heavy_check_mark:
Tasks assigned between the group fairly. :heavy_check_mark:
17 tickets confirmed to be present on the board . :heavy_check_mark:

Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me in your question so I can receive the notification.

As described in the Code reviews limits policy  you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.


Create ko_KR.json

Please make sure to read the CONTRIBUTING.md file before submitting your pull request.
Please remove these two lines before submitting your Pull Request.

We pull the actual json file from our Transifex project: https://www.transifex.com/pufferpanel/pufferpanel/
Please submit the actual translations through that.

@LordRalex "Korean" isn't list of Transifex Project, Can you add it?

@LordRalex Please approve me of Transifex Project


Sampling with an Exponent different from two.

Allow acceptance probabilities different from $|\psi(s)|^2$.
In the proposed PR, acceptance probabilities are $|\psi(s)|^\mu$.
Consequently, all expectation values require reweighting with probabilities $|\psi(s)|^{2-\mu}$.
In this PR, samples are expected to be returned together with such a probability distribution (In the case of $\mu=2$, this distribution is equivalent to the uniform distribution).
Therefore, the differentiation between cases where a probability distribution is provided alongside the samples and those where it is not is no longer necessary. These functions have been deleted.
Two tests were added to certify the correct working of the sampler: A time evolution in the tdvp_t.py test file and a sampling test in sampler_t.py.
Quantities that are evaluated using the mpi_wrapper.py are expected to be arrays of rank 3, to allow for unified treatment of all cases.

I added a new SampledObs class (in stats.py) that makes the computation of means and (co-)variances easier.


Issue version 1.0.4 on Android 4.4

Problems in kitkat devices. Got a design issue not working well.while opening all icons merge over the other one.

Use  -webkit-transform to support again Android 4.4


GEP-1619 Session Persistence and Session Affinity

What type of PR is this?
/kind gep
What this PR does / why we need it:
Add a GEP for session persistence that establishes the foundation for describing it and establishing a common language.
Which issue(s) this PR fixes:
Doesn't fix, but supports https://github.com/kubernetes-sigs/gateway-api/issues/1619
Does this PR introduce a user-facing change?:
N/A
Markdown Preview: https://github.com/gcs278/gateway-api/blob/gep-1619/site-src/geps/gep-1619.md

Thanks for all of the feedback. I have some high priority items I'm trying to sort through at the moment, but I am planning to get back here in the next couple weeks and respond to the comments.

Almost done with addressing comments. Had some urgent items come up this week. Will have a new rev posted early next week.

@shaneutt Thanks - marked back as ready for review, posted responses, and updates to the GEP.

I've created a TODO section and added TODOs from the comments from the review, mostly from @costinm's comments. Let me know if this looks good.

/test all


feat(hook/utils): add useIsomorphicLayoutEffect

Overview

To distinguish whether it is a client or server environment from a hook or component using useEffect
I will change the useEffect used in places where the client environment and the server environment should be distinguished to the useIsomorphicLayoutEffect.
PR Checklist

[x] I did below actions if need

I read the Contributing Guide
I added documents and tests.

I think you need to use corepack with pnpm to meet your pnpm version as packageManager field of package.json. check this doc https://pnpm.io/installation#using-corepack
This is good for install it
https://github.com/TanStack/query/blob/main/package.json#L12

I think you need to use corepack with pnpm to meet your pnpm version as packageManager field of package.json. check this doc https://pnpm.io/installation#using-corepack
This is also good for install script https://github.com/TanStack/query/blob/main/package.json#L12

I resolved this issue in 80cec91 please use corepack please. I think we need to add this in CONTRIBUTING.md


Updating from Stacey 2.3

How do I update from Stacey v2.3 to v3? When I copy the App Folder, index.php and Extensions Folder it screws everything up and I get this error:
Unable to parse string: Indentation problem at line 3 (subtitle: )
I think this has to do with the new formatting of the text files and possibly the transition to .yml. Has anyone successfully upgraded from v2.3 to v3?
Jonah

Hello,
Here is a guide to making the switch. https://github.com/kolber/Stacey-Snippets/wiki/Converting-Stacey-Version-2.3.0-to-Version-3.0.0 https://github.com/kolber/Stacey-Snippets/wiki/Converting-Stacey-Version-2.3.0-to-Version-3.0.0
Best regards,
pbatts

On Jan 24, 2017, at 5:24 PM, JonahRT<EMAIL_ADDRESS>wrote:
How do I update from Stacey v2.3 to v3? When I copy the App Folder, index.php and Extensions Folder it screws everything up and I get this error:
Unable to parse string: Indentation problem at line 3 (subtitle: )
I think this has to do with the new formatting of the text files and possibly the transition to .yml. Has anyone successfully upgraded from v2.3 to v3?
Jonah
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/kolber/stacey/issues/152, or mute the thread https://github.com/notifications/unsubscribe-auth/ACJoayAUy8nO24j99MDhl6jD-rQob3gWks5rVnowgaJpZM4Ls3Rt.


Remove height from action sheet when not visible

The action sheet shouldn't have a height or appear in the layout when it's not visible. The problem was that even though the sheet wasn't visible, it was taking up space on the layout and blocking other buttons.
This fix hides the action completely when it's not visible.

I'm also facing this problem. For example, I have a Toolbar with icon (Back arrow) being hidden by the Sheet overlay.


data extraction helper feature

Hello
Currently when instantiating the apache echart panel by default it comes out with
const series = data.series.map((s) => {
  const sData = s.fields.find((f) => f.type === 'number').values.buffer || s.fields.find((f) => f.type === 'number').values;
  const sTime = s.fields.find((f) => f.type === 'time').values.buffer || s.fields.find((f) => f.type === 'time').values;

It would really be cool if this plugin implemented data extraction helper feature that would assist a non js dev/expert to extract their data points as follows

In above picure from dynamic text, use can select components one would like to implement. Would be nice if apache echart would do something similar with the data coming from data source. It would list out the data points (columns) for the dev and the dev would select which columns from data source to use. Maybe these data points would come under a certain static domain ie aec_data apache echart data so that in the js code section one can refer to these as aec_data.createtime aec_data.value aec_data.metric etc
This is of course in addition to the current way of custom code.
I think adoption of this plugin would increase if such an data extraction assistor was implemented?
Thanks!

Resolved in #211.


CI: replace usage of PodIP with PodIPs

As seen in https://github.com/cilium/cilium/pull/21337, the status.PodIP might be not set. In the testing code we have a few places in which we rely on that field:
> git grep 'Status.PodIP'
k8s/custom_calls.go:                            podApp1.Status.PodIP, identityKey, IngressIPv4,
k8s/custom_calls.go:                            podApp1.Status.PodIP, identityKey, EgressIPv4,
k8s/net_policies.go:                            app1PodIP = app1PodModel.Status.PodIP
k8s/net_policies.go:                            backendPodIP = backendPod.Status.PodIP

This issue is about replace the field with PodIPs[0] or so.

Hey @pchaigno , I did like to work on this issue .

Thanks @slayer321.
Forgot to add -i when grepping. The new list:
k8s/custom_calls.go:                            podApp1.Status.PodIP, identityKey, IngressIPv4,
k8s/custom_calls.go:                            podApp1.Status.PodIP, identityKey, EgressIPv4,
k8s/datapath_configuration.go:                  srcPodIP, err := srcPodJSON.Filter("{.status.podIP}")
k8s/datapath_configuration.go:                  dstPodIP, err := dstPodJSON.Filter("{.status.podIP}")
k8s/datapath_configuration.go:  podIP, err := dstPodJSON.Filter("{.status.podIP}")
k8s/datapath_configuration.go:  podIP, err := dstPodJSON.Filter("{.status.podIP}")
k8s/datapath_configuration.go:  podIP, err := dstPodJSON.Filter("{.status.podIP}")
k8s/egress.go:                          targetPodIP, err := targetPodJSON.Filter("{.status.podIP}")
k8s/health.go:                          fmt.Sprintf("pod %s", pod)).Filter("{.status.podIP}")
k8s/manifests/etcd-deployment.yaml:              fieldPath: status.podIP
k8s/net_policies.go:                            app1PodIP = app1PodModel.Status.PodIP
k8s/net_policies.go:                            backendPodIP = backendPod.Status.PodIP

@slayer321 Please hold on with a fix. It might be a case that everything is fine with PodIP - https://github.com/cilium/cilium/issues/21120#issuecomment-1253865738.

Hey @brb , is the issue still relevant or it is solved ?

@slayer321 It's no longer an issue. Sorry for forgetting to update the issue.


[Extensions] Improve Mobile-Friendliness of Help and Keyboard Shortcut Modals

Current Behavior

The Help Modal and the Keyboard Shortcut Modal are not mobile friendly.
Desired Behavior

Screenshots/Logs

Environment

Host OS: Mac Linux Windows
Meshery Server Version: stable-v
Meshery Client Version: stable-v
Platform: Docker Kubernetes

Contributor Guides and Handbook

📚 Meshery Build and Release Strategy
🎨 UI Design For Meshery Extensions Figma in Figma (open invite)
📚 Meshery Extensibility Providers
⌨ Meshery API Docs
🙋🏾🙋🏼 Questions: Discussion Forum and Community Slack

Hey @AjaxAueleke! I would like to work on this issue.

Hey @AjaxAueleke! I would like to work on this issue.

CC: @leecalcote

This is inside of MeshMap. Of the work that I've seen you doing thus far, @ASK-03, you're not ready for participating on MeshMap just yet.

This is inside of MeshMap. Of the work that I've seen you doing thus far, @ASK-03, you're not ready for participating on MeshMap just yet.

Thank you, @leecalcote, for the feedback! I appreciate your insights and am eager to grow and contribute to MeshMap and Meshery. I value the opportunity to learn from the community and improve my skills. Looking forward to collaborating with everyone.


Do Not Merge -- LIME-404 - Changed account team to One Login

Note: To be merged on the 26th Jan
What changed
Changed the product name on error page from GOV.UK Account team to One Login

This was merged as a part of #546


Cannot push to any app after any one single push fails

Hi - not sure if this one belongs to Deis Builder / here. So posting here anyways.
First off - you guys are doing an awesome job with Deis. Thanks a lot for all the effort from community. 👏
This is my reaction to Deis, when I first discovered it a year back:

Totally in love with Deis.
Anyways, coming to the issue that I am facing: I have 2 apps that I am pushing to on Deis. I call them Sherlock (Python/Django) & Irene (NodeJS).
I created a GKE cluster on command line. Installed workflow-beta4 (+ both beta2 & beta3 had the same Issues) on it, registered with Deis client. I created sherlock app on Deis, push the code (Django Buildpack with Procfile)-> this is working just fine, no matter how many times I commit and push it - it always works just fine.
I create the Irene app (A variant of node docker image + Dockerfile) and this build fails because of some reason (Probably some mistake on my side - I will figure this out). But after the Irene build fails - I am not able to push to any apps after that. I am not able to push to the Sherlock, or any other app for that matter, as well. It says, I do not have access to repo. When I try deleting the Irene App, create it again and push the code - it says a previous build is still in progress.
If you can point me in the right direction - I am more than happy to debug the code myself.
Steps to reproduce the Issue:

gcloud container clusters create appknox --num-nodes "2"

Prepare Helm. (helmc version 0.7.0+20a7ed7, deis version 2.0.0-dev-55497eb)

helmc install workflow-beta - I am aware the images above has workflow-dev installed. But later, I created a new cluster, generated and installed workflow-beta4

kubectl --namespace=deis get pods

kubectl --namespace=deis get svc deis-router

Sorry, for the Deis version mentioned above, I just updated it to 2.0.0-dev-f22a325

deis register deis.MY_ROUTER_IP.xip.io

deis apps:create sherlock

deis keys:add

git push deis 148-upgrade

deis open is working as expected (400 error is expected)

Subsequent git push deis 148-upgrade seems to be working

deis apps:create irene

Here is a Dockerfile config for Irene

FROM danlynn/ember-cli:1.13.15

MAINTAINER<EMAIL_ADDRESS>
RUN npm install -g bower
RUN bower install

EXPOSE 4200

CMD ["ember", "serve"]

git push deis appknox/sherlock#148-upgrade (After a couple of failed tries)

After one or 2 errors like above - I am not able to push to any App

🔝  As you can see, I dont have access to push to Deis / Irene anymore.
Any pointers are greatly appreciated!

Some times destroying the app and recreating it seems to solve the Issue - but, other times it just saya A git push is already under progress.

Please le me know if you guys need anymore details.

Hey @dhilipsiva - this is a fine place to post the issue, and thanks for letting us know. We're aware of it and have been to reproduce it and others similar to it.
The issue stems from a lock that we've placed in the builder to prevent two pushes from concurrently executing against the same application. In some cases, it's not released properly and we have a few related issues (deis/builder#235, deis/builder#220, deis/builder#217) that arise from that problem.
We're working on a fix now, but it might not make it into our upcoming RC1 release, which is scheduled for this Wednesday (two days from now).

Will close this for now as it is taken care of already.


How to make multi selects built with list to be required.

Version
tcomb form 0.6.3
Tell us which version you are using
I expected multi select  drop downs byuild with a list to be a required field by default, just like all other fields are. But the multiselect behaves like an optional field.
property = t.list(t.enums({M: 'Male',F: 'Female'}));
How do I make things built with a list to be required?

Wrong repo.
https://github.com/gcanti/tcomb-form/issues?utf8=✓&q=list required
First result.


python310Packages.sanic: unbreak on Darwin

Description of changes
Currently the package is flagged as broken on Darwin, because a small proportion of tests fail. But the package is still usable, at least for the applications I tested with. So skip the tests on Darwin instead.
Things done

Built on platform(s)

[ ] x86_64-linux
[X] aarch64-linux
[ ] x86_64-darwin
[X] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[X] 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
[X] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 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

[ ] Fits CONTRIBUTING.md.

You probably want
-, doCheck ? true
+, doCheck ? !stdenv.isDarwin

Thanks - done.


Enable rotate only

Is it possible to have only the rotate functionality?

You have to call select({points:false}). This way the points except the rotation is removed

Nice! Thanks! :sparkles:


Add integration test for producer

We should add an integration test that check metrics are correctly emitted when using the metrics reporter with a Producer client.

Done in https://github.com/strimzi/metrics-reporter/pull/67


default response support added.

Added support for default text response and custom payload response.

Thank you for contributing @MrKanthaliya


feat: echo the name of the output file on exports

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (9fa633a) to head (e100bd9).

:white_check_mark: All tests successful. No failed tests found.
Additional details and impacted files
@@            Coverage Diff            @@
##              main       #26   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            4         4
  Lines          236       246   +10
  Branches        16        16
=========================================
+ Hits           236       246   +10

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


Added GetWindowDrawList

Hi!
I've added missing ImGui::GetWindowDrawList function to the managed API.
This is kind of critical function, because it provides access to window's draw list.
To be honest, I've just started to use this library, it's awesome but it's missing a bit of functionality in the managed API. I'll try to implement more missing functions for the managed API.

Hey @Erdroy , thanks for the submission. I think it's a good idea to wrap this function. Right now, though, I am in the middle of a re-write of the codebase so that the majority of wrapper code is automatically generated, including this function. I'm hoping to make that the default branch and put out a beta version of the package pretty soon.
https://github.com/mellinoe/ImGui.NET/blob/autogen/src/ImGui.NET/Generated/ImDrawList.gen.cs

Oh, that's cool!
Then I'll wait for it.


Add KGE Score

This incorporates the work done by @durgals to add the KGE score (Issue #678, PR #679) and additionally includes some changes I applied in response to the code review on PR #679.
@durgals  the test coverage is not 100%. I have included a screenshot showing which lines do not have test coverage. I have also pushed this work to the 228 documentation branch (which we use to test the documentation) Please go through the checklist below and check each thing off.

[x] Lines (523-528) are the only ones which do not have test coverage. Please add unit tests covering these conditions and assert that the appropriate exceptions are raised.
[ ] Please visit https://scores.readthedocs.io/en/228-documentation-testing-branch/included.html and check this looks right for KGE
[ ] Please visit https://scores.readthedocs.io/en/228-documentation-testing-branch/api.html#scores.continuous.kge and check this looks right for KGE
[ ] Please visit https://scores.readthedocs.io/en/228-documentation-testing-branch/tutorials/Kling_Gupta_Efficiency.html and check this looks right to you also

Also, if you are unhappy with any of the changes I made, please feel free to say how it should be changed.

Hi @tennlee , do you have an example pytest for raising an exception?

Hi @tennlee , do you have an example pytest for raising an exception?

Here is a link to some of the scores tests which do this: https://github.com/nci/scores/blob/8ff29eef75613bf6b27d1567898fcaec377c37c9/tests/test_utils.py#L476
Here is a link to the pytest documentation: https://docs.pytest.org/en/7.1.x/reference/reference.html#pytest-raises
Let me know if there's anything else I can do to help, and let me know if you need any explanation of the context manager syntax as well (that's the with ... part).
Thanks :)

Hi @tennlee , do you have an example pytest for raising an exception?

Here is a link to some of the scores tests which do this:
https://github.com/nci/scores/blob/8ff29eef75613bf6b27d1567898fcaec377c37c9/tests/test_utils.py#L476
Here is a link to the pytest documentation: https://docs.pytest.org/en/7.1.x/reference/reference.html#pytest-raises
Let me know if there's anything else I can do to help, and let me know if you need any explanation of the context manager syntax as well (that's the with ... part).
Thanks :)

Thanks. I will update the test. BTW, I need to checkout this kge-staging branch?

Hi @tennlee , do you have an example pytest for raising an exception?

Here is a link to some of the scores tests which do this:
https://github.com/nci/scores/blob/8ff29eef75613bf6b27d1567898fcaec377c37c9/tests/test_utils.py#L476
Here is a link to the pytest documentation: https://docs.pytest.org/en/7.1.x/reference/reference.html#pytest-raises
Let me know if there's anything else I can do to help, and let me know if you need any explanation of the context manager syntax as well (that's the with ... part).
Thanks :)

Thanks. I will update the test. BTW, I need to checkout this kge-staging branch?

Yes. I'm not sure exactly how you have set up your git environment, but what I would be looking for is a merge request from your fork targeting this branch as the base. An alternative would be to try to use the web GUI to add the changes into the PR but I'm personally less comfortable in the web GUI and more comfortable on the command-line.
My git environment is set up with multiple remotes so that I can easily work with other people's forks. Assuming your git environment is a clone of your fork, you can use "git remote add" to add the NCI-owned repo as an additional remote. That's what I've done. However, my environment tracks NCI by default rather than my fork.
You can check out a branch from a remote as follows:
git checkout -b my-branch-name remote/branch-name
You can then push that up to your owk fork with something like
git push origin (or another named remote)
Then you can do the normal workflow, make changes etc, and push the changes up to your fork.
Then you can make a new PR in github from your fork's branch into the NCI repo branch.
I'll then merge your changes into NCI/kge-staging, and squash the work into probably two commits rather than our usual one, and then merge to develop from there. It may sound complicated, but it works quite smoothly.
If any of that seems overly complicated, so long as the code is somewhere on your fork, I can bring it into the PR from there for you using a similar process.

@tennlee , I have looked at the API documentation(https://scores.readthedocs.io/en/228-documentation-testing-branch/api.html#scores.continuous.kge). I suggest the following for the consistency:

Formula for rho: Instead of using covariance and standard deviation, we can use same formulae used in the Pearson correlation coefficient. I think we remove the formal for rho, and update the text in where section: rho = Pearson’s correlation coefficient between observed and forecast values as defined in Pearson’s correlation coefficient (link)
change scaling factors to normal font (currently they are bold)
Parameters: preserve_dims: Information is wrong after "As a special case...". This is also true for documentation of Pearson correlation because for preserve_dims = 'all', it is not possible to compute standard deviation of each point. I think we need to raise exception when preserve_dims = 'all' or update the text saying that it returns NaN as I mentioned in the Notes.
I think we also need to use equations for scaling_factors (instead of using s_rho etc.)
return_components (bool | False). Use equations for rho, alpha and beta.
Note: currently this function is working only one DataArray
Notes: preserve_dimes: replace the text with "When preserve_dims is set to 'all', the function returns NaN, similar to the Pearson correlation coefficient calculation for a single data point because the standard deviation is zero for a single point"

@tennlee , I have this one:, so I need to checkout git checkout -b 678-kge remote/kge-staging?

I would suggest using a new branch on your fork rather than re-using the 678 branch, just because of how it interacts with github's PR process.
So I would suggest git checkout -b 678-kge-staging remote/kge-staging

@tennlee , I have looked at the API documentation(https://scores.readthedocs.io/en/228-documentation-testing-branch/api.html#scores.continuous.kge). I suggest the following for the consistency:
1. Formula for rho: Instead of using covariance and standard deviation, we can use same formulae used in the Pearson correlation coefficient. I think we remove the formal for rho, and update the text in where section: rho = Pearson’s correlation coefficient between observed and forecast values as defined in Pearson’s correlation coefficient (link)

That sounds good. Can you please go ahead and update that on your fork? I can pull across changes as you go if you like.

2. change scaling factors to normal font (currently they are bold)

I couldn't work out how to fix this issue, the source code looks right to me. If you can come up with a fix, please feel free, otherwise I think we just have to put up with it.

3. Parameters: preserve_dims: Information is wrong after "As a special case...". This is also true for documentation of Pearson correlation because for preserve_dims = 'all', it is not possible to compute standard deviation of each point. I think we need to raise exception when preserve_dims = 'all' or update the text saying that it returns NaN as I mentioned in the Notes.

That makes sense. Can you make an appropriate modification to the text in your PR and I'll review what's going on in pearsonr separately myself.

4. I think we also need to use equations for scaling_factors (instead of using s_rho etc.)

Sounds good, are you happy to go ahead and make the change?

5. return_components (bool | False). Use equations for rho, alpha and beta.

Sounds good, can you go ahead and make that change?

6. Note: currently this function is working only one DataArray

I noted that and I assumed that's what you intended. It's always nicer to make the methods work with either data structure, but so long as the type hints are correct then it's acceptable when it's inherent to a method that only particular data structures can be used. It may be worth adding a descriptive note to the docstring, but it should be clear from the typing information.

7. Notes: preserve_dimes: replace the text with "When preserve_dims is set to 'all', the function returns NaN, similar to the Pearson correlation coefficient calculation for a single data point because the standard deviation is zero for a single point"

Agreed, please go ahead and make this change. I think that's the same as your point 3 above?

@durgals @nicholasloveday
Thanks for that PR Durga. I have merged it into this PR. So far as I know, everything is now ready to be merged. I have pushed the updates to https://scores.readthedocs.io/en/228-documentation-testing-branch/ .
Could you both please take a final look and let me know with a short message here? If you're both happy I will go ahead and merge this into develop.
Note - rather than squashing this into one single commit, I will probably organise it into two commits, but I will take care of that as part of the merge process - neither of you need to do anything about it.

I think that this is fine to merge in. Thank you for this work.
A couple of minor things to mention.

Consider removing the dots in the KGE equation (in case someone thinks that this is the dot product). I am still okay if this is merged in as is.
In the future, I think that we should try to provide more support for supporting xr.Datasets as inputs. No changes needed to this at this stage.
Did you want "are the scaling factors for the correlation coefficient" bold in the docstring?

I have merged this into the develop branch now. @durgals can you please review @nicholasloveday 's final comments and consider if you would like to raise new issues to track them. I'm fine either way in each case.

@tennlee Thank you merging this. Regarding comments from @nicholasloveday:

Consider removing the dots in the KGE equation (in case someone thinks that this is the dot product). I am still okay if this is merged in as is.
I will update this in the next round of changes, including support for xr.Dataset or weights.
In the future, I think that we should try to https://github.com/nci/scores/issues/702for supporting xr.Datasets as inputs. No changes needed to this at this stage.
I’ll consider this for a future release,
Did you want "are the scaling factors for the correlation coefficient" bold in the docstring?
I already reported this to @tennlee, and he mentioned that it’s a rendering issue with ReadTheDocs.


check if we need to add some kind of filter for background noise?

Is your feature request related to a problem? Please describe.
Currently the classifier runs over everything. in the interest of energy use, maybe we should try to have a simpler feature extractor or other kind of filter that checks if something interesting is in the data chunk and throws it away if there isn´t?

[ ] check what bridnet-analyzer does, if anything
[ ] check if the users deem it necessary - they mentioned energy issues
[ ] if yes: check what possibilities we have for implementation, also with the users/their expert

Hammad mentioned that birdnet-pi  removes results that only contains human generated data. We could do this, too.


WIP: Improve type definitions

So I decided to improve the type definitions for Solid a bit. Here's what's done:

HTML Elements sohuld only have their own relevant props
Events that received a generic Event type now get the more specific event type
Removed SVG attributes that are not valid for any of the defined SVG elements (they were remnants of <font-face>, <glyph>, etc.

One note on the attribute names: I only included the original HTML names and only camel cased attributes that have a hyphen in them. As far as I could tell this actually improves the behavior when used with the Babel plugin, since the "dom-expressions" library is only prepared to handle a set value of camel camel cased but not hyphenated elements.
I'm planning on actually separating the SVG elements into categories as well, one question about this: the SVG spec allows certain presentation attributes on elements where they actually have no effect at all. I think the type definitions should not include these attributes even though they are technically valid. What do you think?

Wow this is great work. The main reason for supporting camelCase versions of non-hyphenated props is around React compat. React allows camelCasing of a lot of properties. Dom Expressions generally sets properties and only sets attributes on hyphenated props (or ones in a special list). Technically it supports both but I never really did much here on the typings to suggest that. Others helped me here a lot. I find TSX particularly cumbersome for types so improvements here are very welcome.
As for the presentational SVG ones, I had no idea. My default would be to ask what other libraries do. I am not particularly attached either way, I just attempted my best to find every attribute I could find and add to the list. They seem unnecessary, but then again I don't quite understand why they exist.

I didn't actually notice that it sets properties for things that are not recognized as attributes. Should we support both of them in the typings or should I just keep one of them? If only one, which one? If one way is more performant I think it would make sense to only include that version to have good defaults when using TS and to promote consistency. I'd be happy to change it to either version.
As for SVG: I looked at the React and Preact type definitions and SVG doesn't seem to have the same special treatment as HTML does. Similarly to these definitions, there's only one interface that has all the properties, even ones that are not valid on some elements. My personal feeling would be that if I'm using typescript I'd prefer to only have the relevant properties show up for me during autocompletion: it reduces the possibility of me doing something that doesn't even make sense.

Ok I'm in agreement about SVG.
Attributes vs props is harder in some cases because the behaviour can be different. The properties are generally more performant though so only supporting the non-hyphenated version seems reasonable. I, of course, say that and someone is going to call me on it for some specific obscure attribute behaviour I'm not aware of. Given I haven't put them in to date I'm fine with not doing so now and worry about it if it comes to that.
Does that mean this PR is ready to merge then? Or any other changes should we look at.

I will need to go through and change the attributes to their property equivalent first. Then I'll remove the WIP label

Thank you so much. I was playing with this a bit and it's super nice. Big improvement.


Fix build passing badge

Broke the build badge when I renamed my Github account from SilbinaryWolf to silbinarywolf.

Fixed


aft-create-pipeline fails with a jinja error (jinja2 3.1.0 upgrade issue?)

AFT Version:
1.3.4
Terraform Version & Provider Versions
Please provide the outputs of terraform version and terraform providers from within your AFT environment
terraform version
0.15.5

terraform providers
(probably not relevant in this case?)
Bug Description
When moving an account between OUs, the aft-create-pipeline build fails with errors about jinja
To Reproduce
Steps to reproduce the behavior:

Change the OU of an existing account in the account-requests repo
Wait until the aft-create-pipeline triggers
View logs

Related Logs
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|                                                                                message                                                                                |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Container] 2022/03/24 16:13:16 Waiting for agent ping                                                                                |
| [Container] 2022/03/24 16:14:17 Waiting for DOWNLOAD_SOURCE                                                                                |
| [Container] 2022/03/24 16:14:17 Phase is DOWNLOAD_SOURCE                                                                                |
| [Container] 2022/03/24 16:14:17 CODEBUILD_SRC_DIR=/codebuild/output/src165459354/src                                                                                |
| [Container] 2022/03/24 16:14:17 YAML location is /codebuild/readonly/buildspec.yml                                                                                |
| [Container] 2022/03/24 16:14:17 Processing environment variables                                                                                |
| [Container] 2022/03/24 16:14:17 No runtime version selected in buildspec.                                                                                |
| [Container] 2022/03/24 16:14:19 Moving to directory /codebuild/output/src165459354/src                                                                                |
| [Container] 2022/03/24 16:14:20 Configuring ssm agent with target id: codebuild:105fccfd-9faf-4422-a098-7faf7c7605dc                                                                                |
| [Container] 2022/03/24 16:14:20 Successfully updated ssm agent configuration                                                                                |
| [Container] 2022/03/24 16:14:20 Registering with agent                                                                                |
| [Container] 2022/03/24 16:14:20 Phases found in YAML: 3                                                                                |
| [Container] 2022/03/24 16:14:20  POST_BUILD: 1 commands                                                                                |
| [Container] 2022/03/24 16:14:20  PRE_BUILD: 29 commands                                                                                |
| [Container] 2022/03/24 16:14:20  BUILD: 1 commands                                                                                |
| [Container] 2022/03/24 16:14:20 Phase complete: DOWNLOAD_SOURCE State: SUCCEEDED                                                                                |
| [Container] 2022/03/24 16:14:20 Phase context status code:  Message:                                                                                |
| [Container] 2022/03/24 16:14:20 Entering phase INSTALL                                                                                |
| [Container] 2022/03/24 16:14:20 Phase complete: INSTALL State: SUCCEEDED                                                                                |
| [Container] 2022/03/24 16:14:20 Phase context status code:  Message:                                                                                |
| [Container] 2022/03/24 16:14:20 Entering phase PRE_BUILD                                                                                |
| [Container] 2022/03/24 16:14:20 Running command DEFAULT_PATH=$(pwd)                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:20 Running command AWS_MODULE_SOURCE=$(aws ssm get-parameter --name $SSM_AWS_MODULE_SOURCE --query "Parameter.Value" --output text)                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:28 Running command AWS_MODULE_GIT_REF=$(aws ssm get-parameter --name $SSM_AWS_MODULE_GIT_REF --query "Parameter.Value" --output text)                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:28 Running command ssh_key_parameter=$(aws ssm get-parameter --name /aft/config/aft-ssh-key --with-decryption 2> /dev/null || echo "None")                                                                                |
| if [[ $ssh_key_parameter != "None" ]]; then                                                                                |
|   ssh_key=$(jq --raw-output ".Parameter.Value" <<< $ssh_key_parameter)                                                                                |
|   mkdir -p ~/.ssh                                                                                |
|   echo "Host *" >> ~/.ssh/config                                                                                |
|   echo "StrictHostKeyChecking no" >> ~/.ssh/config                                                                                |
|   echo "UserKnownHostsFile=/dev/null" >> ~/.ssh/config                                                                                |
|   echo "$ssh_key" > ~/.ssh/ssh_key                                                                                |
|   echo -e "\n\n" >>  ~/.ssh/ssh_key                                                                                |
|   chmod 600 ~/.ssh/ssh_key                                                                                |
|   eval "$(ssh-agent -s)"                                                                                |
|   ssh-add ~/.ssh/ssh_key                                                                                |
| fi                                                                                |
|                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:29 Running command TF_S3_BUCKET=$(aws ssm get-parameter --name $SSM_TF_S3_BUCKET --query "Parameter.Value" --output text)                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:30 Running command TF_S3_KEY=$VENDED_ACCOUNT_ID-customizations-pipeline/terraform.tfstate                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:30 Running command TF_BACKEND_REGION=$(aws ssm get-parameter --name $SSM_TF_BACKEND_REGION --query "Parameter.Value" --output text)                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:30 Running command TF_KMS_KEY_ID=$(aws ssm get-parameter --name $SSM_TF_KMS_KEY_ID --query "Parameter.Value" --output text)                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:31 Running command TF_DDB_TABLE=$(aws ssm get-parameter --name $SSM_TF_DDB_TABLE --query "Parameter.Value" --output text)                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:31 Running command TF_VERSION=$(aws ssm get-parameter --name $SSM_TF_VERSION --query "Parameter.Value" --output text)                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:32 Running command git config --global credential.helper '!aws codecommit credential-helper $@'                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:32 Running command git config --global credential.UseHttpPath true                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:32 Running command git clone -b $AWS_MODULE_GIT_REF $AWS_MODULE_SOURCE aws-aft-core-framework                                                                                |
| Cloning into 'aws-aft-core-framework'...                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:33 Running command chmod +x ./aws-aft-core-framework/sources/scripts/creds.sh                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:33 Running command ./aws-aft-core-framework/sources/scripts/creds.sh --aft-mgmt                                                                                |
| Assuming AWSAFTAdmin in aft-management account: <account id>                                                                                |
| aws sts assume-role --role-arn arn:aws:iam::<account id>:role/AWSAFTAdmin --role-session-name AWSAFT-Session                                                                                |
| Assuming AWSAFTExecution in aft-management account: <account id>                                                                                |
| aws sts assume-role --role-arn arn:aws:iam::<account id>:role/AWSAFTExecution --role-session-name AWSAFT-Session                                                                                |
| Script execution complete                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:38 Running command TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S')                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:38 Running command cd /tmp                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:38 Running command echo "Installing Terraform"                                                                                |
| Installing Terraform                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:38 Running command curl -o terraform_${TF_VERSION}_linux_amd64.zip https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip                                                                                |
|   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                                                                |
|                                  Dload  Upload   Total   Spent    Left  Speed                                                                                |
|    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0   0 31.5M    0 98304    0     0   614k      0  0:00:52 --:--:--  0:00:52  611k 100 31.5M  100 31.5M    0     0  73.1M      0 --:--:-- --:--:-- --:--:-- 73.1M                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:39 Running command unzip -o terraform_${TF_VERSION}_linux_amd64.zip && mv terraform /usr/bin                                                                                |
| Archive:  terraform_0.15.5_linux_amd64.zip                                                                                |
|   inflating: terraform                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:39 Running command terraform --version                                                                                |
| Terraform v0.15.5                                                                                |
| on linux_amd64                                                                                |
|                                                                                |
| Your version of Terraform is out of date! The latest version                                                                                |
| is 1.1.7. You can update by downloading from https://www.terraform.io/downloads.html                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:40 Running command cd $DEFAULT_PATH                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:40 Running command cd ./aws-aft-core-framework/sources/aft-customizations-common/templates/customizations_pipeline                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:40 Running command python3 -m venv ./venv                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:43 Running command source ./venv/bin/activate                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:43 Running command pip install jinja2-cli                                                                                |
| Collecting jinja2-cli                                                                                |
|   Downloading jinja2_cli-0.8.1-py2.py3-none-any.whl (6.3 kB)                                                                                |
| Collecting jinja2                                                                                |
|   Downloading Jinja2-3.1.0-py3-none-any.whl (132 kB)                                                                                |
| Collecting MarkupSafe>=2.0                                                                                |
|   Downloading MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)                                                                                |
| Installing collected packages: MarkupSafe, jinja2, jinja2-cli                                                                                |
| Successfully installed MarkupSafe-2.1.1 jinja2-3.1.0 jinja2-cli-0.8.1                                                                                |
| WARNING: You are using pip version 21.1.1; however, version 22.0.4 is available.                                                                                |
| You should consider upgrading via the '/codebuild/output/src165459354/src/aws-aft-core-framework/sources/aft-customizations-common/templates/customizations_pipeline/venv/bin/python3 -m pip install --upgrade pip' command.                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:44 Running command for f in *.jinja; do jinja2 $f -D timestamp="$TIMESTAMP" -D region=$TF_BACKEND_REGION -D bucket=$TF_S3_BUCKET -D key=$TF_S3_KEY -D dynamodb_table=$TF_DDB_TABLE -D kms_key_id=$TF_KMS_KEY_ID >> $(basename $f .jinja).tf; done                                                                                |
| Traceback (most recent call last):                                                                                |
|   File "/codebuild/output/src165459354/src/aws-aft-core-framework/sources/aft-customizations-common/templates/customizations_pipeline/venv/bin/jinja2", line 10, in <module>                                                                                |
|     sys.exit(main())                                                                                |
|   File "/codebuild/output/src165459354/src/aws-aft-core-framework/sources/aft-customizations-common/templates/customizations_pipeline/venv/lib/python3.9/site-packages/jinja2cli/cli.py", line 433, in main                                                                                |
|     sys.exit(cli(opts, args))                                                                                |
|   File "/codebuild/output/src165459354/src/aws-aft-core-framework/sources/aft-customizations-common/templates/customizations_pipeline/venv/lib/python3.9/site-packages/jinja2cli/cli.py", line 323, in cli                                                                                |
|     out.write(render(template_path, data, extensions, opts.strict))                                                                                |
|   File "/codebuild/output/src165459354/src/aws-aft-core-framework/sources/aft-customizations-common/templates/customizations_pipeline/venv/lib/python3.9/site-packages/jinja2cli/cli.py", line 226, in render                                                                                |
|     env = Environment(                                                                                |
|   File "/codebuild/output/src165459354/src/aws-aft-core-framework/sources/aft-customizations-common/templates/customizations_pipeline/venv/lib/python3.9/site-packages/jinja2/environment.py", line 363, in __init__                                                                                |
|     self.extensions = load_extensions(self, extensions)                                                                                |
|   File "/codebuild/output/src165459354/src/aws-aft-core-framework/sources/aft-customizations-common/templates/customizations_pipeline/venv/lib/python3.9/site-packages/jinja2/environment.py", line 117, in load_extensions                                                                                |
|     extension = t.cast(t.Type["Extension"], import_string(extension))                                                                                |
|   File "/codebuild/output/src165459354/src/aws-aft-core-framework/sources/aft-customizations-common/templates/customizations_pipeline/venv/lib/python3.9/site-packages/jinja2/utils.py", line 149, in import_string                                                                                |
|     return getattr(__import__(module, None, None, [obj]), obj)                                                                                |
| AttributeError: module 'jinja2.ext' has no attribute 'autoescape'                                                                                |
| Traceback (most recent call last):                                                                                |
|   File "/codebuild/output/src165459354/src/aws-aft-core-framework/sources/aft-customizations-common/templates/customizations_pipeline/venv/bin/jinja2", line 10, in <module>                                                                                |
|     sys.exit(main())                                                                                |
|   File "/codebuild/output/src165459354/src/aws-aft-core-framework/sources/aft-customizations-common/templates/customizations_pipeline/venv/lib/python3.9/site-packages/jinja2cli/cli.py", line 433, in main                                                                                |
|     sys.exit(cli(opts, args))                                                                                |
|   File "/codebuild/output/src165459354/src/aws-aft-core-framework/sources/aft-customizations-common/templates/customizations_pipeline/venv/lib/python3.9/site-packages/jinja2cli/cli.py", line 323, in cli                                                                                |
|     out.write(render(template_path, data, extensions, opts.strict))                                                                                |
|   File "/codebuild/output/src165459354/src/aws-aft-core-framework/sources/aft-customizations-common/templates/customizations_pipeline/venv/lib/python3.9/site-packages/jinja2cli/cli.py", line 226, in render                                                                                |
|     env = Environment(                                                                                |
|   File "/codebuild/output/src165459354/src/aws-aft-core-framework/sources/aft-customizations-common/templates/customizations_pipeline/venv/lib/python3.9/site-packages/jinja2/environment.py", line 363, in __init__                                                                                |
|     self.extensions = load_extensions(self, extensions)                                                                                |
|   File "/codebuild/output/src165459354/src/aws-aft-core-framework/sources/aft-customizations-common/templates/customizations_pipeline/venv/lib/python3.9/site-packages/jinja2/environment.py", line 117, in load_extensions                                                                                |
|     extension = t.cast(t.Type["Extension"], import_string(extension))                                                                                |
|   File "/codebuild/output/src165459354/src/aws-aft-core-framework/sources/aft-customizations-common/templates/customizations_pipeline/venv/lib/python3.9/site-packages/jinja2/utils.py", line 149, in import_string                                                                                |
|     return getattr(__import__(module, None, None, [obj]), obj)                                                                                |
| AttributeError: module 'jinja2.ext' has no attribute 'with_'                                                                                |
|                                                                                |
| [Container] 2022/03/24 16:14:45 Command did not exit successfully for f in *.jinja; do jinja2 $f -D timestamp="$TIMESTAMP" -D region=$TF_BACKEND_REGION -D bucket=$TF_S3_BUCKET -D key=$TF_S3_KEY -D dynamodb_table=$TF_DDB_TABLE -D kms_key_id=$TF_KMS_KEY_ID >> $(basename $f .jinja).tf; done exit status 1                                                                    |
| [Container] 2022/03/24 16:14:45 Phase complete: PRE_BUILD State: FAILED                                                                                |
| [Container] 2022/03/24 16:14:45 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: for f in *.jinja; do jinja2 $f -D timestamp="$TIMESTAMP" -D region=$TF_BACKEND_REGION -D bucket=$TF_S3_BUCKET -D key=$TF_S3_KEY -D dynamodb_table=$TF_DDB_TABLE -D kms_key_id=$TF_KMS_KEY_ID >> $(basename $f .jinja).tf; done. Reason: exit status 1  |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Additional context
This looks like it might be related to the release of Jinja2-3.1.0, since an earlier pipeline that succeeded installed jinja2-3.0.3 and a new version of jinja was released a few hours ago

Thanks for bringing this to our attention @zxaos, we'll see if we can't replicate this issue

Just to confirm we were able to reproduce this, working on a fix to this issue now

Hey @zxaos we've pinned the library versions we were using to avoid the breaking changes introduced by the update to Jinja2. Release 1.3.5 should resolve this issue for you. Thanks for bringing this issue up!


Export a method to check whether a path matches a glob

Can you add/export a method where you can pass a path and a glob and it returns (bool) whether the glob matches?
Looking through the code, I think that would be fnmatch_case() and/or filter().

Done. I've exposed bool fnmatch(path, pattern). Hope this helps.
Regards,


Minor Form Changes

Overview
This PR includes the following proposed change(s):
#1084 :

[x] for fields where the user can choose to add more than one item (eg. jurisdiction, project code, observation person) - make the default that one is showing when a new form opens, and then have the add item button below.
[x] jurisdiction and observation person - it is mandatory to have at least one, but project code is not mandatory to use.
(Users said these fields are easy to miss if you don't have one empty box showing for each of them.)
[x] make sure all spots where a date or time is required has the date/time picker (noted as missing in the biocontrol forms for times).

#1082

[x] remove the "efficacy" field.
[x] remove field called "biocontrol agent spread"

#1080

[x] add alert and the okay button calls back to delete.

#1079

[x] edit the language on plan my trip page to say "kml/kmz" can be uploaded, not just kmz.
[x] ensure you can delete a trip.

#1065

[x] Currently when editing a form on the current record page, there is no indication on what type of form you are in.  Please add a label at the top or some other way that shows the name of the form so the user knows what form they are in.
[x] add title/name of form
[x] add activity number
[x] timestamp

Closes #1084
Closes #1082
Closes #1080
Closes #1079
Closes #1065
Type of change

[X] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[X] Refactoring / Documentation
[ ] Version change

if your change is a breaking change, please add breaking change label to this PR
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Screenshots
Please add any relevant UI screenshots if applicable.
Checklist:

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[ ] I have made corresponding changes to the documentation
[ ] New and existing unit tests pass locally with my changes

/rebase


Get Google Cloud Platform ready for deploy gateway server

Prepare the cloud server for 311 gateway server

@arichen @3vivekb I don't have as much experience with GCP, but I'm pretty knowledgeable with AWS.
Is there some particular reason we want to use GCP instead of AWS?  I'm okay with giving it a shot, but just want to make sure there's a good business reason for us to do so.

Hey @clarle Yea i'm more familiar with GCP.  Also I think it's more user-friendly.  Unfortunately I just found out Code for America is not getting free GCP bux anymore so I might need to switch to AWS.  And find our AWS credits.

I'm going to close this issue out, so we can focus more on frontend issues in this repository.
Deployment and backend issues should be filed on @codeforsanjose/open-311-san-jose.


Determine DI configuration for Chat and ChatService

Let's talk to David about Transient, Scoped, etc. to model the same behaviour shown in JabbR (no longer need the abstraction layer between Hub and repository).

Signalr doesn't have the scoped support written yet for web sockets.
If we implement via Long Polling, we get a new instance each time so Scoped works ok.
If on web sockets, it'll scope the entire request time.
The fix for now is when configuring DI for Chat.cs, we do
AddTransient(
provider => {
var repository = serviceprovider.GetService();
var chatService = new ChatService(repository, ...);
return new Chat( repository, chatService, ...);
});

We can't use DI on a Chat hub, hubs aren't requested on the backend by SignalR, so binding a Chat instance with DI won't solve the issue of scoping regarding the repository and ChatService.

public class ServicesHubActivator : IHubActivator
    {
        private readonly IServiceProvider _serviceProvider;

        public DefaultHubActivator(IServiceProvider serviceProvider)
        {
            _serviceProvider = serviceProvider;
        }

        public IHub Create(HubDescriptor descriptor)
        {
            if (descriptor == null)
            {
                throw new ArgumentNullException("descriptor");
            }

            if (descriptor.HubType == null)
            {
                return null;
            }

            return _serviceProvider.GetRequiredService(descriptor.HubType) as IHub;
        }
    }

Got this working, but not the exact way specified. Waiting on response from David Fowler to see if the work around is alright

Created             services.AddSingleton<IHubActivator, ServicesHubActivator>();

var factory = provider.GetRequiredService();
var scope = factory.CreateScope();
var sp = scope.ServiceProvider;
var repository = sp.GetService();
var settings = sp.GetService<IOptions>();
var recentMessageCache = sp.GetService();
var chatService = sp.GetService();
var processor = new ContentProviderProcessor(repository, sp.GetService());
//Chat is responsible for disposing the scope
//which in turn disposes all things passed in.
//Hacky but seems the only solution at this time
//as the system (at some time) disposes chat
return new Chat(repository, settings, recentMessageCache, chatService, processor, scope);
Chat.cs
public Chat(IServiceScopeFactory factory)
{
_scope = factory.CreateScope();
}
private bool _disposed;
protected override void Dispose(bool disposing)
{
if (_disposed)
return;
        Console.WriteLine($"Disposing Chat hub: {GetHashCode()}");
        if (disposing)
        {
            Console.WriteLine($"Chat hub {GetHashCode()} disposing Repository {_repository.GetHashCode()}");
           // Let the DI Container handle disposing the repo
            _scope.Dispose();
        }
        _disposed = true;

        base.Dispose(disposing);
        Console.WriteLine($"Disposed Chat hub: {GetHashCode()}");
    }