Error with pip on Windows

When I pip install,I meet this situation.
E:\OpenSfM>pip install -r requirements.txt
Ignoring opencv-python: markers 'sys_platform == "linux"' don't match your environment
Collecting cloudpickle==0.4.0 (from -r requirements.txt (line 1))
Using cached cloudpickle-0.4.0-py2.py3-none-any.whl.metadata (3.7 kB)
Collecting exifread==2.1.2 (from -r requirements.txt (line 2))
Using cached ExifRead-2.1.2.tar.gz (33 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting flask==2.3.2 (from -r requirements.txt (line 3))
Using cached Flask-2.3.2-py3-none-any.whl.metadata (3.7 kB)
Collecting fpdf2==2.4.6 (from -r requirements.txt (line 4))
Using cached fpdf2-2.4.6-py2.py3-none-any.whl.metadata (23 kB)
Collecting joblib==0.14.1 (from -r requirements.txt (line 5))
Using cached joblib-0.14.1-py2.py3-none-any.whl.metadata (4.5 kB)
Collecting matplotlib (from -r requirements.txt (line 6))
Using cached matplotlib-3.9.2-cp313-cp313-win_amd64.whl.metadata (11 kB)
Collecting networkx==2.5 (from -r requirements.txt (line 7))
Using cached networkx-2.5-py3-none-any.whl.metadata (4.9 kB)
Requirement already satisfied: numpy>=1.19 in d:\python\lib\site-packages (from -r requirements.txt (line 8)) (2.1.2)
Collecting Pillow>=8.1.1 (from -r requirements.txt (line 9))
Using cached pillow-11.0.0-cp313-cp313-win_amd64.whl.metadata (9.3 kB)
Collecting pyproj>=<IP_ADDRESS> (from -r requirements.txt (line 10))
Using cached pyproj-3.7.0-cp313-cp313-win_amd64.whl.metadata (31 kB)
Collecting pytest==3.0.7 (from -r requirements.txt (line 11))
Using cached pytest-3.0.7-py2.py3-none-any.whl.metadata (4.7 kB)
Collecting python-dateutil>=2.7 (from -r requirements.txt (line 12))
Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting pyyaml==5.4 (from -r requirements.txt (line 13))
Using cached PyYAML-5.4.tar.gz (174 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [65 lines of output]
running egg_info
writing lib3\PyYAML.egg-info\PKG-INFO
writing dependency_links to lib3\PyYAML.egg-info\dependency_links.txt
writing top-level names to lib3\PyYAML.egg-info\top_level.txt
Traceback (most recent call last):
File "D:\Python\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
~~~~^^
File "D:\Python\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools\build_meta.py", line 302, in get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "", line 271, in
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools_init.py", line 117, in setup
return distutils.core.setup(**attrs)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools_distutils\core.py", line 183, in setup
return run_commands(dist)
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools_distutils\core.py", line 199, in run_commands
dist.run_commands()
~~~~~~~~~~~~~~~~~^^
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 954, in run_commands
self.run_command(cmd)
~~~~~~~~~~~~~~~~^^^^^
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools\dist.py", line 991, in run_command
super().run_command(command)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools_distutils\dist.py", line 973, in run_command
cmd_obj.run()
~~~~~~~~~~~^^
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 315, in run
self.find_sources()
~~~~~~~~~~~~~~~~~^^
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 323, in find_sources
mm.run()
~~~~~~^^
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 544, in run
self.add_defaults()
~~~~~~~~~~~~~~~~~^^
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 582, in add_defaults
sdist.add_defaults(self)
~~~~~~~~~~~~~~~~~~^^^^^^
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools\command\sdist.py", line 108, in add_defaults
super().add_defaults()
~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools_distutils\command\sdist.py", line 238, in add_defaults
self._add_defaults_ext()
~~~~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools_distutils\command\sdist.py", line 323, in _add_defaults_ext
self.filelist.extend(build_ext.get_source_files())
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "", line 201, in get_source_files
File "C:\Users\1\AppData\Local\Temp\pip-build-env-yp3_o472\overlay\Lib\site-packages\setuptools_distutils\cmd.py", line 107, in getattr
raise AttributeError(attr)
AttributeError: cython_sources
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
May I ask what I should do?

Same issue in Ubuntu 22.04.4 LTS


internal error: entered unreachable code

As mentioned in https://github.com/dfinity/agent-rs/issues/201#issuecomment-855175908, I have a canister written in Rust like this:
use ic_cdk_macros::{query};
use ic_utils_http_request::{HttpResponse, HttpRequest};

#[query]
fn http_request(request: HttpRequest) -> HttpResponse {
    HttpResponse {
        status_code: 200,
        headers: vec![],
        body: request.body.to_vec(),
        streaming_strategy: None,
    }
}

However, when I try to make a GET request via icx-proxy I get a 500 response and see this in the output from dfx start:
[Canister rrkah-fqaaa-aaaaa-aaaaq-cai] Panicked at 'internal error: entered unreachable code', /Users/py/.cargo/registry/src/github.com-1ecc6299db9ec823/candid-0.6.21/src/parser/value.rs:326:9
I started icx-proxy with -v -v so I see the GET request being logged.
I tried to curl the proxy instead and got Replica Error (5): "IC0502: Canister rrkah-fqaaa-aaaaa-aaaaq-cai trapped: unreachable"
I did this in Motoko first as part of testing https://github.com/dfinity/agent-rs/pull/195 and didn't run into this.
Could someone help me understand if I'm doing something wrong here? Thanks.

From looking at https://docs.rs/crate/candid/0.6.21/source/src/parser/value.rs I suspect this might originate from: https://github.com/dfinity/candid/blob/03d6d82fdd7e6c9012d2cea19f2b6b1a9c5ba0c3/rust/candid/src/parser/value.rs#L328-L330

I see the latest version of candid is 0.7.0. Is there some mismatch because I'm using dfx version 0.7.0-beta.8 but ic-cdk version 0.3.0 exports candid version 0.6.21?

Looks fine on the candid side. The error is due to calling IDLValue::ty(), which is not allowed. Because you cannot infer candid types from IDLValue.
Maybe related to https://github.com/dfinity/agent-rs/issues/132, but I was doing a similar thing in Rust and did not see this error: https://github.com/dfinity/candid/blob/master/tools/ui/src/didjs/lib.rs#L50

@chenyan-dfinity is it possible I need to add candid_method and export_service?
I tried that before but I couldn't find any documentation. I gather they're related to generating a .did file but I don't understand how they're intended to be used.
I still have a .did file around from the hello world tutorial. Could that be causing problems?

I just removed the streaming_strategy field from the definition of HttpResponse that I copied from ic-utils and it works fine now.
Based on what you said, it seems like the issue is because it's defined like this, and uses IDLValue:

#[derive(CandidType, Deserialize)]
pub struct HttpResponse {
    pub status_code: u16,
    pub headers: Vec<HeaderField>,
    #[serde(with = "serde_bytes")]
    pub body: Vec<u8>,
    pub streaming_strategy: Option<StreamingStrategy>,
}

#[derive(CandidType, Deserialize)]
pub struct StreamingCallbackHttpResponse {
    #[serde(with = "serde_bytes")]
    pub body: Vec<u8>,
    pub token: Option<IDLValue>,
}

Right, pub token: Option<IDLValue> was the problem, and CDK cannot handle it properly. We need to change the token type to Option<candid::Func> in agent-rs.

add candid_method and export_service

Yeah, that is only used for auto-generating did files, and not related to this error. We are still trying to figure out the best way to integrate this into the CDK. For now, the best document is probably the test: https://github.com/dfinity/candid/blob/master/rust/candid/tests/types.rs#L98

Thanks @chenyan-dfinity!

pub token: Option<IDLValue> was the problem

token and callback I think

I think StreamingCallbackHttpResponse isn't relevant here, and including it may have confused things.


html() does not split content right

I am using jsPDF method to generete PDF report. It is working greate until i reach the moment it should split the content.
Basicly it is a invoice report and in the header there are some info for the client and the supplier.
In the body I have a table with invoice lines and below the table i have invoice summary with the payable sum of the onvoice.
The problem is when there are more invoice lines and for example one line is divided between two pages. How to fix this behaivior?

Pull request #2977 is working on that.

I'm facing the same problem

will it be fixed soon?


Using createMatches with offset is bogous

Stumbled over the new offset parameter of createMatches: https://github.com/microsoft/vscode/blob/4711909afcdd79cd1cc9b96063212b81ae80d8c7/src/vs/base/common/filters.ts#L395
This tells me that something hasn't been understood because FuzzyScore itself already has the notion of an offset. The idea is that no substrings are created but fuzzyScore (and its cousins) should be called with a wordPos which is the offset at which matching should start inside a word. That offset is that captured inside the score and used when creating matches. The new offset doesn't fit into this.

Verification: use quick outline and search. The highlights should be proper and results too.


bg/LWPMIOPEN-40 :  Dump out input/output and weights tensor when a NaN/Inf occurs in Convolution

Overloading Handle::ReadTo to take raw pointer.
Added API DumpTensorToFileFromDevice to dump tensor when nan is encountered and env variable MIOPEN_DUMP_TENSOR_PATH is set.
Addtest test for verification.

@bghimireamd @junliume Please let me know if you need a ticket to track https://github.com/ROCmSoftwarePlatform/MIOpen/pull/1752#pullrequestreview-1133632691. Proposed labels: urgency_high, enhancement, quality.

@bghimireamd @junliume Please let me know if you need a ticket to track #1752 (review). Proposed labels: urgency_high, enhancement, quality.

@bghimireamd could you track the above review opinions? Thanks! @atamazov

@atamazov @junliume @JehandadKhan I will create a new PR as per Artem's suggestions.


WandbLogger increases step within epoch

🐛 Bug
If I log train_loss and val_loss with the WandbLogger it increases the step within the epoch s.t. train_loss is logged on steps (1, 3, 5, ..) and val_loss on steps (0, 2, 4, ..).
To Reproduce
Colab with BoringModel
cc @awaelchli @morganmcg1 @AyushExel @borisdayma @scottire @manangoel99

@manangoel99 can probably help here

is this happening on the wandb UI? If yes, can you try updating the x-axis to trainer/global_step?

The reason for this issue is that PL has its own global_step and wandb has its own internal step.
global_step is updated at the end of every training step while the wandb step is updated every time self.log is called.
So if you call self.log twice within the same training step, it would lead to the wandb step incrementing twice even though the global_step is incremented only once.
So as @rohitgr7 mentioned, you would want to change the x-axis to trainer/global_step and the plots would fix themselves.

Thanks guys!

It's worth noting that it's not possible to set the x-axis for images. As a result, when using WandbLogger, there's no way to reliably show images from a particular training step across runs. For example, if I want to log an output and some visualization, the output will be logged at step n, and the visualization will be logged at step n+1. There's a set interval at which images are logged (e.g., images are always logged at step 11k, and visualizations are always logged at step 11k + 1). If I now add a new logged metric, images are logged at step 12k, and visualizations are logged at step 12k + 1. This means that for a training step k = 77, the image for the old training run has index 847, and the image for the new training run has index 924, making it nearly impossible to find and compare them.
I've resorted to subclassing WandbLogger to override the way the step is specified:
@rank_zero_only
def log_metrics(
    self,
    metrics: Mapping[str, float],
    step: int,
) -> None:
    # This is exactly like the regular WandbLogger, except the step must be
    # specified, and images are logged correctly according to the step.
    assert rank_zero_only.rank == 0, "experiment tried to log from global_rank != 0"
    metrics = _add_prefix(metrics, self._prefix, self.LOGGER_JOIN_CHAR)
    self.experiment.log(dict(metrics, **{"trainer/global_step": step}), step=step)

Would it be worth making this the default behavior, at least for images?


docstore sync rate

Hello,
I am creating an application with a distributed database using this docstore. However, I have noticed that when a new instance is booted up, it seems to either take forever to, or never, sync with already-running instances until someone does a put. Is there supposed to be a timed sync event where instances of the docstore attempt to get the newest database among currently-running peers (and what is the time period on that if it exists?), or is it intended that new peers don't get the store until it is modified?
Thanks

Hi @cakenggt, I believe the problems you were experiencing were due to the problems we had with the replication implementation. We have now re-written the replication and the peers should start replicating automatically now.
Thanks for reporting this and let us know if you still experience this problem!


UserService.link called when only using one oauth2 provider

I'm only making use of the the linkedin oauth2 provider and not allowing any other providers.  As such, I didn't bother to implement UserService.link as the there is no need to link accounts.  I was so confident that this method wouldn't be called, that it throws an Exception if it is called.
However, if the user is already logged in, and they hit http://website/authenticate/linkedin directly, then the UserService.link method is invoked.
I'm not to fussed if the behaviour changes or not, but if it remains as is then I think it's worth updating the UserService documentation to warn that link may be called even if only one provider is used.

We definitely should continue to support multiple of each account type. I'm using this functionality to connect multiple Google accounts and combine data from all of them. If you don't want to allow linking multiple linkedin accounts, you need to explicitly implement the link method to make sure that happens.
The documentation should probably make it clear that SecureSocial supports linking any number of accounts, of any type, together into one user.


How to get current active sequence?

I've been looking for a while now through docs, tutorials, and here...  but can't seem to find this.
Is there some way to get the current active/open sequence in the sequencer?
Also, to get the current selected track and shot?

Hi, use latest release that contains unreal_engine.get_all_edited_assets()
https://github.com/20tab/UnrealEnginePython/blob/master/examples/asset_editors.py
just check the asset type to understand which one is loaded in the sequencer

Ok I can check to see if it is for example a "LevelSequenceEditor" I guess.... but how can I also go about getting the tracks in that sequence, shots in a specific track, and also check to see which are currently selected track and/or a selected shot?  Are these at all referenced in a property of the sequence or track?
import unreal_engine as ue
for _asset in ue.get_all_edited_assets():
editor = ue.find_editor_for_asset(_asset)
print('{0} - {1}'.format(editor.get_editor_name(), editor.get_last_activation_time()))
editor.focus_window()
if editor.get_editor_name() == "LevelSequenceEditor":
print("SEQUENCE="+_asset.get_name())
print(_asset.properties())

Ok I was able to figure out how to get all the way down to the Shot level...  but I still could use some help on figuring out how to determine what a user might have currently selected if that is at all possible.
import unreal_engine as ue
from unreal_engine.classes import MovieSceneTrack

for _asset in ue.get_all_edited_assets():
	editor = ue.find_editor_for_asset(_asset)
	print('{0} - {1}'.format(editor.get_editor_name(), editor.get_last_activation_time()))
	editor.focus_window()
	if editor.get_editor_name() == "LevelSequenceEditor":
		print("SEQUENCE="+_asset.get_name())
		print(_asset.properties())
		print(_asset.MovieScene.properties())
		print(_asset.MovieScene.MasterTracks)

		for track in _asset.MovieScene.MasterTracks:
			print("Track="+track.get_name())
			print("TrackDisplayName="+track.DisplayName)
			print(track.properties())
			print(track.Sections)

			for shot in track.Sections:
				print("Shot="+shot.get_name())
				print("ShotDisplayName="+shot.ShotDisplayName)
				print("StartTime="+str(shot.StartTime))
				print("EndTime="+str(shot.EndTime))
				print(shot.properties())

I think the best thing to do is exposing the ISequencer api:
http://api.unrealengine.com/INT/API/Editor/Sequencer/ISequencer/index.html
there are already parts of the python sequencer api using it:
https://github.com/20tab/UnrealEnginePython/blob/master/Source/UnrealEnginePython/Private/UObject/UEPySequencer.cpp#L67
we can retrieve the ISequencer address from the IAssetEditorInstance returned by the find_editor_for_asset() function


Clean up tnodb data structure

part of #77

@delandtj there is also the problem of wireguard listening port that is still not solved here.


Problem when running sudo ldconfig

We have the following message when we try to do sudo ldconfig to flash the lime:

Hello @iiiiishan, do you find a solution to this problem, or is it still an issue?

Closing as stalled, please re-open this issue if you encounter it.


DB Cluster maintenance window always showing as needing an update

Given a cluster configuration like this:
const pgCluster = new digitalocean.DatabaseCluster(
      "do-pg-cluster",
      {
        name: pgClusterName,
        engine: "pg",
        nodeCount: isProduction ? cluster.prod.nodes : cluster.dev.nodes,
        region: "sgp1",
        size: isProduction ? cluster.prod.size : cluster.dev.size,
        version: "12",
        maintenanceWindows: [
          {
            day: "friday", // saturday 00:00 +07
            hour: "18:00",
          },
        ],
      },
      resourceOptions
    );

Pulumi is showing the following diff on every update even though the window has been applied.
pulumi:pulumi:Stack                       platform-dev-austinrivas
     └─ DigitalOcean                           digitalocean
 ~      └─ digitalocean:index:DatabaseCluster  do-pg-cluster             updated     [diff: ~maintenanceWindows]

The terraform provider also seems to throw some errors when removing a maintenance window that was already created.

Hi @austinrivas
My apologies for this - please can you show me the diff - what is the value changed from / to
You can get it when using "pulumi up" and then looking at the details
Paul

My mistake, its was a time format issue.
pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:dev::platform::pulumi:pulumi:Stack::platform-dev]
        ~ digitalocean:index/databaseCluster:DatabaseCluster: (update)
            [id=ba969d15-848f-4fe6-b97d-08a088f3f05b]
            [urn=urn:pulumi:dev::platform::DigitalOcean$digitalocean:index/databaseCluster:DatabaseCluster::do-pg-cluster]
            [provider=urn:pulumi:dev::platform::pulumi:providers:digitalocean::default_3_5_0::3fb024d6-a3e2-4d8b-a5b0-f84e834ac0f3]
          ~ maintenanceWindows: [
              ~ [0]: {
                      ~ hour: "18:00:00" => "18:00"
                    }
            ]

However do still see an error when removing all maintenance windows.

What error are you seeing @austinrivas ?


[linting] move monitor-opentelemetry to use flat config

delete .eslint* and replace with eslint.config.mjs

API change check
API changes are not detected in this pull request.


Error: Debug Failure. False expression.

Bug Report

🔎 Search Terms
debug failure, false expression, at object.first

🕗 Version & Regression Information

This is a crash
This is the behavior in every version I tried, 4.9.5, and I reviewed the FAQ for entries about it
I was unable to test this on prior versions because I had other issues with prior versions that made me update to a later version

⏯ Playground Link

Playground link with relevant code
💻 Code

stack trace:
/Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:99615
                throw e;
                ^

Error: Debug Failure. False expression.
    at Object.first (/Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:990:18)
    at getSpecifierForModuleSymbol (/Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:45313:36)
    at serializeAsAlias (/Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:46419:107)
    at serializeSymbolWorker (/Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:46084:25)
    at serializeSymbol (/Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:45978:25)
    at /Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:45963:29
    at Map.forEach (<anonymous>)
    at visitSymbolTable (/Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:45962:81)
    at symbolTableToDeclarationStatements (/Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:45847:17)
    at /Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js:44127:106

Node.js v18.11.0

source: node_modules/typescript/lib/tsc.js
ts.firstOrUndefined = firstOrUndefined;
first(array) {
    ts.Debug.assert(array.length !== 0);
    return array[0];
}
ts.first = first;

tsconfig.json:
{
  "compilerOptions": {
    "module": "ES2020",
    "moduleResolution": "node",
    "allowJs": true,
    "checkJs": false,
    "declaration": true,
    "removeComments": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "target": "ES2022",
    "sourceMap": true,
    "outDir": "./dist",
    "baseUrl": "./",
    "rootDir": "./",
    "incremental": true,
    "skipLibCheck": true,
    "strict": true,
    "strictNullChecks": true,
    "noImplicitAny": true,
    "noImplicitThis": true,
    "strictBindCallApply": true,
    "alwaysStrict": true,
    "forceConsistentCasingInFileNames": true,
    "noFallthroughCasesInSwitch": true,
    "paths": {
      "@/shared/*": ["backend-services-shared/src/*"], // contains .js files
      "@/utils/*": ["src/utils/*"],
      "@/modules/*": ["src/modules/*"]
    }
  },
  "exclude": ["node_modules", "test", "dist"]
}

🙁 Actual behavior

Error happens when I turn on allowJs
🙂 Expected behavior
allowJs shouldn't crash build process and should include the js files from the source in the build output 😔

We'd need a way to reproduce the problem. Do you have a repo we can clone, or other way to produce this crash?

To help narrow it down, you might be able to modify your tsc.js at /Users/calebpitan/source/work/zendwa/emailing-service/node_modules/typescript/lib/tsc.js
                  symbolTableToDeclarationStatements: function (symbolTable, enclosingDeclaration, flags, tracker, bundled) {
+                     console.log("FILE NAME", ts.getSourceFileOfNode(enclosingDeclaration).fileName);
                      return withContext(enclosingDeclaration, flags, tracker, function (context) { return symbolTableToDeclarationStatements(symbolTable, context, bundled); });
                  },

It starts at line 44125 in TypeScript 4.9.5's tsc.js.

Thanks to @DanielRosenwasser "debug snippet" which seems to have pointed me in the right direction.
I inserted a console statement on that line and it was able to log the filenames till it crashed again. I inspected the last logged file before crash and found out it imported files that imported uninstalled modules/deps.
Instaliing the missing module fixed it and tsc could build successfully.
But this doesn't mean there's no problem. The problem is: the compiler couldn't resolve a specifier, why couldn't it just say so in an understandable, helpful error message, rather than an elusive jargon like "Error: Debug Failure. False expression."?

But this doesn't mean there's no problem. The problem is: the compiler couldn't resolve a specifier, why couldn't it just say so in an understandable, helpful error message, rather than an elusive jargon like "Error: Debug Failure. False expression."?

The message is cryptic because it's intended for TS developers, not end-users.  A debug assert being hit means the compiler has done something that, if it were functioning correctly, would literally never happen (in this case calling first() with an empty array); it always indicates a bug that has to be fixed elsewhere.  In this case, it sounds like there might be a missing check during module specifier resolution.

I got this same error.
Specifically, it seems like I had @types/gopd installed, and then also made a types/gopd/index.d.ts, in which I provided my own definition that uses export =. @RyanCavanaugh can you reproduce it with that approach?
Note that it does not crash when my overload uses export default, but every CJS module's type is export = so I need to use that.

@DanielRosenwasser when i apply that console log diff (which is slightly tricker in TS 5 beta), it's never hit - the line it dies on is Debug.assert(node.kind !== 257 /* VariableDeclaration */); inside checkAliasSymbol, and when i add a console.log(node) in front of it, i get:

<ref *2> Node4 {
  pos: 64,
  end: 88,
  kind: 257,
  id: 0,
  flags: 262144,
  modifierFlagsCache: 536875008,
  transformFlags: 0,
  parent: <ref *1> Node4 {
    pos: 59,
    end: 88,
    kind: 258,
    id: 0,
    flags: 262144,
    modifierFlagsCache: 536875008,
    transformFlags: 4194304,
    parent: Node4 {
      pos: 59,
      end: 89,
      kind: 240,
      id: 0,
      flags: 262144,
      modifierFlagsCache: 536875008,
      transformFlags: 4194304,
      parent: [Node4],
      original: undefined,
      emitNode: undefined,
      modifiers: undefined,
      declarationList: [Circular *1],
      jsDoc: undefined,
      flowNode: [Object]
    },
    original: undefined,
    emitNode: undefined,
    declarations: [
      [Circular *2],
      pos: 64,
      end: 88,
      hasTrailingComma: false,
      transformFlags: 0
    ]
  },
  original: undefined,
  emitNode: undefined,
  symbol: Symbol4 {
    flags: 2097152,
    escapedName: '$gOPD',
    declarations: [ [Circular *2] ],
    valueDeclaration: undefined,
    id: 24904,
    mergeId: 0,
    parent: undefined,
    members: undefined,
    exports: undefined,
    exportSymbol: undefined,
    constEnumOnlyModule: undefined,
    isReferenced: undefined,
    isAssigned: undefined,
    links: undefined
  },
  localSymbol: undefined,
  name: Identifier2 {
    pos: 64,
    end: 70,
    kind: 79,
    id: 0,
    flags: 262144,
    transformFlags: 0,
    parent: [Circular *2],
    original: undefined,
    emitNode: undefined,
    escapedText: '$gOPD',
    jsDoc: undefined,
    flowNode: { flags: 2064, antecedent: [Object], node: [Node4] },
    symbol: undefined
  },
  exclamationToken: undefined,
  type: undefined,
  initializer: <ref *3> Node4 {
    pos: 72,
    end: 88,
    kind: 210,
    id: 0,
    flags: 262144,
    modifierFlagsCache: 0,
    transformFlags: 0,
    parent: [Circular *2],
    original: undefined,
    emitNode: undefined,
    symbol: undefined,
    localSymbol: undefined,
    expression: Identifier2 {
      pos: 72,
      end: 80,
      kind: 79,
      id: 0,
      flags: 262144,
      transformFlags: 0,
      parent: [Circular *3],
      original: undefined,
      emitNode: undefined,
      escapedText: 'require',
      jsDoc: undefined,
      flowNode: [Object],
      symbol: undefined
    },
    questionDotToken: undefined,
    typeArguments: undefined,
    arguments: [
      [Node4],
      pos: 81,
      end: 87,
      hasTrailingComma: false,
      transformFlags: 0
    ]
  },
  jsDoc: [ jsDocCache: [] ]
}

Happy to debug live elsewhere, or with comments here, since it's consistently reproducible for me - just not in a branch i'm ready to share publicly.

That seems like a separate stack trace then, right? If so, what is the stack trace? And can you switch the console.log(node) to console.log("FILE NAME", ts.getSourceFileOfNode(enclosingDeclaration).fileName);?

I can't, because ts is not defined in that function.
Stack trace:
$PWD/node_modules/typescript/lib/tsc.js:113967
      throw e;
      ^

Error: Debug Failure. False expression.
    at checkAliasSymbol ($PWD/node_modules/typescript/lib/tsc.js:78641:17)
    at checkVariableLikeDeclaration ($PWD/node_modules/typescript/lib/tsc.js:76204:7)
    at checkVariableDeclaration (/$PWD/node_modules/typescript/lib/tsc.js:76287:5)
    at checkSourceElementWorker ($PWD/node_modules/typescript/lib/tsc.js:79258:16)
    at checkSourceElement ($PWD/node_modules/typescript/lib/tsc.js:79089:7)
    at forEach ($PWD/node_modules/typescript/lib/tsc.js:37:22)
    at checkVariableStatement ($PWD/node_modules/typescript/lib/tsc.js:76297:5)
    at checkSourceElementWorker ($PWD/node_modules/typescript/lib/tsc.js:79227:16)
    at checkSourceElement ($PWD/node_modules/typescript/lib/tsc.js:79089:7)
    at forEach ($PWD/node_modules/typescript/lib/tsc.js:37:22)

Node.js v19.6.1

@DanielRosenwasser actually turns out i was authoring my "declare module" incorrectly - i was doing type x = whatever instead of function x, and the export = with the type was what was crashing. Hope that helps :-)

