some numpy operation(FFT,FFT2d,RFFT,RFFT2d) failed when building a model

Click to expand!
Issue Type
Bug
Source
source
Tensorflow Version
tf 2.2
Custom Code
Yes
OS Platform and Distribution
Linux Ubuntu 18.04
Mobile device
No response
Python version
3.7
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
11.0/8.0
GPU model and memory
NVIDIA A6000 /48G
Current Behaviour?
I want to use API "tf.signal.rfft2d" to create a model, and when I set the shape of the input tensor as (None,None,3), i.e., dynamic shape, tf.signal.rfft2d produce something abnormal. The shape of the output of tf.signal.rfft2d will be [None,None,None,None]. This won't happen when the shape of the input tensor is a constant, e.g.,(1024,1024,3), but this constrains the flexibility of the model. I've tried to use tf.keras.layers.Lambda and tf.raw_ops.RFFT2d but all failed. I also spotted that even if the model can successfully be complied with the input shape as [None,None,3], it failed to produce real value when accepting real data. I'm wondering whether it's because tf.signal.rfft2d only accept tensor or numpy object whose shape has a real value instead of None. Who has met this problem before?

Standalone code to reproduce the issue
this is my code:
def ResBLock_do_fft_bench(inputs,filters):
    axis = 1
    x = K.permute_dimensions(inputs,(0,3,1,2))
    x = tf.keras.layers.Lambda(lambda v:tf.raw_ops.RFFT2D(input=v,fft_length=(tf.shape(v)[2],tf.shape(v)[3]//2+1)))(x)
    y_imag = tf.compat.v1.imag(x)
    y_real = tf.compat.v1.real(x)
    y_f = tf.concat([y_real, y_imag], axis=axis)
    y_f = tf.keras.layers.Permute((2,3,1))(y_f)
    y = BasicConv_do(y_f,filters*2,kernel_size=1,stride=1,relu=True)
    y = BasicConv_do(y,filters*2,kernel_size=1,stride=1,relu=False)
    y = tf.keras.layers.Permute((3,1,2))(y)
    y_real, y_imag = tf.split(y, 2, axis=axis)
    y = tf.complex(y_real, y_imag)
    y = tf.keras.layers.Lambda(lambda v:tf.raw_ops.IRFFT2D(input=v,fft_length=(-1,-1)))(y)
    y = tf.keras.layers.Permute((2,3,1))(y)
    res = BasicConv_do(inputs,filters,kernel_size=3,stride=1,relu=True)
    res = BasicConv_do(res,filters,kernel_size=3,stride=1,relu=False)
    return res + inputs + y
def FFT_Block():
    input = tf.keras.layers.Input(shape = [None,None,32],name='blur_image')
    out = ResBLock_do_fft_bench(input,32)
    model = tf.keras.models.Model(inputs=input,outputs=out,name='test')
    return model

Relevant log output
the shape of the x before fft is:
(None, 32, None, None)
after fft:
(None, 32, None, None).

When the model takes a real value,this happens:
Traceback (most recent call last):
  File "D:\Anaconda\envs\AIM\lib\site-packages\tensorflow\python\ops\gen_spectral_ops.py", line 906, in irfft2d
    tld.op_callbacks, input, fft_length, "Treal", Treal)
tensorflow.python.eager.core._FallbackException: This function does not handle the case of the path where all inputs are not already EagerTensors.

if I change tf.raw_ops.RFFT2D to tf.signal.rfft2d, there will be another bug:
the shape of the x before fft:
(None, 32, None, None)
after fft:
(None, None, None, None)

@TWTcodeKing Older version of TF is not actively supported. Could you please upgrade to the latest version and please provide a code snippet to reproduce the issue reported here if the issue still persist? Thank you!

@TWTcodeKing Older version of TF is not actively supported. Could you upgrade to the latest version and please provide a code snippet to reproduce the issue reported here if the issue still persists? Thank you!

Yes! I upgrade the tf version to 2.9.1, which is the newest. And I have a brief test on my desktop computer whose Os is Windows and the error still exists, shown below:
before FFT:(None, None, None, 32)
after FFT:(None, None, None, None)
2022-07-14 16:27:34.262034: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-07-14 16:27:34.610717: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1532] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 1661 MB memory:  -> device: 0, name: NVIDIA GeForce RTX 3050 Ti Laptop GPU, pci bus id: 0000:01:00.0, compute capability: 8.6
Traceback (most recent call last):
File "C:/Users/19356/Desktop/DeepRFT_tf/layers.py", line 228, in
model = FFT_Block()
File "C:/Users/19356/Desktop/DeepRFT_tf/layers.py", line 224, in FFT_Block
out = ResBlock_do_fft_bench(input,32)
File "C:/Users/19356/Desktop/DeepRFT_tf/layers.py", line 82, in ResBlock_do_fft_bench
y = BasicConv_do(y_f,filters*2,kernel_size=1,stride=1,relu=True)
File "C:/Users/19356/Desktop/DeepRFT_tf/layers.py", line 34, in BasicConv_do
x = DOConv2D(filters, kernel_size, padding='same', strides=stride, use_bias=bias, groups=groups)(inputs)
File "D:\Anaconda\envs\TF29\lib\site-packages\keras\utils\traceback_utils.py", line 67, in error_handler
raise e.with_traceback(filtered_tb) from None
File "C:\Users\19356\Desktop\DeepRFT_tf\doconv_tf.py", line 66, in build
input_channel = self._get_input_channel(input_shape)
ValueError: The channel dimension of the inputs should be defined. The input_shape received is (None, None, None, None), where axis -1 (0-based) is the channel dimension, which found to be None.
I think it's a tf bug because it appears on both Linux and Windows

@TWTcodeKing
In order to expedite the trouble-shooting process, please provide a code snippet to reproduce the issue reported here. Thank you!

@TWTcodeKing In order to expedite the trouble-shooting process, please provide a code snippet to reproduce the issue reported here. Thank you!

Thank you! I think I've already solved this problem by myself. I am a noob in using tensorflow, my original code was:
def ResBlock_do_fft_bench(inputs,filters):
axis = 1
x = inputs
x = tf.keras.layers.Lambda(lambda v:tf.signal.rfft2d(v))(x)
y_imag = tf.compat.v1.imag(x)
y_real = tf.compat.v1.real(x)
y_f = tf.concat([y_real, y_imag], axis=axis)
y_f = tf.keras.layers.Permute((2,3,1))(y_f)
y = BasicConv_do(y_f,filters2,kernel_size=1,stride=1,relu=True)
y = BasicConv_do(y,filters2,kernel_size=1,stride=1,relu=False)
y = tf.keras.layers.Permute((3,1,2))(y)
y_real, y_imag = tf.split(y, 2, axis=axis)
y = tf.complex(y_real, y_imag)
y = tf.keras.layers.Lambda(lambda v:tf.raw_ops.IRFFT2D(input=v,fft_length=(-1,-1)))(y)
y = tf.keras.layers.Permute((2,3,1))(y)
res = BasicConv_do(inputs,filters,kernel_size=3,stride=1,relu=True)
res = BasicConv_do(res,filters,kernel_size=3,stride=1,relu=False)
return res + inputs + y
And later I realize that tf can't convince the input shape during compiling but only during training or testing, so it is not right to use tf.signal.rfft2d with a simple function, so I modify my code as below:
class ResBlock_do_fft_bench(keras.models.Model):
def init(self,filters):
super(ResBlock_do_fft_bench,self).init()
self.filters = filters
def build(self, input_shape):
    assert len(input_shape) == 4
    shape = (input_shape[-1],)
    self.BasicConvY1 = BasicConv_do(self.filters*2,kernel_size=1,stride=1,relu=True)
    self.BasicConvY2 = BasicConv_do(self.filters*2,kernel_size=1,stride=1,relu=False)

    self.BasicConvRes1 = BasicConv_do(self.filters,kernel_size=3,stride=1,relu=True)
    self.BasicConvRes2 = BasicConv_do(self.filters,kernel_size=3,stride=1,relu=False)

def call(self,inputs):
    if inputs.shape[-1] == None:
        return inputs
    else:
        axis = 1
        x = tf.signal.rfft2d(inputs)
        y_imag = tf.compat.v1.imag(x)
        y_real = tf.compat.v1.real(x)
        y_f = tf.concat([y_real, y_imag], axis=axis)
        y_f = tf.transpose(y_f,(0,2,3,1))
        y = self.BasicConvY1(y_f)
        y = self.BasicConvY2(y)
        y = tf.transpose(y,(0,3,1,2))(y)
        y_real, y_imag = tf.split(y, 2, axis=axis)
        y = tf.complex(y_real, y_imag)
        y = tf.signal.irfft2d(y)
        y = tf.keras.layers.Permute((2,3,1))(y)
        res = self.BasicConvRes1(y)
        res = self.BasicConvRes2(res)
    return res + inputs + y

Then it finally works, thanks a lot for your comment!

@TWTcodeKing Thank you for the update!
Please move this issue to closed status if it is resolved ?
Thank you!


Use rust birthday for HeaderMode::Deterministic timestamp

As described in rust-lang/crates.io#3859, the current arbitrary timestamp of 123456789 leads to Debian packages being auto-rejected due to the old timestamp.  This happens for any timestamps before 1975.
Instead of 123456789, use another, more recent arbitrary timestamp -- the timestamp of the first commit for what would become Rust.
https://github.com/graydon/rust-prehistory/commit/b0fd440798ab3cfb05c60a1a1bd2894e1618479e

https://github.com/rust-lang/crates.io/issues/3859 talks about 1970-01-01 though, not 1973-11-29. are you sure that this is related?

Yes, I am.  The referenced Debian bug is about the timestamps being "too old".  They're currently failing this test because they're set to the epoch.
However, the specific check that triggers the diagnostic is for anything with an mtime <= the year 1975.

Hm well it's a bit frustrating that it's so hard to pick something arbitrary here, but this isn't really any less arbitrary than before...

@jamessan Coming from https://github.com/rust-lang/crates.io/issues/3859, so should we enforce cargo to use 0.4.38 to fix the issue reported on crates.io, like https://github.com/rust-lang/cargo/pull/9517?

Coming from rust-lang/crates.io#3859, so should we enforce cargo to use 0.4.38 to fix the issue reported on crates.io, like rust-lang/cargo#9517?

Yes, please.  I had stopped tracking whether tar-rs had released with this change.  Thank you!


feat(trait): operate via default catalog

This PR should remove any problem when running any trait in "sourceless" mode. From now on we will adopt the default Camel catalog coming from the platform.

Release Note
feat(trait): operate sourceless via default catalog

@squakez Sure thing. I don't mind testing at all

@squakez Sure thing. I don't mind testing at all

If it's easier to test the nightly artifact, I can merge and then you can start your tests from the nightly. Just let me know.


Azure Storage Failover?

Since we require LRS storage for the cloud witness, what should be implemented for HA/DR scenarios where a specific region or storage account is unavailable.  This occurs most frequently on interruptions of express route circuits but can happen in other scenarios as well.  Usually, I would say to make a GRS storage, then perform a manual failover but that doesn't seem to work here since LRS is a mandate.
Thanks!

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

ID: 7e6da99e-a148-b5ea-224d-8a4c48604945
Version Independent ID: a6a90a1f-870c-3501-ce6e-fbf52f802dfb
Content: Deploy a cloud witness for a Failover Cluster
Content Source: WindowsServerDocs/failover-clustering/deploy-cloud-witness.md
Product: windows-server
Technology: failover-clustering
GitHub Login: @JasonGerend
Microsoft Alias: jgerend

#assign:IngridAtMicrosoft
gh issue comment 4850 -b #assign:IngridAtMicrosoft

We hugely appreciate your contribution, feedback, and support to our technical documentation.
We’ve phased out GitHub Issues on this repository as the feedback mechanism for content and have replaced it with a new feedback system. For more information see, Content User Feedback. As part of this rollout, we are migrating your issue where our team will use your comments to improve the documentation experience. Unfortunately, this does mean you won't be able to access this issue after the migration is complete.
All issues will be migrated by Thursday 29th August 2024.
Once again, thank you for your valuable feedback, we hope you’ll continue to contribute using our new feedback system.


when release version 0.13 ?

I recommends that bottle use OOP code style.
And I need some features of the master branch.
It's a long time since version 0.12. When release the next major version ?

@iamybj  you can use the master branch, it's just one file you need to fetch.
I use the master for almost 2 years now in Production.
no real issues.

I recommends that bottle use OOP code style.

It's already pretty much OOP. Python is multi-paradigm, which means it does not
FORCE you to use OOP style and you can use class and functions were you don't need
them.
some code bases have many classes
with staticmethod in them. In many cases, this would have been enough to simply use a function.
It depends on your style.


english.txt file for github-stars-with-gina-häußge video

Thanks again for this, it is live on the video 👍


Added fast C based direct CSV-to-matrix functionality with options

@josevalim, this function is very fast: I compared it's execution time with that of Pandas' read_csv for the MNIST test dataset (test.csv) (source) and Pandas took 2.5492329597473145 seconds while Tensorflex's load_csv_as_matrix/2 took 1.711494 seconds.
Usage is simple, and gives the user the option of passing in if header is not present (defaults to header being present), and also the ability of choosing the delimiter (defaults to ','). I have added two sample CSV files in the test folder around which I will write tests soon, but for now I am using here to showcase the usage. Also, the test.csv file I use in the example code below belongs to the MNIST Kaggle CSV data (source), which contains 28000 rows and 784 columns. It is comma delimited and also contains a header. From that, I created a custom file without the header present which I will refer to as test_without_header.csv in the examples below. I have not put the file on Github since it is relatively large in size.
Code usage:
iex(1)> mat = Tensorflex.load_csv_as_matrix("test.csv")
%Tensorflex.Matrix{
  data: #Reference<0.4024686574.590479361.258459>,
  ncols: 784,
  nrows: 28000
}

iex(2)> Tensorflex.matrix_pos mat, 5,97
80.0

iex(3)> Tensorflex.matrix_pos mat, 5,96
13.0

On a visual inspection of the very large test.csv file, one can see that the values in these particular positions are correct. Now I will show usage for the same file but without header:
iex(1)> n = Tensorflex.load_csv_as_matrix("test/test_without_header.csv", header: :false)
%Tensorflex.Matrix{
  data: #Reference<0.4024686574.590479364.257078>,
  ncols: 784,
  nrows: 28000
}

iex(2)> Tensorflex.matrix_pos n,5,97
80.0
iex(3)> Tensorflex.matrix_pos n,5,96
13.0

Next for the sample CSV files sample2.csv and sample1.csv, I'll show that the function does the job. Here, it is also reasonable to use the Tensorflex.matrix_to_lists/1 function for the matrix because the data is not high dimensional. It is not advisable to do that for the above mentioned MNIST files:
iex(1)> m1 = Tensorflex.load_csv_as_matrix("test/sample1.csv", header: :false)
%Tensorflex.Matrix{
  data: #Reference<0.3878093040.3013214209.247502>,
  ncols: 5,
  nrows: 3
}
iex(2)> Tensorflex.matrix_to_lists m1
[
  [1.0, 2.0, 3.0, 4.0, 5.0],
  [6.0, 7.0, 8.0, 9.0, 10.0],
  [11.0, 12.0, 13.0, 14.0, 15.0]
]

iex(3)> m2 = Tensorflex.load_csv_as_matrix("test/sample2.csv", header: :true, delimiter: "-")
%Tensorflex.Matrix{
  data: #Reference<0.4024686574.590479361.258952>,
  ncols: 4,
  nrows: 3
}

iex(4)> Tensorflex.matrix_to_lists m2
[[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0], [9.0, 10.0, 11.0, 12.0]]

Also incorrect usage will raise:
iex(1)> n = Tensorflex.load_csv_as_matrix("../keras-mnist/testh.csv", header: :no_header, delimiter: ",")
** (ArgumentError) header indicator atom must be either :true or :false
    (tensorflex) lib/tensorflex.ex:122: Tensorflex.load_csv_as_matrix/2

:+1:


DIE999: An unhandled error has occurred. Collection was modified. (Visual Studio)

Hi,
I'm trying to build the Pure.DI.Example project in Visual Studio 2022,
but I'm getting the following error when the code generation runs:

Generator....................... DIE999: An unhandled error has occurred.
Collection was modified; enumeration operation may not execute.

I've tested several versions (2.0.7, 2.0.10, and 2.0.11-beta2), but they all seem to have the same issue.
A dotnet build does seem to work, so it might be related to Visual Studio.

Could you reproduce this from the command line?

After updating the version, close the IDE if it is open
Delete the obj and bin directories
Execute the following commands one by one

dotnet build-server shutdown
dotnet restore
dotnet build

After that, please try again from Visual Studio

The dotnet build works, but building it again in Visual Studio still has the issue

Fixe in 2.0.12

Thank you for the speedy fix


Increasing delimiterendchar affects clickability/pathc execution

When using dwmblocks with the default delimiterendchar of 10, every feature (including the clickability) works just fine. But after increasing the delimiterendchar symbolic constant to anything above 10 (in config.h as well as in dwm.c), clickability stops working even though all related features such as cursor hinting and manual signaling persist functioning.
Does this happen due to recent updates or do you have to change anything else within dwm's or dwmblock's sourcecode?

Are you using dwmblocks with systray?

Without systray, I tested with DELIMITERENDCHAR set to 15 and it works for me.

It works with systray as well. Have you updated your color codes? Start dwmblocks from the terminal and see if you get any error messages.

Are you using the latest patch?

Are you using the latest patch?

Are you using the latest patch?

I re-applied the latest (non-systray) patch, but apparently an old color sequence declaration was responsible for the behavior. Thanks for your support!


api/blocks/txs/ Interface error

Information
-

Version
cardano-explorer-api:3.0.0

Platform
Docker

Installation
From Github Release

Steps to Reproduce
I am using
Get brief information about transactions.
curl localhost:18100/api/blocks/txs/13e7cc6b2e4cc922ca151d3f5d6455082d8b5633c1505d2be328973005b43b07
The information it gave me(Something went wrongroot)
cardanorest_cardano-explorer-api log info
OnClauseWithoutMatchingJoinException "\"tx2\".\"id\" = \"tx_in\".\"tx_out_id\""

Expected behavior
Return correct transaction information

Hi, I cannot reproduce this on Mainnet. What networks are you on?


Add a google translate option in this blog

https://akshitagupta15june.github.io/Moksh/Blogs/cardinalVices.html

Please assign me this

Please assign me this issue

assigning


feat(Migrations): SQL Server Filterable indexes.

Please check if the PR fulfills these requirements

[x] The code builds and tests pass (verified by our automated build checks)
[x] Commit messages follow this format

    Implement ability to add filter to index
    - Extension for index builder
    - Index creation operation
    - Corresponding SQL generator for migration
    - Corresponding SQL reverse engeniering code for scaffolding
    - Corresponding C# reverse engeniering code for scaffolding

    Fixes #5817

[x] Tests for the changes have been added (for bug fixes / features)
[x] Code meets the expectations our engineering guidelines. https://github.com/aspnet/Home/wiki/Engineering-guidelines.

Please review the guidelines for CONTRIBUTING.md for more details.
Fixed #5817

@AndriySvyryd please review latest check-in. I moved it into relational annotation but not completely sure that this proper way to use realational attributes (i tried to mimic HasName behaivior).

@AndriySvyryd done. Please review

General question about this PR: currently by default we add the filter WHERE x IS NOT NULL for unique indexes in SQL Server (not sure what we do for SQLite). Can that become a convention that takes advantage of this feature?

@divega Sure, I can do it after this is merged

@AndriySvyryd done, please review

@AndriySvyryd @roji done, please review.

LGTM

Thank you for your contribution.


Returned books are not deleted from the "books bought" modal

Steps to reproduce the error:

Buy some books;
Return one book (reso);
Go back to the same panel and try to return the other book;

The book returned at step 2) is still there, and if I try to return it again, it correctly throws an error.

