🍒[NFC][5.9] add llvm namespace to Optional and None

Cherry-picking: https://github.com/apple/swift/pull/66861
This is an NFC PR that is meant to make cherry-picking back to the 5.9 branches easier after migrating the main and next to llvm::Optional and llvm::None (without using llvm::None and using llvm::Optional).
This is phase-1 of switching from llvm::Optional to std::optional in the next rebranch. llvm::Optional was removed from upstream LLVM, so we need to migrate off rather soon. On Darwin, std::optional, and llvm::Optional have the same layout, so we don't need to be as concerned about ABI beyond the name mangling. llvm::Optional is only returned from one function in
getStandardTypeSubst(StringRef TypeName,
                     bool allowConcurrencyManglings);

It's the return value, so it should not impact the mangling of the function, and the layout is the same as std::optional, so it should be mostly okay. This function doesn't appear to have users, and the ABI was already broken 2 years ago for concurrency and no one seemed to notice so this should be "okay".
I'm doing the migration incrementally so that folks working on main can cherry-pick back to the release/5.9 branch. Once 5.9 is done and locked away, then we can go through and finish the replacement. Since None and Optional show up in contexts where they are not llvm::None and llvm::Optional, I'm preparing the work now by going through and removing the namespace unwrapping and making the llvm namespace explicit. This should make it fairly mechanical to go through and replace llvm::Optional with std::optional, and llvm::None with std::nullopt. It's also a change that can be brought onto the release/5.9 with minimal impact. This should be an NFC change.

@swift-ci please test

@swift-ci please test


Support more filter options

Category
Feature request
Detailed description
First, thank you for the great checking tool you selflessly create for others. I've been using it since the old version.
What I found the new version lack compares to the old version is a way to filter out completed weapon manifest and special grastas from the view.
In the old version, after completing a weapon manifest and special grastas, it would move to the completed session. I found this gives an extremely satisfying feeling when I complete one and see the huge list shrinks. The new view doesn't accomplish this imo.
I believe a common way to use this tool for many people are as following:

In Character page, show only the characters that they don't currently own.
In Manifest, Grasta and Awaken pages, show the characters that they owned, but optionally show / hide the ones that they completed the progress.

With the above use case in mind, I suggestions the following changes:

Use different filter state for each page. As you can see, the Character and the other pages' filters usually conflicts. While in the Character you usually show what you don't own, it's completely the opposite the other pages. I must say that the old behavior is better than the current.
Support filters that are related to completion progress like in the old version. (e.g: awakening state, grasta, manifest...)

I haven't read the code but I think it shouldn't be too hard and can submit a PR myself. Just following the guide and start a discussion first.
Other information
No response