This is happening to me on version 5.3.3 of TypeScript.

I'm going to try 5.4.5 to see if this is resolved.

@divmgl that seems like an unrelated stack trace. Feel free to open a separate issue if you can provide a repro.

I'm getting this too after updating from 5.2.2 to 5.6.2. Similar to others reporting this, I have allowJs: true set.

@zigcccc could you prepare a repro case of the problem? you could try to remove as much lines from your project as possible (gradually) and bisect the problem this way to the minimal repro case


Re-implement chat

Re-implement the player chat system to the client.

@petterarvidsson what do you think, is this a blocker for release 3? I do not think so, I rather release soon and implement this proper later on like we talked about.

I agree, this is high priority but not required


show effective volume along with the theoretical max volume

https://docs.ethswarm.org/docs/learn/technology/contracts/postage-stamp#effective-utilisation-table

It's a duplication of https://github.com/ethersphere/swarm-desktop/issues/336. Probably the right place for this issue is here tho.


[Bug]: Missing Hover effect in Sign-up & subscribe button

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
Hover effect is missing in Sign-up and subscribe button . We should add the feature for the better User experience.
Add Screenshots
No response
What browsers are you seeing the problem on?
No response
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC contributor
[X] I want to work on this issue
[X] I'm willing to provide further clarification or assistance if needed.