The image at the top shows the number of books bought after having returned one book. Initially, the client bought 2 books. This is correct.

The image at the top shows the two books (it should be one) when clicking on the "Acquistati" cell.

This is a problem with the data being out of sync in memory, if you refresh the page, it's correctly removed
But yeah, easy to solve


Support newer Python

Is your feature request related to a problem? Please describe
The PyPI package indicates pre-built packages are only available up to Python 3.7 which is already a year past end-of-life
Describe the solution you'd like
Publish packages for newer Python, preferably up to 3.12
Additional context
pip installed without errors for me on Python 3.12.2. However when I try the example snippet from your docs
import mlconjug

# To use mlconjug with the default parameters and a pre-trained conjugation model.
default_conjugator = mlconjug.Conjugator(language='fr')

I got
ImportError: No module named pkg_resources

Based on this StackOverflow suggestion, I tried pip install setuptools which then resulted in a different error
ModuleNotFoundError: No module named 'sklearn.feature_selection.from_model'

My guess is this is because a newer version of sklearn was installed to match my Python version that has since deprecated a function mlconjug relies on

Ah I see there is mlconjug3 for up to Python 3.11


Feature Request - Toggle return of all issues in "diagnostics", comma delimited, instead of first issue at index 0.

https://github.com/jamesagnew/hapi-fhir/blob/master/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/OperationOutcomeUtil.java#L110
I would like the ability to get all reported issues returned in the diagnostics field in the response body json entity. It doesn't need to be the default behavior, but being able to get back all issues at once could go a long way to save time in correcting issues and cleaning up data.

I don't think it'd make sense to add that to the existing methods since they are named to explicitly fetch the first, but a separate method that was similar but also took an index as input could definitely be useful.

Right, exactly! Thank you. I included the link for some context. The solution would involve a separate method, or simply renaming this method and make the return statement conditional.
I also think, regardless of whether the first index is returned or a comma delimited list is returned, it should be sorted by severity if that's possible.


Make explicit which fixtures a test use

Moved from https://github.com/pytest-dev/pytest/issues/901.

I think a nice fit would be to create a new command line switch which outputs the collection tree similar to what you see with --collection-only, but annotated with all the fixtures that are enabled for each item as discovered during collection (including autouse fixtures, which seems to be the main use case mentioned by @taliaga):
<Module 'testing/python/raises.py'>
  <Class 'TestRaises'>
    <Instance '()'>
      <Function 'test_raises'> fixtures: testdir
      <Function 'test_raises_exec'> fixtures: testdir
      <Function 'test_raises_syntax_error'> fixtures: testdir
      <Function 'test_raises_function'> fixtures: testdir
      <Function 'test_raises_callable_no_exception'> fixtures: testdir
      <Function 'test_raises_flip_builtin_AssertionError'> fixtures: testdir
      <Function 'test_raises_as_contextmanager'> fixtures: testdir
      <Function 'test_noclass'> fixtures: testdir
      <Function 'test_tuple'> fixtures: testdir

Possibly with different colors for normal fixtures and autouse fixtures.