Hello, thanks for the suggestion.
For example (it's not strictly correct just for sample)

In Character section, default filter for not owned characters
In Manifest section, default filter for characters that manifest is not completed
...

Do I understand your opinion correctly?
If it does, the first task may not be too hard, but I need to find out for the second task that how much it takes to.

Correct.
However, I noticed that the biggest different in v3 is that you were trying to make a universal view. Therefore, I think the easiest way is to extend the filter panel, the idea is as the following image:

I'm not sure how you're storing the current filter state, I suppose you're using local storage for that. Therefore, I suggest instead of making all 4 tabs using the same storage keys, we separate them into 4 different states.
This way, you keep the universal filtering UI, and simply have one state for each page. I think it's the easiest way to achieve the above suggestion.

A bit more details, maybe you add a certain prefix when loading each page, and add that prefix into all the keys that you use to store all the filtering options?

Ah, okay.
I'm planning to improve this website step by step, so I'll add this to the task.
It'll require more work if this format of UI is added, so let me open this issue for a while.

@nhhai
https://dev.aecheck.com/check
It's still on the development, but I think it's nearly done enough to this issue.
Update this issue if you have any opinions, and I'll keep this issue open until the release.

This looks perfect. Exactly what I think it should be.
I would suggest using tabs for the right panel though. Three rows with scrollbar looks narrow and I think people rarely look at all three at once. Using tabs we can save much more space for displaying the characters.
The Not Owned filter on the Manifest is also extremely useful to have on others as well, but I think you already plan on adding it.
Again, thank you for your awesome work.

Not owned state for the rest need to be independent with current filters, because the users may have grasta or Stellar awakening materials of characters although they do not own the character itself.
I think the space to add this filters can ve made when I change it to the right-side tab.
Updates may be slow because I didn't have enough time this week, but I'll try to update ASAP.

https://dev.aecheck.com/check
It's separated to tabs,
I used horizontal tab because it is hard to position Mobile UI when using right tab.
After some other checks, I'm planning to announce so that it can be tested on public.

It looks great on my 6" Android phone, and functionality wise it's been working well so far, it's much easier to use than the current version.
One thing though: currently if the Not Owned, Class Change Required and Owned setting is shared across all 3 tabs (Owned State, Grasta and SA). However, it's ok to keep it as is because it's very easy to use now compared to before, I simply need check / uncheck the Owned setting.

Yes, the owned state is configured as global and stored in a web cache.
I considered it for a while, it has pros and cons, and I think it's ok to set it as-is. 😅
Okay I'll keep on working based on this proto type :)
Thanks for the suggestion.

This feature is finally merged with v3.1


Use a log-out icon instead of a power button

Some users think the existing log out icon will restart Airflow itself. Using the log out icon should avoid confusion.

Codecov Report

Merging #3010 into master will increase coverage by 0.08%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3010      +/-   ##
==========================================
+ Coverage   73.15%   73.24%   +0.08%
==========================================
  Files         175      175
  Lines       12331    12331
==========================================
+ Hits         9021     9032      +11
+ Misses       3310     3299      -11

Impacted Files
Coverage Δ

airflow/jobs.py
79.94% <0%> (+0.44%)
:arrow_up:

airflow/utils/helpers.py
54.02% <0%> (+2.87%)
:arrow_up:

airflow/task/task_runner/bash_task_runner.py
100% <0%> (+6.66%)
:arrow_up:

Continue to review full report at Codecov.

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

Looks good to me. Can you please create a jira and make sure your commit message references it?

I've added AIRFLOW-2080 to the commit comment.

Apologies, should be there now.


Remove agate from nodes

Fixes #1566
Remove the agate_table attribute from nodes, and instead plumb it through to the results object. As part of this, we only load seeds at materialization runtime, and so we only detect errors during seed execution instead of parsing, which kind of stinks. But on the plus side, now we do load seeds in parallel, which is pretty cool and maybe it makes up for that loss.
This is still kind of lame and we'll have to avoid serializing it when dataclass_jsonschema-ifying results, but I feel a lot better about it not being inextricably linked! Now you can imagine just including the data that we'd use in dbt seed --show in the result and printing that out, it was kind of tough to imagine doing this with the old model. Maybe in the future seed results will have their own result type, and will include a .preview that is just the first 10 lines of the agate table, that's all we actually use anyway.

We should verify this, but I believe this PR also incidentally fixes #794 - the materialization never runs so the csv should never get loaded!


docs(bootstrap): Update Documentation with bootstraping ng2-formly

closes #114

@aitboudad @mohammedzamakhan because of wrong push this commit was pushed directly to formly-js/master. Do let me know your comments on this PR will raise new PR with the feedback incorporated.

@divyakumarjain the HelloApp component and the import part should be updated too!

I would say to remove this part, as this should not come for a basic example on getting started page
types: [
        { name: 'horizontalInput', extends: 'input', wrappers: ['formly-wrapper-horizontal']}],
      validators: [{ name: 'required', validation: Validators.required}],
      validationMessages: [
        { name: 'required', message: 'This field is required.' },
        { name: 'invalidEmailAddress', message: 'Invalid Email Address' },
        { name: 'maxlength', message: 'Maximum Length Exceeded.' },
        { name: 'minlength', message: 'Should have atleast 2 Characters' },
        { name: 'not_matching', message: 'Password Not Matching' },
      ],
      wrappers: [
        { name: 'formly-wrapper-horizontal', component: FormlyWrapperHorizontalLabel }


Update AWS Go SDK To v1.25.35

I'd expect aws-okta tolerates STS regional endpoint feature. For some reason, this configuration setting doesn't work with the current AWS Go SDK version – v1.25.25. Empirically, I have established that AWS Go SDK v1.25.35 fixes this issue.
Sample Application
package main

import (
	"fmt"
	"os"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/endpoints"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/sts"
)

func main() {
	conf := &aws.Config{
		Region: aws.String("us-east-1"),
		STSRegionalEndpoint: endpoints.RegionalSTSEndpoint,
	}
	conf.WithLogLevel(aws.LogDebugWithHTTPBody)

	sess := session.Must(session.NewSession(conf))
	svc := sts.New(sess)

	_, err := svc.GetCallerIdentity(&sts.GetCallerIdentityInput{})
	if err != nil {
		fmt.Fprintf(os.Stderr,"STS GetCallerIdentity API call failed: %s", err)
	}
}

Expected Behaviour
aws-go-sdk: v1.25.35 - current
$ go run main.go
2020/12/14 16:35:22 DEBUG: Request sts/GetCallerIdentity Details:
---[ REQUEST POST-SIGN ]-----------------------------
POST / HTTP/1.1
Host: sts.us-east-1.amazonaws.com

Actual Behaviour
aws-go-sdk: v1.25.25 - v1.25.35
$ go run main.go
2020/12/14 16:35:22 DEBUG: Request sts/GetCallerIdentity Details:
---[ REQUEST POST-SIGN ]-----------------------------
POST / HTTP/1.1
Host: sts.amazonaws.com

Considerations
I've updated AWS Go SDK conservatively. We may bump aws-go-sdk to the latest version if there are no breaking changes present.

There's no real good way to test this thoroughly without getting in front of people. Let's do it. If it breaks, I'll revert.

@nickatsegment Would you mind releasing it to homebrew?

@Tensho that's up to the community :)

@Tensho that's up to the community :)


Project Proposal: League of Legends world

I was thinking with how varied the characters are in League of Legends, maybe one good project idea could be of showing a kind of map base on their relations, and where they are from within the world.

League of Legends is one of the most popular video games in the world (I believe it was during its peak) so archiving its different stages would be extremely useful from a historical standpoint especially since it started out from a much smaller company. Since you seem to be not completely decided, talking about its history (including the differences in the lore as the game became more popular) would be nice!

I think it is interesting to note the relations between the LoL champions, and would be able to give background knowledge of the game to avid and new players. One suggestion for the project scope is to include the references of what the champions are based off on and maybe where in the real world would they be based (WuKong from China and Chinese mythology, Anubis from Egypt and Egyptian mythology etc)

I am not super big into LOL, I probably have like 20 hours into the game. But I think something that would be SUPER interesting to look into is the sort of esports aspect of LOL being the biggest one in the world it might be super cool to look into what its like in the international competition do some sort of stat analysis or the different aspects in cultures of the different regions in things like media coverage.


Add GitHub pages site

Link to site: https://selfint.github.io/code-blocks/

Jekyll is weird, the goal is to have a site with:

code-blocks-server rust documentation
vscode extension README.md and link to marketplace
neovim extension [in the future]
intellij extension [in the future]

Also, maybe a custom domain is a good idea?
Something like codeblocks.github.io


TGI a049864 (1.1.0) has significantly lower throughput than 8672cad (1.0.3)

System Info
Tested both versions with the following docker images on 1 H100 GPU.
docker run --gpus all --shm-size 1g -p 7860:7860 --env HUGGING_FACE_HUB_TOKEN=<REDACTED> ghcr.io/huggingface/text-generation-inference:sha-a049864  --port 7860 --max-input-length 2500 --max-total-tokens 4096 --dtype float16 --model-id meta-llama/Llama-2-7b-chat-hf
docker run --gpus all --shm-size 1g -p 7860:7860 --env HUGGING_FACE_HUB_TOKEN=<REDACTED> ghcr.io/huggingface/text-generation-inference:sha-8672cad  --port 7860 --max-input-length 2500 --max-total-tokens 4096 --dtype float16 --model-id meta-llama/Llama-2-7b-chat-hf
Information

[X] Docker
[ ] The CLI directly

Tasks

[X] An officially supported command
[ ] My own modifications

Reproduction
I started TGI using the docker commands above and sent 64 concurrent requests to the service to benchmark the throughput and latency. Surprisingly, I found out TGI 1.1.0 performed much worse than 1.0.3. The throughput I got on 1.0.3 was about 1500 tokens/sec, but only 330 tokens/sec on 1.1.0.
From the server logs, I noticed that the queue time on 1.1.0 was much longer (up to 6.5 seconds) while the queue time on 1.0.3 is often less than 200ms~400ms.
I bisected the commits between 1.1.0 and 1.0.3, and found the culprit is  a049864, which upgraded many dependencies with some minor changes. I think it's one of the dependencies causing the issue but not sure which one.
Expected behavior
The performance of 1.1.0 should be the same or better than 1.0.3.

Thanks for reporting. We do not do regression tests on H100 so this went under the radar as we the issue is not present on Ampere. Can you make sure that latest suffer from the same issue?

yes, I can confirm latest still suffers from the same issue.

I tested this on A100 as well and confirmed that the issue didn't happen on A100.

We just upgraded everything again to use Cuda 12.1 and Pytorch 2.1, and everything seems to be working properly.
~5k token/s on a single H100 (batch_size = 128).
We're releasing :1.2.0 which will include everything very soon.

That's great news! Looking forward to testing it out! Thank you.

Could you confirm everything is working ? We tested on our end and everything seems working perfectly.

Hi, I tested ghcr.io/huggingface/text-generation-inference:1.2 but still got the same issue. The throughput was only ~350 tokens/sec.
My test was sending 64 concurrent requests to the server where each request has one short prompt less than 50 tokens and max_new_tokens = 100. From the server logs, I can see the requests getting queued up (queue_time grew to ~7sec quickly) so maybe continuous batching was not working properly.


Support partial image album selection in iOS 14

iOS 14 now lets users decide if Slide gets full or partial support for picking images in iOS 14. We should make sure we support this before launch.

Donezo

Donezo


Add Jitsi platform

Jitsi

Jitsi is a collection of free and open-source multiplatform voice, videoconferencing and instant messaging applications for the web platform, Windows, Linux, macOS, iOS and Android

Github: https://github.com/jitsi/jitsi-meet (11.2k stars)

Thanks!


getDailyStats HttpError being thrown with invalid status code

in analytics/operations.ts#LN27 there is a throw new HttpError(204, 'No daily stats generated yet.');
When deployed, this throws repeatedly:
Error: statusCode has to be integer in range [400, 600).
    at HttpError (/app/.wasp/out/sdk/wasp/server/HttpError.ts:15:13)
    at getDailyStats$2 (/app/src/analytics/operations.ts:27:11)
    at <anonymous> (/app/.wasp/build/server/src/middleware/operations.ts:14:24)
    at <anonymous> (/app/.wasp/out/sdk/wasp/server/utils.ts:26:5)

Based on the error, it appears HttpError in Wasp enforces a status code >= 400 && <= 600:
https://github.com/wasp-lang/wasp/blob/f2b966ad44012809b3141b2083e2368c31ed0bb1/waspc/data/Generator/templates/sdk/wasp/server/HttpError.ts#L14-L16

One recommendation could be to replace this implementation with a more generalized HTTP Error library. http-errors is well supported and covers a variety of usecases.

Good find @tconroy. I created a fix for this in the PR above if you're interested


refactor(release): remove Prometheus annotations and added a service

What this PR does / why we need it:
We will use a K8s Service with endpoints discovery rule to discover Filebeat metrics endpoints, instead of with annotations.
Which issue(s) this PR is related to (optional, link to 3rd issue(s)):
Fixes #
Reference to #

Special notes for your reviewer:
/cc @jianglinjian

Release note:

NONE

/lgtm


First connection always fails

Running v0.4.14 on WIndows Server 2008R2 SP1, my first named pipe connection request (DialPipe) always timeouts, to my listening server (which is running as a WIndows service).  But subsequent calls succeed.
On other (newer) WIndows Servers, this is not a problem.
Any idea why?

I am experiencing a similar problem, however all my connections timed out. When the server is running in a regular user account, the connection was fine. When I run the server under local service account, the connection always timed out. Did you figure out why in your case?


feat(tests): add a test to check that a contract creating blob tx is invalid

🗒 Description
Adds a test that a type 3 transaction that sets the tx to field to nil is invalid.
t8n tool: https://github.com/marioevz/go-ethereum/pull/4/commits/86b482b7d7d68d33a9277d5a031690f64a72aa93
🔗 Related Issues
N/A
✅ Checklist

[x] All: Set appropriate labels for the changes.
[ ] All: Considered squashing commits to improve commit history.
[ ] All: Added an entry to CHANGELOG.md.
[x] All: Considered updating the online docs in the ./docs/ directory.
[x] Tests: Included the type and version of evm t8n tool used to locally execute test cases:  e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
[ ] Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

Closing as maintaining our own custom version of geth that bypasses transaction marshalling, cf https://github.com/marioevz/go-ethereum/commit/86b482b7d7d68d33a9277d5a031690f64a72aa93 is not really a feasible long-term solution.


Fixes 139-Word-Break.js

Fixes issue with the previous javascript word-break code. It fails for submission on leetcode.

Previous failed Submission URL: _https://leetcode.com/submissions/detail/756676067/_

File(s) Modified: 139-Word-Break.js
Language(s) Used: javascript
Submission URL: _https://leetcode.com/submissions/detail/756667769/_

Thanks, @SuryaL!


Replace var with const or let

At first, thanks for the great learning materials!
I believe using const/let instead of var is recommended nowadays. Also, as a Node.js beginner, I would like to learn the latest JavaScript syntax.
Thank you for taking the time to review my PR, and I'm looking forward to your feedback.

massive pull request :)


[FLINK-6269][JobManager]var could be val

In JobManager.scala
var userCodeLoader = libraryCacheManager.getClassLoader(jobGraph.getJobID)
this var could be a val

merging.


docs: add basic documentation

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

:exclamation: No coverage uploaded for pull request base (next@ac272f3). Click here to learn what that means.

Additional details and impacted files
@@           Coverage Diff           @@
##             next       #6   +/-   ##
=======================================
  Coverage        ?   70.83%
=======================================
  Files           ?       10
  Lines           ?       72
  Branches        ?        9
=======================================
  Hits            ?       51
  Misses          ?       21
  Partials        ?        0

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Bump ninja

Bump ninjabuild to version 1.9.0.
According to https://github.com/ninja-build/ninja/releases version 1.8.2 was released in 2017 and 1.9.0 is now close to six months old. I noticed a slight speed improvement with this newer version and no regressions.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: skychef sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

Many open source projects do not require the agreement of a "contributor license agreement" before accepting contributions.
Many open source projects require the agreement to a code of conduct. Not a license agreement. Maybe you have become confused between the two?
In approximately 20 years of open source software development, across numerous projects, I can safely say that I have never signed one single "contributor license agreement." Not once. Doing so would certainly be the exception and not the rule.
Arbitrary contributor license agreements are appropriate for employees and contractors. Not open source project contributors who are not employed by Microsoft.
If the sentiment:

Thank you for your submission, we really appreciate it.

were really true, then it wouldn't be immediately proceeded by an attempt to violate my legal rights by advocating that I should sign away protections afforded to me by law and presenting the ability to do so as a trivial formality.
I have filled an issue report:
https://github.com/microsoft/vcpkg/issues/6899
This type of passive aggressive attempt at the removal of legal protections afforded to me by the rule of law, by a corporation, is just wrong.
I am not signing your contributor license agreement.
It violates my existing legal rights in a way in which I do not concede is fair.

duplicate of #6791


Stereo can't be passed as a keyword argument to render method

Symusic version: 0.5.3
(tested with example_mahler.mid)
In the synthesis section of the docs, following the midi rendering example leads to the TypeError:
audio = synth.render(s, stereo=True) # stereo is True by default, which means you will get a stereo wave

TypeError: render(): incompatible function arguments. The following argument types are supported:
    1. render(self, arg0: symusic.core.ScoreTick, arg1: bool, /) -> numpy.ndarray[dtype=float32, shape=(*, *), order='F']
    2. render(self, arg0: symusic.core.ScoreQuarter, arg1: bool, /) -> numpy.ndarray[dtype=float32, shape=(*, *), order='F']
    3. render(self, arg0: symusic.core.ScoreSecond, arg1: bool, /) -> numpy.ndarray[dtype=float32, shape=(*, *), order='F']

Invoked with types: symusic.core.Synthesizer, symusic.core.ScoreTick, kwargs = { stereo: bool }

However, passing stereo as a non-keyword argument seems to work fine:
audio = synth.render(s, True)

Thanks for your report, and I have fixed this in main branch.
And I further checked other bindings. Despite those methods for list (like insert), which does not support key word argument in python, I should have added all the argument names.
We apologize for the inconvenience caused by refactoring.


Check login flow

Try to login w/o email verification

If user tries to login without email verification, then don't allow. Modify code in UserModel Authentication function.


add calculator Reflection of a point about a line

Proposal
(A clear and concise description of what the proposal is.)

i like to work on it


question on meth-path random walking

hi,
I see you first use the meta-path to sample nodes and get the base_walks. Then you use the base_walks to generate the vocabularies. Then, you generate all_walks according to the type of edge, and only remain these nodes of all_walks which are existed in the vocabulary.
I have two questions on it. (1) why you separate it into two steps, I mean why not use the meta-path sampling without obtaining the all_walks? (2) if we use the base_walks to generate the vocabularies, we will miss some nodes, and then we will not get the embedding of these missed nodes, so why need we to use base_walks  instead of all_walks to generate vocabularies?
Could you give me some hints?
Thank you very much!

Hi @Refrainlhy,
The base walks are generated by the whole graph that contains all the nodes and edges (See the function load_training_data in utils.py). Intuitively, the vocabulary computed by the base walks will have all the nodes of the whole graph. I am very confused about why the vocabulary will miss some nodes.

Thank you for your reply!
I have this question since I find the vocab is generated by base_walks, and base_works are generated by  network_data['base'] (base_walks, all_walks = generate_walks(network_data)). In generate_walks function, we can see base_walks are generated by  base_walker.simulate_walks(args.num_walks, args.walk_length, schema=args.schema), and I see simulate_walks generate the walks with a random walk. Hence, I think base_walks may miss some nodes and then the vocab may miss some nodes?
def train_model(network_data, feature_dic, log_name):
    base_walks, all_walks = generate_walks(network_data)
    vocab, index2word = generate_vocab([base_walks])

def generate_walks(network_data):
    base_network = network_data['Base']
    if args.schema is not None:
        node_type = load_node_type(file_name + '/node_type.txt')
    else:
        node_type = None

    base_walker = RWGraph(get_G_from_edges(base_network), node_type=node_type)
    base_walks = base_walker.simulate_walks(args.num_walks, args.walk_length, schema=args.schema)

    all_walks = []
    for layer_id in network_data:
        if layer_id == 'Base':
            continue

        tmp_data = network_data[layer_id]
        # start to do the random walk on a layer

        layer_walker = RWGraph(get_G_from_edges(tmp_data))
        layer_walks = layer_walker.simulate_walks(args.num_walks, args.walk_length)

        all_walks.append(layer_walks)

    print('Finish generating the walks')

    return base_walks, all_walks

hi~

Hi @Refrainlhy,
Sorry for the late reply. In simulate_walks , we generate random walks starting from each node if possible.


com.intellij.diagnostic.PluginException: Reported element LatexCommandsImpl(COMMANDS)[STUB]{\bibliography} is not from the file 'LaTeX source file' the inspection 'BibtexDuplicateBibliography' (class nl.rubensten.texifyidea.inspections.bibtex.BibtexDuplicateBibliographyInspection) was invoked for. Message: 'Bibliography file is included multiple times'.

Description
Stacktrace
com.intellij.diagnostic.PluginException: Reported element LatexCommandsImpl(COMMANDS)[STUB]{\bibliography} is not from the file 'LaTeX source file' the inspection 'BibtexDuplicateBibliography' (class nl.rubensten.texifyidea.inspections.bibtex.BibtexDuplicateBibliographyInspection) was invoked for. Message: 'Bibliography file is included multiple times'.
Element' containing file: LaTeX source file
Inspection invoked for file: LaTeX source file
 [Plugin: nl.rubensten.texifyidea]
	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:350)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.createHighlightsForDescriptor(LocalInspectionsPass.java:536)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.addHighlightsFromResults(LocalInspectionsPass.java:477)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.inspect(LocalInspectionsPass.java:204)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:115)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:69)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:423)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1168)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:416)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:415)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:391)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:147)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:222)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:389)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:161)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)

