chore: use a caching install

https://github.com/baptiste0928/cargo-install caches the binary after compilation, for speed of repeated execution

Cool thanks


Use "regex" library from PyPI to build GLOBAL_SENTENCE_TERMINATORS regex

Fixes #3

This is analogous to sentencex-js/pull/3 — both remove the terminators codepoint list module, and instead use an external library that tracks the Unicode Character Database.

Hi @divec,
Sorry for delay in review. Holidays..
All the tests are passing with this pull request, but I noticed a performance regression. Running accuracy.py in the benchmarks folder of this repo gives the following measures

Using re package and terminatorsy.py(master version) : 0.75 seconds (Avg over 100 runs )
This pull request that uses regex package : 1.83 seconds (Avg over 100 runs )

So that is more than two times the master version.  Since the original issue is only with sentence terminator regex and not with other regex usage, I tried to apply a minimal patch:
diff --git a/sentencex/base.py b/sentencex/base.py
index a2218e6..e2c0bde 100644
--- a/sentencex/base.py
+++ b/sentencex/base.py
@@ -1,4 +1,5 @@
 import re
+import regex
 from typing import Dict, Iterator, Tuple

 from .terminators import GLOBAL_SENTENCE_TERMINATORS
@@ -44,7 +45,7 @@ class Language(object, metaclass=Languages):

     language = "base"
     abbreviations: set = set()
-    GLOBAL_SENTENCE_BOUNDARY_REGEX = re.compile(r"[%s]+" % "".join(GLOBAL_SENTENCE_TERMINATORS))
+    GLOBAL_SENTENCE_BOUNDARY_REGEX = regex.compile(r"\p{Sentence_Terminal}+")
     quotes_regx_str = r"|".join([f"{left}(\n|.)*?{right}" for left, right in quote_pairs.items()])
     quotes_regex = re.compile(r"%s+" % quotes_regx_str)
     parens_regex = re.compile(r"([\(（<{\[])(?:\\\1|.)*?[\)\]}）]")

Then I got 1.37 seconds-  which is better, but still a regression in performance.
Maintaining an in-library collection of these characters helped us to achieve a javascript counterpart. So the zero dependency for this library was an intentional decision. What if we fix the amaharic issue and the comment issue you pointed out and keep the zero dependency pattern as such?

The terminators collection was originally sourced from wikinlp tools repo. I re-ran unichars program and I don't see these Amharic/Ethiopic chars in it. That must be a descrepancy in the list.
https://gist.github.com/santhoshtr/af560fde46b7ee56ed14fd3f6614de01
However, sometimes we need additional characters. For example, horizontal ellipsis is not in the list.

Thanks @santhoshtr. If we maintain the list of terminators within sentencex, then we probably also need to maintain the list of close punctuation and spaces in order to expose boundary information:

Value
Represents

SATerm
(STerm | ATerm)

STerm
Sentence_Terminal = Yes

ATerm
U+002E ( . ) FULL STOP  U+2024 ( ․ ) ONE DOT LEADER  U+FE52 ( ﹒ ) SMALL FULL STOP  U+FF0E ( ． ) FULLWIDTH FULL STOP

Close
General_Category = Open_Punctuation, or  General_Category = Close_Punctuation, or  Line_Break = Quotation  and not U+05F3 ( ׳ ) HEBREW PUNCTUATION GERESH  and ATerm = No  and STerm = No

Sp
U+0085 NEXT LINE (NEL)  U+2028 LINE SEPARATOR  U+2029 PARAGRAPH SEPARATOR

The master copy of these lists is available in https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/SentenceBreakProperty.txt , which we pull into UnicodeJS using an extraction script that might be useful to borrow from, if you decide that maintaining these lists within sentencex is worthwhile for the performance boost.


Allow specifying device-vmservice-port and host-vmservice-port

Description
--host-vmservice-port supersedes --observatory-port which is now soft-deprecated. --device-vmservice-port applies a filter to the observatory discovery process.
WIP due to phrasing and tests

Still not ready I guess, my bad!


Mat/Pat - Add name of applicant in form name

Acceptance Criteria

[x] Mat/Pat forms should be named as "Maternity and parental leave form for applicant name" in draft forms and submitted forms

@bhumin-fw the name should be "Maternity and parental leave form for applicant name" NOT "Maternity, parental and pre-placement adoption for applicant name"
cc: @ayushdamani

@fazil-ey form name was already set.
If "Maternity and parental leave form" is the updated on I can apply that. Or need to inform Chris or Andrew to make sure that existing name is not used anywhere so far.

This has been updated ✅

name of form is correct in draft & submitted. Includes applicant name.

.


使用typescript，移除babel。

使用 jake ，tslint，tsc 等等。。

This change is

Review status: 0 of 16 files reviewed at latest revision, 1 unresolved discussion.

package.json, line 25 [r1] (raw file):

  "homepage": "https://github.com/gyrosworkshop/Wukong#readme",
  "devDependencies": {
    "jake": "latest",

为啥在这里用jake？

Comments from Reviewable

Review status: 0 of 16 files reviewed at latest revision, 1 unresolved discussion.

package.json, line 25 [r1] (raw file):
Previously, richard1122 (richard) wrote…
> 为啥在这里用jake？

Jake 挺好用的，ts 的项目就在用。

Comments from Reviewable

Review status: 0 of 16 files reviewed at latest revision, 1 unresolved discussion.

package.json, line 25 [r1] (raw file):
Previously, richard1122 (richard) wrote…
> Jake 挺好用的，ts 的项目就在用。

为啥用latest最新版？会不会有cli的API变更之类的

Comments from Reviewable

Review status: 0 of 16 files reviewed at latest revision, 1 unresolved discussion.

package.json, line 25 [r1] (raw file):
Previously, Senorsen (Zhang Sen) wrote…
> 为啥用latest最新版？会不会有cli的API变更之类的

我改成具体版本号吧

Comments from Reviewable

Looks good
Previously, mention-bot wrote…
> By analyzing the blame information on this pull request, we identified @Senorsen to be a potential reviewer

Review status: 0 of 16 files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

Reviewed 16 of 17 files at r1, 1 of 1 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Problem with WDIO v4

I want to use your blueimp/wdio solution to execute WDIO tests in an own project, because I like this solution and it is really easy to use, also in combination with Jenkins. So, I’ve tried to make it useful for my project, but I have an issue with it and hope you can help me or can give me some recommendations :)))
So, what did I do:

I copied the Dockerfile, docker-compose.yml and chrome.js to my own project
I updated all these files and built an own docker image
Dockerfile extended with some more tools and my own package.json as base for the npm install
updated docker-compose.yml that uses my own docker image
updated chrome.js

Now the problem is that it is not running with my own docker image based on the updated Dockerfile. The difference between your project https://github.com/blueimp/wdio and my project is the WDIO version. You are using WDIO v5 and we are still using WDIO v4. Maybe that could be the reason.
When I try to start a simple test (via docker-compose run --rm wdio chrome.js --spec=test/google.js), that only opens the google page, then it’s really fine while using your docker image (with WDIO v5) in docker-compose.yml. But when I’m using my docker image (with WDIO v4) then I get this error:
grme:web-client-uat GRme$ docker-compose run --rm wdio chrome.js --spec=test/google.js
Starting web-client-uat_chromedriver_1 ... done
Starting web-client-uat_geckodriver_1  ... done
Waiting for host: chromedriver:4444 ... ok
Waiting for host: geckodriver:4444  ... ok
ERROR: connect ECONNREFUSED <IP_ADDRESS>:4444
chrome
    at new RuntimeError (/usr/lib/wdio/node_modules/webdriverio/build/lib/utils/ErrorHandler.js:143:12)
    at Request._callback (/usr/lib/wdio/node_modules/webdriverio/build/lib/utils/RequestHandler.js:342:43)
    at self.callback (/usr/lib/wdio/node_modules/request/request.js:185:22)
    at Request.emit (events.js:198:13)
    at Request.EventEmitter.emit (domain.js:448:20)
    at Request.onRequestError (/usr/lib/wdio/node_modules/request/request.js:881:8)
    at ClientRequest.emit (events.js:203:15)
    at ClientRequest.EventEmitter.emit (domain.js:448:20)
    at Socket.socketErrorListener (_http_client.js:392:9)
    at Socket.emit (events.js:198:13)

The big problem is that we are not able to switch to WDIO v5 in a fast way because therefore we have to do a refactoring that will take a lot of time and I’m the only testautomation guy at the moment ;) So, I try to make it runnable also with WDIO v4.

RUN npm install \
  && npm audit fix \
  && rm -rf \
    /tmp/* \
    /root/.npm
ENV NODE_PATH=/usr/lib/wdio/node_modules
ENV PATH=$PATH:/usr/lib/wdio/node_modules/.bin
COPY bin/wait-for-hosts.sh /usr/local/bin/wait-for-hosts
RUN chmod 777 /usr/local/bin/wait-for-hosts
RUN chmod 777 -Rf ${NODE_PATH}
RUN adduser -D -u 1000 wdio
USER wdio
WORKDIR /opt
ENTRYPOINT ["wait-for-hosts", "--", "wdio"]

This is my package.json (with WDIO v4):
{
  "name": "webdriverio",
  "version": "1.3.0",
  "description": "Automated Testing (End2End, Rest API)",
  "main": "index.js",
  "dependencies": {
    "asserts": "4.0.2",
    "dotenv": "8.1.0",
    "fetch": "1.1.0",
    "html2json": "1.0.2",
    "json-query": "2.2.2",
    "json-to-html-form": "1.7.0",
    "mochawesome-report-generator": "3.1.5",
    "moment": "2.24.0",
    "promise": "8.0.3",
    "replace-in-file": "4.1.3",
    "request": "2.88.0",
    "request-promise": "4.2.4",
    "swagger-walk": "github:paulvollmer/swagger-walk",
    "wdio-screen-commands": "2.10.0",
    "webdriverio": "4.14.4"
  },
  "devDependencies": {
    "chai": "4.2.0",
    "chromedriver": "latest",
    "config": "3.2.2",
    "eslint": "6.4.0",
    "eslint-config-google": "0.14.0",
    "find": "0.3.0",
    "frisby": "2.1.2",
    "fs-extra": "8.1.0",
    "geckodriver": "latest",
    "hippie-swagger": "3.2.0",
    "jest": "24.9.0",
    "jest-html-reporter": "2.6.2",
    "jest-junit": "8.0.0",
    "jshint": "2.10.2",
    "mocha": "6.2.1",
    "mochawesome": "4.1.0",
    "scripty": "1.9.1",
    "selenium-server-standalone-jar": "3.141.59",
    "selenium-standalone": "6.16.0",
    "supertest": "4.0.2",
    "wdio-allure-reporter": "0.8.3",
    "wdio-chromedriver-service": "5.0.2",
    "wdio-firefox-profile-service": "0.1.3",
    "wdio-junit-reporter": "0.4.4",
    "wdio-mocha-framework": "0.6.4",
    "wdio-mochawesome-reporter": "2.0.1",
    "wdio-sauce-service": "0.4.14",
    "wdio-selenium-standalone-service": "0.0.12",
    "wdio-spec-reporter": "0.1.5",
    "winston": "3.2.1",
    "xunit-viewer": "5.1.11",
    "yargs": "14.0.0"
  },
  "prettier": {
    "arrowParens": "always",
    "bracketSpacing": true,
    "singleQuote": true,
    "trailingComma": "all",
    "printWidth": 100
  },
  "scripts": {
    "prepare-on-unix": "chmod -Rf 777 ./scripts/ && chmod -Rf 777 ./scripts-win/ && dos2unix ./scripts/* && unix2dos ./scripts-win/*",
    "clear-screenshots": "scripty",
    "test": "scripty",
    "npm-test": "scripty",
    "clear-test": "scripty",
    "clear-npm-test": "scripty",
    "postResults": "scripty",
    "test-postResults": "scripty",
    "clear-test-postResults": "scripty",
    "generateMochawesome": "scripty",
    "npm-install-and-run-all-rest-tests": "scripty",
    "npm-install-and-run-rest-tests": "scripty",
    "run-all-rest-tests": "scripty",
    "run-rest-tests": "scripty",
    "analyze-report-for-exit-code": "scripty"
  },
  "author": "Martin"
}

This is my chrome.js (WDIO config file):
'use strict';

exports.config = Object.assign({}, require('./hooks'), {
  hostname: 'chromedriver',
  path: '/',
  capabilities: [
    {
      // Set maxInstances to 1 if screen recordings are enabled:
      // maxInstances: 1,
      browserName: 'chrome',
      'goog:chromeOptions': {
        // Disable headless mode if screen recordings are enabled:
        args: ['--headless', '--window-size=1440,900']
      }
    }
  ],
  logLevel: 'error',
  reporters: ['spec'],
  framework: 'mocha',
  mochaOpts: {
    timeout: 60000
  },
  specs: ['test/**/*.js'],
  maximizeWindow: true,
  screenshots: {
    saveOnFail: true
  },
  videos: {
    enabled: false,
    resolution: '1440x900',
    startDelay: 500,
    stopDelay: 500
  },
  assetsDir: '/home/webdriver/assets/',
  mailhog: {
    host: 'mailhog'
  }
});