@nicoddemus maybe #3 kind of answer this one ?


Improve Code Quality

This PR contains the remaining immutability work for the v4 release, along with a few code quality improvements.

Codecov Report

Merging #421 (3f16810) into master (bf75254) will increase coverage by 0.09%.
The diff coverage is 70.28%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##           master     #421      +/-   ##
==========================================
+ Coverage   75.06%   75.16%   +0.09%
==========================================
  Files          96       98       +2
  Lines        2783     2778       -5
  Branches      458      459       +1
==========================================
- Hits         2089     2088       -1
+ Misses        579      575       -4
  Partials      115      115

Files Changed
Coverage Δ

Src/Fido2/AttestationFormat/AttestationVerifier.cs
85.00% <0.00%> (ø)

Src/Fido2/Extensions/CryptoUtils.cs
88.17% <ø> (ø)

Src/Fido2/AuthenticatorAssertionResponse.cs
43.05% <39.39%> (+<0.01%)
:arrow_up:

Src/Fido2/TrustAnchor.cs
46.66% <46.66%> (ø)

Src/Fido2/AuthenticatorAttestationResponse.cs
79.43% <52.17%> (+3.06%)
:arrow_up:

...ido2/Objects/DevicePublicKeyAuthenticatorOutput.cs
44.82% <58.82%> (+3.44%)
:arrow_up:

Src/Fido2/Objects/AttestedCredentialData.cs
86.11% <80.00%> (+1.00%)
:arrow_up:

Src/Fido2/Extensions/GuidHelper.cs
81.81% <81.81%> (ø)

Src/Fido2/Metadata/MDSGetEndpointResponse.cs
83.33% <83.33%> (-16.67%)
:arrow_down:

Src/Fido2/AttestationFormat/Tpm.cs
94.26% <87.50%> (ø)

... and 7 more

@iamcarbon Nice work on this Jason


chore: switch to pyproject.toml

Reason for Change

pyproject.toml is the preferred method of storing configuration for a python package over using setup.py and setup.cfg. This helps keeps all of the configurations for the packed in a single file.

Changes

remove setup.py, setup.cfg and requirements.txt and replace pyproject.toml
update bumpversion config to update the pyproject.toml version.

Testing

manually bumped the version and confirmed no regressions.

Notes for Reviewer

getting error
$ pip install -e .
Obtaining file:///home/runner/work/single-cell-curation/single-cell-curation/cellxgene_schema_cli
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Getting requirements to build editable: started
  Getting requirements to build editable: finished with status 'done'
  Preparing editable metadata (pyproject.toml): started
  Preparing editable metadata (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error

  × Preparing editable metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      Traceback (most recent call last):
        File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 3[53](https://github.com/chanzuckerberg/single-cell-curation/actions/runs/9118373361/job/25071385447?pr=916#step:5:54), in <module>
          main()
        File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 181, in prepare_metadata_for_build_editable
          return hook(metadata_directory, config_settings)
        File "/tmp/pip-build-env-6gvmj0oo/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 453, in prepare_metadata_for_build_editable
          return self.prepare_metadata_for_build_wheel(
        File "/tmp/pip-build-env-6gvmj0oo/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 3[68](https://github.com/chanzuckerberg/single-cell-curation/actions/runs/9118373361/job/25071385447?pr=916#step:5:69), in prepare_metadata_for_build_wheel
          self._bubble_up_info_directory(metadata_directory, ".egg-info")
        File "/tmp/pip-build-env-6gvmj0oo/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 337, in _bubble_up_info_directory
          info_dir = self._find_info_directory(metadata_directory, suffix)
        File "/tmp/pip-build-env-6gvmj0oo/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 348, in _find_info_directory
          assert len(candidates) == 1, f"Multiple {suffix} directories found"
      AssertionError: Multiple .egg-info directories found
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

We can revisit if this become priority


Preliminary attempt to fix complex types with cross-level-twins

This PQ still needs work.
It works well in the following cases:
bot.on(["message:text"], ctx => {
	// user: User
	const user = ctx.from;
});

bot.on(["message:text", "channel_post:text"], ctx => {
	// user: User | undefined
	const user = ctx.from;
});

And not very well in this case:
bot.on(["channel_post", ":forward_date"])
	.on(":text")
	.on(["::url", "::hashtag", "::cashtag"], ctx => {
		// Property 'id' does not exist on type 'User | Chat | undefined'. deno-ts(2339)
		const { id } = ctx.from ?? ctx.senderChat;
	});

It's still up for visibility now, I'll attempt to resolve this as well, although it is definitely a bit complex.

Are you still planning on working on this? :)

Closing, since I don't think I'll be able to tackle it for now. If I look at it again, I'll open a new PQ.


New extension: Wake Lock

Resolves #858
Adds a new extension, Wake Lock, to keep the computer and screen on when needed.
You can add it to the website if you want to. If you need my Scratch profile, I'm D-ScratchNinja.
Tested in Edge 115.

Need to change the docs to Markdown.

I have converted the documentation to Markdown. Not tested!


Add dotenv-filename and dotenv-path to in-justfile settings

Context
I was trying to load a .env file located in another directory from multiple other justfiles for a project with a lot of repositories earlier and couldn't find any way to do that in the documentation.
After checking the code, I found the --dotenv-filename and --dotenv-path arguments that did exactly what I needed to do (introduced in #941), but it was impossible to set those options in the justfile directly.
Changes
This pull request pretty much makes the --dotenv-filename and --dotenv-path available as settings that can be set using the set keyword in a justfile.
The implementation of the load_dotenv function was modified so that it considers these new settings, on top of the already existing program arguments. The program arguments take precedence over the settings in the justfile.
The documentation in README.md was updated to reflect those changes.
Caveats
I found out right before creating this PR that there was already a pull request (#1640) and a few open issues about this topic (#945), and did not take them into account during implementation. There's some very good ideas floating in these, but my PR just exposes the existing program arguments as settings.
I did not update the documentation in README.中文.md since I cannot read or write Chinese.

Looks great! I collapsed the various sections about the dotenv integration into one, since otherwise there would be a bunch of repetition and cross-linking.


Add ignoring of duplicate 'css' classes

closes #138
/cc @zxqfox

:shipit:

@tadatuta Can you please look at this PR and tell us your wise opinion about duplications in classes?
Can it be important for someone?
Should there be an option to compare class attributes more accurately?

@zxqfox
I understand that duplicate classes do no harm but why should we consider HTML with them identical? Isn't duplication a result of some issues with templates?

@tadatuta I described my position in #138. It's the same for browser, so there is no real difference. Gzip will help you if your template contains repeats. Moreover, if somebody need it for real cases, we can add an option. Atm we can't disable this check (as well as sorting classes, and a lot of other assumptions).

there is no real difference

as I wrote above I know there's no difference for browsers but it may be for template engines or templates.

if somebody need it for real cases

can't imagine any ;)

:yellow_heart: <3 :yellow_heart: Thanks!


Issue 1564: Upgrade from mockito 2.22.0 to 3.1.0

Fixes https://github.com/strongbox/strongbox/issues/1564.
Acceptance Test

[x] Building the code with mvn clean install -Dintegration.tests still works.
[x] Running mvn spring-boot:run in the strongbox-web-core still starts up the application correctly.
[x] Building the code and running the strongbox-distribution from a zip or tar.gz still works.
[x] The tests in the strongbox-web-integration-tests still run properly.

Thanks for your help, @chace86 !
Could you please work your way through the acceptance tests as well? Also, please feel free to join our chat channel.

Thank you!


[BUG] failed to setup yurt-tunnel between edge node in home and cloud node in CSP

What happened:
Failed to setup yurt-tunnel between edge node (giada-box-n1) in home and cloud node (xxxxxxxxx) in CSP
[sysadmin@xxxxxxxxx ~]$ sudo kubectl -n kube-system logs yurt-tunnel-agent-h4vzq
Error from server (ServiceUnavailable): the server is currently unable to handle the request ( pods/log yurt-tunnel-agent-h4vzq)

[sysadmin@xxxxxxxxx ~]$ sudo kubectl run --rm -it --image=busybox test
If you don't see a command prompt, try pressing enter.
Error attaching, falling back to logs: unable to upgrade connection: fail to setup the tunnel: fail to setup TLS handshake through the Tunnel: write unix @->/tmp/interceptor-proxier.sock: write: broken pipe
pod "test" deleted
Error from server (ServiceUnavailable): the server is currently unable to handle the request ( pods/log test)

box@giada-box-n1:~$ docker logs 5cad6002ee5d
I1106 06:01:52.036628       1 start.go:48] yurttunnel-agent version: projectinfo.Info{GitVersion:"latest", GitCommit:"44f2797", BuildDate:"2021-06-07T10:00:59Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
I1106 06:01:52.036868       1 options.go:136] ipv4=<IP_ADDRESS>&host=giada-box-n1 is set for agent identifies
I1106 06:01:52.036891       1 options.go:141] neither --kube-config nor --apiserver-addr is set, will use /etc/kubernetes/kubelet.conf as the kubeconfig
I1106 06:01:52.036910       1 options.go:145] create the clientset based on the kubeconfig(/etc/kubernetes/kubelet.conf).
I1106 06:01:52.377343       1 start.go:84] yurttunnel-server address: <IP_ADDRESS>:31995
I1106 06:01:52.380174       1 anpagent.go:57] start serving grpc request redirected from yurttunnel-server: <IP_ADDRESS>:31995
I1106 06:01:52.380901       1 util.go:45] "start handling meta requests(metrics/pprof)" server endpoint="<IP_ADDRESS>:10266"
E1106 06:02:12.462139       1 clientset.go:156] "cannot sync once" err="rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp <IP_ADDRESS>:31995: i/o timeout\""

What you expected to happen:
yurt-tunnel setup correctly, so kubectl logs works
How to reproduce it (as minimally and precisely as possible):

Setup an OpenYurt cluster in the cloud

Deploy yurt-tunnel manually following the instructions
kubectl apply -f config/setup/yurt-tunnel-server.yaml
kubectl apply -f config/setup/yurt-tunnel-agent.yaml

Add a new node into the cluster with the cloud node's public IP by command kubeadm join ...

Convert to edge node by yurtctl convert edgenode -e giada-box-n1

Wait until all the pods are ready and check the logs of the yurt-tunnel-agent on the new edge node

Anything else we need to know?:
Seems the root cause is that the yurt-tunnel-agent is trying to connect yurt-tunnel-server via cloud node's private IP instead of the public IP
[sysadmin@xxxxxxxxx ~]$ ss -lntp
...
LISTEN      0      128         <IP_ADDRESS>:10262               *:*
LISTEN      0      128         <IP_ADDRESS>:10263               *:*
LISTEN      0      128         <IP_ADDRESS>:10264               *:*
LISTEN      0      128         <IP_ADDRESS>:10265               *:*
LISTEN      0      128                  *:31995               *:*