What plugin version are you using?
I got an exception like this today too in the alpha build. Possibly  I still haven't resolved the conflict between #782 and #815 properly, even after using the special branch starting from #815 which should have them resolved. Can't wait until one of those is finally merged.

Beta 0.6.5

@vas777 Thanks! In that case, this will be resolved with https://github.com/Ruben-Sten/TeXiFy-IDEA/pull/782#issuecomment-499084329 so it probably will be fixed when b0.6.6 is released.
I will close this issue as a duplicate of the exception in #881.


fixes #120 - missing source_relation joins

Please provide your name and company
Matthew Ritchie - Cleartelligence Inc
Link the issue/feature request which this PR is meant to address

Detail what changes this PR introduces and how this addresses the issue/feature request linked above.
This PR brings in the source_relation column and uses in joins where applicable to prevent cross joins when the same ids exist in multiple quickbooks sources.
How did you validate the changes introduced within this PR?
I worked @fivetran-reneeli to identify other models where a change was required. I ran and tested each changed models by replacing the code in my dbt project.
Which warehouse did you use to develop these changes?
postgres
Did you update the CHANGELOG?

[x] Yes

Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)

[x] Yes

Provide an emoji that best describes your current mood

:bug:
Feedback
We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your feedback on our existing dbt packages or what you'd like to see next.
PR Template

