Deploying via colmena does not set system.nixos.revision and similar

When I deploy a system with colmena apply and run nixos-version in the deployed system I get:
23.05pre-git (Stoat)

I have my hive configuration in flake.nix (if it matters).
When deploying the same configuration via nixos-rebuild --flake .#server --target-host server switch, nixos-version shows more information:
23.05.20230702.09c7486 (Stoat)

It would be nice, if systems deployed with colmena showed detailed version information as well.

BTW I can get proper version info in the target system if I have the following in my flake.nix (copied and updated from nixpkgs):
  outputs = { self, nixpkgs, ... }@inputs: {
    colmena = {
      meta = {
        nixpkgs = import nixpkgs {
          system = "x86_64-linux";
        };
      };

      defaults = { pkgs, ... }: {
        # This module will be imported by all hosts

        # Let 'nixos-version show nixpkgs date and revision.
        system.nixos.versionSuffix =
          ".${nixpkgs.lib.substring 0 8 (nixpkgs.lastModifiedDate or nixpkgs.lastModified or "19700101")}.${nixpkgs.shortRev or "dirty"}";
        system.nixos.revision = nixpkgs.lib.mkIf (nixpkgs ? rev) nixpkgs.rev;
        # Let 'nixos-version --json' know about the Git revision of this flake.
        system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
        ...

It would be nice, if this is the default.

@wentasah Thanks a ton.
I'm wondering though, does this mechanism work with nodeNixpkgs? For cases where different versions of nixpkgs are used on different machines?

I don't use nodeNixpkgs myself. I guess it would "work", but the reported version would be incorrect :-( To have a correct version, one would have to set versionSuffix manually for each machine. Something like:
node-a = {
  boot.isContainer = true;
  system.nixos.versionSuffix = ".${nixpkgs-custom.lib.substring 0 8 (nixpkgs-custom.lastModifiedDate or nixpkgs-custom.lastModified or "19700101")}.${nixpkgs-custom.shortRev or "dirty"}";
  deployment = { targetHost = "node-a"; };
};

where nixpkgs-custom corresponds to the nixpkgs configured in nodeNixpkgs for the given node.
For this to be done automatically, I guess that colmena would have to accept nixpkgs values as the result of builtins.fetchTree, which is how flake inputs are obtained. The resulting set contains all needed metadata. Currently, it accepts only evaluated nixpkgs, which looses the metadata.
Unfortunately, fetchTree is still unstable (again), but hopefully gets stable soon.


Setting defaults when not computing grads

I can make sense of the OAT one, but the rest I'm not sure there's a good way to know -- I take this code to be "the answer" :slightly_smiling_face:


LightningCLI docs example for EarlyStopping missing required args in config file

📚 Documentation
Error Description
In the lightning CLI tutorial (https://lightning.ai/docs/pytorch/stable/cli/lightning_cli_advanced_3.html), misleading error exists in the tutorial on how to set callbacks in yaml files.
How to fix?
The original tutorial gives the following simple configuration file that defines two callbacks
# wrong sample configuration file in tutorial
trainer:
  callbacks:
    - class_path: lightning.pytorch.callbacks.EarlyStopping
      init_args:
        patience: 5
    - class_path: lightning.pytorch.callbacks.LearningRateMonitor
      init_args:
        ...

However, this example yaml file does not work correctly. The following yaml file can get the correct results.
# Fixed config.yaml
trainer:
  callbacks:
    - class_path: EarlyStopping
      init_args:
        patience: 5
    - class_path: LearningRateMonitor
      init_args:
        logging_interval: 'epoch'

What version are you seeing the problem on?
lightning v2.1.2 & v2.2.1
How to reproduce the bug
# main.py
from lightning.pytorch.cli import LightningCLI
from lightning.pytorch.demos.boring_classes import DemoModel, BoringDataModule

def cli_main():
    cli = LightningCLI(DemoModel, BoringDataModule)

if __name__ == "__main__":
    cli_main()

# config.yaml
trainer:
  callbacks:
    - class_path: lightning.pytorch.callbacks.EarlyStopping
      init_args:
        patience: 5
    - class_path: lightning.pytorch.callbacks.LearningRateMonitor
      init_args:
        logging_interval: 'epoch'

Error messages and logs
usage: main.py [-h] [-c CONFIG] [--print_config[=flags]] {fit,validate,test,predict} ...
error: Parser key "trainer.callbacks":
  Does not validate against any of the Union subtypes
  Subtypes: (typing.List[lightning.pytorch.callbacks.callback.Callback], <class 'lightning.pytorch.callbacks.callback.Callback'>, <class 'NoneType'>)
  Errors:
    - Problem with given class_path 'lightning.pytorch.callbacks.EarlyStopping':
        Validation failed: Key "monitor" is required but not included in config object or its value is None.
    - Not a valid subclass of Callback
      Subclass types expect one of:
      - a class path (str)
      - a dict with class_path entry
      - a dict without class_path but with init_args entry (class path given previously)
    - Expected a <class 'NoneType'>
  Given value type: <class 'list'>
  Given value: [Namespace(class_path='lightning.pytorch.callbacks.EarlyStopping', init_args=Namespace(monitor=None, min_delta=0.0, patience=5, verbose=False, mode='min', strict=True, check_finite=True, stopping_threshold=None, divergence_threshold=None, check_on_train_epoch_end=None, log_rank_zero_only=False)), Namespace(class_path='lightning.pytorch.callbacks.LearningRateMonitor', init_args=Namespace(logging_interval='epoch', log_momentum=False, log_weight_decay=False))]

More Info
I confirmed that I have installed the latest jsonargparse using pip install "jsonargparse[signatures]"
This tutorial should have existed for a long time. If this error did not exist before, I suspect that jsonargparse may have updated the method of parsing callback configuration.
cc @borda @carmocca @mauvilsa

The error occurs because the EarlyStopping callback has a required argument 'monitor' that wasn't listed there. The code snippets there are meant to illustrate the point of configuring any callback from the config file. There is no model code so it's not really possible to set a meaningful monitor value, but if you feel it's better we can include an arbitrary monitor value like monitor: val_loss or choose a different callback for demonstration purposes.

You are right, this problem occurs because the EarlyStopping callback requires a monitor argument, not an address resolution problem as I thought.
Since DemoModel lacks a real validation_step, I propose to replace EarlyStopping with another callback, such as
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
  init_args:
    save_weights_only: true

This configuration works fine and has been tested by me.
I will submit a PR right away.


fix: remove wrong entry in the file

RSTUF is MIT licensed.
Removed some wrong entry in the file.
Signed-off-by: Kairo de Araujo<EMAIL_ADDRESS>

Codecov Report
Base: 99.42% // Head: 99.42% // No change to project coverage :thumbsup:

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #188   +/-   ##
=======================================
  Coverage   99.42%   99.42%
=======================================
  Files          12       12
  Lines         519      519
=======================================
  Hits          516      516
  Misses          3        3

Impacted Files
Coverage Δ

repository_service_tuf_worker/interfaces.py
100.00% <ø> (ø)

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

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


Failed to install dependencies: jupyterlab/cells

After cloning, npm install fails instantly. The error message is pretty self-explanatory.
npm ERR! 404 'jupyterlab/cells' is not in the npm registry.
Here's the whole thing:
⊨ npm install                                                                                (thesis) ~/t/jupyterlab_app
npm WARN package.json<EMAIL_ADDRESS>No repository field.
npm WARN package.json<EMAIL_ADDRESS>No license field.
npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 'jupyterlab/cells' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'jupyterlab_app'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Linux 4.9.0-3-amd64
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/oersted/temp/jupyterlab_app
npm ERR! node -v v4.8.2
npm ERR! npm -v 1.4.21
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/oersted/temp/jupyterlab_app/npm-debug.log
npm ERR! not ok code 0

Hi @oersted. I'm having a hard time recreating this. jupyterlab/cells should be a valid package. Can you tell me what version of npm/node you are using?

Hi @oersted. You most likely need to update npm and node. I'm currently on 5.3.0 for npm and 8.0.0 for node. You appear to be on 1.4.21 and 4.8.2.

Closing this for now. Let me know if you have any questions.


Fix path to winjs dependency

Motivation and Context

Fixes #326
Description

Properly resolve the path to our dependency instead of guessing it.
Testing

Manual:
$ cordova create cordovaWindows7Test
Creating a new cordova project.
$ cd cordovaWindows7Test
$ cordova platform add ~/code/cordova-windows
Warning: using prerelease platform<EMAIL_ADDRESS>Use 'cordova platform add windows@latest' to add the latest published version instead.
Adding windows project...
Creating Cordova Windows Project:
	Path: platforms/windows
	Namespace: io.cordova.hellocordova
	Name: HelloCordova
Windows project created with<EMAIL_ADDRESS>Plugin 'cordova-plugin-whitelist' found in config.xml... Migrating it to package.json
Discovered saved plugin "cordova-plugin-whitelist". Adding it to the project
Installing "cordova-plugin-whitelist" for windows
Adding cordova-plugin-whitelist to package.json

Unfortunately, a regression test is not easily to be had. The Problem is that, in our E2E tests, create copies the node_modules folder to where it expects it later when copying the winjs file. In a multi-platform project setup via CLI, the layout is different and node_modules is not copied in the first place.

Temporarily fix via cordova hook when using unfixed version 7.0.0:
config.xml:
<platform name="windows">
        <hook type="before_prepare" src="hooks/win_winjs_fix.js" />
</platform>

hooks/win_winjs_fix.js:
const path = require('path');
const shell = require('shelljs');
const fs = require('fs');

module.exports = function (ctx)
{

    if (!ctx.opts.platforms.includes('windows'))
        return;

    return new Promise(function (resolve, reject)
    {
        const root = ctx.opts.projectRoot;
        const projectPath = path.join(root, 'platforms', 'windows');
        const destinationDirectory = path.join(projectPath, 'platform_www', 'WinJS', 'js');
        const destBaseJsPath = path.join(destinationDirectory, 'base.js');
        //var srcBaseJsPath = path.join(root, 'node_modules', 'winjs', 'js', 'base.js');
        const srcBaseJsPath = require.resolve('winjs/js/base');
        fs.mkdirSync(destinationDirectory, { recursive: true });
        shell.cp('-f', srcBaseJsPath, destBaseJsPath);
        resolve();
    });

};


fix(cli): add cli default dest to be src

closes #32

@jpsc I think we should drop this PR in favor of PR #38 (which explains why).


fix tests and templates.go from #230

fix tests and templates.go from #230

Hi @anhowe, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Anthony Howe). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;


Drop flatten-packages dependency

Removing this will help eliminate the annoying warning:
npm WARN deprecated<EMAIL_ADDRESS>wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years.

I think that new npm flattens automatically, so it should be OK to get rid of this. This will probably also break node 4.x since that doesn't support current npm, so it'd be a breaking change.

I'm into this idea though, I think we should go forth and drop it.

And done!


periphmraa: Create IndexLookup functions for GPIO, I2C, SPI, PWM.

These lookups provide the MRAA index with the Pin/Bus name as input.
Signed-off-by: Vineela Tummalapalli<EMAIL_ADDRESS>

@arfoll
For one of your comments "2.	The C++ based functions should throw exceptions", I understand i should throw exceptions in the common.hpp file.
But i do not see any of the apis in that file throwing exceptions.
I have come across an api in common.hpp file which does have negative returns on failure, but does not throw exception as below
setPriority(const int priority)
{
return mraa_set_priority(priority);
}
Please let me know if the comment I addressed in common.hpp is the expectation?

Agreed, more functions like these in C++ should throw exceptions, the ones in the I/O modules are much better. This does need improving. Merged with some minor alterations.


Cannot load image onto canvas

When I try to follow along with the tutorial and load a .png onto the canvas, it displays a neon green block with a line through it. I placed the image in public/tiles/ and then loaded it at that location too:
this.load.image('tiles', 'tiles/faune.png')
I don't get any errors on the dev tools console either? It's very strange. The out the box example (where it loads the phaser logo) works just fine, probably because it is not loading it from my filesystem. It might be worth mentioning that I had to use v2.0.0 of Parcel because I couldn't get the previous version to install.

I had this same issue when using Parcel v2 / https://github.com/ourcade/phaser3-typescript-parcel-template/pull/8
I think it's due to the parcel-plugin-static-files-copy devDependency on this line
https://github.com/ourcade/phaser3-typescript-parcel-template/blob/master/package.json#L24 not being compatible with Parcel v2.
If I change that line to "parcel-reporter-static-files-copy": "^1.3.0", and create a .parcelrc file containing the following:
{
  "extends": ["@parcel/config-default"],
  "reporters":  ["...", "parcel-reporter-static-files-copy"]
}

as described at https://github.com/elwin013/parcel-reporter-static-files-copy then it seems to serve from the local public folder successfully.
I also removed this line https://github.com/ourcade/phaser3-typescript-parcel-template/blob/master/package.json#L35 as there doesn't seem to be a watcher currently for v2.


Upgrade/0.15.0

adds spago
use esmodules instead of commonjs
auto formatting

Can this be merged?

👋 Hi @pelotom -- some folks have asked to add this to the package sets, but we're not able to do so without a tag pointing to the 0.15-compatible release. Would you mind tagging a release and then pinging me here and I can take care of adding your package to the package sets for you? Thanks!


Create New Project Page: Add content space for future "how to" copy.

Soon, I want to put "getting started advice and instructions" on the Create New Project page. So all we need is the editable markdown 'widget' / area right between the page header and the start of the form.

Assigning Chris hoping that he can very easily knock this one out sooner than later.

@rmcmillen50 After our discussion, I think it'd be faster to request hard-coded solutions if we'd want the project edit page headers to change. Is there a copy ready or could we close this and reopen a new ticket for the copy change?

@aharley40 to make sure i'm following you accurately, you're saying if I wanted to add 3 sentences of body text below, the "Create new project" header, we ought to just hard code it to that page? If so that's cool as I doubt we'll need to change this very often.

If it'll be the same thing every is supposed to see when creating/editing a project then yup.

@aharley40 let's insert a staff-editable markdown content block like the announcement section on the homepage has

@themightychris Gotcha

I thought there was a complexity with doing that @aharley40? That's what I initially asked for and we discussed, no?

@rmcmillen50 Apologies, I'd only ever seen the admin level view, and didn't know the home screen was configurable in the same way.

@rmcmillen50 Available for review at laddr.harley.dev after you've added the following to your host file <IP_ADDRESS> >harley.dev. If you have your own laddr instance, the branch is issues/163.

Resolved in 74b44192204c4d10a31b3ebb16d85223e1e85eaa and pushed live to cfp.org


Deadlock when running statements created outside of transaction in transaction

Describe the bug
code:
  Future<void> changeNoteParent(
      {required String noteId,
      required String parentNoteId,
      required String newParentNoteId,
      required int newPositon}) async {
    final branch = await getBranch(noteId, parentNoteId);
    final sql = db.update(db.branches)
      ..where((branches) =>
          branches.noteId.equals(noteId) &
          branches.parentNoteId.equals(parentNoteId));
    final data = BranchesCompanion(
      parentNoteId: Value(newParentNoteId),
      position: Value(newPositon),
      utcModified: Value(TimeTool.utcms),
    );
    await db.transaction(() async {
      await db.customStatement(
        'UPDATE branches SET position = position + 1 WHERE parentNoteId = ? AND position >= ?',
        [newParentNoteId, newPositon],
      );
      await sql.write(data);
      await db.customStatement(
        'UPDATE branches SET position = position - 1 WHERE parentNoteId = ? AND position >= ?',
        [parentNoteId, branch.position],
      );
    });
  }

log:
flutter: Drift: Sent SELECT * FROM "branches" WHERE "noteId" = ? AND "parentNoteId" = ?; with args [4Rj1ynrk23yKtMkWb1qhQ, EWcj_F9G8Tag_drUt58yO]
flutter: Drift: Sent BEGIN TRANSACTION with args []
flutter: Drift: Sent UPDATE branches SET position = position + 1 WHERE parentNoteId = ? AND position >= ? with args [HJvAmgl-clPpnTdJzZGnp, 1]

As shown above, only one SQL statement is performed, and it is not executed down.

The problem appears to be creating the sql statement outside of the transaction and then running it inside of the transaction. By moving the definition of sql into the transaction, it completes.
This is still a flaw in drift, the statement should run in the transaction if run is called in there.

The problem appears to be creating the sql statement outside of the transaction and then running it inside of the transaction. By moving the definition of sql into the transaction, it completes.
This is still a flaw in drift, the statement should run in the transaction if run is called in there.

I tried it. yes. now it can run.

The drift bug has been fixed in 7f7d2ab1b0a03383eb6acd30ca376026720ce347,  so the original snippet will work in the next drift version.


Enabled interrupts for a pwm timer and possibility to reset the timer…

Enabled interrupts for a pwm timer and possibility to reset the timer for synchronization purposes
Example showing usage can be found at
https://github.com/smeenka/rust-examples/blob/master/nucleo-G070/examples/motors_pwm_interupt.rs
Note this this is a redo of branch feature/pwm_with_interrrupts, to clean up the history

Incorrect pull request to my own repository!


never shutdown ping loop

If we ever shut this loop down, then it will never start again because we start it with a sync.Once. I'm not sure what the best play here is for tests and such with a goroutine that never ends, but maybe it is ok if there can be only one?

Are you sure they don't pile up in tests?   Will we wind up with one per test case?

Will only affect systests I think, and like I said it uses sync.Once to start it, so there can be only one per test process.

I can put a "really shut down now" channel in play if we are nervous about this. The bad behavior I was seeing is that if you keybase logout, then this loop just dies and can't be restarted (because of the sync.Once). I hit that on my Linux machine today when I was logging in and out of all my test accounts when we were doing the SBS stuff.

Nah, better the app runs than the tests don't leak goroutines.

Yeah the app technically works even if this loop is dead, it's just if you go idle for like 15 seconds you get DC'd from Gregor.

👍  if tests pass

Seems fine to me to have goroutine always running.

Wow this somehow failed the chat Docker tests, investigating...

Ugh I think this might be a bug from my Gregor PR I just merged...

I'm going to merge this guys, CI is hosing me, and the failure is totally unrelated.


Add support for deployPercentage in store.publish API

The publish endpoint supports deployPercentage which could be useful for staged deploys.

PR welcome

Hello,
I am willing to make a PR for this change. I've already had a look a the code and the change looks straightforward.
There is just a design decision to make.
Most of the method to call the API have token being a last parameter and I assume this is something to keep in order to maintain consistency.
This leaves two options for the change to the publish method.
Either turning the first parameter to an object, it could look like this:
 async publish({ target = 'default', deployPercentage }, token = this.fetchToken()) {...}

Or adding a new parameter with a default value of null or undefined:
async publish(target = 'default', deployPercentage = null , token = this.fetchToken()) {...}

I can make a first version of the PR based on the first option, let me know if you prefer the second one.

Here is the PR: https://github.com/fregante/chrome-webstore-upload/pull/91

There's actually a PR open here with the answer to that in my review: #90


Initial package loader implementation, including VCS support for git

@jzelinskie: Tests changed to be table drive. Let me know if I missed any.

Will merge into master


Start time option

Is there a way to have the scheduler have a start time? So that we can tell it something like midnight is the start time, so that when the period is set to 15m it checks every 15 minutes on the hour. (2:00, 2:15, 2:45, 3:00, 3:15, etc...) Instead of every 15 minutes from when the service daemon started.

No, there's no cron-like behaviour possible right now. See #452 for a similar request. What would be the usecase for that different behaviour?

Mainly so that as we are going about our day and need to reboot a node, we know when the next scheduled time should be. Being able to go do something else while we wait till then.

Does this solve your issue?
https://github.com/weaveworks/kured/pull/566

No, and I don't think I'd want to edit config just to reboot a node.


Query language

No description provided.

Cool idea of VQL! And it is good that REGEX is still there ;)

Cool idea of VQL! And it is good that REGEX is still there ;)

Thanks for feedback :)
Maybe you have ideas for what to do next?