example? can you elaborate? (with screenshot/ idea/ design)

Here Subscribe button is not having the Hover effect

Sign button is also having this issue

Can i work on this issue??

Can i work on this issue??

assigned already

Ya ,I am working on it


Wake Lock Capabilities Post

Target Live Date: 2018-12-18

[X] I have run npm test locally and all tests pass.
[X] I have added the appropriate type-something label.
[X] I've staged the site and manually verified that my content displays correctly.

FYI: @tomayac, @jyasskin, @slightlyoff

:+1:

:tada: This has been pushed live to https://developers.google.com/web/


add notification AccessibleView, next/previous functions

fixes https://github.com/microsoft/vscode/issues/187114
fixes #184612

EDIT: I've decided to remove that part for now - so only one notification will be focused at a time in the accessible view and iteration won't be possible from within that.

note that if possible, we will want to use the generic way instead of using the key handler
exploration here is proving that won't be possible for the notifications case because we need to keep track of the current index and it otherwise always returns 0 so it doesn't go to next/previous
https://github.com/microsoft/vscode/commit/27c694444d304e09f5279dea44c8b07248ef2d0c

cc @hbons

Should I be looking at a change here?

Sure, your review would be good @bpasero


ReferenceError: require is not defined while loading external middleware

Describe the bug
I'm trying to increase the max request body size by registering this middleware:
(() => {
    this.logger.info("inside middleware");

    const express = require('express');
    this.app.use(express.json({ limit: '10mb' }));
    this.app.use(express.urlencoded({ limit: '10mb', extended: true }));

    this.app.use("/", this.allRoutes);
})();

