[Question] Use CSI driver on an existing RKE2 cluster

CSI driver document outlines that the driver will be automatically installed on a Harvester cloud cluster. In my case I already have a RKE2 cluster using custom nodes running on Harvester is there anyway to install the CSI driver in such a cluster? I tried installing from Rancher app store but it fails on creating a daemon set.
helm install --namespace=kube-system --timeout=10m0s --values=/home/shell/helm/values-harvester-csi-driver-100.0.3-up0.1.14.yaml --version=100.0.3+up0.1.14 --wait=true harvester-csi-driver /home/shell/helm/harvester-csi-driver-100.0.3-up0.1.14.tgz
creating 7 resource(s)
beginning wait for 7 resources with timeout of 10m0s
DaemonSet is not ready: kube-system/harvester-csi-driver. 0 out of 2 expected pods are ready
DaemonSet is not ready: kube-system/harvester-csi-driver. 0 out of 2 expected pods are ready
DaemonSet is not ready: kube-system/harvester-csi-driver. 0 out of 2 expected pods are ready

@jattind - I did not try to post-install so we need to do troubleshooting.. did you check why they are not getting started? Probably taints vs. tollerations? Or missing cloud-config?

The CSI driver pods are going into a CrashLoop:
cloud-controller-manager-sempre2-ctrl                   1/1     Running            4 (14h ago)    16d cloud-controller-manager-sempre2-etcd                   1/1     Running            6 (8h ago)     16d etcd-sempre2-etcd                                       1/1     Running            0              16d harvester-csi-driver-697rn                              1/2     CrashLoopBackOff   2 (21s ago)    36s harvester-csi-driver-controllers-779c557d47-565ft       3/3     Running            0              36s harvester-csi-driver-controllers-779c557d47-dmdv8       3/3     Running            0              36s harvester-csi-driver-controllers-779c557d47-vctcs       3/3     Running            0              36s harvester-csi-driver-jz8gv                              1/2     CrashLoopBackOff   2 (19s ago)    36s harvester-csi-driver-kz7ch                              1/2     CrashLoopBackOff   2 (20s ago)    36s helm-install-rke2-calico-crd-z7xjl                      0/1     Completed          0              16d helm-install-rke2-calico-rgdbg                          0/1     Completed          2              16d helm-install-rke2-coredns-rp55g                         0/1     Completed          0              16d helm-install-rke2-ingress-nginx-7pv9l                   0/1     Completed          0              16d helm-install-rke2-metrics-server-vmm6t                  0/1     Completed          0              16d kube-apiserver-sempre2-ctrl                             1/1     Running            0              16d kube-controller-manager-sempre2-ctrl                    1/1     Running            10 (14h ago)   16d kube-proxy-sempre-wrk1                                  1/1     Running            0              16d kube-proxy-sempre2-ctrl                                 1/1     Running            0              16d kube-proxy-sempre2-etcd                                 1/1     Running            0              16d kube-scheduler-sempre2-ctrl                             1/1     Running            9 (14h ago)    16d rke2-coredns-rke2-coredns-58fd75f64b-c78q7              1/1     Running            0              16d rke2-coredns-rke2-coredns-58fd75f64b-g2k7w              1/1     Running            0              16d rke2-coredns-rke2-coredns-autoscaler-768bfc5985-gdcf8   1/1     Running            0              16d rke2-ingress-nginx-controller-9dx72                     1/1     Running            0              16d rke2-metrics-server-67697454f8-gvtrw                    1/1     Running            0              16d
Did a describe on one of the crashing pods, but can't see any issues in it's events.
`kubectl describe pod harvester-csi-driver-697rn -n kube-system
Name:         harvester-csi-driver-697rn
Namespace:    kube-system
Priority:     0
Node:         sempre2-etcd/<IP_ADDRESS>
Start Time:   Thu, 22 Dec 2022 14:19:03 -0800
Labels:       app.kubernetes.io/instance=harvester-csi-driver
app.kubernetes.io/name=harvester-csi-driver
component=csi-driver
controller-revision-hash=84dcfc5bcf
pod-template-generation=1
Annotations:  cni.projectcalico.org/containerID: 764d05064f61352d8d0a28156d09bf3e8018e14c66e50b6789cfd316fba3e6d7
cni.projectcalico.org/podIP: <IP_ADDRESS>/32
cni.projectcalico.org/podIPs: <IP_ADDRESS>/32
kubernetes.io/psp: global-unrestricted-psp
Status:       Running
IP:           <IP_ADDRESS>
IPs:
IP:           <IP_ADDRESS>
Controlled By:  DaemonSet/harvester-csi-driver
Containers:
node-driver-registrar:
Container ID:  containerd://ee1c64405cd5d91b12a69f0b8ad8310b469127b19e7149afcc54770832d16282
Image:         rancher/mirrored-longhornio-csi-node-driver-registrar:v2.3.0
Image ID:      docker.io/rancher/mirrored-longhornio-csi-node-driver-registrar@sha256:10fe9cd400fd409f43e89f3287446db7b946f5a30b9ceafcd2ef1936b8208a2f
Port:
Host Port:
Args:
--v=5
--csi-address=$(ADDRESS)
--kubelet-registration-path=/var/lib/kubelet/harvester-plugins/driver.harvesterhci.io/csi.sock
State:          Running
Started:      Thu, 22 Dec 2022 14:19:04 -0800
Ready:          True
Restart Count:  0
Environment:
ADDRESS:  /csi/csi.sock
Mounts:
/csi/ from socket-dir (rw)
/registration from registration-dir (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-kq4ds (ro)
harvester-csi-driver:
Container ID:  containerd://9666f1dfd55ef60921e404eac79a19dfea3ce95b1cd1a8297ccd463bd0a00b48
Image:         rancher/harvester-csi-driver:v0.1.3
Image ID:      docker.io/rancher/harvester-csi-driver@sha256:80018578e3bf043011fce4cd4ced162ad6611e0fcf1db8559a7b3728d3d92601
Port:
Host Port:
Args:
--nodeid=$(NODE_ID)
--endpoint=$(CSI_ENDPOINT)
--kubeconfig=/var/lib/harvester/cloud-provider-config
State:          Terminated
Reason:       Error
Exit Code:    1
Started:      Thu, 22 Dec 2022 14:20:27 -0800
Finished:     Thu, 22 Dec 2022 14:20:27 -0800
Last State:     Terminated
Reason:       Error
Exit Code:    1
Started:      Thu, 22 Dec 2022 14:19:44 -0800
Finished:     Thu, 22 Dec 2022 14:19:44 -0800
Ready:          False
Restart Count:  4
Environment:
NODE_ID:        (v1:spec.nodeName)
CSI_ENDPOINT:  unix:///csi/csi.sock
Mounts:
/csi/ from socket-dir (rw)
/dev from host-dev (rw)
/etc/kubernetes from kubernetes (ro)
/lib/modules from lib-modules (ro)
/rootfs from host (rw)
/sys from host-sys (rw)
/var/lib/harvester from cloud-config (ro)
/var/lib/kubelet/plugins/kubernetes.io/csi from kubernetes-csi-dir (rw)
/var/lib/kubelet/pods from pods-mount-dir (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-kq4ds (ro)
Conditions:
Type              Status
Initialized       True
Ready             False
ContainersReady   False
PodScheduled      True
Volumes:
cloud-config:
Type:          HostPath (bare host directory volume)
Path:          /var/lib/rancher/rke2/etc/config-files/
HostPathType:  DirectoryOrCreate
kubernetes:
Type:          HostPath (bare host directory volume)
Path:          /etc/kubernetes
HostPathType:  DirectoryOrCreate
kubernetes-csi-dir:
Type:          HostPath (bare host directory volume)
Path:          /var/lib/kubelet/plugins/kubernetes.io/csi
HostPathType:  DirectoryOrCreate
registration-dir:
Type:          HostPath (bare host directory volume)
Path:          /var/lib/kubelet/plugins_registry
HostPathType:  Directory
socket-dir:
Type:          HostPath (bare host directory volume)
Path:          /var/lib/kubelet/harvester-plugins/driver.harvesterhci.io
HostPathType:  DirectoryOrCreate
pods-mount-dir:
Type:          HostPath (bare host directory volume)
Path:          /var/lib/kubelet/pods
HostPathType:  DirectoryOrCreate
host-dev:
Type:          HostPath (bare host directory volume)
Path:          /dev
HostPathType:
host-sys:
Type:          HostPath (bare host directory volume)
Path:          /sys
HostPathType:
host:
Type:          HostPath (bare host directory volume)
Path:          /
HostPathType:
lib-modules:
Type:          HostPath (bare host directory volume)
Path:          /lib/modules
HostPathType:
kube-api-access-kq4ds:
Type:                    Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds:  3607
ConfigMapName:           kube-root-ca.crt
ConfigMapOptional:
DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              kubernetes.io/os=linux
Tolerations:                 cattle.io/os=linux:NoSchedule
kubevirt.io/drain:NoSchedule op=Exists
node-role.kubernetes.io/control-plane:NoSchedule
node-role.kubernetes.io/etcd:NoExecute
node.kubernetes.io/disk-pressure:NoSchedule op=Exists
node.kubernetes.io/memory-pressure:NoSchedule op=Exists
node.kubernetes.io/not-ready:NoExecute op=Exists
node.kubernetes.io/pid-pressure:NoSchedule op=Exists
node.kubernetes.io/unreachable:NoExecute op=Exists
node.kubernetes.io/unschedulable:NoSchedule op=Exists
Events:
Type     Reason     Age                      From               Message

Normal   Scheduled  68s                      default-scheduler  Successfully assigned kube-system/harvester-csi-driver-697rn to sempre2-etcd
Normal   Pulled     68s                      kubelet            Container image "rancher/mirrored-longhornio-csi-node-driver-registrar:v2.3.0" already present on machine
Normal   Created    68s                      kubelet            Created container node-driver-registrar
Normal   Started    68s                      kubelet            Started container node-driver-registrar
Warning  BackOff    0s (x7 over 66s)         kubelet            Back-off restarting failed container
Normal   Pulled      (x5 over 68s)  kubelet            Container image "rancher/harvester-csi-driver:v0.1.3" already present on machine
Normal   Created     (x5 over 68s)  kubelet            Created container harvester-csi-driver
Normal   Started     (x5 over 68s)  kubelet            Started container harvester-csi-driver`

Ok - next step is to check the logs of harvester-csi-driver-697rn

