Fit the zoom to map size on minimap

We load a map of a building using leaflet. However when we use minimap it is hard to calculate the zoom level. Default viewport has large white space around the map view port, which is entirely covered by aimingRect.  i.e around aimingRect there is large whitespace.
We use  deepzoom layer as tileLayer to be added to MiniMap.

Any idea how to calculate the zoom level, so that default view port fills up control without large white space
is there away to set scrollWheelZoom to false, so that we can disable zooming.

Hi, sorry about being so late to answer.  I have no experience with deepzoom layer, but I guess it's probably related to CRSes being different, like with https://github.com/Norkart/Leaflet-MiniMap/issues/132 .
Like it says in the readme, there is an option to set zoomLevelFixed to whatever zoom you want, which will disable zooming.


[Site]: Document passthrough props behavior

Description
Add note about undocumented props underneath the props table
Motivation and context
This is important information that consumers will want/need to know.
closes #209
Screenshots or videos, if appropriate

How to test
Try it out in the demo
Types of changes

Other (provide details below)

Minor update to site
Checklist

[x] Renders and functions properly in all supported browsers
[x] Automated tests written and passing - [n/a]
[x] Accessibility and inclusivity considered
[x] Rendering performance (initial load time & 60fps) and perceived performance considered
[x] Documentation created or updated - [n/a]

Doh, I just noticed that I need to hide the prop docs from package docs that are not components, e.g. component-utils.  Will update...


Update deps

Updated Mix.exs

Thanks @ACPK!

@manukall  Sorry and looking into it along with an error I found. Any clue what's causing the issue below as the site gets an error when the app tries to send a confirmation email.
00:51:00.774 [error] GenServer Hound.SessionServer terminating
** (exit) an exception was raised:
    ** (MatchError) no match of right hand side value: {:error, %HTTPoison.Error{id: nil, reason: :econnrefused}}
        (hound) lib/hound/request_utils.ex:40: Hound.RequestUtils.send_req/4
        (hound) lib/hound/session_server.ex:22: Hound.SessionServer.handle_call/3
        (stdlib) gen_server.erl:607: :gen_server.try_handle_call/4
        (stdlib) gen_server.erl:639: :gen_server.handle_msg/5
        (stdlib) proc_lib.erl:237: :proc_lib.init_p_do_apply/3

this looks like hound can't connect to selenium of phantomjs. are they running?

@manukall  - Yes but why would Hound break the site when a user signs up?

i really don't know. usually hound shouldn't even be available in the dev environment. in the example app i added it as  {:hound, ">= 0.6.0", only: :test} in mix.exs, so it's only available in the test environment.

@manukall We do too. The issue happens with my updated fork (this PR).


use chardet to detect encoding

use chardet to detect encoding, and also make Confidence::Tentative contain an f32, which is the probability of the encoding

@cnsky1103 Nice addition!  Could you rebase this PR as this will fix the clippy issues

@cnsky1103 First PR is always the hardest, but we're almost there. You are signing your commits now, so that's perfect. The problem is that there is still an unsigned commit in the code. We can fix that by rewriting a little bit of history on your side:
  git rebase --exec "git commit --amend --no-edit -n -S" -i f5458c7

This will sign all commits from f5458c7 onwards and will take care of your unsigned commit.
However, this changes the history of your PR. That's ok, but it means that when you push it to github, you must use the following:
 git push origin -f

The -f tells that you want to overwrite the current PR that is on github.
I think if you do that, the PR will be ok.  Thanks for you patience!


Experiment with #153 and classes for code blocks

There are some updates in the other PR that didn't make it here, but in that PR I kept to the style that was already established as to not rock the boat. This version me trying to figure out how to use classes in this context. It mostly works, but I'm not sure I'm a huge fan of how it came out.
Would love thoughts.

I think this is the basic style and scope we talked about, yes. We might want to use a different method rather than overloading __str__ but maybe that is the perfect one to use.
Basic idea is just as you show here: each question type has its own class and a way to create a block that goes into the generated YAML. They may share some features of how that block is created, which is where a MainOrder class could inherit from a CodeBlock class.

Some good exploration here. For now we are experimenting with using Mako blocks instead of subclassing, so I'm going to close this for now.


Test Nx cache when only docs are changed

@TkDodo in this PR, only test:format, test:sherif and test:knip missed cache when a doc was changed. It might be because nx affected was comparing to an earlier main commit in #6943 ?


Jupyterlab Notebook Template

Submit Checklist (REMOVE THIS SECTION BEFORE SUBMITTING)

[X] I have selected the next branch as the destination for my PR, not main.
[X] I have listed all changes in the Changes section.
[X] I have filled out the Issues section with the issue/discussion link(s) (if applicable).
[X] I have tested my changes.
[X] I have considered backwards compatibility.

Changes
Add Jupyterlab Template

I tested the template and could not access it on the domain. Can you please add a health check and fix the template if necessary.

I tested the template and could not access it on the domain. Can you please add a health check and fix the template if necessary.

perhaps it took a while ? because it needs to install the additional conda and pip package on startup, you can see the progress on log

I have tested this service and it seems to work properly. Thanks for your PR 💜.


findAsync Cursor return should include _id

Describe the bug
db.findAsyc and db.findOneAsync Cursor return type does not include _id
Expected behavior
If you're fetching a record or a list of records, that list of records should probably include the _id in its types
return types of insert or update include them.

I changed the type of Cursor so that it extends Promise<Document<T>> like its method execAsync instead of Promise<T>, as Cursor is a sort of "thenable" as it reimplements manually then, catch and finally simply by making a call to execAsync followed by then, catch or finally.


[Q] How does the creation of a veth pair for docker work

Hi,
thank your very much for this great script. I'm working on something quite similar but only focused on docker and openvswitch. For this scenario I need to create a variable number of veth pairs for a container.
Would you be so kind to explain how the script gathers the relevant data from a docker container to create the veth pair. From what I understand it's basically these 3 lines that create the pair:
LOCAL_IFNAME=pl$NSPID$CONTAINER_IFNAME
GUEST_IFNAME=pg$NSPID$CONTAINER_IFNAME
ip link add name $LOCAL_IFNAME type veth peer name $GUEST_IFNAME
I would be really thankful!
[edit]:
On a related matter: do you know whether it is possible to add a veth link directly between two container?

I have a question, what is the symbolic link effect in creating the veth pair？

ln -s /proc/$NSPID/ns/net /var/run/netns/$NSPID

The symlink is there, because when you use ip with the netns options, when you refer to a network namespace named foo, it will look for a file in /var/run/netns/foo which should point to the net pseudo-file in the namespace directory.


[new vmdk api adoption] daisy support new vmdk alpha API

This is split from the https://github.com/GoogleCloudPlatform/compute-image-tools/pull/1282/files?file-filters[]=.go
Since daisy is in a separate module, we need to split daisy-changes into a separate PR.

I thought PD team already rolled native VMDK to Beta. Do we have any benefit of doing Alpha first?

Not yet. As discussed offline, they need a couple of weeks to roll out it to beta. Right now we only have alpha, so we can get early test data.


Arc min not respected if over 100

You want to have an arc with "min":120,"max":350 but you notice that in reality the arc goes from 0 to 350 instead.
To reproduce:

"min":10,"max":20 - OK
"min":80,"max":350 - OK
"min":120,"max":200 - Not OK, it will go from 0 to 350.

It looks like min doesn't like values above 100.

passing the max value before the min value will make the arc set and return the correct values.
"max":200,"min":120

Is this on purpose? documented somewhere?

I believe this is resolved, can you confirm it works as expected now?

Still testing

It's OK now, thanks.


Set stream for nested file signals

Extracted from #441.

This is a big fix that's needed to read files from wds regardless of the other changes in this PR. Right now, reading the wds files fails like this:
>>> from datachain import C, DataChain
>>> from datachain.lib.webdataset import process_webdataset
>>> from datachain.lib.webdataset_laion import WDSLaion
>>> chain = DataChain.from_storage("gs://datachain-demo/datacomp-small/shards/00000000.tar", settings={"cache": True}).gen(laion=process_webdataset(spec=WDSLaion))
Processed: 1 rows [00:00, 1260.69 rows/s]
Generated: 2 rows [00:00, 2844.56 rows/s]
Cleanup: 1 tables [00:00, 5745.62 tables/s]
>>> row = next(chain.collect())
Processed: 1 rows [00:02,  2.66s/ rows]
Generated: 8953 rows [00:01, 8534.75 rows/s]
Cleanup: 1 tables [00:00, 39.20 tables/s]
>>> row[0].file.read()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/dave/Code/datachain/src/datachain/lib/file.py", line 213, in read
    with self.open() as stream:
  File "/Users/dave/micromamba/envs/datachain-py311/lib/python3.11/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/Users/dave/Code/datachain/src/datachain/lib/file.py", line 198, in open
    with VFileRegistry.resolve(self, self.location) as f:  # type: ignore[arg-type]
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dave/Code/datachain/src/datachain/lib/file.py", line 113, in resolve
    return reader.open(file, location)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/dave/Code/datachain/src/datachain/lib/file.py", line 89, in open
    client = file._catalog.get_client(tar_file_uid.storage)
             ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get_client'

Originally posted by @dberenbaum in https://github.com/iterative/datachain/pull/441#discussion_r1758993748


Unclear whether adapter-vercel has any benefits over adapter-auto

Describe the bug
This is not a bug really, more like a small inconsistency that is a little confusing.
When you deploy on Vercel using adapter-auto, something (assuming adapter-vercel) prints the following line during build:

If you plan on staying on this deployment platform, consider replacing @sveltejs/adapter-auto with @sveltejs/adapter-vercel. This will give you faster and more robust installs, and more control over deployment configuration.

Prompted by this, I went to check out adapter-vercel, but the first and only thing written in the readme is:

If you're using adapter-auto, you don't need to install this unless you need to specify Vercel-specific options, since it's already included.

So, the build log reads like there's some benefit to explicitly using adapter-vercel beyond extra configuration, but the adapter's README makes it sound like it won't make a difference at all. Wondering which one is true.
Reproduction

Publish any sveltekit app using adapter-auto on Vercel, and observe the build log including the quoted line.
Observe adapter-vercel's README including a seemingly contradictory statement.

Logs
No response
System Info
N/A

Severity
annoyance
Additional Information
No response

The prompt is more correct. If you plan to stay on a specific platform, install the adapter for that specific platform.

Alright, thanks for the confirmation! Doing that, then :)


Merge remote-tracking branch 'upstream/stable' into merge_stable

Let's just reopen the marked bugs, we'll later regenerate the changelog anyhow.


Create documentation for setting up LoRa module with Chirpstack

As far as I know there is no documentation on how to get the DevEUI or the DevAddr that is required the module with chirpstack.

I'm going to close this issue as it should be done in conjunction with #26


SearchBoxMatchAll triggers undo

Steps:

Open a buffer, do some modifications
:SearchBoxMatchAll, input a query then press <CR>

Result:
An undo has been made on the buffer.

