Reduce Service Worker keep-alive response time to allow responses to succeed

A picture tells a thousand words
I hope this is okay to submit and I apologise if I've missed something here;
We've been having a lot of issues with failing Service Worker keep-alive requests being logged to our third-party logging platform since implementing react-oidc for auth. Hopefully it isn't intentional that these should be erroring out.
Before this PR
In Chrome (and possibly other browsers) Service Worker keep-alive requests to /OidcKeepAliveServiceWorker.json would result in an errored fetch as the browser was timing out at the maximum of 5 minutes for a request.
After this PR
Service Worker keep-alive requests return successfully with a 200 and the expected response of {} in between 2.5 and 5 minutes before starting the next keep-alive request.

Hi All,
I am also experiencing issues around the keep alive with the timeout error. This looks like it could help me with my issue as well.

hi @dcopestake , thank you very much for the feedback+ pullrequest.
It may be a little bit more complexe.
The time must be adjusted in that file to keep service worker alive.
https://github.com/AxaGuilDEv/react-oidc/blob/cfd4da5704a8911e6790a3919c2e05bf08be3bf4/packages/react/src/oidc/vanilla/initWorker.ts#L115
And the five minutes may be still a good idea during login phase. It keep ServiceWorker alive 5 minutes on android when we are not on the web Application/service worker domain during login phase.

Ah okay, I think I understand @guillaume-chervet, thanks. I'll see if I can amend this to take that into account.

Hi @guillaume-chervet. Apologies for the delay in getting back on this one. I've added 29162f540f15700c464451ee3339d7193b37df38 which I hope addresses your concerns. The minimum delay for the keep alive request is now passed from the client to the service worker.
I haven't specifically changed the delay depending on the phase (i.e. before logging in vs after logging in etc) because unfortunately any request that takes longer than 5 minutes is going to fail in Chrome, so instead I've used 240 seconds as the minimum delay for Android and 150 seconds otherwise.

Apologies @guillaume-chervet, didn't realise the package had moved on since I originally raised this. Merged in the upstream now so everything should be up to date.


fix: remix action/loaders with redirect timeout

fixes #395
this issue is due to the react-router redirect function that remix uses not including a body (as it's just a redirect, so is only setting headers)
streamified response with empty body ignores other response attributes, so we write a single whitespace

thank you!


Issue with gantt/table.Table in DynamicPage with Footer

This is more of a enhacement request.
A gantt/table.Table as the sole content in a DynamicPage with fitContent="true" and without Footer has the gantt/table to the bottom of the Page. When you add a footer the expectation is to get a floating footer. However the height of the table/gantt is reduced to end above the footer. IMHO it would be better to have the table/gantt to the bottom and some extra whitespace inside at the end of the table/gantt so that it would be still possible to scroll the last line to a position above the footer. This would be consistenter and better user experience.
SAPUI5/OpenUI5 version: 1.60.x
Browser/version (+device/version): e.g. Chrome Desktop
URL (minimal example if possible): https://jsbin.com/catumekoqu/edit?html,output

@DerGuteWolf I would normally ask some UX colleagues to get their opinion for such enhancement requests but what you want is technically not easy to change. DynamicPage is a generic container where the content could be anything. We cannot simply introduce a new floating footer context for every control that need to add some white space at the end of the control geometry. At a first glance you may think that this can be done easily via DynamicPage but no... This would actually be a very huge work for the gantt/table controls where the scrolling calculation needs to changed because the dummy gap has to be inside the scroll container.
Thanks your feedback.

@aborjinik : I don't think that this is so complex. gantt/table can certainly detect that it is inside a DynamicPage and get the height of the Footer of the DynamicPage and add an whitespace with according height in the below and make itself higher according to the height of the Footer. The current height calcution must already be custom code which could be enhanced.


Allow Class Resources, call #to_s for defined resource_name

If using a class as the resource:
resource Order do
end

The resource_name will be a class, which causes issues when sorting for
sections. By calling #to_s on the args.first when first dealing with
the resource we can ensure that we are always working with a string for
the resource_name.

Also refactored to use a ternary operator instead of a one-line if else end.

Thanks!


Decouple mpc timestep and update rate

Add interpolation function for warm starting rather than assuming a left shift by one index

Resolved in commit b06b084fc656fe1e24971d488802e36cc49d1a65 and 1283bbcdcd9984d5ef5d4f7c0f436b69fdea0101 in devel-sim2real branch, and tested in hardware.


Caught up project template changes

#23  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @CatChen and the rest of your teammates on  Graphite


Cloudbase-Init - "Unable to connect to the remote server"

Hi, I am runing the 'create-windows-online-cloud-image.ps1' from the examples folder, all goes well until I hit the 'Downloading Cloudbase-Init...' section, when I just get error "Unable to connect to the remote server", can't get past it.
Any pointers as to how to get past this please?
16/09/2021 10:09:02 - Downloading Cloudbase-Init...
WARNING: Exception calling "DownloadFile" with "2" argument(s): "Unable to connect to the remote server"
WARNING: Exception calling "DownloadFile" with "2" argument(s): "Unable to connect to the remote server"
WARNING: Exception calling "DownloadFile" with "2" argument(s): "Unable to connect to the remote server"
16/09/2021 10:10:38 - Exception calling "DownloadFile" with "2" argument(s): "Unable to connect to the remote server"
Invoke-Command : Exception calling "DownloadFile" with "2" argument(s): "Unable to connect to the remote server"
At C:\Users\Administrator\windows-openstack-imaging-tools\WinImageBuilder.psm1:88 char:20
+             $res = Invoke-Command -ScriptBlock $command
+                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-Command], MethodInvocationException
    + FullyQualifiedErrorId : WebException,Microsoft.PowerShell.Commands.InvokeCommandCommand

Hello,
There is temporary outage on the server, will be fixed in short time.
Thank you,
Adrian Vladu

Thank you ader1990, is there a URL I can ping to check when it's up please?

@speedyrazor should be fixed now.


Make RakugoScript

Make similar scripting langue to Ren'Py Langue.
It can base on python fairyscript

I understand that you want to create an easier to write language so you can write:
  $ e = Character('Eileen')     show eileen happy     e "I'm standing in front of the White House."
Rather than:
Rakugo.show("alice", ["happy"]) Rakugo.say({ 		"who":"alice", 		"what":"I'm standing in front of the White House.", 		"kind":"left" })
There are two projects about that concept that were used in commercial games:
1.- Escoria, the 'official' Point&Click Framework uses a custom ESC language
https://github.com/godotengine/escoria
https://fr.flossmanuals.net/creating-point-and-click-games-with-escoria/the-esc-scripting-language/
The language parser is in GDScript so you can adapt it and integrate a subset of .ESC or create a new .RAK
2.- Ink is a Visual Novel language created for the game 80-days, but it was used in P&C games too:
https://github.com/inkle/ink
https://www.inklestudios.com/ink/
There are parsers for Godot, but they use the ink official C# libraries:
https://github.com/paulloz/godot-ink
https://github.com/inkle/ink-library
Perhaps you can use Ink as is, or adapt ESC to Rakugo.

Thanks, @vmpajares for your opinion and information I didn't know that godot-ink exists.
So:

Rakugo was heavily inspired by Ren'Py and for that reason it has some unique mechanics for it, so I can't adapt Ink or ESC 1:1.

Developer of language-gdscript for atom want to help me with it

RakguoScript will be similar to Ren'Py langue - Ink and Escoria are have quite different syntax form it.

Ink (form want I know) is only for text, RakugoScript will allow to do much more for example:
show/hide nodes, playing anims, playing sounds and more.

I only know Ren'Py enough to do something similar to it.

ESC don't have any comments in scripts or docs how it works under hood, which makes it hard to adapt.

But it doesn't mean I don't try to add more to support more langues.
So, after release 2.0.0 I will start to add support for langues:

CSON and JOSN the easiest to do
RakugoScript

