[enhancement] Is it more convenient to update changelog in this action using PyGithub?

I think it is more convinient to update changelog within the action by using PyGithub.
Are you interested in that feature? If so, I would be glad to contribute to this project.

Is this in reference to the workflow file uploading changes to the PR branch?
Reference:
https://github.com/srepollock/changelog-generator-action/blob/b6de81fb7d8080560f1cc84ef7d1be2a88c53621/.github/workflows/master-pr-changelog.yaml#L8-L42

Well, I mean to upload changes just by the script without using other actions, where  more inputs can be added to choose  uploading to PR branch or just pushing commits
I think it is more convenient to just use and configure one action to not only generating changelog and uploading it

You mean removing this action all together and changing to using pygithub, or more along the lines of configuring pygithub in the workflow as opposed to committing to the PR branch?

You mean removing this action all together and changing to using pygithub, or more along the lines of configuring pygithub in the workflow as opposed to committing to the PR branch?

Yes, I mean to replace actions/upload-artifact@v2 with new functions in changelog_generator.py, so that if I want to generate changelog and upload it,  I only need to configure this action.

That would be fantastic! A great idea. Let me know if you want to work on it

That would be fantastic! A great idea. Let me know if you want to work on it

I will try to implement feature/upload first in these days.


Save/Restore

Hi @skypjack ,
I've been disconnected for a few weeks, and when today I got back, had a look at the code, well... wow! already version 2.4.1 and a lot of new features (and most of those I already had custom-implemented because of need, like the Actor class)!
I have a side question and a possible feature request: how difficult would it be to implement a save/restore functionality in the ECS?
In the simulation system we are implementing, one of the main features we need to implement is the possibility to take "snapshots" of the entire system state, save them and restore at a later time.
More or less a classical replay system, but with multiple restore points.
Is it possible to implement that functionality in the Registry, with the current implementation?
In case you believe is a feature that is worth incorporating, please send me a PM and we can maybe have a quick call to discuss ways of helping/accelerating the development.

question: what's the use case of serializing only a subset of the available components?
to answer your question, if I correctly understood how it works, I believe you should save also the internal version of the destroyed entities.
Am I correct to say that only if you do that you can guarantee complete determinism?
An example to clarify the scenario:

I run the game/sim for a while, and decide to save the state with flag S at time t0
keep going and create/destroy entities
restore S
create N new entities and call function f() that iterates and calc statistics
restore S
(b) create N new entities and call function f() again

I would expect to have always the same result out of f(), and that function could depend on the order the entities are iterated.
If you don't save the version of the destroyed entities, the IDs for the N entities created at 4. and 6. could be different, or in a different order, because they depend on the accumulated history (the version keep growing every time an entity ID is recycled, if that info is not saved).
Does it make sense?

question: what's the use case of serializing only a subset of the available components?

A lot of games allow to save only when the player reaches some safe zones (as an example, I remember Resident Evil on PlayStation used this technique).
In this case, there is no benefit in serializing meshes or whatever. All what you want is probably to store player state, its inventory, the safe zone he reached and a few other things.

Does it make sense?

Yes and no.
Order doesn't depend on destroyed entities if you get a snapshot and restore it without them.
However, order of entities is highly affected by most of the operations. If you have a function that requires them to respect an order, I would keep track of changes and force it before to iterate, probably.
However, what you are asking has a lot of drawbacks.
As an example:

What you would expect if the registry contains an entity and also your snapshot contains it? A merge of the components or to replace completely the current set of components with the restored one?

What you would expect if both the registry and the snapshot contain an entity but versions differ? Who (let me say) wins? It could break things if entities refer to each other using fields in components.

The best thing is to restore a snapshot in an empty registry. It's trivial and has no hidden corner cases.
If I got you right, you want to restore a snapshot in an already running simulation instead, right? Well, in this case there are several points where compromises must be found. :-)

restore S
create N new entities and call function f() that iterates and calc statistics
restore S
(b) create N new entities and call function f() again

Wait a moment. You mean that at bullet 5 the restore function destroy the N entities you created at point 4?
In this case, it's enough to clear the registry before to restore things. Isn't it?

I think there are 2 things that need to be implemented. Serialization/Deserialzation of at the component level and Save/Restore at the simulation/game level.
They have different use cases and require different level of user awareness.
To your example of saving a part of the game at specific location: that for me belongs to the first case, where you only need to save a subset of the data (=components). In this case I believe the level of control should be at the specific component level for every entity, not depending on the type (i.e. I probably only care of saving a specific set of components, not all components of type A,B,C etc).
With the serialization API you proposed that should be possible on the user side without too many problems I believe.
The purpose of Save/Restore is to get a snapshot of the entire game state (component data and internal states). When you restore 'S', the state of the entire system should be binary identical to the moment you saved. At this level there are no conflicts on what to restore and what not. The snapshot is complete.
My goal is to have a completely deterministic system, so if I restore 100 times the evolution of the system will always be the same, independently of what happened after the restore (create/delete entities, etc.)
I should have been more clear on the initial request, hope that this helps :)

Yep, definitely. Thank you very much. Now it's clear what you need. ;-)
Stay tuned. I'll push a dedicated branch soon with the first version of the save/restore functionality.
 However, if you can test it and give me a feedback, it would be appreciated. ;-)

I will and I will try to break it writing even more tests :) I believe it's the minimum I can do, given all the efforts you're putting into this

Let's discuss about the snapshot branch.
I'm developing it for I need it in a project of mine and it must be considered still a work in progress, but it gives a grasp of the final API.
Mostly Cereal C++ oriented, for I liked its API. What about?

@dbacchet the progressive part contains a bug (my fault), but the snapshot part is almost _ready to be judged.
Whenever you want (and you find the time to do that), feel free to leave here your comments. ;-)

So far so good. I have yet to document it, but I'm tempted to say that it works as intended. :-)
I'll try to write a few notes in the README as soon as possible. In the meantime, tests and comments are welcome as usual.
Thank you all.

that's fantastic news. I'll spend some time experimenting during the weekend!

Updated the readme file with a dedicated section (still to be reviewed, feedback are welcome).
I have still to write documentation for a couple of classes, but I'm almost ready to merge with master and release it.
Any comment so far?

Everything is finally documented. The snapshot branch contains also an example of use with Cereal C++ as an archive.
From my point of view, the job is done. I'll fix bugs if any, but I'm ready to merge it on master.
I'm going to merge it in 24/48 hours if no critical errors come out in the meantime.
I hope it works fine for you and fits your needs, guys. Enjoy. :-)

@dbacchet
Because of #40, this change cannot be considered ready to merge anymore.
However it will take a few days to be ready again, don't worry. ;-)

Hi @skypjack,
I started adding some more unit tests for the save/restore functionality and I ran into a (possible) bug/problem.
I created a gtest with multiple snapshots and restore points, where I also evolve the state and create/destroy entities in between.
It mostly works as expected, but I got an assertion when trying  to restore the second snapshot on the same destination registry:
[~/dev/tmp/entt_dbacchet/build] $ test/snapshot
Running main() from gtest_main.cc
[==========] Running 3 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 3 tests from Snapshot
[ RUN      ] Snapshot.Full
[       OK ] Snapshot.Full (0 ms)
[ RUN      ] Snapshot.Continuous
[       OK ] Snapshot.Continuous (0 ms)
[ RUN      ] Snapshot.SaveRestore
Assertion failed: (!registry.capacity()), function SnapshotLoader, file /Users/davide.bacchet/dev/tmp/entt_dbacchet/src/entt/entity/snapshot.hpp, line 182.
[1]    69429 abort      test/snapshot

It's very likely that I'm missing some required call before restoring, but would be great if you can have a look and advise.
The code is in my EnTT fork: snapshot_saverestore.cpp.
I wanted to make a PR at the end to extend the test coverage, but I can make it now if that's easier for you.
Thanks!

I knew sooner or later I had to blame myself for the wording used to name that function!!
I had only a glance at your code from the mobile app, but I'd say that the problem is within your entt_restore function.
Unfortunately (or fortunately, it depends from the point you look at it) registry.reset() doesn't work as you expect. It doesn't trashes the content of a registry. Instead it destroys all the entities it contains and updates their versions. This way you can reuse the registry even if you are storing identifiers all around because they'll be invalidated.
On the other side, restore expects the registry be empty. No entities, neither in use nor destroyed.
Probably everything works fine if you replace the call to reset with registry = {};. :-)

As a side note, I found a bug that I've already fixed (still to push actually, it's part of the changes for issue #40).
If you try to restore destroyed entities before to invoke entities, it can crash under certain circumstances.
If you experience such an error, don't worry.

that works, thanks.
I will add a few more tests and create the PR soon :)
Question/request: since it possible to detect that the user is trying to do a full restore, can the registry be "reset" (i.e. set in a state that allows the restore) automatically?

The sole drawback I see is that one can happily trash all the data in a registry without even being notified. :-)
The assert is a way to say - ehy, you are going to mess things up.
However, you know: you asked it, you rule on it. Do you prefer a silent reset during a restore?

yes please. Either that or an explicit return flag that says the restore failed. If for some reasons asserts are disabled (like in a release build) I feel it's easy not to detect the error. Not a big deal though, because at the first run with assertions enables it's easy to spot the problem.

Another question: I added a test with a custom archive, and I ended up creating 2 simple classes like these:
template <typename EntityT>
class CustomOutputArchive {
public:
    // serialization functions
    void operator()(EntityT ent) {
        // std::cout << "ent: " << ent << std::endl;
        entity_vec.push_back(ent);
    }
    void operator()(const State &c) {
        state_vec.push_back(c);
    }
    void operator()(const StateDot &c) {
        statedot_vec.push_back(c);
    }

    std::vector<EntityT> entity_vec;
    std::vector<State> state_vec;
    std::vector<StateDot> statedot_vec;
};

template <typename EntityT>
class CustomInputArchive {
public:
    CustomInputArchive(const std::vector<EntityT> &ev, const std::vector<State> &sv, const std::vector<StateDot> &sdv)
    : entity_vec(ev), state_vec(sv), statedot_vec(sdv) {}
    // deserialization functions
    void operator()(EntityT &ent) {
        ent = entity_vec[entity_vec_idx_++];
    }
    void operator()(State &c) {
        c = state_vec[state_vec_idx_++];
    }
    void operator()(StateDot &c) {
        c = statedot_vec[statedot_vec_idx_++];
    }

    size_t entity_vec_idx_   = 0;
    size_t state_vec_idx_    = 0;
    size_t statedot_vec_idx_ = 0;
    std::vector<EntityT> entity_vec;
    std::vector<State> state_vec;
    std::vector<StateDot> statedot_vec;
};