The issue also appears with SearchBoxSImple, but not with SearchBoxReplace.

Can't reproduce the bug.

Can reproduce with nui.nvim only, I'll transfer the bug there.


How to add a + and - for zoom-in and zoom-out?

Hi @pjisha,
You can implement + and - zoom buttons using any two buttons and then setting zoom state like this:
import {
  ComposableMap,
  ZoomableGroup,
  Geographies,
} from "react-simple-maps"

class Map extends Component {
  state = {
    zoom: 1,
  }
  zoomIn = () => {
    this.setState({
      zoom: this.state.zoom * 2,
    })
  }
  zoomOut = () => {
    this.setState({
      zoom: this.state.zoom / 2,
    })
  }
  render() {
    return (
      <div>

        <button onClick={this.zoomOut}>
          { "-" }
        </button>

        <button onClick={this.zoomIn}>
          { "+" }
        </button>

        <ComposableMap>
          <ZoomableGroup zoom={this.state.zoom}>
            <Geographies>
              ...
            </Geographies>
          </ZoomableGroup>
        </ComposableMap>
      </div>
    )
  }
}

In this case I am using a factor of 2 when zooming in and out. You can also add limits (max and min zoom) inside zoomIn and zoomOut.
zoomIn = () => {
  // Exit zoomIn if the zoom has reached the max zoom of 8.
  if (this.state.zoom >= 8) return
  this.setState({ zoom: this.state.zoom * 2 })
}

Hope this answers your question.

Perfect @zimrick


variables in nested fields and queries don't work

This works fine:
{ foo { bar(value:"baz") } }

