Trading Calendar API

Hi,
I'm trying to switch between calendars in zipline when running an algorithm through run_algorithm-method, but can't seem to get that working. I have tried to initiate get_calendar("LSE") in initialize-function, but it does not respond - it reverts to "NYSE" which is the default.
Anyone that knows how I can easily switch between calendars?
I have read the docs and read the few posts concerning trading calendar, but can't seem to get anywhere.
Any help is much appreciated.

Hi @I-Larsson so it looks like the issue is that in run_algo.py, trading calendar isn't actually being passed in; get_calendar() only gives you an instance of a specific calendar (it's not the behavior you're expecting).
So, the calendar you want to use needs to be passed in via keyword to run_algo.py where it creates an instance of TradingAlgorithm. The calendar you'd want to use would ideally be passed in via the CLI in __main__.py.
Then in algorithm.py, where it says:
    # If a schedule has been provided, pop it. Otherwise, use NYSE.
    self.trading_calendar = kwargs.pop(
        'trading_calendar',
        get_calendar("NYSE")
    )

The calendar you set would be stored in trading_calendar.
I can get around to fixing this at some point but otherwise if you'd like to open a PR to fix this on your own feel free to do that as well 😃

hi guys,
this is what I've done.
in backtest -
if name == 'main':
start = makeTS("2017-5-04"); end = makeTS("2017-5-04")  # this can go anywhere before the TradingAlgorithm

# load the bundle
bundle_data = load('quandl_ftse350', os.environ, None)
cal = bundle_data.equity_daily_bar_reader.trading_calendar.all_sessions
pipeline_loader = USEquityPricingLoader(bundle_data.equity_daily_bar_reader, bundle_data.adjustment_reader)
choose_loader = make_choose_loader(pipeline_loader)
env = TradingEnvironment(bm_symbol='^FTSE', exchange_tz='Europe/London',trading_calendar=get_calendar("LSE"),
                         asset_db_path=parse_sqlite_connstr(bundle_data.asset_finder.engine.url))

data = DataPortal(
    env.asset_finder, get_calendar("LSE"),
    first_trading_day=bundle_data.equity_minute_bar_reader.first_trading_day,
    equity_minute_reader=bundle_data.equity_minute_bar_reader,
    equity_daily_reader=bundle_data.equity_daily_bar_reader,
    adjustment_reader=bundle_data.adjustment_reader,
)

# the actual running of the backtest happens in the TradingAlgorithm object
bt_start = time()
perf = TradingAlgorithm(
    env=env,
    get_pipeline_loader=choose_loader,
    trading_calendar=get_calendar("LSE"),
    sim_params=create_simulation_parameters(
        start=start,
        end=end,
        capital_base=CAPITAL_BASE,
        trading_calendar=get_calendar("LSE"),
        data_frequency='daily'
    ),
    **{
        'initialize': initialize,
        'handle_data': handle_data,
        'before_trading_start': None,
        'analyze': None,
    }
).run(data, overwrite_sim_params=False,)
bt_end = time()

also needed to add some libraries to extension.py and tweaked the code in exchange_calendar_lse.py to handle royal events holidays
Timestamp('2002-06-03', tz='UTC'),
Timestamp('2002-06-04', tz='UTC'),
Timestamp('2011-04-29', tz='UTC'),
Timestamp('2012-06-04', tz='UTC'),
Timestamp('2012-06-05', tz='UTC')

]
@property
def adhoc_holidays(self):
return list(chain(
Royals,
))
Thanks Stuart

Some work being done on this branch

FreddieV4: Thank you for the clarification.
deltahedgetech: The algo seems to be responding to the calendar now with that method - thank you.

I am trying to implement Bitcoin data in Zipline.
My problems arise from the fact that Bitcoin does not have weekends or holidays in it calendar. So I don't know how to implement a proper calendar or actually no calendar.
Do you have any advise. Thank you!

Hi @ivanlen if you want to implement another calendar you could look at exchange_calendar_nyse.py or trading_calendar.py as examples and then modify it from there

Hi @FreddieV4, I'm trying to get a custom calendar for bitcoin as well. However, I couldn't find out how to include weekends looking at exchange_calendar_nyse.py and trading_calendar.py. Any ideas how to include weekends?
@I-Larsson, I managed to specify the calendar for my custom bundle via ~\.zipline\extension.py .
from zipline.data.bundles import register
from zipline.data.bundles.viacsv import viacsv

coinSym = {
    "BTC",
}

register(
    'csv',              # name this whatever you like
    viacsv(coinSym),    # function
    "COIN",                 # calendar_name, use the custom one crated.
)

Then in the calendar_utils.py, you can make sure the calendar_name is mapped to the custom_calendar.py stored under the folder zipline\utils\calendars\.
In calendar_utils.py
from zipline.utils.calendars.coin_calendar import CoinCalendar

_default_calendar_factories = {
    'NYSE': NYSEExchangeCalendar,
    'CME': CMEExchangeCalendar,
    'ICE': ICEExchangeCalendar,
    'CFE': CFEExchangeCalendar,
    'BMF': BMFExchangeCalendar,
    'LSE': LSEExchangeCalendar,
    'TSX': TSXExchangeCalendar,
    'us_futures': QuantopianUSFuturesCalendar,
    'COIN': CoinCalendar,
}
_default_calendar_aliases = {
    'NASDAQ': 'NYSE',
    'BATS': 'NYSE',
    'CBOT': 'CME',
    'COMEX': 'CME',
    'NYMEX': 'CME',
    'ICEUS': 'ICE',
    'NYFE': 'ICE',
}