I would love to have a single class that can both serialize and deserialize the registry, but the operator()(EntityT) in the output archive and operator()(EntityT &ent) in the input archive are ambiguous if they're defined in the same class.
Any chance to move from operators to members with an explicit name (like save(const T&) and restore(T&) for example)? I believe you would lose compatibility with Cereal archives though...

I think I can easily introduce a couple of proxies to support also the (let me say) mono archive. With a bit of sfinae machinery on the API we can accept both the types of archives probably.

please just keep one (the one you like the most). There's no reason to support both API in the framework itself if this is something that can be easily implemented on the user side or in a utility function (and we both agree it's easily doable). Thanks!!

You're welcome. If it's fine for you, I'd prefer to keep onboard the cereal-like interface because it's the tool I usually use then. Moreover I think it's easier to reason with different archives while implementing offline save/restore functionalities (at least for me). Hope it works fine for you.

Updated the poc on the branch snapshot.
Please, let me know if you find any bug. Thank you.
I'm at your disposal for further request.

@skypjack . Fantastic. Thank you again for your dedication.
Errr... I do not intend to trick you but i think it may be interesting to open new sections / subsections to document new features such as serialization (a very powerful and notable feature) . At the moment  EnTT is very alive and that is excellent news except for the documentation.  You probably prefer to wait for the new version to be publicly released, and  prove useful and stable.

@DJuego Forgive me, I didn't get you. This feature is already documented in the readme file. You can find the documentation on the right branch (snapshot). Of course, it's still a kind of work in progress, but this time I'm trying to keep updated code, tests and documentation all at once. What's wrong exactly?

Sorry. Sorry. My fault! Yes, yes.  I found it! It looks great, @skypjack !!

@dbacchet
Any news on this?
If you have any request for change or you found bugs, let me know so that I can look into them.
I'll release v2.5 as soon as this feature is ready, merged upstream, documented and fully tested.
Thank you for your help, really appreciated.

good to go for me!
thanks!

So far, so good. Probably the last changes broke the compilation on VS (because of its broken compiler, the code for itself is fine indeed).
I cannot test it right now and the fix should be straightforward, so not a problem actually.
During the week I'll fix it and merge everything on master. Then I'll create a tag for EnTT v2.5.0.
From that moment on, any issue or request for change must have its own ticket.
Thank you all for your help.
I think this is one of the major changes of the new release.
Thank you @dbacchet for the request and your help in testing it. Really appreciated.

@dbacchet
Upstream on master.
If you confirm that everything works as expected after the merge, I can close the ticket and create a v2.5.0 tag.
I'll also delete the snapshot branch, so feel free to get rid of it.
Thank you very much once more for your help.

Again. thank you for your amazing efforts, @skypjack
This statement in the README is striking: "The code is not production-ready and it isn't neither the only nor (probably) the best way to do it. However, feel free to use it at your own risk." :-P

@DJuego Ahahaha. It refers to the code of the test made with Cereal C++ and not to the code of the save/restore stuff!! Don't worry. ;-)

@DJuego Fixed the doc, thank you for pointing it out.
I'm closing the issue as a consequence of the merge with master. Feel free to create new issues in case of problems.
I'll create tag v2.5.0 as soon as @dbacchet confirms that everything works fine (or in a couple of days in case of no feedback).
Thank you very much to all of you for the help and the support. Really appreciated.

@skypjack  i went to try to implement a JSON save/load for it (custom one, not like the one you got in the test). I see that it stores an entity and then the component.  It stores all the components that you tell it.
Is there a possibility to limit it to a subrange of entities? maybe a query like the ones in a system? In my example, i might want to replicate the Position component, but only on the entities that have a NetSerialize component.  A interesting thing would be to have the snapshot to only be done on an array of entity IDs. I could do a view to see all the entities that have NetSerialize, and then only run the snapshot on those.
Alternatively, i could just do more "manual" serialization by having a Serialize system that reads NetSerialize and then adds every component it can (using has()) into a binary array or similar.

@vblanco20-1
Can I ask you to open another issue for this? Sort of More on Save/Restore.
I've already put some notes in the todo file for I want to extend the save/restore functionality. I think it's worth it discussing the new features in a new thread.
If it's ok for you, feel free to just copy-paste your last comment.
It contains interesting points to which I'd like to reply so as to propose possible implementations.
Thank you very much.


feature: Use pre-commit in cookiecutters instead of direct dependencies on black, isort, etc.

Feature scope
Other
Description
Advantages