Cool idea of VQL! And it is good that REGEX is still there ;)

Thanks for feedback :) Maybe you have ideas for what to do next?

I need to check all changes :)!


[5.4] Add Checks for Years greater than 9999

PHP has some difficult handling dates with a year over 9999 for example if you pass a date like "20196-05-25" into Carbon (and DateTime) it will throw an error. However, the date validator considers this date to be valid.
InvalidArgumentException was thrown!  The separation symbol could not be found Unexpected data found. Data missing
#0 ./vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2969): Carbon\Carbon::createFromFormat('Y-m-d H:i:s', '20196-05-25')
#1 ./vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2923): Illuminate\Database\Eloquent\Model->asDateTime('20196-05-25')
#2 ./vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2878): Illuminate\Database\Eloquent\Model->fromDateTime('20196-05-25')
#3 ./vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(450): Illuminate\Database\Eloquent\Model->setAttribute('date_at', '20196-05-25')

The problem with the validateDate is that it is making use of the PHP function date_parse() which is changing the year 20196 to 2006 which is then being pumped into checkdate() which will validate because date_parse() has "corrected" it.
This is loosely related to issue #329 validateDate could be better and is me finally fixing the bug #6329 I reported in 2014 (sorry for the delay).

Related: https://github.com/briannesbitt/Carbon/pull/586
5-digit years are valid (and they do have use cases). We should support them if it is technically doable. Avoiding crazy distant years is a different concern.
If we want to define the end of the world, why should it be 9999 in particular? Maybe we are playing Final Fantasy?
ping @lucasmichot