Once you have the calendars ready or using the default ones, you can switch it by specifying the exchange metadata in bundle files.
example in quandl.py with line data['exchange'] = 'QUANDL'
metadata_frame : pd.DataFrame
        A dataframe with the following columns:
          symbol: the asset's symbol
          name: the full name of the asset
          start_date: the first date of data for this asset
          end_date: the last date of data for this asset
          auto_close_date: end_date + one day
          exchange: the exchange for the asset; this is always 'quandl'
        The index of the dataframe will be used for symbol->sid mappings but
        otherwise does not have specific meaning.
    """
    raw_iter = _fetch_raw_metadata(api_key, cache, retries, environ)

    def item_show_func(_, _it=iter(count())):
        'Downloading page: %d' % next(_it)

    with maybe_show_progress(raw_iter,
                             show_progress,
                             item_show_func=item_show_func,
                             label='Downloading WIKI metadata: ') as blocks:
        data = pd.concat(blocks, ignore_index=True).rename(columns={
            'dataset_code': 'symbol',
            'name': 'asset_name',
            'oldest_available_date': 'start_date',
            'newest_available_date': 'end_date',
        }).sort_values('symbol')

    data = data[~data.symbol.isin(excluded_symbols)]
    # cut out all the other stuff in the name column
    # we need to escape the paren because it is actually splitting on a regex
    data.asset_name = data.asset_name.str.split(r' \(', 1).str.get(0)
    data['exchange'] = 'QUANDL'
    data['auto_close_date'] = data['end_date'] + pd.Timedelta(days=1)
    return data

This issue should be fixed by this PR #1800 🙂


Add Final configuration for CoinjoinXT

Excellent! Coinjoin is coming!

Thanks @Rsync25, I'll add Taproot or Segwit for help have less block space during mixing coins avoiding spam on Bitcoin Network


Make generic version of QueryWithRowMapper and QueryWithResultSetExtractor virtual

I couldn't write unit tests for my dao because FakeItEasy was unable to mock non-virtual method QueryWithResultSetExtractorDelegate.
I've changed it to virtual one.

Thank you


updated uzbek docs pages

some pages were translated into Uzbek

@sanjarbek-ismatov I would land this PR, except we don't translate the API docs.  If you would remove uz/5x/api.md from the PR and resolve teh merge conflicts, I'd be happy to merge it.

Seems to have been abandoned :-(


Sprint 1 Enhancements

Sprint 1 Events Feedback

Filters should be multiselect for Hostname , Tag , Location.
Location should be a combination of both city and country.
In case there are no events planned in a month , show the month with a message “Events not scheduled yet in <>, Stay Tuned”
Jump to Month - Drop down option
Provide Date Range for filters
Directly navigated to current month

Enhancements completed , Test execution was completed as as part of Sprint 2 and the same was launched successfully on 6th Mar,2023


Updating this plugin is generally pretty slow...

It usually takes roughly 30 seconds to a minute to update on my laptop. The TypeScript compiler can usually compile itself in about the same period of time. Is there any way to speed up the update?

It usually takes roughly 30 seconds to a minute to update on my laptop.

Its because of the stuff that needs to download from package.json usually an updated release on ntypescript. That said most other packages (including e.g. linter) take about 30 seconds as well.

Is there any way to speed up the update?

Get a faster internet connection ¯\_(ツ)_/¯ Open for suggestion :rose:

It usually takes closer to a minute. Linter itself takes about a third of the time to update for me than this. I've seen this take up to 2 minutes to update a couple of times.
I don't really have a lot of control over my internet connection. I blame Comcrap on this one (there aren't a lot of alternatives).

@basarat
I honestly don't know what all goes on when this updates, though. IMHO, this is probably something better resolved by Atom than this.


chore(main): release 2.5.0

:robot: I have created a release beep boop
2.5.0 (2024-08-02)
Features

Add perf command (638fdfc)

Performance Improvements

Optimize is_white_space (5771b81)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v2.5.0
:sunflower:


CVE-2023-36053: Updated the Django requirement

This PR addresses the CVE-2023-36053 that was fixed in Django 3.2.20 Therefore the requirements for the project have been updated to the most recent Django 3.2 version.

Codecov Report

Merging #10 (91e6e22) into main (931dcba) will not change coverage.
The diff coverage is n/a.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##              main       #10    +/-   ##
==========================================
  Coverage   100.00%   100.00%
==========================================
  Files           25        14    -11
  Lines          486       231   -255
  Branches        26        26
==========================================
- Hits           486       231   -255

Flag
Coverage Δ

unittests
100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 11 files with indirect coverage changes

LGTM. However, we should probably figure out how or even whether to deal with vulnerabilities of this kind in the future as we're basically only providing a library based on Django, which in turn is only a dev requirement. We're not forcing anyone to install a vulnerable Django version via the install requirements in setup.py and a vulnerable version in a dev setup is probably a non-issue. Maybe we should reconfigure/disable the bot for vulnerabilities of this kind?
Nevertheless, :+1: for fixing the requirements and test workflow.

LGTM. However, we should probably figure out how or even whether to deal with vulnerabilities of this kind in the future as we're basically only providing a library based on Django, which in turn is only a dev requirement. We're not forcing anyone to install a vulnerable Django version via the install requirements in setup.py and a vulnerable version in a dev setup is probably a non-issue. Maybe we should reconfigure/disable the bot for vulnerabilities of this kind?
Nevertheless, 👍 for fixing the requirements and test workflow.

That is a valid argument, indeed. I don't know whether we can configure the dependabot within the project settings, but at least it should be possible to use a YAML-based configuration to define certain rules and behaviours. So maybe we can figure out how to restrict the checks to the setup.py requirements instead of the development requirements.


Update Add_New_Content.kt

Solved the bug of save button click, while clicking the button without adding content no snackbar appearing to notify user about empty content.

Fixes Issue #94

Changes proposed
There was an issue in the contional cheking , which is fixed in this updated Add_New_Content.kt
if (!PoemDes?.html!!.isNullOrEmpty()) is replaced by  if (!PoemDes?.html.isNullOrEmpty())

Check List (Check all the applicable boxes)

[X] My code follows the code style of this project.
[X] All new and existing tests passed.
[X] This PR does not contain plagiarized content.
[X] The title of my pull request is a short description of the requested changes.

Screenshots

Demo video
https://github.com/Taaveez/Taaveez-android/assets/91884990/de06f4c8-5e6b-459f-8530-b43c9b08cb9c

Note to reviewers

@Suryansh1720001 this issue seems duplicate, and solved in a lot of PRs, please take a look.

@Chayandev
Please update the functionality in the "Update Content" or "Edit Content" feature. After making the changes, provide a screen recording to demonstrate the updated functionality.

@Chayandev
Actually, this issue has already been assigned to someone else. I have asked him to handle the specific updates. If he is unable to update the functionality, then we will consider your pull request (PR).

Ok !
On Thu, 29 Jun, 2023, 3:51 pm Suryansh Prajapati, @.***>
wrote:

@Chayandev https://github.com/Chayandev
Actually, this issue has already been assigned to someone else. I have
asked him to handle the specific updates. If he is unable to update the
functionality, then we will consider your pull request (PR).
—
Reply to this email directly, view it on GitHub
https://github.com/Taaveez/Taaveez-android/pull/97#issuecomment-1612797164,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AV5A3PWQJMKRT6OESB5SCI3XNVJJ5ANCNFSM6AAAAAAZTGCW4U
.
You are receiving this because you were mentioned.Message ID:
@.***>


Problem in setting up a routing agent

While using /connections/create-invitation, I want to include routing keys in the invitation object but not able to figure out the way to do it, and when using /connections/{conn_id}/establish-inbound/{ref_id}, the routing_state of the connection becomes request and I want to make it active. Can you please tell a way to do these?

At present aca-py doesn't support this. It's on the to-do list.

If you'd like to take this and submit a PR, that would be a huge help.

@ankitkr1606 which RFC is you mention about? We are currently implementing RFC - 0211. Does it cover your needs?

@ankitkr1606 To answer your second question, it should be active if the router responded with a route-update-response message. Check your router agent for any errors.
Note: Both the agents must support the routing protocol.

Closing this as I think we have adequate support. Please reopen or add a new issue if there is more to cover.


Support letter-jumping in the module list

We have super neat auto-completion in the console, but still have to manually scroll around in the growing module list like some sort of internet barbarian :-)
We should support the use of module starting letter(s) jumping the scroll to the first valid matching module.
Bonus: Search or filter box to limit the displayed modules.

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29276242-support-letter-jumping-in-the-module-list?utm_campaign=plugin&utm_content=tracker%2F5279&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F5279&utm_medium=issues&utm_source=github).

I've wrote a (temporary) substring matcher which can be used to filter modules names or anything else.
See https://gist.github.com/MaloJaffre/ef05ae25f631c7eb3a12

Good start! There's already org.terasology.utilities.CamelCaseMatcher, which is used to complete  commands in the console. Press F1 to open the console, e.g. type setH, press TAB and it will auto-complete or suggest matching commands.

Oops, I hadn't seen that, but I think my implementation can be more efficient with a case-insensitive-sorted list, because it returns a contiguous sublist and doesn't use an inefficient regex.
However, the camel-case completion is very cool.
I think we can add my method in this class for perfomance-sensitive usages or for large lists.

Closing as fixed by #2222! The filtering works great and is much better than letter jumping.


Default to HTTP for "cURL" Request Option in Collection, Not GraphQL

I have checked the following:

[X] I use the newest version of bruno.
[X] I've searched existing issues and found nothing related to my issue.

Describe the bug
When creating a request from a collection in Bruno and selecting the cURL option, the default request type is currently set to GraphQL, which is not expected. The default should be HTTP when generating a cURL request.
Additionally, when a user pastes a cURL command, Bruno should automatically detect whether the request is HTTP or GraphQL based on the content of the command and adjust the settings accordingly
.bru file to reproduce the bug
NA
Screenshots/Live demo link
https://github.com/user-attachments/assets/da140e38-5494-453e-b9b1-c0e860aa973b

This issue has been fixed and is available in our latest release (1.36)!


Removing imports from init on internal_states

Removing imports from init.py on internal_states and fixing dependencies. Addressing issue #22

Merged locally branch lute/deathcode that addresses issue #24 and pushed all together on this PR.


Provide a separate AppDelegate for testing

The real app delegate should not be used for testing since it may have side effects like api requests, database request, UI logic etc.

Created PR https://github.com/rstgroup/xcode-project-template/pull/15


After expanding, text inside the button is truncated in Expander button.

Found during accessibility grading.
Tracking internal bug: https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/40139499
"Users with low vision will not able to consume the content of the button if it is not visible in Text scaling mode."

related: https://github.com/microsoft/react-native-gallery/issues/237


Update cypress test. Create project fail. Update project fail. Delete project fail.

Update cypress test base_actions_project_task_user.js new steps.
Add new className for elements.
Motivation and context

How has this been tested?

Checklist

[x] I submit my changes into the develop branch
[ ] I have added description of my changes into CHANGELOG file
[ ] I have updated the documentation accordingly
[ ] I have added tests to cover my changes
[ ] I have linked related issues (read github docs)
[x] I have increased versions of npm packages if it is necessary (cvat-canvas,
cvat-core, cvat-data and cvat-ui)

License

[x] I submit my code changes under the same MIT License that covers the project.
Feel free to contact the maintainers if that's a concern.
[x] I have updated the license header for each file (see an example below)

# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

Coverage increased (+0.07%) to 62.782% when pulling 8643dec97940f24eda6c320d7da10083158c50e1 on DmitriyOparin:upstream/do/update_cypress_test_base_actions_project_task_user into c126d2afeb30f1a255261b1b8be5ebd01b4455a9 on openvinotoolkit:develop.


Fix documentation bugs

Fix documentation issues stated below

#203
#188
#183
#177 by adding a note to tell users that keywords should be alphanumeric and should not contain any spaces
#174, #173, #148 and #149 by adding a note to tell users that tags should be alphanumeric and should not contain any spaces
#171 and #161 by changing the date format from yyyy-mm-dd to dd-mm-yyyy
#155 and #156 by adding changing tag-add to tag-add-p in the format and example
#152 by changing find to find-p in the format
#147

Codecov Report

Merging #212 (7760a84) into master (5d99777) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #212   +/-   ##
=========================================
  Coverage     70.20%   70.20%
  Complexity      909      909
=========================================
  Files           145      145
  Lines          3014     3014
  Branches        351      351
=========================================
  Hits           2116     2116
  Misses          793      793
  Partials        105      105

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


replace Gogs to Gitea on locale files

Current coverage is 2.27% (diff: 100%)

Merging #113 into master will increase coverage by 0.02%

@@            master      #113   diff @@
========================================
  Files           32        32
  Lines         7523      7523
  Methods          0         0
  Messages         0         0
  Branches         0         0
========================================
+ Hits           169       171     +2
+ Misses        7337      7336     -1
+ Partials        17        16     -1

Powered by Codecov. Last update 5667d4d...b4671c9

LGTM, although we didn't yet define a policy for updating those files...

If we accept #114, so we can merge this? Or we have to use a tanslation tool to do that?

#114 seems to be more than a policy, it's actually a proposal for a new development.
A policy could be something as simple as: "translation updates are accepted as pull-requests"

Yes. So let's LGTM first!


All width and height images attributes are now overwritten from CSS

https://github.com/zurb/foundation-apps/commit/ba78792c5373b4508795bccf6bdbb12297465a57
The commit above brings a lot of issues since it forces every single image to be displayed as 100% of their container if they do not override this rule explicitly, in CSS.
<img src="..." width="50" height="50">
This is no longer working; the width will be 100%, and the height still 50px, no need to explain why that this image won't look good ;-)

This change fixes a pretty bad issue with images and flexbox in Firefox, but you're right that it may be too sweeping of a change, especially since the specificity is higher than one class (.grid-content img).
We've seen the issue crop up multiple times now, but we can also just implement the fix manually in those areas.

Reverted with this commit: f9dafb5527c08910d97b4b53fa92aef573c2fab9


Support for Docker Event System

Docker enables to listen to its own Event-System by levering the docker events [Options] cli-command.
That way you can listen to specific events in your own application like create or health_status. This allows reacting to a specific event without polling and parsing the docker events yourself.
Example implementation in other libraries are

https://github.com/docker-java/docker-java/blob/master/src/main/java/com/github/dockerjava/api/command/EventsCmd.java and
https://github.com/spotify/docker-client/blob/master/src/main/java/com/spotify/docker/client/EventStream.java
--

Documentation: https://docs.docker.com/engine/reference/commandline/events/

@amihaiemil/z please, pay attention to this issue

@thatsich/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!

@thatsIch Thanks for the ticket! I will have a look over it these next few days :)

Job #296 is now in scope, role is DEV

Thanks for your contribution, @thatsich/z! If you would be a member of the project, you would now earn +15 reputation points, as explained in §29. You can join and apply to it, see §2.

@rultor release it, tag is 0.0.10

@rultor release it, tag is 0.0.10

@amihaiemil OK, I will release it now. Please check the progress here

@rultor release it, tag is 0.0.10

@amihaiemil Done! FYI, the full log is here (took me 3min)

@thatsIch I just released version 0.0.10, with a first sketch of the functionality. Please, try it, see if it works:
final Docker docker = new LocalDocker(...);
final Reader events = docker.system().events();

The Reader should read the streamed events, which are in Json format, as explained here:
https://docs.docker.com/engine/api/v1.37/#operation/SystemEvents

Thanks! I will take a look at it tomorrow

Since windows version of docker does not support unix sockets and the suggested [npipe protocol nor tcp protocol] (https://docs.docker.com/docker-for-windows/faqs/#/how-do-i-connect-to-the-remote-docker-engine-api) is apparently not supported by apache http component, I cannot test it at home.
Is there some other way to test it on windows?

@thatsIch

tcp protocol  is apparently not supported by apache http component

Are you sure? I think it should work fine if you specify the localhost URL with http://. In order to do that, you must use the RemoteDocket constructor which expects an HttpClient:

Is there some other way to test it on windows?
There is no other particular way of testing on Windows.

@thatsIch don't bother with it yet, I did some tests and it doesn't work. I'll have to release it again, but it's a bit more complex (I currently have no idea how to consume a Stream via HttpClient...).
I'll continue to look over it but, if you are in a hurry, you can try to make the request yourself, like this:
final Docker docker = new LocalDocker(
    new File("/var/run/docker.sock")
);
final HttpClient client = docker.httpClient();//already configured to work over the unix socket
final HttpGet get = new HttpGet("unix://localhost:80/1.37/events");
this.client.execute(get,...);

If you do it and manage to get it working, I'd appreciate a PR :)

Just to clarify; I get this stacktrace while calling it

Stacktrace

Exception in thread "main" java.lang.UnsatisfiedLinkError: The specified procedure could not be found
	at jnr.ffi.provider.jffi.AsmRuntime.newUnsatisifiedLinkError(AsmRuntime.java:40)
	at jnr.unixsocket.Native$LibC$jnr$ffi$0.socket(Unknown Source)
	at jnr.unixsocket.Native.socket(Native.java:92)
	at jnr.unixsocket.UnixSocketChannel.(UnixSocketChannel.java:101)
	at jnr.unixsocket.UnixSocketChannel.open(UnixSocketChannel.java:60)
	at com.amihaiemil.docker.UnixSocketFactory.createSocket(UnixSocketFactory.java:62)
	at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:119)
	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)
	at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:221)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:140)
	at com.amihaiemil.docker.HttpClientEnvelope.execute(HttpClientEnvelope.java:103)
	at Main.main(Main.java:25)

I just checked the code of Spotify which is using npipe . That puzzled me a bit. Maybe the error is something else. It seems using npipe is supported via the NpipeSocketConnectionFactory.

@thatsIch I don't really know about what docker-client is doing with npipe -- I actually started writing my own version because I thought theirs was of really poor quality :)

The job #296 assigned to @amihaiemil/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be no monetary reward for this job

@thatsIch It's not implemented, although not working at the moment. We'll continue the fix for it in #299. Closing this now, thanks!

The job #296 is now out of scope

Order was finished: +30 point(s) just awarded to @amihaiemil/z


Supervision API is inconvenient and not fault resistant

Hi all, I wanted to kick off a discussion about something that's been bugging me when using Celluloid for a while. I feel that supervisors aren't as good as they could be. For one, the API is pretty inconvenient. Compare pools:
pool = SomeActor.pool(size: 5)
pool.async.some_method

With supervisors:
actor = SomeActor.supervise
actor.async.some_method # no method error

The Wiki suggests doing the following:
supervisor = SomeActor.supervise
actor = supervisor.actors.first
actor.async.some_method

This feels like a hack to me, and it also encourages saving a handle to the actor, which is a bad idea because it is not fault tolerant. A better option is to go through the registry:
SomeActor.supervise_as(:some_name)
Celluloid::Actor[:some_name].async.some_method

Unfortunately this is pretty ugly.
Also, it's impossible to avoid race-conditions with this API. Celluloid at this point makes no guarantee that the actor retrieved this way is alive, even though it is supervised. If the actor has recently died and I run the above code, I get a DeadActorError.
Supervisors could introduce (optional) buffering, and wait for the replacement actor to start in case it has recently died, instead of simply dropping the message. This is impossible to achieve without race conditions with the current API, as far as I can see.
So my suggestion is to make supervisors more similar to pools in their API. This would allow for an expansion in functionality which could make supervisors more fault tolerant, and it would make the code more consistent and easier to read. It would allow us to abstract away the fact that what we're dealing with is a supervised actor, rather than a regular actor.

Will remember this during #511 and #550


(OUI Icons) New - checkInCircileEmpty

In addition to check, and checkInCircleFilled, we would like to add a non-filled version in a circle for check. This way icon can appear to "toggle" in some cases, and also be able to provide a balance in the UI where filled icons are somewhat rare.

circleCheck.zip

Approved!


Revert "feat: embedding progress bar"

Reverts qdrant/fastembed#71 because this breaks the Qdrant Mixin

Will merge when tests clear, since I was the reviewer on the original PR. This does not need another review.

https://github.com/qdrant/fastembed/blob/b01f882df7113b24b37391a8ada65ba5e4886bb7/fastembed/embedding.py#L179
We need an implementation to get the total length of the iterable documents for the progress bar.
As #71 was using len(documents), which breaks for generators.
We can transform the iterable to list and get the length, but that might have performance and memory implications for large data.

You can easily do progress bar outside of the fastembed, simply by wrapping interable into tqdm


Schema generator

Generates schema, both JSON and YAML, from the class definitions in orsopy.

Tests are currently failing because of (at least?) two things:

In "test_example.ort", data_source.sample.description contains a list of things that a YAML parser interprets as objects, not strings.  Are they supposed to be strings?  If so, we should wrap them in quotes.  If objects are ok, we should include that in the specification.
Orso.empty().columns == [Column(name=None)], which violates our column ordering specification.  See #67

In "test_example.ort", data_source.sample.description contains a list of things that a YAML parser interprets as objects, not strings. Are they supposed to be strings? If so, we should wrap them in quotes. If objects are ok, we should include that in the specification.

One of the discussions we had a couple of months ago was what to do with items contained in the ORT file that weren't in the specification. The decision there was that if there are items that aren't in the ORSO spec, and they're valid JSON, then they still need to be ingested and made available as attributes, and they shouldn't fail a validation.
If an item is in the specification, and it's not the correct type (thereby failing validation), then we have to decide if the assigned type is ok. From the draft spec:

description:   * free text, further details of the sample, e.g. size

To me this indicates a big long string. Does the json loader parse this:
#         description:
#             - amb: air
#             - layer: Ni, thickness 100 nm
#             - sub: Si

into a dict of strings?
Some relevant questions:

Why does the existing validator allow this through?
How does the existing validator allow this through?
Does the type annotation for description have to be developed further?

I think it's making it through the current schema by matching: "type": "array", "items": {} from the "anyOf" list.  This basically means  a list with no constraints on what's in it.
the python YAML parser takes this input:
description:
    - amb: air
    - layer: Ni, thickness 100 nm
    - sub: Si

and outputs
{'description': [{'amb': 'air'},
  {'layer': 'Ni, thickness 100 nm'},
  {'sub': 'Si'}]}

I just tracked down how the unconstrained list option got added to the previous schema - it looks like it was manually added about 4 months back when we were keeping a separate set of class definitions by @andyfaff ( see d8a2297208520d0f2b0411d62a7d52f3cb88a4b4 ), where List[Any] is added to the Union of description types.

I was coming up against this kind of thing quite often, as one tries to reduce inconsistency between the draft spec, the code, and the example files.
In a previous ORSO meeting we discussed sample description, which is why d8a2297 was added. People wanted to be able to do the kind of thing that was added in the test_example.ort in that commit (i.e. the ambient is this, the subphase is this, etc). That needed to be validated, so that's why header_schema.py was amended as it was.
When the specification says free text, I think it means something much more liberal than just a text string (which in validation space is not liberal at all).
It'd be good to either fix the spec, or the code, so they agree with each other.
@jochenstahn, can you chip in here?

I had a look at the issue with the test_example.ort, which definitely has a wrong header.
Concerning to @andyfaff  questions.

Some relevant questions:

Why does the existing validator allow this through?
How does the existing validator allow this through?
Does the type annotation for description have to be developed further?

The issue here is, that the "validator" is not strictly validating but producing valid output. This is done by trying to convert the given dictionary to the specification. In the given case of "Union[str, List[str]]" it first tries to convert the input into a string, if that would fail it would try to convert to a list of strings. As everything can be converted into a string, it never falls back to list.
While I would prefer to avoid Union types as much as possible to make it easier for software to interpret the data, if we want a list of strings as option, this has to be put into the union first. We could handle strings differently, but it might be handy to automatically convert inputs like numbers into strings if the specification requires strings.
That said, the description field seems to me like an obvious free text entry, so putting string there makes sense.
Then the only question we might need to discuss together is, do we like the current behavior of the class generation. The positive of the current behavior is the ability of reading files that are not strictly according to spec but can be interpreted as such while, at the same time, generating valid file headers from user input. The downside is for users not being pointed toward possible format issues.
My proposal would be, to keep the class generation as it is with some error tolerance and add a user API functionality to run schema checks on their files/dictionaries.

For the type of data_source.sample.description, allowing a list of anything seems like an arbitrary restriction (why does it have to be a list?)
If we are going to make that an unrestricted (including structure) attribute then typing.Any seems like a better choice than Union[str, List[str], List[Any], null]

Looking at the Slack discussion from early October that was adjacent to this topic, it seems to me that data_source.sample.description should probably be Union[str, List[str], List[Any], None]. Additionally, it should maybe be changed to be called composition (see the orsopy channel).

I see - the restriction to lists makes a lot more sense in the context of a "composition" (layers) field

Then the class should use:
Optional[Union[list, str]
As List[Any] includes List[str] so it is not changing the specification with the additional Union. As described above, the list should come first so conversion to list is tried first before falling back to str. I don't think the Any type has been implemented in _resolve_type but a simple list type should work and have the same effect.

Sorry @aglavic I saw your comment after I pushed, and I will use your suggestion instead of adding List[Any]

Now the only remaining failing test is because the output of Orso.empty() doesn't match our specification (it doesn't have the minimum two columns Qz and R)
Once we figure out what we want to do about that I think this can be merged.

I'd see three good options to deal with the columns list:

Make columns an optional argument with a default_factory to generate the correct columns.
Make a custom empty method for the Orso class. This is most straight forward.
Define a new ColumnsList class that has a specific definition of empty or default, not sure how this would play with a schema. On the other hand, the class could be used for checks of the user input columns. (That said, I don't think this is a good solution.)

For 1. we'll need to update Orso.init and Column:
class Orso(Header):
...
    columns: Optional[List[Column]] = field(default_factory=Column._default_factory)
...
    def __init__(
...
        columns: List[Column] = None,
...
        if columns is None:
            columns=Orso.__dataclass_fields__['columns'].default_factory()
...

class Column(Header):
...
    @classmethod
    def _default_factory(cls):
        return [Column('Qz'), Column('R')]

For 2. we just need a change in Orso to add the custom method:
    @classmethod
    def empty(cls) -> "Orso":
        """
        Create an empty instance of the ORSO header with
        all non-optional attributes as :code:`None`.

        :return: Empty Orso class.
        """
        res=super(Orso, cls).empty()
        res.columns=[Column('Qz'), Column('R')]
        return res

I'd vote for number 2. as it is straight forward and does not modify the class attributes.

There's also the option to not add any columns by default, which would also pass validation
    @classmethod
    def empty(cls) -> "Orso":
        """
        Create an empty instance of the ORSO header with
        all non-optional attributes as :code:`None`.

        :return: Empty Orso class.
        """
        res = super(Orso, cls).empty()
        res.columns = []
        return res

@aglavic number 2 sounds ok, as does @bmaranville. It's worth considering how we construct an OrsoDataset though. This object is constructed with a header (info) and the data. An exception is raised if this object is constructed with a disagreement between the number of columns in the header and the number of columns in the data. I'm wondering if we should add an optional column parameter to OrsoDataset construction that allows for columns to be overridden in the header at this point. Or, if the column numbers aren't equal to auto-set the first 4 column names.

Since there seems to be no objection to Artur's plan then, I'll implement it (initialize the first two columns as Qz and R).  Maybe we can start another ticket for the concerns raised by @andyfaff  for overriding columns when initializing the OrsoDataset class.
So far I haven't run into any issues by adding columns to both the data and the header at the same time, then collating and initializing as an OrsoDataset, so that the number of columns always matches the data.  If a different workflow were followed there might be issues.

This is ready for review, I think.

Implementation is good, have a look if you want to move the Pydantic code as I proposed.

Because pydantic's dataclass implementation imports and calls dataclasses.dataclass directly, we cannot monkeypatch dataclasses to get what we want.
An alternative that has minimal impact on the core orsopy library is to do an indirect import of dataclass - how would you feel about something like
# orsopy/fileio/base.py
from local_dataclasses import dataclass
...

and then local_dataclasses.py simply imports from dataclasses, as
# orsopy/fileio/local_dataclasses.py
from dataclasses import dataclass

This would then be easy to monkey-patch after the fact by setting local_dataclasses.dataclasses = pydantic.dataclasses before doing schema generation.

See the schema_indirect_import branch for an implementation of the indirect import approach described above.

See the schema_indirect_import branch for an implementation of the indirect import approach described above.

I think this solution is good. The own dataclasses module can also deal with the fix from #72. We could also choose later to use completely our own implementation of the dataclasses functions by copying from one version of the python library to get rid of the possible issue of breaking due to API changes.

I merged in the implementation from schema_indirect_import.  I need to do some formatting I guess.

Ok, @aglavic the new implementation is ready to merge I think.  @andyfaff any thoughts?

I'm not fully across all the meta programming here. If you're happy with it, then I think you should merge it.

I am happy to agree with @andyfaff on this.


Failure to upload in-toto link metadata to Rekor

@jspeed-meyers @SantiagoTorres  thank you guys so much for you swift response. Let me summarise the issue i have faced.
I am currently exploring in-toto + Rekor stack.  Basically i am trying to generate signed metadata for each supply chain step ( e.g. git checkout code, run unit test) using in-toto cli  (https://in-toto.readthedocs.io/en/latest/command-line-tools/in-toto-run.html)
in-toto-run <named arguments> [optional arguments] \
	 -- <command> [args]

The output of previous step is link file, you can find the specs here https://github.com/in-toto/docs/blob/master/in-toto-spec.md#44-file-formats-namekeyid-prefixlink
After generating .link file, I want to leverage on Rekor transparency log to store this signed metadata. i saw In-Toto Attestations is listed as supported types here , so i i tried with the command
 rekor-cli upload --rekor_server https://rekor.sigstore.dev --artifact git-metadata.a0a78898.link  --type intoto -public-key mykey.pub

but it gave this error
[POST /api/v1/log/entries][400] createLogEntryBadRequest  &{Code:400 Message:Error processing entry: Accepted signatures do not match threshold, Found: 0, Expected 1}

I am very new to Rekor and in-toto, want to ask two questions:

Does link file generated by in-toto cli follow in-toto attestation schema which is supported by Rekor?
If not, how should i convert  the link meta to schema that can be consumed by Rekor?  or do i need to add a new type by myself following the steps on https://docs.sigstore.dev/rekor/pluggable-types ?

Hope i have made problem clear. Let me know if you need any more clarifications! Thank you :)
Originally posted by @hanyuwang1993 in https://github.com/sigstore/rekor/issues/665#issuecomment-1058714515

Rekor does support in-toto but either:

It's looking for something other than the link metadata format, or
The link metadata you're generating is not correctly signed (e.g., mismatched keys)

Can you successfully in-toto-verify the resulting file? If not, that points to (2).
Regarding (1), it looks like there could be a version mismatch: the Rekor tree for in-toto has a schema for "v0.0.1"; the in-toto website links to "v0.9". CC @adityasaky

Does rekor support link metadata, or just ITE-6 attestations? I'm personally unaware...
As for the version mismatch, the in-toto website still points to the specification which is still v0.9. I'm guessing the v0.0.1 is an initial pass at an ITE-6 attestation. Probably needs to be bumped though? The versions do need to be synced in a sane manner to avoid confusion.

It used at least haha. The early rekor impl was exclusively in-toto stuff

Actually, it is more likely it's a DSSE problem. Aditya we don't have DSSE support for in-toto python right?

No, we don't. Did rekor update to only supporting DSSE?

That is my understanding. [Recently there was a change to better support chains ](https://github.com/sigstore/rekor/pull/565#issuecomment-1000538344]


Upgrade to Next v12

Check if the existing project is work with the rust compiler.
Configuration for Jest: https://nextjs.org/docs/testing#setting-up-jest-with-the-rust-compiler

Pay attention to this as well: https://nextjs.org/docs/upgrading#nextimage-changed-wrapping-element


add mbtiles support

Codecov Report
Patch coverage: 100.00% and project coverage change: +0.01 :tada:

Comparison is base (4d40312) 99.08% compared to head (0f2aafa) 99.10%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #148      +/-   ##
==========================================
+ Coverage   99.08%   99.10%   +0.01%
==========================================
  Files          72       73       +1
  Lines        1318     1342      +24
  Branches      199      204       +5
==========================================
+ Hits         1306     1330      +24
  Misses         12       12

Impacted Files
Coverage Δ

src/layer/RLayerRasterMBTiles.tsx
100.00% <100.00%> (ø)

src/layer/RLayerWMTS.tsx
89.74% <100.00%> (ø)

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

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


updateSchema for Plugins

This request is adding a new method to shopware's plugin bootstrap, making it possible to update the schema without killing the data inside the plugin tables, and also without killing the entire database (but keeping plugin tables), when taking use of SchemaTool::updateSchema

Thank you @scrippi. We appreciate your contribution.
Unfortunately we do not recommend the schema manager as a tool to create the database migrations.
A automatic schema migration can never be as safe as a handwritten migration, especially when it comes to migration of the actual user data .
We will publish a blog post about plugin update method best practices soon.


Add global expressions

Some expressions should be drawn in every single graph, like deploy times. It would be very cumbersome to edit every single graph and add the line to show deploys, so provide a way to define expressions globally.
Doesn't need to be done before #115 is solved.

Solved differently by adding annotations #187.


Access to DFT calculated properties

Hi,
I have been following your work and noticed that the (DFT) property distribution of the 60K tmQMg dataset from SI Fig 13 differs from the xtb calculated results (ground_truth_fitness_values.csv).

Is it possible to access the DFT calculated data?
Thank you!

Hi,
thank you for you interest in our work! Can you clarify what exactly you are interested in: the DFT properties of the tmQMg dataset or the 1.37M space?

Hi,
thank you for you interest in our work! Can you clarify what exactly you are interested in: the DFT properties of the tmQMg dataset or the 1.37M space?

Hi,
Thank you for your response. I would prefer DFT properties for the 1.37M space, if available, but the properties of the tmQMg dataset are also helpful!

Due to computational constraints we have calculated the quantum properties of the 1.37M space only at the xTB level.
You can find the quantum properties of the tmQMg dataset on the associated GitHub page.
I hope this helps!


feat: flashbots_validateBuilderSubmissionV4

This builds on #12168 and adds the new V4 RPC for Pectra.

I added a _v4 unit test (and renamed the old test _v3).  Happy to consider any ideas for removing duplicate code, I tried adding an intermediate method like ValidationApi::validate_rpc_params(payload, sidecar, bid_trace, registered_gas_limit) -> RpcResult<()>) but it felt weird having a method in ValidationApi return an RpcResult when all the other core methods return Result<(), ValidationApiError> and it didn't save that much repetition.


[Bug] [1.1.2] FileReader and BufferedReader are not closed in final clause

Search before asking

[X] I searched the issues and found no similar issues.

Linkis Component
linkis-commons
What happened + What you expected to happen
module: linkis-cs-client
class: org.apache.linkis.cs.client.test.test_multiuser.TestChangeContext

FileReader and BufferedReader are not closed in final clause
Relevent platform
all
Reproduction script
no
Anything else
no
Are you willing to submit a PR?

[ ] Yes I am willing to submit a PR!

I want to fix this issue. Please assign to me.


m365 : The term 'm365' is not recognized as the name of a cmdletBug

Description
PS C:\POC\react-teams-lead-dashboard> npm i -g @pnp/cli-microsoft365
C:\Program Files (x86)\Nodist\bin\microsoft365 -> C:\Program Files<EMAIL_ADDRESS>C:\Program Files (x86)\Nodist\bin\m365 -> C:\Program Files<EMAIL_ADDRESS>C:\Program Files (x86)\Nodist\bin\m365_comp -> C:\Program Files<EMAIL_ADDRESS>npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules@pnp\cli-microsoft365\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

<EMAIL_ADDRESS>updated 1 package in 5.09s
PS C:\POC\react-teams-lead-dashboard> m365
m365 : The term 'm365' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At line:1 char:1
m365

  + CategoryInfo          : ObjectNotFound: (m365:String) [], CommandNotFoundException
  + FullyQualifiedErrorId : CommandNotFoundException

PS C:\POC\react-teams-lead-dashboard> ls
Directory: C:\POC\react-teams-lead-dashboard

Mode                 LastWriteTime         Length Name

d-----        05/08/2022     22:38                .devcontainer
d-----        05/08/2022     22:38                assets
d-----        05/08/2022     22:38                config
d-----        05/08/2022     22:57                dist
d-----        05/08/2022     22:42                lib
d-----        05/08/2022     22:41                node_modules
d-----        05/08/2022     22:43                release
d-----        05/08/2022     22:43                sharepoint
d-----        05/08/2022     22:38                src
d-----        05/08/2022     22:38                teams
d-----        05/08/2022     22:57                temp
-a----        05/08/2022     22:38            334 .gitignore
-a----        05/08/2022     22:38            312 .yo-rc.json
-a----        05/08/2022     22:38            407 gulpfile.js
-a----        05/08/2022     22:41         913882 package-lock.json
-a----        05/08/2022     22:38           1242 package.json
-a----        05/08/2022     22:38           4584 README.md
-a----        05/08/2022     22:38            772 tsconfig.json
-a----        05/08/2022     22:38            826 tslint.json
PS C:\POC\react-teams-lead-dashboard>
Steps to reproduce
PS C:\POC\react-teams-lead-dashboard> npm i -g @pnp/cli-microsoft365
C:\Program Files (x86)\Nodist\bin\microsoft365 -> C:\Program Files<EMAIL_ADDRESS>C:\Program Files (x86)\Nodist\bin\m365 -> C:\Program Files<EMAIL_ADDRESS>C:\Program Files (x86)\Nodist\bin\m365_comp -> C:\Program Files<EMAIL_ADDRESS>npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules@pnp\cli-microsoft365\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

<EMAIL_ADDRESS>updated 1 package in 5.09s
PS C:\POC\react-teams-lead-dashboard> m365
m365 : The term 'm365' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At line:1 char:1
m365

  + CategoryInfo          : ObjectNotFound: (m365:String) [], CommandNotFoundException
  + FullyQualifiedErrorId : CommandNotFoundException

Expected results
i dont know what expected results are i dont see any.
Actual results
PS C:\POC\react-teams-lead-dashboard> npm i -g @pnp/cli-microsoft365
C:\Program Files (x86)\Nodist\bin\microsoft365 -> C:\Program Files<EMAIL_ADDRESS>C:\Program Files (x86)\Nodist\bin\m365 -> C:\Program Files<EMAIL_ADDRESS>C:\Program Files (x86)\Nodist\bin\m365_comp -> C:\Program Files<EMAIL_ADDRESS>npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules@pnp\cli-microsoft365\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

<EMAIL_ADDRESS>updated 1 package in 5.09s
PS C:\POC\react-teams-lead-dashboard> m365
m365 : The term 'm365' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At line:1 char:1
m365

  + CategoryInfo          : ObjectNotFound: (m365:String) [], CommandNotFoundException
  + FullyQualifiedErrorId : CommandNotFoundException

PS C:\POC\react-teams-lead-dashboard> ls
Directory: C:\POC\react-teams-lead-dashboard

Mode                 LastWriteTime         Length Name

d-----        05/08/2022     22:38                .devcontainer
d-----        05/08/2022     22:38                assets
d-----        05/08/2022     22:38                config
d-----        05/08/2022     22:57                dist
d-----        05/08/2022     22:42                lib
d-----        05/08/2022     22:41                node_modules
d-----        05/08/2022     22:43                release
d-----        05/08/2022     22:43                sharepoint
d-----        05/08/2022     22:38                src
d-----        05/08/2022     22:38                teams
d-----        05/08/2022     22:57                temp
-a----        05/08/2022     22:38            334 .gitignore
-a----        05/08/2022     22:38            312 .yo-rc.json
-a----        05/08/2022     22:38            407 gulpfile.js
-a----        05/08/2022     22:41         913882 package-lock.json
-a----        05/08/2022     22:38           1242 package.json
-a----        05/08/2022     22:38           4584 README.md
-a----        05/08/2022     22:38            772 tsconfig.json
-a----        05/08/2022     22:38            826 tslint.json
PS C:\POC\react-teams-lead-dashboard>
Diagnostics
m365
m365 : The term 'm365' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At line:1 char:1

m365

  + CategoryInfo          : ObjectNotFound: (m365:String) [], CommandNotFoundException
  + FullyQualifiedErrorId : CommandNotFoundException

CLI for Microsoft 365 version
no version
nodejs version
V14.15.0
Operating system (environment)
Windows
Shell
PowerShell
cli doctor
PS C:\POC\react-teams-lead-dashboard> cli doctor
cli : Cannot find path 'C:\POC\react-teams-lead-dashboard\doctor' because it does not exist.
At line:1 char:1

cli doctor

  + CategoryInfo          : ObjectNotFound: (C:\POC\react-teams-lead-dashboard\doctor:String) [Clear-Item], ItemNotFoundException
  + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ClearItemCommand

Additional Info
PS C:\POC\react-teams-lead-dashboard> cli doctor
cli : Cannot find path 'C:\POC\react-teams-lead-dashboard\doctor' because it does not exist.
At line:1 char:1

cli doctor

  + CategoryInfo          : ObjectNotFound: (C:\POC\react-teams-lead-dashboard\doctor:String) [Clear-Item], ItemNotFoundException
  + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ClearItemCommand

Hi @nicetohaveyou,
Thanks for reaching out to us!
Question: I see a slightly irregular nodejs folder (C:\Program Files (x86)\Nodist\bin) Could you verify that it is included in your PATH variable. That's probably the reason the m365 command does not resolve to its executable.

Hi @martinlingstuyl,
I am also getting the same error. I am trying to create CD pipeline in Azure DevOps to deploy sppkg to SharePoint. I was getting error "The system cannot find the file specified." when running task to login to Sharepoint.
When I tried to login using m365 cli on one of my VM I was getting the same error:
m365 login --authType password --userName<EMAIL_ADDRESS>--password ***
The system cannot find the file specified.

When I ran "npm view @pnp/cli-microsoft365" to check details on m365 CLI, I got below output:
C:\Users\User>npm view @pnp/cli-microsoft365

<EMAIL_ADDRESS>| MIT | deps: 24 | versions: 488
Manage Microsoft 365 and SharePoint Framework projects on any platform
https://pnp.github.io/cli-microsoft365/

keywords: office 365, microsoft 365, sharepoint framework, o365, m365, spfx, sha
repoint online, sharepoint, microsoft teams, microsoft graph, microsoft flow, az
ure active directory, azure ad, azure, microsoft

bin: m365, m365_comp, microsoft365

But When I run "m365 version" I'm getting below error:
C:\Windows\system32>m365 version
'm365' is not recognized as an internal or external command,
operable program or batch file.

Nodejs path(C:\Program Files\nodejs) was already included in PATH variable.
nodejs version: V14.15.0
Operating system: Windows
Shell: PowerShell

Hi @nicetohaveyou,
Can I assume your problem is solved? If so I can close this issue.
Please let us know 👍

Closing this issue in favor of #3612

i want to know why this issue was closed, when there was no resolution. I have ran it from the docker yet face the issue. It is not resolved.

Ah sorry, that's my bad, due to the other question that was asked in between.
I believe a while back @martinlingstuyl asked you for more information here: https://github.com/pnp/cli-microsoft365/issues/3565#issuecomment-1207457556. Could you please double check your $PATH variable to verify that Node is in there?

Do i need to worry about the $PATH when it is been run from the docker where the environment is already configured?

If the command cannot be found, the reason must be that it is either not installed or is not on your PATH.
Are you in a PowerShell terminal? You can check where the global packages are being installed and verify whether they are on your path as follows:
npm root -g

Write-Host $env:path

If the directory is not in the PATH, you should update the PATH.

@nicetohaveyou did you have a chance to look at @martinlingstuyl suggestion?

Closing due to lack of response

As an update, I went back to using npm install -g @pnp/cli-microsoft365 (with the -g) and it seems to install now. Typically I try to keep these commands relatively portable to be able to run as a standard user if need be, but somewhere along the line, \node_modules.bin has gone missing from the path.

Hi @29039, yeah you have to be very careful that the node_modules/.bin folder is on your Path.
What you can do is add it to your path (within the ps session) from within your script, using [System.Environment]::SetEnvironmentVariable()


Ticket/17 button reset

Hi @carmenpmoreno!
Here is the functionality to reset the state, input data, and preview of the card.
Any doubt you tell me ;)

Hi! It's worf great! you can merge it!


"No applicable files found" when font file is named (like) "A[aa]a.ttf"

Describe the issue

A font file named A[aa]a.ttf leads fontbakery to report "No applicable files found"
A font file named A[aa].ttf works just fine

(Note the "a" after the "]")
$ fontbakery check-universal A\[aa\]a.ttf
No applicable files found
usage: fontbakery check-universal [-h] [--configuration CONFIGFILE] [-c CHECKID]
                                  [-x EXCLUDE_CHECKID] [-v] [-l LOGLEVEL]
                                  [-m LOGLEVEL_MESSAGES] [--succinct] [-n] [-C] [-S]
                                  [-L] [-F] [--dark-theme] [--light-theme]
                                  [--timeout TIMEOUT] [--json JSON_FILE]
                                  [--badges DIRECTORY] [--ghmarkdown MD_FILE]
                                  [--html HTML_FILE] [-g ITERATED_ARG] [-o ORDER]
                                  [-J JOBS] [-j]
                                  [files ...]

$ ls -l A\[aa\]a.ttf
-rw-r--r--@ 1 just  staff  463580 Jan  9 13:09 A[aa]a.ttf

Additional context
This is with fontbakery==0.8.11a8
The actual contents of the file doesn't seem to affect this issue (I tried with two different valid fonts).
Cc: @BlackFoundry

What is the stuff you place between the square brackets? Are those VF axis tags?
If so, would it be OK for fontbakery to simply ignore any extra characters placed after the brackets, still treating the filename as indication that this is a variable font?
I am also curious to learn what's the purpose of those extra characters in your fontfile naming scheme.

What is the stuff you place between the square brackets? Are those VF axis tags?

We do yes, but the contents of that part does not affect the problem. That's why I reduced it to this simple example. Which is enough to make it reject the font.

If so, would it be OK for fontbakery to simply ignore any extra characters placed after the brackets, still treating the filename as indication that this is a variable font?

Why would it treat the filename as an indication that it is or is not a variable font? The presence of fvar should determine that, nothing else. Checking whether the filename conforms to one naming scheme or other is fine and useful, but if fontbakery is drawing conclusions based on the filename alone, that seems misguided to me.

I am also curious to learn what's the purpose of those extra characters in your fontfile naming scheme.

Why does it matter? This is a valid font with a file name, and fontbakery gives a confusing error message and rejects the font outright. It's fine if fontbakery reports a FAIL on this filename, but it should be no reason to not process the font.

we do infer familyname, stylename and eventual VF axes by inspecting the filename, so that we can later lookup these same things inside the font binary and make sure there's no mismatch between filename and actual binary content

But this should be local to a check, and should work the other way around: "given this and that family name, style name, VF axes etc. as seen in the font data we expect the filename to be XXX". The font must always be the source of truth, and not the filename.

would it be a solution for this if we placed filename parsing inside vendor specific profiles?

No.
I don't mind that fontbakery is opinionated about filenames in specific checks (and I often appreciate it), but fontbakery should work on any font regardless of the filename. That's just a very fundamental issue. I seriously don't understand how filename parsing can be seen as something bigger than "a check".

It's as if fontbakery decides to not process a font because it doesn't contain a glyph for "a".

Are we perhaps having a misunderstanding? To be ultra clear: a font file named A[aa]a.ttf is not checked at all. It's not one check that is failing, it is all of fontbakery that fails to recognize the font file.

The font must always be the source of truth, and not the filename.

big 👍 on that - incredible that this even needs to be spelled out

Btw, just today I had fontbakery also not process a while called ShantellSans-Italic[BNCE,INFM,SPAC,wght].converted.ttf. The .converted was added by a script that I used. It was indeed checked when pointing fontbakery to *.ttf, but only while other fonts were indeed present in the same folder. As soon as that file existed on its own, even *.ttf wouldn't find the file.
That's probably a good bit of information in a first step of fixing this without changing the entire source of truth around.

it is all of fontbakery that fails to recognize the font file.

Yes, I understood that, and I agree it is a serious bug that needs fixing.
I am just taking the opportunity to discuss the big picture instead of making a quick dirty fix with no deeper reasoning on the best way of doing things

with no deeper reasoning on the best way of doing things

This reasoning should be plenty: "fontbakery should not reject a font file without any checking based on the filename".

Also, we're dealing with statics, too, not just VFs. When checking for whether or not the Bold bit is set in fsSelection, for example, I don't see how else the truth can be sourced other than the file name.
It's great that we're talking about this today, as I'm just now reworking the style condition of the fontbakery’s GF profile that has so far only returned useful values for statics and now we're retouching it for VFs.

The font must always be the source of truth, and not the filename.

big 👍 on that - incredible that this even needs to be spelled out

No, its been gf policy for over a decade that the filename is SOT for gf profile: That's what users see when managing files, not internal metadata, and it's trivial to edit to correct.

@justvanrossum, what is the meaning of the extra chars after brackets on your file naming scheme?
In case the information is not confidential, could you please let me know the real file name instead of A[aa]a.ttf? I'm legitimately curious to see what is appended to the filename in your case.

ok. Similar to Yanone's case. Thanks for the answer.

The bug is here:
https://github.com/googlefonts/fontbakery/blob/c7c546ef0f5cdd350b537b425459ace221f7a829/Lib/fontbakery/fonts_profile.py#L58-L62

I was planning to fix it after lunch (I am actually cooking right now, :-D).
But if you're already with your hands at the code, a PR would also be appreciated if you feel like doing it. I can review your PR later.

The font must always be the source of truth, and not the filename.

big 👍 on that - incredible that this even needs to be spelled out

No, its been gf policy for over a decade that the filename is SOT for gf profile: That's what users see when managing files, not internal metadata, and it's trivial to edit to correct.

If it’s some file name structure is mandatory, the error message shoudl at least be clearer than "No applicable files were found"; we thought the binary was corrupted somehow…
But I think Just and Cosimo are right, file name should be just a check, and not block the entire checking process.

Yes, they're right. I agree. No doubt about this. We'll fix asap.

thanks, @justvanrossum


Use WebdriverIOs driver setup mechanism

This patch will remove chromedriver and wdio-chromedriver-service in favor of WebdriverIOs own driver setup mechanism.
Note: this currently doesn't work yet as Chrome for testing started to release Chromedriver starting v115. VS Code however currently still relies on v114 for their latest VS Code release.

If I set up a new project via wdio/cli and running wdio config it doesn't add ts-node to my dependencies. Maybe the setup can add it to the package.json.
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'ts-node' imported from /workspaces/monorepo/project
    at new NodeError (node:internal/errors:405:5)
    at packageResolve (node:internal/modules/esm/resolve:887:9)
    at moduleResolve (node:internal/modules/esm/resolve:936:20)
    at defaultResolve (node:internal/modules/esm/resolve:1129:11)
    at nextResolve (node:internal/modules/esm/loader:163:28)
    at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
    at ESMLoader.import (node:internal/modules/esm/loader:524:22)
    at initializeLoader (node:internal/process/esm_loader:75:58)
    at loadESM (node:internal/process/esm_loader:90:11) {
  code: 'ERR_MODULE_NOT_FOUND'
}

@christian-bromann version 1.86.0 of VS Code shipped with version 118.0.5993.159 of Chromium. Would it be possible to make this change now?

I haven't been able to make progress on this, if anyone wants to push it over the goal line I would appreciate it.

You've got our eyes on it @christian-bromann. How can we help? I'd suggest splitting the changes to the docs/imports out into a small quick PR, and we can focus on the behaviour changes separately.

I hope to be able to take a look at this sometime this week. If you like to take this one feel free.

Closing in favor of #105 ... thanks @seanpoulter 🙌


Convert to black and white: on by default

"Convert to black and white" is on by default. I suggest changing this to "off", as few people will want their web pages in monochrome. Apart from that it is good.

Yeah, It take me a while to find the option to change it "off" :v

@ttpro1995 Where to change it?

@ttpro1995 I found it. It's in the Firefox addon. I was looking for it in the source code on the server-side.

The option to change Black and White on/off is on the extension setting


Suggest widget stalls typing

open viewLine.ts
after the first interface in the file type as fast as you can
class HorizontalRange implements EditorBrowser.IHorizontalRange

Please observe the 153ms stall due to onDidSuggest > refresh

Duplicate of #1923. For some reason, something changed here.


Reinstall (Stop) flow doesn't work when there are pending messages

Insights get the stats from the health-service of IJssel. However when IJssel is not available then we are getting pending messages. After IJssel is coming backup, we try to restart the flow on insights, but that doesn't work (because of a lock up).
Insights production issue: Can't reinstall flows after a while

If possible, it should be combined with these 2 user stories:
https://github.com/dovetailworld/front-end/issues/3905
https://github.com/dovetailworld/front-end/issues/3905

Nope, that's another type of issue.


String Translations

Hi, i've noticed there is missing string translations.
Most items translate automatically, but there is a few strings that are missing such as CART, you have %s items in your cart, my account.

Can you reproduce this issue on default Wordpress theme (eg Storefront)?
Can you reproduce this issue when all other plugins are disabled except WooCommerce, Polylang and Hyyan WooCommerce Polylang Integration?
What product versions and settings are you using when this issue occurs?

PHP: 7
WordPress: 4.7
WooCommerce: latest
Polylang: latest
Hyyan WooCommerce Polylang Integration: latest
Browser: chrome

Steps to Reproduce

What I Expected
What Happened Instead

These should be translated using the WooCommerce translation files, not part of this plugin so I'll close it off from here.
There have been lots of updates in WooCommerce so it's quite possible something got missed out of their translations.  I recommend Loco Translate for filling in missing translations, you can use their sync function to pull in strings missing from either the template or the translation file, and create your own translation override file with just the extra translations or changed translations which you need.
see our wiki for a few notes and links:
https://github.com/hyyan/woo-poly-integration/wiki/Translation-Overview


Failure deploying job on 1.6 cluster

When deploying a job to a kubernetes 1.6 cluster we are seeing the following error message. However the job is still successfully deployed. So the assumption is that this is thrown from the health check status checking and this is done using web API requests.
[ERROR] LogID: ed8d0c10-16ff-4c97-8739-9815054495cb Task: deploy - kit-deployer - Error: the server could not find the requested resource

I did not test jobs when we rolled out the 1.6.x kubectl upgrade :(

@manute I think this may be related to the issue you saw this evening with migrator, FYI.

yeah , I think every time migrator is going to be deployed we'll  see this issue.
I can work on it when @chesleybrown is here to ask him some questions.


Fix for handling dualstack and all cases for passing node-ip parameter to kubelet

Signed-off-by: Sachin Tiptur<EMAIL_ADDRESS>
What this PR does / why we need it:
DigitalOcean and Equinix nodes are missing IPv6 addresses 'kubectl describe nodes' in dual stack mode.
This PR fixes this by modifying the logic in OSP yaml files while passing "--node-ip" parameter to kubelet.
Logic used:
Case Non-Dual-Stack:
	Always pass --node-ip

Case Dual-Stack:
 if no --cloud-provider and external cloud provider is provided
	then pass --node-ip
 else
	then do not pass --node-ip

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #10642
Special notes for your reviewer:
Only "make test" was run to verify this fix. The actual node bring up test was not possible due to limitations.
Does this PR introduce a user-facing change?:

NONE

/lgtm

/hold
@sachintiptur based on our conversations. Please test this and see if this works.
Also, make sure that machine-controller is in sync with this as well. You'll probably have to look at https://github.com/kubermatic/machine-controller/blob/master/pkg/userdata/helper/kubelet.go#L138
cc @rastislavs

/approve


loader: only detach Cilium-owned XDP programs when XDP is disabled

Currently, even when Cilium's XDP features are disabled, the Cilium agent will still attempt to detach a program attached to the legacy netlink XDP hook on managed interfaces.
This is so the agent does the right thing when a user first enables and then disables an XDP feature, where the user would expect Cilium's XDP programs to be removed. However, this is at odds with users wanting to run their own XDP programs on Cilium-managed interfaces. Even with XDP disabled, the agent will unconditionally remove any XDP programs.
This patch narrows down this behaviour by checking the name of the program attached to the legacy XDP hook before detaching it. If the kernel-provided name is not a prefix of the name expected by the agent, the program is left on the interface. Note that with XDP enabled, legacy XDP programs will always be replaced with Cilium programs.
Supersedes https://github.com/cilium/cilium/pull/31507.
Only detach Cilium-owned legacy XDP programs when XDP is disabled

@zaheerm @dkulchinsky Please give this patch a try!

/test

Thank you @ti-mo! will test this today and report back.

Thanks @ti-mo . This makes sense!


fixed .StoryLoading border/border-radius on small screens

fixes #888

@mktcode The build fail on Heroku with this error: Variable @small is undefined

Oops! Fixed it... I just wonder why my local install didn't complain. o.0


How to invoke the pretrained model?

Thanks for the detailed code. Hi, I'm a novice in this field. The problem I'm facing now is how to call the pre-trained models (e.g. vanilla, ablation,  max) to reconstruct our own point cloud data. I only use the command line  in  README.md  to downloa them, but I don't know how to call them. I currently use full_ run.py to reconstruct our own point cloud data, but it is not effective.

To be sure I understand you correctly...
You downloaded the models via the script? Now you want to reconstruct your own point clouds?
If you run into an error with the models, please try the max version. More details here: https://github.com/ErlerPhilipp/points2surf/issues/22
In which format are your point clouds? If they are already Numpy files, They must contain arrays of shape [n, 3]. See this section of the readme for more details: https://github.com/ErlerPhilipp/points2surf#manually-created-dataset-for-reconstruction
If your point clouds are something like text files or vertices in mesh files (e.g. .obj, .stl, .ply), you can try this section of the readme: https://github.com/ErlerPhilipp/points2surf#dataset-from-point-clouds-for-reconstruction
For large point clouds (e.g. in .las format), you will need your own converter (e.g. cloud compare) and probably subsampling for a reasonable running time.
Let me know if you need more help.

Thanks for your answer, now I am facing a new problem when I running full_eval.py:
 Traceback (most recent call last):
  File "/home/dlmult/points2surf/full_eval.py", line 81, in <module>
    full_eval(opt=points_to_surf_eval.parse_arguments())
  File "/home/dlmult/points2surf/full_eval.py", line 46, in full_eval
    points_to_surf_eval.points_to_surf_eval(opt)
  File "/home/dlmult/points2surf/source/points_to_surf_eval.py", line 332, in points_to_surf_eval
    dataset = make_dataset(train_opt=train_opt, eval_opt=eval_opt)
  File "/home/dlmult/points2surf/source/points_to_surf_eval.py", line 107, in make_dataset
    dataset = data_loader.PointcloudPatchDataset(
  File "/home/dlmult/points2surf/source/data_loader.py", line 304, in __init__
    sdf.get_voxel_centers_grid_smaller_pc(
  File "/home/dlmult/points2surf/source/sdf.py", line 57, in get_voxel_centers_grid_smaller_pc
    pts_vs = model_space_to_volume_space(pts, grid_resolution)
  File "/home/dlmult/points2surf/source/sdf.py", line 75, in model_space_to_volume_space
    return np.floor(pts_pos_octant * vol_res).astype(np.int)
TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'

I only revise the model name in points_to_surf_eval.py and use the original data.

points_to_surf_eval.py is not meant to be called directly. There are some default values for parameters (argparse) that don't make sense. In this case, query_grid_resolution = None caused the error.
3 possible solutions:

Cleanest solution: You can call experiments/eval_p2s_max.sh or similar with your updated settings.
Take the parameters on of these shell scripts and set them as default values in points_to_surf_eval.py -> parse_arguments.
Call full_run.py with updated parameters in train_params, eval_params and recon_params.

The parameters must match EXACTLY to the parameters of the model. Meaning, if you use the Max model, you need to use the settings from the corresponding train/eval shell scripts. This is absolutely necessary for everything related to NN layers, e.g. points_per_patch, shared_transformer, use_point_stn, net_size etc.

closing because of inactivity, feel free to re-open


Locations cleanup

This PR does some minor cleanup on the backup-locations work.  The main change is to standardize/simplify how controllers construct a plugin manager.  They all now take a newPluginManager function pointer as an argument, that only requires a logger to be passed at execution time.

Is this to aid in testing the controllers? That seems to be the biggest change that I see looking over it.

Well, passing in a newPluginManager function pointer is to make testing easier, so that function can be replaced with a test fake - but we were already doing that.  In the current state, though, we're passing a pluginRegistry and logLevel to most/all of the controllers too, but they're usually only being used as arguments to pass to the newPluginManager func.  This change constructs a closure, in server.go, that encloses a pluginRegistry and logLevel -- so now the controllers don't need to take those things as arguments, and the newPluginManager signature is simpler.
tldr -- simplification and standardization.

To clarify, the controllers already had a newPluginManager function pointer field, which we were setting in the constructors, reason being for testing.  This PR passes it in, as a closure.


Leviton RZP15

Checklist

[X] It is not in the configuration DB

[X] It was not merged recently or has a pending PR

Which device is missing?
RZP15
Manufacturer ID
0x001d
Product Type
NA
Product ID
NA
Firmware Version
No response
Is the device listed on the Z-Wave Alliance website?
https://products.z-wavealliance.org/products/517?selectedFrequencyId=2
Do you have a manual?
DI-000-DZPA1-02B-W.pdf

@zwave-js-bot import config 517 from zwa

Unfortunately, the entry in the Z-Wave alliance DB is incomplete, so we really need those IDs where you put "N/A".


Duplicate Orphan Instances cause build failure

When trying to build, I get the following error:
src/Language/REST/Types.hs:72:10: error:
    Duplicate instance declarations:
      instance Hashable a => Hashable (OS.Set a)
        -- Defined at src/Language/REST/Types.hs:72:10
      instance Hashable v => Hashable (OS.Set v)
        -- Defined in ‘hashable-<IP_ADDRESS>:Data.Hashable.Class’
   |
72 | instance Hashable a => Hashable (OS.Set a) where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/Language/REST/Types.hs:75:10: error:
    Duplicate instance declarations:
      instance (Hashable a, Hashable b) => Hashable (M.Map a b)
        -- Defined at src/Language/REST/Types.hs:75:10
      instance (Hashable k, Hashable v) => Hashable (M.Map k v)
        -- Defined in ‘hashable-<IP_ADDRESS>:Data.Hashable.Class’
   |
75 | instance (Hashable a, Hashable b) => Hashable (M.Map a b) where
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It is pretty much the same issue as seen in #3 and  #1.
You should not define these orphan instances without using a newtype wrapper.  This way ghc will be able to distinguish between the different implementations and choose the correct one for your library.

I looked into this a bit.  If I delete the two errant instances in Types.hs, everything compiles just fine, and the test suite passes all tests.  I could generate a PR with these changes, but I would like to understand why the instances were there in the first place.  For instance, if an old version of hashable didn't provide those instances, then perhaps you would want to use CPP to enable/disable the instances to support the old version.
What are your thoughts?

After a little further investigation, it looks like the two instances were added in hashable-<IP_ADDRESS> so you could also potentially delete the orphans and increase the lower bound of hashable to <IP_ADDRESS>.

Went with the latter. See PR #11


(maint) Use Windows line endings for batch file in integration test

Previously the execution_spec.rb test was using LF line endings during the UTF8
test which worked on US English systems.  However when running on a Japanese
version of Windows, this test was failing incorrectly.  This commit forces the
line endings to Windows style CRLF so that the batch file will execute correctly.

The travis failure is due to the typo'ed commit already in stable (note TRAVIS_COMMIT_RANGE comtains a triple dot). That will be fixed in https://github.com/puppetlabs/puppet/pull/5405.

CLA signed by all contributors.

Interesting, I thought "\n" was a valid line ending for batch files on Windows (although it won't look right when using some editors). If Japanese Windows refuses to run batch files without "\r\n" then there could be many more places in puppet (and ecosystem) where things don't run correctly. I'm thinking about all of the puppet module files/templates, including PE.

If you rebase against stable the travis commit check error should go away.

The error popped up because I had UTF8 characters in the batch file.  It appears cmd.exe was barfing because it couldn't interpret where the end of the line was.

Strange. The branch was already against stable (just pressed create PR too fast).  I'll rebase and see what happens.

Rebased


feat(S3): Ensure S3 bucket use Cross-Region Replication

Context
General-purpose buckets in Amazon S3 should have cross-Region replication enabled to enhance data availability and resilience.
Cross-Region replication involves automatically and asynchronously copying objects between buckets located in different AWS Regions. This ensures that newly created objects and updates in a source bucket are replicated to a destination bucket.
Description
This new check called s3_bucket_cross_region_replication verifies whether cross-Region replication is configured, and flags any instances where it is not.
If cross-Region replication is not needed for a specific bucket, exceptions can be made, and findings for that bucket can be suppressed.
Checklist

Are there new checks included in this PR? Yes / No

If so, do we need to update permissions for the provider? Please review this carefully.

[ ] Review if the code is being covered by tests.
[ ] Review if code is being documented following this specification https://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstrings

License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

I improved the logic of the check by adding more use cases, please read the changes and add a test for each new use case. Let me know if you don't understand the changes. Thanks!


RFC: RewindIterator for bidirectional iterators

Rendered

Today, we have std::iter::Peekable, which allows a single-element look-ahead in iterators. Peekable is useful, but it must buffer one element of the iterator, since it has now knowledge of the underlying iterator implementation. It also only allows peeking at a single element, and only provides a reference to it at that. This means that if you peek ahead in an iterator that provides mutable access, you cannot mutate the peeked-at element.
Some iterators can provide much more robust navigation options for the iterator, and can do so efficiently. The most immediately useful of these is the ability to rewind the iterator: effectively undoing the last call to Iterator::next. An iterator that supports rewinding allows the user to move both forwards and backwards through the underlying element stream. This in turn allows peeking all the way to the end of the iterator if need be, and allows iterating over the same set of elements more than once.
Beyond peeking, the most obvious use-cases for rewinding is for iterators where consecutive elements are related in some fashion. For example, for a BTreeMap<(Game, Team, Player), usize>, the user may wish to compute aggregate statistics for each team for a game, but then also compute something per player that depends on the team statistics. Currently, developers are forced to either do multiple lookups into the map, or iterate over the whole map multiple times. With a rewinding iterator, neither is necessary; the developer can simply rewind the iterator after computing the team statistics, and then iterate again to enumerate the players.

You could do this with Clone, for example with slices
fn are_all_unique(slice: &[i32]) -> bool {
    let mut iter = slice.iter();

    while let Some(item) = iter.next() {
        let rest = iter.clone();
        if rest.find(|x| x == item) {
            return false
        }
    }

    true
}

This works with all std iterators that return references. For all other iterators, for example iterators over values, if it is possible to implement RewindIterator it should also be possible to implement Clone. So I see no additional value in this.
Using clone has the added benefit that it usually is just copying some pointers, so it's really cheap. However, rewinding to a previous state can get really expensive.
I was able to convert your print_mvp function to use Clone instead of previous, and found a unnecessary usage of previous in the process! I think this should make it clear enough that RewindIterator isn't just unnecessary, but it also actively worse than using Clone. By using Clone, Rust can warn you for unused variables and unused assignments, which can allow you to aggressively eliminate them. With previous, Rust can't know which are necessary because previous may contain side-effects.

You could do this with Clone, for example with slices
fn are_all_unique(slice: &[i32]) -> bool {
    let mut iter = slice.iter();

    while let Some(item) = iter.next() {
        let rest = iter.clone();
        if rest.find(|x| x == item) {
            return false
        }
    }

    true
}

This works with all std iterators that return references. For all other iterators, for example iterators over values, if it is possible to implement RewindIterator it should also be possible to implement Clone. So I see no additional value in this.
Using clone has the added benefit that it usually is just copying some pointers, so it's really cheap. However, rewinding to a previous state can get really expensive.
I was able to convert your print_mvp function to use Clone instead of previous, and found a unnecessary usage of previous in the process! I think this should make it clear enough that RewindIterator isn't just unnecessary, but it also actively worse than using Clone. By using Clone, Rust can warn you for unused variables and unused assignments, which can allow you to aggressively eliminate them. With previous, Rust can't know which are necessary because previous may contain side-effects.

Note: if an iterator yields exclusive references, then it is unsound for it to implement RewindIterator and uphold RewindIterator's contract, because that would require it to yield aliasing exclusive references.

I do not believe that that is true. Since the returned mutable references are tied to the lifetime of the mutable reference to the iterator, the borrow checker would catch any attempt to continue using the values yielded by previous calls to the iterator after calling previous. This is exactly what today happens if you try to use the value returned from a past call to next after calling next a second time.
I agree with you that RewindIterator is only needed for iterators that yield mutable references. For other iterators, Clone is likely to be sufficient. Though I don't think that's an argument for why RewindIterator should not exist. Being able to move back mutable iterators can yield big benefits when you need it. You do make a good point though that the example isn't great since it's also solvable with Clone. I'll try to come up with one that cannot be solved with Clone.

Now, for owning iterator, it may be expensive to clone them, but that's a cost that must be paid regardless.

I don't think owning iterators will be able to implement RewindIterator, since they already yielded the owner element in next, and therefore cannot yield it again.

You could build the idea of a snapshot iterator on top of the current implementation, for example a std::slice::IterMut could yield a snapshot as a std::slice::Iter that would iterate over the rest of the slice. A signature like this should suffice.

Yes, you can implement it for a specific type (i.e., without a trait) just fine today. But you cannot (I think) make a trait for it, since that would require generic associated types as mentioned in the RFC.

@KrishnaSannasi
The use of clone seems pretty limited. In this case, there is structure that allows you to know when to clone (at the start of each game), but if you wanted to allow more general navigation, I don't think your approach would be able to efficiently replace a RewindIterator implementation.
A simple litmus test would be to implement a Turing machine, where RewindIterator is used to access a read-only tape. You would need to consult the state, and based on what value the iterator returns, either call next() or previous(). If you can emulate that with clone that would be a more compelling argument for me (I don't see how you could, which is already a good argument that RewindIterator is at the very least more ergonomic; but I think it is also more expressive than clone on iterators).

I do not believe that that is true. Since the returned mutable references are tied to the lifetime of the mutable reference to the iterator, the borrow checker would catch any attempt to continue using the values yielded by previous calls to the iterator after calling previous. This is exactly what today happens if you try to use the value returned from a past call to next after calling next a second time.

What I'm talking about is something like
let first = iter.next().unwrap();
let second = iter.previous().unwrap();
let third = iter.next().unwrap();

Here either first and second alias or first and third alias.

I agree with you that RewindIterator is only needed for iterators that yield mutable references. For other iterators

No, it would be unsound for mutable iterators to implement RewindIterator, see example above.

Yes, you can implement it for a specific type (i.e., without a trait) just fine today. But you cannot (I think) make a trait for it, since that would require generic associated types as mentioned in the RFC.

I think you could do it with a trait like this:
trait SnapshotIterator<'a>: Iterator {
    type Snapshot: 'a;
    fn snapshot(&'a self) -> Self::Snapshot;
}

But this has worse ergonomics than GATs

The use of clone seems pretty limited. In this case, there is structure that allows you to know when to clone (at the start of each game), but if you wanted to allow more general navigation, I don't think your approach would be able to efficiently replace a RewindIterator implementation.
You do make a good point though that the example isn't great since it's also solvable with Clone. I'll try to come up with one that cannot be solved with Clone.

You can always clone right before you call next to get the same effect as previous. This should be no more costly than calling previous (any in many cases will be cheaper). They are isomorphic.

@frankmcsherry please also note that rewind is likely more expensive than clone. Clone will almost always just boil down to cloning some pointers, (esp. for std collection iterators, and those iterators built atop those). So unless rewind can be cheaper than moving some pointers around (which I don't think is possible for more intricate data structures like *Map), it will be cheaper to clone even if that clone is usually not used.

Since the returned mutable references are tied to the lifetime of the mutable reference to the iterator, the borrow checker would catch any attempt to continue using the values yielded by previous calls to the iterator after calling previous. This is exactly what today happens if you try to use the value returned from a past call to next after calling next a second time.

This isn't true. See this playground for an example; Rust iterators are not "streaming iterators," so yielded references must live for the lifetime of the iterator, not just until the next .next() call.
So without streaming iterators (read: GAT), you can't have a rewindable iterators of unique references. You could maybe do it by the signature rewind(self) -> Self rather than rewind(&mut self).
On top of that, this would require the size of slice::Iter to increase by 2x for all users, whether they need on the fly rewinding or not. That's because slice::Iter only remembers the to-be-iterated part of the slice; it's a (begin, end) pointer pair. The only way to have full rewinding support built in would be to use a (slice: (ptr, len), begin, end) tuple.
So if you really want this, it'd have to be

a) an opt in extra cost wrapper, like Peekable
b) reverse-by-move, to invalidate any existing borrows

What I think you want is something more like RandomAccessIterator or an actual Cursor API, rather than something on top of iterators.


message_edit: Fix bug when multiple message edit forms are opened.

There is a bug when multiple message edit forms are opened at the
same time where undefined value of stream_id is sent to the server.
This happens because a global variable stream_widget is used to get
the id of stream selected in dropdown and value of stream_widget
variable keeps on changing when we open multiple message edit forms.
Thus, stream_widget can have the dropdown widget of already closed
edit form resulting in undefined value of stream id.
This PR changes the save_message_row_edit function to access
the dropdown element directly using message id instead of using
stream_widget.value() and thus we always use the correct dropdown
element to get the stream id.
We also move the stream_widget variable to be inside edit_message
function instead of being global variable for the module.
Fixes #19663.

GIFs or screenshots:

Merged, thanks @sahil839!


[0.11] Adjust strikethrough flanking rule to better fit Rustdoc Crater run

This is https://github.com/pulldown-cmark/pulldown-cmark/pull/864, but forward-ported to 0.11.

The 0.11 branch will be merged into master before releasing pulldown-cmark 0.11, but this may be handy to test this branch in other projects. Thanks!


Sometimes a character cannot jump

I've found a strange issue. If I hold "D" key and jump then a character do3esn't jump too high.
I recorded a video:
2024-02-01 15-16-07.zip

It was happening mainly due to the character's collision being stuck in the platform, so i partially fixed it by making the platform a one way platform so it goes through the platforms without stucking! Thanks for letting me know!