Fewer headaches around incompatible dependencies by having pre-commit manage a virtualenv for each tool (see #1402)
Can integrate with pre-commit.ci for autofixes and autoupdates

Disadvantages

One more tool to manage for developers (e.g. poetry run isort vs pre-commit run isort --all-files

Using pre-commit to manage dependencies is a headache. There's no lock file, and since some package use others' internal names, pre-commit often unexpectedly fails when a new patch version changes something.
https://github.com/OCA/oca-addons-repo-template/issues/175#issue-1466067857

Ah, sorry, I didn't mean to promote nix, I find it to heavy too. I only meant to point out problems that pop-out unexpectedly with pre-commit, and I just happen to know that link :)
Glad you have it worked out

How about nox?

@rafalkrupinski nox is more of a replacement for tox than pre-commit. Additionally, it doesn't have/use a lockfile, which was your original issue with this suggestion to use pre-commit as the source of truth for linting dependencies.

I agree with @WillDaSilva. Reproducibility and stability are desired properties for any workload, but I think we can tolerate a slight lack of both for linters in favor of avoiding dependency conflicts with actual package dependencies.
Closed by https://github.com/meltano/sdk/pull/1648


Parser state API docs

I'm trying to understand state.push in this bit of code but I cant seem to find it in the documentation.
	// Earlier we checked !silent, but this implementation does not need it
	token = state.push("sup_open", "sup", 1)
	token.markup = "^"

	token = state.push("text", "", 0)
	token.content = content.replace(unescapeRe, "$1")

	token = state.push("sup_close", "sup", -1)
	token.markup = "^"

There are no docs for deep internals. And it will not appears, because we have no resources for this. The only way to understand is to dig code of this package and other plugins.
https://github.com/markdown-it/markdown-it/blob/master/lib/rules_inline/state_inline.js
Code from your cite push 3 tokens: opening, content, closing.

I see. Thanks for your direction.
I built a plugin a last weekend -- I'd appreciate any feedback you have: https://github.com/ccorcos/markdown-it-component
The real goal is to be able to render arbitrary react components through this package: https://github.com/ccorcos/markdown-it-renderer

I'm on this track as well. One of the most interesting piece is state, I wish I could just make a map of all states in the core, that'll be kool.


[Requirement] Strip vanadium peaks

Executive summary
Removes Vanadium peaks out of a background by linearly/quadratically interpolating over the expected peak positions.
Context and background knowledge
This algorithm attempts to find all Vanadium peaks and subtract them from the data, leaving just the ‘background’.
The data will then be used to normalize "sample" data collected with the same instrumental configuration.
References
https://docs.mantidproject.org/nightly/algorithms/StripVanadiumPeaks-v2.html?highlight=stripvanadiumpeaks
Environment
Assumptions

this method will be used for the reduction of powder diffraction data
the input data should correspond to measurements or simulations with a Vanadium sample (information contained in the log of the NeXus file)
this first implementation considers 1D data
there should be a choice for the background shape between linear and quadratic
the input data should be expressed in d-spacing
for the implementation of algorithms for finding and stripping peaks, check NMX reduction workflow.

Preconditions

algorithms to find and strip peaks
input data in d-spacing

Inputs

Scipp data array of Vanadium

List of diffraction peaks for Vanadium (d-spacing positions in Å).

Methodology
The theoretical positions of the peaks are $\frac{a}{\sqrt{h^2+k^2+l^2}}$ with a≈3.03Å and h, k, l integers and h+k+l even
See Mantid's implementation
Outputs
Scipp data array of Vanadium containing only background information
Which interfaces are required?
Python module / function
Test cases

csv file data_dream_vanadium_inc_coh.csv.zip in this folder (source_position=[-3.478 mm, 0, -76550 mm], sample_position=[0, 0, 0]) or PG3_733.nxs from the Usage Data of Mantid

list of Vanadium peaks (see Input section above)

Comments
No response

Putting this on hold until we start work on the essentials milestone.
Summary of my findings so far:
Finding peaks

Mantid has hard coded list of peaks that approx. correspond to the formula under 'Methodology' above. But it is only a subset. I don't know how it was chosen.
FindPeaks algorithm selects fit window using:

[i_peak - 5*FWHM ... i_peak + 5*FWHM] around given i_peak where FWHM defaults to 7 in StripPeaks.
Range is limited to 2/3 of the distance to neighbouring peaks (guesses) on each side.
This is index-based with no regard for physical spacing of data points.

FindPeaks performs fit:

Fits background first (line or parabola)

Fails with out POWGEN data
Falls back to simple param estimation w/o fit

Then fits Gaussian

Sophisticated initial param estimation

Tried with lmfit

Used combined background+peak model
Quite sensitive to initial params
Quadratic background fit failed
Linear background fit worked, lead to good fit overall

Not sure why a quadratic background should work. The curve is not polynomial. Is there a better model for the overall lineshape?

Stipping
Got a Mantid script from Celine:
(Peak positions taken from StripVanadiumPeaks)
from mantid.simpleapi import *
import matplotlib.pyplot as plt
import numpy as np
from mantid import plots

config['default.facility'] = "SNS"
config['logging.loggers.root.level'] = 'Information'

path2files = '/mnt/disk2/data/mantid/test_data/'

PDLoadCharacterizations(Filename=path2files+'PG3_characterization_2011_08_31-HR.txt', OutputWorkspace='characterizations')
ws = Load(path2files+'PG3_4866_event.nxs')

LoadDiffCal(ws, WorkspaceName='PG3', Filename=path2files+'PG3_FERNS_d4832_2011_08_24.cal')
ws_dsp = ConvertUnits(ws,'dSpacing')
ws_dsp_rebin = Rebin(ws_dsp,Params='0.1,-0.0004,2.2')
ws_dsp_focus = DiffractionFocussing(ws_dsp_rebin, GroupingWorkspace='PG3_group')
ws_strp_peaks = StripPeaks(ws_dsp_focus,
                           PeakPositions='0.41192,0.4279,0.49076,0.5044,0.5191,0.535,0.5526,0.5936,0.6178,0.6453,0.6768,0.7134,0.7566,0.8089,0.8737,0.9571,1.0701,1.2356,1.5133,2.1401', PeakPositionTolerance=0.05, BackgroundType='Quadratic')

peak_positions = [0.41192,0.4279,0.49076,0.5044,0.5191,0.535,0.5526,0.5936,0.6178,0.6453,0.6768,0.7134,0.7566,0.8089,0.8737,0.9571,1.0701,1.2356,1.5133,2.1401]

fig, ax = plt.subplots(subplot_kw={'projection':'mantid'})
ax.plot(ws_dsp_focus, label='before strip peaks')
ax.plot(ws_strp_peaks, label='after strip peaks')
ax.vlines(peak_positions, 0, 1.4e8, linestyle='dashed', color='black', lw=0.1)
ax.scatter(peak_positions, np.ones(len(peak_positions)), marker='|')
ax.grid()

ax.legend()
plt.show()


Request:  Watch anything

One thing I like a lot about nodemon is you can use it with any project (by passing it a command option, obviously).  cargo-watch accepts arbitrary commands, but throws an error when you try to use it in a non-rust project.

:+1:

@rosshadden: Take a look at watchexec!

Yeah, closing this because that's what watchexec does. I'm restricting focus such that cargo-watch is a tool for cargo-based development, and watchexec is a general run-command-when-files-change tool.


A grammatical error

Your code is：
from tld import get_fld
but tld do not have get_fld
The correct code is：
from tld import get_tld
and then you shuld modify all of " get_tld "

Hi,
tld modules does have get_fld. Please refer to https://pypi.org/project/tld/
Did you receive an error while running the tool?
Regards.

Closing as false positive. If you're running into issues please update the ticket and will follow-up. Thank you!

Hi @yassineaboukir from tld.utils import update_tld_names gives error. By changing to from tld.utils import get_tld_names the script works.


added nim filter docs

Can you also add the filter into navigation.yml, which controls the sidebar?


is there a way to cancel ongoing request, or something like that? like request timeout

I want to do request under some timeout, but it seems there're only socket-timeout and conn-timeout.
What I really want is some request timeout: if haven't got response, then cancel this request. Is there a way to do this?

There currently isn't a way to do this, I'm not sure whether the Apache HTTP client exposes anything for this either

I suppose you could always slap your http/get into a future and then do the timeout-y version of deref. If you timed out, then you could future-cancel.

@joegallo Well, I used core.async timeout to do this, but it doesn't provide cancelation functionality

I'm also looking for a similar functionality. I think HttpUriRequest interface does expose an 'abort' method. Could we perhaps use this?
http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/methods/HttpUriRequest.html

How about .setConnectionRequestTimeout in RequestConfig.Builder?
https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/config/RequestConfig.Builder.html#setConnectionRequestTimeout(int)
Interested on a patch for this?

This is particularly valuable if you're using the http client for long-lived requests whose need for a result might be aborted mid-request by a user. Right now without a supported way to abort a request and return it to the connection pool that connection is basically out-of-commission since there's still data in the pipe and keep-alive.
I've hit this issue in a web application that proxies PDFs through to the user's browser (after undergoing some security checks). I had just been handing off an input stream to ring to write to the output stream but I was finding that after a user canceled their request (because maybe it was a large PDF and they decided they're not interested any more) that my connection pool was quickly depleted and the entire app locks up.
I'm looking now for a way to get a handle on the connection so I can release it myself in the event of a client-abort.

FWIW here's my hack to get around the fact that apache likes to "drain" the entire in-flight response before returning the connection to the pool. When you close the input stream in the clj-http response it normally does a graceful "close" on the input stream provided by apache http (and indeed apache doesn't expose the abort directly), but in this case I'm triggering a hard "abortConnection" by throwing an IOException. This way it doesn't try to drain the request before making it available to the connection pool again (which, if there's a lot of data, might take a while).
(alter-var-root #'clj-http.core/coerce-body-entity
  (fn [_]
    (fn [^ResponseEntityProxy http-entity conn-mgr ^CloseableHttpResponse response]
      (if http-entity
        (proxy [FilterInputStream]
               [^InputStream (.getContent http-entity)]
          (close []
            (try
              (try
                (.eofDetected http-entity
                  (proxy [InputStream] []
                    (read [] -1)
                    (close []
                      (throw (IOException. "Please, don't drain my request.")))))
                (catch Exception ignored nil))
              (let [^InputStream this this] (proxy-super close))
              (finally
                (when (instance? CloseableHttpResponse response)
                  (.close response))
                (when-not (conn/reusable? conn-mgr)
                  (conn/shutdown-manager conn-mgr))))))
        (when-not (conn/reusable? conn-mgr)
          (conn/shutdown-manager conn-mgr))))))

I added a better way to abort the request along with the future and some docs for it, let me know if this doesn't work for you and I'll be happy to revisit it.

Changes look good if using async. In my case I was handing off a synchronous stream to a downstream connection (a browser). When that connection closed I wanted to abort the http request instead of waiting for it to finish downloading from the upstream. I added that ability to the "close" method of the input stream.
There's a good chance I could refactor that code to be asynchronous and use the official mechanism now instead of my hack :) thanks.


[json_rpc] Add dual attestation limit field for metadata

Motivation
Added a dual_attestation_limit field for get_metadata api.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
More test cases needed.

@xli  do you have any suggestion where to put the test cases?

/land


Remove-SlackFile output is confusing

When I'm removing a lot of files, like:
Get-SlackFileInfo -Before 1/1/2017 -Paging | Remove-SlackFile -Force

I get output like this:
Id          ok Raw
--          -- ---
F09P74HUJ True @{ok=True}
...
390 lines ....
...
F09GSG79Q True @{ok=True}
F09GSA6SX True @{ok=True}
F09FX0996 True @{ok=True}
Send-SlackApi : Slack API call failed: The remote server returned an error: (429) Too Many Requests.
At C:\Users\Jaykul\Documents\WindowsPowerShell\Modules\PSSlack\0.0.36\Public\Remove-SlackFile.ps1:59 char:33
+                     $Response = Send-SlackApi @params
+                                 ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WebException
    + FullyQualifiedErrorId : System.Net.WebException,Send-SlackApi
F09FFSHEG True @{ok=True}

Other than the file ID, I'm not sure what the output is supposed to mean, since it says True @{ok=True} even when there's an error!
It's pretty clear that it needs to stop if there's an error, or pause (see #67) and the (limit headers API docs).

Wheee thanks!  Yeah, IIRC added these commands based on an issue vs. actually needing / using them = buggyyyy
The rate limit part looks like it's skipping the rate limit logic.  I'll poke around

Could be missing something, but added a $Response = $null bit in the 429 branch, just in case there was a stale variable causing this.  If that wasn't the case, I'm not sure how else it would be getting a raw response of @{ok=True}?
Cheers!

For what it's worth, the rate limiting part of this works correctly now. I just watched it slow down and keep going, it was really nice 👍 and I got no error 💯

Going to close this out, I think it's fixed.  We can open it back up if we run into another odd case.


fix(app marketplace): prevent app marketplace image reload

Description
Prevent image reload on any user interaction on the app marketplace page
Why
On user interaction on the app marketplace page all images are reloaded. This creates a very ugly flickering and results in a bad user experience. With this fix the images are cached and not reloaded every time.
Issue
ref. Jira CPLP-3190
Checklist

[x] I have followed the contributing guidelines
[x] I have performed a self-review of my own code
[x] I have successfully tested my changes locally

adding Nidhi since the issue should help on a couple of defects related to Nidhi her items


Fix compiling and linking the php plugin in uwsgi

Motivation for this change
fixes #97352 - it enables the use of the php plugin of uwsgi.
Things done
I tested in a nixos docker container, on ArchLinux host:
$ docker run -ti --rm -v ~/src/nixpkgs:/nixpkgs nixos/nix:latest
# nix-build -E 'with import <nixpkgs> {}; uwsgi.override { plugins=[ "php" ]; }' # fails as specified in the bug 97352

# NIX_PATH=nixpkgs=/nixpkgs nix-build -E 'with import <nixpkgs> {}; uwsgi.override { plugins=[ "php" ]; }' # works

Explanation of the changes
The root of the problem is that uwsgi has a bit of a different build system, and it would expect to find the php-config binary in order to set it's compiler and linker flags. There was an additional problem that the uwsgi-php plugin needs to also link with the session.so php extension - which on NixOS is a separate package¹.
The first problem was solved by adding all the required buildInputs to the uwsgi package so that it can find all the needed header files, libraries and to have php-config in its PATH.
I also had to patch uwsgi to not look for php_session.h with a path like this #include "ext/session/php_session.h", since on NixOS it's just in …php-session-7.4.8-dev/include.
Third, I had to patch the uwsgi build system for the php plugin to explicitly add the session.so library and its rpath to LDFLAGS. In the nix expression that's exported as the UWSGICONFIG_PHP_LDFLAGS environment variable. It's important that these flags are not used for the main uwsgi binary, but just for the php-plugin shared object.
¹ not sure why the session extension is separated on NixOS, it's builtin in libphp.so on both Debian/Ubuntu and ArchLinux - something to be discussed by the PHP team i guess.
ps.
this is my first involvement with the NixOS project, so I'm open to any criticism and suggestions.

Should I prepare a PR for other branches of nixpkgs too?

Let's wait until this is merged (I can only review)

can we get some reviews here please? :)

btw, I have this change in my tree too. not sure if I should add it to this PR, or to open a new one:
Date:   Thu Sep 10 21:03:19 2020 +0200

    use systemd.lib if it exists or just systemd

diff --git a/pkgs/servers/uwsgi/default.nix b/pkgs/servers/uwsgi/default.nix
index 043b788673b..9ede8249f1c 100644
--- a/pkgs/servers/uwsgi/default.nix
+++ b/pkgs/servers/uwsgi/default.nix
@@ -71,7 +71,8 @@ stdenv.mkDerivation rec {

   buildInputs =  [ jansson pcre ]
               ++ lib.optional withPAM pam
-              ++ lib.optional withSystemd systemd
+              ++ lib.optional withSystemd (lib.getLib systemd)
+              ++ lib.optional withSystemd (lib.getDev systemd)
               ++ lib.concatMap (x: x.inputs) needed
               ;

Hmmm, I tested this on my server and all my web pages are blank. Could these changes have caused it?

I tested this on my server and all my web pages are blank. Could these changes have caused it?

well… more context is needed.
Prior to this PR you couldn't even have uwsgi with PHP in nix. It just doesn't compile (see #97352).
Apart from that, I don't know what your web pages are, what your uwsgi configuration is, or how you use it. I can assure you that I'm currently running uwsgi+php and a php app from this exact branch.

@rnhmjoj is this something you have the ability to review?

@rnhmjoj is this something you have the ability to review?

I think so, I spent some time studying uwsgi recently: I'll see what I can do.

Apart from that, I don't know what your web pages are, what your uwsgi configuration is, or how you use it. I can assure you that I'm currently running uwsgi+php and a php app from this exact branch.

It would be good to have a small test. I'll try to write it but I know nothing about php.

It would be good to have a small test. I'll try to write it but I know nothing about php.

thanks for that

It took some trial and error but I managed to write a minimal test: It works all right. @schneefux may have had a more complicated setup or just misconfigured uwsgi: even if the doc is good I still find it quite tricky to get it right.
Anyway, @gdamjan I had to rebase because your checkout is too old and the test has been changed in master.

Thank you, can you squash the fixup commits? Looks good to be merged.

Thank you, can you squash the fixup commits? Looks good to be merged.

just the two last commits into a single, or those two into the second one perhaps?
thanks

just the two last commits into a single, or those two into the second one perhaps?

I was thinking about squashing them into 27e5cbb.

just the two last commits into a single, or those two into the second one perhaps?

I was thinking about squashing them into 27e5cbb.

right. done!

Uh, while you're at it: can you add the test to passthru.tests? (See 8ff681a7caeec1b6138f03242823ec95983a066c for an example)
It makes the CI (ofBorg) automatically run the test when the uwsgi package is updated.

Thank you very much @rnhmjoj! :tada:

Hi, just as a heads up I am having an issue with nixpkgs-review after this commit:
$ nix-env -f /home/fabian/.cache/nixpkgs-review/pr-107345/nixpkgs -qaP --xml --out-path --show-trace
error: --- TypeError ----------------------------------------------------------------------------------------------------------- nix-env
at: (97:29) in file: /home/fabian/.cache/nixpkgs-review/pr-107345/nixpkgs/pkgs/servers/uwsgi/default.nix

    96|   # the hack works in coordination with ./additional-php-ldflags.patch
    97|   UWSGICONFIG_PHP_LDFLAGS = lib.optionalString (builtins.any (x: x.name == "php") needed)
      |                             ^
    98|         lib.concatStringsSep "," [

attempt to call something which is not a function but a string

Yeah, seems like eval is borked after this merge, all recent PRs are having an issue during evaluation: #107340, #107342, #107343, #107344, #107345
nix-env failed:
warning: ignoring the user-specified setting 'restrict-eval', because it is a restricted setting and you are not a trusted user
error: while evaluating anonymous function at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-3/.gc-of-borg-outpaths.nix:44:12, called from undefined position:
while evaluating anonymous function at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-3/pkgs/top-level/release-lib.nix:121:6, called from /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-3/lib/attrsets.nix:292:43:
while evaluating 'hydraJob' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-3/lib/customisation.nix:171:14, called from /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-3/pkgs/top-level/release-lib.nix:121:14:
while evaluating the attribute 'drvPath' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-3/lib/customisation.nix:188:13:
while evaluating the attribute 'drvPath' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-3/lib/customisation.nix:155:13:
while evaluating the attribute 'buildInputs' of the derivation 'cutelyst-2.13.0' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-3/pkgs/stdenv/generic/make-derivation.nix:192:11:
while evaluating the attribute 'UWSGICONFIG_PHP_LDFLAGS' of the derivation 'uwsgi-<IP_ADDRESS>' at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-3/pkgs/stdenv/generic/make-derivation.nix:192:11:
attempt to call something which is not a function but a string, at /var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/mr-est/ofborg-evaluator-3/pkgs/servers/uwsgi/default.nix:97:29

Reverted.  Please we do have CI that catches such errors.  There's this red cross next to the commit.  https://gist.github.com/GrahamcOfBorg/cff3c8276a4df394f26fb8693825f8b6

Oof, sorry. I've tested locally by running the test but it must have been cached...

can someone explain that error, and how to see it locally?

I think you're missing parenthesis around the call to concatStringsSep.

Caching won't prevent evaluation errors.
@gdamjan: anything with that package will fail, e.g.
$ nix-build -A uwsgi
error: attempt to call something which is not a function but a string, at /home/admin/nix/nixpkgs-x/pkgs/servers/uwsgi/default.nix:97:29

What's the process now. Open a new PR?

What's the process now. Open a new PR?

Yes, I don't think there is any other way with github.

@gdamjan: anything with that package will fail, e.g.

right, for some reason php-opcache fails to compile on the latests master (for me), and I didn't catch the my error.


[Question] What commands do not wakeup and what ones do?

I would like to know what commands can be issued without waking up the car.
I need to gather info about the car but don't want to wake it.
Also... is it possible to send a "sleep" command?

Only 'vehicle' and 'vehicles' do NOT wake up the car. All other commands are going to the car directly so it needs to be awake.
As far as I know there is no sleep command in the tesla API, if only that were true! It is my biggest feature request for the Tesla API :P

Gotcha! Thanks!
BTW find not right that if the car is "sleeping" and you send for example a "vehicleConfig" command, the return is an error, but the car wakes. More correct would be not waking the car or not throwing the error.
It's a pity that we cant send a "remote push" of the turnoff button in car -> service menu.


[PA][Python]Update continuous mode with reference text when enable miscue

Purpose

To get miscue on omission and insertion for zh-cn like locales which need word segmentation.

Pull Request Type
What kind of change does this Pull Request introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

@microsoft-github-policy-service agree company="Microsoft"

From: microsoft-github-policy-service[bot] @.>
Sent: Wednesday, September 25, 2024 5:15 PM
To: Azure-Samples/cognitive-services-speech-sdk @.>
Cc: Yan Deng @.>; Mention @.>
Subject: Re: [Azure-Samples/cognitive-services-speech-sdk] [PA][Python]Update continuous mode with reference text when enable miscue (PR #2605)
@yaden-mshttps://github.com/yaden-ms please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
@microsoft-github-policy-service agree [company="{your company}"]
Options:

(default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.

@microsoft-github-policy-service agree

(when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.

@microsoft-github-policy-service agree company="Microsoft"
Contributor License Agreement
Contribution License Agreement
This Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
and conveys certain license rights to Microsoft Corporation and its affiliates (“Microsoft”) for Your
contributions to Microsoft open source projects. This Agreement is effective as of the latest signature
date below.

Definitions.
“Code” means the computer software code, whether in human-readable or machine-executable form,
that is delivered by You to Microsoft under this Agreement.
“Project” means any of the projects owned or managed by Microsoft and offered under a license
approved by the Open Source Initiative (www.opensource.orghttp://www.opensource.org/).
“Submit” is the act of uploading, submitting, transmitting, or distributing code or other content to any
Project, including but not limited to communication on electronic mailing lists, source code control
systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of
discussing and improving that Project, but excluding communication that is conspicuously marked or
otherwise designated in writing by You as “Not a Submission.”
“Submission” means the Code and any other copyrightable material Submitted by You, including any
associated comments and documentation.
Your Submission. You must agree to the terms of this Agreement before making a Submission to any
Project. This Agreement covers any and all Submissions that You, now or in the future (except as
described in Section 4 below), Submit to any Project.
Originality of Work. You represent that each of Your Submissions is entirely Your original work.
Should You wish to Submit materials that are not Your original work, You may Submit them separately
to the Project if You (a) retain all copyright and license information that was in the materials as You
received them, (b) in the description accompanying Your Submission, include the phrase “Submission
containing materials of a third party:” followed by the names of the third party and any licenses or other
restrictions of which You are aware, and (c) follow any other instructions in the Project’s written
guidelines concerning Submissions.
Your Employer. References to “employer” in this Agreement include Your employer or anyone else
for whom You are acting in making Your Submission, e.g. as a contractor, vendor, or agent. If Your
Submission is made in the course of Your work for an employer or Your employer has intellectual
property rights in Your Submission by contract or applicable law, You must secure permission from Your
employer to make the Submission before signing this Agreement. In that case, the term “You” in this
Agreement will refer to You and the employer collectively. If You change employers in the future and
desire to Submit additional Submissions for the new employer, then You agree to sign a new Agreement
and secure permission from the new employer before Submitting those Submissions.
Licenses.

Copyright License. You grant Microsoft, and those who receive the Submission directly or
indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license in the
Submission to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute
the Submission and such derivative works, and to sublicense any or all of the foregoing rights to third
parties.
Patent License. You grant Microsoft, and those who receive the Submission directly or
indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license under
Your patent claims that are necessarily infringed by the Submission or the combination of the
Submission with the Project to which it was Submitted to make, have made, use, offer to sell, sell and
import or otherwise dispose of the Submission alone or with the Project.
Other Rights Reserved. Each party reserves all rights not expressly granted in this Agreement.
No additional licenses or rights whatsoever (including, without limitation, any implied licenses) are
granted by implication, exhaustion, estoppel or otherwise.

Representations and Warranties. You represent that You are legally entitled to grant the above
licenses. You represent that each of Your Submissions is entirely Your original work (except as You may
have disclosed under Section 3). You represent that You have secured permission from Your employer to
make the Submission in cases where Your Submission is made in the course of Your work for Your
employer or Your employer has intellectual property rights in Your Submission by contract or applicable
law. If You are signing this Agreement on behalf of Your employer, You represent and warrant that You
have the necessary authority to bind the listed employer to the obligations contained in this Agreement.
You are not expected to provide support for Your Submission, unless You choose to do so. UNLESS
REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, AND EXCEPT FOR THE WARRANTIES
EXPRESSLY STATED IN SECTIONS 3, 4, AND 6, THE SUBMISSION PROVIDED UNDER THIS AGREEMENT IS
PROVIDED WITHOUT WARRANTY OF ANY KIND, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY OF
NONINFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
Notice to Microsoft. You agree to notify Microsoft in writing of any facts or circumstances of which
You later become aware that would make Your representations in this Agreement inaccurate in any
respect.
Information about Submissions. You agree that contributions to Projects and information about
contributions may be maintained indefinitely and disclosed publicly, including Your name and other
information that You submit with Your Submission.
Governing Law/Jurisdiction. This Agreement is governed by the laws of the State of Washington, and
the parties consent to exclusive jurisdiction and venue in the federal courts sitting in King County,
Washington, unless no federal subject matter jurisdiction exists, in which case the parties consent to
exclusive jurisdiction and venue in the Superior Court of King County, Washington. The parties waive all
defenses of lack of personal jurisdiction and forum non-conveniens.
Entire Agreement/Assignment. This Agreement is the entire agreement between the parties, and
supersedes any and all prior agreements, understandings or communications, written or oral, between
the parties relating to the subject matter hereof. This Agreement may be assigned by Microsoft.

—
Reply to this email directly, view it on GitHubhttps://github.com/Azure-Samples/cognitive-services-speech-sdk/pull/2605#issuecomment-2373518788, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFYYE4KCQCE2ZWL5HFPMMOLZYJ5JNAVCNFSM6AAAAABO2CBDJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZTGUYTQNZYHA.
You are receiving this because you were mentioned.Message ID: @.***>

/azp run


initialize treeview inside confirm box - not working

jquery-confirm version:
v3.3.2
I'm submitting a ...  (check one with "x")
[x] bug report
[ ] feature request
[ ] support request
Current behavior:
can not initialize treeview inside jquery confirm
Expected behavior:
loading treeview and intitialize inside jquery confirm
Related code:
  $.confirm({
    theme: 'own',
    content: function(data, status, xhr){
      var self = this;
      self.setContent('

');
    },
    onContentReady: function(){
      $("#tree").fancytree({
        checkbox: true,
        source: [
          {title: "Node 1"},
          {title: "Node 2", key: "id2"},
          {title: "Folder 3", folder: true, children: [
            {title: "Node 3.1"},
            {title: "Node 3.2"}
          ]},
          {title: "Folder 2", folder: true}
        ],
      });
    }
  });

Other information:
i'm using https://github.com/mar10/fancytree to view a tree with related data. i'd like to display that tree in a confirm box. i load the tree via ajax and it's visible in the confirm box, but if i try to initialize the tree, the data is only text and not rendered as treeview.
intitialization is done using the embedded '
' markup. html is rendered before loading into confirm box and after that it should be shown with the fancytree plugin.
see html markup here -> http://wwwendt.de/tech/fancytree/demo/#sample-source.html
tried many ways to get the tree loaded, but none works. would be nice if someone can give me a hint on how to do this.
thank you

Hi,
can you make a fiddle?

It's done already, missed to close the issue. Sorry
You can see it here -> https://github.com/mar10/fancytree/issues/794


jump-to-conversation-close-event error on pull request commits

Description
Error on isPRCommit:
refined-github.js:8642 Uncaught TypeError: Cannot read properties of undefined (reading 'closest')
    at addToConversation (refined-github.js:8642:200)
    at runAdd (refined-github.js:22353:20)
    at applyChanges (refined-github.js:22269:7)
    at SelectorObserver.addRootNodes (refined-github.js:22789:3)
    at Array.processBatchQueue (refined-github.js:22210:5)
    at MutationObserver.handleMutations (refined-github.js:22244:19)

How to replicate the issue

Open 7e8bb26 (#2182)
See error

Extension version
22.7.11
Browser(s) used
Chrome

This is really a (my) mistake in https://github.com/refined-github/github-url-detection/.
I should have made 2 detections. One for closed conversations (only the conversation) and one for a PR thats closed.

Unless maybe we should just include isConversation?

The error comes from our ambiguous usage of “conversation”. We have “isConversationList” to describe “is list of issues and PRs” but “isConversation” describes “is issue or specifically then conversation tab or a PR”
So “isClosedConversation” makes sense using the first meaning but not the second one.
Let’s add an additional “isConversation” to the feature’s “asLongAs”, simply because that’s how the nearby detections are used (isOpenPR, etc). I’m afraid that if we change the detection we’ll end up wanting the opposite in the future.
Related:

https://github.com/refined-github/refined-github/issues/5389


add AntdOpenBrowser plugin

why?

It looks like you are using a pull bot?  The pull bot has force pushed your plugin_api_v2 branch erasing your commited changes. I would suggest branching off and then making the change rather than directly off the forked main branch.

Thanks. I have deleted the pull bot and I will raise the PR again


Error running locally

Hi, how are you?
I was trying to run the repo locally to add some things and test them in the example app. I run
npm run bootstrap
npm run start

This fails with
There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts-ts package provided by Create React App requires a dependency:

  "webpack": "4.19.1"

Don't try to install it manually: your package manager does it automatically.
However, a different version of webpack was detected higher up in the tree:

  /Users/ilanolkies/code/web3modal/node_modules/webpack (version: 4.44.2)

The solution was running this each time I made a change
rm -rf node_modules
cd example
npm run start

There is an issue with the dependencies :/ In addition it would be nice to have lib built on change. See https://webpack.js.org/configuration/watch/
Cheers

This has been fixed

This has been fixed


Opening files that use atom:// URIs create fake folders

Opening Settings or any other file that uses a URI will cause a fake folder to appear in the Tree View (eg config, init-script) and Settings - atom://config or similar to show up in the titlebar. Reproduce by using a new window.
Tested using safe mode and also reported in #10194, atom/tree-view#690.

This is harder to reproduce than it once was, but I still managed:
Repro Steps

Open a Terminal window
Execute the command rm -rf ~/.atom/storage
Change directory to your atom/atom repository
Launch Atom with atom --safe .
Open a new window with Shift+Cmd+N
Open Settings View by clicking the menu Atom > Preferences (or any of the Create Your items)

Expected: Settings View opens without creating a project root
Actual: Settings View opens, Tree View opens and a fake config project root is created

Similar, probably related issue, happens if you open your keymap/init script/config/stylesheet. Reproduction steps are similar to @lee-dohm's:

Open a Terminal window
Execute the command rm -rf ~/.atom/storage
Change directory to your atom/atom repository
Launch Atom with atom --safe .
Open a new window with Shift+Cmd+N
Open your Keymap/Stylesheet/Config/Init Script by using the Command Palette.

(@maxbrunsfeld: I assigned you based on your previous assignment in #8227)

OK, this bug is caused by changes that were made to allow custom directory providers. Currently, we add project folders even if existsSync() returns false for the corresponding Directory object. We have to do this because custom directory providers are not registered until after the Project has already been deserialized.
To fix this, we need to register custom directory providers before deserializing the project. We'll have to look for that service (atom.directory-provider) in packages' metadata, and conditionally require their main modules and register that service early.
Then, we can change Project::addPath to bail out of Directory::existsSync() returns false. Packages that provide the atom.directory-provider service (e.g. nuclide) will need to make sure that existsSync() returns true at first, even if the directory provider is not fully initialized (e.g. the user hasn't logged into the remote machine yet).
/cc @nmote @peterhal
We will start work on this shortly.

Special casing the atom.directory-provider service during Atom initialization is extremely fragile.
The directory-provider implementation will need to be able to give an answer even though its containing package's Activate method has not been called.
IIUC the current order is:

Atom deserializes the project state

Atom attempts to restore previously open files/directories

Atom activates packages

@peterhal: A big complaint from Atom users is startup time, and package activation makes up a large portion of that time. We want to move in the direction of activating packages later rather than earlier so we can give users feedback as soon as possible. So we don't want to do anything that would add an assumption of all packages being activated at a specific early phase of the startup process.
You're right that calling a service hook prior to package activation could be a surprising behavior, however, I'm not completely convinced that it's unworkable. Could you go into some specific details about how you see things potentially going wrong with this? Startup is a very performance-sensitive time for Atom and we're willing to make things slightly less convenient for package authors to do fairly niche things in the name of keeping our options for improving startup performance open.

Sorry for this weirdness everyone. This will be fixed in Atom 1.12. We will probably release 1.12-beta0 at the beginning of October.


Upgrade builder; use correct archetype

I missed these changes before – this fixes https://github.com/FormidableLabs/builder-victory-component/issues/14.

approved!


Checking and interpreting type instantiations wrt declared bounds

Previously considered: well-formedness of wildcard types
In #31:
For class C<T extends @NotNull Object> we agreed to not require an explicit bound at the instantiation sites, i.e. C<?> and C<? extends Object> both mean C<? extends @NotNull Object>. This is in agreement with the logic of JLS that applies implicit bounds to wildcards (i.e. Foo<? extends Bar> means Foo<? extends Bar&Bounds_of_T> where Foo is declared to be Foo<T extends Bounds_of_T>).
Instantiating types without wildcards
Type variables with @NotNull bounds
To illustrate the question, let's consider the following declarations:
class A<TA extends @NotNull Object> {
	TA get();
	void set(TA t);
}

By our current spec, this is equivalent to:
class A<TA extends @NotNull Object> {
	@NotNull TA get();
	void set(@NotNull TA t);
}

Observation: I believe we can't allow any instantiation of type A<...> to have set() that accepts @Nullable, because it is not the contract supported by the implementation. In theory, we could allow get() to return @Nullable, but I'd like to avoid it.
So, a simple rule for such classes would be:
A<@X Y> means A<@NotNull Y> for any nullability annotation @X.
Type variables with @Nullable bounds
Type parameters with nullable bounds get parametric at use sites:
class A<TA extends @Nullable Object> {
	TA get();
	void set(TA t);
}

Usages TA being parametric means that (in the body of A):

A<TA>.get() can return null
A<TA>.set() may fail when passed a null
TA ta = null is not safe, because TA may end up being @NotNull String
@NotNull Object foo(TA ta) { return ta; } is not safe, because TA may end up being @Nullable String
@Nullable T getOrNull()

this.set(this.getOrNull()) - unsafe to pass @Nullable T for T, because T may end up being @NotNull String

Here, unlike the previous case, the first intuition is that A<@Nullable C> is not the same as A<@NotNull C>, because in the first case get() can return null, and in the second case it can not.
The intuitive substitution rule is:
Parametric usages of T are replaced with the corresponding arguments including their annotations
Examples:

A<@Nullable String> a; a.get().length() - not safe to dereference a.get() because it's nullable
A<@Nullable String> a; a.set(null) - ok
A<@NotNull String> a; a.get().length() - safe to dereference a.get() because it's not null
A<@NotNull String> a; a.set(null) - not safe, because set() takes @NotNull String

It may seem that the body of set has to be null-tolerant (because it must be prepared to TA being a nullable type), but it can store the argument in a field which get later returns, so we must require that its argument is not null

A<@UnknownNulness String> a; a.get().length() - dereference of a.get() is of unknown safety, unsafe under the strict mode, ok under lenient mode
A<@UnknownNulness String> a; a.set(null) - not sure whether we shoudl consider this unsafe under the strict mode, I'd say we shouldn't, and definitely no complaints in the lenient mode

Type variables with @NullnessUnknown bounds
class A<TA extends @NullnessUnknown Object> {
	TA get();
	void set(TA t);
}

By our current spec, this is equivalent to:
class A<TA extends @NullnessUnknown Object> {
	@NullnessUnknown TA get();
	void set(@NullnessUnknown TA t);
}

In #45 we discussed the case of substituting for type parameters whose bounds have @NullnessUnknown: the common understanding seems to be that the usages of such type variables we consider implicitly also annotated @NullnessUnknown, so when we substitute anything for them, they do not turn into @NotNull.
So, I'd say this case should be equivalent to the case of extends @NotNull:
A<@X Y> means A<@NullnessUnknown Y> for any nullability annotation @X.
Bottomline: substitution rules

See the old proposal by @abreslav

The corresponding substitution rules are:

When type variable usage T is parametric (i.e. not annotated explicitly, and has @Nullable upper bound)

T [T ← @A C] := @A C, for A in {@Nullable, @NotNull, @NullnessUnknown}

When type variable usage T is annotated explicitly or implicitly (trough its bound being @NotNull or @NullnessUnknown)

@A T [T ← @CA C] := @A C, for A in {@Nullable, @NotNull, @NullnessUnknown} and any @CA

I think we can close this. I think this discussion did its job and fed into our thought processes when we needed it.
The text is now 2 years stale and hard to see as actionable. In case anything within here isn't solved and we have nothing else tracking it, please file that as an issue.


Comparisons and Sorts

Fixed missing title

Snippet code formatting seems to have issues

Any idea what is wrong here? I simply cut and pasted the code block from MSDN and added triple quotes before and after. Is there a different/better way to do this?

@stevehoag you may have to manually format.  Markdown is pretty WYSIWYG, so it could be that some formatting on the MSDN page could not be preserved.  You should also mark the triple back-quote with csharp as such:
```csharp

Both GitHub and docfx can apply styles that way.
I copy source into VS Code and view the document with the Markdown viewer (ctrl-shift-v), as the formatting for source will be identical on docfx and GitHub.

I figured out the code formatting issue. VS Code uses straight apostrophes ('), GitHub is expecting backticks (`) to mark code. I don't see any way to configure this in VS Code - maybe inserting the ASCII code?


Enhancement: Implement FrontMatter::hasFrontMatter()

This PR

[x] implements FrontMatter::hasFrontMatter()

💁♂ As of the moment, FrontMatter::parse() always returns a Document, even when a string does not have any front matter. By exposing FrontMatter::hasFrontMatter(), we can verify if a string has front matter defined. This can be useful for finding files in a directory, but ignoring those that do not have front matter defined.

@hason
Build failures appear to be present in master already.

@localheinz Thanks! You suggestion is implemented with fragments of your code in 1.2.0.

Thank you, @hason!


6.4.2 - release note tracking

Template Fixes:

N/A at this time.

Specification Changes:

Field
Change

antimicrobial_agent_name
NEW PICKLIST items: Enrofloxacin [CHEBI:35720], Norfloxacin [CHEBI:100246], Oxolinic acid [CHEBI:138856], Oxytetracycline [CHEBI:27701], Piperacillin [CHEBI:8232], Polymyxin B [ARO:3000454]

<enrofloxacin_fields>
NEW enrofloxacin fields: resistance_phenotype, measurement_sign, measurement, testing_standard, testing_standard_version, testing_standard_details,susceptible_breakpoint, intermediate_breakpoint, and resistant_breakpoint.

food_packaging_date
NEW field.

food_product_properties
NEW PICKLIST items: Food (canned) [FOODON:00002418], Food (dried) [FOODON:03307539], Food (fresh) [FOODON:00002457], and Food (frozen) [FOODON:03302148].

food_quality_date
NEW field.

<norfloxacin_fields>
NEW norfloxacin fields: resistance_phenotype, measurement_sign, measurement, testing_standard, testing_standard_version, testing_standard_details,susceptible_breakpoint, intermediate_breakpoint, and resistant_breakpoint.

<oxolinic-acid_fields>
NEW oxolinic acid fields: resistance_phenotype, measurement_sign, measurement, testing_standard, testing_standard_version, testing_standard_details,susceptible_breakpoint, intermediate_breakpoint, and resistant_breakpoint.

<oxytetracycline_fields>
NEW oxytetracycline fields: resistance_phenotype, measurement_sign, measurement, testing_standard, testing_standard_version, testing_standard_details,susceptible_breakpoint, intermediate_breakpoint, and resistant_breakpoint.

<piperacillin_fields>
NEW piperacillin fields: resistance_phenotype, measurement_sign, measurement, testing_standard, testing_standard_version, testing_standard_details,susceptible_breakpoint, intermediate_breakpoint, and resistant_breakpoint.

<polymyxin-b_fields>
NEW polymyxin b fields: resistance_phenotype, measurement_sign, measurement, testing_standard, testing_standard_version, testing_standard_details,susceptible_breakpoint, intermediate_breakpoint, and resistant_breakpoint.

sequencing_instrument
Several GENEPIO term IDs deprecated after rehoming in OBI, see issue #18 for details.

Version Tracking:
Excel Template, Reference Guides, Curation SOP

x = 6 = new antibiotic fields
y = 4 = new antimicrobial agent names, new food product properties
z = 2 = no changes

New Term SOP to be update as well.

Deprecated IDs

sequencing_instrument
new IDs
deprecated IDs

Illumina Genome Analyzer II
OBI:0000703
GENEPIO:0100107

Illumina Genome Analyzer IIx
OBI:0002000
GENEPIO:0100108

Illumina HiSeq 1000
OBI:0002022
GENEPIO:0100114

Illumina HiSeq 2000
OBI:0002001
GENEPIO:0100116

Illumina HiSeq 2500
OBI:0002002
GENEPIO:0100117

Illumina HiSeq 3000
OBI:0002048
GENEPIO:0100118

Illumina HiSeq 4000
OBI:0002049
GENEPIO:0100119

Illumina MiSeq
OBI:0002003
GENEPIO:0100125

Illumina NextSeq 500
OBI:0002021
GENEPIO:0100127

PacBio RS II
OBI:0002012
GENEPIO:0100132

Rationale: Ontology for Biomedical Investigations (OBI) was deemed an appropriate domain ontology to home these terms. All sequencing instrument terms are in the process of being created in OBI, imported into GENEPIO, and then deprecated in GENEPIO. More information on this process is available at: https://github.com/cidgoh/GRDI_AMR_One_Health/wiki/Deprecating-&-Normalizing-Specification-Values-&-IDs

Released


Document behavior of Pool::clone

Looking at the source, it seems like the Clone impl on Pool does indeed share the connections, however this feature is easily missed, leading users to put the Pool into an Arc<Mutex<...>> to attempt to share it.
Can we add some documentation to the Pool object that explains how to share the pool correctly?

Sure

Sure


Security Concerns when encrypting the database with password

I have a few concerns. For LiteDB's encryption feature to be taken seriously, these should be addressed:

Unpredictable IV per page ( #360 already mentions this )
Move to authenticated Encryption or "Encrypt-then-MAC" (currently uses unauthenticated symmetric encryption)
Ensure cryptographically secure RNG is used throughout (I sent a pull request for one instance, but haven't audited the code base).
Use an alternative key derivation scheme. Currently uses Rfc2898DeriveBytes with defaults.

There are issues with Rfc2898DeriveBytes. It's default iteration count is too low and it is hard coded to use SHA1. Use a better implementation.

http://securitydriven.net/inferno/ is a wonderful library that leverages existing crypto api's in a way that makes it much harder to screw up.
The author also has a companion book that I would recommend to anyone. The library is MIT licensed, professionally audited and highly regarded.
One issue is that it hasn't been ported to target .NET standard yet, but they are talking about it in their issues (it's the only open issue).
Anyway, those are my thoughts.

Completely agree.  Missed this before positing my own similar suggestion.
I also noticed that there potentially a critical bug in that an SHA1 hash of the database password is stored in the database header page.  Any file with the same password will have the same password hash.  Plus a malicious user could generate hashes for common passwords and simply compare them with the hash stored in the header page which is computationally easy.

Hi @ronnieoverby and @elyoh,
LiteDB implement a simple encription feature (and now reading this I can see how simple is it). This must be reviewed. This encryption is on my list be complete re-write, but first I will need undersant better all encryption process. I only knows basics about encryption. There is any reference where I can study more about this?

The book I referenced is a good start. The theme of the book is "you aren't a cryptography expert, so just do what the experts tell you and nothing else".
That should be your mantra. It's mine.
There's a section in the book that's all about symmetric encryption and common mistakes. Here are the common mistakes that he lists:

Here is a non-exhaustive list of common symmetric encryption mistakes you should learn to recognize:

Not using an unpredictable IV in CBC mode (IV is calculated somehow, or reused).
Using Symmetric Encryption without Authenticated Encryption (i.e. MAC is not included).
Using Authenticated Encryption but forgetting to include IV as part of MAC.
Not using two independent keys for EtM (same key or dependent keys). 5. Using a non-cryptographically-strong RNG (ex. using System.Random() instead of CSP-based RNG).
Improperly deriving master key from SKM (ex. hashing user-provided password string).
Using silent-fallback with UTF encodings or using UTF-based encodings instead of string serialization.

Addressing each of these issues would be a good start. Also, read that book. It's $19.

Has this been fixed? We are considering using LiteDB for our software. Password encryption is of great importance to us. Please advise.

Hi! With the objective of organizing our issues, we are closing old unsolved issues. Please check the latest version of LiteDB and open a new issue if your problem/question/suggestion still applies. Thanks!


Re upgrading Celluloid to 0.17.2

As downgraded in: https://github.com/rails/actioncable/pull/37, Celluloid 0.17.2 seems to fix the issues that it has with Spring. This means ActionCable is free to move forward on Celluloid 0.17.2. Example showing the issue is fixed:
time rails r 'puts "Celluloid @ #{Celluloid::VERSION}, Spring @ #{defined?(Spring) ? Spring::VERSION : "-"}"'
Celluloid @ 0.17.2, Spring @ 1.4.0

real	0m0.654s
user	0m0.408s
sys	0m0.036s

time rails r 'puts "Celluloid @ #{Celluloid::VERSION}, Spring @ #{defined?(Spring) ? Spring::VERSION : "-"}"'
I, [2015-10-14T21:41:51.180579 #24031]  INFO -- : Celluloid 0.17.2 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
Celluloid @ 0.17.2, Spring @ -

real	0m1.967s
user	0m1.670s
sys	0m0.168s

There are currently 4 failing tests and 2 errors in the test suite that are failing for the master branch. The test suite also seems to deadlock when run with certain seeds (4042 was one), but I do not believe that to have any relation to celluloid's version.

Bah, tried to get cute by rebasing from the current master (so tests would pass) and it screwed up the pull request mightily.

There we go, much better. Working, with tests passing, on Celluloid 0.17.2.

:+1: We'll be running off of this since we need to upgrade other celluloid-dependent things. Thanks! (I was about to submit the same PR but happened to notice your circle build and was like, "hey...!")

Want me to rebase real quick?

Sure.

Phew, that was a big merge. With the intervening changes, the require 'celluloid' in lib/action_cable.rb was moved into specific files. I didn't update those, as it will still work, but down the road, those should be changed to require 'celluloid/current'.

Thanks for the rebase. For us, and likely many others, the main other celluloid dependency is from Sidekiq, but it looks like that won't be an issue for long as @mperham will be removing it in Sidekiq 4. But until then, we run on the bleeding edge :grin:

+1


Accents are not rendered correctly

Accents are not rendered correctly
I use french language using Home Manager
{
  home-manager.config = {
    home.language.base = "fr_FR";
  };
}

Full config here

Do they render OK in regular termux app?

I don't know how to reproduce on Termux


commands not found on OSX

Hi Devs,
Not sure if the issue is on my end or not. I have tried to install the the plugin. When I tried to connect to my Postgres DB I got the following error:
command 'extension.connectPostgreSQL' not found
I also get similar errors for other commands.
Environment:
OS: OSX Sierra 10.12.1
VSCode: 1.7.1
Let me know if you need more details

duplicate #7

Thanks @Bajdzis its working now. Keep up the great work.


Unbearable drag experience

Version: 1.0.106
Platform: win32 10.0.19041
Plugins: none
When I click to drag the terminus around, it reacts very slow and I have to wait the window moves little by little until the expected postion. Unlike others apps in my computer in which you can drag it everywhere and it reacts very smoothly, I can not operate anything during this slow drag reaction progress.
I do not know it is a common behaviour or just because my computer not configured properly
Any help is appreciated.

change background type to blur. I have the same problem with fluent background type.

Change background type to blur. I have the same problem with fluent background type.

Thanks a lot. It works.

Duplicate of #949


Bumps collector version to 3.15.0

Description
In preparation for code-freeze, this bumps the collector version to the newly cut version 3.15.0

@Stringy , I think I remember now that pointing to a commit which is not on master breaks midstream. We should maybe point to 3.15.x instead and bump collector to 3.15.0 once release-4.1 is cut ?

pointing to a commit which is not on master breaks midstream

I think it only needs to be a valid commit that is reachable on some branch in the repo. Unless I am remembering that incorrectly?

/test ocp-4-10-qa-e2e-tests

I think it only needs to be a valid commit that is reachable on some branch in the repo.

Yes, that. No need to worry about custom branches and commits as long as they are present in the repo. That previous time the commit was not findable in the repo.

pointing to a commit which is not on master breaks midstream

I think it only needs to be a valid commit that is reachable on some branch in the repo. Unless I am remembering that incorrectly?

I mixed-up with the submodules branches, which can't find the commit if not on the specified branch. Sorry :)


Simple, could be simpler :)

I think you are going the right direction with micro, but as a user, I still have to check when to use async and when to use await.
Consider this:
const {buffer, text, json} = require('micro')
module.exports = async (req, res) => {
  const buf = await buffer(req)
  console.log(buf)
  // <Buffer 7b 22 70 72 69 63 65 22 3a 20 39 2e 39 39 7d>
  const txt = await text(req)
  // '{"price": 9.99}'
  const js = await json(req)
  // { price: 9.99 }
  console.log(js.price)
  return '''
}

Now consider this:
module.exports = (req, res) => {
  const buf = buffer(req)
  console.log(buf)
  // <Buffer 7b 22 70 72 69 63 65 22 3a 20 39 2e 39 39 7d>
  const txt = text(req)
  // '{"price": 9.99}'
  const js = json(req)
  // { price: 9.99 }
  console.log(js.price)
  return '''
}

That is simpler, less code and takes the guess-work out of which functions are already using await internally and which don't, the default being 'sane', i.e. functions return useful values and not promises.

The problem is that your second example will lock up the Node process until the request finishes uploading; while the first one will allow many requests to happen in parallel. This is because the await syntax exits the function until the promise resolves, allowing other code to run in the interim.

You don't need to use await or async when using synchronous functions. This is a matter of language design and has nothing to do with micro 😊

I wasn't very clear: I'm advocating for buffer, text, json using away internally, so your users don't have to!
There will no locking as fundamentally everything runs asynchronously, but the users of your API can use it without having to actually care.

There is no way to use await internally. If a function uses await, it must be an async function, which means that the user must call it with await.
await isn’t magic, it’s just syntactic sugar.

Ouch. Yeah, reading the spec helps. async/await is really just sugar. No transformation into state machines like ClojureScript's async. My bad and sorry for the interruption.


Login and signup buttons in home page

Login and SignUp buttons styles can be changed in all pages to identify them as buttons.
In home page cursor-pointer can be added.

please assign the issue @khushi-joshi-05

please assign this issue to me


After updating my library the linter is complaining about the project name?

Describe the problem
I did a new release of ESP-WebOTA but the library manager has not picked it up yet. Checking the logs I see:
2023/12/18 22:29:38 Checking out tag: v0.1.6
2023/12/18 22:29:38 Release ESP-WebOTA:0.1.6 has wrong library name, should be ESP32-OTA

I'm not sure why it's asking me to change the name of the library. It's been ESP-WebOTA since the beginning. The string ESP32-OTA is not in my repo anywhere so I'm not sure where that's coming from.
To reproduce
Do a release with my existing library.properties file
Expected behavior
Library manager doesn't complain about the library name
Additional context
No response
Issue checklist

[X] I searched for previous reports in the issue tracker
[X] My report contains all necessary details

Please disregard... I guess I did change the name of my library I just don't remember it. I will revert :)


create Policy definition, PolicySet and Policy assignment in one go

Example:
create new Policy definition, create PolicySet leveraging the newly created Policy definition and create a Policy assignment for the newly created PolicySet - all in one go.
Finding: AzOps Push tries to create the Policy assignment at first which fails due to the Policy definition respectively the PolicySet is not created, yet.

Can you elaborate a bit more on the intent? AzOps is a generic pipeline for ARM templates, and policyDefinitions, policySetDefinitions, and policyAssignments are all their own explicit APIs and resources. Technically there's nothing that prevents you from achieving the above today, as you could include these resourceTypes in a single template and use dependsOn to determine the dependency graph and execution of these resources. Have you tried that?

single template covering multiple resources the way to go - thx


Short solution needed: "How to get data frame row by index" (python-pandas)

Please help us write most modern and shortest code solution for this issue:
How to get data frame row by index (technology: python-pandas)
Fast way
Just write the code solution in the comments.
Prefered way

Create pull request with a new code file inside inbox folder.
Don't forget to use comments to make solution explained.
Link to this issue in comments of pull request.

How to get dataframe row by index


Add to invite code to payment link

[x] add an invite code to every payment link
[x] when new user uses payment link with inviteCode it should perform like invite link

@sirpy
The first user gets a new user in the list of invited persons if the second user  passed the registration through the payment link
Video: https://www.screencast.com/t/EPwwZZSUGXYo
Checked on DEV V0.25.0
Desktop: Windows 10 // Google Chrome  83.0.4103.116


Adding cmake option for disabling preconditions, docs and CI pipeline

Integrating NO_PRECONDITION generate, build and unit test running in CI

https://github.com/Azure/azure-sdk-for-c/issues/553

Btw, @vhvb1989 - if you use keywords like fix/fxes with the issue number as part of your PR description, the issue get's auto-closed when the PR is merged (with a link to the PR that closed the issue showing up in the issue itself). That way you don't need to manually close the issue.
https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword


Check code functionality

Does the code produce unwanted behaviour (e.g. one that isn't relevant in this stage of CoCzeFLA development)?

Edits made to the transform function in commit 510f5de cause it to behave differently than before (for previous functionality, see commit 997853d in the iss/6 branch or the original commit 452638d). The issue seems to regard the [/] and [//] tokens, which appear (albeit differently distorted) in the %mor lines.


hanging Installing wasm-bindgen...

git clone https://github.com/open-spaced-repetition/fsrs-browser
cd fsrs-browser
git submodule update --init --recursive
./prod.sh
hanging Installing wasm-bindgen...

I wait  5m 56s, it is done

Wow, a 6 minute wasm-opt for ./prod.sh is pretty bad. In CI it takes ~1min. On my machine it takes ~2min, and a subsequent incremental build takes ~20seconds.
There are two flags here that control how much optimization is done in release mode. They didn't make much of a difference in build time on my machine, but you're certainly welcome to tweak them and see if they speed up your local build. Documentation here.
Currently, we have two "profiles"; ./dev.sh and ./prod.sh. Dev is good for rapid iteration on functions that are not compute_parameters, and Prod is what I use when iterating on compute_parameters. Sadly, I spend most of my time in Prod. If you find some flags that work better for your machine that don't reduce the training time too much, I'm willing to add a third profile!


Add implementation for @stdlib/string/base/replace-before

Resolves #811  .
With this PR, I've added the readme.md for replace-before issue
I'll be adding other related files after this
@stdlib-js/reviewers

@HarshitaKalani Thanks for working this! LMK if/when you'd like me to review or if you have any questions! :)

@kgryte sure :)

Hey @kgryte, I'm almost done with this issue but I'm not sure about the cli file in bin. Please lmk if any updates need to be made.

@HarshitaKalani About to sign off. I'll try to review within the next day or so.

I have not checked logic yet, just fix indentation issues, and make sure tests pass, Welcome to stdlib @HarshitaKalani!

I'll make all the corrections. Thanks @Pranavchiku ^_^

@kgryte please review it as per your convenience

Hey @kgryte , I've made the changes but could not run make init, maybe because I'm working on Windows. I've tried to shift to linux but I couldn't manage to continue with the same branch there. Can you please help me out with this?

@HarshitaKalani Thanks for the update. Are you not able to pull down the same branch that you've been working on?
For Windows, you could also try using the Windows Subsystem for Linux (WSL). @Planeshifter has some experience here.

In short, you should be able to commit to the same branch and push/pull those changes regardless of what OS you are on. Would need to know a bit more about the errors you are encountering in order to provide additional guidance.

I was able to pull the same branch on linux and continue with it. Thanks to @Pranavchiku for helping me in the same.
I'm getting an error while linting which says "The line has a length of 88. Maximum allowed is 80." Please suggest.

@HarshitaKalani Glad to hear that you got things working. For the offending line, add the comment
// eslint-disable-line max-len

@HarshitaKalani Looks like we have a couple of CLI test failures: https://github.com/stdlib-js/stdlib/actions/runs/4160510681/jobs/7216416195
The lint errors are present in the TypeScript files: https://github.com/stdlib-js/stdlib/actions/runs/4160510684/jobs/7216416371.
For the length greater than 80 in the TypeScript file, you can disable the lint rule using an in-line comment like so:
// tslint:disable-line:max-line-length

@kgryte I've made all the suggested changes. Please have a review.

@HarshitaKalani Looks like we're still getting lint errors (see https://github.com/stdlib-js/stdlib/actions/runs/4240960293/jobs/7407670252). Did you mean to push these along with the CLI test fixes?

Looks all good to me. Thanks @HarshitaKalani for your contribution!

This PR has now received two approvals. Will merge. Thanks again, @HarshitaKalani, for your patience and continued efforts!


Emit Mutation Specific QVs

Right now our QV values are an underdetermined representation of the possible mutations.  That is, given a QV value one cannot tell how the error probability is distributed amongst the deletion, insertion and substitution values.
This creates problems both for using downstream applications, and for figuring out how to reverse complement reads.  For example, consider the following alignment in the forward orientation.
99099999
ATGGGGAT
AT-GGGAT

Here the first base in the HP has a low QV, presumably due to the deletion.  Now the reverse complemented left aligned indel looks like this:
99999099
ATCCCCTA
AT-CCCTA

And now we have a very high QV value associated with the deletion.  One solution would be to simply swap the QV Value associated with the first and last bp in the homopolymer.  This generally works, however there are edge cases like the following which have appeared.
9909
ATTA
ATCA

Where the SNP has the correct QV in the forward orientation, but after applying a "reverse and swap homopolymers" rule, looks like this:
9909
TAAT
TGAT

Leading us to call the SNP with our highest confidence.  Now, we can apply yet another heuristic to solve this case (only swap if the first QV is less than the last in the forward orientation), however, I think this is slowing moving us in the direction of a nasty mess of heuristics, rules, etc. that our customers are almost surely not to know.
I think we need to sit down and figure out how we emit QVs and how we expect them to be consumed.  Some ideas off the top of my head:

Get an aligner to handle reverse complementing appropriately
Emit rich QVs for insertion/deletion substitutions
Emit rich QVs that conform to some other framework (GATK, etc.) so we can ease consumption.

I concur with Lance that no one should be attempting to make sense of our QVs in genomic orientation---they only make sense in the native orientation.  The tools that do this right:  just Quiver.
Is your argument is that you would like the QVs more accessible to "generic" analysis tools that do pileup-type stuff, I agree we could perhaps do a better job there... we could come up with some heuristic means of making the QVs more meaningful in genomic orientation.... but this might be a losing battle

You didn't mention the option of distributing the uncertainty along the span of the homopolymer.

So, the history of this is that ccscheck was making QV calibration plots by doing this very naive type of analysis where you align the CCS read, and then get the QV value that corresponds to any error that you find.  I noticed that even at our highest accuracy very rare errors still occurred.  Closer inspection showed it was always due to some edge case in how QV values are assigned like what is described here.  It looked to me that for these cases, if a variant caller that specifically compared the odds of one template to another was used instead of just a single marginal QV value, weird stuff like this wouldn't happen.
ccscheck is a generic pile-up caller, and as I thought this would apply to other generic pile-up callers I opened this issue (I don't think we have a good variant calling solution right now so wanted to support that type of thing).
However, though doing these type of heuristics cleans up a lot of the problems in the pile-up approach, I think in order to get to QV Infinity at the highest yield one will need to specifically compare template likelihoods rather than per-base QV values.  I am not sure thinking too much about this makes sense without an application in mind though.  As you said, it's a bit of a losing battle.


fix PrePostNEGD input validation

This resolves issue #161
I tried the PrePostNEGD example with group being binary (current), boolean, or categorical with levels 'A' and 'B'. All three pass the _series_has_2_levels check but in the prediction after model fitting, errors result in the 'A'/'B' case because 'untreated' is given values of 0 (and 'treated' 1). Switching to _is_variable_dummy_coded moves the error to a data exception in the input validation, which makes more sense.
A more complicated fix would be to assign the two levels in lines 1059 and 1070 rather than 0's and 1's, but then we would need to know which is the 'treatment' level so probably best to leave those transformations to users.
I also fixed a bug that requires the group variable to be called 'group' and adjusted some re-used variable names whose names didn't match what was being stored.

@drbenvincent also ready when you get a chance


Fix /user/repo?search=1 should not match isRepoRoot nor isRepoHome

Fixes #173

It's very strange that none of the commits after the first one triggered a GitHub Action.
e.g.

e901a63
c198d35
...

That’s because there’s a merge conflict that needs to be fixed. CI runs on merge commits that cannot be created if there’s a conflict.

Thanks @kang8!

v8 has been released. Would you like to send a PR to RG to update it? There are a few changes to make, considering all the updates included:
https://github.com/refined-github/github-url-detection/releases/tag/v8.0.0


Scalar.AspNetcore Not loading Authenication types

Below is the error on the browser inspection screen :
hook.js:608 TypeError: Cannot read properties of undefined (reading 'uid')
at Cye (scalar.js:27559:6)
at scalar.js:27602:50
at c (scalar.js:501:10)
at Array.map ()
at tn (scalar.js:502:40)
at Proxy.map (scalar.js:488:8)
at rr.fn (scalar.js:27602:42)
at $t (scalar.js:432:49)
at get value (scalar.js:608:9)
at Proxy. (scalar.js:27609:34)

not the right forum


IGNITE-3014 : Optimize GridDhtPartitionTopologyImpl#localPartition()

https://issues.apache.org/jira/browse/IGNITE-3014 is closed


Two same "struct" are generated with different names when an arithmetic math is applied to the generic-argument

Problem Description
While integrating Slang to UE 5.3, the following issue was encountered.
It appears that there is a bug on the deduplication of the generic arguments when the generic argument got an arithmetic math.
Goal
The generic arguments should be uniquely identified even when there are any arithmetic math applied to it.
Repro-steps*
It is easier to show the problem than explaining it.
RWStructuredBuffer<float> output;

__generic<let ArraySize:int>
struct MyStruct
{
  int elems[ArraySize];
};

__generic<let ArraySize:int>
MyStruct<ArraySize / 2> Reduce(MyStruct<ArraySize> o)
{
  MyStruct<ArraySize / 2> result;
  result.elems[0] = o.elems[0];
  return result; // <==== Error happens here
}

[numthreads(4, 1, 1)]
void computeMain(int3 dispatchThreadID : SV_DispatchThreadID)
{
  MyStruct<4> a;
  output[0] = Reduce(a).elems[0];
}

When HLSL is generated from the Slang shader above, the function "Reduce" looks like following.
MyStruct_0 Reduce_0(MyStruct_1 o_0)
{
    MyStruct_2 result_0;
    result_0.elems_0[int(0)] = o_0.elems_0[int(0)];
    return result_0;
}

Note that the return type is "MyStruct_0" and it is trying to return a different type, "MyStruct_2".
Their implementations are same as you can see below,
struct MyStruct_0
{
    int  elems_0[int(2)];
};
struct MyStruct_2
{
    int  elems_0[int(2)];
};

This causes the compilation to fail.

Jay, is there an estimate for this one?

This is probably an easy one but I don't have much confidence.
I put 3 days for now.

The issue is usually because we failed to identify the two specializations are the same thing.
In IR, we usually deduplicate specialize insts. When we specialize the Reduce function, we want to make sure we didn't create duplicated specialized structs. To trace this down, you can set a breakpoint after specialization pass, and inspect the IR for duplicate struct types. Find the duplicate struct type with the bigger UID, and try to track down why it gets created. There is a lookup process before creating the specialized struct type to see if a specialization is already created. Check why that lookup failed to determine the case.

Set a breakpoint on the call to specializeModule in slang-emit.cpp:424 and start from there.
Then specializeGeneric will be called on everything that needs specialization, this include the generic functions and the generic struct type. Try to set a break point in this function when we are trying to specialize a struct type, and see why the lookup failed in slang-ir-specialize.cpp:238.

Jay, is this issue still blocking you?

Yes it blocks my UE task.
I will start working on this tomorrow.

I am having some trouble reproducing the issue.
When I target "HLSL", it is easy to reproduce.
But when I use gfx with slang-test, both dxc and fxc don't print the error and everything works fine.
I am little puzzled.
The bug might be in the code where HLSL gets emitted.

It appears that the issue stems from the fact that the duplication detecting logic uses hash values.
And the hash values are calculated from the memory pointer values rather than the values the pointers point to.
HashCode IRSimpleSpecializationKey::getHashCode() const
{
    auto valCount = vals.getCount();
    HashCode hash = Slang::getHashCode(valCount);
    for( Index ii = 0; ii < valCount; ++ii )
    {
        hash = combineHash(hash, Slang::getHashCode(vals[ii])); // <== This generates a hash value from memory pointer values; not the value kIROp_IntLit represents.
    }
    return hash;
}

When this happens, the following is where the issue happens.
    IRInst* specializeGeneric(
        IRGeneric* genericVal,
        IRSpecialize* specializeInst)
    {
        // First, we want to see if an existing specialization
        // has already been made. To do that we will construct a key
        // for lookup in the generic specialization context.
        //
        // Our key will consist of the identity of the generic
        // being specialized, and each of the argument values
        // being pased to it. In our hypothetical example of
        // `specialize(g, a, b, c)` the key will then be
        // the array `[g, a, b, c]`.
        //
        Key key;
        key.vals.add(specializeInst->getBase());
        UInt argCount = specializeInst->getArgCount();
        for (UInt ii = 0; ii < argCount; ++ii)
        {
            key.vals.add(specializeInst->getArg(ii));
        }

        {
            // We use our generated key to look for an
            // existing specialization that has been registered.
            // If one is found, our work is done.
            //
            IRInst* specializedVal = nullptr;
            if (genericSpecializations.tryGetValue(key, specializedVal)) // <== This didn't properly work
                return specializedVal;
        }

I found another problem regarding this issue.
When I wrap the generic argument, which is a compile-time constant, with "int", it becomes not-compile-time constant.
tests/bugs/gh-3935.slang(14): error 39999: expression does not evaluate to a compile-time constant
MyStruct<int(ArraySize / 2)> Reduce(MyStruct<ArraySize> o)

Note that the error message above shows "int(ArraySize /2)".
It compiles fine when I just did "MyStruct<ArraySize / 2> Reduce..."

Fix is merged.
Closing the issue.


modifications to use the last version of the streaming library.

Modification to use the lastest version of the streaming library. This is a result of hopshadoop/hops-metadata-dal-impl-ndb#28

Is there a config file with this library? If yes, where is it in the project.

Last == latest ??

Jenkins retest this please

The library config files are with the library in Hops-metadat-dal-impl-ndb. I updated the README.md to indicate that they should be copied to hops-hadoop-chef the same way as we do for the schema.