I would agree that they are technically valid dates but PHP doesn't handle it well and most database engines I believe are commonly used don't support them well, if at all:
echo (new DateTime('20000-01-01'))->format('Y-m-d'); // Wrong Output: `2000-01-01`
echo (new DateTime())->setDate(20000, 1, 1)->format('Y-m-d'); // Correct Output: `20000-01-01`

MySQL doesn't support dates greater than 9999 or lower than 10001, same with MariaDB2
SQLite only supports dates between 0000-01-01 and 9999-12-313
MS SQL only supported date range is January 1, 1753, through December 31, 99994
PostgreSQL does support a year upto 294276 but not below -47135

CREATE TABLE `datetest` (
  `date` date
);
INSERT INTO `datetest` VALUES ('2000-01-01'), ('20000-01-01'), ('200-01-01');
SELECT * FROM `datetest`;

Results from MySQL 5.6.34:

date

2000-01-01

0000-00-00

0200-00-00

There are probably some edge cases where it might be useful, but I would guess that they are extremely rare. Even if we amended the code where Laravel creates the Carbon (or if Carbon was corrected to support it) the validator would still be incorrect as it would see the year 20196 as if it were 2006.
Side Note: I do approve of your edge case of Final Fantasy as I am a long time fan of the series, but SquareEnix don't always use the Julian Calendar, for example Final Fantasy XI has an 8 day week, 30 days in every month and always have 360 days a year so PHP's Date and Time libraries would be useless. I gave up trying to understand how the Final Fantasy XIV's calendar worked.

As I finished writing the previous post I realised that the before/after validation rules might be better examples of the bug I am trying to show and also have a related bug:
$v = new Validator($trans, ['x' => '2020-01-02'], ['x' => 'before:2020-01-01']);
$this->assertTrue($v->fails()); // Test Passes

$v = new Validator($trans, ['x' => '20200-01-02'], ['x' => 'before:2020-01-01']);
$this->assertTrue($v->fails()); // Test Fails

Good points about the DB support, great message btw.
And after all, deviating from e.g. the common "yyyy-mm-dd" mask would break in so many places.
(about final fantasy, I was thinking of the infamous damage limit :)

True @vlakoff
Indeed @mattwells this is a bit a edge case; the fact is that Datetime allows to the Y format (4 digits) but no format is available for date with more than 4 digits, which make since a bit tricky to manage.
The funny thing is that Datetime allows to add 5+ digits year to an instance. So basically the problem is at creation.
In fact all of your new tests should be passing BTW....

I had to handle this situation quite often for a project and I finish by always converting my input to a Carbon instance before validating it (this also handles the leap year issue)

I'm not sure what you are referring to as an edge case so I think a little additional information might be helpful as to why I believe this is needed: Both Firefox and Safari1 do not support  and render it as if the type were text. To the best of my knowledge there is no shim that will replace the date input with its own and correctly display the date in the user's local format (in my case UK dd/mm/yyyy) and send it back to the server in Internet format  (yyyy-mm-dd) like the native date input in Chrome and Edge. This has meant that occasionally some of my users have put in dates that pass validation but causing the system to throw an error. I have resolved the issue by adding the regex as a separate validation rule that is run before the date check.
I ran all the tests both with and without the added validation check that before I made the PR and they failed without the new code. I will double check when I'm back at a computer though.
@vlakoff thank you, I learnt the hard way to make your PRs as detailed as you can and backup any additional notes with as much evidence as you can.

Are we speaking about Datetime validation OR datetime validaton for DBMS ? This are 2 different things.
IMO, the validation should pass for a year with more than 4 digits - the way you store this date (an eventually preprocess) in MySQL or SQLite should be handled in your model.

Laravel is validating a date that isn't being convert into a Carbon instance correctly. I was proposing a change that would prevent dates that wasn't being handle correctly from being allowed to enter into the system to begin with, and justifying this decision/action by demonstrating that other software that is often used as part of the finish product don't natively support either as justification that the edge cases are probably not worth worry about.
Looking in the code for generate the Carbon object in the models in the Illuminate\Database\Eloquent\Concerns\HasAttributes class line 700 also makes a 4 digit year assumption:
    /**
     * Determine if the given value is a standard date format.
     *
     * @param  string  $value
     * @return bool
     */
    protected function isStandardDateFormat($value)
    {
        return preg_match('/^(\d{4})-(\d{1,2})-(\d{1,2})$/', $value);
    }

It might make more sense to update the pattern I have created with the one located here.

Agree that we should enforce 4-digit years and be done. Trying to (approximetely) support 5-digit years isn't worth the trouble.
However, you fix here is wrong, because the regex greatly reduces the number of supported formats.

I see your point, do you think that changing the / and -  to a single character wildcard would be sufficient?

I don't think so. The date rule accepts by design the same formats as strtotime(), which means a lot of them.
The difficulty here is that we don't know the format, which makes it difficult (if not impossible) to check if the date has been silently modified. (this method which is used by the date_format rule)

How about we block dates that match this patter #^(\d{5,}[^\d]\d{2}[^\d]\d{2}|\d{2}[^\d]\d{2}[^\d]\d{5,})$#? It should make dates in Y-m-d or d/m/Y formats and block them if they have a year with more than 4 digits

This should work well. Unless anyone thinks of other pitfalls?
(btw, you don't need the parentheses in this regex)
Also quoting this comment on php.net:

Also, note that the anything about the year 10000 is not supported. It appears to use only the last digit in the year field. As such, the year 10000 is interpretted as the year 2000; 10086 as 2006, 13867 as 2007, etc

edit: the parenthesis are actually needed

If we base our changes on the domain of strtotime; then we should realize they are really based on the domain of unix timestamps. Thus we only support 1901 to 2038. Using this definition would lock us into the gregorian calendar system; the hebrew calendar is currently at year 5777.
It may be impossible for us to support all values due to how php (and the database) works internally, but we should at least document our presumtions and requirements if we decide to limit ourselves into a particular span of values.

The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 UTC to Tue, 19 Jan 2038 03:14:07 UTC. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer.)
Source: https://secure.php.net/manual/en/function.strtotime.php

@mattwells Are you suggesting that we should block incoming values in the validateDate method? Your regex wont allow "February 1st 2017" and many other formats supported by the current validation.

Also you regex will allow February 31

I have now amended my commit to use the regex I have in my previous post. It will now check that dates like 20000/01/01, 20000M01D01, 01-01-20000 fail but allow 2000-01-01, 2000M01D01, Feb 1 2000.

@sisve Unix Timestamp have no such limitation, it is a bug introduced by some developers storing the timestamp in a 32-bit signed integer. PHP doesn't store numbers in this way and doesn't have this limitation. The full note that you took your quote from explains this:

The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 UTC to Tue, 19 Jan 2038 03:14:07 UTC. (These are the dates that correspond to the minimum and maximum values for a 32-bit signed integer.)
Prior to PHP 5.1.0, not all platforms support negative timestamps, therefore your date range may be limited to no earlier than the Unix epoch. This means that e.g. dates prior to Jan 1, 1970 will not work on Windows, some Linux distributions, and a few other operating systems.
For 64-bit versions of PHP, the valid range of a timestamp is effectively infinite, as 64 bits can represent approximately 293 billion years in either direction.

Example:
echo date('d-m-Y', PHP_INT_MAX); // Output: 04-12-292277026596 (maybe different for you)

@lucasmichot The date validator already checks for dates like Feb 31 using the date_parse() and checkdate() functions.
var_dump(checkdate(2, 31, 2016)); // Output: bool(false)

@mattwells My comments regarding the domain of the unix timestamp was based on the presumption that we let the domain of strtotime. If we consider an 32-bit timestamp domain as a bug and ignore it; why don't we do the same for strtotime? We could consider this as a buggy implementation detail of strtotime, and file a bug report for strtotime to support larger year values instead.
A regex solution to block odd inputs will also block values that are currently accepted by the validation, one example being the valid date "February 1st 2017".

Ah yes I understand your point now @sisve, sorry for the miss-understanding, it looks like this bug was reported in 2007 and has yet to be resolved.
The regex is specifically looking for dates in a numeric format such as Y-m-d or d/m/Y with a year having more than 4 digits for the year. This means that your example example "February 1st 2017" will not get caught by the regex but I realise while typing this it wouldn't reject "February 1st 20017" either.
I'm wondering if I can do a pattern match that would look for more than 4 digits together but not block a unix timestamp. Perhaps something more like #(\d{5,}[^\d]|[^\d]\d{5,})# this patter should look for 5 or more digits that is contained in a string that contains none numeric characters. It should ignore 2017/02/01, 01-02-2017 and Feb 1 2017 but catch 20017/02/01, 01-02-20017 and Feb 1 20017.

@mattwells I am not sure this is the right approach, as many formats cannot be taken in consideration

Hi @lucasmichot, are you saying that you favour the version of the regex that is currently in the PR over my suggestion in the last comment? Or that you aren't keen on trying to catch 5 digit years in general? If it is the latter I am running low on ideas and would welcome suggestions.

This regex isn't the correct solution as noted.


http: route level filter config support

Commit Message: http: route level filter config support
Additional Description:
To close https://github.com/envoyproxy/envoy/issues/15025, and implement of new API in the https://github.com/envoyproxy/envoy/pull/25927. Partly related to  https://github.com/envoyproxy/envoy/issues/20867.
Specifically, is PR implement two features:

first, make the route/vh level per filter config could be optional. The old implementation has some problem and may need to be reverted.
second, a common way to disable a filter by the route/vh level per filter config.