The server crashes with the next error:
2023-08-07 11:17:57 info: Handlebar helpers registration completed
2023-08-07 11:17:57 warn: Found an external middleware config. Note that if you are using middleware injection, it is required to include this.app.use(prefix, this.allRoutes); in your middleware. prefix can be either root i.e. "/" or any other desired prefix string for your routes.
2023-08-07 11:17:57 info: inside middleware
undefined:6
    const express = require('express');
                    ^

ReferenceError: require is not defined
    at eval (eval at start (/Users/.../.nvm/versions/node/v20.2.0/lib/node_modules/camouflage-server/dist/index.js:175:9), <anonymous>:6:21)
    at Object.eval (eval at start (/Users/.../.nvm/versions/node/v20.2.0/lib/node_modules/camouflage-server/dist/index.js:175:9), <anonymous>:11:3)
    at Object.start (/Users/.../.nvm/versions/node/v20.2.0/lib/node_modules/camouflage-server/dist/index.js:175:40)
    at Object.<anonymous> (/Users/.../.nvm/versions/node/v20.2.0/lib/node_modules/camouflage-server/bin/camouflage.js:252:14)
    at Module._compile (node:internal/modules/cjs/loader:1255:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1309:10)
    at Module.load (node:internal/modules/cjs/loader:1113:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47

I've been able to workaround it locally by patching this line locally:
new Function(middlewareConfig).call({ express: express_1.default, app, logger: logger_1.default, allRoutes });

but it looks like the app doesn't pickup new limits. If I path these two lines passing the object with limit property to the functions - everything works as expected. Any ideas what might be wrong here?

I was able to workaround this by patching this line locally:
new Function(middlewareConfig).call({ require, app, logger: logger_1.default, allRoutes });

and using this.require inside of my custom middleware

I am looking into a more appropriate way to handle this, but would you like to try a dynamic import?
(async () => {
    this.logger.info("inside middleware");

    const express = await import("express");
    this.app.use(express.json({ limit: '10mb' }));
    this.app.use(express.urlencoded({ limit: '10mb', extended: true }));

    this.app.use("/", this.allRoutes);
})();

I don't see any errors, but I haven't validated if the middlewares are actually applied.

@shubhendumadhukar the snippet you provided works okay for me in case of importing express. But if I do
(async () => {
    const multer = await import("multer");
    this.app.use(multer().any());
    this.app.use("/", this.allRoutes);
})();

I get
this.app.use(multer().any());
                 ^
TypeError: multer is not a function
    at eval (eval at start (/Users/fedor/.nvm/versions/node/v20.2.0/lib/node_modules/camouflage-server/dist/index.js:176:9), <anonymous>:5:18)

I figured it works if I do
(async () => {
    const multer = (await import('multer')).default;
    this.app.use(multer().any());
    this.app.use("/", this.allRoutes);
})();


Add S3 Bucket in S3 Bucket v1alpha3 api

Description of your changes
This PR aims to add Tagging feature support for the S3Bucket v1alpha3, this feature should help in terms of add tags for AWS billing purposes. Also the changes might be useful and be propagated into the next version v1beta1 release
Checklist
I have:
[✔] Run make reviewable to ensure this PR is ready for review.
[✔] Ensured this PR contains a neat, self documenting set of commits.
[✔] Updated any relevant documentation, examples, or release notes.
[ ] Updated the dependencies in app.yaml to include any new role permissions

CI failure was a flake, just retriggered 👍

Sorry that i have close and re-open the PR again to trigger the CI as i have no permission in Jenkins for replay the CI tasks

Hi @hasheddan @muvaf ,
Thanks for reviewing, all the checks have passed already, please help to merge this PR as i am not authorized


max channel parameter to claim_search

Do not return the same channel more than n times
Maybe do #2812 at the same time

This will be a blocker for odysee. What are the odds this can be live by next week?


Suggest use ESLint or TypeScript + TSLint

I think use ESLint or TypeScript + TSLint can improve code quality and better version control.  Especially the code format issues.

Yes, that IS indeed important.
I didn't do it at first time as I was intending to do it quickly and useful for a spacific need of mine, and then decided to open it.
The build process could actually import languages and styles from separate files as well.
I just expect the ending result in dist to be a single js file, for easier adoption and loading time :)


[Summary] Kubernetes backend support

basic support (#9) was added with #552
Current state:

[x] Basic pipeline support
[x] Proper service support
[x] Default resource limits: 512MB, 1 core
[x] Integrate it to drone-server
[x] RWX volume support with storageclasses
[x] Deploy it and run builds for 10 repos with it for 2 weeks
[x] support resource limits for pods (#1767)
[ ] make services work

[ ] support service ports

[ ] improve volume handling for steps in same groups

TODOs:

[x] pick usefull patches of #784 and port them to native backend

@6543 great work, can I test it somehow?
Is it possible to include any resources into it, e.g. nvidia gpus ?

hmm @maltegrosse at the moment I would say, best help is to test and point out it's limitations.
passthrough hardware axeleration like gpus, I never thought of. if it's about help via $, we have an openCollective account

@6543 is there a different behavior regarding cpu/mem resources and other resources available on the node?
https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/

I guess gpu's are just not jet taken into account - but that's an interesting usecase

@maltegrosse as long as the cluster has device plugins providing resources such as GPUs, it's pretty much the same as defining a resource limit for CPU/memory.

@6543 I seeing great progress in k8s backend support.
I think I wanna give it a try and update from 0.x to the latest stable version. But now I just saw that 2.0 is in the pipeline.
Would you recommend me to wait for the new 2.x major release? if yes, is there any ETA ?

WRT to k8s specifically: I'd say it's useable for production needs, at least I do so across many instances and a few dozen repos with some complex configs.

sounds nice, thanks for the feedback @pat-s . the only point which confuses me are the resource limits. Seems like every step requires the resources definitions - or can I simple add it to any agent globally by using normal k8s syntax? (so it will be applied to any job) - see https://woodpecker-ci.org/docs/next/administration/backends/kubernetes#resources
The reason is that i dont trust my users that they can assume / predict proper resource usage :)
Addionally, are there any breaking changes regarding my db (postgres) ? (currently using 0.15.6)

I couldnt find anything at https://woodpecker-ci.org/docs/next/migrations

Seems like every step requires the resources definitions

Yes, that's the case and probably won't change in the future.

or can I simple add it to any agent globally by using normal k8s syntax?

No, it must be added to each pipeline and their steps. Also, it's not about the runner (which is a separate deployment) but about the pods spawned by the runner. These are defined by the respective pipelines.

The reason is that i dont trust my users that they can assume / predict proper resource usage

By default, resources are not set (as it is the case for any other k8s resource). And yeah, teaching is needed. I feel you however, I have the same issues in my environment WRT to users ;)

thank you @pat-s
Have you played with Resource Quotas? Havent played with it yet, but could somehow limit the damage :-)

Seems like an interesting idea, maybe we can implement this in the helm chart, so it can be applied across the namespace WP is running in. Thanks for sharing the idea!

And setting up a default resource definition for each step is not an option at all for WP?

if no resource defintion in workflow file

check if global resource definition

apply this, or
fall back to no resource definition

As Resource Quotas mention:
For cpu and memory resources, ResourceQuotas enforce that every (new) pod in that namespace sets a limit for that resource. If you enforce a resource quota in a namespace for either cpu or memory, you, and other clients, must specify either requests or limits for that resource, for every new Pod you submit. If you don't, the control plane may reject admission for that Pod.
or are Limit Ranges exactly to solve that issue?
seems like if I look at the first example

close this as we shoudl have full support now - if there are still issues they are considerated normal bugs :)

@pat-s I finally upgraded to wp2, on kubernetes, works great! (inlcuding resource limits for GPU)
resources are limited by LimitRange:
apiVersion: v1
kind: LimitRange
metadata:
  name: compute-limits
  namespace: woodpecker
spec:
  limits:
  - default:
      cpu: 12
      memory: 40Gi
      nvidia.com/mig-2g.20gb: 1
    type: Container

thank you all again!

nice :heart:
I'll lock this issue as we now have kube support :)
future interactions should be new issues.


docker-compose up ERROR

ERROR: Service 'elasticsearch' failed to build: Please provide a source image with from prior to commit


Skip suppliers without DUNS number

Some of the suppliers in the preview, staging and production DBs were imported from the old database and don't have a DUNS number.
When tests select a supplier without a DUNS number and run the admin scenario with DUNS search the scenario fails since search returns >100 results. There's no reason for us to handle this case (since it's essentially searching for an empty string), so it seems that the simplest solution is to remove these suppliers from the random pool.

👍  Let's do it.


Webpack error on CSS for sash.css

monaco-editor version: 0.22.3
monaco-editor-webpack-plugin version: 3.0.0
Browser: N/A
OS: Win 10 Enterprise x64
Playground code that reproduces the issue: N/A
Hi I'm using both of the latest packages for the monaco editor and the monaco editor webpack plugin.  Upon running node node_modules/webpack-cli on my webpack I get this error

I was able to fix it by changing 4 lines where it looks like -calc(....) is being used instead of calc(calc(...) * -1).  Oddly other nearby lines do it the other way so I'm not sure why there are differences within this single file.  Nonetheless, these 4 bolded changes below fix my issue.
In sash.css:

.monaco-sash.orthogonal-start.vertical::before {
	left: calc(calc(var(--sash-size) / 2) * -1);
	top: calc(var(--sash-size) * -1);
}
.monaco-sash.orthogonal-end.vertical::after {
	left: calc(calc(var(--sash-size) / 2) * -1);
	bottom: calc(var(--sash-size) * -1);
}
.monaco-sash.orthogonal-start.horizontal::before {
	top: calc(calc(var(--sash-size) / 2) * -1);
	left: calc(var(--sash-size) * -1);
}
.monaco-sash.orthogonal-end.horizontal::after {
	top: calc(calc(var(--sash-size) / 2) * -1);
	right: calc(var(--sash-size) * -1);
}

I suspect that if I updated my webpack infrastructure (many loaders and plugins) that I might also be able to fix this, but just those 4 little changes were all that was needed.  Would it be possible to make that change?

I also have the same situation.How to resolve this problem?

monaco-editor version: 0.22.3
monaco-editor-webpack-plugin version: 3.0.0
Browser: N/A
OS: Win 10 Enterprise x64
Playground code that reproduces the issue: N/A
Hi I'm using both of the latest packages for the monaco editor and the monaco editor webpack plugin. Upon running node node_modules/webpack-cli on my webpack I get this error

I was able to fix it by changing 4 lines where it looks like -calc(....) is being used instead of calc(calc(...) * -1). Oddly other nearby lines do it the other way so I'm not sure why there are differences within this single file. Nonetheless, these 4 bolded changes below fix my issue.
In sash.css:
.monaco-sash.orthogonal-start.vertical::before {
left: calc(calc(var(--sash-size) / 2) * -1);
top: calc(var(--sash-size) * -1);
}
.monaco-sash.orthogonal-end.vertical::after {
left: calc(calc(var(--sash-size) / 2) * -1);
bottom: calc(var(--sash-size) * -1);
}
.monaco-sash.orthogonal-start.horizontal::before {
top: calc(calc(var(--sash-size) / 2) * -1);
left: calc(var(--sash-size) * -1);
}
.monaco-sash.orthogonal-end.horizontal::after {
top: calc(calc(var(--sash-size) / 2) * -1);
right: calc(var(--sash-size) * -1);
}
I suspect that if I updated my webpack infrastructure (many loaders and plugins) that I might also be able to fix this, but just those 4 little changes were all that was needed. Would it be possible to make that change?

I have resolved this problem.Beacause I used less-loader to compile *.less and *.css files, so I seperate these test: /\.(css|less)$/ to test:/.css$/ and test:/.less$/,this problems is resovled.But the real reason of the problem I have don't know.

you need to update<EMAIL_ADDRESS>


How to remove Etag and Last-Modified headers for static assets?

I want to disable Etag and Last-Modified headers for index.html files served by express.static, how can I accomplish this?
I tried:
app.use(express.static('public', {
    setHeaders: function(res, path){
        if (path.match(/index\.html$/)){
            res.removeHeader('Etag')
            res.removeHeader('Last-Modified')
        }
    }
}));

But it doesn't work, Etag and Last-Modified still in response's headers.

How do we do this in 2020? The above doesn't appear to work anymore.


The Diffrence Between jaysvcUtil and Bit Html Client Proxy Generator

Bit Code Generator does not generate some properties which are Required.

No support for concurrency mode in Bit
JaySvcUtilSample:
Version: {
"concurrencyMode": $data.ConcurrencyMode.Fixed
}

Enum properties have two types of fields: Index & Value (JaySvcUtil)
Bit Sample:
{ name : 'Man' , value : "Foundation.Test.Model.Dto.TestGender'Man'" },
JaySvcUtil Sample:
{ "name": "Man",  "index": 0, "value": 3 },

Bit Code Generator does not generate "Reflect define Metadata"
JaySvcUtil Sample:
Reflect.defineMetadata("O1", ["Version"],  types["Entity"].prototype)

Lets start with Index of Enum & Concurrency attribute! 💃