And finally this is my docker-compose.yml:
version: '3.7'
services:
  chromedriver:
    image: blueimp/chromedriver
    init: true
    tmpfs: /tmp
    environment:
      - DISABLE_X11=false
      - ENABLE_VNC=true
      - EXPOSE_X11=true
    volumes:
      - ./assets:/home/webdriver/assets:ro
    ports:
      - <IP_ADDRESS>:5900:5900
  geckodriver:
    image: blueimp/geckodriver
    init: true
    tmpfs: /tmp
    shm_size: 2g
    environment:
      - DISABLE_X11=false
      - ENABLE_VNC=true
      - EXPOSE_X11=true
    volumes:
      - ./assets:/home/webdriver/assets:ro
    ports:
      - <IP_ADDRESS>:5901:5900
  wdio:
    #image: blueimp/wdio:latest
    image: myimage:latest
    init: true
    #read_only: true
    tmpfs:
      - /tmp
      - /home/wdio/.android
    environment:
      - WAIT_FOR_HOSTS=
          chromedriver:4444
          geckodriver:4444
      - WINDOWS_HOST
      - ANDROID_SERIAL
      - PLATFORM_VERSION
      - DEVICE_NAME
      - ORIENTATION
      - MACOS_ASSETS_DIR=$PWD/assets/
      - WINDOWS_ASSETS_DIR
    volumes:
      - .:/opt
      #- ./reports:/opt/reports
    depends_on:
      - chromedriver
      - geckodriver

Maybe you have some recommendations or tips for me what I can do to make it runnable for me.
It would be very, very cool and you would make me really happy :))) I hope I will get an answer from you.

When I replace all the WDIO v4 packages in package.json with WDIO v5 packages then the simple test is running. So, it is really because of the WDIO version. Is there any chance to make it runnable with WDIO v4?

Hi @GRme ,
unfortunately this project has never been tested with wdio@v4; the first version already used wdio@v5.
However the bug might simply be due to the config not properly setting the address of the selenium server.
The following line from your error output shows that wdio tries to connect to localhost, but the chromedriver is running on a different host (chromedriver):
ERROR: connect ECONNREFUSED <IP_ADDRESS>:4444

So if you can find out what the difference is between setting the selenium server address in wdio v4/v5, you might be able to fix this problem.

Hey @blueimp,
thanks for your answer. I have pimped my configs. My base wdio config is the following:
const argv = require('yargs').argv;
const chai = require('chai');
const assert = chai.assert;
const timeData = require('./helpers/timeData');

// Set the capabilities
let capabilities = [
  {
    maxInstances: 3,
    browserName: 'chrome',
    chromeOptions: {
      args: ['--start-maximized']
    }
  },
];

if (argv.browser) {
  // dynamically build out the capabilities
  const browsers = argv.browser.split(',');
  capabilities = browsers.map(browserName => {
    return { browserName };
  });
}

exports.config = {
  specs: [
    'test/**/*.js'
  ],
  suites: {
    adminTest: [
      './test/my-Profile.js',
    ]
  },
  // Patterns to exclude.
  exclude: [
    'test/data-quality.js', //at present data quality data has been removed.
  ],
  argv.maxInstances ? argv.maxInstances : 3,
  capabilities,
  sync: true,
  logLevel: 'error',
  coloredLogs: true,
  bail: 0,
  screenshotPath: './reports/errorShots/',
  baseUrl: process.env.BASE_URL,
  waitforTimeout: 60000,
  connectionRetryTimeout: 90000,
  connectionRetryCount: 3,
  framework: 'mocha',
  reporters: ['spec', 'mochawesome'],
  mochawesomeOpts: {
    includeScreenshots: true,
    screenshotUseRelativePath: true
  },
  reporterOptions: {
    outputDir: './reports/',
    includeScreenshots: true,
    screenshotUseRelativePath: true,
    mochawesome_filename: 'report.json'
  },
  mochaOpts: {
    ui: 'bdd',
    timeout: 999999999
    //retries: 2
  },
  before: function(capabilities, specs) {
    browser.addCommand('shadowDomElement', function async(selector) {
      try {
        return Promise.resolve(
          this.execute(function(selectors) {
            if (!Array.isArray(selectors)) {
              selectors = [selectors];
            }

            function findElement(selectors) {
              var currentElement = document;
              for (var i = 0; i < selectors.length; i++) {
                if (i > 0) {
                  currentElement = Polymer.dom(currentElement.root);
                }
                currentElement = currentElement.querySelector(selectors[i]);

                if (!currentElement) {
                  break;
                }
              }
              return currentElement;
            }

            if (!(document.body.createShadowRoot || document.body.attachShadow)) {
              selectors = [selectors.join(' ')];
            }
            return findElement(selectors);
          }, selector)
        );
      } catch (error) {
        assert.strictEqual(true, false, `shadowDomElement() failed for element selector '${selector}' (error message: ${error}).`);
      }
    });
  },

  afterTest: function (test) {
    if (test.passed == false) {
      browser.saveScreenshot(`./reports/errorShots/ERROR_screenshot_${timeData.orderedTimestamp}.png`);
    }
  }
};

And this is my updated specific WDIO config based on the basic one. this one I'm using to execute the tests:
// require prod configuration
var prodConfig = require('../wdio.conf.js').config;

// clone prod config and add new properties/overrides
var localConfig = Object.assign(prodConfig, {
  hostname: 'chromedriver',
  path: '/',
  capabilities: [
    {
      maxInstances: 1,
      browserName: 'chrome',
      exclude: [
        'test/multipleAssets-dwb.js' // has to be refactored in detail at first!
      ],
      'goog:chromeOptions': {
        args: ['--headless', '--window-size=1440,900']
      }
    }
  ]
});

exports.config = localConfig;