yurt-tunnel server and agent logs
[sysadmin@xxxxxxxxx ~]$ sudo kubectl -n kube-system logs yurt-tunnel-server-6fdb679789-gp82b
I1106 03:42:17.014572       1 start.go:54] yurttunnel-server version: projectinfo.Info{GitVersion:"latest", GitCommit:"0386d05", BuildDate:"2021-10-11T02:42:23Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"}
W1106 03:42:17.014823       1 client_config.go:552] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
I1106 03:42:17.015755       1 options.go:155] yurttunnel server config: &config.Config{EgressSelectorEnabled:false, EnableIptables:true, EnableDNSController:true, IptablesSyncPeriod:60, DNSSyncPeriod:1800, CertDNSNames:[]string{}, Ce
rtIPs:[]net.IP{}, ListenAddrForAgent:"<IP_ADDRESS>:10262", ListenAddrForMaster:"<IP_ADDRESS>:10263", ListenInsecureAddrForMaster:"<IP_ADDRESS>:10264", ListenMetaAddr:"<IP_ADDRESS>:10265", RootCert:(*x509.CertPool)(0xc00022c450), Client:(*kub
ernetes.Clientset)(0xc00031c580), SharedInformerFactory:(*informers.sharedInformerFactory)(0xc0002054f0), ServerCount:1, ProxyStrategy:"destHost", InterceptorServerUDSFile:""}
I1106 03:42:17.016284       1 leaderelection.go:242] attempting to acquire leader lease  kube-system/tunnel-dns-controller...
E1106 03:42:17.019892       1 iptables.go:200] failed to delete rule that nat chain OUTPUT jumps to TUNNEL-PORT: error checking rule: exit status 2: iptables v1.6.0: Couldn't load target `TUNNEL-PORT':No such file or directory

box@giada-box-n1:~$ docker logs 5cad6002ee5d
I1106 06:01:52.036628       1 start.go:48] yurttunnel-agent version: projectinfo.Info{GitVersion:"latest", GitCommit:"44f2797", BuildDate:"2021-06-07T10:00:59Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
I1106 06:01:52.036868       1 options.go:136] ipv4=<IP_ADDRESS>&host=giada-box-n1 is set for agent identifies
I1106 06:01:52.036891       1 options.go:141] neither --kube-config nor --apiserver-addr is set, will use /etc/kubernetes/kubelet.conf as the kubeconfig
I1106 06:01:52.036910       1 options.go:145] create the clientset based on the kubeconfig(/etc/kubernetes/kubelet.conf).
I1106 06:01:52.377343       1 start.go:84] yurttunnel-server address: <IP_ADDRESS>:31995
I1106 06:01:52.380174       1 anpagent.go:57] start serving grpc request redirected from yurttunnel-server: <IP_ADDRESS>:31995
I1106 06:01:52.380901       1 util.go:45] "start handling meta requests(metrics/pprof)" server endpoint="<IP_ADDRESS>:10266"
E1106 06:02:12.462139       1 clientset.go:156] "cannot sync once" err="rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp <IP_ADDRESS>:31995: i/o timeout\""

current pods status
[root@xxxxxxxxx openyurt]# kubectl get po -A
NAMESPACE     NAME                                         READY   STATUS      RESTARTS   AGE
kube-system   calico-kube-controllers-659bd7879c-s6z7l     1/1     Running     0          2d22h
kube-system   calico-node-6bh2s                            0/1     Running     0          39m
kube-system   calico-node-8vvdj                            0/1     Running     0          23h
kube-system   calico-node-pnj2j                            0/1     Running     0          2d22h
kube-system   coredns-7f89b7bc75-kw7md                     1/1     Running     0          2d22h
kube-system   coredns-7f89b7bc75-tsfmz                     1/1     Running     0          2d22h
kube-system   etcd-xxxxxxxxx                               1/1     Running     0          2d22h
kube-system   kube-apiserver-xxxxxxxxx                     1/1     Running     1          2d22h
kube-system   kube-controller-manager-xxxxxxxxx            1/1     Running     0          2d22h
kube-system   kube-proxy-5fvj4                             1/1     Running     0          2d22h
kube-system   kube-proxy-cpz6g                             1/1     Running     0          23h
kube-system   kube-proxy-sxkx2                             1/1     Running     0          39m
kube-system   kube-scheduler-xxxxxxxxx                     1/1     Running     0          2d22h
kube-system   yurt-controller-manager-77b97fd47b-b56z2     1/1     Running     0          2d22h
kube-system   yurt-hub-xxxxxxxxx                           1/1     Running     0          2d22h
kube-system   yurt-hub-giada-box-n1                        1/1     Running     0          4m24s
kube-system   yurt-hub-testnode1                           1/1     Running     0          23h
kube-system   yurt-tunnel-agent-h4vzq                      1/1     Running     0          2m52s
kube-system   yurt-tunnel-agent-xhgdg                      0/1     Pending     0          142m
kube-system   yurt-tunnel-server-6fdb679789-gp82b          1/1     Running     0          142m
kube-system   yurtctl-servant-convert-giada-box-n1-8cvpx   0/1     Completed   0          4m42s

Environment:

OpenYurt version:
Kubernetes version (use kubectl version):
OS (e.g: cat /etc/os-release):
Kernel (e.g. uname -a):
Install tools:
Others:

others
/kind bug

@joez hi, according to the reason in your description(the yurt-tunnel-agent is trying to connect yurt-tunnel-server via cloud node's private IP instead of the public IP), I think that you can try to add args in containers, one is  cert-ips=tunnel-server-Public-IP in yurt-tunnel-server, the other is --tunnelserver-addr=tunnel-server-Public-IP:Port in the yurt-tunnel-agent. Hope to solve your problem.

Thanks, @JcJinChen
with following patch, it works ("<IP_ADDRESS>" is the public IP of the master node)
diff --git a/config/setup/yurt-tunnel-agent.yaml b/config/setup/yurt-tunnel-agent.yaml
index acb2b35..8433842 100644
--- a/config/setup/yurt-tunnel-agent.yaml
+++ b/config/setup/yurt-tunnel-agent.yaml
@@ -24,6 +24,7 @@ spec:
         - --node-name=$(NODE_NAME)
         - --node-ip=$(POD_IP)
         - --v=2
+        - --tunnelserver-addr=<IP_ADDRESS>:30262
         image: openyurt/yurt-tunnel-agent:latest
         imagePullPolicy: IfNotPresent
         name: yurt-tunnel-agent
diff --git a/config/setup/yurt-tunnel-server.yaml b/config/setup/yurt-tunnel-server.yaml
index 86bb085..4fec2ae 100644
--- a/config/setup/yurt-tunnel-server.yaml
+++ b/config/setup/yurt-tunnel-server.yaml
@@ -103,6 +103,7 @@ spec:
     name: https
   - port: 10262
     targetPort: 10262
+    nodePort: 30262
     name: tcp
   selector:
     k8s-app: yurt-tunnel-server
@@ -178,6 +179,7 @@ spec:
         - --insecure-bind-address=$(NODE_IP)
         - --proxy-strategy=destHost
         - --v=2
+        - --cert-ips=<IP_ADDRESS>
         env:
         - name: NODE_IP
           valueFrom:

the issue resolved as suggested, thanks


Error messages

Hi!
I've installed and enabled the Obsidian plug-in. However, it seems I just can't make it work. These two messages show up simultaneously:
"Error: Request failed, status 401 in API Request Error" and " Metadata Auto Classifier: Response has low reliabilty (0).
Any help would be appreciated.

Thank you for contacting me, could you give me more information about your problem to solve it! @AJLSC

which LLM provider do you use chatgpt or custom LLM
which command do you run like tag or your personal frontmatter?


'We're Hiring' homepage element gets cut off on smaller viewport heights

the 'we're hiring' element should stay 50% vertical height. it gets cut off if viewport isn't tall enough

fixed in #893

fixed in #893


Extract Fields From FHIR Bundle

Extract Fields From FHIR Bundle
This PR adds the logic to extract the following fields from the FHIR bundle:

placer order number
sending application id
sending facility id
receiving application id
receiving facility id

These fields are extracted from orders and results.
Issue
#621
Checklist

[ ] I have added tests to cover my changes
[ ] I have added logging where useful (with appropriate log level)
[ ] I have added JavaDocs where required
[ ] I have updated the documentation accordingly

I talked with the HL7 SMEs.  They stated that the MSH fields' most important sub-fields are the first two, and the ORC field's most important sub-fields are the first three.  This basically means that we shouldn't just return a single ID for each of these new methods we're adding.  Honestly, we might as well include all of the sub-fields.
We should either add additional methods for each sub-field, have the existing method return all the important sub-fields with some delimiter (e.g. 1234^other_stuff^moof using ^ as the delimiter), have the existing method return a POJO (Plain Old Java Object) that has the sub-fields, or some other solution that I'm not thinking of.

I talked with the HL7 SMEs. They stated that the MSH fields' most important sub-fields are the first two, and the ORC field's most important sub-fields are the first three. This basically means that we shouldn't just return a single ID for each of these new methods we're adding. Honestly, we might as well include all of the sub-fields.
We should either add additional methods for each sub-field, have the existing method return all the important sub-fields with some delimiter (e.g. 1234^other_stuff^moof using ^ as the delimiter), have the existing method return a POJO (Plain Old Java Object) that has the sub-fields, or some other solution that I'm not thinking of.

Yes. I noticed that we would have to get more than a sub-field. I'm taking the namespace-id, universal-id, and universal-type-id for the most part. I already have a method that concatenates and joins the fields with a caret. I still haven't looked into isolating each id for later use. Right now, I'm only spitting out something like: Epic^1.2.840.1143<IP_ADDRESS>.<IP_ADDRESS>5071^ISO


Proposal: "Manifest-less" Single Component Apps

Some simple apps don't require any meaningful configuration in their manifests beyond a single input component, e.g.:

No (non-trivial) trigger config (route = "/...")
No WASI config: files, environment (could be WASI-Virted)
No Spin-specific component config: allowed_outbound_hosts, key_value_stores, etc.

spin up could synthesize a manifest (or locked app, directly) for this sort of "manifest-less app", giving a similar/somewhat-compatible experience to wasmtime serve.
In addition to providing a nice lightweight path to running this sort of simple app, this could serve as a base for future features:

Generate a spin.toml, either interactively or with TODO fill-in-the-blanks for required config
Interactively virtualize dependencies

This would also allow us to support the proposed "WASI OCI Design"

I really like this idea of starting with the simple use case, so I'm in favor of targeting distributing this using the new OCI design.
From talking about this with a few people in the context of the OCI design, it looks like the design for distributing a multi-Spin-component application leans in the direction of a root Wasm component that embeds the referenced components. Now, this design is a bit out as far as I can tell (referencing an embedded core module or component by content digest and reassembling the composed component is not possible right now), and we don't have a prototype for distributing files using WASI-Virt.
That being said, I'm wondering if we can take this prototype one step further, and embed the application metadata for this one-component approach in a custom section?
This would set the precedent for how to distribute Spin application metadata as part of a component in the future as well; Then, we can ideally update this with a solution for files.

I'm wondering if we can take this prototype one step further, and embed the application metadata for this one-component approach in a custom section?

We probably can, but that would expand the scope from "@itowlson already did it" to "needs more thought". :slightly_smiling_face:


⚠ Jerry Savelle Ministries International Australia has degraded performance

In 63257f9, Jerry Savelle Ministries International Australia (https://jsmiaustralia.org) experienced degraded performance:

HTTP code: 200
Response time: 8717 ms

Resolved: Jerry Savelle Ministries International Australia performance has improved in 53e9975 after .


Create with keeper

Create with Keeper
We also need "Create with Keeper" when Hexa is being created (new wallet screen). Here the user will use a specific BIP 85 wallet and from the settings,
Choose show QR (from Backup Phrase screen (below the seed words). This QR can be scanned on Hexa when the user choses "create with Keeper" on the first screen and chooses scan QR.
Also the user can choose to deeplink from this screen which needs to fetch the BIP-85 wallet seed from Keeper. The user selects a particular wallet whose seed is used for creating Hexa. Not sure how this can be done using deplink.

Closing as outdated


Book Updates Outline

Update outdated materials, e.g., not working links, reflecting changes in our new notebooks
Format issues. Found some details not consist in python fundament 1 & 2 chapters
Add “review”， “outline” , and "summary" section for every chapter. But we should keep it concise.
Add "numpy" chapter.

Ok @Tinghao724 so what we do is since we have the python fundamentals notebooks all setup, lets make sure that the associated book chapters are consistent with them...

[ ] Make sure pyfun one is consisten with python one notebook

[ ] Same with two

When I'm done with the other notebooks, we work on that as well

Hi, @mwaugh0328
Below are my comments/questions:
Task 1, no further questions needed. I updated the contents to make sure them match the new notebook in terms of sections and formats.
Regarding task2, I have a short question, should we delete the question regarding “Object inspector” in review question part, I guess it is more relevant with spyder. Besides, I have checked but found no where talked it in the book.

@Tinghao724, so py-fun-1 on book is done. I'll go through py-fun 2
I also added a chapter, pulling some material out on best practice coding. Any thought on other stuff to add???

@mwaugh0328,
I went over the materials and found the majority of them were pretty good. Separating the coding styles with the language itself was really great.
And I just found one thing we had discussed in the past not reflecting in the chapter py-fun 1: a better intuition/section to discuss the data types and structures.


How to hidden modelproperties in specific http method?

I use spring boot with swagger2  to create api docs and I use @ApiModelProperty(hidden=true) to hidden some properties and it works.Now I want to hidden some properties in specific http methods(like POST or PATCH) and not to hidden in GET method,is there any way to do this?thx a lot!

Currently you cannot do it by method. Also there is currently an effort to be able to do that that will be part of the next release

@dilipkrish thank you！I‘m looking foward to the next release


census: added test case

Hey, when mentoring I got the following solution:
// HasRequiredInfo determines if a given resident has all of the required information.
func (r *Resident) HasRequiredInfo() bool {
	if r.Name == "" {
        return false
    }
    for _, v := range r.Address{
        if v != "" {
            return true
        }
    }
	return false
}

Instructions: In order to be counted, a resident must provide a non-zero value for their name and an address that contains a non-zero value for the street key.
It only checks if any key in r.Address is set, but not if street is set and this passes the tests.
Therefore I have added a test case

Great Job!

Interesting case, thanks for the additional test case.


Fixes issue #28

I have resolved issue #28 to my satisfaction. All tests pass, including the new one I wrote specifically for this issue. The slight change I have made to host comparison looks very safe — it can only make the function more likely to succeed, so should not cause any failures where pools were working before! Let me know if any cleanup or style changes would make this easier to absorb. Thanks for all your work on httplib3!

There!  I think these changes resolve your comments so far.  Take a look, and see if you can generate another round of comments. :)

My only thought would be that tiny, one-off servers that are one-trick ponies for the specific test they serve tend to be small, fast, blazingly simple, easy to understand, and easy to update or delete if the test needs to be changed or updated. Whereas big one-sized-fits-all servers, bristling with a dozen locks to serve every conceivable test need, tend to be complex and to make the tests bound to each other in the sense that the "dummyserver" can't be modified to serve one test without breaking — or at least making terribly awkward — its usefulness for another.
On the other hand, you will perhaps argue that a few gobs of server-ish code in one place will make for a smaller overall test suite than having a little did-I-read-this-expected-request, then-let's-write-this-canned-response server() functions scattered all over the place?
(Or have I completely misimagined what you are intending and should just be quiet and wait for more commits?) :)

It's still an evolving idea which will hopefully land somewhere in between. :)
Code will flow shortly. Comments welcome.

Here we go: 99cd0a3c68de889af1cbcf82580d24057ab8a29d
What do you think, @brandon-rhodes?
It's a little more magicky, but it also adds a bit of consistency with the rest of the dummyserver tests. Also I'd like to add more socket-level tests per inspiration from you. :)