Community Pull Request Template (default)

Maintainer Pull Request Template (to be used by maintainers)

Hi @MatteyRitch I am going to be picking up this PR review! One quick question before getting started, there may be some changes I need to make to your PR in order to ensure this will pass our tests when we merge your changes to main. Do you have any concern if I make commits directly to your branch in these cases?

Thanks @MatteyRitch for creating this PR! I have merged this into our working branch to finish off the round of updates before merging into main.


Allow non-linear inertia curves

Currently, the moving and stopping inertia curves are forced to linear.  This is so that we can determine where in the curve the calculation should start based on the last speed.  Custom curves should be supported.

Love this library! I think I know a way to implement this. Basically, pair each movement curve with an inverted curve that you can use to lookup the time based on the speed.
If the linear curve is y=mx+b, then the inverse is x =(y-b)/m. I'll try to get some code in when I have the chance. Great work on this, it's been a very helpful library!


NamedTuple should have a replace method

Create a keyword argument method replacing so that t.replacing(k1=v1, k2=v2, ...) returns a copy of the tuple with member 'k1' replaced with value 'v1', etc. This makes code that just wants to get a copy of a tuple with a single field updated much cleaner to read.

In order to implement this, you'll need to override typeMethodsConcrete in the PyNamedTupleInstance class to generate the new functions.

I have a question:
As the function typeMethodsConcrete is static and gets no arguments, and I need to generate a function for each passed member of the NamedTuple, is there a way to get the list of the passed field names to the NamedTuple constructor from the static function?

So right now, typeMethods gets called with a Type* that's the actual type.
We're dropping that when we call typeMethodsConcrete. We should be passing
that through everywhere, so that the type methods can vary with the type.
You should also cast it to 'py_instance_type::modeled_type*'. Then the
concrete function in PyNamedTuple will get a NamedTuple* and you can use
that.
On Tue, Jun 25, 2019 at 5:00 PM Szymon Lipiński<EMAIL_ADDRESS>wrote:

I have a question:
As the function typeMethodsConcrete is static and gets no arguments, and I
need to generate a function for each passed member of the NamedTuple, is
there a way to get the list of the passed field names to the NamedTuple
constructor from the static function?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/APrioriInvestments/nativepython/issues/114?email_source=notifications&email_token=AB6OHBB3XXARBBR7J4R2E7DP4KBQLA5CNFSM4H3CUD3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYRST7Y#issuecomment-505620991,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB6OHBFELSRV3FUOAAXAVYDP4KBQLANCNFSM4H3CUD3A
.

I have made a new commit in a branch https://github.com/APrioriInvestments/nativepython/commit/165a45c2cc384950f0ccf3226918bf362de5c4f5. I'm not really sure how to implement all the parts to fit properly.

I made some comments. Hopefully they give you enough to proceed.
On Wed, Jun 26, 2019 at 6:32 AM Szymon Lipiński<EMAIL_ADDRESS>wrote:

I have made a new commit in a branch 165a45c
https://github.com/APrioriInvestments/nativepython/commit/165a45c2cc384950f0ccf3226918bf362de5c4f5.
I'm not really sure how to implement all the parts to fit properly.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/APrioriInvestments/nativepython/issues/114?email_source=notifications&email_token=AB6OHBCSEAIB5WXFCRMC6FDP4NASXA5CNFSM4H3CUD3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYTC4PY#issuecomment-505818687,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB6OHBCEIZPAVZX5KME3ZC3P4NASXANCNFSM4H3CUD3A
.

Thank you for your comments. I have added some more changes https://github.com/APrioriInvestments/nativepython/compare/szymon_add_tuple_methods. The main problem now is that the arguments passed to both constructor functions are wrong, so it doesn't compile now.

I made some additional comments directly on the commit in question.
On Wed, Jun 26, 2019 at 4:32 PM Szymon Lipiński<EMAIL_ADDRESS>wrote:

Thank you for your comments. I have added some more changes
https://github.com/APrioriInvestments/nativepython/compare/szymon_add_tuple_methods.
The main problem now is that the arguments passed to both constructor
functions are wrong, so it doesn't compile now.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/APrioriInvestments/nativepython/issues/114?email_source=notifications&email_token=AB6OHBD5SWIHHZE5CK4VEMLP4PG4JA5CNFSM4H3CUD3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYUXLJA#issuecomment-506033572,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB6OHBCR3CTPPY6CE2Y727DP4PG4JANCNFSM4H3CUD3A
.

Thank you. I have a couple of question while trying to understand the code:

Is the eltPtr a pointer to an element in an internal list?
In the Type class, the constructor function gets two arguments: (int64_t count, const ptr_func& ptrToChild) and then it loops from 0 to the count, passing to the second argument. How does it work?
In your example, there is itemType->constructor(item_data, tupType->eltPtr(self->dataPtr(), index));, I'm wondering if the second part shouldn't be a function pointer, and I have no idea what the first argument should be then, as it looks like it should be a number, not a pointer (which in fact is a number, but iterating from 0 to a pointer value seems like not a good idea).