kubectl logs harvester-csi-driver-697rn -n kube-system
Defaulted container "node-driver-registrar" out of: node-driver-registrar, harvester-csi-driver
I1222 22:19:04.499360   12245 main.go:164] Version: v2.3.0
I1222 22:19:04.499398   12245 main.go:165] Running node-driver-registrar in mode=registration
I1222 22:19:04.499773   12245 main.go:189] Attempting to open a gRPC connection with: "/csi/csi.sock"
I1222 22:19:04.499806   12245 connection.go:154] Connecting to unix:///csi/csi.sock
W1222 22:19:14.500492   12245 connection.go:173] Still connecting to unix:///csi/csi.sock
W1222 22:19:24.500378   12245 connection.go:173] Still connecting to unix:///csi/csi.sock
W1222 22:19:34.500778   12245 connection.go:173] Still connecting to unix:///csi/csi.sock
W1222 22:19:44.500937   12245 connection.go:173] Still connecting to unix:///csi/csi.sock
W1222 22:19:54.500706   12245 connection.go:173] Still connecting to unix:///csi/csi.sock
W1222 22:20:04.500768   12245 connection.go:173] Still connecting to unix:///csi/csi.sock
W1222 22:20:14.500693   12245 connection.go:173] Still connecting to unix:///csi/csi.sock

And the logs of the container harvester-csi-driver in that pod?

I am not sure what you mean. I switched context to the harvester cluster and I don't see a CSI driver pod.
kubectl get pods
NAME                                        READY   STATUS      RESTARTS   AGE
virt-launcher-semper2-wrk1-6kxqq            1/1     Running     0          26d
virt-launcher-sempre-vault-prl6d            1/1     Running     0          21d
virt-launcher-sempre1-ctrl-j9f5f            1/1     Running     0          40d
virt-launcher-sempre1-etcd-q4d2b            1/1     Running     0          40d
virt-launcher-sempre1-lb-47pzq              1/1     Running     0          6d22h
virt-launcher-sempre1-wrk1-99dcb            1/1     Running     0          40d
virt-launcher-sempre1-wrk2-5w2cc            1/1     Running     0          40d
virt-launcher-sempre2-ctrl-546mf            1/1     Running     0          26d
virt-launcher-sempre2-etcd-fb8g5            1/1     Running     0          26d
virt-launcher-sempre2-lb-85f96              1/1     Running     0          20d
virt-launcher-sle-15-sp4-base-5xpkw         0/1     Completed   0          28d
virt-launcher-sle-15-sp4-base-large-lj89g   0/1     Completed   0          40d
virt-launcher-ub20-04-5-base-4jtc6          0/1     Completed   0          41d

Hi @jattind, you can follow steps in Deploying with Harvester k3s Node Driver to install it.

Run generate_addon.sh to create kubeconfig.

./generate_addon.sh rke2-test default

Copy the cloud-provider-config to /etc/kubernetes/cloud-config in the VM.
Click Harvester CSI chart in the App page.
Click Customize Helm options before install.
Put /etc/kubernetes/ in the Cloud config file path and install it.

Did not seem to work. I see the same issue, but I have a few questions:

What context should I be in when I run the generate_addon.sh. Harvester cluster or the cluster which needs access to longhorn?
Should I copy the cloud-provider-config to cloud-config or cloud-config.yaml
I have three VM in the cluster (etcd, control-plane,master, worker). Do I need to copy the file to all three VMs?

I tried creating a cluster with custom RKE2 nodes and set the cloud provider as harvester, but the cluster creation never completes.

@FrankYang0529 can please help with the above issue?


Update SQL binding prompt string to be more clear

Updating string to make it clear which objects are allowed for select queries

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
4 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.007%) to 41.992%

Files with Coverage Reduction
New Missed Lines
%

extensions/notebook/src/common/ports.ts
4
74.14%

Totals

Change from base Build<PHONE_NUMBER>:
-0.007%

Covered Lines:
26506

Relevant Lines:
57213

💛  - Coveralls


Error when using search

This error occurs when the searched page wasn't found. How can I fix it?

same here

Same here. I think adding a nullity check of results here solves the problem. Do you want me to PR this? @shuding
But I don't know what feedback should be given here.
The options I'm thinking are:

A pop up saying "no searching result"?
A "no result" in dropdown and the enter key closes the dropdown

Should be fixed in #798.


[WIP] Add products page

Jira ticket: https://projects.engineering.redhat.com/browse/SSP-735

Codecov Report

Merging #272 into master will increase coverage by 0.28%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #272      +/-   ##
==========================================
+ Coverage   83.13%   83.41%   +0.28%
==========================================
  Files         103      104       +1
  Lines        1186     1182       -4
  Branches      102      102
==========================================
  Hits          986      986
+ Misses        181      177       -4
  Partials       19       19

Impacted Files
Coverage Δ

src/App.js
0% <ø> (ø)
:arrow_up:

src/smart-components/products/products.js
0% <0%> (ø)

src/Routes.js
0% <0%> (ø)
: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 1d5bd80...cc0f043. Read the comment docs.

@gmcculloug got a question about orphaned portfolios. Right now the card title for these is not clickable. My question is. should we display them? Or maybe have a tab for each group?


[i18n] Migrate to the Crowdin platform for translations

I was wondering if you can migrate to the Crowdin platform for translations. I think it is much more effective since there are many more translators in Crowdin. I would help as proofreader with the Spanish language.
It will do a lot for the translation of both "luci-base" and "applications".
It should be noted that this is only a suggestion.
https://crowdin.com/page/open-source-project-setup-request
https://support.crowdin.com/supported-formats/

As there is no interest in this issue and more contribution with the translations, since with Crowdin it would have been quick and efficient. I decline to want to help.


(nearly) Finish styling navbar

Summary
Navbar mostly looks like how it ought to- the Figma didn't include any indications of how hover effects should look, so I went for an underline that used the same colour as the separators in the FAQ page.
It's only nearly finished because it's not quite responsive- if I shrink my screen down (as shown in the gif below) it works fine, but if I use the debugger to spoof a smaller viewport it briefly looks fine, and then it looks like a DOM element is injected (I think it's the div with class v-toolbar__content?) and then the screen size extends.) So... still need to look into that.
Screenshots

I'm going to merge this and a general responsiveness review + update of the whole site I think is much needed.
At some point hoping to also add the AppBar change to blue with white text/logo upon scrolling down a bit as the current white isn't great on a white background.


Delete or fix code in "editor.coffee"

http://getcontenttools.com/demo

Add youtube video
click Save
click Edit
click Save
Bug, we can edit article, video is broken

I removed this code, and now it works correct
# Check the document has changed, if not we don't need do anything
root = ContentEdit.Root.get()
if root.lastModified() == @_rootLastModified
	# Trigger the saved event early with no modified regions,
	@dispatchEvent(
		@createEvent('saved', {regions: {}, passive: passive})
		)
	return

Ah yep - my bad incorrectly updated that test in release 1.2 - will push a fix shortly.

@sticklvl - thanks for providing a concise bug report (really helps) and for highlighting the code that was causing the issue, it's much appreciated. I've pushed a fix for this now.


Curve extension

We should be able to operate on Curve, either adding a constant or multiplying.
This is needed in a specific case. If you need to animate a property with a function that is not provided by Easing enum, you need to use a BezierPath with a BezierAction.
The BezierPath is built through a set of Curve values. Usually this Curve values has to match the starting and ending value property we want to animate, making this set of Curve values very specific.
The introduced functions allow us to use a shared set of Curves and just adapt it to the needed starting and ending animated property.
Example
Lets say we want to animate the alpha property of View with a specific path.
/// A set of curves defining our animation path
/// We use CGpoints where the y value will be set to the alpha property and the x value is the elapsed time
/// x is in [0, 1]
/// y(0) = startValue & y(1) = finalValue
let sharedCurves: [Curve<CGPoint>] = ...

let curves = sharedCurves.multiplying(by: (endValue - startValue)).adding(startValue)

let path = BezierPath(start: CGPoint(x: 0, y: startValue),
                              curves: curves)

let action = BezierAction(path: path,
                                  duration: duration,
                                  update: { [weak self] point, _ in self?.alpha = point.y ) })

sharedCurves can be stored and reused for any other animations needing the same path animation but having different startValue and endValue. The other way would have been to built the curves for the specific startValue and endValue.

This is an awesome idea, to be able to create a custom curve. I'm not sure that I'm sold on piggy backing on the BezierAction to achieve it though.
Conceptually, I think that the BezierAction is the toughest to understand for people who are less familiar with bezier math / geometry.
 You can achieve the same result having the x value continuously go upwards, as well as have it go downwards, or a mixture of the two.
It's really cool that you're able to make this work with the library now, as I had never intended the Curves to be used for this use case. In terms of shipping something that allows for this though, it would be nice to have an api that is geared towards this use case and easier to work with.
I'm thinking that it would be possible to have a case on the Easing enum that takes an associated object that describes a custom curve. Then it could be passed in to an InterpolationAction like any other easing type. I'm not really sure what the api would look like for building the curve up at the moment though.


Dark SCNN postprocessing pipeline working?

System information

OS Platform and Distribution (e.g., Linux Ubuntu 14.04):
Linux Ubuntu 16.04
Apollo installed from (source or binary):
Binary
Apollo version (1.0, 1.5, 2.0, 2.5, 3.0):
3.5

Hey, we created a launch file to run dag_streaming_perception_lane.dag on the master branch, in order to take advantage of the new Dark SCNN lane line neural network. We've verified a confidence mask is coming through as an output of the NN, but it looks like the lane postprocessing pipeline is not processing the segmentation mask correctly yet, and therefore outputting no lane line objects. We were wondering what the status of this was, and is DarkSCNN functionality something to expect soon?

The new lane line detection module is working fine. Please use dag_streaming_perception_lane.dag for Dark SCNN lane line detection and all other camera-based detection.

hi,
I have also noticed the new lane detection method is introduced in 3.5. where can I find the Dark SCNN module?


Fix IT to account for broken clio paging

Signed-off-by: David Fuelling<EMAIL_ADDRESS>

Would it be okay to remove the test method listTransactionsDefaultWithPagination()? I think I brought it up before, that Clio does not have an exact page size. And we shouldn't have this test around.
Thoughts @nkramer44 @sappenin ?

Would it be okay to remove the test method

I'd prefer to not remove it. This broke some of my own code, so we need to get it right so we don't accidentally break other users of the library.


Upstream forgot some parentheses

https://github.com/wikimedia/oojs-ui/commit/ecc794733782 missed some parentheses, though it says:

Also updating LESS files to work with LESS v4 integrated in grunt-contrib-less.
Specifically around new Less v3.7.0+ Math option which expects parentheses
for divisions.

I've uploaded patches:

https://gerrit.wikimedia.org/r/c/oojs/ui/+/709087
https://gerrit.wikimedia.org/r/c/wikimedia-ui-base/+/709230

patches for the upstream are all merged.


release.sh: Allow a callback script to update version in code

Maybe instead of executing release.sh, we source it instead in the in repo scripts.

Will also need to update tala's build process to do the same.

Perhaps just make release.sh automatically updates any lib/version/version.go? Would need to keep -HEAD suffix though unless I want the git tag to include an extra commit removing the suffix. this commit not being merged into master.

Maybe we just always update lib/version/version.go if it exists. Then no custom callback needed.


Made upload/download generic so that it doesnt have to be function specific

Motivation
Explain here the context, and why you're making that change.
What is the problem you're trying to solve.
Modifications
Describe the modifications you've done.
Result
After your change, what will change.

@jerrypeng @sijie

retest this please

retest this please