Risk Level: mid.
Testing: wait.
Docs Changes: wait.
Release Notes: wait.
Platform Specific Features: wait.

/wait

/wait
This implementation will add additional hash searching for every filter instance creation. If there are lots filters need to be skipped, then this overhead should acceptable. But for the one who use lots of filters but needn't route level filter disable function, maybe this overhead is a little heavy.

/wait #27263

Looking forward to seeing this land. I think this is super-useful as a generic per-route filter opt-in/opt-out, which is needed by k8s Gateway https://gateway-api.sigs.k8s.io/api-types/httproute/#filters-optional.

Waiting for https://github.com/envoyproxy/envoy/pull/27263 to be land first. But i think we almost get there. 🙂

For every configured HTTP filter, this PR will bring at least one-time additional hash searching.
This PR will bring some unnecessary overhead in the scenario where lots HTTP filters are configured and all filters are enabled for all routes.
But in the scenario where lots HTTP filters are configured and part of them are disabled in different routes (for example, enable filter a in route a, enable filter b in route b, a common scenario for api gateway), this will reduce a lot of overhead by reduce unnecessary filter creation and iteration.
And we may finally resolve the issue of hash searching by the #27794.

/retest

cc @mattklein123 ready for formal review, could you take a look when you have free time? Thanks.

cc @mattklein123
A new integration test is added to the header_mutation filter to ensure the new feature could work as expected.

cc @mattklein123 done, could you give a new stamp? thanks.


Remove Integration tests.

Remove Integration tests.

The yml is the entrypoint and it was calling TriggerIntegrationTests.sh which we removed as well. I also just did a quick search for Integration and nothing came up so we should be good! 😸


Expand allowed _FillValue type and error handling in FileMetadataUtilities.F90

Description

For single precision attribute retrieval there is now handling for double precision input. This update also expands error handling in FileMetadataUtilities to print filename in all calls to _ASSERT and _FAIL. Fail messages about unsupported attribute type now specify the unique type constraint per function.
Related Issue

Closes https://github.com/geoschem/GCHP/issues/183
Motivation and Context

This update prevents run fail when retrieving _FillValue from import files containing double precision data used GCHP. It also expands the error handling so that failure on reading import attributes always results in a unique message with the filename, making it easier to find and fix the problem.
How Has This Been Tested?

Tested in GCHP branch with upgraded GMAO libraries going into 14.0.0.
Types of changes

[X] 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 change)
[ ] Trivial change (affects only documentation or cleanup)

Additional information / dependencies
In order for this update to fix GFAS there needs to be a modified version of one of the GEOS-Chem input files. I will submit that change as a GEOS-Chem repo PR.
These changes have been submitted to GMAO in https://github.com/GEOS-ESM/MAPL/pull/1506.

This PR should not be merged until after https://github.com/geoschem/geos-chem/pull/1255.

The HEMCO PR that goes with this update is now ready for review at https://github.com/geoschem/HEMCO/pull/171. I made @msulprizio reviewer for both since they go together.


Sticky section header bug

When using ultimaterecyclerview with load more the sticky section header temporarily disappear when list is refreshing.

Could you describe more details about this? I want to reappear it.

I trying to create a list with sticky section header, could any one help me?!
I have the sticky header, but only stay sticks for the first item in section. I don´t really know how to stablish sections.
thanks in advance!


Active install pings

Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/224
Originally created by @jschatz1 on 2018-12-14 18:43:42

Add information to get the active installs or even better the usage.
cc @sytses

View 7 previous comments from the original issue on GitLab


Added detail about _FillValue being undefined.

Executive summary:
It is my understanding is that it is not possible to declare a variable without the concept of a fill value. This is a consequence of the implied "default" fill value. The implications of this are:

We can't use the full range of the variable's datatype

We currently have to special-case byte data to get around that

There is a performance penalty at variable data load because we need to scan the data to see if any of the values match the (default) fill value
There is a(n implied) performance penalty at variable data save because we should probably scan the data to determine whether the saved values would collide with the (default) fill value

The proposal is therefore to avoid the use of a "default fill value" altogether. Should a fill value be required for a particular purpose, it is necessary to explicitly save the fill_value on the variable. There is nothing stopping variable creation from using a default fill value, but it should be possible to declare a variable to have no fill_value.

The change itself is somewhat basic - I didn't go to town with making it perfect as I wanted to have the conversation first (as per the CONTRIBUTING guidelines).
Given I'm modifying long paragraphs, I've included the before and after in the PR description:
Existing docs:

The _FillValue attribute specifies the fill value used to pre-fill disk space allocated to the variable. Such pre-fill occurs unless nofill mode is set using nc_set_fill(). The fill value is returned when reading values that were never written. If _FillValue is defined then it should be scalar and of the same type as the variable. If the variable is packed using scale_factor and add_offset attributes (see below), the _FillValue attribute should have the data type of the packed data.
It is not necessary to define your own _FillValue attribute for a variable if the default fill value for the type of the variable is adequate. However, use of the default fill value for data type byte is not recommended. Note that if you change the value of this attribute, the changed value applies only to subsequent writes; previously written data are not changed.
Generic applications often need to write a value to represent undefined or missing values. The fill value provides an appropriate value for this purpose because it is normally outside the valid range and therefore treated as missing when read by generic applications. It is legal (but not recommended) for the fill value to be within the valid range.

Proposed docs:

The _FillValue attribute specifies the fill value used to pre-fill disk space allocated to the variable. Such pre-fill occurs unless nofill mode is set using nc_set_fill(). The fill value is returned when reading values that were never written. If _FillValue is defined then it should be scalar and of the same type as the variable. If the variable is packed using scale_factor and add_offset attributes (see below), the _FillValue attribute should have the data type of the packed data.
If _FillValue is undefined, it is assumed that there are no unwritten data-values. Generic applications needing to write a value to represent undefined or missing values may use either _FillValue or missing_value for this purpose. It is legal (but not recommended) for the fill value to be within the valid range of the data.
Note that if you change the value of this attribute, the changed value applies only to subsequent writes; previously written data are not changed.

Cheers,

I just wanted to add that I'm looking at this from the perspective of a consumer of netcdf4-python and going through the details at https://github.com/Unidata/netcdf4-python/blob/master/netCDF4/_netCDF4.pyx#L3874-L3999.
I'm also completely comfortable for this to be closed if there has already been a decision made on this / it would break compatibility.

It is my understanding is that it is not possible to declare a variable without the concept of a fill value.
I think this is incorrect.
It is possible to turn fill mode on/off globally using nc_set_fill().
It is also possible to use nc_def_var_fill to turn fill on/off for a specific variable.
As far as I know, this behavior has not changed.
Can you elaborate your concerns?

It is my understanding is that it is not possible to declare a variable without the concept of a fill value.

I think this is incorrect.
It is possible to turn fill mode on/off globally using nc_set_fill().

So my concern is that this is a software flag to change the interpretation of the file. I'm looking to make this a fundamental part of the metadata, not the implementing software. Without this, the NetCDF files are open to different interpretations - and are therefore not self-describing.

I agree with Phil that the current behavior implies a fill value.
If I get a mysterious file with one NC_INT variable, when reading that
variable, I must be aware that NC_FILL_INT may have a special meaning. Even
if the variable was written with no_fill mode, I have no way of knowing
that when I read the file.
But to change the current use of default fill values would be a large API
change. I don't see how that could be backward compatible with existing
code.
Perhaps, Phil, you want to think about a new convention. Perhaps the
attribute "NoFill" could be attached to variables to indicate that there
are no fill values in use?
Ed Hartnett
On Fri, Aug 25, 2017 at 5:16 AM, Phil Elson<EMAIL_ADDRESS>wrote:

It is my understanding is that it is not possible to declare a variable
without the concept of a fill value.
I think this is incorrect.
It is possible to turn fill mode on/off globally using nc_set_fill().
So my concern is that this is a software flag to change the interpretation
of the file. I'm looking to make this a fundamental part of the metadata,
not the implementing software. Without this, the NetCDF files are open to
different interpretations - and are therefore not self-describing.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Unidata/netcdf-c/pull/470#issuecomment-324890823, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AEUr3Mt0QurVtz0HpqGTj4c8IVyyfBilks5sbq0igaJpZM4O-p4N
.

Agreed about the backwards compatibility. As I see it, there are a couple of options:

_FillValue is explicitly used to denominate "no fill value"

For example, IEEE NaN could be used (for all dtypes). However, this would mean that non-float data would have a floating point _FillValue attribute

A new attribute (_)NoFill denominates "no fill value"

What should the behaviour be when "no fill value" and _FillValue are both defined?

There already is a _NoFill special attribute available.
But, I see that somehow the documentation on it and a
bunch of other special attributes got lost somewhere.
It is mentioned in the documentation for ncgen,,
but AFAIK, nowhere else.