So in all cases, the 'itemPtr', 'dataPtr', etc. are pointers to the memory
that contains an instance of some Type. Think of it like in C++ if you
have a reference 'const T&' for some T, we store it as a T*. For simplicity
we just hold it as a char* (element_ptr).
The type functions on the various classes manipulate these kinds of
pointers.  A type Type* t expects that a data pointer has
t->bytecount()  bytes of storage allocated at the relevant pointer. It
can be in a state 'uninitialized' or 'initialized'.  A type's base
constructor function always takes a pointer to some uninitialized memory
and default constructs an object there with the expectation that you will
eventually call destructor on that same memory to tear it down.
eltPtr is a function that Types that are containers have. In this case,
it takes a pointer to the data for the NamedTuple and produces a pointer
to the data for the 'ix'th element of the named tuple.
The constructor function you're talking about (Type.hpp:279) is not the
one I'm talking about. That's a convenience method that's designed to allow
you to initialize many copies of the same type.  For instance, if you had a
type 'Type* t' and you wanted to initialize 100 copies at memory locations
with a base pointer char* p and a stride s, you could write
t->constructor(100, [&](int i) { return p + s * i; }) and you would get
an efficient implementation that doesn't need to do the type-dispatch for
each step in the loop. But this is not the one you need to invoke here.
Probably we should rename it to constructMany to avoid confusion.
The one you want is CompositeType.hpp:127', which looks like template void constructor(instance_ptr self, const
sub_constructor& initializer)`.  It accepts a pointer to the uninitialized
storage for the NamedTuple and a callback function that will get called
with a pointer and an index once for each item in the named tuple that has
to get initialized.  It's important that you have cast the Type* to a
NamedTuple* or else the compiler won't be able to find the function.
On Thu, Jun 27, 2019 at 8:16 AM Szymon Lipiński<EMAIL_ADDRESS>wrote:

Thank you. I have a couple of question while trying to understand the code:

Is the eltPtr a pointer to an element in an internal list?
In the Type class, the constructor function gets two arguments: (int64_t
count, const ptr_func& ptrToChild) and then it loops from 0 to the
count, passing to the second argument. How does it work?
In your example, there is itemType->constructor(item_data,
tupType->eltPtr(self->dataPtr(), index));, I'm wondering if the second
part shouldn't be a function pointer, and I have no idea what the first
argument should be then, as it looks like it should be a number, not a
pointer (which in fact is a number, but iterating from 0 to a pointer value
seems like not a good idea).

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/APrioriInvestments/nativepython/issues/114?email_source=notifications&email_token=AB6OHBDX3O4WUUA2ZSGKPK3P4SVQPA5CNFSM4H3CUD3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYW5SVY#issuecomment-506321239,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB6OHBEZL5YTPJ3RIXZSL3TP4SVQPANCNFSM4H3CUD3A
.

Thank you for the explanation. Could you check the last commit, especially these two lines:

https://github.com/APrioriInvestments/nativepython/commit/6202406c9936c2eecd55223e1f2d69d94e318dcb#diff-afd2454f2f0866ca45029783ab406a69R253
https://github.com/APrioriInvestments/nativepython/commit/6202406c9936c2eecd55223e1f2d69d94e318dcb#diff-afd2454f2f0866ca45029783ab406a69R290

Could you tell me how the code in this ticket is used later? It looks like it's wrapped by some python functions, and then imported to the python process as an extension. Am I right?
Why isn't there a normal Python tuple used?

Sure. A few points here. First, you can see a bunch of test uses of this code in types_test.py, which is where you should add tests for it yourself to verify you have done everything correctly. You should test the basic functionality, as well as checking that refcounts are correct by doing something like

N = NamedTuple(x=ListOf(int))
aList = ListOf(int)([1,2,3])

# _types is a member of the typed_python module
self.assertEqual(_types.refcount(aList), 1)
nt = N().replacing(x=aList)
self.assertEqual(nt.x, aList)
self.assertEqual(_types.refcount(aList), 2)
nt = None
self.assertEqual(_types.refcount(aList), 1)

to verify that the refcounts are all correct.
More generally, "why isn't there a normal Python tuple used":
The goal of typed_python is to give us the tools to express strong typing in our python programs. A "NamedTuple" in typedpython is deliberately more restrictive than a normal python tuple, which means it's easier to reason about.  For instance, If you make the type ListOf(NamedTuple(x=int, y=str)) and you create an instance of that type, you know that the entire list itself has items of the correct type in it.  There's no way to put a None in such a list (although if you want that behavior, you could write ListOf(OneOf(None, NamedTuple(x=int, y=str)))). If you have a bug where you try to put the wrong thing in the list, you get a bug when you insert the item (where the bug is), not where you take the item out of the list and use it.
The secondary goal of typed_python is to provide a set of datastructures with a strict memory layout that we can compile code against (this is the nativepython part of this project). A NamedTuple(x=int, y=float) is laid out exactly like std::pair<int, float>, and ListOf(NamedTuple(x=int, y=float)) is very similar to std::shared_ptr<std::vector<std::pair<int, float> > >. The code generated by nativepython can interact with these types directly, bypassing the python interpreter and using machine code, so that we can  take portions of our programs and compile them, which can get 50x speedup per core, or more, and which bypasses the GIL, which in a multithreaded context can be an enormous advantage.

Thanks. Do you have an idea why this doesn't compile? https://github.com/APrioriInvestments/nativepython/blob/szymon_add_tuple_methods/typed_python/PyCompositeTypeInstance.cpp#L253

try itemType->copy_constructor
On Fri, Jun 28, 2019 at 1:09 PM Szymon Lipiński<EMAIL_ADDRESS>wrote:

Thanks. Do you have an idea why this doesn't compile?
https://github.com/APrioriInvestments/nativepython/blob/szymon_add_tuple_methods/typed_python/PyCompositeTypeInstance.cpp#L253
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/APrioriInvestments/nativepython/issues/114?email_source=notifications&email_token=AB6OHBAB6WZKK72UTJKFV63P4ZATPA5CNFSM4H3CUD3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY2UVEA#issuecomment-506808976,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB6OHBBJL2WF2GRC5EO32CDP4ZATPANCNFSM4H3CUD3A
.

There is a simple test for the function functionality.
However, with just METH_KEYWORDS, I get an error like this one https://bugs.python.org/issue11587.
With METH_VARARGS | METH_KEYWORDS I get
n2 = n1.replacing(a=2)
TypeError: Passed argument is not a dictionary.

What am I missing there?

I think you can't have just METH_KEYWORDS.  It's an issue with the api. You
should keep both VARARGS and KEYWORDS and throw an exception if there are
any args.
On Fri, Jun 28, 2019 at 4:46 PM Szymon Lipiński<EMAIL_ADDRESS>wrote:

There is a simple test for the function functionality.
However, with just METH_KEYWORDS, I get an error like this one
https://bugs.python.org/issue11587.
With METH_VARARGS | METH_KEYWORDS I get
n2 = n1.replacing(a=2)
TypeError: Passed argument is not a dictionary.
What am I missing there?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/APrioriInvestments/nativepython/issues/114?email_source=notifications&email_token=AB6OHBDZP4G6Y6OVIX5MPXTP4Z2BVA5CNFSM4H3CUD3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY3D65A#issuecomment-506871668,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB6OHBCRRG3WAG2ALV7ILCDP4Z2BVANCNFSM4H3CUD3A
.

It looks like I have made this function with tests. The tests are testing the functionality, and generally it looks like all is fine.
Except for testing the refcounts. The problem is that if the last test runs separately, then it works. When it runs with all them, the result is a core dump.
Sat Jun 29 08:13:03 2019  |     failed in 0.0009438991546630859 seconds. See logs in nose.typed_python.types_test.NativeTypesTests.test_named_tuple_replacing_argument_errors.1606.log
Sat Jun 29 08:13:03 2019  |  Running test test_named_tuple_replacing_function (typed_python.types_test.NativeTypesTests)
Sat Jun 29 08:13:03 2019  |     passed in 0.00018024444580078125
Sat Jun 29 08:13:03 2019  |  Running test test_named_tuple_replacing_refcount (typed_python.types_test.NativeTypesTests)
[1]    1606 segmentation fault (core dumped)  ./test.py --filter typed_python.types_test.NativeTypesTests

Ok probably something is getting freed and then re-incremented, so it looks OK but it’s actually acting on releases memory. Can you squash down to one commit and send me a PR and I’ll take a look
Sent from my iPhone

On Jun 29, 2019, at 8:21 AM, Szymon Lipiński<EMAIL_ADDRESS>wrote:
It looks like I have made this function with tests. The tests are testing the functionality, and generally it looks like all is fine.
Except for testing the refcounts. The problem is that if the last test runs separately, then it works. When it runs with all them, the result is a core dump.
Sat Jun 29 08:13:03 2019  |     failed in 0.0009438991546630859 seconds. See logs in nose.typed_python.types_test.NativeTypesTests.test_named_tuple_replacing_argument_errors.1606.log
Sat Jun 29 08:13:03 2019  |  Running test test_named_tuple_replacing_function (typed_python.types_test.NativeTypesTests)
Sat Jun 29 08:13:03 2019  |     passed in 0.00018024444580078125
Sat Jun 29 08:13:03 2019  |  Running test test_named_tuple_replacing_refcount (typed_python.types_test.NativeTypesTests)
[1]    1606 segmentation fault (core dumped)  ./test.py --filter typed_python.types_test.NativeTypesTests
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

It's here https://github.com/APrioriInvestments/nativepython/commit/00023fe7166c5618d0394def763cccf302e32c59.
I'm sure the problem is in my code. When I made a new branch with only the last test, then everything is fine. With all the tests running in the above commit, there is core dump. Travis thinks the same.

I hunk he problem is that you are not checking if the kwargs contains the key. So if you access it this way python throws an exception (returning null). You are expected to clear that exception but in this case you’ll just throw another one right after which can corrupt memory. If you clear the exception in the case the call returns null that will work but you probably ought to be checking if the doctor contains the string first as that’s much faster
Sent from my iPhone

On Jun 29, 2019, at 10:19 AM, Szymon Lipiński<EMAIL_ADDRESS>wrote:
It's here 00023fe.
I'm sure the problem is in my code. When I made a new branch with only the last test, then everything is fine. With all the tests running in the above commit, there is core dump. Travis thinks the same.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I'm not so sure, converting the code to this also makes core dump
    // return a copy with updated values
    return PyInstance::initialize(tupType, [&](instance_ptr newInstanceData) {
        //newInstanceData will point to the uninitialized memory we've allocated for the new tuple

        tupType->constructor(newInstanceData, [&](instance_ptr item_data, int index) {
            //item_data is a pointer to the uninitialized value in the 'index'th slot in the new tuple
            NamedTuple *itemType = (NamedTuple*) tupType->getTypes()[index];
            std::string itemName = tupType->getNames()[index];

            PyObject* key = PyUnicode_FromString(itemName.c_str());

            if (PyDict_Contains(kwargs, key)) {
                // value passed in kwargs
                PyObject* value = PyDict_GetItemString(kwargs, itemName.c_str());

                PyInstance::copyConstructFromPythonInstance(
                        itemType,
                        item_data,
                        value
                );
            } else {
                //we don't have a replacement, so copy the existing value over.
                itemType->copy_constructor(item_data, tupType->eltPtr(self->dataPtr(), index));
            };
        });
    });```