Your approach does indeed add symmetry, and — if I read it right — it means that a whole class-full of tests can simply call
    self._start_server(socket_handler)

near the top of the test and get a standard class-wide set of parameters passed into the new server thread, instead of having to pass those options as additional arguments to _start_server() over and over again. The magic does mean that I need to look two places each time that I jump in to read a test method — I need to scroll to the top of the class, check the parameters, then scroll back down to the method — but that's a common tradeoff versus repeating something like a hostname or port number in every single test.
A few details of the design were a bit fragile, but I have made comments at the relevant spots. Only a few tweaks are necessary to tighten up the tests against possible intermittent failure and make your approach rock-solid!

Thank you for the code review!
Also once we get dynamic port allocation as we talked about, this will be less of an issue. I'll try to fix the code per your comments today and maybe push out v1.1.1


Updating readme links

I just changed some links in the Development section of the README to refer to their current location (github.com/barrel-db form github.com/barrel)
Hey, I was just looking over this project and noticed these links were fairly outdated.

thanks!


It's kinda slow...

Any reason why?

@milesalex did you try to install the latest release? https://github.com/railsware/black-screen/releases

This fixed the issue. Can you add automatic updating to the build?

Will do, @milesalex! I marked it as a high priority issue. https://github.com/railsware/black-screen/issues/443


[New] no-extraneous-dependencies: added includeTypes option to validate type imports

Fixes #2542
@ljharb I'm not totally if this will work with Flow or only Typescript, or what the current Flow support is like. I couldn't get a Flow unit test to fail with this new option, but I don't see what in the code would be different between the two type systems.

thanks @ljharb


E2EE with a single random string in QR-code

After #58
In a "simple" E2EE approach, the QR-code contains a random channel ID and a random crypto passphrase.
This works well for privacy, as:

the channel ID is shared with Target client, Mobile source, and Backend ;
the crypto passphrase is known only by Target client and Mobile source (never given to the backend)

To reduce QR-code complexity (amount of information encoded in the QR), find a way to generate a single random secret string, and derive from it a shared channel ID.

SHA-256 looks like a cromulent one-way  cryptographic hash function.


Enhance the Standalone Indentation test

The indentation should only be applied at the start of a line.

Does this change actually solve anything? I mean, I don't think you can pass the new version of the test without also passing the old version.
If it does solve something, I would prefer the new version to coexist alongside the old version.


Add a deploy to bluemix button

There is a manifest.yml file but no Deploy-to-Bluemix button. Add one to the README

Done.

this has been added, closing.


docs: Remove the section about remote read JSON responses - it only supports proto response or errors

Proposal
AC:

Remove the wrong section: https://prometheus.io/docs/prometheus/latest/querying/remote_read_api/#format-overview

https://github.com/prometheus/prometheus/pull/13989/files pr for this issue

@bwplotka is this fine ?

i have created another Pr from new branch


[dv] Teach encrypt/decrypt_sram_data to support OTBN

This commit teaches those two functions to support replication of
keystreams (in OTBN, we re-use a 64-bit keystream by concatenating it
with itself as many times as needed for the very wide word).
It also generalises the functions to allow the caller to select the
width of the subst/perm network. Before this commit, there was a
"byte_diff" flag that allowed you to select between full-width and 8
bits. This commit changes the flag to an integer that gives the width
explicitly. Call-sites that set byte_diff should have an sp_width of
8; those that didn't should have an sp_width equal to data_width.
OTBN's dmem can use an sp_width of 39 (and a data_width of 312).
The implementation is a little finicky because you have to extract
"chunks" of an unpacked array. For the 8-bit case, you could do things
like "data[i*8 +: 8]" but you can't do that if you don't know the
width at compile time (because range selects need a constant for their
width). As such, there's a big loop on each side of the call to
sp_encrypt or sp_decrypt to grab a chunk of data, operate on it, and
write it back to the main word.

Oh damn! I was cleaning up local branches and seems I got a bit trigger-happy.

(Or maybe this is a cunning ruse to get a review! :-D)

(Or maybe this is a cunning ruse to get a review! :-D)

well in that case, i shall dig in and refuse to review :)