I will see if I can dig it out of the 'historic' documentation; a lot of what is in that directory has yet to make the leap to doxygen ( hence why it's retained for now). Maybe it's in there?  If not, we should definitely get it added to the current documentation.

Or maybe it was never documented.

Merged into 4.5.0 release branch instead of master, so closing manually. Thank you!

Thanks @WardF. I don't see any documentation about the _NoFill attribute. Has this been done elsewhere?

Reopening to make sure I revisit this. I had added something but I don't see it either.

I was just checking up on the fill_value docs after this conversation, and I notice that my proposed changes have been merged despite the concern raised by @edhartnett regarding:

But to change the current use of default fill values would be a large API
change. I don't see how that could be backward compatible with existing
code

The latest version (on master) can be found at: https://github.com/Unidata/netcdf-c/blob/master/docs/attribute_conventions.md
I just wanted to be very explicit that this has happened before the 4.5.0 release is finalised, just in case corrective action needs to take place.
Note that, as a result of merging this change, it has not been necessary to document the _NoFill attribute - if it were to be decided that the change that was merged here isn't OK for release, I'd greatly appreciate seeing _NoFill included in the docs.
Thanks,

I believe that Ed's concerns are sufficient to reject this change. But I confess at this point, I still
do not have a concise set of bullet points about what is being proposed. More specifically
what are the complete consequences of this change.

I am reverting the change now, and adding details about _NoFill.  After discussing this with Dennis, it needs to be made clear that _NoFill is used specifically by ncgen when converting .cdl to binary.  Otherwise, it is unused.  Once reverted and documentation is updated, we will revisit the broader proposal.

Thanks all. Sorry for any confusion caused. If _NoFill is used by ncgen is it good enough to be documented in general? I'd like to make use of this convention to avoid the need for the expensive validation in the no-fill-necessary case.

I've added some documentation describing the use, and Dennis and I have spoken this morning. We're going to really clarify this documentation once the 4.5.0 push is over, and decide if there are any functional changes to be made.


Economy-Bot

hello i am getting like this photo

Did you install all the modules using npm install?

You must run

npm i
To install all the dependencies needed for this bot to work


I bet this breaks readthedocs

This commit. If I understand, readthedocs actually needs that env stuff, even though with pyiron_github I finangled it so sphinx doesn't (by merging envs with the main env file).
Wait in hope, and fix it when it breaks. This is just a reminder why it's going wrong if (when) it does.

Yep, it did break it. I fixed it over in the centralized CI by making sure that docs/environment.yml gets automatically updated and committed to the repo as a combination of the actual env and the docs env.


Game Activities crashing frequently

GameActivities.zip
Added zip file that Playnite keeps prompting me to send to the developer.

I have 10 games that game activities crash since playnite V9.

warcraft III.zip
toweroffantasy.zip
honkaiimpact.zip

Will add other games when played them again.

Did you mean playnite 10? That just came out recently. Sent from my iPhoneOn Sep 24, 2022, at 19:00, De Angel Net @.***> wrote:
I have 10 games that game activities crash since playnite V9.
warcraft III.zip
toweroffantasy.zip
honkaiimpact.zip
Will add other games when played them again.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

Did you mean playnite 10? That just came out recently. Sent from my iPhoneOn Sep 24, 2022, at 19:00, De Angel Net @.> wrote: I have 10 games that game activities crash since playnite V9. warcraft III.zip toweroffantasy.zip honkaiimpact.zip Will add other games when played them again. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.>

Since playnite 9 and 10. Have the same error on some games.

I updated today, was crashing until I removed my old data. Then was fine until I tried to log the hardware stats. First time exiting a game where I was tracking stats Playnite will crash repeatedly until I remove the data with hardware stats again. Logs attached from when it gave me the option.
gameactivity log.zip
gameactivity_log2.zip

Having this issue too.    I'm getting crashes even if Playnite 10.3 just idles for awhile.


[SPARK-47224][PS][TESTS] Split test_split_apply_basic and test_split_apply_adv

What changes were proposed in this pull request?
Split test_split_apply_basic/test_split_apply_adv and their parity tests
Why are the changes needed?
it is still slow, split it for testing parallelism
Does this PR introduce any user-facing change?
no
How was this patch tested?
ci
Was this patch authored or co-authored using generative AI tooling?
no

Merged to master.


Validation error when specifying "file" as response type

Hi,
When trying to validate a definition which returns file as a response type I get the following error:

Data does not match any schemas from 'oneOf'

An example of the spec which produces the error is:
responses:
    '200':
         description: OK
         schema:
             type: file

The file validates fine when viewed/edited in the swagger editor however fails when run through the gulp task.
It appears to be the same issue in the spec found here.
Thanks

Hey @sharpworks, it seems like there was a problem in one of the validation packages used. I just updated all dependencies to the project and I believe this should be working properly now. Would you please update and let me know if it works for you? Cheers!


CI on PRs for user flows on testnet environment

Expected Behavior
env tests are run automatically
Current Behavior
env tests aren't run

This is blocked until ganache supports locally signed transactions and cUSD txs

This is blocked until ganache supports locally signed transactions and cUSD txs


How could I use this within a project using React + Tailwind + Vite?

Hi, I like this plugin, but I'm not able to install it on my project which uses Tailwind, React, Vite and PostCSS, could you offer some guidance, please?
I saw the instructions in Astro + Tailwind example but it won't work for me
Thanks!

I used 'yarn build' and it generated the following output in console:

And it also generated 'out' and 'dist' directories, however if I access 'dist/index.html' file, it says:
Unexpected Application Error!
404 Not Found

Hi, Thanks for Asking.
I got it running with React + Vite + TailwindCSS :

Fork this Replit:
https://replit.com/@n4j1Br4ch1D/postcss-obfuscator-react-vite-tailwindcss
How it's done:
1- install  postcss-obfuscator:
# npm
npm install postcss-obfuscator --save-dev
# yarn
yarn add postcss-obfuscator --dev

2- install tailwindcss  and configure it:
# Using NPM
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

3- in src/index.css import tailwindcss:
@tailwind base;
@tailwind components;
@tailwind utilities;

4- create postcss.config.cjs  his minimum config I used in demo
//postcss.config.cjs

process.env.NODE_ENV = "development" //development //obsfucation //production
const isObfscMode = process.env.NODE_ENV === 'obsfucation';

module.exports = {
  plugins: [
    require('tailwindcss'),
    require('autoprefixer'),
    require('postcss-obfuscator')({
    /* options */
      enable: isObfscMode, // Force Run on Dev Env or when srcPath equals desPath.
      srcPath: "src", // Source of your files.
      desPath: "out", // Destination for obfuscated html/js/.. files.
      extensions: ['.jsx'],
      formatJson: true, // Format obfuscation data JSON file.
    })
  ]
}

5- optional: add this npm script's to package.json
    "postcss": "postcss src/**/*.css  --dir out/css",
    "obfuscate": "npm run postcss"

6- Install postcss-cli:
npm i -D postcss postcss-cli

7- now to obfuscate,  set the env mode to obsfucation ,  and in your console run :
 npm run obfuscate

which will generate obfuscated JSON file, with obfuscated files in an output folder.
Note: postcss is automatically run with Vite so its preferred to create a customer postcss script to run only when you want to obfuscate ready for production see the readme for more details. and feel free to contact me again.
Also you can use two tricks:

the enable option (as used in demo) to enable it only in specific mode and to make sure tailwindcsss works fine in dev mode:

process.env.NODE_ENV = "development" //development //obsfucation //production
const isObfscMode = process.env.NODE_ENV === 'obsfucation';

//enable: isObfscMode,

the callBack option Callback function to call after obfuscation is done.  that way once obfuscation is done you can config vite to read data from out folder instead of  src or you can just rename the folders.

I used 'yarn build' and it generated the following output in console:

And it also generated 'out' and 'dist' directories, however if I access 'dist/index.html' file, it says:
Unexpected Application Error! 404 Not Found

i think that a different issue for me it worked fine so plz try this:
in dist/index.html
change url paths (remove the slash/)
instead of /assets/...  should be assets/... and so on
<!DOCTYPE html>

    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Vite + React</title>

    <link rel="stylesheet" href="assets/index-fffba02c.css">

@sort72  plz if it the issue was resolved then close it. else contact me back I don't close issues until they truly solved and the issuer close it himself. and consider staring the project to keep the project going.

Hi, Thanks for Asking.
I got it running with React + Vite + TailwindCSS :

Fork this Replit:
https://replit.com/@n4j1Br4ch1D/postcss-obfuscator-react-vite-tailwindcss
How it's done:
1- install postcss-obfuscator:
# npm
npm install postcss-obfuscator --save-dev
# yarn
yarn add postcss-obfuscator --dev

2- install tailwindcss and configure it:
# Using NPM
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

3- create src/input.css and import tailwindcss:
@tailwind base;
@tailwind components;
@tailwind utilities;

4- create postcss.config.cjs this minimum config I used in demo
//postcss.config.cjs

process.env.NODE_ENV = "development" //development //obfuscation //production
const isObfscMode = process.env.NODE_ENV === 'obfuscation';

module.exports = {
  plugins: [
    require('tailwindcss'),
    require('autoprefixer'),
    require('postcss-obfuscator')({
    /* options */
      enable: isObfscMode, // Force Run on Dev Env or when srcPath equals desPath.
      srcPath: "src", // Source of your files.
      desPath: "out", // Destination for obfuscated html/js/.. files.
      extensions: ['.jsx'],
      formatJson: true, // Format obfuscation data JSON file.
    })
  ]
}

5- add this npm script's to package.json
    "tailwindcss": "npx tailwindcss -i ./src/input.css -o ./src/output.css",
    "postcss": "postcss src/**/*.css  --dir out/css",
    "obfuscate": "npm run tailwindcss && npm run postcss"

6- Install postcss-cli:
npm i -D postcss postcss-cli

7- now to obfuscate, set the env mode to obfuscation , and in your console run :
 npm run obfuscate

which will generate obfuscated JSON file, with obfuscated files in an output folder.
Note: postcss is automatically run with Vite so its preferred to create a customer postcss script to run only when you want to obfuscate ready for production see the readme for more details. and feel free to contact me again. Also you can use two tricks:

the enable option (as used in demo) to enable it only in specific mode and to make sure tailwindcsss works fine in dev mode:

process.env.NODE_ENV = "development" //development //obfuscation //production
const isObfscMode = process.env.NODE_ENV === 'obfuscation';

//enable: isObfscMode,

the callBack option, a Callback function to call after obfuscation is done. that way once obfuscation is done you can config and prepare your project for production: so basically you use callBack option to set the env mode back to production so that obsfucation will not run, and then config your app source folder to use out folder instead of src for production. and the imported tawilwindcss file. if u want css file to be obfuscated to same path just set the ouput directory of postcss directly to out

 "postcss": "postcss src/**/*.css  --dir out",

so basically you use callBack option to set the env mode back to production and to source folder of production to out instead of src that way it will work. when you run npm run build

Hi, thanks for your response
I did the steps you mentioned and I'm almost there, but I have a problem I can't understand why is happening, it looks like a bug
I run first
  yarn obfuscate

Then
 yarn build

And it's showing some warnings, because I was using classes with arbitrary values before (Like h-[0.5rem]) and the parser was not able to obfuscate them properly, showing those warnings.
Then I removed the arbitrary values and replaced them for built-in tailwind values, then obfuscated it again and all that. But, when I build it one more time, it still shows warnings (Even when I'm not using the arbitrary values anymore). If I search any of the warning classes, none of them exist! See the photo:

So I ignored warning and renamed out to src and built it, but it was complainig about a syntax error in the CSS. I fixed it and built again, with a successful built, then I opened my project but none of the styles were there. The css classes in the html tags were named different than in the CSS file (For example, in the html class, the name was 'abcd' and in the css file, that class had the 'xyz' name).
Maybe this last issue is related with warnings thing, I removed css-obfuscator, dist and out folders before building again (I also removed node_modules, and restarted the pc, lol), and the warnings were still there.
Any hint?
Thank you!

Hi, Thanks for Asking.
I got it running with React + Vite + TailwindCSS :

### Fork this Replit:
https://replit.com/@n4j1Br4ch1D/postcss-obfuscator-react-vite-tailwindcss
### How it's done:
1- install postcss-obfuscator:
```shell
# npm
npm install postcss-obfuscator --save-dev
# yarn
yarn add postcss-obfuscator --dev
```
2- install tailwindcss and configure it:
# Using NPM
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

3- create src/input.css and import tailwindcss:
@tailwind base;
@tailwind components;
@tailwind utilities;

4- create postcss.config.cjs this minimum config I used in demo
//postcss.config.cjs

process.env.NODE_ENV = "development" //development //obfuscation //production
const isObfscMode = process.env.NODE_ENV === 'obfuscation';

module.exports = {
  plugins: [
    require('tailwindcss'),
    require('autoprefixer'),
    require('postcss-obfuscator')({
    /* options */
      enable: isObfscMode, // Force Run on Dev Env or when srcPath equals desPath.
      srcPath: "src", // Source of your files.
      desPath: "out", // Destination for obfuscated html/js/.. files.
      extensions: ['.jsx'],
      formatJson: true, // Format obfuscation data JSON file.
    })
  ]
}

5- add this npm script's to package.json
    "tailwindcss": "npx tailwindcss -i ./src/input.css -o ./src/output.css",
    "postcss": "postcss src/**/*.css  --dir out/css",
    "obfuscate": "npm run tailwindcss && npm run postcss"

6- Install postcss-cli:
npm i -D postcss postcss-cli

7- now to obfuscate, set the env mode to obfuscation , and in your console run :
 npm run obfuscate

which will generate obfuscated JSON file, with obfuscated files in an output folder.
Note: postcss is automatically run with Vite so its preferred to create a customer postcss script to run only when you want to obfuscate ready for production see the readme for more details. and feel free to contact me again. Also you can use two tricks:

the enable option (as used in demo) to enable it only in specific mode and to make sure tailwindcsss works fine in dev mode:

process.env.NODE_ENV = "development" //development //obfuscation //production
const isObfscMode = process.env.NODE_ENV === 'obfuscation';

//enable: isObfscMode,

the callBack option, a Callback function to call after obfuscation is done. that way once obfuscation is done you can config and prepare your project for production: so basically you use callBack option to set the env mode back to production so that obsfucation will not run, and then config your app source folder to use out folder instead of src for production. and the imported tawilwindcss file. if u want css file to be obfuscated to same path just set the ouput directory of postcss directly to out

 "postcss": "postcss src/**/*.css  --dir out",

so basically you use callBack option to set the env mode back to production and to source folder of production to out instead of src that way it will work. when you run npm run build

Hi, thanks for your response
I did the steps you mentioned and I'm almost there, but I have a problem I can't understand why is happening, it looks like a bug
I run first
  yarn obfuscate

Then
 yarn build

And it's showing some warnings, because I was using classes with arbitrary values before (Like h-[0.5rem]) and the parser was not able to obfuscate them properly, showing those warnings.
Then I removed the arbitrary values and replaced them for built-in tailwind values, then obfuscated it again and all that. But, when I build it one more time, it still shows warnings (Even when I'm not using the arbitrary values anymore). If I search any of the warning classes, none of them exist! See the photo:

So I ignored warning and renamed out to src and built it, but it was complainig about a syntax error in the CSS. I fixed it and built again, with a successful built, then I opened my project but none of the styles were there. The css classes in the html tags were named different than in the CSS file (For example, in the html class, the name was 'abcd' and in the css file, that class had the 'xyz' name).
Maybe this last issue is related with warnings thing, I removed css-obfuscator, dist and out folders before building again (I also removed node_modules, and restarted the pc, lol), and the warnings were still there.
Any hint?
Thank you!

You welcome ok let me check m but 1st I been updating my answers: also i wld recommend to check this https://stackoverflow.com/questions/66863200/changing-the-input-and-output-directory-in-vite
its better then renaming the src and out folder as it will cause issues .

Actually, I tried the thing in vite.config.js like 1 hour ago, but I was not able to get it working.
I added root to my vite config
export default defineConfig({
	plugins: [svgr(), react()],
	root: "src",
});

But it said it was not able to find the file src/index.html (Which is in root path, not in src), so I was not able to do so. I thought it was a problem more related to vite than to your package, so I was thinking to solve it after I had obfuscation working

Actually, I tried the thing in vite.config.js like 1 hour ago, but I was not able to get it working.
I added root to my vite config
export default defineConfig({
	plugins: [svgr(), react()],
	root: "src",
});

But it said it was not able to find the file src/index.html (Which is in root path, not in src), so I was not able to do so. I thought it was a problem more related to vite than to your package, so I was thinking to solve it after I had obfuscation working

@sort72  hi check the replit demo I made this changes:
see if they work for you:
1- install  cross-env
npm install --save-dev cross-env

change npm script: set env to obfuscation

 "obfuscate": "cross-env NODE_ENV=obfuscation npm run tailwindcss && npm run postcss"

I used the enable and callBack option:

//postcss.config.cjs
const isObfscMode = process.env.NODE_ENV === 'obfuscation';
module.exports = {
  dir: 'dist/css',
  plugins: [
    require('tailwindcss'),
    require('autoprefixer'),
    require('postcss-obfuscator')({
    /* options */
      enable: isObfscMode, // Force Run on Dev Env or when srcPath equals desPath.
      srcPath: "src", // Source of your files.
      desPath: "out", // Destination for obfuscated html/js/.. files.
      extensions: ['.jsx'],
      formatJson: true, // Format obfuscation data JSON file.
      callBack: function () { // Callback function to call after obfuscation is done.
        process.env.NODE_ENV = "production" // make sure postcss-obfuscator doesnt run
      }
    })
  ]
}

change vite config for build command &  production env

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig(({ command, mode }) => {
  if (command === 'build' && mode === 'production') {  // build and production specific config
    return {
      base: '',
      root: 'out',
      server: {
        host: '<IP_ADDRESS>',
      },
      plugins: [react()],
    }
  } else {
    return {
      server: {
        host: '<IP_ADDRESS>',
      },
       plugins: [react()],
    }
  }
})

I made your suggested changes and I first ran
yarn obfucaste

Then
yarn build

But I'm facing the following error:
yarn run v1.22.5
$ vite build
vite v4.2.0 building for production...
✓ 0 modules transformed.
✓ built in 24ms
Could not resolve entry module "out/index.html".
error during build:
RollupError: Could not resolve entry module "out/index.html".
    at error (file:///C:/dev/book/node_modules/rollup/dist/es/shared/node-entry.js:2125:30)
    at ModuleLoader.loadEntryModule (file:///C:/dev/book/booking/node_modules/rollup/dist/es/shared/node-entry.js:23798:20)
    at async Promise.all (index 0)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I saw you changed root in vite.config.js to out but I don't know why Vite checks if index.html exists there (It's in root directory, outside /out, as a default Vite installation)
I think that this is the last thing we need to fix to get it working

@sort72  have you tried this?
      "build": "vite build out --emptyOutDir",

I discovered that we don't need to set a root value inside vite config, instead, change the js path in index.html
From

To

How could we handle it with environment vars?

So I added 2 .env files: .env.production and .env.dev . And I'm able to switch what folder I want to use on a build (src or out)
.env.production
VITE_OBFUSCATE=true
VITE_SOURCE_PATH='out'

.env.dev
VITE_OBFUSCATE=false
VITE_SOURCE_PATH='src'

And in index.html

So on production, I need to run
yarn obfuscate
yarn build

And it creates everything with out directory
However, I'm still facing an issue: The css is not shown properly because the classes in html are obfuscated, but the index.css generated file on /dist contains non obfuscated classes (Html: asdhjba, CSS: border-2, for example)

can i see yout postcss config

Here is my postcss config
module.exports = {
	plugins: [
		require("tailwindcss"),
		require("autoprefixer"),
		require("postcss-obfuscator")({
			/* options */
			enable: true, // Force Run on Dev Env or when srcPath equals desPath.
			fresh: true,
			srcPath: "src", // Source of your files.
			desPath: "out", // Destination for obfuscated html/js/.. files.
			extensions: [".jsx", ".js"],
			classPrefix: "msy-", // Prefix for obfuscated CSS class names.
			formatJson: true, // Format obfuscation data JSON file.
			callBack: function () {
				process.env.NODE_ENV = "production"; // make sure postcss-obfuscator doesnt run
			},
		}),
	],
};

I'm using enable: true for the moment because it seems that process.env.NODE_ENV doesn't get updated with the code you shared on package.json and it's always 'development'. So I'm looking for a solution to this.
I added fresh: true to see if I was able to fix something I mentioned before:
I don't understand why the heck this is including a very old css code in the out/index.css (aka input.css) file, as I mentioned earlier today, I had tailwind arbitrary values and it didn't work (You created a new issue about this), so I changed it to tailwind classes to fix and be able to compile the obfuscated css. BUT, I don't understand why it is still adding old css classes with arbitrary values, even when those arbitrary values DON'T exist anywhere on my code and I also reinstalled node_modules...

I see can you try deleting the css-obsucator folder

I have removed it so many times without success. Also tried with and without fresh option. I’ll continue trying things and will add an answer with my new findings

De: Najib Rachid @.>
Enviado: Thursday, May 4, 2023 1:51:43 PM
Para: n4j1Br4ch1D/postcss-obfuscator @.>
Cc: sort72 @.>; Mention @.>
Asunto: Re: [n4j1Br4ch1D/postcss-obfuscator] How could I use this within a project using React + Tailwind + Vite? (Issue #2)
I see can you try deleting the css-obsucator folder
—
Reply to this email directly, view it on GitHubhttps://github.com/n4j1Br4ch1D/postcss-obfuscator/issues/2#issuecomment-1535249540, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALMDVHBAP6TP5FNUV5RKVKTXEP3D7ANCNFSM6AAAAAAXU3GMRQ.
You are receiving this because you were mentioned.Message ID: @.***>

Thanks for taking the time to handle this issue, the solution you mentioned there seems good for all Tailwind arbitrary values, please do so.
I'll continue my tests related to css names mismatch tomorrow and let you know

The new Version released, check the release notes:
and to help you with your issue
use this options to debug along with the prefix option:
classMethod: 'none'

also try excluding some paths or files maybe focus on one file as a start.
cssExcludes: Files and paths to exclude from css obfuscation, default is none.

or recreate a fresh demo project for testing: see if the same issue will appear.

Hi, I'm working on this at the moment but I'm facing some issues with the parser. It seems not to support responsive classes in Tailwind
I created a separated project just for testing this (And uploaded my code here so you can test)
I just created a new react vite project and added tailwindcss and the obfuscator, and followed the instructions you have given in this topic.
I added a div with 2 classes: bg-red-400 md:bg-blue-400
On dev, if you resize the window to something small, the background is red. And, on bigger screens, the background is blue.
However, on the obfuscated built, the div is always red (It doesn't recognize md:bg-blue-400)

I think the parser is good on the css part, but, the class in the html is malformed. Now it's generated as msy-md\:bg-blue-400 BUT it should be msy-md:bg-blue-400. Removing the \ fixes that.

That's probably a problem only with prefixes.

I tested without the prefix and it doesn't work either:

The class should be md:bg-blue-400-obfsctd instead of md\:bg-blue-400-obfsctd (Without the \) after the :
(I'm using latest version)

i just tested the last version as well in the replit , responsive seems working there's still an issue though with arbitrary values replacement in html

in the replit i have this:

Welcome to postcss-obsfucator

        this demo is to try postcss-obsfucator with react, tyescript, vite & tailwindcss

I get this:
{
  ".read-the-docs": ".c-va7vn-c",
  ".m-2": ".c-ecywa-c",
  ".m-4": ".c-fwnil-c",
  ".rounded": ".c-fpb7h-c",
  ".border": ".c-zup9i-c",
  ".bg-blue-500": ".c-alvnn-c",
  ".p-4": ".c-mc2w6-c",
  ".pt-\\[50px\\]": ".c-vi531-c",
  ".text-xl": ".c-qu856-c",
  ".text-indigo-500": ".c-j4e13-c",
  ".md\\:bg-red-500": ".c-ilin8-c"
}

Welcome to postcss-obsfucator

        this demo is to try postcss-obsfucator with react, tyescript, vite & tailwindcss

.c-ecywa-c {
  margin: 0.5rem;
}

.c-fwnil-c {
  margin: 1rem;
}

.c-fpb7h-c {
  border-radius: 0.25rem;
}

.c-zup9i-c {
  border-width: 1px;
}

.c-alvnn-c {
  --tw-bg-opacity: 1;
  background-color: rgb(59 130 246 / var(--tw-bg-opacity));
}

.c-mc2w6-c {
  padding: 1rem;
}

.c-vi531-c {
  padding-top: 50px;
}

.c-qu856-c {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.c-j4e13-c {
  --tw-text-opacity: 1;
  color: rgb(99 102 241 / var(--tw-text-opacity));
}

@media (min-width: 768px) {
  .c-ilin8-c {
    --tw-bg-opacity: 1;
    background-color: rgb(239 68 68 / var(--tw-bg-opacity));
  }
}

I used prefixes and suffixes. the only issue I see  is pt-[50px] doesn't get replaced in HTML , I have re-opend the issue ill fix it soon. I'm I wrong?

@sort72  ok I reproduced the issue it's related to   classMethod: "none"  used with prefixes and suffixes. ill open an issue and solve both of them soon. thanks so much for your cooperation.  for now u can  comment  classMethod: "none"

I found another bug. In tailwind, you can use / in classes. For example: md:w-1/2
That is not mapped properly in the output.css file:
...

.o58kp {
  --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}

@media (min-width: 768px) {
  .md\:w-1\/2 {
    width: 50%;
  }

  .od5k0 {
    --tw-bg-opacity: 1;
    background-color: rgb(96 165 250 / var(--tw-bg-opacity));
  }
}

css-obfuscator/main.json
{
  ...
  ".shadow": ".o58kp",
  ".md\\:w-1\\\\/2": ".x3bsu",
  ".md\\:bg-blue-400": ".od5k0"
}

Yeah, with the blank project I created to test it, it seems to be working perfectly. So we can continue with the new issues you created, I'll close this. Thanks!
Little note: I set keepData to false, but it only removed te css-obfuscator directory. It would be nice if that property remove the out created directory and the output.css file as well. Is it possible?

@sort72  glad to hear it open new issues as a feature request.


[HTTP] Revoked Certificate verification

This can be done using CRL or OCSP protocols. There is a similar implementation in WSO2 ESB. See below.
http://blog.lasindu.com/2014/12/revoked-certificate-verification-for.html

Fixed : https://github.com/ballerina-platform/ballerina-lang/pull/4644 and https://github.com/wso2/transport-http/pull/46


[1.14.4-v0.1.1] Scroll for macOS on Handheld Blockzapper Spread Range doesn't work.

note, I am more than happy to test possible fixes for this bug as I know most people don't have access to macs
Steps

Use magic mouse or built in trackpad for macOS (I have not tested my logitech mouse, but can do so if this helps)
Launch 1.14.4 with Create 0.1.1 and Forge 28.1.26.
Login to an MP server.
Craft a Handheld Blockzapper.
Shift-Rightclick to bring up configuration GUI.
Mouse-over the Spread Range.
Scroll with trackpad gestures (two-finger drag) or with magic mouse (single-finger drag).
Observe Spread Range value.

Observed Results
Spread Range does not react to scrolling from magic mouse or trackpad.
Regular Logitech like mouse not yet tested.
Expected Results
All scrollable configurations work for macOS.
Versions
Minecraft - 1.14.4
Forge - 28.1.26
Create - 0.1.1
macOS - mojave 10.14.6 (currently, latest)
Extra Notes

It might not be relevant, but I have the natural scroll feature turned off.  Aka, it is not default settings, which means when I drag my fingers down, the scroll goes down and vice versa.

Yeah.  I'm silly.  I'll close this as this looks to be by design.  After playing around with the upgraded zappers in creative, I just realized the base was not designed to have range.  I do have a question though.  Are you interested in bug reports around things like stone brick fence not showing up in the hotbar icon when selecting it as a source fore the block zapper?  (just not sure if you're interested in all bugs, major, minor, or polish at this point?)

Oh I can report that I got scroll working with the magic mouse and trackpad on the rotation chassis and it looks like the upgraded Blockzappers are scrolling to the appropriately scaled ranges. :D


Street: LOD stacks

GLTF Extension: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod

GLTF Extension: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_lod

But also, the Unity standard is apparently to append _LODn at the end of the model name, where n >= 0.

But also, the Unity standard is apparently to append _LODn at the end of the model name, where n >= 0.

https://docs.unity3d.com/Manual/importing-lod-meshes.html

https://docs.unity3d.com/Manual/importing-lod-meshes.html


Add missing dependency on Unix

Silences the alert proposed in ocaml/ocaml#11198, but this PR can be merged regardless.

Codecov Report

Merging #1816 (f17534c) into main (76c0201) will decrease coverage by 0.29%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1816      +/-   ##
==========================================
- Coverage   65.09%   64.79%   -0.30%
==========================================
  Files         118      118
  Lines       14389    14392       +3
==========================================
- Hits         9366     9326      -40
- Misses       5023     5066      +43

Impacted Files
Coverage Δ

src/irmin-pack/unix/checks.ml
9.54% <0.00%> (-15.56%)
:arrow_down:

src/irmin-unix/cli.ml
20.74% <0.00%> (ø)

bench/irmin-pack/trace_stat_summary_pp.ml
0.18% <0.00%> (ø)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more


Added --list-installed-services flag which lists services the nislmigrate tool recognizes as installed.

[x] This contribution adheres to CONTRIBUTING.md.

What does this Pull Request accomplish?

Adds --list-installed-services flag which lists the installed services
Changed the -v --verbose flag to a -s --silent flag so that by default logged information is displayed.

https://github.com/ni/NI-SystemLink-Migration/issues/128
What testing has been done?
Manually verified the --list-installed-services flag and the --silent flags work.

My interpretation of the feature request was to add a command:
nislmigrate list
Which would return the supported services for the current system. I'm not sure what benefit there is to listing services while running also running the migration.
Also, there should be tests for the new argument.

Just for the sake of implementing this feature without touching many files I'm leaving it as a flag, but I modified the behavior so that if a user tries to use the flag while capturing or restoring the tool will ask them to remove it first.

Just for the sake of implementing this feature without touching many files I'm leaving it as a flag, but I modified the behavior so that if a user tries to use the flag while capturing or restoring the tool will ask them to remove it first.

I don't think we should cut corners on an optional feature request. If this is too difficult to do properly, we shouldn't do it now.

I still think this should be a first-class operation and not an argument.
Completely smart. After implementing it the other way thinking that would be easier but ending up having to mess with the case where a user tries to list while migrating, this way is better.


[Request to Driver] The From/To icons are displayed like stops on the "Ride" page for the creator of ride.

Environment: Android 12.0.1, Xiaomi Mi 8.
Reproducible: always.
Build found: v1.0.206
Preconditions:

Geolocation is enabled.
Internet connection is available.
The user is authorized.
App is opened.
Ride is created: From="Arena Lviv, Stryiska Street, Lviv"; To="Lviv Railway Station, Dvirtseva Square, Lviv"; Fee="FREE"; Departure time: "29.11;Mon;11:47".
"Search for Ride" page is opened.

Steps to reproduce:

Fill all mandatory fields by data:
From="Arena Lviv, Stryiska Street, Lviv"; To="Lviv Railway Station, Dvirtseva Square, Lviv"; Fee="FREE"; Departure time: "29.11;Mon;11:47".
Tap on "SEARCH" button.
Tap on presented journey box.
Swap down the panel with Request to driver details.
Pay attention to the From/To icons.

Actual result:
The From/To icons are displayed like stop point on the "Ride" page.
Expected result:
The "From" point has an icon which symbolizes the beginning of the ride for the creator of the trip.
The "To" point has an icon which symbolizes the end of the ride for the creator of the trip.
User story and test case links:
User story #14

Bug fixed.


XMLSyntaxError: StartTag: Invalid element name

OS: Windows
Python Version: 3.6.5 -- downloaded today directly from the site

from requests_xml import XMLSession
s=XMLSession()
p=s.get( 'https://www.google.com/' )
p.xml.xpath( '//div' )
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\conno\AppData\Local\Programs\Python\Python36\lib\site-packages\requests_xml.py", line 224, in xpath
selected = self.lxml.xpath(selector)
File "C:\Users\conno\AppData\Local\Programs\Python\Python36\lib\site-packages\requests_xml.py", line 120, in lxml
self._lxml = etree.fromstring(self.raw_xml)
File "src\lxml\etree.pyx", line 3230, in lxml.etree.fromstring (src\lxml\etree.c:81056)
File "src\lxml\parser.pxi", line 1871, in lxml.etree._parseMemoryDocument (src\lxml\etree.c:121236)
File "src\lxml\parser.pxi", line 1759, in lxml.etree._parseDoc (src\lxml\etree.c:119912)
File "src\lxml\parser.pxi", line 1125, in lxml.etree._BaseParser._parseDoc (src\lxml\etree.c:114159)
File "src\lxml\parser.pxi", line 598, in lxml.etree._ParserContext._handleParseResultDoc (src\lxml\etree.c:107724)
File "src\lxml\parser.pxi", line 709, in lxml.etree._handleParseResult (src\lxml\etree.c:109433)
File "src\lxml\parser.pxi", line 638, in lxml.etree._raiseParseError (src\lxml\etree.c:108287)
File "", line 1
lxml.etree.XMLSyntaxError: StartTag: invalid element name, line 1, column 2

If you are pulling in html you should use @kennethreitz's requests-html!  Is there a reason you are using my lib instead of his?  If so let me know!

Ahh...I misunderstood what your library does. I thought your library would intake pages returned by requests and then allow for xpath searches on them.
requests-html is what I need.
Thank you.

@ConnorSMaynes They do similar things, mine is just a little more fine tuned for pure xml. :)


Credit Card Fraud Detection

Problem Description:
Fraudulent transactions are a major threat in banking and insurance, causing substantial financial losses and damaging customer trust. Swift, accurate fraud detection is essential to mitigate these risks. By implementing a real-time fraud detection model, businesses can identify suspicious transactions as they happen, reducing fraud and enhancing security for their customers.
Model Description:
The model will use classification algorithms like Random Forest, Gradient Boosting, and Neural Networks to analyze transaction data, including amount, time, and user behavior. SMOTE and Undersampling will address the imbalanced nature of fraud data, while Isolation Forest will detect unusual, potentially fraudulent transactions not labeled in the dataset. This combination of techniques will ensure that the model is optimized to catch fraud quickly and accurately.
Estimated Time for Completion:
Implementation: 1-2 weeks for data prep, model selection, and training.
Testing: 1 week for fine-tuning and metric evaluation.
Deployment: 1 week for API integration and real-time functionality.
Expected Outcome:
The model will enable highly precise, real-time fraud detection with minimal false positives, allowing businesses to prevent fraud before it impacts their bottom line. Key metrics include AUC-ROC, Precision, Recall, and F1-Score, which are critical for accurate fraud detection.
Additional Context:
Initially, public datasets like the Kaggle Credit Card Fraud Detection dataset will be used, with real-world data further refining the model. Once deployed, the model will provide seamless transaction security, establishing businesses as secure, customer-focused organizations.
Please assign me this issue . I would like to work on this
@yashasvini121

Sure @Keerthi421, go ahead!


Documentation for constants

Hi Joseph,
It would be really great to add some documentation for the various constants in liquid's codebase, especially the arrays. Anything here would be good, I think, whether it's a formula that evaluates to the values in the array, notes on experimental testing, etc. I'd like to be able to write code to generate these where possible, just to help me understand better and do sanity tests :)

Hi, Brian. It's funny that you mention that because I've been working on a script to auto-document the APIs for liquid for the website, and hopefully include any arrays and constants that are used. Are you referring to anything in the code base? or the auto-test scripts? or something else specifically?


After Nameserver and Controller start, the logs are not correctly printed.

The issue tracker is used for bug reporting purposes ONLY whereas feature request needs to follow the RIP process. To avoid unnecessary duplication, please check whether there is a previous issue before filing a new one.
It is recommended to start a discussion thread in the mailing lists in cases of discussing your deployment plan, API clarification, and other non-bug-reporting issues.
We welcome any friendly suggestions, bug fixes, collaboration, and other improvements.
Please ensure that your bug report is clear and self-contained. Otherwise, it would take additional rounds of communication, thus more time, to understand the problem itself.
Generally, fixing an issue goes through the following steps:

Understand the issue reported;
Reproduce the unexpected behavior locally;
Perform root cause analysis to identify the underlying problem;
Create test cases to cover the identified problem;
Work out a solution to rectify the behavior and make the newly created test cases pass;
Make a pull request and go through peer review;

As a result, it would be very helpful yet challenging if you could provide an isolated project reproducing your reported issue. Anyway, please ensure your issue report is informative enough for the community to pick up. At a minimum, include the following hints:
BUG REPORT

Please describe the issue you observed:

After Nameserver and Controller start, the logs are not correctly printed.
bin/mqnamesrv -c ./conf/controller/quick-start/namesrv.conf

After starting using the command, the log file for the corresponding module is not generated in the corresponding directory, but the log file for the Proxy module is generated.

Please tell us about your environment:

Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):

FEATURE REQUEST

Please describe the feature you are requesting.

Provide any additional detail on your proposed use case for this feature.

Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue?

If there are some sub-tasks involved, use -[] for each sub-task and create a corresponding issue to map to the sub-task:

sub-task1-issue-number: sub-task1 description here,
sub-task2-issue-number: sub-task2 description here,
...

Hi @mxsm, duplicate issue of #5715


How can I tell libvips, via the sharp API, what filename I want it to use in the tmp directory for any given file?

I have a use case where I need to be able to have libvips store things in /tmp in a deterministic filename per image.  Is there a way via the sharp API that I can do this?  I know that libvips in theory supports this, but we're using sharp rather than directly using libvips.
The reason for this is because when we get the no space left on device error, files seem to get orphaned in /tmp.  But I can't just clear /tmp because other processes might be using it.  But if I could name the files deterministically then I'd know specifically which things I can safely clear.
This is in an AWS edge lambda where I only have 512 MB of tmp storage, but other instances of the lambda might also be using tmp.  That's why I cannot just delete everything in tmp.

I know that libvips in theory supports this,

Are you referring to the TMPDIR and/or VIPS_DISC_THRESHOLD environment variables? They should "just work", the same as they already when running vips at the command line.

I hope this information helped. Please feel free to re-open with more details if further assistance is required.


[nmstate-0.3] Ifaces: allowing child been removed

Currently will sync child state with parent which stop child been
removed.
Expanded the verification stage to check virtual interface been removed
when desire state is down or absent.
Once verification stage expanded, existing integration test case will
catch this failure, no new test case is required.

Please rebase it


Allow source maps for non-preprocessed files

Based on discussion in #594.
We could add sourceMap attr to file patterns, true.
Also a default preprocessor might check for in-lined source map.

I put together a source-map-support plugin that improves stack traces in Chrome with inline source maps (like those produced from Browserify with the debug option).
Here's a comparison of a stack without/with this plugin.
--- stack-without	2015-01-02 15:02:55.000000000 -0700
+++ stack-with	2015-01-02 15:03:12.000000000 -0700
@@ -1,11 +1,11 @@
 AssertionError: case 2: expected [ 0, 0.6666666666666666 ] to deeply equal [ 0, 0.5 ]
-    at Function.assert.deepEqual (http://localhost:9876/absolute/var/folders/6m/3grlt52x7w3047wy0n6j7dr00000gn/T/2d4c510ad9122153a42db199d1cc8e9553208184.browserify:1848:32)
-    at Context.<anonymous> (http://localhost:9876/absolute/var/folders/6m/3grlt52x7w3047wy0n6j7dr00000gn/T/2d4c510ad9122153a42db199d1cc8e9553208184.browserify:6061:14)
+    at Function.assert.deepEqual (node_modules/chai/lib/chai/interface/assert.js:205:1)
+    at Context.<anonymous> (src/scenes/util/geom.test.js:27:1)
     at callFn (http://localhost:9876/base/node_modules/mocha/mocha.js:4496:21)
     at Test.Runnable.run (http://localhost:9876/base/node_modules/mocha/mocha.js:4489:7)
     at Runner.runTest (http://localhost:9876/base/node_modules/mocha/mocha.js:4892:10)
     at http://localhost:9876/base/node_modules/mocha/mocha.js:4970:12
     at next (http://localhost:9876/base/node_modules/mocha/mocha.js:4817:14)
     at http://localhost:9876/base/node_modules/mocha/mocha.js:4827:7
     at next (http://localhost:9876/base/node_modules/mocha/mocha.js:4766:23)
     at http://localhost:9876/base/node_modules/mocha/mocha.js:4794:5

The plugin simply delegates to the source-map-support package.
Things are still less than ideal.  The debugger doesn't generate clickable links for compiled sources.  I'll see if there's a way to address this.
Not sure if this will work for other cases, but it is working well for me when using karma-browserify to generate bundles before tests run.


fix: fix time and float formatting issues

Fixed value formatting issues

Fixed time format, removed the timezone from string and added converting time to UTC before formatting. This results in the same data being stored in db, but this format is also supported by timezone unaware types.
Removed the precision limit when formatting float values. It used to be 6 digits, not it's all the digits present in the value
Added support for bytea formatting

The current implementation doesn't work in the first place. The fix itself doesn't convert time values but rather just presents them in a different format as a string. E.g 4:30:56+03:00 is presented as 1:30:56. According to Postgres documentation, that's precisely what's done under the hood
For timestamp with time zone, the internally stored value is always in UTC (Universal Coordinated Time, traditionally known as Greenwich Mean Time, GMT). An input value that has an explicit time zone specified is converted to UTC using the appropriate offset for that time zone. If no time zone is stated in the input string, then it is assumed to be in the time zone indicated by the system's [TimeZone](https://www.postgresql.org/docs/11/runtime-config-client.html#GUC-TIMEZONE) parameter, and is converted to UTC using the offset for the timezone zone

I agree that this should definitely be handled by backend. But since go doesn't have the option to skip timezone in Time structure, we would always have to append timezone to the format string. This leads to the issue that users wouldn't be able to use prepared for columns of type date and timezone (they will get a confusing error). In any case, I'm open for a discussion on this topic, maybe there are better solutions to this issue

Integration tests run: https://github.com/firebolt-db/firebolt-go-sdk/actions/runs/6416778722


Updated 'nginx_harden' to allow for more complex if statements at the…

… playbook level.

Team Approved