Fix help text for subctl gather

subctl gather does not accept a kubeConfig arg so remove it from the help text.
Fixes https://github.com/submariner-io/submariner-operator/issues/1945

The PR/Issue scrub is ambivalent about the need for this backport, low risk but low reward. Fine to backport if you want @tpantelis.

Do we still want this for 0.12.2?


Is canEqual method really used?

The probable bug
I am using @EqualsAndHashCode. I would like to know when the below code gets executed in the equals method and returns false.
if (!other.canEqual((Object)this)) return false;
In you vanilla code doc also the generated code exist.
Expected behavior
If that is not getting returning false ever, can it be not generated?
Version info:

Lombok version: 1.18.12
Platform: Java: javac 1.8.0_201

See this article for a discussion on that topic.

See this article for a discussion on that topic.

Thank you.. I am going through it...

Thank you.. This is clear from the article.


Enhance Accessibility to GitHub Pages Specifications

I noticed that navigating to the specifications hosted on GitHub Pages could be a bit more streamlined. Currently, it requires an unnecessary amount of time to find the specifications page from the repository.
To enhance the user experience and improve the efficiency of navigation, I suggest adding a direct link to the specifications page within the README or under the short description. This would enable contributors and users to quickly access the relevant information they need.
Thank you for considering this improvement.

@thatvideoshopguy Thanks for the suggestion!   Will do!!


Get default HTTP and HTTPs ports when populating targetEndpoint CRs

Description:

When deploying a targetendpoint, it creates a service with cluster IP. However the port and the target port both are taken from the "port" defined in  the targetEndpoint CRs which would break the call from APIM CR (mgw) to the target endpoint.
Instead of that, these should be allowed to assign default HTTP and HTTPs endpoint when necessary.
Suggested Labels:

Suggested Assignees:

Affected Product Version:
v1.0.0-alpha
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:

Fixed with #119


(rational-ui) All-the-icons in doom-modeline not rendering on Windows

I installed Emacs on the Windows computer at my workplace (just to play with it in case of downtime) and after loading rational-emacs noticed that the icons in doom-modeline were not rendering. Probably encoding...
Maybe setting all the variables might help, can't test this right now.
;; UTF-8
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)

all-the-icons needs M-x all-the-icons-install-fonts. Unfortunately, on Windows all-the-icons-install-fonts will only download the icons. You still need to install them from hand afterwards.
See also the remark in ati's README:

For Windows, this function will prompt for a download directory for you to install them manually.

Thanks, i didn't know!

This should really be documented in README.org and that is not the only thing.  Spelling software should probably also be loaded, or suggested.  So about software to be able to export .org to PDF and  LibreOffice .otd formats.  This bit me too.

Thar some fonts/icons/programs need to be installed for it to work.  That need to go into README.org


will there be plan to support PDF type here?

Version 0.5.2 added the ability to read/validate manifests for PDFs.


Better check for which folder to relabel possible?

This is more a question than an issue, because nothing is truly broken.
I have a fcontext for /var/lib/mysql-default(/.*)?
The relabel for this is a restorecon on /var/lib
Could the code that checks the path be rewritten so the restorecon would be done on /var/lib/mysql-default? Is there a list of special regex characters that could be trimmed from the end that should never be in folder names?
The question comes because a restorecon on /var/lib takes reaaaaally long
The fact that the condition uses the same command while not changing anything, doesn't help either. As far as I can see ATM this only means a run almost twice as long (in my case).

Hi @daften. I think we can modify this code to run on the actual files. Maybe something with find STUFF | xargs restorecon -R
Will you manage a PR?

linked above

To rephrase, I'd like to see the recipe that causes it to relabel over /var/lib. As per the command generator it should only do that if mysql-default does not exist. This check/command-generation is done at compile time, hence my suggestion for lazy { }

Aha. @daften can you provide a use-case?
Also, I don't see the reason for ever running on /var/lib, but I might be missing something

I think the issue back then was that the SELinux's regex didn't match find's regex

Re: restorecon taking a long time. As @daften said, the relabel execute resource actually runs it twice (due to guard).
I also agree that the guard should be removed. The only caveat is this will cause the resource to always flag as being updated. To fix you would have to convert the execute to a shell_out and check length of stdout.

Well, I think I'll accept PRs on that

This is the regex why it falls back to /var/lib:
selinux_policy_fcontext "/var/lib/mysql-default(/.*)?" do
  secontext "mysqld_db_t"
end

It is like this because all subfolders need to get the mysql_db_t label.
What happens now is that the first parts splits on the last / it finds, so it remains with /var/lib/mysql-default( which is off course not a real folder, so it splits again on /, which gets it /var/lib.
And agreed with @atward , the guard doesn't really make sense here, since it does the same thing as the real resource execution, except simulating it instead of doing it (and in this case, it's not faster unfortunately).
I want to make a PR, but I'd like feedback on this first ;)

Removal of guard included in #57

@daften, the problem is that the cookbook has no way of knowing what is the highest possible path given a regex. Take for example the following:
selinux_policy_fcontext "/var/lib/mysql-(default|dist)(/.*)?" do
  secontext "mysqld_db_t"
end

The best the code can do is check for the existence of files/directories that match the regex, and then apply to that (which it is doing by File.directory?).
If you use the lazy change from #57, and put a directory  '/var/lib/mysql-default' prior to your selinux_policy_fcontext it should only run restorecon -iR /var/lib/mysql-default. I suspect you current code is installing mysql after the selinux changes.

Nope, I get these results on all runs, not just the first that installs MySQL.
And I understand what the problem is, it can't detect the /var/lib/mysql-default  as a folder, but what you're suggesting won't fix that. The folder IS already there, but because of the way it parses the regex: splitting on '/', it doesn't try to check if /var/lib/mysql-default exists, it checks if /var/lib/mysql-default( with the opening parenthesis exists. ;)

I see it now.
Find should suit as suggested earlier, but will need to set regextype. I'm not sure if this will have compat issues (requires find 4.2.24+)
find / -regextype posix-egrep -regex '#{new_resource.file_spec}' -print0  2>/dev/null | xargs -0 restorecon -i

RE compat, I have a supported OS list. If it passes testing, I'm happy
On Nov 14, 2016 01:06, "Adam Ward"<EMAIL_ADDRESS>wrote:

I see it now.
Find should suit as suggested earlier, but will need to set regextype. I'm
not sure if this will have compat issues (requires find 4.2.24+)
find / -regextype posix-egrep -regex '#{new_resource.file_spec}' -print0  2>/dev/null | xargs -0 restorecon -i
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/BackSlasher/chef-selinuxpolicy/issues/56#issuecomment-260227282,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AG3He8vpVtZiPaKXlcAvBisoXAUJkdHXks5q97QJgaJpZM4KwPRY
.

How about
find / -regextype posix-egrep -regex '/var/lib/mysql-default(/.*)?' -type d -print0  2>/dev/null | xargs -0 restorecon -iR

Or do you reckon this will get too many doubles. With find i'm worried we'll miss hidden files

Just checked and the find is extremely fast in both cases now (as it should be).
I'll look into a PR, but would prefer to start it when there's consensus on #57


Untranslated String shown because of Syntax error?

Untranslated String
view in German Localization de_DE:

I don't know wether related:
Text Comparison:
en_GB:
<?php
return array(

de_DE:
<?php
return array(

Seems to be identical
View in GitHub:

en_GB:
de_DE:

de_DE with strange yellow line background and additional space at the left

I can simply try to repair, but wanted to hear your opinion before.
In GitHub Edit Mode I can't see anything suspicious

Should have told: In my KANBOARD installation the string is translated to German!

everything seems fine on this side... I dont think it is related to the plugin.
Delete the plugin and see if the problem is resolved.

Well, I already uninstalled and reinstalled the Plugin yesterday via Plugins Manager / Plugin Directory.
Now again, and strange effect,

in my main Installation only en_GV becomes installed.
Folder de_DE is missing

Tried again with a different KANBOARD installation on the same server. Same effect, only en_GB comes installed.

Well, I already uninstalled and reinstalled the Plugin yesterday via Plugins Manager / Plugin Directory.
Now again, and strange effect,

in my main Installation only en_GV becomes installed.
Folder de_DE is missing

Tried again with a different KANBOARD installation on the same server. Same effect, only en_GB comes installed.

  'Agile Indicators displays the measurements for Task Priorities and Task Complexities in an easy to use general scale. Task Priorities are scaled between P1 and P5 whilst Task Complexities are scored as 0-50.' => '"Agile Indicators" zeigt die Einstufung von Aufgabenpriorität und Aufgabenkomplexität in einer einfach zu verwendenden allgemeinen Skala an. Die Aufgabenpriorität wird zwischen P1 und P5 skaliert, während die Aufgabenkomplexität mit 0-50 bewertet wird.',

Try removing the quotes. Your string contains "Agile Indicators" but try changing to AgileIndicators (no quotes)

You are right, the quotes around the wrong name are nonsense.
I did acorrection (see pull request for afba502) and will try tomorrow or so if that really heals the Untranslated String issue

Well this syntax-error -Text Comparison thingy is nonsense. I simply clicked the line number, what made it marked yellow.


Fix ci

Trying to see if undoing the fix for #109 fixes CI...

This never included the fix to toolchain.cmake so it wouldn't have worked anyways...


[BUG] Theme not applied in New Window

Describe the Bug
Theme is not applied when opening a note in a new window using Microsoft Windows app.  Using "Atom (One Dark)" in Dark Mode.
Relevant Screenshots
If applicable, add screenshots to help explain your problem.
To Reproduce
Steps to reproduce the behavior, e.g.

Right click on a new note and choose "Open in new Window"
Observe theme is not applied.  This is observed by noticing header color is wrong.

In which mode does the bug occur?

[ x ] Reading/Preview Mode
[ x ] Source Mode
[ x ] Live Preview

Which editor are you using?

[ ] Legacy Editor
[ x ] New Editor

Which version of Obsidian are you using?

[ x ] Public Release (Desktop)
[ ] Public Release (Mobile)
[ ] Insider Release (Desktop)
[ ] Insider Release (Mobile)

Checklist

[ x ] I have updated to the latest version of the theme (Obsidian Settings → Appearance → Themes - Manage → Update). (using 2.3.4)
[ x ] I made sure that the issue is related to this theme, by checking that the issue does not occur with other themes or the default theme. (I understand this occurs in some themes, depending on how coded, but not all)

I honestly have no clue how to style new windows, it's bugging me too :(

This has been fixed in 2.8.2 via #21


Remove duplicate bitwise-XOR from Pkg.v

There was a definition for a bit-wise-XOR in Pkg.v but we have one in the library Cava.Lib.BitVectorOps.
Delete the duplicate definition but also provide a curried version of it xorv.
At the same time change one of the vector literals which is constructed by consing into a single Vector literal like [..; ..; ..].
CC: @blaxill

THanks missed that

THanks missed that


Because every version of fl_kdxf_sst_rt depends on permission_handler ^10.2.0

Because every version of fl_kdxf_sst_rt depends on permission_handler ^10.2.0 and school_app depends on permission_handler ^11.0.1, fl_kdxf_sst_rt is forbidden.
So, because school_app depends on fl_kdxf_sst_rt any, version solving failed.

OK, I have received your request and I will update it as soon as possible. If you need it urgently, you can update it manually first, or you can join us to jointly maintain this library.

i am updated.You can try again.


Serverless: Lambda layer Ruby wrapper doesn't support proper module namespacing

The current beta iteration of the Ruby layer expects a Lambda function to observe to be in the format of:
path.function

But AWS fully supports namespaced functions in the format of:
path.MyModule::MyClass.function

We should update the Ruby layer to support both formats.

Resolved with the layer release we've tagged as v0.3


enhance variable scoping to allow refining types in branches

This relates to the second issue in https://github.com/numba/numba/pull/2672#issuecomment-363131354.
The current variable scoping rules will only allow new variable definition on the "backbone":
https://github.com/numba/numba/blob/d53fb10511f5aa72c2e449d003a8de9ecefa2bf9/numba/controlflow.py#L164-L170
Variables defined outside will always use the variable defined in the closest dominating block.  This makes certain variable type refinement code fail unexpectedly:
out = <..define to be any layout .>
 if out.flags.c_contiguous:
        out = np.ascontiguousarray(out)
       # out is still any layout despite the previous conversion

I starting to work on a fix to this problem.
The idea is:

all assignment creates a new definition
the last assignment for a var in the basicblock will carry over to the successors.
two definitions of the same var (same name) will merge when the basicblocks merge.

@sklam can this be closed?

yes


Upgrade gem to use latest pubid-core

This gem has:
  spec.add_dependency "pubid-iso", "~> 0.4.1"

but relaton-iso depends on pubid-iso 0.5.0.
I am consuming all the relaton gems at once in Metanorma; it is essential that all the latest pubid, relaton, and metanorma gems appeal to the same versions of the pubid gems.
However, I cannot upgrade pubid-iso to 0.5.0 for this gem, because
An error occurred while loading spec_helper.
Failure/Error:
    class Identifier < Pubid::Core::Identifier
      attr_accessor :number, :publisher, :copublisher, :stage, :part, :subpart,
                    :edition, :draft, :redline, :year, :month, :type, :alternative,
                    :draft_status, :revision, :adoption_year, :amendment, :supersedes,
                    :corrigendum, :corrigendum_comment, :reaffirmed, :incorporates,
                    :supplement, :proposal, :iso_identifier, :iso_amendment

      def initialize(publisher: "IEEE", number: nil, stage: nil, subpart: nil, edition: nil,
                     draft: nil, redline: nil, month: nil, revision: nil,
                     iso_identifier: nil, type: :std, alternative: nil, draft_status: nil, adoption_year: nil,

TypeError:
  superclass must be an instance of Class (given an instance of Module)
# ./lib/pubid/ieee/identifier.rb:7:in `<module:Ieee>'

Please update to the latest pubid-core throughout the pubid stack. If you do not, Metanorma will downgrade to the lowest compatible version of all pubid; that in turn will downgrade relaton to the lowest compatible version, and that will throw out a lot of essential updates to relaton.

This is a prerequisite to releasing pubid-ieee. https://github.com/metanorma/pubid-ieee/pull/86 also is needed, to make rspec work.

@mico can you please help fix this ASAP? Thanks.


fix: remove translations for product names

Describe the changes you have made in this PR
Removes translations of product names. Keys should still be translatable as for some cases it makes sense, e.g. LND via LNC --> The word "via" is translated)

this pr removes only those which are basically brand names and don't need to be translated


Build rustdoc to github pages

This crate is not available on crates.io, so you can not read its docs on docs.rs.
I have a similar crate that can not be published to crates.io, so I just use GitHub pages for hosting the docs and linking to it from the readme:
https://github.com/Luro02/array-map/tree/gh-pages
and this is the link to the docs: https://luro02.github.io/array-map/
I think this would be nice to have for this crate, so I created this PR.

I don't know if you want to use a real domain name, which you can do by going to the settings of the repository under GitHub pages there is a field to add a custom domain and then adding this to the yaml:
          publish_branch: gh-pages
          publish_dir: ./target/doc
+         cname: iced_aw.iced.rs

Otherwise, one could access the docs through this url: https://iced-rs.github.io/iced_aw/

(not sure why CI is broken, since I did not change any code)

@Kaiden42 any reason why we should not have automated document building until we release on crates.io?

@genusistimelord No, it's actually an excellent idea. This would also give us documentation of unstable versions if someone wants to include iced_aw directly from GitHub.


使用Badam多卡训练中途弹出Invalidate trace cache @ step 2: expected module 1, but got module 332并停止训练

Reminder

[X] I have read the README and searched the existing issues.

System Info
][INFO|trainer.py:4117] 2024-11-29 00:18:59,105 >>
***** Running Evaluation *****
[INFO|trainer.py:4119] 2024-11-29 00:18:59,105 >>   Num examples = 100
[INFO|trainer.py:4122] 2024-11-29 00:18:59,105 >>   Batch size = 4
{'eval_loss': 0.22188051044940948, 'eval_runtime': 16.9525, 'eval_samples_per_second': 5.899, 'eval_steps_per_second': 0.767, 'epoch': 0.16}
5%|██                                     | 36/675 [05:01<1:58:38, 11.14s/it]Invalidate trace cache @ step 2: expected module 1, but got module 332

llamafactory version: 0.9.1.dev0
Platform: Linux-5.15.0-91-generic-x86_64-with-glibc2.35
Python version: 3.11.0
PyTorch version: 2.5.1+cu124 (GPU)
Transformers version: 4.46.1
Datasets version: 3.1.0
Accelerate version: 1.0.1
PEFT version: 0.12.0
TRL version: 0.9.6
GPU type: NVIDIA L20
DeepSpeed version: 0.14.4
Bitsandbytes version: 0.44.1

Reproduction
model
model_name_or_path: Qwen2-VL-7B-Instruct
method
stage: sft
do_train: true
finetuning_type: full
use_badam: true
badam_mode: layer
badam_switch_mode: ascending
badam_switch_interval: 50
badam_verbose: 2
dataset
dataset: mire_train  # video: mllm_video_demo
template: qwen2_vl
cutoff_len: 2048
max_samples: 1000
overwrite_cache: true
preprocessing_num_workers: 8
val_size: 0.1
output
output_dir: saves/qwen2_vl-7b/fulll/sft
logging_steps: 10
save_steps: 0.2
plot_loss: true
overwrite_output_dir: true
train
per_device_train_batch_size: 1
gradient_accumulation_steps: 2
learning_rate: 1.0e-5
num_train_epochs: 3.0
lr_scheduler_type: cosine
warmup_ratio: 0.1
fp16: true #fuck
ddp_timeout: 180000000
eval
val_size: 0.1
per_device_eval_batch_size: 4
eval_strategy: steps
eval_steps: 5
flash_attn: fa2
deepspeed: examples/deepspeed/ds_z3_offload_config.json
Expected behavior
请问这该如何解决呢，弹出这个信息后，训练陷入挂起状态，停止训练,谢谢解答!
Others
No response

Is this reproducible? Or it ocassionally happens?

Is this reproducible? Or it ocassionally happens?

It seems that when I use deepspeed,it happens.
Do you encounter it before? Thanks!

try removing val_size parameter

This is essentially a warning rather than an error, and should not cause the pause of program; see this issue for more details.

try removing val_size parameter

I removed it,but it happens again....

This is essentially a warning rather than an error, and should not cause the pause of program; see this issue for more details.

i read it before ,and i have tried to disable the prefetching optimizations of zero-3,but it doesn't work..  In my case,the training truly suspend ,do you have other solutions？thanks!

遇到了一样的问题

我是训练一开始就发生了Invalidate trace cache @ step 2: expected module 0, but got module 335的错误，导致模型一开始就没法训练，后面在yaml文件更改了训练的batch_size(从2改成4)就可以训练了

我是训练一开始就发生了Invalidate trace cache @ step 2: expected module 0, but got module 335的错误，导致模型一开始就没法训练，后面在yaml文件更改了训练的batch_size(从2改成4)就可以训练了

没有解决，一开始能训练，训练了几个batch之后又停住了，而且还没有任何提示


Orm#destroy fails if an attribute "attributes" is present

Similar to https://github.com/remiprev/her/issues/371, #destroy fails when attributes attribute is present. Tracked it down to this section of code. I've resorted to stripping out the attributes attribute from the response.
      # lib/her/model/path.rb:18
      def request_path(params = {})
        self.class.build_request_path(params.merge(attributes.dup))
      end

Hi @voltechs - if I understand the issues correctly, this might be a tricky fix in Her because the attributes method is defined in an activesupport mixin.
I have successfully worked around attributes called ‘attributes’ in a middleware.
Have a look at https://github.com/errorstudio/spektrix-ruby/blob/master/lib/spektrix/response_parser.rb - it’s pretty involved because I’m parsing some totally non-RESTful endpoints but you’ll see that there’s a comment explaining how we iterate over the data and change ‘attributes’ to ‘custom_attributes’ be for Her sees it.
Any use?

Yea that makes sense. I appreciate this! Cheers 🍻


Bug with the topic checkboxes

When selecting a topic the check marks in the checkboxes are small and misaligned:

Thanks for the report, I believe this will be fixed when we upgrade miller-columns-element - I'll try get that sorted and pushed out in the next day or two.

This is now resolved:


Add pre-commit hook file

Feel free to ask if you have any other questions or there is some issue when configuring the pre commit!

Thank you very much.
I will play with this and then get back to you should I have any issues!
Thank you once again for such fast response!

Morning.
Quick update!
This is work beautifully!
Thanks for jumping on this so quickly!
You guys are legends!

Hi @bhirsz
I am revisiting this and seeing that tag 2.6.0 is now availible, I tried to change my pre-commit to reflect this instead of the master revision as it currently does.
As sson as I make the change, then i get the following response:
$ pre-commit run
An error has occurred: InvalidManifestError:
=====> /home/orrin/.cache/pre-commit/repo6c7tk2ec/.pre-commit-hooks.yaml is not a file
Switching back the rev to "master" does allow me tor un the "pre-commit run" command again.
Am I missing something or should I create a bug for you guys :)
Have a good one!
@OrrinGradwell


Update tenant-restrictions-v2.md

Windows Server 2022 is not included in the "Prerequisites" section.

@msmimart
Can you review the proposed changes?
When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

#sign-off


Change to = constraint

In cutting_pattern.py change
            # Constraints: Ensure all orders are satisfied
            cut_model.addConstrs(gp.quicksum(self._A[i, j] * x[j] for j in self.J) >= self.b[i]
                                 for i in self.I)
            # Constraints: Ensure no more than MAX_SURPLUS_QUANTITY pieces are left over
            if GlulamConfig.SURPLUS_LIMIT > 0:
                cut_model.addConstrs(
                    -gp.quicksum(self._A[i, j] * x[j] for j in self.J) >= -self.b[i] - GlulamConfig.SURPLUS_LIMIT
                    for i in self.I)