undefined method `reopen' for "streamed":String Did you mean?  prepend

I already saw the issue https://github.com/straydogstudio/axlsx_rails/issues/18 and it didn't help at all
As the title said I get this message when try to export to export.xlsx
ruby version: 2.5.3
rails version: 4.2.11
gemfile:
gem 'rails', '4.2.11'
gem 'write_xlsx'
gem 'axlsx'
gem 'axlsx_rails'
gem 'rubyzip'

bundle install:
Using rubyzip 1.2.2
Using axlsx 1.3.6
Using axlsx_rails 0.1.5
export.xlsx.axlsx:
wb = xlsx_package.workbook
wb.add_worksheet(name<EMAIL_ADDRESS>Accounts") do |sheet|

  # Create headers
  sheet.add_row ["Account id", ""Member id", "Member name", "Member email"]

  # Create entries for each header
  @accounts_paginated.each do |account|
    account.members.each do |member|
      sheet.add_row [account.id, member.id, member.name, member.email]
    end
  end
end

If you are indeed using axlsx_rails 0.1.5, that is quite old. You will want to get that to 0.5.2.


[rMem] Fix seg fault after a free operation

@raysan5 @assyrianic

@graducan @assyrianic thanks for this improvement! :)


Genetic Algorithm & their application in data science

Proposed title of article
Genetic Algorithm & their application in data science
Proposed article introduction
Today, in this world of information processing, business intelligence and business analytics, are gaining in importance very fast. The three major techniques or groups of algorithms which have gained a lot of visibility in recent times are fuzzy logic, neural networks and genetic algorithms. In this article we will learn what genetic algorithms are, the intuition behind Genetic Algorithms, steps involved in Genetic Algorithm, and finally we will discuss their applications. By end of this article, you will be comfortable applying genetic algorithms and can expect similar benefit on the problems you are working on.
Key takeaways

Intuition behind Genetic Algorithms
Biological Inspiration
What is Genetic Algorithm?
Steps Involved in Genetic Algorithm
Application of Genetic Algorithm

Article quality
In this article we will gain understanding about what genetic algorithm is and also how to implement it using TPOT library. I will also use simple example that can be easily understood by beginners to explain all about genetic algorithm.

Good afternoon and thank you for submitting your topic suggestion.
Your topic form has been entered into our queue and should be reviewed (for approval) as soon as a content moderator is finished reviewing the ones in the queue before it.

Good afternoon and thank you for submitting your topic to the EngEd program.
After some careful consideration, it struck us that this topic may be a bit over-saturated throughout other blog sites and official documentations.
We typically refrain from publishing content that is covered widely on the net or other blogs. We're more interested in original, practitioner-focused content that takes a deeper dive into programming-centric concepts.
But in order to approve the topic, it has to serve value to the larger developer community at large.
An option and a great way to write this as an in-depth article and make it more add value to the greater developer community at large would be to walk the reader through the USE of methods and functions by building a unique, different, useful project.

We would love to learn your thought process behind the solution you arrived at using these concepts and topics.

That way a developer could see them in action.
As mentioned above - we believe this topic is widely covered on other blog sites.
The best way for students to build a great portfolio is by building what does not exist and what can provide the most value.


Optimised Code and Fixed Tests

Check List:

[x] Tests pass (./test.sh <username> shows no differences between expected and actual outputs)
[x] All formatting changes by the build are committed
[x] Your launch script is named calculate_average_<username>.sh (make sure to match casing of your GH user name) and is executable
[x] Output matches that of calculate_average_baseline.sh

Execution time: 17.636s
Execution time of reference implementation: 47.717s

Using java version 21.0.1-graal in this shell.
Benchmark 1: ./calculate_average_kuduwa-keshavram.sh 2>&1
Time (mean ± σ):     17.636 s ±  0.296 s    [User: 51.162 s, System: 14.052 s]
Range (min … max):   17.256 s … 18.076 s    5 runs
Summary
kuduwa-keshavram: trimmed mean 17.621236375546662, raw times 17.64174988888,17.256375597879998,17.531187930879998,18.076145597879997,17.67601455588

00:09.117 now. Thx for participating!


Fix for #23 - Updates link

The bed files for stratification are located up one directory.
Thanks Kaushik!

Thanks!


Migrate case list/details to Vue.js (#743)

Closes: #743
Related-Issue: #743
Projected-Results-Impact: none

Codecov Report
Base: 83.66% // Head: 83.40% // Decreases project coverage by -0.26% :warning:

Coverage data is based on head (6b5386a) compared to base (1e32ab2).
 Consider uploading reports for the commit 284192b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #744      +/-   ##
==========================================
- Coverage   83.66%   83.40%   -0.27%
==========================================
  Files         159       14     -145
  Lines       15822     1247   -14575
  Branches      284      284
==========================================
- Hits        13237     1040   -12197
+ Misses       2585      207    -2378

Flag
Coverage Δ

javascript
83.40% <ø> (ø)

python
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

config/settings/base.py

config/urls.py

variants/urls.py

variants/views_api.py

varfish/vueapp/plugins.py

beaconsite/models.py

regmaps/apps.py

beaconsite/models_api.py

conservation/models.py

svs/admin.py

... and 135 more

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.

This is the first part adressing #743, read-only at the moment.


[1.4.0] No Notifications?

So, I literally installed YakYak today for the first time and so far I'm incredibly pleased!! The one thing I can't figure out is why none of the notifications are working. Any thoughts?
Here's what my notifications settings are currently at:

Any suggestions would be awesome. Thanks!!

maybe your conversation is muted ? can someone else test this on windows ?

Nope, I checked, all conversations I'm receiving messages on are set to receive notifications.

Working in Windows 7

but from windows 8 and above a different system is used

so basically node-notifier is not compatible with windows 8+ ?

It should be, it just uses a different notification system

So 1.4.1 doesn't seem to work either, on neither my laptop nor my desktop. In fact, the notifications don't work for my roommate on 1.4.0 on OS X either - are you supposed to install something else before installing YakYak? I feel like we're missing a dependency, but I've installed NodeJS.

YakYak is self contained, you should only need the binaries.
Can you open the Inspector (via YakYak menu, or Ctrl+Alt+i) and see if there are any errors?

Just want to chime in to confirm notifications work fine for me on OSX 10.11.6, YakYak 1.4.0.

Not seeing any errors. Unless this is different from Chrome's usual inspector, the Console isn't throwing any errors when receiving a message.

No errors :\
I have no clue on what this could be. Can you confirm or test the following?
1 - Open the Inspector, switch for the console tab and write/paste the following:
require('node-notifier').notify('Something should appear')
It should create a notification, and please copy here the result.
2 - Are you always using the same account to login?
3- Are the notifications "On" in the webinterface of hangouts? (see image below)

ps. thanks @mliq

No dice
require('node-notifier').notify('Something should appear') WindowsToaster {options: Object, domain: null, _events: EventHandlers, _eventsCount: 0, _maxListeners: undefined}Growl: Growl(options)Notification: WindowsToaster(options)NotificationCenter: NotificationCenter(options)NotifySend: NotifySend(options)WindowsBalloon: WindowsBalloon(options)WindowsToaster: WindowsToaster(options)_events: EventHandlers_eventsCount: 0_maxListeners: undefineddomain: nulloptions: Object__proto__: EventEmitter

run:
require('node-notifier').notify('caca', function(err){console.log('err', err);})
Can you take a screenshot of the result?
Then run
new require('node-notifier').WindowsToaster({fallback: true}).notify('caca', function(err){console.log('err', err);})
What exactly is you OS? if windows 10 try:

then try all this an screenshot it please
new require('node-notifier').Growl({fallback: true}).notify('caca', function(err){console.log('err', err);})
new require('node-notifier').WindowsBalloon({fallback: true}).notify('caca', function(err){console.log('err', err);})
new require('node-notifier').NotifySend({fallback: true}).notify('caca', function(err){console.log('err', err);})
new require('node-notifier').NotificationCenter({fallback: true}).notify('caca', function(err){console.log('err', err);})

Wow. It took me 3 days to figure out what it was.
This is the worst ID10T error I think I've ever had.
I thought you were creating your own notifications, not using the built-in Windows ones. I keep those off normally (now enabled and working fine)....
So yeah. This was completely my fault. Notifications work as intended... just maybe slap this in the README?  Sorry :|

LOOOOOOOL
Would this be cool?

That would be perfect.
this.facepalm()


Typo

Please note a minor typo:
"The following are terms you'll encounter as your set up a custom domain"
should read
"The following are terms you'll encounter as you set up a custom domain"

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

ID: 190b1ed3-0712-2f19-4e8f-a2a8519d136e
Version Independent ID: b02adbf4-d2a8-6c84-e70a-ff59fb3cbb7b
Content: Custom domains with Azure Static Web Apps
Content Source: articles/static-web-apps/custom-domain.md
Service: static-web-apps
GitHub Login: @craigshoemaker
Microsoft Alias: cshoe

@StuartBurden Thank you for your feedback! We will review and update as appropriate.

@StuartBurden Thanks for your feedback! Document changes were made and will go live soon.


Debugging nuxtjs .vue Files On the Server in Docker

I currently have a nuxt app setup as a univeral app in which I'm hosting using Docker. I've got pretty much everything working, the debugger attaches and finds local variables just fine when walking through middleware and api calls, but when debugging the asyncData method in the .vue file I can't see any of the local variables and my breakpoint keeps moving to the .catch line:

I also get a bunch of other random things in the current context, which in this case is "Module"??
I've added this line to my nuxt.config.js file as well to make sure it uses the correct source maps:
     /*
  ** Build configuration
  */
  build: {
    /*
    ** You can extend webpack config here
    */
    extend(config, ctx) {
      console.log(`IsClient: ${ctx.isClient}`);
      console.log(`isDev: ${ctx.isDev}`);
      if (ctx.isDev) {
        config.devtool = ctx.isClient ? 'source-map' : 'inline-source-map'
      }
    }
  }

Also here is my .vscode config:
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Docker: Attach to Node",
            "type": "node",
            "request": "attach",
            "remoteRoot": "/usr/share/nginx/app",
            "port": 9229,
            "address": "localhost",
            "localRoot": "${workspaceFolder}/app",
            "protocol": "inspector",
            "restart": true,
            "sourceMaps": true
        }
    ]
}

Also, here is the command I use to start the container:
 node --inspect=<IP_ADDRESS>:9229 \
            ./node_modules/.bin/nuxt \
            & nginx -g "daemon off;" \

I've tried a lot of different things including using babel-register and starting it with babel-node since its transpiled, but none of those methods worked.
Is there anything I'm missing here? Can we just not debug .vue files on the server when creating a universal app?

This question is available on Nuxt community (#c9866)

@ssinno28 I believe you are missing the sourceMapPathOverrides which is what I needed to make debugging work for server side code in VS Code. I'm able to add breakpoints to asyncData with auto detected Local/Block variables. You might have to adjust the file paths to work with your app container.
.vscode/launch.json
{
  "configurations": [
    {
      "name": "Attach app",
      "type": "node",
      "request": "attach",
      "cwd": "${workspaceRoot}",
      "sourceMapPathOverrides": {
        "webpack:///*": "${workspaceRoot}/*",
        "webpack:///./*": "${workspaceRoot}/*"
      },
      "sourceMaps": true
    }
  ]
}

I tried that, didn't work for me...

Also an FYI for anyone else running into this problem, I got the debugging working in WebStorm

Apparently step debugging isn't so popular with the community. I'm trying to set it up, but in my case I don't even get a breakpoint in asyncData() , at all.. I can only break adding a breakpoint in Client-Side code within Chrome Dev Tools.
here's my launch.json:
{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "server: node",
      "runtimeExecutable": "yarn",
      "runtimeArgs": ["run", "dev:debug"],
      "port": 3000
    },
    {
      "type": "node",
      "request": "attach",
      "name": "Attach to node",
      "address": "localhost",
      "sourceMapPathOverrides": {
        "webpack:///*": "${workspaceRoot}/*",
        "webpack:///./*": "${workspaceRoot}/*"
      },
      "port": 9229
    }
  ]
}

Apparently step debugging isn't so popular with the community. I'm trying to set it up, but in my case I don't even get a breakpoint in asyncData() , at all.. I can only break adding a breakpoint in Client-Side code within Chrome Dev Tools.
here's my launch.json:
{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "server: node",
      "runtimeExecutable": "yarn",
      "runtimeArgs": ["run", "dev:debug"],
      "port": 3000
    },
    {
      "type": "node",
      "request": "attach",
      "name": "Attach to node",
      "address": "localhost",
      "sourceMapPathOverrides": {
        "webpack:///*": "${workspaceRoot}/*",
        "webpack:///./*": "${workspaceRoot}/*"
      },
      "port": 9229
    }
  ]
}

I was able to get it to work while using webstorm, not sure why it works there and not VS: https://stackoverflow.com/questions/57548696/debugging-nuxtjs-vue-files-on-the-server-in-docker


ssi_boardNews(); doesn't show news title

http://www.elkarte.net/community/index.php?topic=1972.0

The fix 437ed6a6fa08b7358706cf3615140f44bcea8799 was actually broken. xD

was fixed here https://github.com/elkarte/Elkarte/commit/90a933ab0af0c3c7d74881e2f21b0e8b515dc78e


TextField throws ThrowSubstringArgumentOutOfRange when setting Text and moving cursor to end

Describe the bug
This occurs when you select a range in a TextField then change the Text to a new shorter string value and attempt to update the CursorPosition:
To Reproduce
[InlineData("a")] // Fails
[InlineData ("aaaaaaaaaaa")] // Passes
[Theory]
public void TestSetTextAndMoveCursorToEnd_WhenExistingSelection(string newText)
{
	var tf = new TextField ();
	tf.Text = "fish";
	tf.CursorPosition = tf.Text.Length;

	tf.ProcessKey (new KeyEvent (Key.CursorLeft, new KeyModifiers()));

	tf.ProcessKey (new KeyEvent (Key.CursorLeft | Key.ShiftMask, new KeyModifiers { Shift = true }));
	tf.ProcessKey (new KeyEvent (Key.CursorLeft | Key.ShiftMask, new KeyModifiers { Shift = true }));

	Assert.Equal (1, tf.CursorPosition);
	Assert.Equal (2, tf.SelectedLength);

	tf.Text = newText;
	tf.CursorPosition = tf.Text.Length;
}

Test fails with:
   Source: TextFieldTests.cs line 1303
   Duration: 25 ms

  Message:
System.ArgumentOutOfRangeException : Index and length must refer to a location within the string. (Parameter 'length')

  Stack Trace:
String.ThrowSubstringArgumentOutOfRange(Int32 startIndex, Int32 length)
String.Substring(Int32 startIndex, Int32 length)
TextField.PrepareSelection(Int32 x, Int32 direction) line 1139
TextField.set_CursorPosition(Int32 value) line 342
TextFieldTests.TestSetTextAndMoveCursorToEnd_WhenExistingSelection(String newText) line 1318
RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

Workaround is to call ClearAllSelection (); before updating CursorPosition.

Workaround is to call ClearAllSelection (); before updating CursorPosition.

I think the best workaround is call ClearAllSelection (); when updating Text property. What do you think @tznind?

I think that makes sense.
Might be worth adding a guard check if the new value is different from the current because if user is setting the same text we can just exit early and not clear/update anything?

Might be worth adding a guard check if the new value is different from the current because if user is setting the same text we can just exit early and not clear/update anything?

If you look the Text property code there is a guard check at the beginning, so it only will be executed if the new text is different than the original text and if it isn't canceled.

Perfect!

I think is better change the issue title to something like the or whatever you think better:
TextField.Text setter doesn't clearing text selection if not empty.


AccountStorage refactor from Smt to sequential hash

In this PR I propose to refactor the AccountStorage from Smt to a sequential hash.
Closes: #802

This is a first pass at tackling this issue:

The refactor from Smt to sequential hash is mostly if not fully done on the AccountStorage
The refactor of the delta's is slightly more involved, I took a pass at it, the upper logic seems correct but I am not updating the inner values correctly (i.e storage slots are correctly updated, but maps are only replaced by new deltas and not updated using StorageMapDelta )
The tests will need a substantial refactor
The MASM part has not yet been implemented

@bobbinth, I would like to know if this seems like a general good route of if you would advise for another way of tackling this problem.

Also, these commits coming from the previous PR I built on which was merged in next: #763

Why are they appearing here? Is there something I did wrong or a merge conflict?

Why are they appearing here? Is there something I did wrong or a merge conflict?

Hmm - not sure. I don't mind having them here as they'll go away once we do "squash and merge", but also if there is an easy way to git rid of them here, that would be even better.


Add reference to convenience accessors and forbid returning results of a calculation without assigning it to a variable first

Merci.


The variable "K3S_DATASTORE_ENDPOINT" not resolved yet.

The problem is that even if you define the name of the database, k3s v1.28.4+k3s1 onwards only recognizes the "postgres" database. I'm currently using v1.29.0+k3s1 and adjusted it to use the "postgres" database. Even version v1.28.3+k3s1 recognizes the database configuration passed in the K3S_DATASTORE_ENDPOINT variable
curl -sfL https://get.k3s.io | \
...
K3S_DATASTORE_ENDPOINT="postgres://USER:PASS@HOSTNAME:5432/db_k3s?sslmode=verify-full" \
...
INSTALL_K3S_VERSION=v1.28.5+k3s1 sh -s - server

In this example "db_k3s" is ignored and considers "postgres"

That is not what's happening. K3s always connects to the postgres database initially, in order to test for existence of the k3s database. See https://github.com/k3s-io/k3s/issues/9033#issuecomment-1850412488

That is not what's happening. K3s always connects to the postgres database initially, in order to test for existence of the k3s database. See #9033 (comment)

Is this new? Because I never had a line allowing k3s to access the database postgres in my pg_hba.conf, and it was working before?

For as long as I can remember.

Thanks for the information @brandond, but I didn't fully get it. Should k3s's postgresql user should have access to postgres database as well? Or only allowing connection in pg_hba.conf but not giving access enough?

Not sure, please let us know what you find out!

Hello, in my situation, I rely on a managed postgresql instance which doesn't allow access to postgres database and this broke my ability to upgrade k3s to a newer version than v1.28.3-k3s1. This looks to me like a regression , isn't it ?

It doesn't allow access to it, or you haven't granted access to it? As per https://github.com/k3s-io/k3s/issues/9033#issuecomment-1850412488 the upstream postgres docs indicate that access to the postgres database should be safe to assume.

As a postgres contributor, I would never recommend that any application ignore the configured connection string and connect to the postgres database.
Yes, it's commonly used by utilities, but apps should accept what they are given; they cannot assume the administrator will grant the user they are connecting as the privileges to connect to DBs other than the one specified to the application.


#817 Add note about defining root_path when testing

Relates to #817

Codecov Report

Merging #818 (18d4712) into master (1819572) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #818   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           18        18
  Lines         1045      1045
=========================================
  Hits          1045      1045

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Wrong CSS classes take precedence

After migrating from v4 to v5, and having refactored out @mui/styles, I now see that my MuiButtons, when rendered, have classes on the form: css-xyz1234-MuiButtonBase-root-MuiButton-root.
On some pages in my app, styles coming from css-xyz1234-MuiButtonBase-root-MuiButton-root are overridden by the styles coming from MuiButton-root, which causes buttons to seem unstyled.
On other pages, the styles from css-xyz1234-MuiButtonBase-root-MuiButton-root correctly take precedence, giving buttons the intended styling.
If I inspect a MuiButton component in the docs, I see no classes of the long form, but instead css-xyz1234.
I tried using StyledEngineProvider as described in https://mui.com/guides/migration-v4/#style-library without effect.
Although I suspect that this is an issue with my project and not material-ui, I'm posting this since I'm out of ideas on how to move forward and hoping that it might help others migrating.

Would you be able to reproduce this behavior on CodeSandbox?

I haven't been able to so far, which I realize limits your ability to help me.. I was hoping that it would ring a bell to someone

Thank you for that in depth response! It does clear up a lot. Styles coming from the class MuiButtonBase-root are definitely the culprit - removing the class in dev tools makes everything look as intended. I think you are probably correct that v4 is injected somehow. I have ruled out the other option you mentioned.
Here's my package-lock.json, in a .txt:
package-lock.json.txt

I can definitely see @material-ui/core, it comes as being dependency on @mui/x-data-grid I believe. I think you need to upgrade to v5 on @mui/x-data-grid too, but probably @m4theushw can provide more info on this. The goal is to try to remove @material-ui/core everywhere from package-lock.json

Great thanks! I am closing.


Code First with MySQL does not create tables

Trying to create a code first project using Entity Framework and MySQL.
When I use context.Database.EnsureCreated(); the tables are created correctly, but I would like to use migrations so the code changes to: context.Database.Migrate(); and that is when I get the error:
MySqlException: Table 'library.publishers' doesn't exist
I was told that I need to execute Add-Migration InitialCreate that did not work I was getting:

Add-Migration : The term 'Add-Migration' is not recognized as the name of a cmdle

Found a way around that (running: .nuget\packages\microsoft.entityframeworkcore.tools\2.1.1\tools\init.ps1)
Then got one more error about a missing package:

Your startup project 'mySqlEFcore' doesn't reference Microsoft.EntityFrameworkCore.Design. This package is required for the Entity Framework Core Tools to work

Added that package and now I get a new error:
System.MissingMethodException: Method not found: 'Void Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommandBuilderFactory..ctor(Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger`1<Command>, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper)'.
   at MySql.Data.EntityFrameworkCore.Storage.Internal.MySQLCommandBuilderFactory..ctor(IDiagnosticsLogger`1 logger, IRelationalTypeMapper typeMapper)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
...

Steps to reproduce
I have project reproducing the issue here:
https://github.com/heldersepu/csharp-proj/tree/PreDocDB/mySqlEFcore
Further technical details
EF Core version: <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.1.1" />
Database Provider: <PackageReference Include="MySql.Data.EntityFrameworkCore" Version="8.0.12" />
Operating system: Win 10
IDE:  Visual Studio 2017

This is an issue in MySQL package you are using. Please file an issue with them.

@heldersepu Also, you might want to try a different MySQL provider. People seem to have success with the Pomelo open-source provider: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql It has been updated to work with 2.1.1.

Thanks @ajcvickers will try with that provider!


Support for a generate_alias_name macro.

Feature
Feature description
dbt users can currently define a generate_schema_name macro. For example, we have a macro
{% macro generate_schema_name(custom_schema_name=none) -%}
    {%- set default_schema = target.schema -%}
    {%- if target.name == 'multi_schema' and custom_schema_name is not none -%}
        {{ custom_schema_name | trim }}
    {%- else -%}
        {{ default_schema }}
    {%- endif -%}
{%- endmacro %}

When the target is set to multi_schema, this macro ensures that the schema defined in the model is used instead of target's default schema. It would be amazing if we could also implement a generate_table_name macro. In many ways, a generate_table_name macro is a more flexible extension of the alias concept that you introduced less than a year ago.
I think this custom macro would be called here: https://github.com/fishtown-analytics/dbt/blob/f6402d3390f4baa7a6f76e546ed3565c79430c60/core/dbt/parser/base.py#L176
Who will this benefit?
Here is my use case. Suppose I have two users, user1 and user2. Each has their own development schema, dbt_user1 and dbt_user2. Now, I have a project that builds two tables foo.baz and bar.baz.  foo.baz comes from a SQL file foo__baz.sql with schema='foo' and alias='baz'. The other table bar.baz comes from a file called bar__baz.sql with schema='bar' and alias='baz'. In production, a superuser runs the job and everything is fine.
However, when user1 tries to run the job, they get an error because dbt wants to build dbt_user1.baz twice. If I could write a custom generate_table_name macro, I might make it so that the tables are built as follows in development targets: dbt_user1.foo__baz and dbt_user1.bar__baz.
Note, if the users had appropriate permissions to create schemata, this would not be a problem. For example, these tables would be built in dbt_user1_foo.baz and dbt_user1_bar.baz, as per dbt's documentation on custom schemas. However, we do not have that luxury right now. And I think a generate_table_name macro is, in many ways, the next evolution of alias.

Hey @nydnarb - thanks for opening this issue! I think that we're actually pretty well suited to implement something like this. I imagine generate_table_name would have a similar signature to generate_schema_name, eg:
{% macro generate_table_name(model_name, custom_alias=none) -%}

The default implementation would use the custom_alias if it was provided, otherwise it would fall back to the model_name. Cool!
We had a pretty significant problem with the generate_schema_name macro recently, and I think it's something we'll need to consider here too: What happens if users incorporate packages into their project? Should dbt use the generate_table_name defined in the "root" project for all models? Or should it use the implementation specified in the package that contains the model? My instinct is the former, both to retain parity with generate_schema_name, and also because it makes this a lot easier to implement :)
My only other thought is that we'll probably want to call this generate_model_alias or similar, as we try to avoid using the label "table" to refer to things that can be either tables or views.
Is this something you'd be able to help out with implementing? I think the code block you pointed out is definitely the right place for this. We'd just need to implement a function like get_alias_func and provide a default macro implementation in the global project.

I might be able to find some time to contribute. But I might have questions along the way.

Cool! Let me know how I can be helpful -- happy to point you in the right direction as you get underway

Fixed in #1363


Can it provide object version

Usually we use it for checking if the element is block or not, so it is better to use an object to look up. Can you also provide object version.

I've been on the fence about this... Array is the smallest footprint, byte-wise, so it's best to send that down the wire.
It's easy enough to convert to an Object in code, but this ends up being problematic because then many modules will be creating objects of this Array and that is wasteful, memory-wise:
var blocksHash = Object.create(null);
for (var i = 0; i < blocksArray.length; i++) blocksHash[blocksArray[i]] = true;

blocksHash['BLOCKQUOTE']
// true

And now with ES6 it gets even more interesting, since Set is now the idea data type for this information.
var blocksSet = new Set(blocksArray);

blocksSet.has('BLOCKQUOTE');
// true

So that said... I'm having a hard time trying to find the balance between byte size and optimal usage/memory. One option that I'd be ok with is to leave this module as-is (exporting an Array), and then introducing a couple higher-level modules that export an Object (block-elements-object) or even an ES6 Set (block-elements-set). Thoughts?

Thank you for the quick reply. And thank you for the program-generated list.
Some questions here.

Because an Array in JavaScript won't allocate a trunk of memory like traditional way, it may be implemented as an Object. So I wonder how much it will be different between an Object and an Array.
You said higher-level, I will think you will require the array, and create the object based on it. Then, in this case we don't solve the memory problem.

I do agree with you to introduce modules that export an Object and Set, if they don't need to require the Array one. Make sense?

I would suggest require('block-elements/hash'), require('block-elements/set'), etc.

@coreh Great idea!

@hankhsiao @coreh Check out 1fb828e.
We're going to go with the assumption that the user's env has Set defined / polyfilled. I think it would still be valuable to identify this fact in the package.json file somehow (maybe "lang": "es6", or by using a unique "keyword", or even something declarative like "es6": [ "Set" ]… There's a lot of possibilities, just trying to figure out what would be the most useful.

@TooTallNate, thank you!


Closes #2143 Loosen restrict_derivation() assertion

Thank you for your Pull Request! We have developed this task checklist from the Development Process Guide to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.
Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the devel branch until you have checked off each task.

[x] Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
[x] Code is formatted according to the tidyverse style guide. Run styler::style_file() to style R and Rmd files
[x] Updated relevant unit tests or have written new unit tests, which should consider realistic data scenarios and edge cases, e.g. empty datasets, errors, boundary cases etc. - See Unit Test Guide
[x] If you removed/replaced any function and/or function parameters, did you fully follow the deprecation guidance?
[x] Update to all relevant roxygen headers and examples, including keywords and families. Refer to the categorization of functions to tag appropriate keyword/family.
[x] Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately
[x] Address any updates needed for vignettes and/or templates
[x] Update NEWS.md if the changes pertain to a user-facing function (i.e. it has an @export tag) or documentation aimed at users (rather than developers)
[x] Build admiral site pkgdown::build_site() and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page.
[x] Address or fix all lintr warnings and errors - lintr::lint_package()
[x] Run R CMD check locally and address all errors and warnings - devtools::check()
[x] Link the issue in the Development Section on the right hand side.
[x] Address all merge conflicts and resolve appropriately
[x] Pat yourself on the back for a job well done! Much love to your accomplishment!

Do any of the vignettes or documentation need to be changed for this update? I thought we said this wasn't allowed somewhere?

Don't recall that portion, I imagine we should be okay, I would not say its particularly intuitive to call mutate using this either, had a hard time coming up with an appropriate test, I will say I did miss a roxygen blurb

Closing in favor of https://github.com/pharmaverse/admiral/pull/2164


add events to regenerate statistics and abilities

Codecov Report

Merging #3 into master will increase coverage by 0.38%.
The diff coverage is 95.58%.

@@            Coverage Diff             @@
##           master       #3      +/-   ##
==========================================
+ Coverage   95.13%   95.51%   +0.38%
==========================================
  Files          40       40
  Lines        3681     3904     +223
==========================================
+ Hits         3502     3729     +227
+ Misses        179      175       -4

Impacted Files
Coverage Δ

src/serde.rs
88.88% <ø> (ø)
:arrow_up:

src/event.rs
95.61% <ø> (ø)
:arrow_up:

tests/event.rs
92.24% <ø> (ø)
:arrow_up:

src/rules/ability.rs
100% <100%> (ø)
:arrow_up:

src/rules/statistic.rs
100% <100%> (ø)
:arrow_up:

src/creature.rs
95.65% <100%> (+4.37%)
:arrow_up:

src/actor.rs
92.19% <94.66%> (+3.15%)
:arrow_up:

src/character.rs
93.18% <94.73%> (+2.7%)
:arrow_up:

tests/creature.rs
97.23% <96.8%> (+0.04%)
:arrow_up:

... and 3 more

Continue to review full report at Codecov.

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


chore: use artsy webfont for unica in StyledWebView

This PR resolves CX-1233
Description
This removes our base64 version of unica in favor of just using a web font from webfonts.artsy.net.
PR Checklist (tick all before merging)

[x] I have included screenshots or videos to illustrate my changes, or I have not changed anything that impacts the UI.
[x] I have added tests for my changes, or my changes don't require testing, or I have included a link to a separate Jira ticket covering the tests.
[x] I have documented any follow-up work that this PR will require, or it does not require any.
[x] I have added an app state migration, or my changes do not require one. (What are migrations?)
[x] I have added a CHANGELOG.yml entry or my changes do not require one.

Nice 🎉


[question]  Fibaro Dimmer FBG212 OFF message does not set current value to 0

I want to programmatically turn off the light connected to a FIbaro Dimmer 2 FBG212.
I could send a message to
zwave/light-dressing/38/1/currentValue/set with payload {"value" : 0}  and that'd work.
But I noticed in MQTT explorer there is also an endpoint to turn it off :

However when sending that message, it dims down the bulb to 7 but not 0.
The same occurs if I perform the level change from zwavejs2mqtt UI :

Is this a bug ?

Duplicate of https://github.com/zwave-js/zwavejs2mqtt/discussions/2360
Please follow updates there


Remove setters for old metadata.

This is part of #322.
This PR removes setters for old metadata structures and refine constructors for DataFrame and Series to avoid using old metadata structures.

Codecov Report

Merging #475 into master will decrease coverage by 0.12%.
The diff coverage is 96.7%.

@@            Coverage Diff            @@
##           master    #475      +/-   ##
=========================================
- Coverage   93.33%   93.2%   -0.13%
=========================================
  Files          29      29
  Lines        3780    3755      -25
=========================================
- Hits         3528    3500      -28
- Misses        252     255       +3

Impacted Files
Coverage Δ

databricks/koalas/base.py
91.86% <ø> (-0.2%)
:arrow_down:

databricks/koalas/indexing.py
93.2% <100%> (ø)
:arrow_up:

databricks/koalas/generic.py
94.02% <100%> (ø)
:arrow_up:

databricks/koalas/groupby.py
97.95% <100%> (ø)
:arrow_up:

databricks/koalas/mlflow.py
95% <100%> (-0.13%)
:arrow_down:

databricks/koalas/typedef.py
80.5% <100%> (ø)
:arrow_up:

databricks/koalas/indexes.py
90.32% <100%> (-0.11%)
:arrow_down:

databricks/koalas/namespace.py
88.46% <100%> (-1.29%)
:arrow_down:

databricks/koalas/series.py
93.15% <95.23%> (+1.15%)
:arrow_up:

databricks/koalas/frame.py
94.8% <96.07%> (-0.21%)
:arrow_down:

... and 6 more

Continue to review full report at Codecov.

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


Unable to add options to ReaderFactory::createFromFile

Hi,
it looks like it is currently impossible to add options to the createFromFile function:
$options = new Options();
$options->SHOULD_PRESERVE_EMPTY_ROWS = true;
$reader = ReaderFactory::createFromFile($importPath);
$reader->open($importPath);

Is there another way of achieving this?
Thanks!

Hi, I kept ReaderFactory::createFromFile API just for the guessing capabilities but I strongly discourage its usage and will deprecate it in the next major.
You should already know which type of file you are going to parse (CSV, ODS or XLSX) and then instantiate the class accordingly:
$options = new \OpenSpout\Reader\CSV\Options();
$options->SHOULD_PRESERVE_EMPTY_ROWS = true;
$reader = new \OpenSpout\Reader\CSV\Reader($options);
$reader->open($importPath);


Update: Run workflows on FlyCI MacOS runners

Description
This pull request includes changes to run all workflows on FlyCI's MacOS runners instead of GitHub's macos-13. The specific FlyCI runner chosen is the M2, 4vCPU, 7GB RAM (flyci-macos-large-latest-m2). This update aims to leverage FlyCI's MacOS runners for improved performance and efficiency. For more information on FlyCI's offerings, visit FlyCI.
Screenshots
N/A
Testing Instructions
To test these changes:

Ensure that all workflows are initiated correctly on the FlyCI platform.
Verify that all workflows complete successfully on the flyci-macos-large-latest-m2 runner.
Compare the performance and efficiency against previous runs on GitHub's macos-13.
Review logs to ensure there are no compatibility issues.

Failed again.


"Unexpected character '`'" running npm run production or package

Hi,
Running npm run production or npm run package, i get the following error:
gulp-notify: [Uglify JS Error] /Applications/MAMP/htdocs/SiteName/wp-content/themes/MyTheme/assets/javascript/custom/foundation.js: Unexpected character '`'.
Is almost a clean installation, i've worked only on php and scss files, nothing in javascript.
The strange thing is that if i run npm run watch works.
How can i fix it? Tell me if you need other datails.
Thank you!

Fixed id crating .babelrc file with:
{
  "presets": ["es2015"]
}

Hello,
I am having the same issue, where can I find the .babelrc file that needs to updated?

Hi @brandudno, you need to create it, if not exists, in the root of your theme.

I managed to sort by doing a clean install and moving my template files. Thanks for replying, anyway!

On 21 Nov 2016, at 20:56, roby94<EMAIL_ADDRESS>wrote:
Hi @brandudno, you need to create it, if not exists, in the root of your theme.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.


Client Allocation Request for:

Client Allocation Questions
Core Information

Name:
Website / Social Media:
Region: Asia excl. Greater China
DataCap Requested: 1TiB
Addresses to be Notarized:
Notary Requested: steven004

@fmx940516 Please subscribe to notifications for this Issue to be aware of updates. Notaries may request additional information on the Issue.

Closed due to duplication