I will try to make some Ink variation (probably I call it Boku (jap. ink) I can use godot-ink - you can run gdscript code form C#.

It's good to know that you keep working in Rakugo. I really think that it could be a great project, maybe it already is but I don't try it yet. Any starting tutorial?
About Escoria, if I remember it correctly, when you want to add something, you create a new node2d and select which type are you creating attaching the correct gd script in globals/TYPE.gd:
item.gd
scene.gd
actor.gd
background.gd
....
Every of them inherits from interactive.gd that defines a:
export(String, FILE, ".esc") var events_path = "" # API property
The .esc file indicates the behavior of the node, and not the gdscript that define the type of node. So the developer doesn't write a single line of gdscript or C#, instead it edit ESC files that are very descriptive and similar to ink or ren'py. For example this box.esc in the official demo:

> [box_open]
	say player "An old newspaper"

> [!box_open]
	say player "It's a box"

:pick_up

> [box_open]
	set_global i/inv_news true
	set_active box false

> [!box_open]
	say player "It's too heavy!"

:open

> [box_open]
	say player "It's already open"

> [!box_open]
	play_snd box "res://demo/audio/items/box_open.wav"
	set_global box_open true
	set_state box newspaper
	say player "There was a newspaper inside it"

:talk
> [!box_inverted]
	set_state box inverted
	set_global box_inverted true
	stop
> [box_inverted]
	set_state box default
set_global box_inverted false`

I not saying that you must use ESC language, but you can use a similar approach to make rakugo language work and the parser is already done in GDScript. I suppose that adapting it would  be less work than making a new one from the start.

@vmpajares I am sorry that I misunderstood what you meant.

It's good to know that you keep working in Rakugo.

Sorry, but I have problem with remembering to write post on my/Rakugo Pateron/itch.io on new things.
In fact in every week I make at least 7 commits - developing Rakugo is Fun for me :smile:

I not saying that you must use ESC language, but you can use a similar approach to make rakugo language work and the parser is already done in GDScript. I suppose that adapting it would be less work than making a new one from the start.

I will try use ESC interpeter to make RakugoScript, I don't like ESC syntax.
But last time (when godot has version 2.5) I couldn't understand it.

I really think that it could bea great project, maybe it already is but I don't try it yet.

Thanks :smile: !
Rakugo GDScript version is done in 95% and you could use it already.

Any starting tutorial?

In fact in last month I started working on docs/tutorials for Rakugo, but they are WIP and still missing some themes.

@vmpajares
I will try adapt this https://duwangmuffin.itch.io/sukigd for RakugoScript

I started working on RakugoScript at rakugo-script branch

I just find out that raku in jap. means easy, comfort.
I will try new attempt at this using tree-sitter.

I start try to do raku here:
https://github.com/jebedaia360/Raku


Update graphview

Update for Graph UX - v1
This change updates the Graph visualization to use React Flow.  New experience now supports nested visualization of Branch/Subworkflow graphs.  Current version only support graph nesting depth of 1 however roadmap for future versions will allow nesting to any depth.
@see: https://reactflow.dev/docs/
Type

[ ] Bug Fix
[x] Feature
[ ] Plugin

Are all requirements met?

[x ] Code completed
[x] Smoke tested
[ ] Unit tests added
[ ] Code documentation added
[ ] Any pending items have an associated Issue

Complete description

Added new transformer (flyte response -> DAG)
Added new transformer (DAG -> ReactFlow json)
Modified execution queries to support getting all children (to support nested graphs)
Updated support for Node versions >= 14x

@jsonporter mind posting some screenshots?

As some context for the PR, here are some screen shots of the new UX.  This is MVP for the new graph experience and we plan to add more featuers and polish in coming sprints.
Example of successful execution

Example of nesting with multiple execution status

Example of failed execution

@jsonporter you need to sign dco


Use absolute import

AssertionError: Set your SHIPPO_API_KEY in your os.environ

This is most likely not my problem. Maybe someone can fix the test environment.

fixed #24


ZEVA - ICBC Data Upload

Description:
The ICBC data parsing is failing due to the size of the data file. To solve this we need to change how the parsing works to avoid processing data that isn't needed.
There were two rounds of memory optimizations that were unsuccessful in allowing the test environment to process the large files. We should look at creating a pre-processing endpoint that filters the un-needed elements from the data file before uploading to minio.
The November and December monthly data files are now available and have been uploaded to Teams.
Acceptance Criteria:
Pre-process data file to reduce the file size before uploading to minio (most likely on the backend and then pipe the processed file over to minio)
ICBC data uploads successfully every time.
Development Checklist:
Drop any registration that is model year 2018 or older
Filter out non-ev vehicles from the data

Files have been processed for 2022-11-30 and 2022-12-31. The files are located in the Zelda teams files folder.


Error: Invalid or unsupported WebDriver capabilities found ("pollTimeout")

I tried to upgrade from 8.0.1 to 8.1.0 today but after the upgrade my tests fail with the message:
[0-3] 2023-02-13T19:19:54.819Z ERROR @wdio/runner: Error: Invalid or unsupported WebDriver capabilities found ("pollTimeout"). Ensure to only use valid W3C WebDriver capabilities (see https://w3c.github.io/webdriver/#capabilities).If you run your tests on a remote vendor, like Sauce Labs or BrowserStack, make sure that you put them into vendor specific capabilities, e.g. "sauce:options" or "bstack:options". Please reach out to to your vendor support team if you have further questions.
Is this a regression from https://github.com/webdriverio-community/wdio-chromedriver-service/commit/2c738d3450a82a4e2ed4e2283972962cbca49ddb ?

@mo Are you passing somehow chromedriver options as capabilities? Can you send your config file ?

I've tested it with https://github.com/amiya-pattnaik/webdriverIO-with-mochaBDD. Changed chromedriver service version to 8.1.0 and it seems working.

const chalk = require('chalk')

const baseUrl =
  process.env['HTTP_ORIGIN'] ||
  require('fs')
    .readFileSync(require('path').join(__dirname, '.env'))
    .toString()
    .split('\n')
    .map((line) => line.split('='))
    .find((line) => line[0] === 'HTTP_ORIGIN')[1]

exports.config = {
  //
  // ==================
  // Specify Test Files
  // ==================
  // Define which test specs should run. The pattern is relative to the directory
  // from which `wdio` was called. Notice that, if you are calling `wdio` from an
  // NPM script (see https://docs.npmjs.com/cli/run-script) then the current working
  // directory is where your package.json resides, so `wdio` will be called from there.
  //
  specs: ['./src/tests/e2e/**/*.uitest.cjs'],

  suites: {
    main: ['./src/tests/e2e/suites/main/**/*.uitest.cjs'],
    stripe: ['./src/tests/e2e/suites/stripe/**/*.uitest.cjs'],
  },

  // Patterns to exclude.
  exclude: [
    // 'path/to/excluded/files'
  ],
  //
  // ============
  // Capabilities
  // ============
  // Define your capabilities here. WebdriverIO can run multiple capabilities at the same
  // time. Depending on the number of capabilities, WebdriverIO launches several test
  // sessions. Within your capabilities you can overwrite the spec and exclude options in
  // order to group specific specs to a specific capability.
  //
  // First, you can define how many instances should be started at the same time. Let's
  // say you have 3 different capabilities (Chrome, Firefox, and Safari) and you have
  // set maxInstances to 1; wdio will spawn 3 processes. Therefore, if you have 10 spec
  // files and you set maxInstances to 10, all spec files will get tested at the same time
  // and 30 processes will get spawned. The property handles how many capabilities
  // from the same test should run tests.
  //
  maxInstances: Number(process.env.EE_BROWSER_COUNT) || 4,
  //
  // If you have trouble getting all important capabilities together, check out the
  // Sauce Labs platform configurator - a great tool to configure your capabilities:
  // https://docs.saucelabs.com/reference/platforms-configurator
  //
  // NOTE: capabilities are set at the bottom of the file instead!
  //capabilities: [],

  // ===================
  // Test Configurations
  // ===================
  // Define all options that are relevant for the WebdriverIO instance here
  //
  // By default WebdriverIO commands are executed in a synchronous way using
  // the wdio-sync package. If you still want to run your tests in an async way
  // e.g. using promises you can set the sync option to false.
  sync: false,
  //
  // Level of logging verbosity: silent | verbose | command | data | result | error
  logLevel: process.env.EE_LOG_LEVEL || 'error',
  //
  // Enables colors for log output.
  coloredLogs: true,
  //
  // If you only want to run your tests until a specific amount of tests have failed use
  // bail (default is 0 - don't bail, run all tests).
  bail: process.env.EE_BAIL || 1,
  //
  // Saves a screenshot to a given path if a command fails.
  //screenshotPath: './tests/errorShots/',
  //
  // Set a base URL in order to shorten url command calls. If your url parameter starts
  // with "/", then the base url gets prepended.
  baseUrl,
  //
  // Default timeout for all waitFor* commands.
  waitforTimeout: Number(process.env.EE_TIMEOUT_MILLIS) || Number(process.env.EE_NORMAL_TIMEOUT_MILLIS) || 6000,
  //
  // Default timeout in milliseconds for request
  // if Selenium Grid doesn't send response
  connectionRetryTimeout: 90000,
  //
  // Default request retries count
  connectionRetryCount: 3,
  //
  // Initialize the browser instance with a WebdriverIO plugin. The object should have the
  // plugin name as key and the desired plugin options as properties. Make sure you have
  // the plugin installed before running any tests. The following plugins are currently
  // available:
  // WebdriverCSS: https://github.com/webdriverio/webdrivercss
  // WebdriverRTC: https://github.com/webdriverio/webdriverrtc
  // Browserevent: https://github.com/webdriverio/browserevent
  // plugins: {
  //     webdrivercss: {
  //         screenshotRoot: 'my-shots',
  //         failedComparisonsRoot: 'diffs',
  //         misMatchTolerance: 0.05,
  //         screenWidth: [320,480,640,1024]
  //     },
  //     webdriverrtc: {},
  //     browserevent: {}
  // },
  //
  // Test runner services
  // Services take over a specific job you don't want to take care of. They enhance
  // your test setup with almost no effort. Unlike plugins, they don't add new
  // commands. Instead, they hook themselves up into the test process.
  services: ['chromedriver', 'geckodriver'],

  //seleniumArgs: seleniumVersions,
  //seleniumInstallArgs: seleniumVersions,

  //
  // Framework you want to run your specs with.
  // The following are supported: Mocha, Jasmine, and Cucumber
  // see also: http://webdriver.io/guide/testrunner/frameworks.html
  //
  // Make sure you have the wdio adapter package for the specific framework installed
  // before running any tests.
  framework: 'jasmine',
  //
  // Test reporter for stdout.
  // The only one supported by default is 'dot'
  // see also: http://webdriver.io/guide/testrunner/reporters.html
  reporters: ['spec'],

  //
  // Options to be passed to Jasmine.
  jasmineOpts: {
    //
    // Jasmine default timeout
    defaultTimeoutInterval: Number(process.env.EE_TIMEOUT_MILLIS) || 120000,
    //
    // The Jasmine framework allows interception of each assertion in order to log the state of the application
    // or website depending on the result. For example, it is pretty handy to take a screenshot every time
    // an assertion fails.
    expectationResultHandler: function (passed, assertion) {
      // do something
    },
  },

  //
  // =====
  // Hooks
  // =====
  // WebdriverIO provides several hooks you can use to interfere with the test process in order to enhance
  // it and to build services around it. You can either apply a single function or an array of
  // methods to it. If one of them returns with a promise, WebdriverIO will wait until that promise got
  // resolved to continue.
  /**
   * Gets executed once before all workers get launched.
   * @param {Object} config wdio configuration object
   * @param {Array.<Object>} capabilities list of capabilities details
   */
  // onPrepare: function (config, capabilities) {
  // },
  /**
   * Gets executed just before initialising the webdriver session and test framework. It allows you
   * to manipulate configurations depending on the capability or spec.
   * @param {Object} config wdio configuration object
   * @param {Array.<Object>} capabilities list of capabilities details
   * @param {Array.<String>} specs List of spec file paths that are to be run
   */
  // beforeSession: function (config, capabilities, specs) {
  // },
  /**
   * Gets executed before test execution begins. At this point you can access to all global
   * variables like `browser`. It is the perfect place to define custom commands.
   * @param {Array.<Object>} capabilities list of capabilities details
   * @param {Array.<String>} specs List of spec file paths that are to be run
   */
  before: function (capabilities, specs) {},
  //
  /**
   * Hook that gets executed before the suite starts
   * @param {Object} suite suite details
   */
  // beforeSuite: function (suite) {
  // },
  /**
   * Hook that gets executed _before_ a hook within the suite starts (e.g. runs before calling
   * beforeEach in Mocha)
   */
  // beforeHook: function () {
  // },
  /**
   * Hook that gets executed _after_ a hook within the suite starts (e.g. runs after calling
   * afterEach in Mocha)
   */
  // afterHook: function () {
  // },
  /**
   * Function to be executed before a test (in Mocha/Jasmine) or a step (in Cucumber) starts.
   * @param {Object} test test details
   */
  // beforeTest: function (test) {
  // },
  /**
   * Runs before a WebdriverIO command gets executed.
   * @param {String} commandName hook command name
   * @param {Array} args arguments that command would receive
   */
  // beforeCommand: function (commandName, args) {
  // },
  /**
   * Runs after a WebdriverIO command gets executed
   * @param {String} commandName hook command name
   * @param {Array} args arguments that command would receive
   * @param {Number} result 0 - command success, 1 - command error
   * @param {Object} error error object if any
   */
  // afterCommand: function (commandName, args, result, error) {
  // },
  /**
   * Function to be executed after a test (in Mocha/Jasmine)
   */
  afterTest: async function (test, context, { error, result, duration, passed, retries }) {
    if (error || !passed) {
      const timestamp = new Date().toISOString().replace(/:/g, '').replace('T', '_').slice(0, 17)
      const tcSafeName = test.description.replace(/[^a-zA-Z0-9]/g, '')
      const browserSuffix = process.env.SELENIUM_BROWSER ? process.env.SELENIUM_BROWSER : ''
      const screenshotDirectory = process.env.EE_SCREENSHOT_DIR
        ? process.env.EE_SCREENSHOT_DIR
        : `${__dirname}/pipeline-results`
      const { mkdirp } = await import('./src/server/Utils.js')
      await mkdirp(screenshotDirectory)
      const screenshotFilename = `${screenshotDirectory}/testfail-${tcSafeName}-${timestamp}-${browserSuffix}.png`
      // eslint-disable-next-line no-undef
      browser.saveScreenshot(screenshotFilename)
      // eslint-disable-next-line no-console
      console.log(
        chalk.redBright(`ERROR: Test with title "${test.description}" failed with error `) +
          chalk.magenta(JSON.stringify(error, null, 2)) +
          chalk.redBright(' and the following screenshot was captured: ') +
          chalk.yellow(screenshotFilename)
      )
    }
  },
  /**
   * Hook that gets executed after the suite has ended
   * @param {Object} suite suite details
   */
  // afterSuite: function (suite) {
  // },
  /**
   * Gets executed after all tests are done. You still have access to all global variables from
   * the test.
   * @param {Number} result 0 - test pass, 1 - test fail
   * @param {Array.<Object>} capabilities list of capabilities details
   * @param {Array.<String>} specs List of spec file paths that ran
   */
  // after: function (result, capabilities, specs) {
  // },
  /**
   * Gets executed right after terminating the webdriver session.
   * @param {Object} config wdio configuration object
   * @param {Array.<Object>} capabilities list of capabilities details
   * @param {Array.<String>} specs List of spec file paths that ran
   */
  // afterSession: function (config, capabilities, specs) {
  // },
  /**
   * Gets executed after all workers got shut down and the process is about to exit. It is not
   * possible to defer the end of the process using a promise.
   * @param {Object} exitCode 0 - success, 1 - fail
   */
  // onComplete: function(exitCode) {
  // }
}

exports.config.capabilities = [
  {
    browserName: 'chrome',
    'goog:chromeOptions': {
      binary: process.env.EE_CHROME_BINARY,
      args: ['--no-sandbox'],
    },
  },
  {
    browserName: 'firefox',
    'moz:firefoxOptions': {
      binary: process.env.EE_FIREFOX_BINARY,
      prefs: {
        'app.update.auto': false,
        'app.update.enabled': false,
        // Set "browser.anchor_color" to verify the prefs are applied correctly or not.
        //'browser.anchor_color': '#FF0000',
      },
      args: [],
    },
  },
]

const chromeCapability = exports.config.capabilities.find((conf) => conf.browserName === 'chrome')
chromeCapability['goog:chromeOptions'].args.push('--disable-gpu', '--disable-dev-shm-usage')

if (process.env.EE_HEADLESS && process.env.EE_HEADLESS != '0') {
  const headlessScreenWidth = 3000
  const headlessScreenHeight = 1500
  const chromeCapability = exports.config.capabilities.find((conf) => conf.browserName === 'chrome')
  chromeCapability['goog:chromeOptions'].args.push(
    '--headless',
    `--window-size=${headlessScreenWidth},${headlessScreenHeight}`
  )

  const firefoxCapability = exports.config.capabilities.find((conf) => conf.browserName === 'firefox')
  firefoxCapability['moz:firefoxOptions'].args.push(
    '-headless',
    `--window-size=${headlessScreenWidth},${headlessScreenHeight}`
  )
}

if (process.env.SELENIUM_BROWSER) {
  exports.config.capabilities = exports.config.capabilities.filter(
    (conf) => conf.browserName === process.env.SELENIUM_BROWSER
  )
}

if (process.env.EE_WDIO_EXEC_ARGV) {
  exports.config.execArgv = [process.env.EE_WDIO_EXEC_ARGV]
}

Using https://github.com/amiya-pattnaik/webdriverIO-with-mochaBDD still cant reproduce your problem. I tested all of your conditions with 8.1.0 versions and the problem seems not happening. Can you test it yourself with the boilerplate project or give us a reproducable example ?
PS: I used ESM as the boilerplate project is in ESM and not CommonJS Style

I added a console.log into the js file inside my node_modules and I can see pollTimeout inside my capabilties... not sure why but I will try to debug it a bit further:

Looks like the polluted caps are passed into Runner.run() at the top of the stacktrace ... maybe it has to do with how cjs vs ESM are loaded?

I execute wdio Getting Start and see the same problem
https://webdriver.io/docs/gettingstarted

Still trying to investigate.
Maybe relevant:
https://github.com/webdriverio/webdriverio/issues/6445

Create a project from scratch and have the same problem
try with different node versions 16.18.0 and 18.14.0 , but the same(

Using  "wdio-chromedriver-service": "^8.1.1", issue is resolved.


go: disable more tests on darwin

Skip the failing tests in Darwin
Tested on OSX 10.9.5
cc @cstrahan @wkennington

Is this still current?

Yes @lethalman
Just ran the build again on master. It still needs these changes.
Rebased the commits as well and builds now pass.

I can now grab osx builds from the cache so I don't need to build this myself


[Bug]: TypeError: object of type 'Gemini' has no len()

Bug Description
Getting a TypeError: object of type 'Gemini' has no len() on VectorStoreIndex for Gemini llm with HuggingFaceEmbedding.
Version
0.10.19
Steps to Reproduce
from llama_index.llms.gemini import Gemini
from llama_index.core import VectorStoreIndex
from llama_index.core import Settings
from llama_index.embeddings.huggingface import HuggingFaceEmbedding

embed_model = HuggingFaceEmbedding(model_name="BAAI/bge-small-en-v1.5")
llm = Gemini()

Settings.llm = llm
Settings.embed_model = embed_model

index = VectorStoreIndex(llm, embed_model)

Throws:
TypeError                                 Traceback (most recent call last)
[<ipython-input-15-ddadd2dd7468>](https://localhost:8080/#) in <cell line: 10>()
      8 Settings.llm = llm
      9 Settings.embed_model = embed_model
---> 10 index = VectorStoreIndex(llm, embed_model)

1 frames
[/usr/local/lib/python3.10/dist-packages/llama_index/core/indices/base.py](https://localhost:8080/#) in __init__(self, nodes, objects, index_struct, storage_context, callback_manager, transformations, show_progress, service_context, **kwargs)
     61             raise ValueError("Only one of nodes or index_struct can be provided.")
     62         # This is to explicitly make sure that the old UX is not used
---> 63         if nodes is not None and len(nodes) >= 1 and not isinstance(nodes[0], BaseNode):
     64             if isinstance(nodes[0], Document):
     65                 raise ValueError(

TypeError: object of type 'Gemini' has no len()

Relevant Logs/Tracbacks
No response

@hemanth this is not proper usage
Should be something like
index = VectorStoreIndex(nodes=nodes, embed_model=embed_model)

Or similar. Do checkout the docs

Ah! Not sure on how I missed the obvious syntax. LOL why was I passing llm to the store? :D
VectorStoreIndex(nodes=base_nodes+objects)
Now pawing at.


Specify custom sort algorithm

Currently the plugin only allows sorting JSON keys using the default sort order. (The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.) Ideally, this plugin would allow for the customization of the sorting algorithm used via configuration.
We could have a set of presets available, but instead for maximum flexibility I would like the user to be able to specify a function with the signature function(a: any, b: any): int as described here which will be passed as an argument to Object.keys(object).sort() here:
https://github.com/Gudahtt/prettier-plugin-sort-json/blob/main/index.ts#L13
Note that (as specified by Prettier) options can only be an int, boolean, choice, or path.
Here is my proposal:
printWidth: 90
tabWidth: 4
overrides:
  - files: "**/data/*.json"
    options:
      plugins:
        - "./node_modules/prettier-plugin-sort-json"
      jsonRecursiveSort: true
      jsonObjectSortAlgorithm: "./config/sortFunction.js"
      jsonArraySortAlgorithm: "./config/sortFunctionB.js"

./config/sortFunction.js is a JavaScript file with contents like such:
export default (a, b) => {
  if (a < b) {
    return -1;
  } else if (a > b) {
    return 1;
  }
  return 0;
};

This scheme is highly flexible; any desired sorting algorithm can be used, a custom pre-defined order can be defined simply by comparing with a constant array, and with the Prettier configuration system that already exists, different sorting algorithms could be used for different files.

I am in the process of developing a pull request for this, and found the following caveat.
In the rare circumstance that a user has an object with a key whose value is a number (such as { 0: true}), those numbers will ALWAYS be displayed in ascending order and ALWAYS display before string keys.
This key order is defined by JavaScript, and the only way to fix it would be to override the JSON.stringify implementation.
Since I did not want to perform a massive overhaul for a rare edge case, I have tried to document this caveat where relevant.

Resolved by PR #30.

This is an interesting workaround, though I am a bit put off by the dynamic require. We don't have any way to know what the imported module might do

My stance is that there aren't any circumstances where this would be a problem. I see the module file as basically an extension of the workspace's prettier configuration, and it's on the user to ensure that their setup makes sense. I don't see how this opens up any malicious code to be run that couldn't just happen by inserting code directly into the project.

I have just developed a solution using a JSON configuration file. You can see it here: https://github.com/Gudahtt/prettier-plugin-sort-json/pull/92

In the rare circumstance that a user has an object with a key whose value is a number (such as { 0: true}), those numbers will ALWAYS be displayed in ascending order and ALWAYS display before string keys.

This should no longer be a problem since I have switched to sorting the AST in #100. I'm no longer using JSON.stringify, which is what was imposing this order.

This was implemented as part of #92. Let me know what you think!


FormRadio Component Proposal

Properties

Name
Type
Implemented
Samples

col
string, undefined

id
string, undefined

inline
boolean

label
string, undefined

required
boolean

value
boolean

Events

change

skeleton


⚠ Bofrost.at has degraded performance

In 0ae445e, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1463 ms

Resolved: Bofrost.at performance has improved in 70fd2da after 25 minutes.


Feature s3 multipart upload

Still has some work to do with parsing response from initial request.  Major point is refactoring of signature.rs to allow query string params for POST and other HTTP verbs.
Fixes #28.

TODO:

Test happy path (>10 MB file upload)
Test small file (<5 MB upload, single part, why would you do this?)
Ensure we didn't break everything by significant signature.rs refactoring.
Code review to check amount of copying we're doing: ensure we're not doing anything TOO silly.

Also wow I'll squash this branch.


PPO2 implementation details?

Where can I find the implementation details that differentiate the PPO2 algorithm from the original version reported in Proximal Policy Optimization Algorithms by Schulman?

I do not think there is exhaustive document on this. For a closer match with Schulman's paper, check out the original baselines repository. I think there has been some small changes over the years to PPO2, but nothing major (e.g. fixing off-by-one mistakes and such).

I think Costa's blog is current the best to have all the implementation details that are in PPO: https://costa.sh/blog-the-32-implementation-details-of-ppo.html
But best is also to look at SB3 code now ;)

Thank you for your prompt replies @Miffyli and @araffin!
More specifically, what are the code-level optimizations used in PPO2. And in addition, how is the exploration carried out?


Cannot see cells in week view

I'm not able to see cells in the week view mode, I've tried with the latest version and removing any attributes to vue-cal but no hints. Screenshot shows it. I've inspected the HTML and only the container and the left hours DIV are rendered. Nothing inside , even I can render events successfully.

Hi @benacler,
First off, I've noticed you've overridden the noEvent Italian translation through the slot.
As I provided the Italian translation myself - at the beginning of the project - I might have mistranslated some bits.
As you look more Italian than me, I corrected the noEvent translation 😅 in version 2.23.1, please let me know if you see other wrong translations in this json:
{
"weekDays": ["Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato", "Domenica"],
"months": ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"],
"years": "Anni",
"year": "Anno",
"month": "Mese",
"week": "Settimana",
"day": "Giorno",
"today": "Oggi",
"noEvent": "Nessun evento",
"allDay": "Tutto giorno",
"deleteEvent": "Cancellare",
"createEvent": "Creare un evento",
"dateFormat": "dddd D MMMM YYYY"
}

Now regarding the issue at stake, I need to see you code to help you (including the CSS if you have).
Also as a good start, do you see the cells correctly in the documentation and in Codepen examples?
If not what is your browser and OS?

Hi Antoni,
Thanks for getting back, I would change the following:
"allDay": "Tutto il giorno",
"deleteEvent": "Cancella",
"createEvent": "Crea evento",
About my issue, yes I can see everything correct in CodePen and in the examples. The weird thing is that there are no cells elements in the DOM in my view. The val is embedded in a more complex application but if you tell me a way to reach you privary, I can send you a test login/pwd to access the online installation so you can see the whole application and then I can send you further information.
Thanks a lot !

Hi @benacler, thanks for the translations, I updated them.
For this issue, send me the details via email then, you can find my email in the package.json file.

If was our fault, we set the cell width component-wide using this in the CSS:
.vuecal__cell {
  height: 40px;
  }


onPress being called immediately and not when pressed

Not sure why this is being called right away. I have it in a list view. Here is my renderRow code:
renderRow(rowData) {
  // Buttons
  var swipeoutBtns = [
    {
      text: 'Delete',
      backgroundColor: '#333333',
      underlayColor: '#333333',
      onPress: alert('on press called')
    }
  ]

  return (
    // Swipeout component
    <Swipeout right={swipeoutBtns} backgroundColor={'#333333'} >
    <TouchableHighlight onPress={() => this.rowPressed(rowData.artist)}
        underlayColor='#333333'>
        <View style={styles.concertRowContainer}>
        #view stuff
        </View>
    </TouchableHighlight>
    <View style={styles.separator}/>
    </Swipeout>

  );
}

Apologies. I misread the documentation. onPress takes a function so it needed to be:
onPress: function() {alert('on press called')

Thanks for this issue. I've made a mistake as this issue says.


Use relative path for API call

So I need to add this in, but for the server render, we actually need to have the entire URL (as servers can't handle Relative urls the way the browser can), but it's an easy fix, we need to just pass in params.originUrl int a provider within boot-server and have all Apis use a BASE_URL given by that.
You can test that you'll get the error (if relative) if you refresh from this page.
Hope that makes any sense :)

Ahhh right, makes sense i will take a look into this. Thanks Mark

Yeah it can just be another provider passed in the Array there. Np!


Tranfer never went through?

Transferred Ada from coinbase to Nami wallet. Coinbase verified the correct wallet address where it was sent. Ada is gone from coinbase but never reached the wallet? How do you get ahold of someone at Nami to get help with this? Any help would be much appreciated.

You will have to synchronize your wallet with bech 13 and then you debug it


not an issue - potential break through in 3d Point cloud scanning inference

I watched this video this morning on 3d point cloud + ARKit
https://www.youtube.com/watch?v=kupq1C41XcU&feature=youtu.be
and it seems like a trained Augmentor model could help bridge the inference here in conjunction with trained model. Not sure if you agree, or if this is the correct repo for this - perhaps it is a new project.

I guess as a feature request / potential enhancement for Augmentor to solve / (unless you can think of something better or maybe it already does this)
we need a way to guess (train a model) the transformation necessary to go from one transformation to the other.
eg. given a view is transformed from
A -> B
// what was the transformation??? then from this glue / and some kalman filters - retrofit the point cloud.

Step 2 could be to isolate this to  bounding box. just thinking out loud here.
this is the code from video above
https://github.com/johndpope/ARKitExperiments

rethinking this through - I suppose to infer a 3d point cloud - augmentor should actually have a 3d cloud out of the box / definitely scope creep here - augmentor3d.  maybe something for the backlog

typing in 3d bounding box - (among other google results) returns this
https://arxiv.org/abs/1612.00496

https://github.com/smallcorgi/3D-Deepbox

I am afraid this is currently beyond the scope of Augmentor.
The proposed functionality seems a bit too vague or maybe special purpose, and the issue doesn't quite seem actionable.
That said, it is possible for a user to write his/her custom Operations. So if you do end up implementing a working version of this and want to share it with the community, then we'd certainly review a PR.
My personal suggestion is that this functionality should live (or at least start out) in its own dedicated package. This would also give you the freedom to experiment with its design

fyi - distantly related / the guys at magic leap have possibly solved this problem.

https://arxiv.org/pdf/1707.07410.pdf

breaking 3D Object Detection  https://github.com/charlesq34/frustum-pointnets


Fix an error: Style is not done loading

Thank you for submitting a pull request!
Description
Fix an error: Style is not done loading.
Plugin
Select a plugin related to this PR.

[x] maplibre-gl-export
[x] mapbox-gl-export

Type of Pull Request

[ ] Adding a feature
[x] Fixing a bug
[ ] Maintaining documents
[ ] Others ()

Verify the followings

[x] Code is up-to-date with the main branch
[x] No lint errors after pnpm lint
[x] Make sure all the exsiting features working well
[x] Make sure a changeset file is added if your PR changes package code

Refer to CONTRIBUTING.MD for more details.

@kf99916 Thanks again for the PR with quick fixes. I bumped versions for both plugins.


Add method to determine the field attribute type

Currently, Vuex ORM uses instanceof operator to determine the model field's attribute type. A user could do the same for the app they're creating by importing attributes from the core package, ex. import { HasOne } from '@vuex-orm/core'.
However, there's a problem with this approach that when someone tries to do this in another package, for example, with Vuex ORM plugin, instanceof will fail. So it's better to do the duck typing to determine the attribute type.
So, I'm planning to add methods to check the types such as isAttr and 'isHasMany' and so on.

Would love to see that as soon as possible. I think this will not work in production: https://github.com/vuex-orm/vuex-orm-apollo/blob/master/src/queryBuilder.ts#L302
Thanks for your help! :)

Yeah that code might break. We should have this methods!

Wow hey @phortx You know what, I think you can work around this issue simply using instanceof.
Get attribute like HasOne from the component object you can get from plugins install method.
install (components) {
  if (field instanceof components.HasOne) {
    // This should work!
  }
}

This should work because the class included inside components is coming from vuex-orm/core that the end user uses.
I still think we should implement convenience method like isAttr but, until it's implemented, I think you can use above approach.

Very nice idea! :) I will try that ASAP

Great! Yeah let me drop this one. If somebody else needs them in the future, we can think about it again 👍


"Bucu" is listed in the drop-down menu

Description:
"Bucu" is listed in the drop-down menu alongside its corresponding county according to the law
Precondition:
The website is up an running.

Step 1
Write in the search bar "Bucu".

Expected results
The location is listed in the drop-down menu as "Sat Bucu IALOMIȚA (Bucu)".


Option to not ignore empty lines

I don't know why this commit is a bug should be fix, so v3.6.4 is a breaking change and break my code, and let me busy this morning :cry:
If ignore empty lines, we can’t one-to-one align the row index between parsing code and csv editor. For example, I generate a csv let use to edit, and use a empty line separate each section for for pretty look.
"title"
"desc"
"command"
"" <- as a separator
"User ID"
"integer"
"uid"
"1234"

When parse back the csv, if ignore the empty lines, I need to shift the row index, it is hard to debug because the rows which return by parse(), the array index is different from csv editor.
So, I request a option the let me setting this behavior.

Because this isn't part of the spec for CSV. The line separator is \r\n or \r or \n.

It is not \r\n\r\n, is \r\n""\r\n, which have an double quote between them.
And Python standard library csv module will keep these lines as well.


Error: "Events not supported."

I take an example from the "Events" section of the OFFICIAL guide to Solidity (http://solidity.readthedocs.io/en/develop/contracts.html?highlight=event#events):
pragma solidity ^0.4.11;

contract ClientReceipt {
    event Deposit(address indexed _from, bytes32 indexed _id, uint _value);

    function deposit(bytes32 _id) {
        // Any call to this function (even deeply nested) can
        // be detected from the JavaScript API by filtering
        // for `Deposit` to be called.
        Deposit(msg.sender, _id, msg.value);
    }
}

I compile this through the Remix editor and get a number of errors:
"msg.value" used in non-payable function. Do you want to add the "payable" modifier to this function?
        Deposit(msg.sender, _id, msg.value);
                                 ^-------^
9: 34
Events not supported.
    event Deposit(address indexed _from, bytes32 indexed _id, uint _value);
    ^---------------------------------------------------------------------^
3: 5
Parameter type "bytes32" not supported.
    function deposit(bytes32 _id) {
                     ^---------^
5: 22
Only internal function calls supported.
        Deposit(msg.sender, _id, msg.value);
        ^---------------------------------^
9: 9
Not supported.
        Deposit(msg.sender, _id, msg.value);
        ^-----^
9: 9
Member access: Only call and array length supported.
        Deposit(msg.sender, _id, msg.value);
                ^--------^
9: 17
Member access: Only call and array length supported.
        Deposit(msg.sender, _id, msg.value);
                                 ^-------^

Someone can explain to me: HOW CAN IT BE?
I MUST have events for my contract!
Thankful in advance for the answer!

add the keyword payable to the function deposit .
 function deposit(bytes32 _id) payable {

Thanks for the advice, @yann300 . This word was added to this example. Unfortunately, this did not bring any improvement.


switch to the updated Modulus module in CorrDiff inference

Modulus Pull Request
Description

Checklist

[ ] I am familiar with the Contributing Guidelines.
[ ] New or existing tests cover these changes.
[ ] The documentation is up to date with these changes.
[ ] The CHANGELOG.md is up to date with these changes.
[ ] An issue is linked to this pull request.

Dependencies

/blossom-ci


MultiObjectiveSpaceTermination - tol parameter

Hi,
If there is the case in which Multi-objective optimization runs on two quantities that span over different orders of magnitude, I reckon it would be more appropriate to pass a vector as the tol parameter.
To check for termination, the algorithm should check if [f1, f2, ..., fn] < [tol1, tol2, ..., toln].
Any opinions on this?

If you use DefaultMultiObjectiveTermination then ftol already refers to the normalized objective space.
Please see https://ieeexplore.ieee.org/document/9185546 for more details.


fire function after rivets binding completed?

I'm loading a large table of events using rivets and as the page opens the user sees the rivets data binding tags:  e.g.  {event.name} until the data has been fetched via ajax and bound to the dom elements via rivets.bind()
Is there a way I can fire a function after all binding has completed so I can hide the table body until all the events are loaded?  Something like rivets.bind(...).done(function () { ... } );
Sorry this is kind of worded poorly, let me know if additional information is needed.

rivets.bind() is synchronous, so you could call rivets.bind() after all your Ajax calls have returned, then unhide your table. Or use Promise.all() with your Ajax calls to know when they're all done. This isn't really a rivets issue per se, it's up to you what you do before and after your Ajax calls.

@jtrutwin Did this solve your issue? I am closing it for now, I can reopen if it didn't.

Yes @Leeds-eBooks - I should've done more investigating before opening this ticket.  Thanks for your reply!

@jtrutwin great, no problem!


Links on docs are sometimes getting changed with extra doc id

To Reproduce
Steps to reproduce the behavior:

Visit https://docs.openrefine.org/technical-reference/build-test-run/
Scroll down and find the section Testing
Hover over the link for you must go through the installation process
Click on link and another page comes up with Page not found

Current Results
It adds in an extra /build-test-run/ into the URL erroneously as
https://docs.openrefine.org/technical-reference/build-test-run/functional-tests
Interestingly, sometimes if I refresh my browser, then the link does appear correctly, and other times it adds in the extra /build-test-run/
Expected Behavior
I expected that the link would navigate to
https://docs.openrefine.org/technical-reference/functional-tests
which is a usable and valid link, but instead
Screenshots

Datasets

Additional context

I think this might just be some bad links in the technical reference section - I'll take this and check through it all

Ah - no if its intermittent obviously it's not just bad links. I'll investigate

It does not seem intermittent to me, the link is just always broken.

I think this is indeed solved by #3821. Closing, feel free to reopen if it happens again.


pcre: 8.37 with patches -> 8.38

Please delete patch files that aren't needed any more. Also, this PR should be opened against the staging branch, I suppose.

@peti: will delete patch files, and move the PR to staging branch.


Update buildenv

To fix
This only checks for the presence of python3. It does not install python3
python3 is not found
Python3 not found. Please install https://www.ibm.com/products/open-enterprise-python-zos

.. when sourcing all envs using zopen-importenv

Fixed in latest commit/release.


Prepare changelog for RC9

Yep, I was just sleep yesterday, will at this at the top before the changes :)

Will the Gradle DSL be frozen once this goes out? Or will further changes be accepted before detekt 1.0.0?
Now the Gradle plugin has been updated I'll look at updating the PR for type resolution that I started some time ago. There may be things related to the Gradle plugin that have to change to support that, which will possibly result in changes to the DSL if it doesn't support what's required e.g. automatic Gradle task generation per source set (maybe it has this, I haven't played with it yet).

Can we release RC9?

Its out.


Various UX Challenges for Ch.2 Challenge 1 & 2

I did a quick run through of some of the challenges and am leaving some thoughts from a UX perspective of a player who is inexperienced with coding. I'm opening up this issue to start a discussion. Depending on how it goes, I may split this into individual issues. But let's discuss below.
Ch.2 Challenge 1 Hashing-2
url: en/chapters/chapter-2/hashing-2
It's not clear to me as a player what the success metric is to move on to the next section. It's not finding a hash with a "0". That's in pt. 2. To solve this, maybe we can say in the success bar at the bottom: "Nicely done! Now that you see how hashes work, continue to learn more about hashing!"

Ch.2 Challenge 1 Hashing-6
en/chapters/chapter-2/hashing-6
It took a while to see "need a hint". This should appear faster. Also the word "trigonometry" is hidden. IMO it shouldn't because it's already hidden behind a tool tip. Lastly, I suggest copy changes from "Answer" to "Try typing: trigonometry"

Ch.2 Challenge 2 Hashing-6
url: en/chapters/chapter-2/scripting-1
There is a copy mistake. Computem->computer

Ch.2 Challenge 2 Scripting-2
url: en/chapters/chapter-2/scripting-2
I don't know if this is because I don't know how to code. But I got stuck on this challenge section because I didn't know what formula to write. Considering how in Ch. 1 we hand held people through decoding op_returns, should we do something similar for this challenge? Perhaps we can add a tooltip with the formula if people don't know how to start?

I have same thoughts for Ch.2 Challenge 2 Scripting-2. I think including a hint as in the other challenges will help here @ecurrencyhodler.

Thanks for testing everything, that's exactly what we need to do.

For Ch.2 Challenge 1 Hashing-2, the copy in the design reads Alright, nice work playing around. Let’s move on., it  (or something similar) just needs to be implemented (let's do that).
I agree that the extra hover in the tool tip is unnecessary. The word answer is also a little misleading as there is not a single answer. "Try typing: trigonometry" sounds good. There also seems to be a visual glitch with the tooltip (arrow has no background color).
For Ch.2 Challenge 2 Scripting-2, I also don't know what the answer should be. That is where the dev crew is best situated to provide some possible answers that users are likely to enter. Once we have that, we can figure out how to provide tips for non-coders (like me) to also succeed.

I agree with Christoph's reply.
For the last one, Ch.2 Challenge 2 Scripting-2 I think at minimum we need to mention that the sha256 function that is being imported generates a hash, perhaps even showing a one line example of how this library is used (I haven't taken a look a the latest wireframes so apologies if I'm repeating something that is already there). The only downside to this is we'd have to repeat this helper text for JavaScript.
From there I would expect the user to know how to write an if statement that checks if the resulting hash has 5 leading zeros. We should be careful about how much handholding we do, because every time we do it, it's expected that the same amount of assistance will be provided in the next chapter.
As some of the feedback showed, we have users that are so advanced they are breaking our terminal, expecting it to do things a real terminal would. Yet on the other end of the spectrum, we have some users that felt like we didn't do enough coding explanations or hand holding. At some point we're going to need to really double down on who the target user is. My preference would be to cater to a more advanced audience because it requires less work, then slowly layer in more help text, tool tips, examples, and general suggestions as feedback comes in. This way, accommodating to a more beginner audience becomes an iterative process.

Okay so let's do this:

[ ] Ch.2 Challenge 1 Hashing-2: Change success message to Alright, nice work playing around. Let’s move on.
[ ] Ch.2 Challenge 1 Hashing-6: Update copy to "Try typing: trigonometry" and remove the hover functionality
[ ] Ch.2 Challenge 2 Hashing-6: Update copy from computem -> computer
[ ] Ch.2 Challenge 2 Scripting-2: Let's discuss this on our call. Will probably file a separate issue for this.

FWIW this is the answer in python:
from hashlib import sha256
def find_hash(nonce):
hash = sha256(str(nonce).encode('utf-8')).hexdigest()
return hash

The proposed solution here is to update the challenge copy slightly and to leave references to the sha256 library.
If someone gets stuck, we assume they'll google/stackexchange the solution which should be easy to find. This is also the behavior many devs take anyways when trying to figure out problems.
@benalleng will propose copy in figma. We'll use this issue to track whether it's been resolved.

Figma

Here is the resource i found to be the closest to our desired input

I can't speak to the resources. Left a comment in figma wrt to copy.

Great updates, @benalleng. I managed to solve the challenge with this code:
return crypto.createHash('sha256').update(nonce).digest('base64');
The given JS resource was not helpful enough and I had to search further. Here's the one that led me to the correct solution.
Specifically, the crypto.createHash() function description only discusses the algorithm and options arguments. I could not figure out how to make it use the nonce. The page states there a Hash object is returned, but there is no further documentation on that object. Since that thing is called Hash, I thought this would be a text string and the correct output I need. Only via the second page did I understand that I need to chain multiple functions together.
Maybe a good approach is to have two types of links? One to the documentation for people who just need a bit more detail. And a second one to a tutorial that guides readers towards the solution.

@GBKS well described article!!
Giving options to the user will be a better UX approach I guess.
The second article is really very helpful and it will drive the user to the exact solution.

I have created a draft that doesn't use any dynamic copy. I'm curious to see what people think

And the dynamic code...


Better logo

I kinda just threw this together during the rewrite. Something more professional (but not too boring) would be nice.
Current design:

Hi @Col-E ,, what about this logo?

I like how the top-middle one has a faint gradient and is a light-on-dark. I'm not sure about the double ring design. I see how it works aesthetically, simply removing one of the rings would break the composition. But as a whole the pattern doesn't vibe with me.
That being said I'm notoriously indecisive among my friends  ¯\_(ツ)_/¯
I'd like to hear what others have to say.

Good job! A bit of constructive criticism here, I think the logo is just a bit confusing. I do love the line approach though, its simplicity adds a bit more of a professional touch. Would it be ok to ask to see others with a similar touch?

I think that at least one R inside a C would not be the best idea?

New logo for now is a mix of the old logo and the Volkswagen logo aesthetics.

Closing, but if you have interesting ideas/examples feel free to share.


Cache parsed ranges

If range is already parsed, we can cache it and use without wasting resources.

Would you like to add some additional lib here (vavr/guava) or write it from scratch?

I thought about something simple. I didn't any research about available options. Maybe this issue isn't important. Honestly I don't know 🤷♂
Adding another libs to this simple project can unnsescesary complicate it.


Include Gradle Example In README

Can You include Gradle example in readme thanks.

good point, done. thanks a lot


TileMap is not saved in FighterEvo.Instance

Currently if FighterEvo.Instance.TileMap is used, not the generated tilemap is returned, but one where every Tile is of type None.

Fixed with newest commit


Obsidian plugin internal links with folders

Bug description
Hey,
I was playing around with folders and noticed they don't work.
I have an docs/index.md with
---
created: 2024-11-23 21:23
parent:
  - []
publish: "true"
---

---
## 📝 Notes
[[Something]]

And then a folder with
docs/Something/Something.md
In Obsidian this internal link works but on mkdocs it will try to route it to localhost:8000/Something.md instead of localhost:8000/Something/Something.md
I've also tried changing the folder name, in case it was because they are named the same, and that caused the issue, but no dice.
I also tried to enable backlinks but instead, that seemed to just add some hash that's visible on the screen

Expected behaviour
Internal links should work the same way they do in Obsidian and be able to link to other pages
I'm also not sure if the hash for backlinks should be visible.
Reproduction steps
Create a note with an internal link to another note that's within a folder.
Operating system
Linux
Python version
Other
Link to git repository
No response
Log output
No response
Contact details
<EMAIL_ADDRESS>

Python version
I am using 3.13 from a docker image I quickly made https://github.com/ALameLlama/mkdocs-publisher-image

Can you share yours mkdocs.yml file with me?

site_name: Llama's Notes
site_url: "https://notes.mydomain.au/"
theme:
  name: material
  # logo: assets/flame.svg
  # favicon: assets/favicon.ico
  icon:
    repo: fontawesome/brands/github
  palette:
    # Palette toggle for light mode
    - media: "(prefers-color-scheme: light)"
      scheme: default
      primary: deep-purple
      toggle:
        icon: material/brightness-7
        name: Switch to dark mode

    # Palette toggle for dark mode
    - media: "(prefers-color-scheme: dark)"
      scheme: slate
      primary: deep-purple
      toggle:
        icon: material/brightness-4
        name: Switch to light mode
plugins:
  - pub-obsidian:
      obsidian_dir: .obsidian
      templates_dir: Templates
      backlinks:
        enabled: false

This is what I was testing with, and setting
plugins:
  - pub-obsidian:
      obsidian_dir: .obsidian
      templates_dir: Templates
      backlinks:
        enabled: true

to recreate the issue

It seems like you are missing some settings and some are not needed. First of all, the missing settings are my fault because they are not mentioned in the documentation. So start with it. You need to add this section to yours mkdocs.yal file:
markdown_extensions:
  - admonition
  - attr_list
  - pymdownx.details
  - pymdownx.superfences

I'm not fully sure it those are all that is needed. Just let me know if it works.
As for some not needed values, take a look at this:
plugins:
  - pub-obsidian:
      templates_dir: Templates

This is an equivalent to your config. You don't need to provide the same values as one that are default. Also backlinks are enabled by default when you add pub-obsidian to the plugin section. The only value that is different, is your name for the template directory.

That's looking better, it's using hiding the hash now, but it still has
Backlinks:
??? backlink "None"

https://github.com/user-attachments/assets/38e15301-a365-4918-b401-f07f88693a6a
am I also miss understand this line?
https://github.com/mkdocs-publisher/mkdocs-publisher/blob/main/mkdocs_publisher/obsidian/backlinks.py#L67
I thought setting the site_url in the config would override what I assume is coming from the mkdoc serve command.

Thanks for all your testing.
So try to fix those ??? backlink things. I have tested it on one of my own pages and it seems that the minimal required set of markdown_extensions is as follow:
markdown_extensions:
  - admonition
  - attr_list
  - md_in_html
  - pymdownx.details
  - pymdownx.superfences

Adding md_in_html should solve this issue.
As for not working links, let's try to add dev_addr value as follow
site_name: Llama's Notes
site_url: "https://notes.mydomain.au/"
dev_addr: <IP_ADDRESS>
# or
dev_addr: <IP_ADDRESS>:8123

On some systems (probably mostly on MacOS) you need to provide local host address as <IP_ADDRESS> not as <IP_ADDRESS>.
There could be also one potential setting that is missing in your mkdocs.yml file:
use_directory_urls: true

It should be close to site_url on the same indentation level.
The line you have mentioned:
backlink_link = f"{self._mkdocs_config.site_url}{page.url}{original_link.backlink_anchor}"

is constructed like this:

self._mkdocs_config.site_url is a domain name part, in your case it will be a site_url (for mkdocs build command) or dev_addr (for mkdocs serve command)
page.url is a subdirectory part of a link (for example home/)
original_link.backlink_anchor is an anchor link to a backlink (this is this wired hash you have seen, like this one #abb0de8633b560c832e90de67720c83f).

Please let me know if this helped, so I can add some additional information into documentation.

Adding that plugins seems to be better, I can see to creating a drop down with the title "None", I'm not sure that entirely correct.
I tried to set the dev_addr and that didn't seem to do anything, I have this running under unraid (slackware linux) using this docker container ALameLlama/mkdocs-publisher-image which is why it was done using <IP_ADDRESS> so it's accessible from other sources then localhost.
the site_url option doesn't seem to be working. I have it set to the domain that notes are hosted on but it's still returning <IP_ADDRESS>:8000 on the links which is what the docker container uses when it runs mkdoc serve but I don't think this is issue with the plugin and this is a PEBCAK on my end so I'll try and play around with that to see if I can get that working.
Thanks for your help :)
site_name: Llama's Notes
use_directory_urls: true
site_url: "https://notes.mydomain.au/"

theme:
  name: material
  icon:
    repo: fontawesome/brands/github
  palette:
    # Palette toggle for light mode
    - media: "(prefers-color-scheme: light)"
      scheme: default
      primary: deep-purple
      toggle:
        icon: material/brightness-7
        name: Switch to dark mode

    # Palette toggle for dark mode
    - media: "(prefers-color-scheme: dark)"
      scheme: slate
      primary: deep-purple
      toggle:
        icon: material/brightness-4
        name: Switch to light mode
plugins:
  - pub-obsidian

markdown_extensions:
  - admonition
  - attr_list
  - md_in_html
  - pymdownx.details
  - pymdownx.superfences

The biggest question here is: what is your final goal? Do you need to host a build page and just use docker to do it or serve a live page while editing content/md files? Please describe your use case here because I have a feeling that you approaching it a bit from a wrong side.

While you're not wrong, the proper way to do this would be to have something that runs mkdocs build and moves it to some web server (Apache, Nginix). I just wanted something that will hot reload when I drop in new files without needing to build it and can be viewed via a domain.

For this kind of stuff, you should use CI/CD like GitHub Actions. Have in mind, that mkdocs serve doesn't produce files like mkdocs build, it only serves for content development purpose, so your entire idea will not work either. If you want to know how GitHub Actions can be set, take a look at this project documentation repo: https://github.com/mkdocs-publisher/mkdocs-publisher.github.io/blob/main/.github/workflows/deploy-pages.yml
I have a similar setup for other projects like: https://testerembyc.pl (spread over 2 repositories, one for documentation, other just for file hosting over GitHub Pages) and https://slonzaczqa.pl
The only reason to use Docker would be to:

create a live server that will do the same as mkdocs serve so you don't have to install Python and all dependencies, but for that you need to mount docs_dir directory and mkdocs.yml into Docker
create a build that will do the same as mkdocs buil so you don't have to install Python and all dependencies, but for that you need to mount docs_dir, site_dir directories and mkdocs.yml into Docker
Both solution and use cases are ok and the second one is much simpler to achieve, but either of them will not work as you think. The only thing you will achieve is removing a need to Python and dependencies installation. Nothing more.


subsurface: 4.6.0 -> 4.7.2

Motivation for this change
The previous version does not build:
/tmp/nix-build-subsurface-4.6.0.drv-0/subsurface/desktop-widgets/plugins/facebook/facebookconnectwidget.cpp:24:0:
/tmp/nix-build-subsurface-4.6.0.drv-0/subsurface/desktop-widgets/./mainwindow.h:16:27: fatal error: ui_mainwindow.h: No such file or directory

libmarble dependency was replaced by googlemaps.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[x] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

/cc maintainer @mguentner

LGTM, thanks!


Why labels printed are always 1?

from tensorflow.examples.tutorials.mnist import input_data
data_sets = input_data.read_data_sets('.', False)
images, labels = data_sets.train.next_batch(50)
print(labels)

when i use the code above to show the labels, they are always [1,1,1,1,......,1,1,1]. Can anyone help me?

I think you can inspect your code.Because my labels are right, But I have a new problem, how to make a two-classify

Idk if this is even relevant to you anymore, but jic. anyone else has this problem; if you're using the provided test dataset, or another one with only two labels, then it might be because of line 15 in the python file
for dirname in os.listdir(name[0])[1:]: # [1:] Excludes .DS_Store from Mac OS
this removes the first result from the list, regardless of the name.
I suggest replacing it with
for dirname in os.listdir(name[0]): 	if dirname == '.DS_Store': # Mac OS stuff 		continue
or just removing the slicing operation ([1:]) altogether, since it's not important on a unix/linux system.
I'm mostly just writing this for anyone else who might want to use this repo, but encounters the same error


Added Italian Localization

Added a full italian localization of the godot interface

Could you rename the file to it.po? It's not necessary to make a country-based difference for Italian, is it?

To do it:
git mv tools/translations/it_IT.po tools/translations/it.po
git commit --amend
git push --force origin master

(if origin is your own fork)

Renamed the file, and by the way you are right, no need for a country based difference


Blob vs Data lake

I was wondering why do we prefer blob storage here instead of a data lake (cold)? or even why do we prefer cosmos db over data lake (hot)?
Is there any reason to use data lake at all?
because when i look on the numbers (and i might missed somthing) azure data lake cost as much as a blob storage those days. as for cosmos vs data lake i'm having a bit more trouble to compare them.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: aa3f2c8a-9d2a-579b-6cb7-4e81fb561067
Version Independent ID: 0d48338a-52aa-f518-82c3-e5ac281bd8f5
Content: Azure IoT reference architecture - Azure Reference Architectures
Content Source: docs/reference-architectures/iot/index.md
Service: architecture-center
Sub-service: reference-architecture
GitHub Login: @MikeWasson
Microsoft Alias: pnp

@r3dr4gon Thanks for the feedback! We have assigned this issue to the content author to review and update accordingly.

AB#160211 - Thanks for reporting - this issue is under review

Thanks for the suggestion. We've taken this into our backlog for review and a possible update shortly. Closing for now.


React app does not load on publish instance due to HierarchyPageImpl

When there is no access to /conf folder ( and hence the page policy) to anonymous user on publish instance, then content attribute is empty as it gets populated via HierarchyPageImpl and code is not able to access conf folder

so to fetch the model json it accesses the current page's model

But when anonymous user has access to 'conf' folder, then it is populated

and now there are two calls to for model.json

because of these two calls nothing gets loaded in the app. I know the call is originated by page model manager, but the app should load in case of two calls as well, or the page specific call should not be initiated when rootmodel url is populated.
For now I removed the content attribute in rootmodel meta tag altogether, please let me know the better and appropriate solution.

The two calls originate only on dispatcher - on publish, when cq:pagemodel_root_url is populated, only once call(rightly so) on the root page is sent to fetch the model, but in dispatcher with the shortened url and without .html , two calls originate. Please let me know if a cleaner solution is available.

Would giving read access to the project templates and policies to anonymous solve your issue?

This is the same issue as https://github.com/adobe/aem-spa-project-archetype/issues/75, and it should be fixed by https://github.com/adobe/aem-spa-project-archetype/pull/131.
Please open a new issue if this isn't resolved for you in the next version :)


Shortcut for making relative URLs absolute.

When cropping part of an HTML document into a new document created as follows:
var target = await (IHtmlDocument)BrowsingContext.New().OpenAsync(x =>
{
    x.Content("<!doctype html>");
    x.Address(originalUrl);
}).

I want to change all relative image and CSS URLs to absolute URLs in the target document. I can add the copied region with:
target.Body.Append(croppedRegion.Body.ChildNodes.ToArray());

Then loop through all images, links etc in the following way:
var images = target.Images;

foreach (var image in images)
{
    image.Source = image.Source;
}

This will set the relative URL to an absolute URL but it seems like a nasty way of achieving the result. Is there a better way?

Thanks for your response. I think your suggested form is more descriptive / less confusing for future maintainers, but as I have tests around this part and commented the usage it should be understandable to anyone who comes across it.
It's probably not a common use case and there's a decent workaround so feel free to close the issue but like you say it's an interesting design challenge to work out the best API for it. My initial thought is it could be some option on the document.ToString() (or HtmlDocument specific ToString() style method I have forgotten the name of) but this would restrict it to use cases where the document is being output as a string.

I'll leave it open for now. I am not sure if / when I have a good (generic) solution for this.

After giving it much thought today I don't think there can / will be a generic version for this. There are many reasons:

I can add a helper to do the transformation, but this would be a one-time thing (i.e., if something changes then the new URLs may be relative again; not very good experience)
What is an URL is very domain specific, i.e., you care about the image URLs, but others may care about the general hyperlinks, and somebody else may care only about URLs referencing stylesheets, ... going over all URLs later will suffer from having to know all places where a URL is used (a better way is to embed this in the URL representation algorithm, however, then we need an option for this and perf. will suffer)

Long story short I think that this feature would be too domain specific and cannot be easily generalized. I'll close the issue for now.


Cant mount a tag to a container if it was not unmounted

Mounting a tag in a container makes the property root.riot set to true.
This line : http://git.io/jWuJ makes that we cant mount a tag to a container if there is already a mounted tag inside because the mount method checked here : http://git.io/jWuh doesnt exist on the instancied tag (and in my opinion this is a very bad practice, but it's another story).
I can understand that it is the expected behaviour, but to save time to people that would encounter the same problem ; we should :

either allow to mount a tag without having to call unmount before
or make it more explicit in the doc
or throw an error when the container already owns a mounted tag
or print a warning in the console

Please let me know your feeling

@GianlucaGuarini @tipiirai  ?

Why would you like to mount the a tag more than once in the same container? Why do you think that checking if a tag was already mounted is a bad practice? I think probably a console.warn could be the best option even if I think we cannot protect developers from them self anyway

I have something like that :

<body>

    <div id="container">
    </div>

</body>

and I use riot tags to store full page content, and I update the container when a route changes by mounting a riot tag inside

@SneakyBobito related to this? https://github.com/muut/riotjs/issues/575#issuecomment-91242620

Not really, if I unmount, then i can mount again without problem ! I'm also using serverside precompiled tags

fixed with riot 2.0.15