to = const

Changing to = make convergence slower. Then 420s is not enough time to find the optimum.

@tprunarsson FYI - changing to an equal constraints for the demand slows down convergence, so I'm keeping the model as is

Reducing GlulamConfig.SURPLUS_LIMIT=0.01 (was 0.1) so practically 0 works. But cannot be 0.
Let's change that this is a param for the ES algorithm.


Align Persistent Subscription naming and behaviour with RFC-022 - gRPC Persistent Subscriptions

As the next release will be breaking, then we could use it to align the naming and behaviour with what was agreed in the RFC-022 - gRPC Persistent Subscriptions. Current parameters names are not aligned.
RFC-022
We can also consider doing that non-breaking by marking the old names as obsolete and passing the getters and setters to the new options.

Good opportunity to bring persistent subscription to $all support at the same time


[emerg] 1#0: "daemon" directive is duplicate in /etc/nginx/nginx.conf:21

When I run /usr/bin/docker run -it kyma/docker-nginx, I get:
aviuser@tshanks-dcos-provisioning ~ $ /usr/bin/docker run -it kyma/docker-nginx
2015/08/21 04:36:34 [emerg] 1#0: "daemon" directive is duplicate in /etc/nginx/nginx.conf:21
nginx: [emerg] "daemon" directive is duplicate in /etc/nginx/nginx.conf:21

I'm running on CoreOS stable (717.3.0).

Oh... wonder why that didn't show up before. It looks like I've set daemon off both in the nginx.conf and in the Dockerfile CMD. I'll remove it from the Dockerfile CMD as Docker has to have Nginx not running as a daemon afaik so no point in making it overridable.

New Docker image is being built https://hub.docker.com/r/kyma/docker-nginx/builds/


PHP 5.4 & 5.5 -support.