well now that I look at the docs for PyDict_GetItem it's clear that it doesn't set an exception. So that was just a red herring.
I see the issue and I just pushed a fix. The problem was that we are casting 'itemType' to NamedTuple. This forces the itemType->copy_constructor call to dispatch to the wrong code.  itemType is not actually a NamedTuple - it can be any type, because it's the set of types of the individual pieces of the NamedTuple we're replacing on (in the test, its ListOf(int)).
Let's write a few more tests, and then the next step will be to integrate this into the compiler.

Thank you. I have been trying to find out how this should be integrated into the compiler, and I'm not sure I understand how all the stuff works. At first, I thought it would just work, as this new function is returned in the typeMethodsConcrete. When you wrote about additional integrating it, I'm not sure I get it.
Could you describe me how the main compiler components work?

And I have managed to make another segfault :)
    def test_making_segfault_1(self):
        a = 'a'
        self.assertEqual(_types.refcount(a), 1)

looks like the format string "first argument to refcount %S not a permitted
Type", is wrong. see documentation for PyErr_Format. Can you create a test
and fix? Thx.
On Tue, Jul 2, 2019 at 8:21 AM Szymon Lipiński<EMAIL_ADDRESS>wrote:

And I have managed to make another segfault :)
def test_making_segfault_1(self):
    a = 'a'
    self.assertEqual(_types.refcount(a), 1)

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/APrioriInvestments/nativepython/issues/114?email_source=notifications&email_token=AB6OHBDO7WCNHZEXKG576DLP5NB23A5CNFSM4H3CUD3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZBCTMI#issuecomment-507652529,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB6OHBGIJRRJAEJ4VLO2U2TP5NB23ANCNFSM4H3CUD3A
.

On the compiler point, see commit 25bca3cc825961fe4e94fd4cb2203c2b3268c0f3
for an example of changes that add a feature to the compiler. when I'm back
we can sit down and go over this in more detail. But basically the idea is
that you have a set of types called 'wrappers' that provide code-generation
for other types. For instance, in this case there's a class
NamedTupleWrapper that provides facilities for the compiler to implement
operations on a given variable of typed NamedTuple.  When we're generating
code, we keep track of each variable in a frame by storing a 'wrapper' type
for each one, and then each action that the compiler needs to process (say,
an operator, or an attribute) gets translated into a call on the associated
wrapper type that passes in 'TypedExpression' instances for each argument
to the operation.
In your case, to implement this you'll need to

add code to create the associated BoundCompiledMethodWrapper for
'replace' in the convert_attribute method
implement convert_method_call and produce a compiled implementation of
'replace' in it. See the implementation of
'TupleWrapper.convert_copy_initialize`. Probably this will look something
like

def convert_method_call(self, context, instance, methodname, args, kwargs):
    if methodname == 'replace' and not args:
        return context.push(self, lambda newInstance:
self.initializeWithReplace(context, newInstance, instance, kwargs))

def initializeWithReplace(self, context, toInitialize, existingInstance,
kwargs):
        # do some check that kwargs only contains valid items and if not
generate code to throw an exception
        ...
        # construct the new value
        for i in range(len(self.subTypeWrappers)):
            if self.typeRepresentation.ElementNames[i] not in kwargs:
                # initialize item i from the existing tuple
                self.refAs(context, toInitialize,
i).convert_copy_initialize(self.refAs(context, existingInstance, i))
            else:
                converted =
kwargs[self.typeRepresentation.ElementNames[i]].convert_to_type(self.typeRepresentation.ElementTypes[i])
                if converted is None:
                    # conversion functions return None when the code they
generated _always_ throws an exception in which case there
                    # is no reason to continue producing code.
                    return None
               self.refAs(context, toInitialize,
i).convert_copy_initialize(converted)

add tests for this in tuple_compilation_test.py

On Tue, Jul 2, 2019 at 2:54 PM Braxton McKee<EMAIL_ADDRESS>wrote:

looks like the format string "first argument to refcount %S not a
permitted Type", is wrong. see documentation for PyErr_Format. Can you
create a test and fix? Thx.
On Tue, Jul 2, 2019 at 8:21 AM Szymon Lipiński<EMAIL_ADDRESS>wrote:

And I have managed to make another segfault :)
def test_making_segfault_1(self):
    a = 'a'
    self.assertEqual(_types.refcount(a), 1)

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/APrioriInvestments/nativepython/issues/114?email_source=notifications&email_token=AB6OHBDO7WCNHZEXKG576DLP5NB23A5CNFSM4H3CUD3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZBCTMI#issuecomment-507652529,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB6OHBGIJRRJAEJ4VLO2U2TP5NB23ANCNFSM4H3CUD3A
.

Here is the fix for the refcount function https://github.com/APrioriInvestments/nativepython/pull/146

Thanks for the explanation. I have written some basic code, however, I have a problem with the compilation in the test, and I cannot find any fix.
https://github.com/APrioriInvestments/nativepython/compare/szymon_add_named_tuple_replacing?expand=1
AttributeError: type object 'Int64' has no attribute 'typeRepresentation'
  File "/usr/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/lib/python3.6/unittest/case.py", line 605, in run
    testMethod()
  File "apriori/nativepython/nativepython/tests/tuple_compilation_test.py", line 81, in test_named_tuple_replacing_function
    def f1(x: NT, a: int) -> NT:
  File "apriori/nativepython/nativepython/tests/tuple_compilation_test.py", line 23, in Compiled
    return Runtime.singleton().compile(f)
  File "apriori/nativepython/nativepython/runtime.py", line 94, in compile
    self.compile(o, argument_types)
  File "apriori/nativepython/nativepython/runtime.py", line 71, in compile
    callTarget = self.converter.convert(f.functionObj, input_wrappers, f.returnType, assertIsRoot=True)
  File "apriori/nativepython/nativepython/python_to_native_converter.py", line 357, in convert
    self._resolveAllInflightFunctions()
  File "apriori/nativepython/nativepython/python_to_native_converter.py", line 318, in _resolveAllInflightFunctions
    while self._resolveInflightOnePass():
  File "apriori/nativepython/nativepython/python_to_native_converter.py", line 301, in _resolveInflightOnePass
    nativeFunction, actual_output_type = functionConverter.convertToNativeFunction()
  File "apriori/nativepython/nativepython/function_conversion_context.py", line 58, in convertToNativeFunction
    body_native_expr, controlFlowReturns = self.convert_function_body(self._statements)
  File "apriori/nativepython/nativepython/function_conversion_context.py", line 456, in convert_function_body
    return self.convert_statement_list_ast(statements, toplevel=True)
  File "apriori/nativepython/nativepython/function_conversion_context.py", line 461, in convert_statement_list_ast
    expr, controlFlowReturns = self.convert_statement_ast(s)
  File "apriori/nativepython/nativepython/function_conversion_context.py", line 311, in convert_statement_ast
    e = subcontext.convert_expression_ast(ast.value)
  File "apriori/nativepython/nativepython/expression_conversion_context.py", line 639, in convert_expression_ast
    return lhs.convert_call(args, kwargs)
  File "apriori/nativepython/nativepython/typed_expression.py", line 123, in convert_call
    return self.expr_type.convert_call(self.context, self, args, kwargs)
  File "apriori/nativepython/nativepython/type_wrappers/bound_compiled_method_wrapper.py", line 54, in convert_call
    kwargs
  File "apriori/nativepython/nativepython/type_wrappers/tuple_wrapper.py", line 112, in convert_method_call
    return context.push(self, lambda newInstance: self.initializeReplacing(context, newInstance, instance, kwargs))
  File "apriori/nativepython/nativepython/expression_conversion_context.py", line 212, in push
    expr = callback(resExpr)
  File "apriori/nativepython/nativepython/type_wrappers/tuple_wrapper.py", line 112, in <lambda>
    return context.push(self, lambda newInstance: self.initializeReplacing(context, newInstance, instance, kwargs))
  File "apriori/nativepython/nativepython/type_wrappers/tuple_wrapper.py", line 138, in initializeReplacing
    converted = kwargs[field_name].convert_to_type(field_type)
  File "apriori/nativepython/nativepython/typed_expression.py", line 129, in convert_to_type
    return self.expr_type.convert_to_type(self.context, self, target_type)
  File "apriori/nativepython/nativepython/type_wrappers/arithmetic_wrapper.py", line 106, in convert_to_type
    if target_type.typeRepresentation == Float64:

>> output captured in nose.nativepython.tests.tuple_compilation_test.TestTupleCompilation.test_named_tuple_replacing_function.13815.log:

('a', 'b')
(<class 'Int64'>, <class 'String'>)
{'a': <nativepython.typed_expression.TypedExpression object at 0x7f260328f5f8>}
TypedExpression(Int64,[ref])

try rebasing on top of my branch brax-dev. I've been doing some work that
will fix that problem.
On Wed, Jul 3, 2019 at 5:06 PM Szymon Lipiński<EMAIL_ADDRESS>wrote:

Thanks for the explanation. I have written some basic code, however, I
have a problem with the compilation in the test, and I cannot find any fix.
https://github.com/APrioriInvestments/nativepython/compare/szymon_add_named_tuple_replacing?expand=1
AttributeError: type object 'Int64' has no attribute 'typeRepresentation'
File "/usr/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
yield
File "/usr/lib/python3.6/unittest/case.py", line 605, in run
testMethod()
File "apriori/nativepython/nativepython/tests/tuple_compilation_test.py", line 81, in test_named_tuple_replacing_function
def f1(x: NT, a: int) -> NT:
File "apriori/nativepython/nativepython/tests/tuple_compilation_test.py", line 23, in Compiled
return Runtime.singleton().compile(f)
File "apriori/nativepython/nativepython/runtime.py", line 94, in compile
self.compile(o, argument_types)
File "apriori/nativepython/nativepython/runtime.py", line 71, in compile
callTarget = self.converter.convert(f.functionObj, input_wrappers, f.returnType, assertIsRoot=True)
File "apriori/nativepython/nativepython/python_to_native_converter.py", line 357, in convert
self._resolveAllInflightFunctions()
File "apriori/nativepython/nativepython/python_to_native_converter.py", line 318, in _resolveAllInflightFunctions
while self._resolveInflightOnePass():
File "apriori/nativepython/nativepython/python_to_native_converter.py", line 301, in _resolveInflightOnePass
nativeFunction, actual_output_type = functionConverter.convertToNativeFunction()
File "apriori/nativepython/nativepython/function_conversion_context.py", line 58, in convertToNativeFunction
body_native_expr, controlFlowReturns = self.convert_function_body(self._statements)
File "apriori/nativepython/nativepython/function_conversion_context.py", line 456, in convert_function_body
return self.convert_statement_list_ast(statements, toplevel=True)
File "apriori/nativepython/nativepython/function_conversion_context.py", line 461, in convert_statement_list_ast
expr, controlFlowReturns = self.convert_statement_ast(s)
File "apriori/nativepython/nativepython/function_conversion_context.py", line 311, in convert_statement_ast
e = subcontext.convert_expression_ast(ast.value)
File "apriori/nativepython/nativepython/expression_conversion_context.py", line 639, in convert_expression_ast
return lhs.convert_call(args, kwargs)
File "apriori/nativepython/nativepython/typed_expression.py", line 123, in convert_call
return self.expr_type.convert_call(self.context, self, args, kwargs)
File "apriori/nativepython/nativepython/type_wrappers/bound_compiled_method_wrapper.py", line 54, in convert_call
kwargs
File "apriori/nativepython/nativepython/type_wrappers/tuple_wrapper.py", line 112, in convert_method_call
return context.push(self, lambda newInstance: self.initializeReplacing(context, newInstance, instance, kwargs))
File "apriori/nativepython/nativepython/expression_conversion_context.py", line 212, in push
expr = callback(resExpr)
File "apriori/nativepython/nativepython/type_wrappers/tuple_wrapper.py", line 112, in
return context.push(self, lambda newInstance: self.initializeReplacing(context, newInstance, instance, kwargs))
File "apriori/nativepython/nativepython/type_wrappers/tuple_wrapper.py", line 138, in initializeReplacing
converted = kwargs[field_name].convert_to_type(field_type)
File "apriori/nativepython/nativepython/typed_expression.py", line 129, in convert_to_type
return self.expr_type.convert_to_type(self.context, self, target_type)
File "apriori/nativepython/nativepython/type_wrappers/arithmetic_wrapper.py", line 106, in convert_to_type
if target_type.typeRepresentation == Float64:

output captured in nose.nativepython.tests.tuple_compilation_test.TestTupleCompilation.test_named_tuple_replacing_function.13815.log:

('a', 'b')
(<class 'Int64'>, <class 'String'>)
{'a': <nativepython.typed_expression.TypedExpression object at 0x7f260328f5f8>}
TypedExpression(Int64,[ref])
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/APrioriInvestments/nativepython/issues/114?email_source=notifications&email_token=AB6OHBFHCDCG7BJVOYJG7DTP5UIGRA5CNFSM4H3CUD3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZFVW7Y#issuecomment-508255103,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB6OHBCGRUMB4CNABXQGI73P5UIGRANCNFSM4H3CUD3A
.

Thank you. It seems like after the rabase maybe I have the integration done, the tests are passing. The main problem now is in some other place in the code https://travis-ci.com/APrioriInvestments/nativepython/builds/117948812#L1703 I'm trying to fix it.

It looks like this always returns None.
The function has been called with the arguments from the Server::_removeOld
fieldId = self._currentTypeMap().fieldIdFor("core", "Connection", " exists")

TypeMap:
    def fieldIdFor(self, schema, typename, fieldname):
        key = FieldDefinition(schema=schema, typename=typename, fieldname=fieldname)
        return self.fieldDefToId.get(key)

However, when I placed this inside:
print('---')
print(self.fieldDefToId.get(key))
print(key == FieldDefinition(schema=schema, typename=typename, fieldname=fieldname))
print(self.fieldDefToId)
print('---')