But the following equivalent query with provided variables {value:"baz"} bombs out:
query nestedQuery($value:String!){
  foo {
    bar(value:$value)
}

Error message is somewhat opaque: "Value not set to variable else"
I've provided a regression test here: https://github.com/roippi/GraphQL/commit/54f310bde9ec0e622e78a6000b7f3b95728eb466
The fix is non-trivial so I don't know if/when I'll have a pull request available.  I've traced through it and it looks like $this->resolveValidator->validateArguments is only getting invoked at the operation level, not at the individual field level.
Thanks for the awesome library.

Thanks for your input, I'll look into it tomorrow as well.

Hi, @roippi I got it fixed and published new version v<IP_ADDRESS>. Please, check if it works for you when you have time, thanks!

Hi @viniychuk thanks for the quick response!
Looks like your patch fixed some of the issues I was seeing (and made my test pass)
Unfortunately there's a different issue with nested Queries that have resolveFuncs attached to them.  I've submitted a pull request with a regression test and a fix, hope it helps.

Thanks @roippi, I appreciate your help 👍 . Your fix is good but I'll need to make some other small changes. I'd ask you next time please create a separate pull request for the non-working test specifically, and a pull request for the fix after that. In that way I will be able to get your test without merging a fix in case fix could be written a bit different.
Again, thanks for spending time making this better!

You got it. Thanks.


updated code to enable row filtering.

Not to be merged yet!

@roboton Now added documentation to functions and to the README.

@cjangrist Any other documentation that would've helped you put out the fire?


Discovery lens not working with pytest >= 3.7

When discovering test with pytest>=3.7 if the test directory is a package the reported files do not include their path if they are in a subfolder.
With a file structure like
- tests
|- __init__.py
|- bar_test.py
|- subfolder
   |- foo_test.py

The reported output of pytest is
<Package 'C:\\path\\to\\pytest-discovery-bug\\tests_package'>
  <Module 'bar_test.py'>
    ...
  <Module 'foo_test.py'>
    ...

There is no indication that foo_test.py is inside the folder subfolder, so the extension fails to show the lens on the file subfolder/foo_test.py
I've created a minimal example: https://github.com/CaselIT/pytest-discovery-bug
I've reported the bug also on the pytest repo https://github.com/pytest-dev/pytest/issues/4024, since it seems to be an issue of pytest.
I'm opening this to check if there is a work around to this issue in the meantime
Environment data

VS Code version: 1.27.2
Extension version (available under the Extensions sidebar): 2018.8.0
OS and version: windows 10
Python version (& distribution if applicable, e.g. Anaconda): 3.6.6

Unfortunately there isn't a work-around short of you adding a __init__.py into your subfolder directory so pytest will then surface the appropriate information that we need to be able to reference foo_test.py.

thanks

note that you shouldn't just parse text output of pytest - you should invoke it with a plugin instead that correctly collects the internal details

@RonnyPfannschmidt yep, we know. 😄 Plan to address it when we clean-up our testing scenarios.


Please update Audience Network SDK to latest version

Hi @Redth
Any updates on this. I just received an email from Facebook stating

We've detected that one or more of your apps are using older versions of the Audience Network SDK.

Many thanks 🙏

@SotoiGhost can you please work on updating these?

For Android we can update to 5.3.0 and iOS it looks like 5.3.1.

Not to nag, but Facebook just sent me another email. Hopefully it can be updated soon 😊

Hi @Redth @SotoiGhost
Is there anything I can do to assist with updating? Thanks.

@AntRemo Facebook Audience Network for iOS v5.3.2 and v5.4.0 for Android are live now on NuGet.


select postLink overwriting ngModel.$render handler

@Narretz we just upgraded from 1.5rc0 to 1.5.0 and ran into this issue.
We have a directive that implements ngModel on the select directive. Our directive overrides ngModel.$render to refresh a select box replacement, select2.
This change f7eab8d8fe8cadecaee425f0db0c74e48619310c means that anyone wanting to implement the ngModel controller on a select field can't use $render because the selectpostlink would blow away their handler.
Here is a jsfiddle showing what I mean. Compare between 1.5.0 and 1.5-rc0
1.5.0: https://jsfiddle.net/hejxa6wu/
1.5-rc0: https://jsfiddle.net/6rhvfp3o/

That's what priority is for: give your directive priority: 1 and it will run after the selectDirective has overwritten the $render fn.

Ah yes of course, I tried everything but that. Thank you.


Tile Caching to Include an Expires header instead of Last Modified Date

I've modified the caching process include an Expires header at the top of each cached tile. This replaces, for the most part, the file.lastModifiedDate() check.
The idea is that if an Expires header is received by the MapTileDownloader, the date is added as a header to the tile file. If there was no Expires header, then the OpenStreetMapTileProviderConstants.DEFAULT_MAXIMUM_CACHED_FILE_AGE is used instead.
If there are existing files with no Expires headers, then the original file.lastModifiedDate() condition is used to determine whether the file has expired or not.
I'm not sure if this would be something that could be included in the project as I think simply setting your own maximum cached file age is enough generally. However it may be useful if you'd like server to determine how long files should be cached.
P.S. I added code to the StreamUtils class which comes directly from the DiskBasedCache class from the Android Volley framework. I'm not 100% sure where to include a reference to the framework project?

see comments i left on the commits. i think it's a great idea and appreciate the contribution. Make sure the entire project builds.

I've pulled out all the strings into the constants class and have restored the ITileSource interface.
As a work-around, I added methods to the MapTile class to read and write header data to streams. An additional method, skipOverHeaders, skips over all stream headers to position the stream at the start of the bitmap data which effectively restores the original functionality of both the getDrawable() methods in BitmapTileSourceBase.

I just had a quick look at this, but if I understand it correctly you're writing a string with the expiry time at the beginning of the tile files that are written to disk.  Doesn't that mean that it's not a valid image file any more?
I can see a few alternative possibilities:

Write to the end of the file. Maybe that keeps the file valid.
Write a proper header to the image file, assuming that's possible. But that would require it to be decoded when downloading which is too big of an overhead.
Write the expiry time somewhere else, eg an extra file next to the image file.

I appreciate the contribution :+1:

Your understanding is correct, and yes, the tiles would no longer be valid images. I think having an extra file might be the most practical solution as it could probably more easily extended should there ever be a need for additional information linked to a tile in the disk cache.

Off the top of my head, a file with the same name as the tile but with a json extension and json content.
In order to avoid looking for this file when you know it's not there, add a property to tile module/source to say whether it's expected.

Sounds good. Would it be quicker to write data directly to the file instead of reading/writing json content? We can bypass the need for extra processing to map data to json, and vice versa, and instead control the order in which information is written, and then simply read the information back in the same order.

I don't know. When all you have is a hammer everything looks like a nail! I think json processing is pretty efficient these days. It only needs to be processed when it's read, not when it's written. Compared to processing a bitmap it shouldn't be much.

On the other hand, if we add json processing, it'll most likely add another dependency. I'm already at the dex limit and always appreciate anything that keep the method counts low

Instead of JSON, we could have a simple properties file with one property per line? Its easy and fast enough to process

i'm down with a properties file. no extra dependencies and easy to read

I've pulled out the code which wrote header data to the tile itself, and replaced with a properties file with same name as each tile. Only MapFilesystemProvider and TileWriter make use of the methods at the moment.
The two new methods in MapTile, writeProperties() and readProperties() take a stream as a parameter so that we don't limit their usefulness if other providers needed to make use of them.
The properties themselves are stored as key/value pairs, with a single pair to a line in the file.

Sorry to be a bother on this one, but doesn't java.utils.Properties have a load method? https://docs.oracle.com/javase/7/docs/api/java/util/Properties.html#load(java.io.InputStream). That would reduce your code footprint a lot.

Haha yes a load and a store method! Thank you, I didn't even think about that

Alright, I've implemented the same thing using java.utils.Properties, much less code and the logic is simpler too.

Link to issue #213 as an alternative

I'm going to go ahead and close this PR, pending the merge of the sqlite based solution #213. I appreciate your hard work that went into it. If it's any consolidation, most of your code was moved over to the sqlite based solution.


document to use e.enif_send usage from callbacks outside of the beam environment

What kind of documentation were you thinking about? I have some working code that does this in TigerBeetlex so I'm happy to contribute with some examples here

I just need to make it clear how you're supposed to use e.enif_send instead of beam.send when you don't have access to env, I think.  I am refactoring how env works in zigler for 0.12

closed, since beam.send now automatically selects based on env.


fix: raise Validation error when validation fails and use MrackError

This is bit cosmetic change, adding MrackError class which is parent of all errors so later we just catch the MrackError exceptions.

I have run 2 regression runs in our CI should be okay to merge, thanks @dav-pascual for looking into the code.


dependsOnMethods not working when dependency is on scenarios with dataProviders

QAF Version

Latest

Steps To Reproduce
1. Create a scenario(ONE) with csv data provider so that its scenario name gets appended with the first column name in the csv data provider.
2. In another scenario(TWO), use this scenario name as a data provider.
3. Run the scenario.

Expected behavior
ONE should run followed by TWO
Actual behavior
No tests run
Is the issue reproducible on runner?

[ ] QAS
[x] Maven - Yes
[ ] Gradle
[ ] Ant
[x] Eclipse - Yes

Test case sample
SCENARIO: TWO
META-DATA: {"description":"Test Scenario TWO","groups":["SMOKE"],"dependsOnMethods":["ONE"]}
COMMENT: "THIS IS Scenario <TWO> depends on <ONE>"

END
SCENARIO: ONE
META-DATA: {"description":"Test Scenario ONE","groups":["SMOKE"], "dataFile":"resources/test.csv}
 COMMENT: "THIS IS Scenario <TWO> depends on <ONE>"

END
test.csv
summary,num_of_users
with 1 user,1
with 10 users,10

Other observation:
Also tried
"dependsOnMethods":["ONE - with 1 user","ONE - with 10 users"]
but same result was seen.

Hi @raviguptasmarsh For the workaround you can use priority metadata as mentioned in Test case meta-data

Yes, @naeem-github as of now using either "priority" or "dependsOnGroups" as workaround.

Related or duplicate to #66

This is still not resolved. this is important feature we need. In one of th old post from Amit if found he mentioned
Link : https://github.com/qmetry/qaf/pull/83
Depends on method will work only when both methods class instance is same. For BDD/KWD Scenario both Scenario class instance would be different, so it was not working. So now for Scenarios it will check methods class name only.
there are file changes under [src/org/testng/DependencyMap.java]. But now it looks reverted in 3.1.0-RC2

Refer #281, With qaf 3.0.0 test dependency with BDD or Feature file is not supported, it will be supported with RuntimeScenarioFactory. You can refer comment on #281  or alternate as suggested in post.


error

Traceback (most recent call last):
File "/home/silver/yukon/venv/lib/python3.10/site-packages/pycyphal/util/_broadcast.py", line 46, in delegate
r: typing.Union[R, Exception] = fn(*args, **kwargs)
File "/home/silver/yukon/yukon/domain/avatar.py", line 199, in _on_trace
handler(float(ts.monotonic), deserialized_object, tr.metadata.transfer_id)  # type: ignore
File "/home/silver/yukon/yukon/domain/avatar.py", line 101, in _on_access_response
register_name = self.access_requests_names_by_transfer_id[transfer_id]
KeyError: 0

is not critical


🐛 Bug Report: SyntaxError: Cannot use import statement outside a module

📜 Description
It appears that jest can not properly interpret the index.js file, since it is using imports and is not in commonjs format unlike the compiled TS portions of the code base.
👟 Reproduction steps
Use jest to run *.js files instead of using ts-jest, etc. Useful, because there are some challenges with ts-jest and we can run tests on *.js after TS files are compiled down to commonjs.
👍 Expected behavior
It should not have a syntax error when parsing.
👎 Actual Behavior with Screenshots
@appbloks/storage:test:   ● Test suite failed to run
@appbloks/storage:test:
@appbloks/storage:test:     test/node_modules/.pnpm/@traceloop+jest-environment-otel@0.8.0/node_modules/@traceloop/jest-environment-otel/index.js:1
@appbloks/storage:test:     import { teardown, setup } from './dist/global';
@appbloks/storage:test:     ^^^^^^
@appbloks/storage:test:
@appbloks/storage:test:     SyntaxError: Cannot use import statement outside a module
🤖 Node Version
v18.10.0
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?

[X] I checked and didn't find similar issue

Are you willing to submit PR?
None

FYI, looks like this issue is related to issue #34. I was able to convert the remainder to typescript locally and rebuild and had no issues importing the environment after that.


Block CNY currency payout on business hosts

A lagging problem related to Wise internal restrictions that are leaking into our platform. Despite AliPay appearing as the only viable Transfer method in the Bank Account payout form, this is not actually allowed by Wise.
Expense error: TransferWise validation error: Selected recipient type CHINESE_ALIPAY is not supported for this payment

References:
https://wise.com/help/articles/2955298/guide-to-cny-transfers
https://wise.com/us/blog/new-send-cny-instantly-to-alipay-users

@znarf we don't. I feel like we should, even though we're just enforcing Wise's business rules, we abstract them enough to the point it looks like we're the ones responsible for blocking these.
I think we need to tweak this UX a little bit to reduce the burden. Or accept all currencies and automatically set these expenses as "Custom Payout Method", as we do with hosts that are not connected to Wise.


Private repo settings added

Security-gates step has been added for repositories that are private and whose Security Dashboard is not active.

LGTM 🚀


Transient support for initialize_with

Add transient support for initialize_with.
Problem this feature will solve
Currently it's not allowed to use transient attributes inside initialize_with block.

This will build a hash of all attributes to be passed to new. It won't include transient attributes, but everything else defined in the factory will be passed (associations, evaluated sequences, etc.)

Solution will:

allow to associate new or created objects from the outside of the factory build;
as a result it will reduce duplicated code when you want to update model from the other (for example associated) record.

Desired solution
factory :user do
  trait :admin do
    profile { build(:admin_profile) }

    transient do
      completed { false }
    end

    after(:build) do |record, evaluator|
      if evaluator.completed
        build(:admin_profile, :completed, record: record.profile) # pass record variable here, to refill it with required data
      end
    end
  end
end

factory :admin_profile do
  trait :with_phone_number do
    # attributes
  end
  trait :with_confirmed_email do
    # attributes
  end
  trait :with_identity_card do
    # attributes
  end

  trait :completed do
    with_phone_number
    with_confirmed_email
    with_identity_card
  end

  transient do
    record { nil }
  end

  # here is the trick
  initialize_with do |evaluator|
    instance = record&.new || new
    instance.attributes = **attributes
  end
end

To use it:
create(:user, :admin, :completed)

Alternatives considered
Right now there are no solution that allows to add traits for the associations which was passed as an attribute to a build or create method.
Additional context
Might be good to have simpler solution, like controlling association`s attributes via traits = nested traits.

Hi @dmitry - would you be able to share a failing test that encompasses the functionality you're hoping for? Here's our reproduction script to help you get started. This will help us better understand the feature you're hoping to add.

Hi @dmitry trying to get a sense on what is the status of this issue. Where you able to get a reproduction script going? I am also curious in your use case, if the record is the value that needs to be passed in order to grab the attributes, could the attributes be spread right from the after(:build) block?

@aledustet I haven't worked on it anymore further, and can't remember why I wanted to implement it, but seems like it is somehow related to the following pattern:
    trait :talent do
      after(:build) do |record, e|
        profile = e.profile_association.dup
        options = profile.extract_options!
        record.profile = build(
          :talent,
          *profile,
          **options.symbolize_keys
        )
      end
    end

Now you can do:
         create(
            :user,
            :talent,
            profile_association: [
              :completed,
              agency: record.offer.provider
            ]
          ).profile

Simply it allows you to use traits and attributes for associations.

Using traits and attribute overrides on associations sounds like a slightly different issue (I think it has been discussed before, but I can't find where at the moment). There are some approaches to that involving transient attributes, but I don't think that relates to initialize_with.
I found https://github.com/thoughtbot/factory_bot/issues/1367, which might have been the original version of this issue (they have the same name). That issue was about whether the attributes method inside initialize_with should include transient attributes. The answer is that attributes should not include transient attributes. From the docs:

Transient attributes are attributes only available within the factory definition, and not set on the object being built

So if you are setting them on the object being built, they should be regular attributes rather than transient attributes.
I'm going to close this issue, since I think transient attributes and initialize_with are working as designed.


Mark snippets and the bundler target's main file as having side effects

This is a less extreme version of #1208, which only marks snippets and the main file on the bundler target as having side effects instead of all files.
This means that the JS shim file which contains the vast majority of the JS code is still properly marked as having no side effects, allowing bundlers to get rid of things like unused new TextEncoder calls which could theoretically have side effects but don't.
Fixes #972
Fixes rustwasm/wasm-bindgen#3276

I tried testing out your branch, but unfortunately I ran into this issue here: https://github.com/rustwasm/wasm-pack/issues/650#issuecomment-1436057987
It's unrelated to what's solved here, but if I can solve that, I can test if this resolves https://github.com/rustwasm/wasm-bindgen/issues/3306 and https://github.com/rustwasm/wasm-pack/issues/1230.

I think only bundler target's sideEffects should be set to the entry file. web target should keep false.

I think only bundler target's sideEffects should be set to the entry file. web target should keep false.

It's already effectively false for the entry file. On the web target, sideEffects is set to ["./snippets/*"], which means that only the files inside of snippets are treated as though they have side effects. Everything else, including the entry file, is treated as though sideEffects is set to false.
The reason why snippets are marked as having side effects is because they're arbitrary user code; we've got no idea what they do, and we don't want to assume that they have no side effects and cause them to break.

I've tested this branch (after a merge with master) and it fixed the issue for me.

What's missing to move this forward? It's an annoying bug right now

What's missing to move this forward? It's an annoying bug right now

It's just waiting on a review from @drager.

Thanks! 🙏


Add support for defining internal metrics

Related to https://issues.apache.org/jira/browse/LOG4J2-2937 (provide counters for logger rates) and #1927, we need some sort of basic metrics API we can use internally for exporting said metrics into a metrics library. This should not be created as brand new metrics API (if we want to do that, then we'd probably start somewhere like having additional modules which implement various OpenTelemetry APIs for better reusability), but it does need to define enough of an API so that various metrics collectors can use this. I've seen some similar ideas before in various Spring libraries before Spring Framework 6 integrated Micrometer everywhere as the general metrics API, so there may be some inspiration to take.

Hi  👋 - I'm a maintainer from opentelemetry-java.
Just wanted to chime in with a few notes about the OpenTelemetry API for your consideration:

OpenTelemetry decouples the API from the SDK. The API is a set of interfaces (with a minimal Noop default implementation) with strong backwards compatibility guarantees. The SDK is the reference implementation of the API's set of interfaces. The SDK is highly configurable and extensible. For metrics, the configurability involves the ability to provide custom MetricExporters for exporting metrics out of process (in addition to the built in exporters for prometheus and OTLP), customization of the set of exported metrics and how they are aggregated via views, and more.
The idea behind the decoupling is that the API should do nothing (i.e. noop) until someone configures an implementation to handle the calls. Instrumentation like what is being considered for log4j can safely add a dependency on the API, relying on the strong backwards compatibility guarantees which allow users to safely resolve conflicting transitive dependencies on the API from different libraries by just updating to the latest. The SDK reference implementation of the API works great out of the box for most people, but if insufficient, a motivated user can provide their own implementation of the API.
OpenTelemetry APIs comprise multiple telemetry signals (logs, metrics, and traces), enabling the telemetry to be correlated across signals and complementary. I.e. logs or metrics recorded in the context of an active trace have correlating metadata allowing you to stitch together the story in the backend.
OpenTelemetry APIs / SDKs are [cross language](https://opentelemetry.io/docs/instrumentation/], allowing a familiar conceptual / configuration experience in polyglot stacks.

If you're considering adding metrics to log4j, consider using the OpenTelemetry metrics API, available at maven coordinates io.opentelemetry:opentelemetry-api. I believe it will give you the API functionality required while being highly configurable for users.

We've got a couple sides to metrics: defining metrics within Log4j itself, and direct support for OpenTelemetry APIs. As Log4j itself does not depend on anything besides the java.base module, we need some level of indirection to support the same thing OpenTelemetry is doing with the API/SDK split (no-op by default, require an actual metrics implementation to collect and forward them). I see that the Java OpenTelemetry API modules are designed similarly (not sure about the required Java modules there, but I assume they're similarly lightweight). Thus, I'd expect the default metrics plugin for Log4j to use OpenTelemetry since that makes it much easier to configure all those other integrations, though if third party extensions create plugins that directly use some vendor tool or whatever, that's also fine (but probably easier to do via OpenTelemetry).
From a higher level, though, we'd like to consider how to best integrate with OpenTelemetry to aid with standardizing the operational side of things, but that's a different topic.


[4/x] pass key to menu content

What does this PR do and why?
Provide a description of what this PR does. Link to any relevant GitHub issues, Notion tasks or Discord discussions.
Screenshots or screen recordings
If applicable, provide screenshots or screen recordings to demonstrate the changes.
Acceptance checklist

[ ] I have evaluated the Approval Guidelines for this PR.
[ ] I have tested this PR in all supported browsers.
[ ] I have tested this PR in dark mode and light mode (if applicable).

Current dependencies on/for this PR:

main

PR #1714

PR #1715

PR #1716

PR #1717   👈

This comment was auto-generated by Graphite.


Make PR title/body customisable

Hi,
I really like this action and learned a lot from it.
What prevents me from using it is that you cannot overwrite the PR title/body.
Unfortunately I don't have the time right now to create a PR myself.

hey no worries, and glad to hear that you like it! I’ll see if I can make some time to tweak it.

Awesome thanks :)

hey @JonasJurczok ! I just opened a PR here  -> https://github.com/vsoch/pull-request-action/pull/3 would you care to review? If it looks good I can merge and then you can test in the wild.

Issue resolved yesterday with #3 closing.


 Feb 2022, 16:55 +0100, Geshi @.***>, wrote:

Assigned #20 to @janderedev.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were assigned.Message ID: @.***>


How can I set the Timepicker to 24-hour

I want to set the Timepicker to 24-hour, and I set showAMPM prop but it doesn't work. How to resolve the promble?

@lyw1991 There isn't a 24-hour time picker feature yet.


Show last saved date

Summary

Adds a status bar to logic and conceptual components that show the date when the model was last saved.
Creates a component to the bug report button that is shown on almost every page. Suggested by @idmarjr here

@idmarjr I did the status bar as simple as possible, so the look and feel we can discuss here, and If we want to show a relative date, like an hour ago, now`, and so on, we'll need a library to handle this or write this logic by ourselves.

@idmarjr I did the status bar as simple as possible, so the look and feel we can discuss here, and If we want to show a relative date, like an hour ago, now`, and so on, we'll need a library to handle this or write this logic by ourselves.

To be honest I am not very comfortable with this solution, specially the idea of placing it below the canvas. I would prefer to explore another visual options before we merge it, like finding a discreet place, font and format around this unused area

Just for the records: I will take a look at this merge request in the next 5 days and explore some other visual options so we can take a decision :)

I want your opinion:
@miltonbsn @oicramps @ArthurMota9

Option 1
Option 2
Option 3

I want your opinion: @miltonbsn @oicramps @ArthurMota9
Option 1	Option 2	Option 3

Option 3.

I want your opinion:
@miltonbsn @oicramps @ArthurMota9

Option 1
Option 2
Option 3

Option 1

@oicramps I did some changes to match the visuals with the most voted option.
In this mean time I notice we're always displaying the "last save data" as the current our. Can you double check if this is the case?
Thanks!

@oicramps I did some changes to match the visuals with the most voted option.
In this mean time I notice we're always displaying the "last save data" as the current our. Can you double check if this is the case?
Thanks!

Do you mean, when we open the model it shows the current date instead of the date that the model was saved for the last time?

@idmarjr do you mean, when we open the model it shows the current date instead of the date that the model was saved for the last time?

That's correct!
Lucky you can overcome the terrible way I express myself. ahahah

@miltonbsn looks like this merge is blocked by a requested change from you.
Can you please take a look if this is still a thing?


SelectMultiple on ForeignKey field

Hi guys,
I have successfully added a "status" filter to my form but I cannot manage it to use the django.forms.SelectMultiple widget.
Here is my code :
filters.py :
class MyFilter(django_filters.FilterSet):
    status = forms.ModelMultipleChoiceField(queryset=StartupStatus.objects.all())

    class Meta:
        model = Startup
        fields = ['status', ]

models.py:
class StartupStatus(models.Model):
    name = models.CharField(max_length=64, help_text='Nom de l\'étape de la vie de la startup')
    code = models.CharField(max_length=32, help_text='Code de l\'étape de la vie de la startup')
    status_order = models.IntegerField(default=0)

class Startup(models.Model):
    status = models.ForeignKey(StartupStatus, null=True)

I suspect that because the "status" field is a django.models.ForeignKey field then django-filter wants the widget makes the widget a simple django.forms.Select
Am I doing something wrong ? Does someone knows a way to trick django-filter ?
Thanks for your help, cheers,
Quentin

Have you tried to set the widget manually?
forms.py:
class MyFilter(django_filters.FilterSet):
     status = forms.ModelMultipleChoiceField(
          queryset=StartupStatus.objects.all(),
          widget=SelectMultiple())

class Meta:
    model = Startup
    fields = ['status', ]

In a related issue though I am having trouble adding the NULL/None value to the filter-able values in the ModelMultipleChoiceField FilterSet. Any help figuring out how to add this option would be greatly appreciated. Maybe I should just open this as a new issue?

@marcus1487 Have a look at #261.
Please let me know (there) if the solution in the ticket works for you, and if you have any other input. Ta.

I ended up with this:
from django.forms import ModelMultipleChoiceField
from itertools import groupby
from operator import attrgetter

class ModelMultipleChoiceFieldWithOptGroup(ModelMultipleChoiceField):
    def __init__(self, *args, **kwargs):
        assert 'group_field' in kwargs  # The keyword arg must be there
        group_field = kwargs.pop('group_field')
        super(ModelMultipleChoiceFieldWithOptGroup, self).__init__(*args, **kwargs)

        groups = groupby(kwargs['queryset'], attrgetter(group_field))
        self.choices = [(group, [(instance.id, self.label_from_instance(instance)) for instance in instances])
                        for group, instances in groups]

and
from .form_fields import ModelMultipleChoiceFieldWithOptGroup

class SubjectForm(forms.ModelForm):
    def __init__(self, *args, **kwargs):
        # From what I remember, this must be in the __init__ to avoid potential problems when
        # migrating. It's because the __init__ code is only parsed when actually creating an object
        # You should also have a look at this: http://goo.gl/eYJi0a
        self.fields['tags'] = ModelMultipleChoiceFieldWithOptGroup(
            group_field='field',
            queryset=Tag.objects.all()
        )
        [...]

    class Meta:
        model = Subject

My models:
from django.db import models

class Tag(models.Model):
    field = models.ForeignKey(FieldOfActivity)
    [...]

class Subject(models.Model):
    tags = models.ManyToManyField(Tag)
    [...]

I used select2 as field widget in combination with a + custom matcher so the search can also match optgroup names ;)
Enjoy :)

@marcus1487 Here is what I did with a django-filter FilterSet:
from django import forms
from . import django_filters
from .models import Startup, Tag
from .form_fields import ModelMultipleChoiceFieldWithOptGroup

class ModelMultipleChoiceFieldWithOptGroupFilter(django_filters.MultipleChoiceFilter):
    field_class = ModelMultipleChoiceFieldWithOptGroup

class StartupFilter(django_filters.FilterSet):
    # I think this should also be in an __init__ to avoid class/instance attribute's value problem as referenced here: http://goo.gl/eYJi0a
    tags = ModelMultipleChoiceFieldWithOptGroupFilter(queryset=Tag.objects.all(), group_field='field')
    [...]

    class Meta:
        model = Startup

But why would you have a relation to a NULL/None? How come you have such thing?


⚠ Digital Ocean - https://status.digitalocean.com/ has degraded performance

In 644ee36, Digital Ocean - https://status.digitalocean.com/ (https://status.digitalocean.com/api/v2/status.json) experienced degraded performance:

HTTP code: 200
Response time: 183 ms

Resolved: Digital Ocean - https://status.digitalocean.com/ performance has improved in d0281f0.


Error: l is not a function

When trying the new "Debug Default Project" I get the following error:

I can't reproduce, I've also haven't seen anyone else reporting  same problem...
Is it reproducible? Or just happened once?

@Krzysztof-Cieslak Sadly it happens all the time but my work computer is being flattening and rebuild at the weekend so I'll have a fresh windows install to try again this with.


Could not subscribe..for pricing

I have an issue when I try to run:
https://github.com/mhallsmoore/qstrader/blob/master/examples/moving_average_cross_backtest.py
Error:
Could not subscribe ticker abn001 as no data CSV found for pricing.
Could not subscribe ticker ing001 as no data CSV found for pricing.
What I've done so far to make sure it reads the data well:
I) Added a data file into the qstrader work file and I've put there two .csv files named abn001 and ing001;
II) Adapted the qstrader.yml:
CSV_DATA_DIR: rf/Users/Documents/BF/data
OUTPUT_DIR: rf/Users/Documents/BF/out
Where I've put two .csv files;
III) Tried to sort this piece of code out:
from qstrader.settings import SettingsDefault
class SettingsUserdefined(SettingsDefault):
_CSV_DATA_DIR = "~/data"
_OUTPUT_DIR = "~/qstrader"
conf = SettingsUserdefined()
I've attached a print screen with what my data looks like.

It would be nice if we would have a clear solution for this issue as I saw at a few times before.
What I suggest is to modify this piece of code to read it directly from a path:
if name == "main":
# Configuration data
testing = False
config = settings.from_file(
settings.DEFAULT_CONFIG_FILENAME, testing
)
tickers = ["abn001", "ing001"]
filename = None
run(config, testing, tickers, filename)

Seriously, delete this 'backtester' from your machine. It's awful and the support is no where.

Hi @fbondeaux ,
Are you sure they are csv files? Not much information to go off if I am honest.
I agree the collaboration on this project is very low, no-one seems to be sharing any ideas, however, it is not awful back tester.
Could you provide more details, please? OS version, code snippings, screenshots?
Thanks
James

@JamesKBowler
Of course they are .csv files. I am not a stranger to trading or backtesting.
I've created my own backtest framework in Python so I won't need qstrader any more.
For future reference: I would suggest that serious traders create their own framework. There is a lot of boilerplate code what makes modifying very hard.
Take care.


[Auth] Revert unintentional commits on main

I unintentionally pushed to main (wasn't on a local branch). Usually, it stops me. I didn't force push but I saw remote: Bypassed rule violations for refs/heads/main:.
#no-changelog

I see that we have admin roles and admin roles are allowed to bypass branch protections.

Settings > Teams and Member roles > Admin

Ah, we could make turn off the ability to bypass branch protections:
branches > main > edit > scroll down and see:

We could always uncheck it if needed so I'm thinking it's worth checking this to avoid accidental pushes to main?

SG, I enabled it and did a quick test:
nickcooke@nickcooke-mac firebase-ios-sdk % git commit -m "[NFC] Test branch protection"
[main 35bbafb41] [NFC] Test branch protection
 1 file changed, 1 insertion(+)
nickcooke@nickcooke-mac firebase-ios-sdk % git push origin HEAD
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 12 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 536 bytes | 536.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote: error: GH006: Protected branch update failed for refs/heads/main.
remote:
remote: - Changes must be made through a pull request.
remote:
remote: - 2 of 2 required status checks are expected.
To github.com:firebase/firebase-ios-sdk.git
 ! [remote rejected]     HEAD -> main (protected branch hook declined)
error: failed to push some refs to 'github.com:firebase/firebase-ios-sdk.git'


Set process group ID in server to terminate after parent

Closes https://github.com/Shopify/ruby-lsp-rails/issues/274
I think there are two issues with the way we shutdown the server.  I removed that loop and switched to a single sleep to give some time for the server to shutdown.
Also, I started setting the process group ID in the server process. This is a similar trick used in spring, which makes it so that if the parent process is terminated, then so will the server.
I believe these two should help with the orphaned process issues we've been seeing.

Actually, this doesn't work properly. We sometimes get an operation not permitted error. We'll need to think about alternatives.

@tisba my pleasure! Is the problem fixed on your end?

Sounds good. Thank you very much!


zkCli installation

Hi! I was wondering if you would appreciate a PR for adding zkCli to the path similar to https://github.com/bbaugher/apache_zookeeper/blob/master/recipes/default.rb#L140-147

@cmluciano seems like that’d be potentially very handy. Go for it!

Closing due to lack of activity.


Error while adding IJulia on Ubuntu 16.04

I have downloaded v1.0.3 for Generic Linux Binaries for x86 (64-bit). I have added the package PyCall, and set the ENV["PYTHON"]="/home/ohm/anaconda3/bin/python", and then have build the package. PyCall seems to work fine. However, when I tried to add the package IJulia I've received the following error message:
julia> Pkg.add("IJulia")
 Resolving package versions...
   Cloning [7073ff75-c697-5162-941a-fcdaad2a7d2a] IJulia from https://github.com/JuliaLang/IJulia.jl.git
[ Info: Installed IJulia ────────── v1.14.1
   Cloning [739be429-bea8-5141-9913-cc70e7f3736d] MbedTLS from https://github.com/JuliaWeb/MbedTLS.jl.git
[ Info: Installed MbedTLS ───────── v0.6.6
   Cloning [b99e7846-7c00-51b0-8f62-c81ae34c0232] BinaryProvider from https://github.com/JuliaPackaging/BinaryProvider.jl.git
[ Info: Installed BinaryProvider ── v0.5.3
   Cloning [b85f4697-e234-5449-a836-ec8e2f98b302] SoftGlobalScope from https://github.com/stevengj/SoftGlobalScope.jl.git
[ Info: Installed SoftGlobalScope ─ v1.0.8
   Cloning [c2297ded-f4af-51ae-bb23-16f91089e4e1] ZMQ from https://github.com/JuliaInterop/ZMQ.jl.git
[ Info: Installed ZMQ ───────────── v1.0.0
  Updating `~/.julia/environments/v1.0/Project.toml`
  [7073ff75] + IJulia v1.14.1
  Updating `~/.julia/environments/v1.0/Manifest.toml`
  [b99e7846] + BinaryProvider v0.5.3
  [7073ff75] + IJulia v1.14.1
  [739be429] + MbedTLS v0.6.6
  [b85f4697] + SoftGlobalScope v1.0.8
  [c2297ded] + ZMQ v1.0.0
  [7b1f6079] + FileWatching
  Building ZMQ ────→ `~/.julia/packages/ZMQ/ABGOx/deps/build.log`
┌ Error: Error building `ZMQ`:
│ ┌ Warning: platform_key() is deprecated, use platform_key_abi() from now on
│ │   caller = ip:0x0
│ └ @ Core :-1
│ ┌ Warning: Could not extract the platform key of https://github.com/JuliaInterop/ZMQBuilder/releases/download/v4.2.5+6/ZMQ.x86_64-linux-gnu.tar.gz; continuing...
│ └ @ BinaryProvider ~/.julia/packages/BinaryProvider/4F5Hq/src/Prefix.jl:185
│ [ Info: Downloading https://github.com/JuliaInterop/ZMQBuilder/releases/download/v4.2.5+6/ZMQ.x86_64-linux-gnu.tar.gz to /home/ohm/.julia/packages/ZMQ/ABGOx/deps/usr/downloads/ZMQ.x86_64-linux-gnu.tar.gz...
│ ERROR: LoadError: Could not download https://github.com/JuliaInterop/ZMQBuilder/releases/download/v4.2.5+6/ZMQ.x86_64-linux-gnu.tar.gz to /home/ohm/.julia/packages/ZMQ/ABGOx/deps/usr/downloads/ZMQ.x86_64-linux-gnu.tar.gz:
│ ErrorException("")
│ Stacktrace:
│  [1] error(::String) at ./error.jl:33
│  [2] #download#89(::Bool, ::Function, ::String, ::String) at /home/ohm/.julia/packages/BinaryProvider/4F5Hq/src/PlatformEngines.jl:498
│  [3] #download at ./none:0 [inlined]
│  [4] #download_verify#90(::Bool, ::Bool, ::Bool, ::Function, ::String, ::String, ::String) at /home/ohm/.julia/packages/BinaryProvider/4F5Hq/src/PlatformEngines.jl:567
│  [5] #download_verify at ./none:0 [inlined]
│  [6] #install#129(::Prefix, ::String, ::Bool, ::Bool, ::Bool, ::Function, ::String, ::String) at /home/ohm/.julia/packages/BinaryProvider/4F5Hq/src/Prefix.jl:314
│  [7] (::getfield(BinaryProvider, Symbol("#kw##install")))(::NamedTuple{(:prefix, :force, :verbose),Tuple{Prefix,Bool,Bool}}, ::typeof(install), ::String, ::String) at ./none:0
│  [8] top-level scope at /home/ohm/.julia/packages/ZMQ/ABGOx/deps/build.jl:44
│  [9] include at ./boot.jl:317 [inlined]
│  [10] include_relative(::Module, ::String) at ./loading.jl:1044
│  [11] include(::Module, ::String) at ./sysimg.jl:29
│  [12] include(::String) at ./client.jl:392
│  [13] top-level scope at none:0
│ in expression starting at /home/ohm/.julia/packages/ZMQ/ABGOx/deps/build.jl:40
│ [12:14:35]
│ [12:14:35] curl: (77) error setting certificate verify locations:
│ [12:14:35]   CAfile: /etc/pki/tls/certs/ca-bundle.crt
│ [12:14:35]   CApath: none
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1097
  Building MbedTLS → `~/.julia/packages/MbedTLS/r1Ufc/deps/build.log`
┌ Error: Error building `MbedTLS`:
│ ┌ Warning: platform_key() is deprecated, use platform_key_abi() from now on
│ │   caller = ip:0x0
│ └ @ Core :-1
│ [ Info: Downloading https://github.com/JuliaWeb/MbedTLSBuilder/releases/download/v0.16.0/MbedTLS.v2.13.1.x86_64-linux-gnu.tar.gz to /home/ohm/.julia/packages/MbedTLS/r1Ufc/deps/usr/downloads/MbedTLS.v2.13.1.x86_64-linux-gnu.tar.gz...
│ ERROR: LoadError: Could not download https://github.com/JuliaWeb/MbedTLSBuilder/releases/download/v0.16.0/MbedTLS.v2.13.1.x86_64-linux-gnu.tar.gz to /home/ohm/.julia/packages/MbedTLS/r1Ufc/deps/usr/downloads/MbedTLS.v2.13.1.x86_64-linux-gnu.tar.gz:
│ ErrorException("")
│ Stacktrace:
│  [1] error(::String) at ./error.jl:33
│  [2] #download#89(::Bool, ::Function, ::String, ::String) at /home/ohm/.julia/packages/BinaryProvider/4F5Hq/src/PlatformEngines.jl:498
│  [3] #download at ./none:0 [inlined]
│  [4] #download_verify#90(::Bool, ::Bool, ::Bool, ::Function, ::String, ::String, ::String) at /home/ohm/.julia/packages/BinaryProvider/4F5Hq/src/PlatformEngines.jl:567
│  [5] #download_verify at ./none:0 [inlined]
│  [6] #install#129(::Prefix, ::String, ::Bool, ::Bool, ::Bool, ::Function, ::String, ::String) at /home/ohm/.julia/packages/BinaryProvider/4F5Hq/src/Prefix.jl:314
│  [7] (::getfield(BinaryProvider, Symbol("#kw##install")))(::NamedTuple{(:prefix, :force, :verbose),Tuple{Prefix,Bool,Bool}}, ::typeof(install), ::String, ::String) at ./none:0
│  [8] top-level scope at /home/ohm/.julia/packages/MbedTLS/r1Ufc/deps/build.jl:48
│  [9] include at ./boot.jl:317 [inlined]
│  [10] include_relative(::Module, ::String) at ./loading.jl:1044
│  [11] include(::Module, ::String) at ./sysimg.jl:29
│  [12] include(::String) at ./client.jl:392
│  [13] top-level scope at none:0
│ in expression starting at /home/ohm/.julia/packages/MbedTLS/r1Ufc/deps/build.jl:44
│ [12:14:40]
│ [12:14:40] curl: (77) error setting certificate verify locations:
│ [12:14:40]   CAfile: /etc/pki/tls/certs/ca-bundle.crt
│ [12:14:40]   CApath: none
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1097
  Building IJulia ─→ `~/.julia/packages/IJulia/DL02A/deps/build.log`

How could this be fixed?

Sorry for my rookieness, but what do you mean by ] sign?
I tried this:
julia> ]build IJulia
ERROR: syntax: unexpected "]"

julia> build IJulia
ERROR: syntax: extra token "IJulia" after end of expression

But using Pkg.build("IJulia") gave me the same error regarding the ZMQ package. I tried to do it in few networks so it doesn't seem to be related to the network...

Any luck with this issue? I am having the same problem.

The problem is the ZMQ package installation, not IJulia, so you should file an issue at ZMQ.jl


Move CMake example to documentation

The CMake example at https://github.com/toml-f/tf-cmake-example is slightly behind the available documentation in https://toml-f.readthedocs.io/en/latest/how-to/integration.html#integrate-with-cmake. We should check whether the example repository still contains information absent in the documentation and merge everything in the docs.

This is now available in the integration section. The template repo has been archived.


DFM_ALLOWED_APP_ROLES problem in standalone version

Hi,
I am pretty sure I am missing something and this is not a bug, so if possible I would tag it as question.
I have an azure function resource that hosts the DurableFunctionsMonitor in the standalone version. I am trying to configure app roles and have one group of users that can only "read" and for example me with the permissions to start/restart etc.
For this I have followed the Wiki for the configuration and arrived with this setup:

And I have assigned to me the role "Writer":

Then I added the app settings to my azure function resource:

However, when I do this, as soon as the app restarts and I open a new clean session, login and get to the "home" page I receive a 401 error. This does not happen when I only configure allowed users by their emails with the app settings DFM_ALLOWED_USER_NAMES. However only using DFM_ALLOWED_USER_NAMES wouldn't accomplish what I am trying to achieve since any user would have full access in the durable functions monitor.

One thing that I am failing at as well is retrieving the access token to have a look at it.
Any ideas on what am I doing wrong?
Thank you very much in advance.
Enrico

Hi @Erry91 , the first thing to clarify is:
which auth flow your DfMon is using, server-directed or client-directed ?
The quickest way to check that on a running instance is to press F12 in your browser, go to Network tab and check any API call the client is making. If that API call contains Authorization header - then it is client-directed, otherwise it is server-directed.

Hi @scale-tone and thank you for your reply. I would say I am in the server-directed situation. An example of API call is this, where I don't think I see any Authorization header in the request.

I tried that, both clearing cookies and relogin from incognito or another browser. The page still replies with 401 as soon as I enable the app setting DFM_ALLOWED_APP_ROLES

OK, from what I can see on your screenshots, you have your App Role's value set to DurableMonitorWriter.
While in DFM_ALLOWED_APP_ROLES setting you specify Writer (which is role's Display Name).
You need to specify DurableMonitorWriter there instead.
Please, try doing that.

Oh my, I was using the Display Name and not the actual Value then. Thank you so much for spotting that for me! I was sure it was something silly but I couldn't nail it down...

Yes, @scale-tone thank you again. We can close it.


Paket is failing to bring Libuv into .net 451 project

Description
I working with latest paket 4.8.0
When I add Libuv package to my project paket.references that is developed in 4.5.1  and run paket install I get following error
"Package Libuv contains libraries, but not for the selected TargetFramework net451 in project"
You can see attached repro
PaketWithProblem.zip.txt
I think it caused by incorrect interpretation of dependency of .NETStandard 1.0

Runtime support will be added soon, stay tuned. Can you test what NuGet does with that package in net451?

Thank you I will check what NuGet doing , when do you think runtimes would be supported ?

Thank you I will check what NuGet doing
Yes please :)
when do you think runtimes would be supported
After https://github.com/fsprojects/Paket/pull/2267 is merged which can take a while. To be clear, currently it is only supported in a dotnet sdk world. Legacy applications will not be changed because I have no idea how NuGet behaves on old projects. But I'm pretty sure we can add that easily once we know that.


crawl

About the PR

Why / Balance

Technical details

Media

[ ] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog

there is nothing in the crawl file to look at

integrations complete, will be merged in https://github.com/Pax-Astralis-Dev/pax-astralis-station/pull/63


[WIP] Replace setup.py with pyproject.toml

Closes #8090

Create pyproject.toml
Implement a custom build backend (see below) in xgboost/packager submodule. Build logic from setup.py has been refactored and migrated into the submodule.
Tested: pip wheel . (build wheel), python -m build --sdist . (source distribution)

TODOs

[ ] Update CI to use new build commands.
[ ] Handle CMake args in xgboost/packager.
[ ] Test editable installation. PEP 517 doesn't officially support this use case, so we may need to keep some parts of setup.py to use python setup.py install --editable.
[ ] Add typing annotation to xgboost/packager.

Context

Directly calling setup.py for installing the Python package is deprecated. python setup.py install will throw a warning:

SetuptoolsDeprecationWarning: setup.py install is deprecated.
Use build and pip and other standards-based tools.

The new replacement for setup.py is PEP 517 and PEP 621.

PEP 621: The package's metadata is now specified in pyproject.toml. The TOML file is declarative and cannot contain arbitrary code unlike setup.py.
PEP 517: It is now possible to specify a build backend in pyproject.toml:

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

Users now can choose between a variety of build tools: setuptools, poetry, hatch etc. In addition, individual Python packages can specify a custom (bespoke) build backend by specifying backend-path:

[build-system]
requires = ["packaging"]
backend-path = ["xgboost"]
build-backend = "packager.pep517"

A build backend implements two methods:

def build_wheel(wheel_directory, config_settings=None, metadata_directory=None)
def build_sdist(sdist_directory, config_settings=None)

@jameslamb You might be interested in this work.

Thanks for tagging me! I'm very interested in this and happy to provide a review or answer questions if you want some extra help.
For reference, in LightGBM I'm pursuing using scikit-build-core instead of having a custom build backend: https://github.com/microsoft/LightGBM/pull/5759. But only because I don't know much about the custom build backends. I'll read through the approach you took here.

I am not sure if there is a distinction between build-time and run-time dependency for toml projects

There is! This is one of the nice benefits of the new backends... you don't have to have something like setuptools or wheel as a runtime dependency.
Also on the topic of CMake being available on PyPI, two very important things to consider:

anyone running pip install cmake on a platform for which there isn't a CMake wheel is going end up compiling it from source, which can be really painful and definitely more difficult than installing it from package managers with broader platform support like brew on macOS, apt on various Linux flavors
because of that, scikit-build-core has the behavior "if an already-installed cmake is found on PATH, use that... otherwise, install the one from PyPI"

Secondly, I am not sure if there is a distinction between build-time and run-time dependency for toml projects.

It's worth noting that this is in fact one of the motivating reasons for the creation of the modern build infrastructure, namely PEP 517 as previously mentioned as well as PEP 518, which defines the build-system part of pyproject.toml. The canonical issue this was designed to fix is a package that requires numpy and/or Cython to be installed in order to run setup.py in order to provide numpy headers (np.get_include) or Cythonize files, respectively. Quoting the PEP:

But when a project chooses to use setuptools, the use of an executable file like setup.py becomes an issue. You can’t execute a setup.py file without knowing its dependencies, but currently there is no standard way to know what those dependencies are in an automated fashion without executing the setup.py file where that information is stored. It’s a catch-22 of a file not being runnable without knowing its own contents which can’t be known programmatically unless you run the file.

The build-system section of pyproject.toml allows specifying the requirements for the build. PEP 517 builds occur in a self-contained virtual environment where all build requirements are installed. Run requirements are a separate list that is installed into the user's environment along with the built package after a build is complete (when using pip install . to build locally) or a pre-built binary is found (pip install ${pkg}). The contained build is analogous to how conda builds work (in venvs instead of conda envs).

It's not necessary to be useful, just a way for us to split c++ packaging from the Python package.

@trivialfis Let's not split the packaging. It will introduce headaches, since different virtual env managers for Python install native libs in different locations. We don't want to make libpath.py even more complicated than it is now.

@vyasr I managed to use hatchilng backend (with some customization). As a result, I was able to remove the boilerplate code, such as the metadata generation. Now XGBoost's build backend only contains the necessary customization. Thanks for your advice!

@trivialfis Editable installation is now supported. Run: `pip install -e ."

@jameslamb To give you some context, I chose a happy middle path between implementing a backend from scratch and using an existing backend. I built on top of hatchling, which led to modular code with minimal amount of boilerplate.

Good news, I am able to remove insert_vcomp140.py and fold it into the new build backend.

Good news, I am able to remove insert_vcomp140.py and fold it into the new build backend.

We might want to make it optional. I'm not sure what's the implication of doing that for systems like conda.

@trivialfis Good point, let me add a build option then.

I am removing vcomp140.dll from the XGBoost wheel. I just tested the wheel on a minimal installation of Windows, and import xgboost fails with

Error message(s): ["Could not find module 'C:\Users\Administrator\Downloads\foobar\lib\site-packages\xgboost\lib\xgboost.dll' (or one of its dependencies). Try using the full path with constructor syntax."]

I tried a couple things to salvage the error, but none worked.

Preload dependent DLLs using the approach taken by scikit-learn. The approach only works with compiled extension but not vanilla C lib that's loaded via ctypes.cdll.LoadLibrary().
Use delvewheel to patch the wheel. The import still failed.
Pass winmode arg to ctypes.CDLL. No avail.
I tested both the new wheel and 1.7.5 version. All failed.

Conclusion: Let's not bundle vcomp140.dll at all, since it doesn't work. Instead, let's tell Windows users to install Visual C++ Redistributable package. This is what LightGBM does. Alternatively, they can use Conda which handles this automatically.

note to myself: need to update the release script.

@trivialfis I updated dev/release-artifacts.py. Can you take a look?

Note that I don't have permissions to resolve threads on this PR so I tried to leave comments or clearly indicate where I thought things were resolved.


Multiple clusters Support

Does Kubefwd support multiple clusters?.
How does it work if the same workload runs on two or more different clusters and exposing the same port?

It doesn't and it would be really problematic to do so even if it would - the same service name with namespace can't be duplicated in hosts file. You can start 2 copies of kubefwd that would use different clusters  - use KUBECONFIG env variable to specify needed config file with cluster. However kubefwd manages hosts file and it will be 2 consecutive replacements of the file that will leave it in inconsistent state at some point.

It doesn't and it would be really problematic to do so even if it would - the same service name with namespace can't be duplicated in hosts file. You can start 2 copies of kubefwd that would use different clusters  - use KUBECONFIG env variable to specify needed config file with cluster. However kubefwd manages hosts file and it will be 2 consecutive replacements of the file that will leave it in inconsistent state at some point.

There is also -x, --context strings parameter to kubefwd svc , so one may use that.

There is also -x, --context strings parameter to kubefwd svc , so one may use that.

@collbrain should would work fine. kubefwd uses separate ip addresses for each forward and will only create short named entires for the first cluster. The context name of the second cluster is appended.
I forward multiple clusters often.

@collbrain should would work fine. kubefwd uses separate ip addresses for each forward and will only create short named entires for the first cluster. The context name of the second cluster is appended.
I forward multiple clusters often.


ci: remove gitpod-related files

ci: remove gitpod-related files
build: remove gitpod files from the REUSE file manifest
Signed-off-by: Ali Sajid Imami<EMAIL_ADDRESS>docs: update CONTRIBUTING.md for removing Gitpod references
Signed-off-by: Ali Sajid Imami<EMAIL_ADDRESS>

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#7  👈
#6
next

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

Join @AliSajid and the rest of your teammates on  Graphite

Merge activity

Nov 9, 3:49 PM EST: A user started a stack merge that includes this pull request via Graphite.


Port Forwarding UI

Description
Adds a UI window to complement the feature implemented in #1128. This allows users to port forward without touching the CLI.

Validation against user input
Little responsive UI telling you what state the connection is in.
Assembly reloading locked while the window is up.

Question about the lifetime of the port forwarding: While the window is open? While Unity is open?
If the latter, we will need to serialize the process Task somehow.
Screenshots:

entering data

connected successfully

failed attempt
Tests
Tested the various states for connecting and the validation logic.
Documentation

[ ] Changelog
[ ] Update #1130 to use the GUI and only mention the CLI as an option in an expandable.

One option could be to serialize the PID out to a file.

I guess the problem is we can't restore all the information that is associated with the Task<RedirectedProcessOutput> with just the PID 😕

What are the implications to user workflow to having this window open and assembly reloading locked?

Given the expected usage while the port forwarding is active is that you are profiling (and maybe debugging) - I think this is okay.
Its a safety measure that we kind of have to implement since the hot reload will lose all information about the state of the window.
I can't think of a use case where I'm profiling and want to make changes and see the hot reload take place.


EC2 instances booting problem in the same remote region

Main stack is reading remote account (the other stack implemented there).
Some of the instances within the same remote region are starting at the beginning of the schedule some do not (only starting for few seconds then stopped).
EC2 nodes are tagged to point to the same schedule. They differ only about size.
Pleas see logs collected.
2021-07-15T06:00:25.429+02:00	INFO : Starting instances EC2:i-0c93e... (schdule-test-1), EC2:i-0bdd9... (test2) in region eu-central-1
2021-07-15T06:02:26.104+02:00	INFO : Fetching ec2 instances for account ... in region eu-central-1
2021-07-15T06:02:26.522+02:00	DEBUG : Selected ec2 instance i-0c93e... in state (running)
2021-07-15T06:02:26.522+02:00	DEBUG : Selected ec2 instance i-0bdd9... in state (stopped)

2021-07-15T06:00:28.674+02:00
INFO    : Sending anonymous metrics data:
{
"TimeStamp": "2021-07-15T04:00:28.674074",
"UUID": "dc252051-...",
"Data": [
{
"Service": "ec2",
"Action": "Started",
"InstanceType": "t2.micro",
"Instances": 1
},
{
"Service": "ec2",
"Action": "Started",
"InstanceType": "m5.xlarge",
"Instances": 1
}
],
"Solution": "S00030",
"Version": "v1.4.0"
}

even metadata state shows started - m5.xlarge instance is stopped within the scheduled time.
The machine which behaves correctly has had tagged for many days ago.
The machine which not started fully (starting then stopped) was tagged outside schedule time day before starting time came on.

Hi @Sebizbir Are you able to manually start the instances in the ec2 console?
If Yes

can you check AWS CloudTrail in the account where the solution is installed
and
the AWS CloudTrail in the account and also in the account where the ec2 instance is,

for API calls to the particular instance,
you can look up the API logs using the Event History > Select Resource Name > Provide the instance id or the name and search for the API StartInstance?
To give more context Instance scheduler, retrieves the list of the instances with the Schedule key and then check the desired state, if the instance should be in started/running state, the solution will only make a single start instance API call and poll the instance status, it will not make any further calls to stop the instance.

Hi @gockle ,
I discover some instances have Volumes encrypted.
I added the necessary kms permission to Scheduler role.
The question is, do I have to update every role with "schedule" in the name even on remote accounts?
Or only the main one "- SchedulerRole-"
Cheers

@Sebizbir Each role created in the remote accounts which will be used by Instance scheduler should be updated.


Ts07 duplicated code refactoring model and helper

Coverage increased (+2.5%) to 86.761% when pulling 54e54698ac5e3f4fe755210c18295391fe19aa08 on ts07_duplicated_code_refactoring_model_and_helper into 3c3f4de32705a2b03abdaa06dd51b8d9a27c3a3d on development.


outgoing-port-avoid errors

Issue:
Explicitly listing port number in "outgoing-port-avoid" will error out the unbound will not start. It is expecting port range instead.
Port rage works. I had to replace my config with the rage rather than using port listing separated by commas.
Unbound version 1.21rc1

The notation for a port listing separated by commas is not supported. It is possible to repeat individual port numbers with new lines with outgoing-port-avoid: 13234 and outgoing-port-avoid: 13235 for example. It is also possible to list new lines of outgoing-port-avoid and use a port range "low-high" and with that set several ranges.
Statements of outgoing-port-permit: "low-high" can be mixed in, the lines apply in order, removing and adding port numbers to the total.


Github merge messages cause message check to fail

App should allow these commits to pass.
Example:
https://circleci.com/gh/kiwicom/iam/1080?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

Looks resolved.


Added intent check for front facing camera to fix bug raised in Issue…

… 586.
Please take a moment to fill out the following:
Fixes #586 .
Changes Proposed in this pull request:

When Front Camera is set to default, add check to see if additional intent is needed.

When is a stable release of this planned? It's a big issue in our application. Please do let me know.


Add support for using enums in place of strings

I have been using clap-rs for a while now and I find it very useful. The only annoying thing is that most things are stringly typed. For example, notice how we need to check for strings in the following example:
enum Mode {
    A,
    B,
    C,
}

let matches = App::new("example")
                        .arg(Arg::with_name("ModeA")
                                    .short("a"))
                        .arg(Arg::with_name("ModeB")
                                    .short("b"))
                        .arg(Arg::with_name("ModeC")
                                    .short("c"))
                        .group(ArgGroup::with_name("mode")
                                            .required(true)
                                            .args(&["ModeA", "ModeB", "ModeC"]))
                        .get_matches();

    let mode = if matches.is_present("ModeA") {
        Mode::A
    } else if matches.is_present("ModeB") {
        Mode::B
    } else {
        Mode::C
    };

    // Do something

Here we are using strings not only in the part related to the arguments but also to deal with them afterwards. I would like to keep all the strings (which are prone to errors) in one part. I think there is no way, right?
I would like something like (syntax is debatable):
let matches = App::new("example")
                        .arg(Arg::with_enum_value(Mode::A)
                                    .short("a"))
                        .arg(Arg::with_enum_value(Mode::B)
                                    .short("b"))
                        .arg(Arg::with_enum_value(Mode::C)
                                    .short("c"))
                        .group(ArgGroup::with_name("mode")
                                            .required(true)
                                            .enum(Mode)
                        .get_matches();

    let mode =  matches.value_of('mode');

    // Do something

Where the enum_args check that all enum values exhausted and matches.value_of('mode') returns the chosen enum value (not a string). If you do not want all values as arguments, you could do something like:
        .enum_values(&[Mode::A, Mode::B])

Something similar could be done for subcommands.

This is a problem ("stringly typed") I've been thinking about a lot, and have always leaned towards an auto serialized version to solve it although wasn't sure of a good way to do this.
Your way, using enums is a very cool idea that I hadn't thought of! On top of that, it could absolutely be added without breaking backwards compatibility.
I'm really excited to try this out and see how it plays out. My free time is a little limited over the next week, but I'll test out some ideas and see how it all plays out. I'll post back here for discussion on the topic.
Thanks for submitting this :+1:

I'm quite interested in this as well.  In particular, when I have a matches m.subcommand() block, I'd like rustc to tell me if I've added a new subcommand but failed to add the corresponding implementation.  If the subcommands correspond to an enum, then rustc's existing warning for non-exhaustive matches of an enum will handle that.

I think I can have an initial implementation of this done tomorrow if all goes as planned. I've played with some simple ideas and really like how it works thus far.
The hard part will be doing this in a way that isn't breaking if it changes the ArgMatches struct (i.e. ArgMatches<'a> -> ArgMatches<'a, A> is technically breaking. But I have some ideas for a way around this where all existing code should work as is...worse case scenario I bump to clap v3 as this is a big enough win that I'm willing to do so for all the reasons @joshtriplett and @hgrecco have mentioned, along with other such instances adding args, or changing args, etc (i.e. all the downsides of "stringly typed" things).

@kbknapp Sounds awesome!
In the same spirit as docopt's macro version, it'd be nice if clap could write the enum for me: I write the subcommands, and clap gives me back a freshly minted enum of subcommands.  Ditto for argument groups as @hgrecco suggested.  That said, this would be great even if I have to write the enum.

Good news, I've got this working with subcommands thus far. Next to implment Args and should be just as straight forward. You can see #465 for details, but this is what it looks like:
#[macro_use]
extern crate clap;
use clap::{App, SubCommand};

// Note lowercase variants, the subcommand will be exactly as typed here
// (because of this, cannot contain hyphens, or rust keywords...for those see below)
subcommands!{
    enum MyProg {
        show,
        delete,
        make
    }
}

// Alternatively, if you wish to have variants which display
// differently, contain hyphens ("-"), or use Rust keywords, one can use this variation of
// the macro
subcommands!{
    enum MyProgAlt {
        Show => "show",
        Delete => "delete",
        DoStuff => "do-stuff"
    }
}

fn main() {
    let m = App::new("myprog")
        .subcommand(SubCommand::with_name(MyProg::show))
        .subcommand(SubCommand::with_name(MyProg::delete))
        .subcommand(SubCommand::with_name(MyProg::make))
        .get_matches();

    match m.subcommand() {
        (MyProg::show, _) => println!("'myprog show' was used"),
        (MyProg::delete, _) => println!("'myprog delete' was used"),
        (MyProg::make, _) => println!("'myprog make' was used"),
        (MyProg::None, _) => println!("No subcommand was used"), // The "None" variant is automatically added to denote "No subcommand used"
    }
}

The macro does a good bit, but it can all be done manually if one so chooses. Things one would need to do in order to use an enum as the name

Implement clapp::SubCommandKey which defines two methods used internally by clap. One to denote the "none" variant, and one to convert from a "&str" to the enum cheaply.
Implement std::convert::AsRef<str> which does the opposite of enum->&str conversion

The macro actually does a little more than that, but it's not required. The macro also:

defines a variants() function which returns an array of &'static strs which contains the variant names
Implements std::fmt::Display for each variant
Adds the None variant.

I expect Args to similar and should be done soon. Once all is good, docs are updated, examples added, etc. I'll merge the PR.
This does contain a very slight breaking change that should affect almost no-one in the wild so I'm debating just doing a bump to 2.3 and giving fair notice to anyone it would affect...really I'm betting it's 1-2 people tops because it's kind of a strange use case that causes a break.

Nice!  That looks really promising.
A few things that jump out at me:
Rather than adding a None variant, might it make sense to return an Option instead?  Then, subcommand_name or subcommand can return Some(show) or None.  (Likely possible manually via the trait, but defaults matter, and it seems odd to add a None to an enum rather than wrapping it in Option.  Plus, Option has a pile of existing methods and helper functions.)
Also, could clap_app! and clap_yaml! automatically generate the enum?

@joshtriplett

Rather than adding a None variant, might it make sense to return an Option instead?

subcommand_name() returns an option, so the None value isn't really possible from there. It will return Option::None if no subcommand was used. Unfortunately subcommand() returns a tuple for convenience sake, and changing to an Option would be a much larger breaking change.
The more I think about it though, the more I kind of just want to bump to 3x and it correctly. i.e. Option the wrap the tuple, and remove the Option from the ArgMatches since it can't really ever be a Option::None value. And remove the None variant from the subcommand. We'll see....

could clap_app! and clap_yaml! automatically generate the enum?

I don't think so. I mean they technically could, but the enum would be limited to the scope of the function they're declared in so the usefulness is somewhat limited.

I agree with @kbknapp about the enum and the version.
About the enum, I think that explicit is better than implicit (Sorry about my python bias!).
Regarding the version,  My opinion is that even if the new version was fully backwards compatible, bumping to 3x is the right thing to do. This is a powerful new feature which will change the way we build big apps (and even small ones). Using enums will finally allow us to put all the strings in just one part (when we say that, eg, .short("c")) bringing Rust safety to argument parsing. Notice that clap already provides a lot of safety that is more annoying to implement by hand (for example with required). This feature closes the last hole.

In the same spirit of attempting to provide more structured types, would it make sense to support (but not require) filling in an argument structure?  For instance:
subcommands!{
    enum MyProg {
        log { verbose: bool, patch: bool, branch: String },
        diff { format: DiffFormat, context: usize, stat: bool, from: String },
    }
}

subcommands! could then parse the parameters and fill in the structure.
(It might make sense to write the structure and generate the options from that, or it might make sense to write the options and let clap generate the structure.  It might also make sense to have separate structures, and in any case to have a separate structure for the top-level non-subcommand options.  Either way, though, I'd love to have structured parameters.)

Waiting on Macros 1.1 in order to just use a custom_derive

Stoked to see this coming along. Type safety FTW

I would also be happy to have this. Custom derives are even stable now!

See kbknapp/clap-derive#6 for related discussion

Closing this issue in favor of #1104
This issue still serves as good back-reading though for the problem.


output

Environment (please complete the following information):

OS (e.g., Windows 10):
Extension version (e.g., 1.2.3):

Describe the bug:

Repro steps:

Expected behavior:

Additional context:

the outpuit not show in the web page

Closing due to missing details, feel free to reopen once more information has been added.


Insights Dashboard

We need to have the new site connected to the TO DO dashboard here https://msit.powerbi.com/groups/me/dashboards/47cdf664-d79f-43ee-a759-26981414797d?ctid=72f988bf-86f1-41af-91ab-2d7cd011db47.

This is working. Refreshing three times per day


Support for Chunked Transfer Encoding

It would be nice to add support for Chunked Transfer Encoding in the HTTP server.

@nmihajlovski any progress on this issue? It would be very useful to have chunked transfer encoding handled by rapidoid as well. Thanks !

Hi, I didn't make any progress on this yet... It has lower priority since most of the users don't need it.

Hi @nmihajlovski thanks for the reply, I understand. Looking forward to seeing support for this in future versions of rapidoid.


chore: add LICENSE file to all npm packages

Together with a new npm release of the modified fodlers this fixes https://github.com/benmosher/eslint-plugin-import/issues/1225

Coverage decreased (-0.2%) to 96.262% when pulling 000eb3e1f8b38e98cbcde4167a90bf18e2dd304d on opichals:copy-license-to-all-npm-packages-for-npm-publish into aed7a7391d014594b034fa92c4daf1a6d50e3f5a on benmosher:master.

Coverage decreased (-0.2%) to 96.262% when pulling 000eb3e1f8b38e98cbcde4167a90bf18e2dd304d on opichals:copy-license-to-all-npm-packages-for-npm-publish into aed7a7391d014594b034fa92c4daf1a6d50e3f5a on benmosher:master.

Coverage decreased (-0.2%) to 96.262% when pulling 000eb3e1f8b38e98cbcde4167a90bf18e2dd304d on opichals:copy-license-to-all-npm-packages-for-npm-publish into aed7a7391d014594b034fa92c4daf1a6d50e3f5a on benmosher:master.

Coverage decreased (-0.2%) to 96.262% when pulling 000eb3e1f8b38e98cbcde4167a90bf18e2dd304d on opichals:copy-license-to-all-npm-packages-for-npm-publish into aed7a7391d014594b034fa92c4daf1a6d50e3f5a on benmosher:master.

Coverage decreased (-0.2%) to 96.262% when pulling 000eb3e1f8b38e98cbcde4167a90bf18e2dd304d on opichals:copy-license-to-all-npm-packages-for-npm-publish into aed7a7391d014594b034fa92c4daf1a6d50e3f5a on benmosher:master.

let's make these gitignored and copied in via prepublish from the root, rather than duplicating the content.

@ljharb addressed

@ljharb Thank you!

Every package should have been released at this point with the license, ftr.


Support yup 1.0

Yup 1.0 has been released, but cannot be used with remix-validated-form due to version restrictions. This upgrades @remix-validated-form/with-yup to use yup 1.0 or later.

Thanks!


tolerate trailing newline in QR code payloads

The following invoice QR code is invalid, just because the last line has a newline at the end. This does not make sense and makes it more difficult to generate QR codes outside the app

That error message is misleading. Remove the newline from the above payload and it will be parsed correctly

Sorry, I was unclear with my message above, scanning the qr-code you posted, yields this log:
[log] [DEBUG]  ==> : Raw qrcode data: invoice-5Leu-verein.txt

Which means you accidentally put the title of the qr-code as the qr-code itself.
So that you can sleep better, I created a qr-code that has an extra new line at the end and it works with v1.8.8

Haha, my QR code in the OP was just a bad bug report ;-)
The bug was there, but my example should have been this:

anyway. The problem seems to be solved indeed


Get redis host from env variable SPDX_RDIS_HOST

Signed-off-by: K mehant<EMAIL_ADDRESS>

The only thing that is bugging me is SPDX_RDIS_HOST instead of SPDX_REDIS_HOST name. Not sure why @goneall suggested that in #193, maybe a typo. Let @goneall look into this PR and merge.

That was a typo - @kmehant please change to SPDX_REDIS_HOST - sorry for the confusion

The only thing that is bugging me is SPDX_RDIS_HOST instead of SPDX_REDIS_HOST name. Not sure why @goneall suggested that in #193, maybe a typo. Let @goneall look into this PR and merge.

That was a typo - @kmehant please change to SPDX_REDIS_HOST - sorry for the confusion

Done!

Thanks @kmehant !  I'll go ahead and merge.


Storage architecture

My current understanding is that it's same approach Lucene implements ?
Segments are independent indexes with their own metadata ?

Thanks for quick response and your effort developing this software.


box component

remove role name from aria labels
add box component

resolves #82

Pull Request Test Coverage Report for Build 6741d16d4624a3f4d0c4c6b6fdd4b865e012d6b8

0 of 11 (0.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 0.0%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

lib/doggo.ex
0
11
0.0%

Totals

Change from base Build ebf9d46bc1e23c938179857a0f7496baff5ef68e:
0.0%

Covered Lines:
0

Relevant Lines:
495

💛  - Coveralls


linux-firmware: Unrecognized git object type: tag

Building linux-firmware currently fails locally with:
nitialized empty Git repository in /nix/store/m1rj36cajnh0nmrjlcj0m44ccj01ynxz-linux-firmware-2021020/.git/
remote: Enumerating objects: 383, done.
remote: Counting objects: 100% (383/383), done.
remote: Compressing objects: 100% (374/374), done.
remote: Total 10822 (delta 202), reused 1 (delta 1), pack-reused 10439
Receiving objects: 100% (10822/10822), 367.12 MiB | 6.23 MiB/s, done.
Resolving deltas: 100% (7037/7037), done.
From https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware
 * [new branch]      main       -> origin/main
 * [new branch]      master     -> origin/master
 * [new tag]         20190312   -> 20190312
 * [new tag]         20190416   -> 20190416
 * [new tag]         20190514   -> 20190514
 * [new tag]         20190618   -> 20190618
 * [new tag]         20190717   -> 20190717
 * [new tag]         20190815   -> 20190815
 * [new tag]         20190923   -> 20190923
 * [new tag]         20191022   -> 20191022
 * [new tag]         20191215   -> 20191215
 * [new tag]         20200122   -> 20200122
 * [new tag]         20200316   -> 20200316
 * [new tag]         20200421   -> 20200421
 * [new tag]         20200519   -> 20200519
 * [new tag]         20200619   -> 20200619
 * [new tag]         20200721   -> 20200721
 * [new tag]         20200817   -> 20200817
 * [new tag]         20200918   -> 20200918
 * [new tag]         20201022   -> 20201022
 * [new tag]         20201118   -> 20201118
 * [new tag]         20201218   -> 20201218
 * [new tag]         20210208   -> 20210208
Unrecognized git object type: tag
Unable to checkout 20210208 from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git.
builder for '/nix/store/d3lj3ip1ypxl3iaww874s6xj80xgbb78-linux-firmware-2021020.drv' failed with exit code 1

To reproduce:
ISO_DRV=$(nix-instantiate nixos/release-combined.nix -A nixos.iso_minimal.x86_64-linux)
FIRMWARE_DRV=$(nix-store -q -R $ISO_DRV | grep linux-firmware)
nix-build $FIRMWARE_DRV --option substitute false

error: object b5637a2a32eefcfbb39f072abbb2e7eab96385ac: zeroPaddedFilemode: contains zero-padded file modes
fatal: fsck error in packed object
fatal: index-pack failed

The remote git repository is corrupted and would need a git fsck

error: object b5637a2a32eefcfbb39f072abbb2e7eab96385ac: zeroPaddedFilemode: contains zero-padded file modes
fatal: fsck error in packed object
fatal: index-pack failed

How do you get that? When I check out that repo and run git fsck I do see zeroPaddedFilemode: contains zero-padded file modes warnings but no fatal: fsck error in packed object

The remote git repository is corrupted and would need a git fsck

If I clone the repo, git fsck doesn't see problems. When I push it somewhere else and point ./pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix to that, it shows the same problem with that repo.

It seems like this happens because the tag looks like a hash (i.e. contains only hexadecimal characters). Before #104714 this worked because nix-prefetch-git's checkout_hash function worked (surprisingly) when a tag was passed as the hash argument. It might be better to specify rev = "refs/tags/${lib.replaceStrings ["-"] [""] version)"; than to use the commit hash.

It seems like this happens because the tag looks like a hash (i.e. contains only hexadecimal characters). Before #104714 this worked because nix-prefetch-git's checkout_hash function worked (surprisingly) when a tag was passed as the hash argument. It might be better to specify rev = "refs/tags/${lib.replaceStrings ["-"] [""] version)"; than to use the commit hash.

Ah, thanks! submitted #116306

I've opened #116307 for the nix-prefetch-git issue/regression (might affect other packages as well).
Thanks @logan12358 for noticing this!


Fatal error: Uncaught ArgumentCountError: Too few arguments to function Clue\React\Ami\Factory::__construct(), 0 passed in

I have tried to run event.php example code. But the following error occurred.
Fatal error: Uncaught ArgumentCountError: Too few arguments to function Clue\React\Ami\Factory::__construct(), 0 passed in....
Is it still working? I use PHP 7.4 on Windows 10.

Hi @soap, I don't know for sure but I think you're installing the current v1.1.0 of ami. This version doesn't support the new eventloop implementation. We're planning a new v1.2.0 which will be released in a couple days.
Until then just install the current developer version: clue/reactphp-ami": "dev-main",

Thanks @SimonFrings  It is working now.

@soap To keep you updated, I have just released version 1.2.0 of clue/reactphp-ami. You can start using the new version as of today :+1:

Ok I will try it. Thanks for information.