Wouldn't it make sense to support 5.4 as the 2.8 -branch of framework-bundle
( https://github.com/symfony/framework-bundle/blob/2.8/composer.json ) supports >=5.3.9? As does Symfony 2.8. Doctrine 2.5 supports >5.4, so why require php 5.6, when some servers might still be on 5.4?

This is a very opinionated question. The counter argument is:
Would it make sense to support a PHP version that is not officially supported? Why should we bother if not event the core team bothers?
Do you have a reson why you need PHP 5.4 support?

The long term support version of symfony supports >=5.3.9 http://symfony.com/doc/2.8/reference/requirements.html
Centos 7 (It's quite popular) only comes with 5.4.

As a bundle we should always consider whether BC compatibility does not stale development of new features, like supporting the Symfony 3.0 branch. Some of the features, like the use of a FQCN to define form types, are a hard BC break that would require the maintainers of all bundles to bump their php requirement.
@Nyholm think we should at least update the 1.x branch to https://github.com/dmishh/SettingsBundle/commit/a1747348665f69213cd962de27cbcd1ab29b1c4d and release the latest stable tag of that. You see any possible bugs between March 9 (when v1.0.7 was released) and that commit I mentioned?

Think

Sure. Lets!

2.0.0-beta2 has been released, I've updated UPGRADE.md accordingly.


Update seamless_database_pool_adapter.rb

Fixes #28.

Closing as this turned out to be a duplicate of #23.


'Module_six_moves_urllib_parse' object has no attribute 'urlencode'

Hi,
I use Django 1.6.1 in server
and get error:
'Module_six_moves_urllib_parse' object has no attribute 'urlencode'

Hello, Same problem with my Pydev environement in 1.6.1.
I have updated Six with pip install --ugprage six to 1.9.0, but still same error.
On Same host, with django 1.7.4  part of my Linux Mint 17 system, I have no issues.

Thank you!
I have updated Django to 1.7.4
is work!


rqt_rviz: 0.5.9-0 in 'melodic/distribution.yaml' [bloom]

Increasing version of package(s) in repository rqt_rviz to 0.5.9-0:

upstream repository: https://github.com/ros-visualization/rqt_rviz.git
release repository: https://github.com/ros-gbp/rqt_rviz-release.git
distro file: melodic/distribution.yaml
bloom version: 0.6.1
previous version for package: null

rqt_rviz

No changes

lgtm.
We may want to provide the source and doc entries as well to enable CI and documentation generation like it was done for lunar: https://github.com/ros/rosdistro/blob/master/lunar/distribution.yaml#L3790-L3805
Bloom should suggest it when running bloom-release

Ok, re-ran bloom, see https://github.com/ros/rosdistro/pull/17742


Rewrite "two part" initializations

This style is not Pythonic:
res = Program.__new__(Program)
res.mglo, ls1, ls2, ls3, ls4, ls5, res._subroutines, res._geom, res._glo = self.mglo.program(

Don't just call __new__ and then do the initialization outside __init__.  Instead, pass the context into Program's constructor.  This would allow people to inherit from Program.

As far as I know this was done to make it hard for the users to instantiate their own objects with Program(). They are supposed to use the methods in the Context class to create instances.

@einarf I like the library design, which is why I'm in the process of porting my code over and I will soon propose folding in my https://github.com/NeilGirdhar/glx/tree/master/glx library after I've ported it.
However, I don't agree with "making things difficult for the user" by writing obfuscated code.  Anyway, adding all of the necessary members as parameters of the constructor would make it harder for the user to accidentally instantiate Program.

Actually, on second look, it would be better to pass the context into Program's constructor.  That would allow people to inherit from Program.

ModernGL classes are considered "final". Their C++ implementation properly set this flag. Due to the python wrapper (that makes  methods "lintable") you are able to subclass  those classes.
None of the internal method will accept a subclass of Program. If they were accepting subclasses they would have an overhead to do that.
One of my prototypes allow me to check for internal types and use their slots a way faster then it was implemented in pure python.
The implementation is not a "beautiful code" I have to admit. The use of moderngl should be pythonic, readable, and easy to understand.
To have a subclass you should implement a class with an attribute holding a ref to a moderngl.Program. you will nees a wrapper over classes that accept a program in their methods.

The impl should be more lightweight. It is hard for new contributors to push to this repo. I am thinking on it how could I change stuff to make things easier without havint too much performance loss

I guess it just means you have to go the composition route when extending classes. That's what I currently do. The obvious downside is that you have to wrap all the methods, but that's not a huge issue for me personally. Performance is pri 1 for me.

None of the internal method will accept a subclass of Program. If they were accepting subclasses they would have an overhead to do that.

I don't see why there's necessarily any overhead.

To have a subclass you should implement a class with an attribute holding a ref to a moderngl.Program. you will nees a wrapper over classes that accept a program in their methods.

You're saying to use “composition over inheritance”.  You're right in most cases, I agree.

None of the internal method will accept a subclass of Program. If they were accepting subclasses they would have an overhead to do that.

I don't see why there's necessarily any overhead.

Using PyObject_IsInstance over a pointer == test would have an impact on performance. For types except (int, float, str, dict ...) an isinstance check is more then just a == in c++.

I don't see why inheritance would be especially expensive, but even if it is, it's not something that you should try to prevent.  It's the user's decision.

On the master the framebuffer have a check on its attachments when created:
if (Py_TYPE(item) == &MGLTexture_Type) {

When a VertexArray is created, the args are unpacked as follows:
MGLProgram * program;
...

int args_ok = PyArg_ParseTuple(
	args,
	"O!OOIp",
	&MGLProgram_Type,
	&program,
...
);

but these are not that important.
The main reason I don't want to allow subclasses is that on the experimental branch I was able to access the wrapper class slots from C++ without a lookup cost (time). I am also able wrapping objects and return them directly from C++.

I was able to access the wrapper class slots from C++ without a lookup cost (time). I am also able wrapping objects and return them directly from C++.

Fair enough, I'm not going to question your design.
If you want to prevent subclassing, I think a nicer way to do that is:
class SomeBase:

    def __init_subclass__(cls, **kwargs):
        super().__init_subclass__(**kwargs)
        if cls is not SomeBase:
            raise TypeError

class Derived(SomeBase):
    pass

This raises a TypeError on declaration rather than what is currently implemented, which waits for the derived class to call the superclass's __init__, which it may not even do.

How opposed are you to something like this?
class Buffer:
    '''
        Buffer objects are OpenGL objects that store an array of unformatted memory
        allocated by the OpenGL context, (data allocated on the GPU).
        These can be used to store vertex data, pixel data retrieved from images
        or the framebuffer, and a variety of other things.

        A Buffer object cannot be instantiated directly, it requires a context.
        Use :py:meth:`Context.buffer` to create one.

        Copy buffer content using :py:meth:`Context.copy_buffer`.
    '''

    __slots__ = ['mglo', '_size', '_dynamic', '_glo', 'ctx', 'extra']

    def __init__(self, context, data=None, *, reserve=0, dynamic=False):
        '''
            Create a :py:class:`Buffer` object.

            Args:
                context: the Context.
                data (bytes): Content of the new buffer.

            Keyword Args:
                reserve (int): The number of bytes to reserve.
                dynamic (bool): Treat buffer as dynamic.

            Returns:
                :py:class:`Buffer` object
        '''

        if type(reserve) is str:
            reserve = mgl.strsize(reserve)

        self.mglo, self._size, self._glo = context.mglo.buffer(data, reserve, dynamic)
        self._dynamic = dynamic
        self.ctx = context
        self.extra = None
        if type(self) is not Buffer:
            raise TypeError("Buffer does not support subclassing.  Use composition instead.")

You could still keep Context.buffer:
    def buffer(self, data=None, *, reserve=0, dynamic=False) -> Buffer:
        '''
            Create a :py:class:`Buffer` object.

            Args:
                data (bytes): Content of the new buffer.

            Keyword Args:
                reserve (int): The number of bytes to reserve.
                dynamic (bool): Treat buffer as dynamic.

            Returns:
                :py:class:`Buffer` object
        '''
        return Buffer(self, data, reserve=reserve, dynamic=dynamic)

The upcomming major version will have better initalization for the wrapper.


[vim9script] Allow using imported entities without a prefix

Currently, if I want to use function Foo() and constant BAR from imported script lib.vim without the lib prefix, I have to write:
const Foo = lib.Foo
const BAR = lib.BAR

This quickly becomes tedious when there are many exported items (I am writing a plugin where I do that for a couple dozen items, and in each file where lib is imported).
I think that the current behavior is sane, because it encourages separate namespaces. At the same time, there are situations where it may be convenient to pollute the script's namespace with imported items (with all the accompanying caveats), because it makes the syntax terser and the code simpler to write.
So, how about a mechanism that simplifies the task above? Possible syntax:
import 'lib.vim'
import namespace lib

import `anotherlib.vim` as that
import namespace that

or
import 'lib.vim'
use namespace lib

import `anotherlib.vim` as that
use namespace that

The semantics would be equivalent to manually defining names for each exported function and constant.

Currently, if I want to use function Foo() and constant BAR from imported script lib.vim without the lib prefix, I have to write:
const Foo = lib.Foo
const BAR = lib.BAR

This quickly becomes tedious when there are many exported items (I am writing a plugin where I do that for a couple dozen items, and in each file where lib is imported).
I think that the current behavior is sane, because it encourages separate namespaces. At the same time, there are situations where it may be convenient to pollute the script's namespace with imported items (with all the accompanying caveats), because it makes the syntax terser and the code simpler to write.
So, how about a mechanism that simplifies the task above? Possible syntax:
import 'lib.vim'
import namespace lib

import `anotherlib.vim` as that
import namespace that

or
import 'lib.vim'
use namespace lib

import `anotherlib.vim` as that
use namespace that

The semantics would be equivalent to manually defining names for each
exported function and constant.

In your case you probably know what you are doing and the script you
import was probably written by you.  However, this mechanism is going to
be used by anybody who thinks it's a great idea, and quickly we have
name space pollution all over the place.  It's the kind of thing that
allows people to should themselves in the foot.
If you import many items, there might be something wrong with your
setup.  That's the first thing to look at.
Otherwise, just bite the dust and use the "name." prefix.  You can use a
short name, thus it's not that much of a problem.
--
With sufficient thrust, pigs fly just fine.
-- RFC 1925
/// Bram Moolenaar -- @.*** -- http://www.Moolenaar.net   \
///                                                                      \
\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Ok, I've tried :-) I'll live with what Vim 9 script is offering, then. Thanks for taking the time to reply to this request!


Limit number of CPUs

Hello.
Is there a way to limit the number of CPU/processes used to run this app?
It seems to always run up-to 8 cores according to my monitoring.

Does it always require 8 cores?

Hi @soichih Thanks for pointing out. Currently, the application runs on all the physical cores that are available. So if you have a 6-core machine, the application would speed up the computation to run parallel stuff on all the 6 cores.
But I get your point, I would soon send a PR which will enable you to control the number of cores that you want to give to this application. Something like --n_jobs=3 in addition to the existing command line arguments.

Yes, that will be perfect. Thanks! We need to be able to control the number of processes as we are running this App on our HPC system. Each compute-node has up to 24 cores, but scheduler will certainly kill the job if it exceeds the required number of CPUs (I am requesting 8 cores at the moment).

@soichih This has been tackled with the new release of version 1.0.1. The commit has been pushed to the repository. The continuous integration system will now update the packages at both PyPI and DockerHub.
However, it takes around 30 mins to push the latest docker image on DockerHub. Nevertheless, the package on PyPI would have been updated at the time of writing this comment.
If you are using the command line (installed through pip3 install rsHRF), you might be able to upgrade to version 1.0.1 right now.
If you are using the containerized BIDS-App through docker, I suggest you wait for around 30 minutes.
Lastly, the input argument to control the number of parallel jobs is given by --n_jobs 3 (if you want to use 3 parallel processing elements)
Thus, in your existing workflow, the command becomes:
rsHRF ../bids-data ../results participant --brainmask --estimation canon2dd --participant_label 01 02 --n_jobs 3 (emphasis on --n_jobs 3)
If you do not provide this argument, the application will default to using all the physical cores available in your system.
Hope this helps!

Update: Docker Image has been updated.


The v1.10.7 introduced a breaking change: Comparison vs v1.10.5

I'm checking the differences of the v1.10.5 and v1.10.7 due I had translations using multiple placeholders that they were getting translated correctly before, and after upgrading they fail.
The comparison link, between those two versions, is the following: https://github.com/dkfbasel/vuex-i18n/compare/v1.10.5...v1.10.7.
So, were before this was correctly working:
computedProp() {
  const quantityClassName = this.$style[`${this.mainClassname}__quantity`];
  const translationParameters = {
    0: `<span id="${this.fromId}" class="${quantityClassName}">${from}</span>`,
    1: `<span id="${this.toId}" class="${quantityClassName}">${to}</span>`,
    2: `<span id="${this.totalId}" class="${quantityClassName}">${total}</span>`,
  };

  return this.$t(resultInfoKey, translationParameters);
}

With the version v1.10.7 returns the following

Not all placeholders found.
And I'm starting to suspect the root cause of this issue is at this line of code. Which actually relates to #98 and #99.
Please, any feedback or fix, is welcome.

HI @davidpelayo,
This issue is quite likely due to the changed regular expression match that we use to identify placeholders in translation strings. With the new regex matcher, we require at least two characters, which breaks your code if the variable replacement results in a matcher with only one character (i.e. a number).
I will adapt the regex matcher to also include matches for single characters as long as they match [A-Za-z0-9_]. Stay tuned.

should be fixed in latest release v1.10.9

Additionally, to my message above, the latest version fails on IE11 due short hand properties not being transpiled, such us this.
Where:
SET_LOCALE(state, payload) {
}

It should be:
SET_LOCALE: function(state, payload) {
}

Is this intended?

Hi @davidpelayo
Thank you for reporting this. Definitely not intended. I will look into this.

Hi there,
The issue should be fixed now in version v1.10.10. I needed to change the build process somewhat, as babel needs the node_modules and babelrc file to be in the same root directory as the scripts to transpile.


Migrating from mow.cli to cobra

Currently we use mow.cli for CLI framework
Cobra is another popular CLI framework that has these features:

Intelligent suggestions (app srver... did you mean app server?)
Automatically generated shell autocomplete for your application (bash, zsh, fish, powershell)
Automatically generated man pages for your application

It's proposed we move to cobra framework.

@b00f @themantre
I will start researching this and add the result as a comment here.
then we can start coding it.

@b00f
we have some options for CLI in Pactus.
the first way is to migrate the current CLI to Cobra and add our new features like interacting with the node.
and the second option is to make a new project like Pactus-CLI and provide all our expected options to interact with the Pactus node.
when we find out which one we are going to do, I can start fixing the issue.

For migrating from mow.cli to cobra we can start from daemon first.

ok, I will start to migrate the daemon code to Cobra for now.
but at the end, we also talk about a full CLI.
@b00f I will send a PR.


Allow specifying executable bundle style

This is useful when the app only has one executable, so there's no need to pack it into an archive, or you want to choose another bundle option, e.g. tar.xz for windows.
This could be accomplished by adding an --exe-bundle-style cli argument to the tool with different bundle style options.

Just wanted to note that this is related to #17
I like the option of no bundling at all though, would be useful for simple tools.

definitely a dupe of #17, where I'll write some more notes


i18n(es): update server-side-rendering.md

What kind of changes does this PR include?

New or updated content
Translated content

Description

What does this PR change? Updates the server side rendering guide with latest changes for Endpoints.

hacktoberfest-accepted

📌 Waiting for #1665 to be merged.

Gracias! @agustinmulet y @fredoist


Default NamingConventionViolation classPattern does not allow numbers

The regex is '[A-Z$][a-zA-Z$]*' which does not allow digits. Is this done on purpose?

Yes this was done on purpose.  I must admit it reflects my own opinion but not necessary the java style guides ... what are your reasons for using digits in class names?

In this case I was having a class for UInt8 that I needed to have for some Bluetooth related code. Also sometimes I end up using numbers when it comes to specific versions. e.g. some RxJava1/2 related code.

I will leave this open and if a bunch of people upvote this issue, we can extend the pattern?

Sure sounds perfect.

Is 2 + me considered a bunch of people? 😆

I don't think so. Also I'm astonished that not more people want it :/. Just override the pattern as long as we wait for more responses ;)

Yup that's what I'm doing.

Seems like not a lot of people want this.

I'm reopening this for another round of consideration. By now we've got 5 👍 here. I think it's pretty common to have numbers in there when you deal with a certain dependency version. For instance RxJava2 vs RxJava1 or brands that have names that contain numbers like car2go.


Thresholding score to get predictions.

Hi, how do you threshold the score function to get the final labels? Please provide a sample script replicating the result presented in paper on any dataset.

We use AUC-ROC and AUC-PR as evaluation metrics, they can directly measure anomaly scores. Threshold is not required to replicate the results presented in the paper.
---- Replied Message ----
| From | Krishna @.> |
| Date | 9/4/2023 12:37 |
| To | @.> |
| Cc | @.***> |
| Subject | [xuhongzuo/scale-learning] Thresholding score to get predictions. (Issue #1) |
Hi, how do you threshold the score function to get the final labels? Please provide a sample script replicating the result presented in paper on any dataset.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

OK, understood. For AUC-PR metric what function you are using? I used average_precision_score  from sklearn, I am getting different results.

you should use main.py. This script contains data importing, pre-processing, training, inference, and evaluation.
Message ID: @.***>

Hey thanks for quick reply. I just looked at the API type code. I didn't use the main.py.


Linting

This adds linting to the build process, using luacheck.

Luacheck is added to the list of recommended extensions for VSCode, so that devs will see locally the same warnings and errors that will be found on GH.
The GH action will run on any push, and on PRs to master; any failures will show up in the PR.
The .luacheckrc in the repo (which is used locally as well as on GH) is configured to ignore formatting issues, as well as a few other things that Robert and I felt were not important.
Only files in the src directory are linted, and third-party files in there (like lunajson and mobdebug) are ignored.
A dev may decide that a certain warning is acceptable and may be bypassed. For example:local region = finenv.Region()

function do_something(region)
...
end

This will generate a warning for the function definition that the region parameter shadows the earlier variable with the same name. To suppress the warning, add a comment -- luacheck: ignore region on the same line as the function definition.

The docs for luacheck are here. In particular, here are the potential warnings that can be emitted (note that our .luacheckrc disables some of these) and instructions for using comments to disable specific warnings. Devs are expected to disable warnings as locally as possible in their code.
There were about 70 warnings already in the codebase. I went through and fixed the ones that were easy to fix, and I added ignore hints to the others. Please take a look at your scripts and let me know if any changes are needed.
Suggestions and comments are welcome.

@cv-on-hub I don't think this actually affects any of your current scripts, but we wanted to get your eyes on the PR as well.

we wanted to get your eyes on the PR as well

Thanks @asherber. The mechanics of how this all fits together is beyond my understanding but it looks like enhanced strength for the repo.

As I'm looking at some of the potential warnings, I think I'm going to re-enable some of the warnings around unused variables -- these just create clutter and make code harder to read. This is going to make some extra work for me to clean up current instances, so I'm going to set this PR back to draft and will advise when I've pushed the new commit. Feel free to continue the discussion.

I take it back. This is a good first step, and we should get it merged. Further cleanup can come later.

For anybody interested: Zerobrane Studio does indeed support Luacheck, it just requires setting a parameter in the configuration file.

On Jan 23, 2024, at 11:59 AM, Aaron Sherber @.***> wrote:
This adds linting to the build process, using luacheck.
Luacheck is added to the list of recommended extensions for VSCode, so that devs will see locally the same warnings and errors that will be found on GH.
The GH action will run on any push, and on PRs to master; any failures will show up in the PR.
The .luacheckrc in the repo (which is used locally as well as on GH) is configured to ignore formatting issues, as well as a few other things that Robert and I felt were not important.
Only files in the src directory are linted, and third-party files in there (like lunajson and mobdebug) are ignored.
A dev may decide that a certain warning is acceptable and may be bypassed. For example:
local region = finenv.Region()
function do_something(region)
...
end
This will generate a warning for the function definition that the region parameter shadows the earlier variable with the same name. To suppress the warning, add a comment -- luacheck: ignore region on the same line as the function definition.
The docs for luacheck are here https://luacheck.readthedocs.io/en/stable/index.html. In particular, here are the potential warnings https://luacheck.readthedocs.io/en/stable/warnings.html that can be emitted (note that our .luacheckrc disables some of these) and instructions for using comments https://luacheck.readthedocs.io/en/stable/inline.html to disable specific warnings. Devs are expected to disable warnings as locally as possible in their code.
There were about 70 warnings already in the codebase. I went through and fixed the ones that were easy to fix, and I added ignore hints to the others. Please take a look at your scripts and let me know if any changes are needed.
Suggestions and comments are welcome.
You can view, comment on, or merge this pull request online at:
https://github.com/finale-lua/lua-scripts/pull/655
Commit Summary
7bdf531 https://github.com/finale-lua/lua-scripts/pull/655/commits/7bdf531d8eec8cc40d5ee94bba0395871998063f Add linting workflow and config
304616d https://github.com/finale-lua/lua-scripts/pull/655/commits/304616d987961bae321f80a7aa0c1e3de03572a8 Luacheck hinting and fixes
File Changes (34 files https://github.com/finale-lua/lua-scripts/pull/655/files)
A .github/workflows/lint.yml https://github.com/finale-lua/lua-scripts/pull/655/files#diff-107e910e9f2ebfb9a741fa10b2aa7100cc1fc4f5f3aca2dfe78b905cbd73c0d2 (16)
A .luacheckrc https://github.com/finale-lua/lua-scripts/pull/655/files#diff-69ff5cbc209d68db600cc536c6b9ec13b057b55207825d17e71f0ae0d6b0b3ff (37)
M .vscode/extensions.json https://github.com/finale-lua/lua-scripts/pull/655/files#diff-c16655a98a3ee89a7636a59c59a72b0e93649e3a1e947327cfc43a1336b4e912 (2)
M .vscode/recommended_settings.json https://github.com/finale-lua/lua-scripts/pull/655/files#diff-ed5a0a54a184cda00eb28983714932b47455b28d806b44097c8efd4476782d17 (1)
M src/UI_switch_to_selected_part.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-08401d37b7f15b5f03fb5266f71b4efca3c527696c08a6385525da99284fdd62 (8)
M src/chord_accidental_adjust_down.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-feb2f261c01ed4e569ac5fc5e2acf432ebabb53aa23bf92898aeac9b3f69d147 (8)
M src/chord_accidental_adjust_up.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-81b6a8e390240073877d9594748e4ac46300eb9afea294aceed962c4b2a30ed3 (8)
M src/document_options_as_json.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-eb29604186463730e3a99cd032f0bcde10e25e3434f74b6e2faffdd6a6009b3c (5)
M src/dynamics_move_above_staff.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-8b01ba34dcb3b332d4ca59b04d11e329d7c7ae52d8acaa74d7c21cc6d5683f88 (6)
M src/finale_lua_menu_organizer.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-7e815ac6c92129a869791a113dbcc60f93730abadf19924539144c3e198887a0 (3)
M src/harp_pedal_wizard.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-c64acefda21bb3939d10e4f3bcddb8603274e793101a53cfe5027a0adce60d4d (31)
M src/layers_create_whole_rests_1_2.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-b3b5e47eff921af4d865643b0037a8016b8751cf2dc08db11d86a1964d4c541b (4)
M src/library/articulation.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-34c64829e26dfe9e9ffe99e3c0f5d291eb01d354489872e89c592ab8eb68bf14 (1)
M src/library/clef.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-efa3a9de7c091a3b2b0c26d3b2688917462e8c1021009cf6535a19cf0f62e22f (5)
M src/library/general_library.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-ca92f2967fe48a516123919b227d2245d8fd931773de6e8d14e60ce5d63b75b5 (4)
M src/library/lua_compatibility.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-254ce3d90038a4d4f9c20426c12a58f1d2861cd20a2da9ca1a753c2a28afe694 (4)
M src/library/score.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-c0386bfc3d4d4239cdae79d3dd3a0bb1610a6c4f983c4d1d2358efc9d3c8f049 (4)
M src/library/smartshape.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-050ce9fb94bde57dd3e9c2ebcf46b685836c19e2508c4d85ede18b904e36524f (4)
M src/lyrics_baseline_spacing.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-13b5c977a79580de5e1f48ca86270961923c19ad3605ababba9353f6aef774dc (4)
M src/lyrics_openai_hyphenation.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-15519e37152fed67c2aeebd830e7db32ef5b53e4a2e9dd2dcb86be5135985149 (4)
M src/mixin/FCMControl.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-a84205d005eb5ab525350877458ba855b2593be0d418eab5456d0ba9ab8b8f7e (2)
M src/mixin/FCXCtrlUpDown.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-bef941de93bc9078ef232e085137ab3bca5caf2845eb0392b852c2621cd7ae20 (2)
M src/mmrest_widen_to_tempo_mark.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-c8cef92812fc781054c7f91cd1625b6d4c4d0df0cf0dde3e5a15c72471b7970d (4)
M src/note_cluster_determinate.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-71c1a3d1214c4657cd5b4d7fb761344f2156fb88cb8da4bd6f22267d7cd529c9 (74)
M src/page_format_wizard.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-d4c9f03caa8f65a1c07ebca3bb4796984b26fb8edb311dc2855c4f329209f639 (55)
M src/playback_mute_notes_in_region.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-961ec07b12c3f049611dcf33dcb7fe06262e9c41e6c37134183c9aaa4d4579fb (4)
M src/playback_selected_staves.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-55059375e707f5b5727887deb7506899c014a6a69144929db03047b33c93c903 (6)
M src/playback_unmute_all_staves.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-fe86e3ab91db89364942353ebecfb40231d8ab158935a958f3cb6202e79dd367 (6)
M src/playback_unmute_notes_in_region.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-bb895608523761b87360a9cbbb23b37c2ced1dcf7cbc4ea1bfef19b0f18dfa7c (4)
M src/smartshape_move_repeat_bracket_for_chords.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-8f56900379d41bdd10e9a113fd6bbdf28a06bd5d6d7c672bde0522a10ef49c49 (4)
M src/staff_rename.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-969ab6aef7655a874366bfac419f8375be83937663faa7d11d4efb35afc226ca (6)
M src/staff_split_layers.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-d9823f836ead95335d80510fe78e31b2a5b8647565b32f684a3448d32488a69b (6)
M src/standalone_hairpin_adjustment.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-518255e59828eaa080ad57edce7fac6dc4431b53833aca643097649713e312df (4)
M src/system_move.lua https://github.com/finale-lua/lua-scripts/pull/655/files#diff-227524774f53fd79b512d69874259aee9a5ff845aae2f65e1f89df622e7139ed (4)
Patch Links:
https://github.com/finale-lua/lua-scripts/pull/655.patch
https://github.com/finale-lua/lua-scripts/pull/655.diff
—
Reply to this email directly, view it on GitHub https://github.com/finale-lua/lua-scripts/pull/655, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMCBUQ34UMA2AXZ4LNDJEKLYQAJCLAVCNFSM6AAAAABCHSZ7XOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA4TMOBYGEZTGNY.
You are receiving this because you are subscribed to this thread.

I don’t know if anyone else is using Zerobrane, but I did figure out how to configure it to use Luacheck and use the luacheckrc parameters from the ‘linting’ pull request

On Jan 23, 2024, at 1:47 PM, Aaron Sherber @.***> wrote:
As I'm looking at some of the potential warnings, I think I'm going to re-enable some of the warnings around unused variables -- these just create clutter and make code harder to read. This is going to make some extra work for me to clean up current instances, so I'm going to set this PR back to draft and will advise when I've pushed the new commit. Feel free to continue the discussion.
—
Reply to this email directly, view it on GitHub https://github.com/finale-lua/lua-scripts/pull/655#issuecomment-1906973756, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMCBUQ7N5MKUJ7JU42ACUCDYQAVXDAVCNFSM6AAAAABCHSZ7XOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBWHE3TGNZVGY.
You are receiving this because your review was requested.

Okay, I have implemented stricter linting, primarily looking for unused variables. In addition, new global variables may only be initialized in the top-level scope. I have adjusted all scripts so that the linting passes.
Please review all of your scripts one more time to make sure that nothing is broken. I'd like to merge this in the next few days.
cc: @cv-on-hub @jwink75 @Nick-Mazuk @rpatters1 @CJGarciaMusic

new global variables may only be initialized in the top-level scope.

I have only one script using global vars -  ostinato_maker.lua. I've revised it leaving just one global, global_dialog, which I think is needed for modeless operation. Moved its initialisation to top-level, mimicking Robert's sample script modeless_dialog.lua. Submitted in #661 - deploy check successful.

The new rules don’t like me.

On Jan 25, 2024, at 4:19 PM, Carl Vine @.***> wrote:
new global variables may only be initialized in the top-level scope.
I have only one script using global vars - ostinato_maker.lua. I've revised it leaving just one global, global_dialog, which I think is needed for modeless operation. Moved its initialisation to top-level, mimicking Robert's sample script modeless_dialog.lua. Submitted in #661 https://github.com/finale-lua/lua-scripts/pull/661 - deploy check successful.
—
Reply to this email directly, view it on GitHub https://github.com/finale-lua/lua-scripts/pull/655#issuecomment-1911208783, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMCBUQ5ZBZNYBQ6V75BXPDLYQLY7JAVCNFSM6AAAAABCHSZ7XOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJRGIYDQNZYGM.
You are receiving this because you were mentioned.

So here’s a question…
There are a lot of times where I’ll do something along the lines of:
for key, val in pairs(table) do
val = variable
end
Because that’s a quick and easy way of going through a table, rather than figuring out how many entries there are and setting up some index variable that will increment. The linting rules really don’t like the fact that in the above code ‘key’ is unused, so I get a ton of errors.
Is there another way of iterating through a table that the linter likes but retains the simplicity of pairs or ipairs?

On Jan 25, 2024, at 4:19 PM, Carl Vine @.***> wrote:
new global variables may only be initialized in the top-level scope.
I have only one script using global vars - ostinato_maker.lua. I've revised it leaving just one global, global_dialog, which I think is needed for modeless operation. Moved its initialisation to top-level, mimicking Robert's sample script modeless_dialog.lua. Submitted in #661 https://github.com/finale-lua/lua-scripts/pull/661 - deploy check successful.
—
Reply to this email directly, view it on GitHub https://github.com/finale-lua/lua-scripts/pull/655#issuecomment-1911208783, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMCBUQ5ZBZNYBQ6V75BXPDLYQLY7JAVCNFSM6AAAAABCHSZ7XOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJRGIYDQNZYGM.
You are receiving this because you were mentioned.

It’s even worse than I thought, because I just got an error on:
for i = 1, 5, 1 do
Saying that I was an unused variable… But as my limited understanding of this kind of thing goes, it is NOT unused, it’s just all sort of internal to the loop (initial value is 1, go until it’s 5, increment by 1 each loop).

On Jan 25, 2024, at 4:19 PM, Carl Vine @.***> wrote:
new global variables may only be initialized in the top-level scope.
I have only one script using global vars - ostinato_maker.lua. I've revised it leaving just one global, global_dialog, which I think is needed for modeless operation. Moved its initialisation to top-level, mimicking Robert's sample script modeless_dialog.lua. Submitted in #661 https://github.com/finale-lua/lua-scripts/pull/661 - deploy check successful.
—
Reply to this email directly, view it on GitHub https://github.com/finale-lua/lua-scripts/pull/655#issuecomment-1911208783, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMCBUQ5ZBZNYBQ6V75BXPDLYQLY7JAVCNFSM6AAAAABCHSZ7XOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJRGIYDQNZYGM.
You are receiving this because you were mentioned.

All, sorry if I wasn't clear about this -- I'm not asking you to go through and fix issues, because I've already taken care of that. Please take a look at the copies of your scripts in the [head branch for this PR] and make sure that my altered versions work correctly.
@jwink75 I know that there are a bunch of things in your scripts that the linter doesn't like. Instead of overwhelming the comments here, would you mind either contacting me externally (my email address is in my scripts) or opening a Discussion if you'd rather keep this discussion on GH?

Happy to move to a discussion, but the link didn't work and I can't seem to find it in the GitHub UI, so forgive me one more comment here...
Aaron, I was testing my harp pedals script and there were a few things that are not working, so I pulled up an older version that is working and I'm going through and trying to address the linting issues myself... Partly as a learning exercise so I don't make those goofs going forward. Like I said above, though, there seem to be a number of things that shouldn't be errors, so I'm wondering how I can handle those better (aside from cheating the system by using luacheck: ignore)

take a look at the copies of your scripts in the head branch

Sorry - I also misunderstood. Your luacheck adjustment to that script is fine. I'll delete #661  and wait until the dust has settled for other changes.

The discussions tab is right at the top of the GH UI:

@jwink75 The harp pedals script has lots of issues; you'll see that I addressed some of the low-hanging fruit but then marked the whole script with an ignore hint when I added the stricter rules. I'm happy do do a pair programming session with you and walk through some of what's going on. Please email me and we can set up a time that works for you.

While I appreciate the convention of using an underscore for unused variables in a for iterator, I don't agree with enforcing it in this repo. Aside from being a convention and not a rule, it is a form of programmer's shorthand and shorthand only makes sense if you already know what it means. For those who aren't programmers, but have simply picked up enough knowledge to start writing scripts, it is more intuitive to write them out, easier to understand when returning to it in the future and harmless. We have a variety of contributors with varying backgrounds and experience in programming and I think we need to acknowledge that and work with it.
I'd like the calls to local mixin = require("library.mixin") at the top of each mixin file to be left in. It simplifies editing and costs nothing to have them in since the mixin library is what calls those files in the first place.
Please tag me in future.

@ThistleSifter Thanks for your comments, and sorry I didn't tag you earlier.
I agree about supporting contributors of different levels of experience, but I also think it's worthwhile to nudge them towards better code. What I like about the underscore is that it should be the outcome of a virtuous cycle: write a loop, get a lint warning, realize that the variable isn't used, and acknowledge it as such. The lint warning itself is useful because it tells you that you're not using the variable, and maybe you meant to, in which case you can fix your loop body.
Similarly, I'm not crazy about putting those unused local mixin declarations back in if they're not actually being used -- but if you feel strongly about it I will (along with an ignore hint to make the linter happy).

The discussions tab is right at the top of the GH UI:

i checked again in case I was blind or crazy... The discussions button truly is NOT in my UI!

Have now checked all of my updated scripts in this PR and they're all fine except for:

hairpin_creator.lua: failing to initialise y_current to zero at line 551 results in an error in FCMCustomWindow, as it won’t accept a nil coordinate.
ostinato_maker.lua: does global_dialog need to be global, or is that just if Modeless is in conjunction with RetainLuaState?

@cv-on-hub

Can you see where the error is thrown? It looks to me like y_current is initialized in other places before it is used.
Looking at the version of your script in this branch, you reference global_dialog inside a function here, which implies that the variable needs to be global.

Can you see where the error is thrown?

Yes - you're right. I was testing a slightly different version of the file that needed initialization. This one doesn't.
The global_dialog call at line 319 presumed that the var was global modelled on all of Robert's old Modeless scripts. But it would also work with a local top-level var, and I see that you've changed that var to top-level local on his scripts as well.

@cv-on-hub I did initially change those vars to top-level local, but after discussion with Robert I changed it back to global and added the ignore hint. Either way is fine from a linter point of view. If the var is local then it won't persist across invocations, but it sounds like you may not want that behavior anyway.

@cv-on-hub The global_dialog variables must be global or else they can be collected by lua gc when the script is called again with RetainLuaState.

What I like about the underscore is that it should be the outcome of a virtuous cycle: write a loop, get a lint warning, realize that the variable isn't used, and acknowledge it as such.

Not necessarily. It depends on what's more important to the author: knowing what it is, or knowing whether it's intended to be used. Knowing what it is is more important (you can't decide whether it's needed without first knowing what it is), which is why the underscore only makes sense if you already know what the value is and you're sure you won't need the reminder (revisting old code a year or 2 later can be an eye opening experience, at which point it may as well have been written by someone else) and you're sure someone else won't need the hint either. Naming things is the best form of documentation we have, and I don't agree with forcing people to name things a certain way just to convince a linter of their intentions. Code is primarily meant to be read and understood by people, especially the person who wrote it, and if the author finds a certain way easier to understand and it isn't causing bugs or opening a potential pitfall, I don't see the issue.

but if you feel strongly about it I will (along with an ignore hint to make the linter happy).

Thanks, that would be good.

Okay, @ThistleSifter, I put the mixin references back.
As for the other issue, I think the linter rule about flagging unused variables is very useful. In fact, it helped bring to light at least two bugs in the library (one of which was the one you called out, above). Once the linter has flagged a variable like this, there's no rule that says you have to fix it by changing it to an underscore, although I think in most cases it's the clearest and most expedient; you could also choose to leave the variable in place and satisfy the linter by adding an ignore hint to that line of code.
(I actually agree with just about everything you say in your last comment, especially about readability; it just leads me to a slightly different conclusion!)

I think my stuff is okay. If it isn't, I'll fix it in a future PR.

I just realized there is at least one situation where we have to keep unused variables, and that is the tie.lua library.
Consider this code:
local layer, start_note, end_note = tie.calc_tie_span(note, true, true)

The layer variable may never actually be used in the Lua script, but it is the container for start_note and end_note. So layer is very much under the covers being used by the PDK Framework. It is also keeping the start_note and end_note instances alive. I'm pretty sure it would be acceptiable to change this to
local _, start_note, end_note = tie.calc_tie_span(note, true, true)

But it is something we need to be aware of.

@rpatters1 What do you think? This has been open for a week -- time to merge it?

I've been waiting to merge anything else. lol.

I say we do it… everything I’ve tested seems to work other than the harp wizard, which we commented out and will tackle later. If there are any other problems with my scripts I can always fix later.Sent from my iPhoneOn Jan 30, 2024, at 6:10 PM, rpatters1 @.***> wrote:
I've been waiting to merge anything else. lol.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Is there any way to force all the backlog of PRs to run the lint check before we try to merge them?

Closing and reopening each PR works. I'll take care of it now.


Category search for a local source

This will add the ability to use a category search with a local source object
This will find 'bar' from the following structure
And 'foo' if 'name' is passed in with the searchFields array
source: [
  {
    name: 'Foo',
    results: [
      { title: 'bar' },
    ],
  },
],

I've implemented this in next with a different algorithm. I'm a bit sheepish about adding any recursion in clientside js.


Clarity of Headers on My Organizations Page

From this page, an admin may be confused about when member is added. With the current wording, Admins might be expect an invite email to be sent after clicking "Add Member", when it happens after they click "Send Invites".

My suggestion: Change the headers

“My organization” (on navigation bar) → “Bulk Registration”
“Add Member” → “Add Member to Queue”
“Recently Invited” → “Queue”

Hm I would keep it as "My organization"
But yes I agree with the "Add member to queue"
and then the table should be called "Invite Queue"

That should do it. Kept it as "My Organization" but changed the others to "Add Member to Queue" and "Invite Queue"


ImportError: No module named streamhtmlparser

# python -V
Python 2.7.3

# python Proxy.py
Traceback (most recent call last):
  File "./Proxy.py", line 38, in <module>
    from Page import Page
  File "/mnt/work/python/swiperproxy/Page.py", line 23, in <module>
    from streamhtmlparser import *
ImportError: No module named streamhtmlparser

No details about installing streamhtmlparser in either Quickstart or Sysadmin pages.

Quickstart lists streamhtmlparser as a dependency:

streamhtmlparser, 0.1 or higher

It also has the instructions for compiling:

Compile streamhtmlparser and its Python module:
$ cd /opt/SwiperProxy/swiperproxy/include/streamhtmlparser
$ ./configure
$ make
$ make install
$ cd src/py-streamhtmlparser
$ make
$ make install


Update QUnit

The last commit (cccf688) is not necessary to turn this project compatible with QUnit 2.0.0, but that adds an extra update to avoid future deprecations.

@arschmitz, please accept this pull request and publish the new package version.

I some how missed this when it was opened ill review and release asap


For completeness

Just for completeness, here are the links for the IE6 machines running with Windows XP. The files are still on the Microsoft servers.
https://az412801.vo.msecnd.net/vhd/VMBuild_20141027/VirtualBox/IE6/Linux/IE6.XP.For.Linux.VirtualBox.zip.001
https://az412801.vo.msecnd.net/vhd/VMBuild_20141027/VirtualBox/IE6/Linux/IE6.XP.For.Linux.VirtualBox.zip.002

Thanks @EricCote - well spotted, I'll get these added!
Pete

Thanks again @EricCote have confirmed and added as part of ecf79e202fe99a788a10d8215a304b21d182500a.


Corrected Bitcoin Symbol

The symbol mapped to BTC was the same as THB (Thai Baht). This utilizes the correct unicode symbol for BTC. Resolves #49.

@elkirkmo thanks, just merged https://github.com/bengourley/currency-symbol-map/pull/50 🙂

@elkirkmo thanks, just merged https://github.com/bengourley/currency-symbol-map/pull/50 🙂


[BUG] Event feed close before days not working

Describe the bug
If event is set to close before a certain amount of days the SEA REST API feed does not reflect that numbered closure correctly. The feed needs to use the new isEventClosed method in the shared class. This will use the formula field on the instance that calculates close time and date rather than the inline code in the feed that is currently being used.

Included in beta release <IP_ADDRESS>

Included in production release <IP_ADDRESS>