[📚] Emulator Usage sections not updated after use<product>Emulator(host, port) API update (#6439)

I seems that the following sections in the docs were not updated after the use<product>Emulator(host, port) API update (https://github.com/FirebaseExtended/flutterfire/pull/6439):
https://firebase.flutter.dev/docs/firestore/usage#emulator-usage
https://firebase.flutter.dev/docs/auth/usage#emulator-usage
https://firebase.flutter.dev/docs/functions/usage#emulator-usage
https://firebase.flutter.dev/docs/storage/usage#emulator-usage
BTW: thanks @russellwheatley for implementing https://github.com/FirebaseExtended/flutterfire/pull/6439. It made my code a lot cleaner! 😀

Thanks for letting us know - will get this updated ASAP.


Media: a few considerations

Been testing the media module and it's great. There are a few things that I's like the team to consider before release. Apologizes if I have missed any features that are already there and I just couldn't find them.
Items to consider before release

Alternate Text field added by default and set as required by default (just for image media obviously). Many organisations want to enforce that content editors set the alternative text field. If the default caption field was the intention for this then this may be better to be labeled to be consistent to the HTML language as to avoid confusion.
Images have a title by default (visible only on the editing side). Once the library gets larger content editors are going to want to be able to search the media library somehow (even if search is not released till later). Title should be shown instead of filename in the selectors and the media field.
When you upload a image the filename is set by the filename of the uploaded image. You should be able to change this to be something meaningful... perhaps initially an autoroute of the title that can be changed by the content editor.
There doesn't seem to be anywhere you can change fields added to an image. Is this incomplete?

Items that could be addressed after release

When a content editor adds an image to markdown editor or selects and image in the media field, they should be given an opportunity to modify/set the alternative text. By default the selector should get the alternative text stored with the image but they should have the opportunity to override the default value.
When a content editor adds an image to the markdown editor they should have an opportunity to set the size. If default sizes could be stored this would be great... eventually we should also support being able to set different sizes for different devices using srceset.

Just something to keep in mind is that the Media page is nothing more than a file management system, as opposed to the one in O1.
So to be able to handle fields, titles, ... we need an Image content type. There is one already, but I need to fine tune it, and your feedback is valuable. Have you seen the Bag Part ? the idea is that we can use it to add content items like Image to a main content item, then we can add custom metadata here, and use it in the main content item. I'll think about it and ping you when I have done something on it. thanks

Oh ok... file system manager - sorry didn't realise. So you can't extend this to support different storage like db, AWS S3 etc?
Just looking at the bag part now. There is two "image" in the content type checkboxes. Any difference between them?
I also noticed that the width and height params are not changing the image size. Future feature?
In my own projects I may look at utilising something like https://imageresizing.net/ particularly because of features like DiskCache, name based presets etc.
Thanks for all the hard work.


Fix for Premption and Volume Mounting

This patch updates the Linux integration driver's preemption logic when mounting volumes. If a volume is already attached the branch in the Mount function involving a precautionary unmount is not invoked.

Hi @cduchesne & @clintonskitson,

Hi @cduchesne & @clintonskitson,
Please feel free to update the PR's description or add a comment to indicate the background on this.

Codecov Report

Merging #413 into release/0.5.0 will decrease coverage by -0.06%.
The diff coverage is n/a.

@@                Coverage Diff                @@
##           release/0.5.0     #413      +/-   ##
=================================================
- Coverage          30.49%   30.44%   -0.06%
=================================================
  Files                 29       29
  Lines               1741     1741
=================================================
- Hits                 531      530       -1
- Misses              1152     1153       +1
  Partials              58       58

Impacted Files
Coverage Δ

api/types/types_localdevices.go
77.35% <ø> (-1.89%)
:x:

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 e43c941...6da2964. Read the comment docs.


Updates for CI

set HOME if not set (HOME not set on CI machines)
use unzip instead of tar (tar failed on linux)
bump up compilers (the version we used was removed form myget)
reuse nuget cache variable

LGTM.
SUPER exciting to see a CI build pass on OS X!


add a Welcome bot

Example:
https://github.com/data-umbrella/event-transcripts/blob/main/.github/config.yml
Need to link to:

a CoC file
a Contributing file

@SangamSwadiK yes, please!  It's also kind of fun to get it going!  :)


Add the ability to export a DSN for all datastore controllers

Is your feature request related to a problem?
My applications all expect a Database URL in DSN format (scheme://user:password@host:port/database). This functionality is fairly common amongst modern web frameworks, and provides developers the ability to skip configuration in many cases.
Currently, I need to manually construct a DSN when connecting to RDS using the provided FieldExport functionality. It would be great to not need to do this, as sometimes I need to write a wrapper script to pass the argument properly (when the DSN is expected via flag/env var) or vendor the codebase to write a custom Dockerfile in cases where I am installing third-party software.
Describe the solution you'd like
I would like all datastores (Elasticache, Redis, DynamoDB, etc.) to provide a URL FieldExport. This would collate the existing config in the correct format so I can display this to my app automatically.
Describe alternatives you've considered
My alternative atm is to either do this in code (blech) or somehow write a custom controller that watches for the desired secrets and does this for me based on other secrets.

Somewhat related to https://github.com/aws-controllers-k8s/community/issues/1542 and https://github.com/aws-controllers-k8s/community/issues/1417 -  we shouldn't solve this at the ACK controller's level.


Ecc/PAI-20-refactor-shodan-demo

Making changes as noted from code review. Will submit new pull request


Adding trailing slash

Adding a trailing slash to the list of acceptable characters for a URL. In running this tool, it strips off the trailing / currently and then reports the redirection to the URL with the slash generating false positives.

Merged.


Redefining Array#dup breaks lots of other things

After a half-day of debugging, I realized that your redefinition of Array#dup, introduced in 84f36c296ec2d93ecf8f7af77ce8816cd21d7a3b, causes all kinds of things to go haywire in a Rails application. (I was inexplicably no longer able to log in.)
I'm not even a conscious user of your gem, pulling it in via rdf-n3, but could you perhaps roll back that change? I suspect my case isn't the only weird interaction it will produce.
(EDIT: Just to be clear, I've confirmed that all the weird behavior I saw was a result of sparql 3.1.1, and could be fixed by commenting out that one function.)

Yes, I can see that this is over broad. Better to create a #deep_dup Method, or something more on point to the general purpose.
I’ll get a patch out shortly.

Released 3.1.2 and yanked 3.1.1.

Fantastic, thanks so much!

should we consider reworking all the standard library monkey patches to use Refinements?
this seems like a good use case for them.

I thought about that, but have never used them before, but we do patch a number of core classes, and the recent problem was really just my tunnel vision.
If you have some time, perhaps give it a go.


chore: support includes in dynamic-plugins.yaml

Description
Allow including files and overriding their content in the list of dynamic plugins
Which issue(s) does this PR fix

Fixes #641

PR acceptance criteria
Please make sure that the following steps are complete:

[ ] GitHub Actions are completed and successful
[ ] Unit Tests are updated and passing
[ ] E2E Tests are updated and passing
[ ] Documentation is updated if necessary (requirement for new features)
[ ] Add a screenshot if the change is UX/UI related

How to test changes / Special notes to the reviewer

LGTM, #644 (comment)

Fixed


Library support for Xamarin.Mac/Mono

@yingfangdu asked a question in PR #130, so creating an issue for that discussion.
@yingfangdu:

Hi,
Does this version support mono build? I see before it can build for mono while it is is not supported for this new version?
And as we use Xamarin.Mono/Mac which does not have WindowsBase.dll, I remember before it uses another dll named SystemIOPackaging. I cannot find it now.

@twsouthwick

This project is now built using the DotNet CLI (see the README for more details).

The library now targets both .NET 4.5 and .NET Standard 1.3. If you are not aware of .NET Standard, please read this: https://docs.microsoft.com/en-us/dotnet/articles/standard/library. It is a much better replacement for portable libraries.

As far as the packaging library, .NET 4.5 still targets WindowsBase.dll while .NET Standard 1.3 targets System.IO.Packaging (which only supports .NET 4.6+ for the .NET Framework). They are listed as dependencies and installed via NuGet if needed. If this set up does not work on a specific version of mono, please file an issue.

@yingfangdu

Thanks Taylor, could you please give more instruction about how to make this work for Xamarin.Mac/Mono?

I am kind of confusing here. XamairnMac does not allow to use WindowsBase.dll. While I need to use this framework in our product. Before around a couple of months ago, I remembered the source code & instruction I downloaded here can build a OpenXMLLib.dll and System.IO.Packaging.dll. while at that point, it does not work as I expected.

Today when I come back, the instruction is gone. And I have no idea how to do that for mono.
Appreciate all your help.

Thanks,

Yvonne

The confusion appears to be around the role of .NET Standard. Please read through the link I included above. The important part is this table:

This indicates that Mono and Xamarin platforms will support up through .NET Standard 1.6. Since this library targets .NET Standard 1.3, you can consume it via that platform. Once we finalize the NuGet story for this, you'll be able to just install via NuGet and won't need to know these details as NuGet will sort that out for you.

Since this is by design, I'm going to close this issue. Please reopen if you feel this doesn't address your issue.


Update overview figures

Add an icon for metabolic labeling to our light/dark mode overview figures, in the docs and tutorials.

@Marius1311, you showed a CellRank 2 logo in one of your tweets. How about we show it in the docs as well?

Sure, we can do that, do you want to have it in the top left corner?

Can take care of the logo separetely.


globalResponseMessage not working about 200 custom message

Please take the time to search the repository, if your question has already been asked or answered.

[x] What version of the library are you using? Is it the latest version? The latest released version is

What kind of issue is this?

[ ] Question. Is this a question about how to do a certain thing?

[x] Bug report. If you’ve found a bug, spend the time to write a failing test. Bugs with tests or
steps to reproduce get fixed faster. Here’s an example: https://gist.github.com/swankjesse/6608b4713ad80988cdc9

[ ] spring xml/java config that is relevant
[x] springfox specific configuration if it makes sense
[ ] include any output you've received; logs, json snippets etc.; and what the expected output should be
[ ] if you have a repo that demonstrates the issue for bonus points! See this example

[ ] Feature Request. Start by telling us what problem you’re trying to solve. Often a solution
already exists! Don’t send pull requests to implement new features without first getting our
support. Sometimes we leave features out on purpose to keep the project small.

Please do consider starring this repository if you do like this project and find it useful.

HI, springfox team
I want to show the Http Status 200 custom message using globalResponseMessage.
However, swagger-ui only shows OK messages indefinitely.
Below are the settings I used and 400, 500, etc. are shown as custom messages. Please check and fix it.
new Docket(DocumentationType.SWAGGER_2)
                .select()
                .apis(RequestHandlerSelectors.basePackage(StringUtils.defaultIfEmpty(basePackage, BASE_PACKAGE)))
                .build()
                .useDefaultResponseMessages(false)
                .useDefaultResponseMessages(false)
                .globalResponseMessage(RequestMethod.GET, Arrays.asList(new ResponseMessageBuilder()
                        .code(HttpStatus.OK.value())
                        .message("OK Done. custom message.")
                        .build()))
...

same question, my code:
`
@Configuration
@EnableSwagger2WebMvc
public class SwaggerConfig {
@Bean
public Docket api() {
    List<ResponseMessage> responseMessageList = new ArrayList<>();
    responseMessageList.add(new ResponseMessageBuilder().code(200).message("ok")
            .responseModel(new ModelRef("ResponsePackage")).build());
    responseMessageList.add(new ResponseMessageBuilder().code(500).message("ok")
            .responseModel(new ModelRef("ResponsePackage")).build());
    return new Docket(DocumentationType.SWAGGER_2)
            .useDefaultResponseMessages(false)
            .globalResponseMessage(RequestMethod.GET, responseMessageList)
            .globalResponseMessage(RequestMethod.POST, responseMessageList)
            .globalResponseMessage(RequestMethod.PUT, responseMessageList)
            .globalResponseMessage(RequestMethod.DELETE, responseMessageList)
            .select()
            .apis(RequestHandlerSelectors.any())
            .paths(PathSelectors.any())
            .build()
            ;
}

}
`


Preparing 3.1 release

Description
Gimme my new gem versions!
Issues Resolved
N/A
Check List

[ ] New functionality includes tests
[ ] All tests pass
[x] RELEASE_NOTES.md has been updated if required (not required for bugfixes, required for API changes)
[x] All commits have been signed-off for the Developer Certificate of Origin. See https://github.com/chef/chef/blob/master/CONTRIBUTING.md#developer-certification-of-origin-dco

Signed-off-by: tyler-ball<EMAIL_ADDRESS>

I'll have a new foodcritic and fauxhai for you within the next 2 hours

New Test kitchen, Fauxhai, and Foodcritic are up. We'll want to get brief descriptions of what's new since our last release similar to what we did with 3.0

https://github.com/chef/chef-dk/compare/dea7f031fb958fc85b38b2158aa691d99b587787...master#diff-e79a60dc6b85309ae70a6ea8261eaf95L1  should help figure out what gems we need to note. There's a few updated kitchen / knife plugins there that should be noted for sure.

@tas50 How do the release notes look now?

Bundler could not find compatible versions for gem "google-api-client":
  In Gemfile:
    knife-google (>= 3.2.0) was resolved to 3.2.0, which depends on
      google-api-client (~> 0.9.0)

    inspec (>= 2.2.27) was resolved to 2.2.27, which depends on
      train (>= 1.4.15, ~> 1.4) was resolved to 1.4.19, which depends on
        google-api-client (~> 0.19.8)

@tas50 Can we update the google-api-client for knife-google?

@tyler-ball We'll get it on the list of things to do, but it looks to be a pretty involved upgrade that won't happen for this release.

Got green builds across the board!


add len to get dp length

dp = ...
dp = dp.load_from_tar(length=ds_length)  # now __len__ will return self.length
dp = dp.webdataset()  # inherit self.length in the __len__

print(len(dp))  # able to get dp length

Hi @kaiyuyue, please see https://github.com/pytorch/data/issues/1196 as we won't be supporting dataloader2 nor datapipes in torchdata moving forward


ansys.mechanical.core.App() raises SEH Exception

🔍 Before submitting the issue

[X] I have searched among the existing issues
[X] I am using a Python virtual environment

🐞 Description of the bug
Hi all,
I'm trying to start a PyMechanical Embedded application but during the initialisation of the app it crashes and reports an SEH Exception.
Troubleshooting I have tried so far:

Running Ansys Remote instead (which was successfull)
Calling App() with and without a db file specified
Restarting the Kernel, Note: when I don't restart this different errors are produced

There is some reason to believe that this may also be an interaction with the licence server, because the person who managed that did say that around the time I was trying this he also had some issues there. However the timepaths are a bit unclear so it could be a coincidence, or something that was caused by the exception.
Thanks in advance for your help!
Issue was originally posted on te Ansys Dev form but they referred me here https://discuss.ansys.com/discussion/4433/pymechanical-embedded-seh-exception-during-start-application#latest)
I hope this is the right place, please let me know if you have any further feedback or require more info!
📝 Steps to reproduce
Start Python in the Spyder IDE and run the following code:
import logging
import ansys.mechanical.core as mech
from ansys.mechanical.core.embedding.logger import Configuration, Logger
# app = mech.App(version = 241)

from ansys.tools.path import find_mechanical
Configuration.configure(
    level=logging.DEBUG,  # Set the desired logging level
    directory="C:\\Users\\k.XXXXX\\Desktop\\log_files",  # Directory to save the log files
    to_stdout=True  # Output logs to standard output
)
find_mechanical(version = 241)  #This steps is successfull
embedded = mech.App(version = 241, db_file="C:\\Users\\k.XXXXX\\Desktop\\export_mechanical.mechdat")

This outputs the following result:
%runfile C:/Users/k.XXXXX/Desktop/ProTube_Python_Testing_Env2/starting_embedded.py --wdir
2024-09-17 15:14:32.874315 (Thread 0x000018a0) [EmbeddedMechanical, trace] ----- : Checking debug stop
2024-09-17 15:14:32.874315 (Thread 0x000018a0) [EmbeddedMechanical, trace] ----- : Setting environment
2024-09-17 15:14:32.875414 (Thread 0x000018a0) [EmbeddedMechanical, trace] ----- : using aisolPath C:\Program Files\ANSYS Inc\v241\aisol\bin\winx64
2024-09-17 15:14:32.893249 (Thread 0x000018a0) [EmbeddedMechanical, trace] ----- : running wb config
2024-09-17 15:14:32.895278 (Thread 0x000018a0) [EmbeddedMechanical, trace] ----- : running AnsCoInitialize
2024-09-17 15:14:33.005950 (Thread 0x000018a0) [EmbeddedMechanical, trace] ----- : ran AnsCoInitialize, result: 1
2024-09-17 15:14:33.006954 (Thread 0x000018a0) [EmbeddedMechanical, trace] ----- : ran AnsSetRegistryLoadConfiguration, result: 0
2024-09-17 15:14:33.013821 (Thread 0x000018a0) [WORKBENCH, info] --------------- : ************ Workbench 1 - version: 241 build: 20231127 ************
2024-09-17 15:14:33.014902 (Thread 0x000018a0) [WORKBENCH, info] ----- ScopeBegin: CWB::FinalConstruct
2024-09-17 15:14:33.016005 (Thread 0x000018a0) [WORKBENCH, trace] -------------- : ActiveWBMgrObject creation succeeded
2024-09-17 15:14:33.016005 (Thread 0x000018a0) [WORKBENCH, trace] -------------- : WBCommandLine creation succeeded
2024-09-17 15:14:33.016005 (Thread 0x000018a0) [WORKBENCH, trace] -------------- : WBSplashScreen creation succeeded
2024-09-17 15:14:33.022848 (Thread 0x000018a0) [WORKBENCH, info] ----- ScopeEnd  : CWB::FinalConstruct <8 ms>
Traceback (most recent call last):

  File ~\Desktop\XXXX_Python_Testing_Env2\.env\Lib\site-packages\spyder_kernels\customize\utils.py:209 in exec_encapsulate_locals
    exec_fun(compile(code_ast, filename, "exec"), globals)

  File c:\users\k.XXXXX\desktop\XXXX_python_testing_env2\starting_embedded.py:19
    embedded = mech.App(version = 241, db_file="C:\\Users\\k.XXXXX\\Desktop\\export_mechanical.mechdat")

  File ~\Desktop\XXXX_Python_Testing_Env2\.env\Lib\site-packages\ansys\mechanical\core\embedding\app.py:141 in __init__
    self._app = _start_application(configuration, self._version, db_file)

  File ~\Desktop\XXXX_Python_Testing_Env2\.env\Lib\site-packages\ansys\mechanical\core\embedding\app.py:78 in _start_application
    return Ansys.Mechanical.Embedding.Application(db_file, addin_configuration_name)

SEHException:  (0x80004005): Eine externe Komponente hat eine Ausnahme ausgelöst.!

"Eine externe Komponente hat eine Ausnahme ausgelöst.!" translates to: "An external component has raised an Exception.!"
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
Ansys Version 2024R1
Operating System: Windows 11 via remote Desktop (running as a VM on a linux server)
Ansys Version: 2024R1
Licenses Available Via Licence Server
License Types: Floating, and Elastic (I can list the exact names of the licences on request)
Python Version: 3.11
IDE: Spyder 6.0.0 (installed via pip)
🐍 Which Python version are you using?
3.11
📦 Installed packages
aiohappyeyeballs==2.4.0
aiohttp==3.10.5
aiosignal==1.3.1
alabaster==1.0.0
ansys-api-mechanical==0.1.2
ansys-api-platform-instancemanagement==1.1.0
ansys-api-workbench==0.2.0
ansys-mechanical-core==0.11.7
ansys-mechanical-env==0.1.7
ansys-platform-instancemanagement==1.1.2
ansys-pythonnet==3.1.0rc3
ansys-tools-path==0.6.0
ansys-workbench-core==0.6.0
appdirs==1.4.4
arrow==1.3.0
astroid==3.2.4
asttokens==2.4.1
asyncssh==2.17.0
atomicwrites==1.4.1
attrs==24.2.0
autopep8==2.0.4
babel==2.16.0
backports.tarfile==1.2.0
beautifulsoup4==4.12.3
binaryornot==0.4.4
black==24.8.0
bleach==6.1.0
certifi==2024.8.30
cffi==1.17.1
chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
cloudpickle==3.0.0
clr-loader==0.2.6
colorama==0.4.6
comm==0.2.2
contourpy==1.3.0
cookiecutter==2.6.0
cryptography==43.0.1
cycler==0.12.1
debugpy==1.8.5
decorator==5.1.1
defusedxml==0.7.1
Deprecated==1.2.14
diff-match-patch==20230430
dill==0.3.8
docstring-to-markdown==0.15
docutils==0.21.2
executing==2.1.0
fastjsonschema==2.20.0
flake8==7.1.1
fonttools==4.53.1
frozenlist==1.4.1
grpcio==1.66.1
idna==3.10
imagesize==1.4.1
importlib_metadata==8.5.0
inflection==0.5.1
intervaltree==3.1.0
ipykernel==6.29.5
ipython==8.27.0
isort==5.13.2
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.0.2
jedi==0.19.1
jellyfish==1.1.0
Jinja2==3.1.4
jsonschema==4.23.0
jsonschema-specifications==2023.12.1
jupyter_client==8.6.2
jupyter_core==5.7.2
jupyterlab_pygments==0.3.0
keyring==25.3.0
kiwisolver==1.4.7
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.9.2
matplotlib-inline==0.1.7
mccabe==0.7.0
mdurl==0.1.2
mistune==3.0.2
more-itertools==10.5.0
multidict==6.1.0
mypy-extensions==1.0.0
nbclient==0.10.0
nbconvert==7.16.4
nbformat==5.10.4
nest-asyncio==1.6.0
numpy==2.1.1
numpydoc==1.8.0
packaging==24.1
pandas==2.2.2
pandocfilters==1.5.1
parso==0.8.4
pathspec==0.12.1
pexpect==4.9.0
pickleshare==0.7.5
pillow==10.4.0
platformdirs==4.3.3
pluggy==1.5.0
prompt_toolkit==3.0.47
protobuf==5.28.1
psutil==6.0.0
ptyprocess==0.7.0
pure_eval==0.2.3
pycodestyle==2.12.1
pycparser==2.22
pydocstyle==6.3.0
pyflakes==3.2.0
PyGithub==2.4.0
Pygments==2.18.0
PyJWT==2.9.0
pylint==3.2.7
pylint-venv==3.0.3
pyls-spyder==0.4.0
PyNaCl==1.5.0
pyparsing==3.1.4
PyQt5==5.15.11
PyQt5-Qt5==5.15.2
PyQt5_sip==12.15.0
PyQtWebEngine==5.15.7
PyQtWebEngine-Qt5==5.15.2
python-dateutil==2.9.0.post0
python-lsp-black==2.0.0
python-lsp-jsonrpc==1.1.2
python-lsp-server==1.12.0
python-slugify==8.0.4
pytoolconfig==1.3.1
pytz==2024.2
pyuca==1.2
pywin32==306
pywin32-ctypes==0.2.3
PyYAML==6.0.2
pyzmq==26.2.0
QDarkStyle==3.2.3
qstylizer==0.2.3
QtAwesome==1.3.1
qtconsole==5.6.0
QtPy==2.4.1
referencing==0.35.1
requests==2.32.3
rich==13.8.1
rope==1.13.0
rpds-py==0.20.0
Rtree==1.3.0
six==1.16.0
snowballstemmer==2.2.0
sortedcontainers==2.4.0
soupsieve==2.6
Sphinx==8.0.2
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
spyder==6.0.0
spyder-kernels==3.0.0
stack-data==0.6.3
superqt==0.6.7
tabulate==0.9.0
text-unidecode==1.3
textdistance==4.6.3
three-merge==0.1.1
tinycss2==1.3.0
tomli==2.0.1
tomlkit==0.13.2
tornado==6.4.1
tqdm==4.66.5
traitlets==5.14.3
types-python-dateutil==<IP_ADDRESS>40906
typing_extensions==4.12.2
tzdata==2024.1
ujson==5.10.0
urllib3==2.2.3
watchdog==5.0.2
wcwidth==0.2.13
webencodings==0.5.1
whatthepatch==1.0.6
WMI==1.5.1
wrapt==1.16.0
yapf==0.40.2
yarl==1.11.1
zipp==3.20.2

@62Scorch Thanks for opening this issue.  Could you please try this in a virtual environment where only ansys-mechanical-core is installed and see? If possible, please attach the log also.

@dipinknair Thanks for your response. I will test this as soon as possible, but I don't have access to the licence right now. So it will probably be towards the end of this week.

I ran the file with the following environment, running python through command prompt
(embedded_test) C:\>pip freeze
ansys-api-mechanical==0.1.2
ansys-api-platform-instancemanagement==1.1.0
ansys-mechanical-core==0.11.7
ansys-mechanical-env==0.1.7
ansys-platform-instancemanagement==1.1.2
ansys-pythonnet==3.1.0rc3
ansys-tools-path==0.6.0
appdirs==1.4.4
cffi==1.17.1
click==8.1.7
clr-loader==0.2.6
colorama==0.4.6
grpcio==1.66.2
importlib_metadata==8.5.0
platformdirs==4.3.6
protobuf==5.28.2
pycparser==2.22
tqdm==4.66.5
zipp==3.20.2

(These were all the libraries that were added after running pip install ansys-mechanical-core in the base environment)
Which gave the following result (the same as in the other environment)
C:\>C:\Users\k.XXXXX\Desktop\embedded_test\Scripts\activate.bat

(embedded_test) C:\>python
Python 3.11.9 (tags/v3.11.9:de54cf5, Apr  2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import logging
>>> import ansys.mechanical.core as mech
>>> from ansys.mechanical.core.embedding.logger import Configuration, Logger
>>> # app = mech.App(version = 241)
>>>
>>> from ansys.tools.path import find_mechanical
>>> Configuration.configure(
...     level=logging.DEBUG,  # Set the desired logging level
...     directory="C:\\Users\\k.XXXXX\\Desktop\\log_files",  # Directory to save the log files
...     to_stdout=True  # Output logs to standard output
... )
>>> find_mechanical(version = 241)
('C:\\Program Files\\ANSYS Inc\\v241\\aisol\\bin\\winx64\\AnsysWBU.exe', 24.1)
>>> embedded = mech.App(version = 241)
2024-10-03 09:20:17.810580 (Thread 0x00002a10) [EmbeddedMechanical, trace] ----- : Checking debug stop
2024-10-03 09:20:17.811610 (Thread 0x00002a10) [EmbeddedMechanical, trace] ----- : Setting environment
2024-10-03 09:20:17.812705 (Thread 0x00002a10) [EmbeddedMechanical, trace] ----- : using aisolPath C:\Program Files\ANSYS Inc\v241\aisol\bin\winx64
2024-10-03 09:20:17.831446 (Thread 0x00002a10) [EmbeddedMechanical, trace] ----- : running wb config
2024-10-03 09:20:17.855786 (Thread 0x00002a10) [EmbeddedMechanical, trace] ----- : running AnsCoInitialize
2024-10-03 09:20:17.965435 (Thread 0x00002a10) [EmbeddedMechanical, trace] ----- : ran AnsCoInitialize, result: 1
2024-10-03 09:20:17.966505 (Thread 0x00002a10) [EmbeddedMechanical, trace] ----- : ran AnsSetRegistryLoadConfiguration, result: 0
2024-10-03 09:20:17.974390 (Thread 0x00002a10) [WORKBENCH, info] --------------- : ************ Workbench 1 - version: 241 build: 20231127 ************
2024-10-03 09:20:17.975479 (Thread 0x00002a10) [WORKBENCH, info] ----- ScopeBegin: CWB::FinalConstruct
2024-10-03 09:20:17.977022 (Thread 0x00002a10) [WORKBENCH, trace] -------------- : ActiveWBMgrObject creation succeeded
2024-10-03 09:20:17.977022 (Thread 0x00002a10) [WORKBENCH, trace] -------------- : WBCommandLine creation succeeded
2024-10-03 09:20:17.977022 (Thread 0x00002a10) [WORKBENCH, trace] -------------- : WBSplashScreen creation succeeded
2024-10-03 09:20:17.980158 (Thread 0x00002a10) [WORKBENCH, info] ----- ScopeEnd  : CWB::FinalConstruct <4 ms>
CRITICAL -  -  logging - handle_exception - Uncaught exception
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\k.XXXXX\Desktop\embedded_test\Lib\site-packages\ansys\mechanical\core\embedding\app.py", line 141, in __init__
    self._app = _start_application(configuration, self._version, db_file)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\k.XXXXX\Desktop\embedded_test\Lib\site-packages\ansys\mechanical\core\embedding\app.py", line 78, in _start_application
    return Ansys.Mechanical.Embedding.Application(db_file, addin_configuration_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
System.Runtime.InteropServices.SEHException:  (0x80004005): Eine externe Komponente hat eine Ausnahme ausgelöst.

The logfile contents are the same as the printed info in the kernel above

@62Scorch  Thanks for checking this. I tested with VM and could not reproduce this issue. Could you please try without spyder?
you don't need access to license for checking the creation of app if you are not loading any mechdat/mechdb. You can try without loading db.

@dipinknair The last run I sent you was without the mechdat/mechdb, and without spyder (I simply ran it from the command prompt)
Is there maybe some relevant information about my specific set-up that is required to recreate the issue?
Are there any things you could think of that could be relevant information?

@62Scorch please try running the following and let me know what happens:
import os
import ansys.mechanical.core as mech
from ansys.mechanical.core.embedding.utils import load_library_windows
from ansys.mechanical.core.embedding.initializer import initialize
version = 241
initialize(version)
libname = "AnsXML.dll"
lib = os.path.join(os.environ[f"AWP_ROOT{version}"], "aisol", "bin", "winx64", libname)
load_library_windows(lib)

Is there any updates on this? I am running into the same issue. I recently had a clean windows install on my machine. Since this I am receiving the same errors when I try to run a pymechanical script. I tried running the commands in the comment above but this did not resolve the issue.
`>>> app = mech.App(version = 242)
CRITICAL -  -  logging - handle_exception - Uncaught exception
Traceback (most recent call last):
File "", line 1, in
File "c:\Users\tduvall\Desktop\envs\python311\mech_only\Lib\site-packages\ansys\mechanical\core\embedding\app.py", line 149, in init
self._app = _start_application(configuration, self._version, db_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\tduvall\Desktop\envs\python311\mech_only\Lib\site-packages\ansys\mechanical\core\embedding\app.py", line 85, in _start_application
if int(version) >= 241:
^^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

app = mech.App(version = "242")
CRITICAL -  -  logging - handle_exception - Uncaught exception
Traceback (most recent call last):
File "", line 1, in
File "c:\Users\tduvall\Desktop\envs\python311\mech_only\Lib\site-packages\ansys\mechanical\core\embedding\app.py", line 140, in init
self._version = initializer.initialize(version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\tduvall\Desktop\envs\python311\mech_only\Lib\site-packages\ansys\mechanical\core\embedding\initializer.py", line 171, in initialize
raise ValueError(
ValueError: Initialized version 242 does not match the expected version 242.
app = mech.App()
CRITICAL -  -  logging - handle_exception - Uncaught exception
Traceback (most recent call last):
File "", line 1, in
File "c:\Users\tduvall\Desktop\envs\python311\mech_only\Lib\site-packages\ansys\mechanical\core\embedding\app.py", line 140, in init
self._version = initializer.initialize(version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\tduvall\Desktop\envs\python311\mech_only\Lib\site-packages\ansys\mechanical\core\embedding\initializer.py", line 171, in initialize
raise ValueError(
ValueError: Initialized version 242 does not match the expected version None.`

@tymanSTG that looks like a different issue than the reported one.  @dipinknair could you please support?

@tymanSTG for the recent issue you are facing, please use int type argument when staring app.
- app = mech.App(version = "242")
+ app = mech.App(version = 242)

In addition to this please update to latest pymechanical using pip install ansys-mechanical-core --upgrade
To check if path to installed version is reachable, can you try this as well from your virtual env and reply here?
find-mechanical -r 242

@dipinknair There's an opportunity to improve our code here. Let's make a change so that we either convert the string to an int or error immediately if the type isn't an int


GitGuilt default configuration incorrectly (?) sets requires_files: true

The default configuration in default.yml sets requires_files: true for GitGuilt, without any corresponding include files. I couldn't get this running initially until I set requires_files: false. I know that you could just specify include files in your .overcommit.yml file, but I just want this run on everything, which I assume would be a good default.
If I've interpreted this behavior correctly, I'm happy to submit a pull request.

If include is not specified, the default is to check all modified files in the last commit. See https://github.com/brigade/overcommit/blob/v0.31.0/lib/overcommit/hook/base.rb#L156-L162 and https://github.com/brigade/overcommit/blob/v0.31.0/lib/overcommit/hook_context/post_commit.rb#L8-L11
I don't use the GitGuilt hook, so perhaps there's something I'm missing here with what you're describing. What you're describing sounds like a bug, unless you creating an empty commit.

I recently successfully set up using GitGuilt with the following configuration
PostCommit:
  GitGuilt:
    enabled: true

Hmm. I am getting inconsistent results with different repositories. I'll have to investigate further.

I'm going to close this given the lack of information here needed to reproduce.
Once you've got a working example, feel free to reopen!


fix(v2): do not create route for document that serve as docs home page

Motivation
Resolve #2830.
When we set the docs home page, we have two duplicate pages, for example, in the case of https://v2.docusaurus.io/:

https://v2.docusaurus.io/docs/
https://v2.docusaurus.io/docs/introduction

These two pages contain the same content (document of "introduction"), this is not good for SEO. I missed this important thing and therefore did not define the canonical URL for the /docs URL. However, after discussing with one our user, we decided it was best not to create a separate route for document at all, which serves as docs home page.
Yes, this is a BC, but I guess  we can recommend in release notes that our user add a redirect using our official plugin to inform search engines about this change.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Snapshots and preview.
On preview https://deploy-preview-2861--docusaurus-2.netlify.app/docs/introduction URL will not work.
Related PRs
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

cc @yangshun


upgrade eslint version and fix all current warnings/errors

Whew. Nice one!

This took nearly 4 hours. It was so tedious!

For the most part I find stuff like this is largely a unnecessary. Does it stop bad releases? Not really. Does it add noise & stumbling blocks to PRs? Yeah.

I agree, but now that it's done — don't you think it's a net positive to have?

Naw, the PR hurdles alone make it a negative for me. I see this as a crutch to brace maintainer activity.

Maybe it doesn't directly stop bad releases but I disagree that's it's unnecessary. Consistency of style and use of tools to prevent trivial bugs is one of the first things I use to gauge the health of a project and, consequently, my willingness and desire to contribute to it.
That said, I don't care if we run it on pulls or block them because it fails, if that's what you mean. Accepting good pulls with different style and not cleaning up afterwards are two different things.

Agh, it's always my code that has sneaky 4 spaces. :frowning:
Why do we align colons, but not equals?
-    nativeBind         = FuncProto.bind,
-    nativeCreate       = Object.create;
+    nativeIsArray = Array.isArray,
+    nativeKeys = Object.keys,

-        value: value,
-        index: index,
+        value   : value,
+        index   : index,
         criteria: iteratee(value, index, list)

@jridgewell There were many more : alignments already in the codebase than = alignments. I just tried to make the rules enforce current convention.

We shouldn't be aligning those colons. Colons should be visually attached to the label on the left.

@jashkenas done: https://github.com/jashkenas/underscore/pull/2196


Time will show

Solves issue #56
All references to the calendar are using time:Instant with a selection of properties from the w3c time ontology.
Best to merge this after #57, overlap might occur.

@kimviljanen TRS is the calendar system, i.e the Gregorian calendar that has been used in Rome since 1582, the most used today, but in other parts of the world, the change took a long time. Before that, the Julian calendar was in more common use, created 46 before Christ.
Publication day. This is a good one. We can say that a programme was published on 21-04-1968. Even if this is formally just a point in time with the part of the full description omitted, we often attribute an event to a day, and at the same time implicit think of a day as an interval with a 24H duration.
Some broadcasters even operate with publication days that go from six in the morning to six the next morning attributing this to the date at noon.


Feature-refactor-the-code

Description:

This pull request aims to refactor our existing codebase to align with the project requirements and best practices in Ruby programming. The team has worked diligently to ensure that the code is clean, efficient, and adheres to principles like YAGNI, KISS, DRY, and SOLID.

Changes:

[x] Linter Errors: Our team has run multiple linter checks to ensure that the code is free of errors and follows the Ruby style guide.
[x] Gitflow: We have adhered to the correct Gitflow practices, creating feature branches for new functionalities and ensuring that this feature branch (feature/refactoring-the-code) is up to date with develop.
[x] Documentation: Comments and README have been updated to reflect the changes and provide a professional level of documentation.
[x] YAGNI, KISS, DRY Rules: The code has been refactored to be as simple as possible, avoiding unnecessary complexity and repetition.
[x] SOLID Principles: Special attention has been paid to the Single-responsibility Principle. The code has been organized to ensure that each class and method has a single responsibility.
[x] Role of main.rb: The main.rb file now only serves to initiate the application and delegate user interaction to a new class, AppInterface.
[x] Logic Extraction: Logic related to user interaction has been extracted into a separate class (AppInterface) to clean up the main.rb and App classes.

@skyv26 Could you call me on zoom?


Add CodeQL workflow for GitHub code scanning?

Which will help reviewing.
demo: https://github.com/real-logic/agrona/pull/268
https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/

I don't think codeql supports Scala. Might be worth testing on a separate Github fork before we turn it on for Pekko.

Close for now, will reopen one day.

Snyk is a similar solution and supports Scala: https://docs.snyk.io/products/snyk-open-source/language-and-package-manager-support/snyk-for-scala