then I got this:
---
None
True
{(schema="core", typename="Connection", fieldname=" exists"): 0, (schema="test_schema", typename="Counter", fieldname=" exists"): 1, [I've removed the rest]`
---

I cannot figure out why the kyes() method called on the Dict object returns whole dictionary, not just the keys.

Try rebasing on latest. I had a bug associated with hashing that broke some tests. Should be clean on ‘dev’
Sent from my iPhone

On Jul 5, 2019, at 4:49 AM, Szymon Lipiński<EMAIL_ADDRESS>wrote:
It looks like this always returns None.
The function has been called with the arguments from the Server::_removeOld
fieldId = self._currentTypeMap().fieldIdFor("core", "Connection", " exists")
TypeMap:
def fieldIdFor(self, schema, typename, fieldname):
key = FieldDefinition(schema=schema, typename=typename, fieldname=fieldname)
return self.fieldDefToId.get(key)
However, when I placed this inside:
print('---')
print(self.fieldDefToId.get(key))
print(key == FieldDefinition(schema=schema, typename=typename, fieldname=fieldname))
print(self.fieldDefToId)
print('---')
then I got this:

None
True
{(schema="core", typename="Connection", fieldname=" exists"): 0, (schema="test_schema", typename="Counter", fieldname=" exists"): 1, [I've removed the rest]`
I cannot figure out why the kyes() method called on the Dict object returns whole dictionary, not just the keys.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


Obsoletion request: GO:0006725 cellular aromatic compound metabolic process

Please provide as much information as you can:

GO term ID and Label

GO:0006725    cellular aromatic compound metabolic process
GO:0019438    aromatic compound biosynthetic process
GO:0019439    aromatic compound catabolic process
No regulation terms
(note that children do not have cellular in name)

Reason for deprecation Put an x in the appropriate box:

[ ]  The reason for obsoletion is that this term was an unnecessary grouping term.

"Replace by" term (ID and label)

related GO:0008152 metabolic process

"Consider" term(s) (ID and label)
Suggestions for reannotation

Are there annotations to this term?

How many EXP:

Are there mappings and cross references to this term? (InterPro, Keywords; check QuickGO cross-references section)

Is this term in a subset? (check the AmiGO page for that term)

Any other information

Checklist for ontology editor
Check term usage and metadata in Protégé

[ ] check term usage in the ontology
[ ] check internal mappings: RHEA, EC, MetaCyc
[ ] check subset usage
[ ] check taxon constraints

Check annotations

[ ] create Annotation Review spreadsheet

Annotation Review template: https://docs.google.com/spreadsheets/d/1izV3q1jnq_Ybg5MJ53O_b5BCTkGtjl_Fi-cOg3-7eBE/edit#gid=0

Instructions: https://wiki.geneontology.org/Annotation_Review_Request

[ ] create annotation review ticket: https://github.com/geneontology/go-annotation/issues/new?assignees=&labels=annotation+review&template=annotation-review-for-obsoletion.md&title=Review+annotations+to+[INSERT+GO+TERM]
[ ] find external mappings (via IEAS), include in obsoletion notice
[ ] tag curators in Annotation Review ticket. Responsible annotator for each group: https://github.com/geneontology/go-site/blob/master/metadata/group-contacts.csv

Notification

[ ] create obsoletion announcement
[ ] announce to GO friends<EMAIL_ADDRESS>[ ] paste the text in the ontology ticket

change parent
GO:0006725    cellular aromatic compound metabolic process
to
GO:0008152    metabolic process
GO:0042822    pyridoxal phosphate metabolic process	is_a
GO:0006139    nucleobase-containing compound metabolic process	is_a
GO:0018955    phenanthrene metabolic process	is_a
GO:0009072    aromatic amino acid metabolic process	is_a
GO:0046435    3-(3-hydroxy)phenylpropionate metabolic process	is_a
GO:0018958    phenol-containing compound metabolic process	is_a
GO:1902179    verruculogen metabolic process	is_a
GO:0072521    purine-containing compound metabolic process	is_a
GO:0051165    2,5-dihydroxypyridine metabolic process	is_a
GO:0018930    3-methylquinoline metabolic process	is_a
GO:0050783    cocaine metabolic process	is_a
GO:0019507    pyridine metabolic process	is_a
GO:1902654    aromatic primary alcohol metabolic process	is_a
GO:0052838    thiazole metabolic process	is_a
GO:0019438    aromatic compound biosynthetic process	is_a
GO:0019439    aromatic compound catabolic process	is_a
GO:0009698    phenylpropanoid metabolic process	is_a
GO:0042723    thiamine-containing compound metabolic process	is_a
GO:1900597    demethylkotanin metabolic process	is_a
GO:0042537    benzene-containing compound metabolic process	is_a
GO:0042558    pteridine-containing compound metabolic process	is_a
GO:0018884    carbazole metabolic process	is_a
GO:0019857    5-methylcytosine metabolic process	is_a
GO:0045460    sterigmatocystin metabolic process	is_a
GO:0046152    ommochrome metabolic process	is_a
GO:0019536    vibriobactin metabolic process	is_a
GO:0018965    s-triazine compound metabolic process	is_a
GO:0052803    imidazole-containing compound metabolic process	is_a
GO:0034275    kynurenic acid metabolic process	is_a
GO:0042817    pyridoxal metabolic process	is_a
GO:0033013    tetrapyrrole metabolic process	is_a
GO:0042818    pyridoxamine metabolic process	is_a
GO:0033491    coniferin metabolic process	is_a
GO:1905003    picolinic acid metabolic process	is_a
GO:1900594    (+)-kotanin metabolic process	is_a
GO:0009690    cytokinin metabolic process	is_a
GO:0008614    pyridoxine metabolic process	is_a
GO:1900819    orlandin metabolic process	is_a
GO:0042430    indole-containing compound metabolic process	is_a
GO:1901847    nicotinate metabolic process	is_a
GO:0050813    epothilone metabolic process	is_a
GO:0018894    dibenzo-p-dioxin metabolic process	is_a
GO:0018893    dibenzofuran metabolic process	is_a
GO:0044597    daunorubicin metabolic process	is_a
GO:0044598    doxorubicin metabolic process


Improve test suite for -Zbuild-std

This commit is aimed directly at rust-lang/wg-cargo-std-aware#33 and in
general making the -Zbuild-std tests more robust. The main change here
is that a new source tree is checked in, tests/testsuite/mock-std,
which mirrors rust-lang/rust's own tree for libstd. This mock tree is as
empty as it can be, ideally duplicating almost nothing but for not
requiring duplication of Cargo metadata about patches and such.
The end result here looks like:

All -Zbuild-std tests are now run in parallel
All tests run much more quickly since they're compiling tiny crates
instead of actually compiling libstd/libcore
No tests require network access
We verify that crates have access to the "custom" libraries
that we build

Coverage of tests is not currently expanded, but it's hoped that we
could add that shortly afterwards. Coverage has actually gone down
slightly since the custom target test was commented out temporarily and
the full integration test of running -Zbuild-std isn't run on CI any
more.
Closes rust-lang/wg-cargo-std-aware#33

r? @ehuss
(rust_highfive has picked a reviewer for you, use r? to override)

:umbrella: The latest upstream changes (presumably #7360) made this pull request unmergeable. Please resolve the merge conflicts.

:umbrella: The latest upstream changes (presumably #7159) made this pull request unmergeable. Please resolve the merge conflicts.

@bors r+

:pushpin: Commit ebd10526f3526b695872a8ecb381f65aaf74c019 has been approved by ehuss

:hourglass: Testing commit ebd10526f3526b695872a8ecb381f65aaf74c019 with merge 13bc9a1b14a024074c50fe5082bb15982c0a5aa6...

:sunny: Test successful - checks-azure
Approved by: ehuss
Pushing 13bc9a1b14a024074c50fe5082bb15982c0a5aa6 to master...


Remove redundant subtab title

Vertical space is precious, and Fiddler has too many nested tabs already.

First: I am horrible at UX/UI.
Second: there is another tab beside certificates when the session had HPKP headers.

I don't think that's the best way to do this, but that explains why there is another tab row. Since HPKP has more to do with the HTTP session than the certificate collection, I felt it needed to be somehow not attached to the certificates.
I suppose I can just not show the tabs at all if there is only a single tab, or move the HPKP header info somewhere else.


Dart 2 support?

Hi,
Just wondering if there are any plans on updating this package to support Dart version 2?
We are developing a Flutter app and are making use of the sqflite package, however testing is complicated by the device OS dependency e.g. only supports on Android or iOS.
Ideally we'd like to be able to utilise this package to construct a specialised Sqlite DB interface for non-device environments but benefit from the common underlying SQL syntax and record changes. Use of Mockito not sufficient.
Hope the above makes sense as to use-case.
thx

WIP - but I started a branch in hopes off adding support for Dart 2 here https://github.com/sean-kenny/dart-sqlite/tree/support_dart2

Here is a possible PR: https://github.com/pylaligand/dart-sqlite/pull/71


Release v1.5

Rewrite and refactor the whole library, and release v1.5. See #12.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@f0ebbc0). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             master       #14   +/-   ##
==========================================
  Coverage          ?   100.00%
==========================================
  Files             ?         8
  Lines             ?       679
  Branches          ?         0
==========================================
  Hits              ?       679
  Misses            ?         0
  Partials          ?         0

Continue to review full report at Codecov.

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


(Receiver) Add toast messages when API calls return errors

Whenever an API call returns an error, we should be rendering out a toast message with the error information displayed. Additionally, we should make sure pages are not stuck in a loading state (i.e. <Spinner/> displayed continuously after an error is returned).

The rest-hooks library uses <Suspense> and <NetworkErrorBoundary> components to handle errors, so we will need to wrap any content we are using from a useResource() call in one or both of these.


Failed to install addon: apk add --no-cache 'rsync' 'coreutils' 'curl'' returned a non-zero code: 2

Hey @googanhiem,
i wanted to try this addon however i get a strange error when trying to install it via the supervisor addon store on a RPI4:
The command '/bin/ash -o pipefail -c apk update && apk add --no-cache 'rsync' 'coreutils' 'curl'' returned a non-zero code: 2
Have you seen this before ? I installed the plugin two other machines however the other instances runson x86 and there it worked.
Maybe related to the architecture ?

Yea likely network it seems :)
fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/aarch64/APKINDEX.tar.gz

fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/aarch64/APKINDEX.tar.gz

WARNING: updating and opening https://dl-cdn.alpinelinux.org/alpine/v3.19/main: temporary error (try again later)

WARNING: updating and opening https://dl-cdn.alpinelinux.org/alpine/v3.19/community: temporary error (try again later)