And now I'm getting another error:
[chrome  linux #0-0] Spec: /opt/test/footer-links.js
[chrome  linux #0-0] Running: chrome on linux
[chrome  linux #0-0]
[chrome  linux #0-0] footer-links.js: footer links accessibility test for user: 000000001 @toRefactor @noFirefox
[chrome  linux #0-0]    ✖ "before all" hook
[chrome  linux #0-0]    ✖ "after all" hook
[chrome  linux #0-0]
[chrome  linux #0-0] 2 failing (1m 47.6s)
[chrome  linux #0-0]
[chrome  linux #0-0] 1) footer-links.js: footer links accessibility test for user: 000000001 @toRefactor @noFirefox "before all" hook
[chrome  linux #0-0] directory (/opt/reports/errorShots) doesn't exist
[chrome  linux #0-0] Error: directory (/opt/reports/errorShots) doesn't exist
[chrome  linux #0-0]     at before (/opt/test/footer-links.js:40:15)
[chrome  linux #0-0]
[chrome  linux #0-0] 2) footer-links.js: footer links accessibility test for user: 000000001 @toRefactor @noFirefox "after all" hook
[chrome  linux #0-0] b.waitForVisible is not a function
[chrome  linux #0-0] TypeError: b.waitForVisible is not a function
[chrome  linux #0-0]     at Header.waitUntilNotvisible (/opt/objects/header.js:37:7)
[chrome  linux #0-0]     at Header.logout (/opt/objects/header.js:31:10)
[chrome  linux #0-0]     at after (/opt/test/footer-links.js:46:12)

To me it seems to be that it is a WDIO v5 conflict. b.waitForVisible() is a WDIOv4 function and is not existing anymore in WDIOv5. But I'm not using WDIO v5.
Do you have any more suggestions? But maybe I have to switch to WDIO v5 even though it will be a great effort...

Hey @blueimp,
thanks for your answer. Normally the hostname is relevant to set the driver server. and the driver server is chromedriver in that case, doesn't matter if WDIO v4 or v5 is used. But maybe I have to migrate to WDIO v5, even though it will be a great effort ;)

Sorry, I think I didn't explain properly what I meant with the difference between the wdio versions.
From your error log of wdio, we can see the following line:
ERROR: connect ECONNREFUSED <IP_ADDRESS>:4444

wdio tries to connect to the selenium server (chromedriver in our case) on the address <IP_ADDRESS>:4444, which would be in the same container.
However the selenium server is running in a separate container and only available at the address chromedriver:4444.
This leads to my assumption that there might be a difference in how the different wdio versions configure the selenium server address.
Looking at the v4 WebdriverIO documentation, the config for the selenium host is indeed different from the one for version 5 (see current (v5) WebdriverIO documentation).
The config property for the selenium server address in WebdriverIO:

v4: host
v5: hostname

So to fix the connection issue, you'll have to set the following:
host: 'chromedriver'

hey @blueimp, thanks a lot. now I'm a step further.


Update example with firebase auth

Update readme to reflect changes in Firebase console and fix any outdated instructions.
Remove references to obsolete database url for Firebase client config
Add sessions folder to prevent errors on first run

By using the default file location for session-file-store the sessions are stored in the locally in the project's sessions subfolder. I've added that folder using .gitkeep to avoid the server printing errors when first started.

@technoplato I personally haven't run this example in my environment, examples are mainly developed by the community. If it doesn't work open up an issue or a PR to fix it 🙏

@lfades I am doing just that. Just having to learn a little bit as I was trying to use this as a basis for learning in itself. I'll keep working on will post any relevant PRs, certainly.

@technoplato 	@lfades 	I think I had it working with 2.0 but I'm not 100% sure since I moved away from this approach shortly after.
I moved to using firebase session cookies after this, which seems to be a better solution, but also ditched that after realizing that the server side auth related things were unnecessary for my app. I remember I also had trouble deploying to Now.sh because of incompatibilities between SSR and the firebase web SDK, so eventually I gave up and went with the most basic solution of not using server side auth at all. But that might not be an option for you...
Below you'll find the code I used for the server using firebase session cookies before I ditched server side auth all together. Hope it's helpful to someone.
import express from "express";
import bodyParser from "body-parser";
import cookieParser from "cookie-parser";
import next from "next";
import admin from "firebase-admin";

require("dotenv").config();

const port = parseInt(process.env.PORT || "3000", 10);
const dev = process.env.NODE_ENV !== "production";
const app = next({ dev });
const handle = app.getRequestHandler();

const firebase = admin.initializeApp();

app
  .prepare()
  .then(() => {
    const server = express();

    server.use(bodyParser.json());
    server.use(cookieParser());

    server.post("/api/sessionLogin", async (req, res) => {
      if (!req.body) return res.sendStatus(400);

      const idToken = req.body.idToken.toString();

      // @TODO add CSRF token check
      // https://firebase.google.com/docs/auth/admin/manage-cookies

      const expiresIn = 604800000; // week
      try {
        const sessionCookie = await firebase
          .auth()
          .createSessionCookie(idToken, { expiresIn });

        // Set cookie policy for session cookie.
        const options = {
          maxAge: expiresIn,
          httpOnly: true,
          secure: true
        };
        res.cookie("session", sessionCookie, options);
        res.json({ status: "success" });
      } catch (err) {
        res.status(401).send("UNAUTHORIZED REQUEST!");
      }
    });

    server.post("/api/sessionLogout", (req, res) => {
      res.clearCookie("session");
      res.json({ status: "success" });
    });

    /**
     * First handle the public routes that do not require auth session check
     */
    server.get("/", (req, res) => {
      return handle(req, res);
    });

    server.get("/login", (req, res) => {
      return handle(req, res);
    });

    server.get("/_next/*", (req, res) => {
      return handle(req, res);
    });

    /**
     * Then a catch all for the remaining routes which all require auth
     */
    server.get("*", (req, res) => {
      const sessionCookie = req.cookies.session || "";

      admin
        .auth()
        .verifySessionCookie(sessionCookie, true)
        .then(decodedClaims => {
          console.log("decodedClaims", decodedClaims);
          /**
           * @TODO check if user is admin using claims
           */
          return handle(req, res);
        })
        .catch(() => {
          // console.error(error.message);
          console.log("Failed to verify session cookie, redirect to login");
          // Session cookie is unavailable or invalid. Force user to login.
          res.redirect("/login");
        });
    });

    server.listen(port, err => {
      if (err) throw err;
      console.log(`> Ready on http://localhost:${port}`);
    });
  })
  .catch(err => console.error(err));


router-nginx-status currently is public accessible if enabled

Currently the router-nginx-status can be accessed publicly. According to 4368, now we have to flag to enable or disable it.
My question is if enabled, how can I access it only locally?
Can we move the
server {
    listen 80 default_server reuseport proxy_protocol;
    ...
    location /router-nginx-status {
        vhost_traffic_status_display;
        vhost_traffic_status_display_format html;
    }
}

to
server {
    listen 9090 default_server;
    location /router-nginx-status {
        vhost_traffic_status_display;
        vhost_traffic_status_display_format html;
    }
}

since 9090 is only accessible internally by ELB.
Or create a flag to enable publicly or only internally.

@zhaohanweng-- not a bad idea.  Moving it to the "default_server" vhost that's listening on 9090 would be good because that vhost never uses PROXY protocol-- which would be important if you were looking to hit that endpoint from within the cluster.
If a user opts into exposing the endpoint outside the cluster, then I believe this location block should appear on the "default_server" for both ports 80 and 9090.
Further, there's never any guarantee that port 9090 isn't exposed to the outside world.  It can be, depending on what modifications a user might make to their load balancer.  As such, it might be good to actually lock that location block down to access only by <IP_ADDRESS> using the allow directive-- at least in the case where a user has not opted into exposing it.  (Tangent: we've done something similar in v2.  We never expose it to the outside world, but we make it available only from within the same pod since we run an agent that hits that endpoint to collect these metrics.)
I like this idea, but I think it gets triaged pretty low since we are in full swing on v2 development right now.  I'm going to mark this issue as "help wanted," so if you might like to take a crack at this, please feel free.

removed in v2.

@bacongobbler this was initially removed from v2, but at one point, it appeared it was needed to help in metrics collection, so it was  added back in and exposed only internally. The /stats endpoint allows only requests originating from <IP_ADDRESS>.


Threshold should be compared against a relative value rather than an absolute value

Is the feature request related to a problem
Comparing the defined threshold against the AbsoluteError property of the comparison result doesn't make much sense since the absolute error value can greatly vary depending on the size of the image.
Describe the solution
Comparing the threshold against either MeanError or PixelErrorPercentage (or even both) would be preferable.
Open question: should backward compatibility with the current implementation be maintained or can I completely rewrite the methods that take int threshold = 5 into methods that take double meanErrorThreshold = 0, double pixelErrorPercentageThreshold = 0 instead?
Describe alternatives considered
N/A
Additional context
After upgrading the rendering engine that produces image I wanted to useVerify.ImageSharp.Compare to ensure that the new engine was producing similar enough images as the previous version. Some images were fine (AbsoluteError == 0) but for some other there was some slight differences that could be easily ignored. It would be possible to quantify those differences as a percentage, but not as an absolute value.

happy to do a major with no back compat. so if u have time do fo a PR, go for it


Rough, data-complete schema for form

Definition of done for this PR is whether we can create the CSV after this form is filled out (minus price total). We can fix form ergonomics and make edits to this years' registration procedure in subsequent PRs.
Is each column in the CSV producable from the form schema?

[x] _submission_id
[x] _submission_time
[x] 16825792-first
[x] 16825792-last
[x] 16825793 Address
[x] 17016397 City
[x] 17016398 State/Province
[x] 17016399 Zipcode or Postal Code
[x] 16994538 Country
[x] 16825794 Phone
[x] 16825795 Email
[x] 16842365 How did you hear about Lark Camp?
[x] 16842420 Comments
[x] 16876173 How Many People Are You Registering For
[x] 16825796 Payment Type
[x] 16842442 Quantity Parking Passes Discount Price
[x] 16842475 Quantity Parking Passes Full Price
[x] 16842478 Who Gets The Parking Pass(es)?
[x] 16842487 MAKE A NON-TAX DEDUCTIBLE DONATION
[x] 16947955 Friends Of The Woodlands
[ Camper Info  ]
[x] 16825797-first
[x] 16825797-last
[x] 16825798 Address
[x] 17016409 City
[x] 17016417 State/Province
[x] 17016418 Zipcode or Postal Code
[x] 16994462 Country
[x] 16825799 Phone
[x] 16825800 Email
[x] 16937965 Gender
[x] 16937981 If registrant is under 18 please note age here.
[x] 16937985 I want to be lodged in:
[x] 16937989 Lodging Preference:
[x] 16937993 Who would you like to be in a cabin with? Let u...
[x] 16937999 If you are tent or vehicle camping who will be ...
[x] 16992085 TENTING AREA PREFERENCE
[x] 16938020 Length Of Stay:
[x] 16826311 Registrant One Tuition Discount Price
[x] 16937824 Registrant One Tuition Full Price
[x] 16937875 Registrant One Meals Discount Price
[x] 16937914 Registrant One Meals Full Price
[ ] 16938033 If you are purchasing meals at this time please...
[ 5 more copies of the above Camper info cols ]
[x] 16938088 Tshirt Small Discount Price
[x] 16938148 Tshirt Medium Discount Price
[x] 16947413 Tshirt Large Discount Price
[x] 16947415 Tshirt EX Large Discount Price
[x] 16947417 Tshirt 2EX Large Discount Price
[x] 16947445 Sweatshirt Small Discount Price
[x] 16947501 Sweatshirt Medium Discount Price
[x] 16947506 Sweatshirt Large Discount Price
[x] 16947551 Sweatshirt EX Large Discount Price
[x] 16947555 Sweatshirt 2EX Large Discount Price
[x] 16938093 Tshirt Small Full Price
[x] 16938156 Tshirt Medium Full Price
[x] 16947428 Tshirt Large Full Price
[x] 16947431 Tshirt EX Large Full Price
[x] 16947434 Tshirt 2EX Large Full Price
[x] 16947564 Sweatshirt Small Full Price
[x] 16947832 Sweatshirt Medium Full Price
[x] 16947836 Sweatshirt Large Full Price
[x] 16947837 Sweatshirt EX Large Full Price
[x] 16947838 Sweatshirt 2EX Large Full Price
[ ] 16825808 Total Cost (This will come w/ pricing function)
[x] 16947905 This box must be ticked...ting your registration.
[x] 16947944 If you intend on vehicle camping, please tell u..

Agreed, this is just the first PR in case it's not obvious :)
Resend the email? I'm not sure I got it yet.


Curious about the experimental stability？

I modified the model and evaluation codes to train and test on the NEXT-QA dataset. However, there is about a 1% point fluctuation in the results during each training run. Are the experimental results stable during the training process? I suspect this variability might stem from certain parameter settings of the large language model (LLM). Do you have any empirical suggestions to address this issue? Thank you!

Hello, for the 1% point fluctuation of the results, are those for the testing dataset or training dataset?

Sorry, I re-ran your code and the result is stable. There were some bugs
before. Thanks for your reply!
Bo He @.***> 于2024年5月29日周三 22:30写道：

Hello, for the 1% point fluctuation of the results, are those for the
testing dataset or training dataset?
—
Reply to this email directly, view it on GitHub
https://github.com/boheumd/MA-LMM/issues/18#issuecomment-2137560586, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AMR5ZOKGNY3AV55W6KY6VCTZEXQ6XAVCNFSM6AAAAABIKLSHPGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZXGU3DANJYGY
.
You are receiving this because you authored the thread.Message ID:
@.***>


Support osx via gtimeout

Hey @pasupulaphani
You can use the Wait4X, It's already compatible with OSX amd64 and arm64.
https://github.com/atkrad/wait4x/releases


Add click tracking for more detailed user analytics

What clicks should we track? @kjetilhau @AreWiv @ken-mellem


Parallelize chunk metadata fetch

Fetching the chunk metadata (particularly when the data hasn't been catched)
can be time consuming when doing a walk operation on a ts dir. Speed things up
by using a separate go routine to fetch each chunk's metadata in a ts dir.
Part of #2017

I did a quick perf run on this. Not as impressive as I would have hoped. I ingested the corelight dataset into s3 with a thresh of 1MiB. This resulted in the average tsdir having around 5 chunks per.
For a benchmark I tested the time to it took to run zar stat on the ingested lake.

On my macbook with my slowish internet master ran at around 27 secs while this branch ran at 20 seconds
On a t2.medium (2 virtual cpus) ec2 instance there was no distinguishable difference between the two branches
On a t2.2xlarge (8 cps) ec2 instance master ran at ~ 5 seconds and this branch was ~ 4 seconds.

Not a huge difference. I'm guessing we'll need more chunks in a tsdir to see a greater benefit.


Improve multipart limits test

The PR introducing this test assumed time would be enough to accurately predict behavior. This commit changes it to using introspection to check the exact state of the parser and expected state once finished parsing a multipart request body. To accomplish that it was required to make the cursor in the file an object property, so it can be inspected using reflection.

Done worse and done better, not proud of it but gets the job done :vulcan_salute: .


Jobs not processed for first time in artisan tinker

Laravel Version: 5.5.34
PHP Version:  7.1.7

Description:
When using artisan, the job doesn't dispatch the first time I call TestJob::dispatch() but does so in subsequent calls. This is the case for both the queue worker php artisan queue:worker and horizon php artisan horizon
Steps To Reproduce:
Run artisan tinker and dispatch a job. The queue worker doesn't process it. If you try to dispatch the job again, it will be processed.

I found a similar issue in laravel/tinker#28 with the solution to instead run Bus::dispatch(new TestJob()) or Queue::push(new TestJob()). As one of the users said, it would be nice to have a warning in the docs for queues.

The issue is that tinker will keep the generated PendingDispatch object in memory, to supposedly allow the user to use it in subsequent commands. The Job will be truly dispatched when that object is destroyed. https://github.com/laravel/tinker/issues/28#issuecomment-530473307 recommends to use ->__destruct() on the returned object to force destroying the object and thus dispatch the job, however I noticed that would make the job dispatch twice for some reason.
My simple "solution" is to simply add another statement after the job dispatch, to force tinker destroy the PendingDispatch object:
App\Jobs\MyJob::dispatch()->onConnection('redis');1; , notice the ;1; at the end

Oh my goodness... I lost a few hours because of this issue. I finally realized it was a Tinker issue. @DragosMocrii 's solution didn't seem to work. I finally solved it by putting the ::dispatch in a Laravel command and just ran the command, ie not using Tinker.

Laravel 9, 2022, the ";1;" suffix worked for me, after much head scratching.
Even bringing up tinker, dispatching once, then exiting tinker failed to add the job to the queue. That seems to be new for Laravel 9 - never seen that in 8. I guess tinker does not (or no longer does, or can't) handle the dispatching of the last job in its process shut-down.

Thanks so much for the ';1;' suggestion. Spent many hours figuring out why manual dispatching wasn't working, while dispatchSync was working just fine and all scheduled jobs were also working just fine..

Here comes me with 2023. Same problem and same solution, adding any statement after the dispatch solves this. :sheep:

2024... Same.


Added Operating Systems Book

What does this PR do?
Add Resource(s)
For resources
Description
1.It is a book about Operating Systems Concepts
2.It is helpful for Every programmer.
Why is this valuable (or not)
It is very popular among Students and Programmer.
How do we know it's really free?
It is from University of Babylon and free for all.
For book lists, is it a book?
It is a book.
Checklist:

[x]  Not a duplicate
[x] Included author(s) if appropriate
[x] Lists are in alphabetical order
[x] Needed indications added (PDF, access notes, under construction)

Hi @suubh I don't see any evidence that this is an authorized distribution. books posted by professors on open websites tend to disappear if they don't have proper authorization.

Hello @eshellman ,this book is on the university website so as authorized by the university .It cant get disappear from there . Or please suggest any changes .

The authors have not made it free: https://codex.cs.yale.edu/avi/os-book/OS9/index.html


The "externalResolvers" example code in sbt reference has error with sbt-1.6.2

steps

Create maven local repo.

add local repo into resolvers:
resolvers += MavenCache("local-maven", file("/home/xxxx/mavenlocalrepo"))

add librarydependencies:
libraryDependencies += "org.scalanlp" %% "breeze" % "2.0.1-RC2"

Disable maven central, only use local repo:
 externalResolvers := Resolver.combineDefaultResolvers(resolvers.value, mavenCentral = false)
from https://www.scala-sbt.org/1.x/docs/Library-Management.html:

To use the local repository, but not the Maven Central repository:
externalResolvers := Resolver.combineDefaultResolvers(resolvers.value, mavenCentral = false)

problem
IntelliJ IDEA report error for "resolvers.value" argument since the combineDefaultResolvers's first argument is a Vector[Resolver]
expectation
No error to be reported.
notes
I added "toVector" to fix this issue. This should be documentation issue.

Documentation update patch merged, so close this issue.


elm-lang.org is down

The site's down and it has been since at least 15:51 GMT on 21 Oct 2015.
I realize the site being down doesn't really touch on the source code in this repo, but I wasn't sure if there was a better way to give a heads up to the folks responsible for it. A few people have tweeted @evancz regarding the same.
If it seems like it's still up when you load it in your browser, do a refresh and/or check:
http://downforeveryoneorjustme.com/elm-lang.org

Would it be possible to have the strictly static content hosted via GitHub pages, which practically "never" goes down? I understand that the try page needs a live back-end.

There is not much "strictly static" content there (in the sense of HTML pages). Even the blog pages etc. are Elm code that is rendered (as JavaScript which creates DOM elements) when you request a page. See, e.g., https://github.com/elm-lang/elm-lang.org/blob/master/src/pages/blog/blazing-fast-html.elm. That is the Elm file which is responsible for the page http://elm-lang.org/blog/blazing-fast-html. While to you that page might look like a static page that could be hosted on GitHub, it is not really. As the Elm file I link to shows. (Of course, some tricks could be played at deployment, like actually rendering the DOM, then doing some kind of scraping, capturing the DOM as HTML and then host that HTML on GitHub. But overall, it's a more complicated story than just "move stuff over to GitHub, so that there will be no reachability problems anymore".)

Those are static pages. After compilation, there is no server-side computation that needs to be performed in order to serve the content. You just serve the generated JavaScript and HTML files, which will then run in the browser and create the intended interface. This likely true of all the blog posts and documentation. They could easily be hosted on GitHub pages, Amazon S3, or whatnot, with a CDN in front of them.

Yes, I was assuming that the .elm pages, posts, etc. got compiled once and then served either from an in-mem cache or from disk. I'll be honest and say that I didn't really look at the Haskell code for the server part of the website. I have done so just now, and I see that there is logic to compile and serve up pages, but my guess is that the actual compilation only happens once per page.

@seliopou, I know that is the case in principle. :smile:
I was more trying to talk about the practicalities of deployment. Sure it's possible to arrange things in a "more static / CDN friendly way". But it needs work, was all I was trying to say. Maybe I didn't do so well. (Also, I haven't looked into the server code myself, but whar @michaelsbradleyjr says makes sense.)

My hosting service (Digital Ocean) had some maintenance scheduled for some time in a 5+ hour range, so I just had to restart things.
Sorry for the issues here!

FYI: elm-lang.org seems to be down currently.

Confirmed: http://downforeveryoneorjustme.com/http://elm-lang.org/

@evancz any news on when this will be back up?

@jmelfi I don't think it's been down continuously since Nov 22. But it definitely is down again at the time of this comment.

Down again.

#437 is a copy of this notification.  Love this language so far!

down again

Seems to be down again...

appears up now at least

Down.

Been down for a few days. I was just wanting to start getting into Elm for a major project, but this really gives me pause.

I didn't see this a few days ago.  I can resolve it now.  Are you still unable to resolve?

I was trying to load this page:
http://elm-lang.org/guide/reactivity#signals
The main page is up, but that one still fails.

That page does not exist any more. Simple as that. All the /guide/... pages do not exist anymore. See https://github.com/elm-lang/elm-lang.org/pull/567.

@gisborne it appears the guide is located here: http://guide.elm-lang.org/ as a gitbook now.

It's down rn


please allow to configure ryuk port

hello,
according to https://www.testcontainers.org/features/configuration/#disabling-the-startup-checks it is possible to disable ryuk completely but there is no way of changing ryuk default port (8080).
could you please add a way to configure this?
regards,
peter

Hi @peter-ponzel,
Testcontainers starts everything on random ports, including Ruyk. Even tho the Ryuk process listens on 8080, it will be random on your machine (something like 35123).

mea culpa, had more than one change at a time which caused some confusion.
you're right, everything is works as expected :+1:


RuntimeError: setStorage: sizes [1, 3, 224, 224], strides [153228, 51076, 226, 1] ...

I am trying to adapt my project https://iperov.github.io/DeepXTools/ for DirectML , but got a problem.
in backward
    Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
RuntimeError: setStorage: sizes [1, 3, 224, 224], strides [153228, 51076, 226, 1],
storage offset 50177, and itemsize 4 requiring a storage size of 611096
are out of bounds for storage of size 612912

repro in
0.2.0.dev230426
<IP_ADDRESS>.dev230413
works fine in cuda pytorch.
repro code

import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch_directml

class BlurPool(nn.Module):
    def __init__(self, in_ch, kernel_size=3, stride=2):
        super().__init__()
        self._in_ch = in_ch
        self._stride = stride
        self._pad_sizes = (int(1.*(kernel_size-1)/2), int(np.ceil(1.*(kernel_size-1)/2)),) * 2

        if(kernel_size==2):
            kernel = np.array([1., 1.])
        elif(kernel_size==3):
            kernel = np.array([1., 2., 1.])
        elif(kernel_size==4):
            kernel = np.array([1., 3., 3., 1.])
        elif(kernel_size==5):
            kernel = np.array([1., 4., 6., 4., 1.])
        elif(kernel_size==6):
            kernel = np.array([1., 5., 10., 10., 5., 1.])
        elif(kernel_size==7):
            kernel = np.array([1., 6., 15., 20., 15., 6., 1.])

        kernel = kernel[:,None]*kernel[None,:]
        kernel /= kernel.sum()
        kernel = np.tile(kernel[None,None,:,:], (in_ch,1,1,1) ).astype(np.float32)

        self.register_buffer('_kernel', torch.tensor(kernel))

    def forward(self, inp):
        x = F.pad(inp, self._pad_sizes, 'constant', value=0)

        return F.conv2d(x, self._kernel, stride=self._stride, groups=self._in_ch)

device = torch_directml.device(0)

bp = BlurPool(3)
bp.to(device)

x = torch.ones( (1,3,224,224), dtype=torch.float32, device=device, requires_grad=True)
x = bp(x)

x.mean().backward()

@fdwr hello any news?

@Adele101 any news?

@Adele101 hello ?

@fdwr can you please reassign a man who will fix it ? pytorch-directml currently is unusable

@Adele101 It's been over a year, but the problem hasn't been fixed in 0.2.3.dev240715

still don't work in 0.2.5.dev240914
torch-directml is unusable for training


make it possible to disable block and inline types

relates to https://github.com/erusev/parsedown/pull/740

Good call @lsmith77. Will be added to the next release soon.

@eagostini ah sorry for not making this clear enough, but this change also requires https://github.com/erusev/parsedown/pull/740


messageActionSheet: Refactor to not rely on BackgroundData

This will allow us to use the shared messageActionSheet code in the
React Native parts of the codebase, rather than only the webview parts
of the codebase. It's also generally a cleaner and more type-safe
approach.
The test coverage for this seems not great, but I manually tested
clicking on most of the buttons on both styles of action sheet in the
app.

There's still some stuff that's not great about this: particularly, every ButtonDescription requires every possible callback, so we need to, for instance, pass in startEditMessage on every button, even if none of the buttons are going to edit the message. This isn't a new problem though, just something we might want to tighten up in the future. In the meantime, I've sort of hacked my way around it just by passing in (_) => {} when it's unused, which is OK but not great.
Not sure what the best way to do something like this in flow is. Maybe each button should have it's own type, and we should have a buttonData: MessageButtonData | EditButtonData | (etc...) on the ButtonDescription? But that might be pretty verbose, I'm not sure.

The current state of where the ButtonDescription options are used is as follows:
Required by both message and header actionsheets: auth, message, dispatch, _
Only used in message actionsheets: ownUser, startEditMessage
Only used in header actionsheets: subscriptions
However, we probably want to change header actionsheets to stop using message, and use new stream and topic options instead, since it doesn't require anything else, and that's cleaner on the whole.

And just to be abundantly clear on where this stands: I think merging this PR as-is is an improvement (in that it's a step towards #4541), although this refactor is far from complete (I still need to make the changes I mentioned above). I'm going to keep working on this refactor, but I think it makes sense to review and merge this now just so the refactor doesn't turn into an enormous PR.

Thanks @WesleyAC !
I like splitting showActionSheet into a showHeaderActionSheet and showMessageActionSheet. They naturally have somewhat different types, so splitting them makes it possible to start expressing that clearly. That split, as a commit of its own, would be a good first commit in this refactor.
I'm not such a fan of turning these signatures into having long lists of positional arguments (here 8 of them) -- I think well before that point it typically becomes better to use objects to effectively get named parameters, to avoid having to match up a long somewhat arbitrary sequence between definition and call site. That's part of what backgroundData is doing here. So all these arguments:
      backgroundData.auth,
      backgroundData.mute,
      backgroundData.subscriptions,
      backgroundData.ownUser,
      backgroundData.flags,

would be cleaner as an object, or as part of an object. Perhaps the simplest way to do this would be to pass literally backgroundData itself, but loosen the type required for it from BackgroundData to an inexact object type with just the properties needed, like { auth: Auth, /* … */, flags: FlagsState, ... }. That way the function's signature is expressing that it needs these properties and doesn't care about any others -- and you could add another call site that passes the needed properties without bothering about the other parts of BackgroundData that aren't relevant here.
Zooming out a bit, one thing you'll see we like to do in a refactor like this is to split it into a series of relatively small commits, each self-contained but only expressing a single idea. For some recent examples, take a look at #4437, #4424, or #4442. Here that might look something like:

Split the function into two; not yet changing the signature at all except there's now two of them, and that first boolean argument is gone.
Factor out makeButtonCallback.
Loosen the types of the backgroundData parameters on the various constructFooButtons helpers and also the showFooActionSheet functions.

Or, as an example of how I'd make the exact set of changes as this version of the PR but just split them up: one commit that changes the construct* signatures the way this PR does, and then another that changes the show* signatures.

Drop the narrow argument on showHeaderActionSheet.

I find that strategy helps a lot in reading and understanding and reviewing the changes. It also helps in making it possible to develop larger refactors and manage the complexity of them.

However, we probably want to change header actionsheets to stop using message, and use new stream and topic options instead, since it doesn't require anything else, and that's cleaner on the whole.

Definitely agreed it'd be good to stop passing it a message, which is unduly specific. It can't be just stream and topic, I think, because you can also get one of these for a PM conversation if you're looking at an interleaved view that contains PMs: all-messages, @-mentions, or search results. Probably the right type for it is Narrow, defined in src/utils/narrow.js.
(And then we should do something in the names to make it clear that this is the narrow the header is about, not the narrow of the surrounding view -- whereas the narrow: Narrow that the message case uses is the latter.)

@gnprice ok, I've split it up into multiple commits and changed most of the functions to take objects as args instead of positional args, should be ready for a review.
I'm not sure what the preferred way of writing a function that takes only an object argument is — I've opted to use destructuring, and duplicate the names of the args in the function signature, but passing a named args parameter would also work. Is there a way to do the destructuring without the verbosity of repeating the argument names?

Perhaps the simplest way to do this would be to pass literally backgroundData itself, but loosen the type required for it from BackgroundData to an inexact object type with just the properties needed, like { auth: Auth, /* … */, flags: FlagsState, ... }. That way the function's signature is expressing that it needs these properties and doesn't care about any others -- and you could add another call site that passes the needed properties without bothering about the other parts of BackgroundData that aren't relevant here.

Oh, hmm, I didn't do it this way, but that does seem cleaner — I'll add another commit to change it to work like this.

Ok, now it should be all good :)

Just manually tested the new commits, everything appears to work as expected.

Since this is split into separate commits, I'm just keeping on pushing refactoring commits here, let me know if that's not the correct thing to do. I figure we can merge them a few at a time, if we need/want to.

Ok, I think I'm done for now — this is a pretty large stack of commits, but each individual one should be pretty easy to review, I think. Let me know if I should bias more towards waiting for feedback before making a big commit stack in the future.

I've tested that the final commit here works on my android device, and git rebase origin/master --exec 'tools/test' reports that tests pass at every commit. Should be ready for another review.


Set Default optional in Case-Default schema of LG parser

@Danieladu , '?' means zero or once, so I think they are equal.


Update the Getting Started section

Change

Update the Getting Started section with an additional option as per the linked issue

Type of Change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] This change requires a documentation update (Wiki)

@MrMCake are you still updating this?

@ahmadabdalla no. Would you like to see more?


Document minimum iOS & Android version (crashing on iOS6.1).

Xamarin Forms 1.4/1.5 supports iOS 6.1 (ref: https://developer.xamarin.com/guides/cross-platform/xamarin-forms/getting-started/installation/)
TWMessageBarManager is supposed to support iOS 6.0 or later. (ref: https://github.com/terryworona/TWMessageBarManager)
That being said, this is crashing for me on iOS6.1.

@trevoriancox - I will be documenting the minimum versions shortly. Looking over the statistics, while XF supports 6.1, considering its immensely small user base, its over 3 years old and other plugins / frameworks are dropping support for it, this plugin will also be dropping support for it. We will now only support iOS 7+
Apologies if you are still supporting iOS 6, this is just a free project I am helping in my limited spare time.


gcp cloudrun: The feature 'sandbox selector' is not supported in the declared launch stage

File: docs/reference/pkg/gcp/cloudrun/service.md
Following these examples results in:
googleapi: Error 400: The feature 'sandbox selector' is not supported in the declared launch stage on resource default-42a7072. The launch stage annotation should be specified at least as BETA. Please visit https://cloud.google.com/run/docs/troubleshooting#launch-stage-validation for in-depth troubleshooting documentation.
How do I prevent it adding the 'sandbox selector"

@ForbesLindesay do you remember which example was problematic at the time? I don't see any of the examples setting this annotation anymore, and at least the first example seems to work fine for me (after some basic adjustments).


how to move file with spaces - try phantomjs fs module

Hi!!
I  use run command to move file like the example. pathFile_ini and pathFile_fin are variables containing the full path.
pathFile_ini='/Users/useA/tagui/flows-M1Pro/RPA-Tagui/name with spaces .csv'
pathFile_fin='/Users/useA/tagui/flows-M1Pro/RPA-Tagui/files/ name_without_spaces .csv'
run mv `[pathFile_ini]` `[pathFile_fin]`

When the file download (pathFile_ini) contains spaces in the name, the move don´t work.
for this reasons i need change name the filename.
I need run the next command but the execution is stuck
run for f in * ; do mv "$f" "${f// /_}" ; done
echo 2 `[run_result]`

thats is worked on terminal, but I when put in the tagui command dosen't worked and got stuck
for f in * ; do mv "$f" "${f// /-}" ; done
Tagui is a exceptional tools.
Thanks in advance

Hi @pp082
You can try using phantomjs fs module. https://phantomjs.org/api/fs/method/move.html
The following worked for me:
var fs = require('fs');
fs.move("C:/Users/abc/A.txt", "C:/Users/abc/test folder/A.txt");

Thanks @pp082 for positive feedback! Alternatively, you can create a bash shell script with your commands and logic, then use TagUI run step on your shell script. The run step can't replicate exactly complex shell script commands because it is meant more for calling a particular command, rather than chaining complex commands. That would be done better in shell scripts or Windows batch files, then invoke using the run step.

You have all reason with that
Maybe Python is better :)
for now  I will try  use this https://github.com/kelaberetiv/TagUI/issues/1262#issuecomment-1193456556  with a variable
pathFile_ini='/Users/useA/tagui/flows-M1Pro/RPA-Tagui/name with spaces .csv'
pathFile_fin='/Users/useA/tagui/flows-M1Pro/RPA-Tagui/files/ name_without_spaces .csv'

Closing but please ping back if this is still relevant or an issue.


Various improvements possible in mocha test cases

1 -- There appear to be 3 duplicate tests in test.js
https://github.com/sjmcdowall/hydra/blob/master/specs/test.js#L182
https://github.com/sjmcdowall/hydra/blob/master/specs/test.js#L239
https://github.com/sjmcdowall/hydra/blob/master/specs/test.js#L198
https://github.com/sjmcdowall/hydra/blob/master/specs/test.js#L255
https://github.com/sjmcdowall/hydra/blob/master/specs/test.js#L219
https://github.com/sjmcdowall/hydra/blob/master/specs/test.js#L276
2 -- Inconsistent use of @description vs. @summary
3 -- No code coverage report appears to be generated.  This could be a good thing to see?

Cut and paste no doubt. PR?

Fixed by https://github.com/flywheelsports/hydra/pull/180


Create Singularity Container

Need to convert the existing docker container into a singularity container and provide it to users.

The instructions  seem straight-forward

@StellaAthena I’d love to work on this issue if it’s still in progress and jahatef hasn’t started on it yet. Let me know!

Unfortunately, this has gotten lost in my list of priorities so you are welcome to take over. @gokuljs


Remove semicolons

Hi,
I loved your article!
You could remove the three semicolons to make it even tinier. Who needs those anyway. 🤷♂
(Feel free to close this if you don't agree. I just had a funny moment. 🙈)

Thank you for your feedback 🙂
I believe it is of paramount importance to always consider tinier and tinier alternatives

#4 actually does this. My PRs #5 and #6 make this really small.

Thanks for the contributions but will be leaving it as is to stay consistent with the article 🙂


Get a soundcloud url via GET parameter

It should be possible to call the web player with a GET parameter. If this GET parameter exists and is valid, this song should load, instead of the default one.

Closed with commit 0c7770c0e5594b002ed20f48891a4490b73b1f9b


Add skip_start option

Update to 0.1.5
Add skip_install option to easily skip starting K3s service
Update readme with more developer info, updated contact information.
Move to more stable ubuntu test image

LGTM once ruby is happy


Prometheus metrics

Hi,
It just crossed my mind it would be amazing if there was an endpoint exposed by the binary that Prometheus could query with metrics. Probably just a counter with each call name as a label.
(I'm thinking on running this as a sidecar for Kubernetes workloads)
I would be happy to help implement this feature.
Thoughts?

Hey there,
Thanks for the interest in the tool and the feature suggestion. I can see why that'd be valuable for you use case, but it's definitely a bit beyond the scope of what I was intending. Of course you're more than welcome to fork and extend but I don't want to add the additional complexity at this time. Some of the improvements to Access Analyzer might also be a good solve for the runtime visibility: https://aws.amazon.com/blogs/security/iam-access-analyzer-makes-it-easier-to-implement-least-privilege-permissions-by-generating-iam-policies-based-on-access-activity/

Hi @princespaghetti ,
It's all good. I might fork and extend this them.
Awesome idea integrating with the Access Analyzer! Thanks!


No operation permission for broker load

General Question
When I use broker load, I get an error. root No HDFS permission
But I have modified the configuration file (be/conf/hadoop_env.sh and fe/conf/hadoop_env.sh)
as follows
`export HADOOP_CLASSPATH=${STARROCKS_HOME}/lib/hadoop/common/:${STARROCKS_HOME}/lib/hadoop/common/lib/:${STARROCKS_HOME}/lib/hadoop/hdfs/:${STARROCKS_HOME}/lib/hadoop/hdfs/lib/
export HADOOP_USER_NAME=hive
if [ ${HADOOP_CONF_DIR}"X" != "X" ]; then
export HADOOP_CLASSPATH=${HADOOP_CONF_DIR}:${HADOOP_CLASSPATH}
fi`
I try to add this in broker load properties,Nor can it solve the problem
Finally, I modified the   ~/.bash_profile
export HADOOP_USER_NAME=hive
In this way, the data can be imported successfully.I have a question. If we deploy in a cluster and cannot modify environment variables at will, how can I configure it to achieve the goal

@gengjun-git PTAL

you can just execute the command export HADOOP_USER_NAME=hive in start_broker.sh

Thank you. I'll test it here. I think this should be configured separately or recorded clearly in the document. I can't find relevant information in the community document.

Thanks for the reminder, we will improve the documentation

You are also welcome to contribute to the community.

已收到~~~~谢谢！！！——————王沐


Trying to implement custom yolov8 segmentation model for automatic labeling on serverless.

Actions before raising this issue

[X] I searched the existing issues and did not find anything similar.
[X] I read/searched the docs

Steps to Reproduce

Installed CVAT serverless on windows 10 with WSL.
Install Nuclio v. 1.11.24
Created custom yolov8 model inspired by: https://github.com/opencv/cvat/pull/6491
Deployed the model and model is running in Docker
This error appears in CVAT, after deploying model:

When testing the model in Localhost:8070, it get this error:  "error": "Failed to invoke function: Post 'http://<IP_ADDRESS>:59561': dial tcp <IP_ADDRESS>:59561: connect: connection refused"

Expected Behavior
No response
Possible Solution
No response
Context
I am trying to use my custom trained model to auto annotate in CVAT Serverless.
I have placed my model files in: cvat/serverless/pytorch/ultralytics/yolov8.
In this folder i have placed: function.yaml, function_cpu.yaml, main.py and best.pt (the yolov8 weight file)
main.py:
import json
import base64
from PIL import Image
import io
import torch
import numpy as np
from ultralytics import YOLO
import supervision as sv
from skimage.measure import approximate_polygon, find_contours

def to_cvat_mask(box: list, mask):
    xtl, ytl, xbr, ybr = box
    flattened = mask[ytl:ybr + 1, xtl:xbr + 1].flat[:].tolist()
    flattened.extend([xtl, ytl, xbr, ybr])
    return flattened

def init_context(context):
    context.logger.info("Init context...  0%")

    model_path = "/opt/nuclio/best.pt"

    model = YOLO(model_path, task="segment")

    # Read the DL model
    context.user_data.model = model

    context.logger.info("Init context...100%")

def handler(context, event):
    context.logger.info("Run yolo-v8 model")
    data = event.body
    buf = io.BytesIO(base64.b64decode(data["image"]))
    threshold = float(data.get("threshold", 0.5))
    context.user_data.model.conf = threshold
    image = Image.open(buf)

    yolo_results = context.user_data.model(image, conf=threshold)[0]
    labels = yolo_results.names
    detections = sv.Detections.from_yolov8(yolo_results)
    detections = detections[detections.confidence > threshold]

    results = []
    if len(detections) > 0:

        for xyxy, mask, confidence, class_id, _ in detections:
            mask = mask.astype(np.uint8)

            xtl = int(xyxy[0])
            ytl = int(xyxy[1])
            xbr = int(xyxy[2])
            ybr = int(xyxy[3])

            label = int(class_id)
            cvat_mask = to_cvat_mask((xtl, ytl, xbr, ybr), mask)

            contours = find_contours(mask, 0.5)
            contour = contours[0]
            contour = np.flip(contour, axis=1)
            polygons = approximate_polygon(contour, tolerance=2.5)

            results.append({
                "confidence": str(confidence),
                "label": labels.get(class_id, "unknown"),
                "type": "mask",
                "points": polygons.ravel().tolist(),
                "mask": cvat_mask,
            })

    return context.Response(body=json.dumps(results), headers={},
                            content_type='application/json', status_code=200)

function.yaml:
 metadata:
  name: pth-qr-code-and-objects-yolov8-segment
  namespace: cvat
  annotations:
    name: YOLO v8 Segment
    type: detector
    framework: pytorch
    spec: |
      [
        { "id": 0, "name": "QR" },
        { "id": 1, "name": "object" },
      ]
spec:
  description: YOLO v8 Segment via pytorch
  runtime: 'python:3.9'
  handler: main:handler
  eventTimeout: 30s
  build:
    image: cvat.pth.ultralytics.yolov8.segment
    baseImage: ultralytics/ultralytics:latest-cpu

    directives:
      preCopy:
        - kind: USER
          value: root
        - kind: RUN
          value: apt update && apt install --no-install-recommends -y libglib2.0-0
        - kind: RUN
          value: pip install supervision ultralytics scikit-image

Environment
No response

It does not look like your model was healthy deployed.
I would suggest to check docker container and its logs.

You should start from checking this error:
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)

Go to cvat container and check permissions for that file.
You may login as root inside the container: docker exec -u root -it cvat_server bash

But I am not sure that is the reason.
Somewhy cvat_opa can't get bundle from cvat_server container. However I do not see something else suspicious in provided cvat_server logs.
http://cvat-server:8080/api/auth/rules

You should start from checking this error:
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)

Go to cvat container and check permissions for that file. You may login as root inside the container: docker exec -u root -it cvat_server bash

I have investigated the permissions, with the following result:

I have investigated the permissions, with the following result:

Try to remove this file maybe, it should be re-created with correct permissions

I have investigated the permissions, with the following result:

Try to remove this file maybe, it should be re-created with correct permissions

I tried deleting the file and restarting the CVAT Dockers, it just recreated the file with the same permissions.

And you still do not see any errors in docker logs cvat_server?

www-data and adm don't correspond to django user and django group, we use by default.
So, I may conclude you are using a modified version of CVAT.

www-data and adm don't correspond to django user and django group, we use by default. So, I may conclude you are using a modified version of CVAT.

That sound weird to me. All I have done is to follow your installation guide from: https://opencv.github.io/cvat/docs/administration/basics/installation/
And followed this guide afterwards: https://opencv.github.io/cvat/docs/administration/advanced/installation_automatic_annotation/

And you still do not see any errors in docker logs cvat_server?

I still get the same errors as in my initial comment. Removing the /var/log/nginx/error.log didn't seem to have any effect.

Okay, never mind.
To suggest something, I need the full log from cvat_server, not just a short fragment.

Not sure this will help
For me, i just chmod 777 for that file(bad practice)
After that i can see the error better which is related to my serverless container
After fix serverless code no issue anymore
This is just my assumption, the reason for new error log got different username probably because the server that got 500 error user is www-data(maybe)

Hey @bsekachev could you please help me out if you were able to achieve this? I am trying to do the same thing.

@bsekachev You marked this thread as completed. @UffeLauge Did you manage to solve the issue? I am trying to use a custom yolov8n-seg.pt model for auto annotation in CVAT. I installed nuclio and the serverless functions for CVAT. Segment anything (SAM) already works fine and I can use it in CVAT.
Somehow my model is not found. I checked a few times alread. It is definitely there. And I also set the appropriate read permissions (chmod 644 path/to/model.pt). Last week it was still found. But I could not get masks or polygons. Only bounding boxes.
Any ideas?
Error message:
24.05.21 10:45:01.394 (I) cessor.healthcheck.server Listening {"listenAddress": ":8082"}
24.05.21 10:45:01.394 (D)            processor.http Creating worker pool {"num": 1}
24.05.21 10:45:01.394 (D) sor.http.w0.python.logger Creating listener socket {"path": "/tmp/nuclio-rpc-cp67mb9nmm5c73ci9k1g.sock"}
24.05.21 10:45:01.394 (D) sor.http.w0.python.logger Creating listener socket {"path": "/tmp/nuclio-rpc-cp67mb9nmm5c73ci9k20.sock"}
24.05.21 10:45:01.394 (D) sor.http.w0.python.logger Using Python wrapper script path {"path": "/opt/nuclio/_nuclio_wrapper.py"}
24.05.21 10:45:01.394 (D) sor.http.w0.python.logger Using Python handler {"handler": "main:handler"}
24.05.21 10:45:01.394 (D) sor.http.w0.python.logger Using Python executable {"path": "/opt/conda/bin/python3"}
24.05.21 10:45:01.394 (D) sor.http.w0.python.logger Setting PYTHONPATH {"value": "PYTHONPATH=/opt/nuclio"}
24.05.21 10:45:01.394 (D) sor.http.w0.python.logger Running wrapper {"command": "/opt/conda/bin/python3 -u /opt/nuclio/_nuclio_wrapper.py --handler main:handler --event-socket-path /tmp/nuclio-rpc-cp67mb9nmm5c73ci9k1g.sock --control-socket-path /tmp/nuclio-rpc-cp67mb9nmm5c73ci9k20.sock --platform-kind local --namespace nuclio --worker-id 0 --trigger-kind http --trigger-name myHttpTrigger --decode-event-strings"}
24.05.21 10:45:02.252 (I) sor.http.w0.python.logger Wrapper connected {"wid": 0, "pid": 25}
24.05.21 10:45:02.252 (D) sor.http.w0.python.logger Creating control connection {"wid": 0}
24.05.21 10:45:02.252 (D) sor.http.w0.python.logger Control connection created {"wid": 0}
24.05.21 10:45:02.252 (D) sor.http.w0.python.logger Waiting for start
24.05.21 10:45:02.252 (I) sor.http.w0.python.logger Init context...  0% {"worker_id": "0"}
24.05.21 10:45:02.252 (E) sor.http.w0.python.logger Exception raised while running init_context {"worker_id": "0"}
Traceback (most recent call last):
  File "/opt/nuclio/_nuclio_wrapper.py", line 567, in <module>
    run_wrapper()
  File "/opt/nuclio/_nuclio_wrapper.py", line 555, in run_wrapper
    loop.run_until_complete(wrapper_instance.initialize())
  File "/opt/conda/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/opt/nuclio/_nuclio_wrapper.py", line 199, in initialize
    await self._initialize_context()
  File "/opt/nuclio/_nuclio_wrapper.py", line 225, in _initialize_context
    init_context_result = getattr(self._entrypoint_module, 'init_context')(self._context)
  File "/opt/nuclio/main.py", line 23, in init_context
    raise FileNotFoundError(f"Model file not found at {model_path}")
FileNotFoundError: Model file not found at /path/to/my/custom/model/custom_yolov8nseg.pt
24.05.21 10:45:02.337 (W) sor.http.w0.python.logger Failed to read control message {"errRootCause": "EOF"}
24.05.21 10:45:02.338 (D) sor.http.w0.python.logger Control connection was closed
24.05.21 10:45:02.411 (W) sor.http.w0.python.logger Failed to read from event connection {"err": "EOF"}
24.05.21 10:45:02.411 (E) sor.http.w0.python.logger Unexpected termination of child process {"error": null, "status": "exit status 1"}
panic: Wrapper process for worker 0 exited unexpectedly with: exit status 1

goroutine 72 [running]:
github.com/nuclio/nuclio/pkg/processor/runtime/rpc.(*AbstractRuntime).watchWrapperProcess(0xc00025ab60)
        /home/runner/work/nuclio/nuclio/pkg/processor/runtime/rpc/abstract.go:663 +0x434
created by github.com/nuclio/nuclio/pkg/processor/runtime/rpc.(*AbstractRuntime).startWrapper in goroutine 71
        /home/runner/work/nuclio/nuclio/pkg/processor/runtime/rpc/abstract.go:318 +0x1f1

    /nuclio/pkg/platform/local/platform.go:1312
Failed to deploy function
    ...//nuclio/pkg/platform/abstract/platform.go:227

This is my function-gpu.yaml script:
metadata:
  name: pth-ultralytics-yolov8-segment
  namespace: cvat
  annotations:
    name: YOLO v8 Segment
    type: detector
    framework: pytorch
    spec: |
    spec: |
      [
        {"id": 1, "name": "Potato"},
        {"id": 2, "name": "clod"},
        {"id": 3, "name": "stone"}
      ]

spec:
  description: YOLO v8 Segment via pytorch
  runtime: 'python:3.10'
  handler: main:handler
  eventTimeout: 30s
  build:
    image: cvat.pth.ultralytics.yolov8.segment
    baseImage: ultralytics/ultralytics:latest

    directives:
      preCopy:
        - kind: USER
          value: root
        - kind: RUN
          value: apt update && apt install --no-install-recommends -y libglib2.0-0
        - kind: RUN
          value: pip install supervision ultralytics
        - kind: WORKDIR
          value: /opt/nuclio

  triggers:
    myHttpTrigger:
      maxWorkers: 1
      kind: 'http'
      workerAvailabilityTimeoutMilliseconds: 10000
      attributes:
        maxRequestBodySize: 33554432 # 32MB

  resources:
    limits:
      nvidia.com/gpu: 1

  platform:
    attributes:
      restartPolicy:
        name: always
        maximumRetryCount: 3
      mountMode: volume

This is my main.py code:
import json
import base64
from PIL import Image
import io

import numpy as np
from ultralytics import YOLO
import supervision as sv
from skimage.measure import approximate_polygon, find_contours

def to_cvat_mask(box: list, mask):
    xtl, ytl, xbr, ybr = box
    flattened = mask[ytl:ybr + 1, xtl:xbr + 1].flat[:].tolist()
    flattened.extend([xtl, ytl, xbr, ybr])
    return flattened

def init_context(context):
    context.logger.info("Init context...  0%")

    model_path = "custom-yolov8n-seg.pt"

    model = YOLO(model_path, task="segment")

    # Read the DL model
    context.user_data.model = model

    context.logger.info("Init context...100%")

def handler(context, event):
    context.logger.info("Run yolo-v8 model")
    data = event.body
    buf = io.BytesIO(base64.b64decode(data["image"]))
    threshold = float(data.get("threshold", 0.5))
    context.user_data.model.conf = threshold
    image = Image.open(buf)

    yolo_results = context.user_data.model(image, conf=threshold)[0]
    labels = yolo_results.names
    detections = sv.Detections.from_ultralytics(yolo_results)

    detections = detections[detections.confidence > threshold]

    results = []
    if len(detections) > 0:
        # Adjusted unpacking to match the structure of Detections
        for detection in detections:
            mask = detection.mask
            xyxy = detection.xyxy
            class_id = detection.class_id
            confidence = detection.confidence

            mask = mask.astype(np.uint8)

            xtl = int(xyxy[0])
            ytl = int(xyxy[1])
            xbr = int(xyxy[2])
            ybr = int(xyxy[3])

            label = int(class_id)
            cvat_mask = to_cvat_mask((xtl, ytl, xbr, ybr), mask)

            contours = find_contours(mask, 0.5)
            contour = contours[0]
            contour = np.flip(contour, axis=1)
            polygons = approximate_polygon(contour, tolerance=2.5)

            results.append({
                    "confidence": str(confidence),
                    "label": labels.get(class_id, "unknown"),
                    "type": "mask",
                    "points": polygons.ravel().tolist(),
                    "mask": cvat_mask,
            })

    return context.Response(body=json.dumps(results), headers={},
                            content_type='application/json', status_code=200)

Solved it myself. The issue was that I did not handle the Detections object correctly. I was  treating detection as if it has the xyxy attribute directly, but detection is actually a tuple.
This is the corrected handler function:
``
def handler(context, event):
context.logger.info("Run yolo-v8 model")
data = event.body
buf = io.BytesIO(base64.b64decode(data["image"]))
threshold = float(data.get("threshold", 0.5))
context.user_data.model.conf = threshold
image = Image.open(buf)
yolo_results = context.user_data.model(image, conf=threshold)[0]
labels = yolo_results.names
detections = sv.Detections.from_ultralytics(yolo_results)
detections = detections[detections.confidence > threshold]

results = []
if len(detections) > 0:
    for i in range(len(detections)):
        xyxy = detections.xyxy[i]
        mask = detections.mask[i]
        confidence = detections.confidence[i]
        class_id = detections.class_id[i]

        mask = mask.astype(np.uint8)

        xtl = int(xyxy[0])
        ytl = int(xyxy[1])
        xbr = int(xyxy[2])
        ybr = int(xyxy[3])

        label = int(class_id)
        cvat_mask = to_cvat_mask((xtl, ytl, xbr, ybr), mask)

        contours = find_contours(mask, 0.5)
        contour = contours[0]
        contour = np.flip(contour, axis=1)
        polygons = approximate_polygon(contour, tolerance=2.5)

        results.append({
            "confidence": str(confidence),
            "label": labels.get(class_id, "unknown"),
            "type": "mask",
            "points": polygons.ravel().tolist(),
            "mask": cvat_mask,
        })

return context.Response(body=json.dumps(results), headers={},
                        content_type='application/json', status_code=200)

``

I created a repository: https://github.com/felixkarevo/CVAT-custom-yolov8-segmentation-auto-annotation


Self hosted bot halves every gift (BUG)

NadekoBot v2.27.7 is the version. Everyone on our server is getting their gifts halved despite the affinities being set to each other. Was told to report it here-- Can anyone help?

please read the description of waifugift before making an issue.

Yes, the description says:
-waifugift / -gift
Gift an item to someone. This will increase their waifu value by 50% of the gifted item's value if you are not their waifu, or 95% if you are. Provide no parameters to see a list of items that you can gift.
On our server, it's still doing 50% if they are your waifu for the gifting value and not 95%. The affinities were also mutual before claims, and it still continues to do 50%.

Happening to another user, where the Cookie value is 10, and the waifu's value only goes up by 5 even though they claimed each other and have affinities set to each other.
https://gyazo.com/7fb6b5d442a997cc49f0d131b12610fa


Add shift+click to fill Essence Pouch within bank

As of now the shift click within the bank only allows you to wear item, consume pot/food, or withdraw 1,5,10,X,All. I think it would be very advantageous to add an option to fill essence pouch to the list.
This would enable a user to hold shift while in the bank interface and left click on an essence pouch to fill it (assuming they have essence in their inventory).

You can already do this by setting the Bank Deposit Shift-Click option to Eat/Wield/Etc. in menu entry swapper.


[FormHelperText] Error styles should override disabled styles

Material UI is a great project so just looking to help out.
According to the issue the error styles in the FormHelperText take precedence over the disabled styles. Please let me know if there is further changes that are required. If this is not an actual issue also feel free to close the PR.
Before this PR here was the behavior:
Example Code:
<TextField
          error
          disabled
          id="standard-disabled"
          label="Disabled"
          defaultValue="Hello World"
          className={classes.textField}
          margin="normal"
          helperText="Some helper text"
 />

Before this PR:

After this PR:

Closes #13210

@matthewdordal Please could you follow the issue title / commit message format we use elsewhere?
"[ComponentName] Imperative commit message"

@mbrookes sorry that I missed the commit message format. I updated the commit message. Please let me know if there's any other things I should update. 😸

Let's wait for the next minor v3.3.0.

@oliviertassinari I agree with you that this is more of a bugfix, however I'm not sure how much sense it makes (the behavior, not the fix, per se). How can you fix an error on a disabled input?!

@mbrookes The error could be fixed by another component. Here is a case:
Assume a user can use the Select (<TextField select />) to select from some uploaded files (like using their IDs). If there is no file to select, the Select is disabled, and an error message shows when the user tries to submit the form. To fix the error, the user can click a button next to it to upload a file. Once a file is uploaded, the select is not disabled anymore.

@matthewdordal It's a great first pull request on Material-UI 👌🏻. Thank you for working on it!


Add a new AccumuloStore for FATE

This adds support for storing FATE data in an Accumulo table instead of storing in Zookeeper for #3559
This is currently a work in progress and is not finished but the main operations are implemented for the AcccumuloStore. Common code has been refactored and moved out of ZooStore and into AbstractFateStore. Most of the common code moved has to do with the code that handles signaling and tracking reserved/defered transactions. The store just uses a batch writer for now but we will likely need to use conditional mutations at some point.
There is a test called AccumuloStoreReadWriteIT which tests out the various operations on the new store. The test only tests read/writing to the store...the store hasn't been tested with the overall FATE framework yet as some more work probably needs to be done to test it for real (such as handling which store to use so we can still use the ZK store for root/metadata).
The next steps (besides addressing any review comments) are to try testing it for real with FATE (and finish up any supporting tasks for that) and then eventually support conditional mutations.

@keith-turner - I did some refactoring and now FateIT is abstract and there are test classes to run the 4 tests for both Zookeeper and Accumulo stores. One thing I noticed was one of the tests seems to have a race condition that I think needs fixing as I saw an occasional failure with the accumuo store version and i added a comment here.
This should be close to being able to go out of draft status if we are ok doing some follow ons for things like conditional mutations.


Support for Mixins

Hello,
It seems typedoc does not support documenting typescript mixins? Or it can be done with some clever trick? Please advise.
Mixin pattern
The mixin pattern in TypeScript can be defined like this:
Supporting definitions:
export type AnyFunction<A = any> = (...input: any[]) => A
export type AnyConstructor<A = object> = new (...input: any[]) => A

export type Mixin<T extends AnyFunction> = InstanceType<ReturnType<T>>

export const MyMixin =
    <T extends AnyConstructor<AlreadyImplements & BaseClass>>(base : T) =>

// internal mixin class
class MyMixin extends base {
    someProperty : string = 'initialValue'

    someMethod() {
    }
}

// the "instance type" of this mixin
export type MyMixin = Mixin<typeof MyMixin>
// or (supports recursive type definition)
export interface MyMixin extends Mixin<typeof MyMixin> {}

Sample 1
The sample mixins can be found here: https://github.com/bryntum/chronograph/blob/master/src/graph/Node.ts#L5
In this example, we define the WalkableForwardNode mixin, which includes (or must already implement) WalkableForward mixin and enhances it with some additional logic.
Currently typedoc does not recognize it at all, all we have is the documentation of the mixin function:

No documentation is available for the internal mixin class, which is the most important piece of the mixin. Also, there's no docs for the mixin instance type alias. It does not appear in the docs index at all.
Sample 2
One can also use the interface to declare the type of the mixin instance: https://github.com/bryntum/chronograph/blob/master/src/chrono/Atom.ts#L182
This is an alternative notation, which allows for recursive type definitions. It does appear in the docs, however it does not contain the properties of the mixin class:

Reproduce
To reproduce you can clone the chronograph: https://github.com/bryntum/chronograph/
Then, npm install and npm run docs
Mixins are very flexible and type-safe way of combining behaviors, they should be supported by the typedoc I think. I'm very interested in this feature and volunteering for any helper tasks, just ping me<EMAIL_ADDRESS>

Perhaps someone from the dev team can take a quick look at this issue and point me to the right direction? (I'm willing to fix/implement this myself) Some guidance, pointing to the file to start at is much appreciated.
I've created a fork with the Mixin code added to the examples folder: https://github.com/SamuraiJack/typedoc/commit/3f5076728d4eefd1de64432b78d65680ebcf9ea6
should be very easy to start investigation.

More about the modern mixin pattern: https://www.bryntum.com/blog/the-mixin-pattern-in-typescript-all-you-need-to-know/
I'm making progress and will submit a PR with mixin support soon.

Great! Thanks. Please let us know if you need any help.

Pull request created: https://github.com/TypeStrong/typedoc/pull/990

Resolved in #990

Reopening this thread because I have been trying to generate mixin documentation and although I can get some results, just having a list of the mixin functions (and the class names if the mixin class is not anonymous) does not seem to be very useful. It would be great to have links to the types themselves so what has been exposed in the final type can be understood by the documentation reader.
I am trying to generate documentation for the mixin sample in: https://mariusschulz.com/blog/mixin-classes-in-typescript
I get this (giving names to the classes the mixin functions create):

and my index.ts is:
import {User} from './user';
import {Timestamped} from './timestamped';
import {Tagged} from './tagged';

const SpecialUser = Timestamped(Tagged(User));
export type SpecialUser = typeof SpecialUser;

NOTE: I am using TypeDoc 0.16.11 as the latest is giving me issues: ts.isIdentifierOrPrivateIdentifier is not a function.

BTW, my ultimate goal would be to be able to expose the final mixed type as a type and be able to access/see everything that has been mixed: properties, methods, etc.

BTW, my ultimate goal would be to be able to expose the final mixed type as a type and be able to access/see everything that has been mixed: properties, methods, etc.

@judax check the https://www.bryntum.com/blog/the-mixin-pattern-in-typescript-all-you-need-to-know/
and stay tuned for the part 2

Thanks. Saw that post, but do you mean that the support in TypeDoc for mixins will improve soon?
If I can make an ask, it would be great to now just have the links to the mixin types in the list but also show the whole list of properties and methods that are mixed together and available for the final type/const.

Try writing your mixins in the notation suggested in the post and then generate the documentation. You should be able to see all properties (including inherited) in the created type.

Oh, I see. What version if TypeDoc has mixin support?

The Mixin support SamuraiJack built was released with 0.15.
Re: latest version - #1257

Thanks.
I did a quick test with the following code (based on the article):
/** @ignore */
type AnyFunction<A = any> = (...input: any[]) => A;
/** @ignore */
type AnyConstructor<A = Object> = new (...input: any[]) => A;
/** @ignore */
type Mixin<T extends AnyFunction> = InstanceType<ReturnType<T>>;

class MyClass {
  myClassMethod(): void {
  }
}

interface MyInterface1 {
  myInterface1Method(): void;
}

/** @ignore */
const MyMixin1 = <T extends AnyConstructor<MyClass>>(base : T): AnyConstructor<MyInterface1>&T =>
  class MyMixin1 extends base {
    myInterface1Method(): void {
    }
  };

/** @ignore */
type MyMixin1 = Mixin<typeof MyMixin1>;

interface MyInterface2 {
  myInterface2Method(): void;
}

/** @ignore */
const MyMixin2 = <T extends AnyConstructor<MyClass>>(base : T): AnyConstructor<MyInterface2>&T =>
  class MyMixin2 extends base {
    myInterface2Method(): void {
    }
  };

/** @ignore */
type MyMixin2 = Mixin<typeof MyMixin2>;

const FinalMixedType = MyMixin1(MyMixin2(MyClass));

And I am still seeing a similar result as mentioned above.

Is this the expected result? I was expecting that the final mixin could show links to the interfaces (or at least to the mixin types).

Try class FinalMixedType extends MyMixin1(MyMixin2(MyClass)) {};
Also try --excludeNotDocumented command line option to avoid the need for @ignore.

@judax Just released the 2nd part of the blog post, with new mixin notation: https://www.bryntum.com/blog/the-mixin-pattern-in-typescript-all-you-need-to-know-part-2/
Mixins are represented as classes and have the docs as regular classes.

Creating a class that extends from the mixins works great! Thanks so much for all the help!


Break LetsTrace into multiple packages

We currently have multiple projects in LetsTrace. The NuGet way is to have different packages instead of building everything into one. I think this would also benefit us in keeping things separated.
We have the following packages:

LetsTrace
Thrift
Jeager.Thrift

We could break these up and some namespaces inside of LetsTrace into the following:

LetsTrace - the main, core implementation. No specific tracing system implementations.
LetsTrace.Jaeger - LetsTrace pieces needed to work with Jaeger

Jaeger.Thrift would most likely be bin-packed in here
Thrift would most likely be bin-packed in here

LetTrace.Zipkin - LetsTrace pieces needed to work with Zipkin

We might be able to use the Thrift implementation here

We could also look at targeting the lowest netstandard version via these changes. Via OpenTracing we are tied to at least 1.3, but for anything pulling in Thrift it wants 2.0

these packages have been broken out. We have LetsTrace.Jaeger and LetsTrace.Zipkin


bump terraform-equinix-fabric-connection module version to 0.4.0

Note: In fabric connection modules for cloud providers all the connection logic happens in submodule terraform-equinix-fabric-connection, therefore user-agent will include the terraform-equinix-fabric-connection metadata module name and not terraform-equinix-fabric-connection-gcp in this case.

Please add the DRE team to this repo so that our approving reviews will make PRs mergeable.


fix NVTE_UB_WITH_MPI read

Description
Fix reading NVTE_UB_WITH_MPI env var.
Type of change

[ ] Documentation change (change only to the documentation, either a fix or a new content)
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Infra/Build change
[ ] Code refractor

Changes

Fix reading str to reading as bool

Checklist:

[ ] I have read and followed the contributing guidelines
[ ] The functionality is complete
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes

/te-ci pytorch

LGTM. I'm guessing you're trying to handle the case where NVTE_UB_WITH_MPI=0 in the environment?

Yes, correct. We plan to use NCCL bootstrapping from nemo 24.09 container.


WebGL and JS basis transcoder - can't read the basis file correctly compressed with -separate_rg_to_color_alpha flag

I am testing a .basis file we compressed/encoded from a png file and we are using webgl and the js transcoder.
./basisu -normal_map -mipmap -mip_smallest 4 -separate_rg_to_color_alpha desk.png
The document mentions

The internal texture format that Basis Universal uses (ETC1S) doesn't handle tangent space normal maps encoded into RGB well. You need to separate the channels and recover Z in the pixel shader using z=sqrt(1-x^2-y^2).

I am not able to find an example of how to do this part.
I am running the webgl example server from this repository and it looks like the basis file is not the same as loading the png. And I suspect it is because missing the last part "You need to separate the channels and recover Z in the pixel shader using z=sqrt(1-x^2-y^2)".
From the webgl "/texture" page, if I put in the basis file, it will show the texture without background color in "Alpha Blend" mode and a grey background with texture color in "RGB" and "Alpha" mode.
If I compare with the png file using the "/encode_test" page, the png file will show the purple background in "Alpha Blend" and "RGB" mode with the texture. But not showing anything at all in the "Alpha" mode.
It looks like I have the right output data already just not sure how to do the last part to "separate the channels and recover Z".
Png file we are testing: https://storage.googleapis.com/publictesting/desk.png
Basis file we are testng: https://storage.googleapis.com/publictesting/desk.basis
Any help is appreciated! Thanks!

"It looks like I have the right output data already just not sure how to do the last part to "separate the channels and recover Z".
OK - first I'll validate that your texture is compressing/transcoding correctly. I will find you an example on how to recover Z.


Update dp900-02-storage-lab.md/Explore Azure Storage/Provision an Azure Storage account/Step 6

Exercise: Explore Azure Storage
Task: Provision an Azure Storage account
Step: 6
Changes proposed in this pull request:
Removed "+ Create" since it was not displayed in my review.
Removed "; including renaming folders and setting permissions" because I was not able to see these configuration tasks.

Hello @AnthonyOakley ,
I also could see that the "+Create" is no longer there, so that change is ok.
However, for the second change, there is the option to rename the folder and to manage permissions in the menu.

The Manage ACL is the option that allows updating the Access Control List, where permissions can be edited.
Please remove the second change (the one referring to renaming and permissions) so we can merge the PR with only the first change.
Best regards,
Mihai


fix(turborepo): add berry support for built meta when pruning

Description

Add support for yarn berry built option for dependencies meta to turbo prune.
Without this change, yarn install --immutable fails because built is added after turbo accidentally removes it, triggering the following error.

The lockfile would have been modified by this install, which is explicitly forbidden.

Testing Instructions

Add a dependenciesMeta for a package and set it to built: false.
Run yarn to generate a new lockfile
Use turbo prune to produce a slim lockfile
Run yarn install --immutable on that small lockfile

Thanks for the PR! I think this looks good to me, but I'll be doing some additional testing just because yarn install --immutable is quite strict.

Allow CI Workflow Run

[ ] approve CI run for commit: a395085d10f6e22a91270ebec8b821c093a2fcab

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@chris-olszewski fixed an issue with this change where I somehow forgot to support more than one dependency meta setting for a single dependency 😅. This should do the job now, let me know what you think.

@vinnymac @chris-olszewski Just want to check in with you both to see if we want to finish up this PR? I'm doing some housekeeping to close out stale items in the repo (but would love to see this get merged!)

@vinnymac @chris-olszewski Just want to check in with you both to see if we want to finish up this PR? I'm doing some housekeeping to close out stale items in the repo (but would love to see this get merged!)

This is in a good place, just needs a review first so it can move forward. @chris-olszewski did you want any changes here?

I needed to manually cherrypick the commits to https://github.com/vercel/turborepo/pull/9605 as for whatever reason trying to rebase past https://github.com/vercel/turborepo/pull/8813 was causing git to fail.
Thank you for your contribution and sorry for the delay on getting this merged.


Upgrade DateFolders Package for Umbraco v14 Compatibility

Is your feature request related to a problem? Please describe.
Yes, the DateFolders package currently supports up to Umbraco v13, and I am encountering compatibility issues when attempting to use it with Umbraco v14. This is problematic as the package is essential for organizing content by date in our Umbraco backoffice, significantly aiding content editors in managing articles and blog posts efficiently.
Describe the solution you'd like
I would like the DateFolders package to be upgraded for compatibility with Umbraco v14. This would involve updating the necessary code to function seamlessly with the new version, ensuring that all existing functionalities such as automatic folder creation, content movement based on date edits, and automatic cleanup of empty folders continue to work as intended.
Describe alternatives you've considered
As an alternative, I've considered manually implementing similar functionality directly within our project or using a different package, but neither solution is as efficient or robust as updating the DateFolders package. The current package perfectly aligns with our needs, and an update would be the most beneficial solution.
Additional context
Any guidance on making the necessary code adjustments myself would be greatly appreciated if an official update is not yet planned.

Hi @YoussefDarwish0 !! Thank you for reaching out! I've forwarded this to the team and I'm awaiting a response from them. I will let you know as soon as I know more.

My coworker @BramvdBogaard Is currently looking into this and attempting a naïve approach by simply upgrading the package dependencies and fixing the build issues. More updates will follow, hopefully somewhere in the next 2 weeks.

@YoussefDarwish0 a new beta version of the package has just been released. As far as we can see everything is working well but we would love it if you could try it out and give feedback in case you run into something. We'll keep it in beta until it has been tested some more and then release version 14.0.0.

@BramvdBogaard Okay that's really great news. I'll test it out as soon as possible and let you know. Looking forward to the potential release of version 14.0.0!


Approval needs to be manual for tag release

Coverage remained the same at 100.0% when pulling 6dfbc6a9eef24610d5203a7739a8aae8dc4eec9c on jammycakes:master into e71619864ea8e1dae40111852baaa3a63b09085d on ukparliament:master.