Remove filtering from model map

Resolves https://github.com/prisma/graphqlgen/issues/282. It seems this is built up elsewhere so there's no need to filter here. I ran into the issue of export type Foo = ... being omitted from the generated output.
(If this is not desirable, calling isEnum() as a function should resolve the type issue, but I wasn't sure why you'd want to filter here - the TypeScript type system could handle any errors for you).

Hey, thanks for the PR!
There is indeed an issue here, but that doesn't have to do with the filter.
The filter is here to prevent the TS enums from being imported, as they're already inlined from the GraphQL schema.
The problem here is that .isEnum is a function and not a property.
This is the right fix:
return !(
  modelDef.kind === 'TypeAliasDefinition' &&
  (modelDef as TypeAliasDefinition).isEnum() // <-- .isEnum()
)

Why would you care about the enum at this point though? Are you saying you copied it into the file elsewhere? In which case, it’s a little confusing to mix the logic for that into multiple places - can we just subtract those already imported types before running this function instead of spreading the filter across multiple files?

Is https://github.com/prisma/graphqlgen/blob/26064174625c27965c99372235f653398c43d402/packages/graphqlgen/src/introspection/ts-ast.ts the right place to do that (e.g. avoid the doubling into enum and type map)?

No, /packages/graphqlgen/src/introspection/ts-ast.ts isn't the right file to modify ! Enums are treated as "scalars", which means we always, always take the enums from your GraphQL schema and "copy/paste" them at the top of your graphqlgen.ts file without looking at your TS file.
This is done here: https://github.com/prisma/graphqlgen/blob/2606417462/packages/graphqlgen/src/generators/common.ts#L259-L267
Given that GraphQL schema:
type User {
  color: Color!
}

enum Color {RED GREEN BLUE}

Your graphqlgen.ts file will roughly look like this:
import { User } from 'your-types.ts

type Color = 'RED' | 'GREEN' | 'BLUE'

The enum will NEVER be imported from your ts types.
BUT, we still use the enums from your TS types (your model definitions) to decide whether we can or cannot scaffold the resolver of that enum field as a defaultResolver.
This is done here: https://github.com/prisma/graphqlgen/blob/2606417462/packages/graphqlgen/src/generators/common.ts#L167-L175
For that reason, when importing the model definitions, we need to filter the enums from your types, to make sure we do not end up in such a situation:
import { User, Color } from 'your-types'

type Color = 'RED' | 'GREEN' | 'BLUE' // <- Duplicated type here

Does that make sense to you ?

@Weakky I think it makes sense once I looked at https://github.com/prisma/graphqlgen/pull/244. I did want to understand the design a bit better though - is modelMap a mapping of all TypeScript types to GraphQL types and not a map of just the models? Based on the code you pointed me to, it's find the common properties between a TypeScript type and the GraphQL type so it's not necessary to have the enum as a top-level type in modelMap. I guess I'd need to play around with it a bit more to understand if what I just asked makes sense.

@Weakky Is https://github.com/prisma/graphqlgen/blob/dc737fe4f3262e3fd00c23a14f0227a4a950deb4/packages/graphqlgen/src/tests/typescript/basic.test.ts#L22-L35 the test you expect to fail with this change?

The typesMap is the map of all the model definitions per files, and the modelMap is indeed a map of all the model definitions that maps to a graphql type.
For the reasons stated above, we cannot filter the enums during the process of building that modelMap either (in parse.ts) because we still need to make comparisons between the enums properties later during the code generation.
However, we want to make sure that we never import the enums from your TS types because we always take the enums from your graphql schema as reference and as return type of the resolvers.
The test you showed me, despite being very light for the moment, is indeed the test that makes sure we properly render enums

@Weakky So that test works. I'll try to add a test that disproves this, but I'm convinced you don't want/need the filter. Let me know if you already have a test for this?

@Weakky I added a test that demonstrates the concern I've been trying to say. Hopefully it makes sense. Basically, if you have a model that is actually an enum here, you don't want to be filtering it out. That would cause the generated TypeScript file to be invalid.

Is there anyway we can land this feature? I can rebase if so, it's been blocking a few projects I'm involved in for a while 😄 I believe I demonstrated two bugs present with the filter, 1. it shouldn't filter and 2. the filter is broken.

@blakeembrey go for it. It would be nice if you include a test that fails on master but passes on your branch.

@jasonkuhrt That is/was already here 😦 I'll see about revisiting the diff another time.


6 - Create block entity

6 - Creation of block entity

I initiated the PRs for this repo to self-approve with all changes in place, but not possible.


About the developer

Hi,
I'm very interested in the developers for Joern.
Is there a special team for Joern(Like semmle for codeql)?
Your,
zonkey

Hi @tszdanger! Some of the Joern contributors work at ShiftLeft, which might answer your question. As for the rest, you can find them by checking the contributors page https://github.com/joernio/joern/graphs/contributors.


Update http4s-circe, http4s-dsl, ... to 0.21.16

Updates

org.http4s:http4s-circe
org.http4s:http4s-dsl
org.http4s:http4s-server

from 0.21.0 to 0.21.16.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Applied Migrations

dependency:v0_21@org.http4s:http4s-scalafix:0.21.5

Documentation:

https://github.com/http4s/http4s/releases/tag/v0.21.5

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.http4s" } ]

labels: library-update, semver-patch, scalafix-migrations

Superseded by #342.


[cluster-test] Cleanup old setup [1/n]

Summary

Remove rusoto libraries
Remove unused modules : aws, deployment
Update modules: promethes, cluster, etc.
Remove all effects
Update all experiments to remove references to old setup
Remove multi_region_network_simulation experiment as it is no longer accurate with full nodes in the picture

Testing
Ran all experiments and ci-suite

cc @rexhoffman : I have removed rusoto libraries dep from cluster_test

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

:v: @ankushagarwal can now approve this pull request

@bors-libra r=andll

:pushpin: Commit 8175494 has been approved by andll

:hourglass: Testing commit 817549436d611b26357a9d5121f4786f76776999 with merge 22584a4ac3eba0339ce07e5f38f5c40998cd4730...

:sunny: Test successful - checks-actions_land_blocking_test, checks-circle_commit_workflow
Approved by: andll
Pushing 22584a4ac3eba0339ce07e5f38f5c40998cd4730 to master...


Crash when pushing ConsoleView PulseUI Logger on Device only

Hi Kean 👋
Crash
I have a crash from Pulse version 3.6.0 (also present on 4.0-beta) but not in 3.5.7 version that works well. More over this crash only appears on device and not on Simulator.
The app crashes when pushing ConsoleView(store: loggerStore) via a NavigationLink.
It's in class RemoteLogger / func cancelConnection on the precondition
public final class RemoteLogger: RemoteLoggerConnectionDelegate {
...
    private func cancelConnection() {
        precondition(DispatchQueue.getSpecific(key: specificKey) != nil)
...
    }

Logs
For the moment, Xcode does not want to give me any crashlogs but I'll try again later
I'm running iOS 16.4.1 (a) on iPhone 13 mini
Here are 2 screenshots :

Hope it can helps...
Cheers
Jeremie

Fixed in version 3.7.2.
I'm considering making it an Actor in version 4.0.


Metric Problem

Hello! Thanks for your great work. But the metric which I used test.py to calculate is not the same as your paper. Is there anything wrong in my procedure?

Downloading the code and set up the enviroment.
Downloading the datsaet and the pretrained model.
python3 tools/test.py -c config/ps_gat.yaml -m cache/ps_gat/100/models/checkpoint_epoch_200.pth

And the average precision is not the same or slight different as you describled in your paper.
fully trained weight

partly trained weight

I'd appreciate it if you could reply soon.

I found that i misunderstood something. Close for this.Thanks for your great work again!


all the cert rotation controllers to be executed in run-once mode

this is needed for cert recovery.

/lgtm

/hold
(missed the append)

/refresh

/retest

merged in https://github.com/openshift/cluster-kube-apiserver-operator/pull/461


Some of my repo doesn't showing Language bar after push

Hi, my previous repo is contained with Example of React Native folder which is heavily written on Objective-C, at this time, it shown Language bar, but since I deleted the Example folder and pushes some code written in Javascript, the Language Bar is missing.
Here is the repo:
https://github.com/dwicao/react-native-circle-button
https://github.com/dwicao/react-native-double-click
https://github.com/dwicao/react-native-simple-tab
I actually wait for 24 hours++ since the last time I pushed the code, but nothing happened 😢

@dwicao this is happening because all your code is under the dist directory in each repo.  This is considered a vendored directory by Linguist.  You'll need to manually override this or use a different directory name that isn't considered a vendored directory.

Thank you very much, now it is solved 🎉


[Bug]: Composer fails to install

What happened?
I get the following error message:
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - discoverlance/filament-page-hints[0.0.1, ..., 0.0.3, 1.0.0, ..., v1.0.3] require illuminate/contracts ^9.0 -> found illuminate/contracts[v9.0.0, ..., v9.52.7] but these were not loaded, likely because it conflicts with another require.
    - Root composer.json requires discoverlance/filament-page-hints * -> satisfiable by discoverlance/filament-page-hints[0.0.1, 0.0.2, 0.0.3, 1.0.0, 1.0.1, 1.0.2, v1.0.3].

You can also try re-running composer require with an explicit version constraint, e.g. "composer require discoverlance/filament-page-hints:*" to figure out if any version is installable, or "composer require discoverlance/filament-page-hints:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
composer [require discoverlance/filament-page-hints] failed, composer command failed: exit status 2. stderr=

How to reproduce the bug
Install laravel 10, latest filament and this plugin.
Package Version
1.0.3
PHP Version
8.1
Laravel Version
10.8
Which operating systems does with happen with?
Linux
Notes
No response

Hi, sorry about the delay. It's likely because of laravel 10 support or an update in laravel 9. I have not tested and implemented any support for laravel 10.
I am having issues at the moment with my laptop so I am not able to resolve the issue now. Will do so as soon as I sort my  laptop out.
If possible, can you paste  here the composer.json you had which gave you the issue so that I can check it out later on when I do resolve it to make sure I can replicate some parts of your environment.

Same here


flakes

Move to flakes, fix ci, build using musl
Remove unused tools

:tada: This PR is included in version 5.0.2 :tada:
The release is available on:

GitHub release
crate.io packages (1 packages published)

Your semantic-release bot :package::rocket:


Outfit updated

Finished implementing functionality in user.html (including new history-feature and consequent changes to UserController)

Added more tooltips/hints
Removed unnecessary buttons
Updated styles for different challengeitems (own colors for live, and arcade)

Improved index.html

logo resized and centered
texts centered

Fixed createArcadeTaskPairRedirectsToTask() in ChallengeControllerTest.java
Still to be done:

For some reason clicking Arcade-challenges on the user.html view produces empty page atm

nice


Support for IPython notebooks

We're using the ok client for all programming assignments for
DS8 and it's quite a challenge to work with.
Our current workflow when a student clicks the "Run ok tests" button in the
JupyterHub interface is:

Export the IPython notebook as a .py file.
Remove the get_ipython lines in the resulting file.
Find all the cells that start with # ok and run them. The contents of these
cells call the ok client to run the corresponding tests.

This is less than ideal for the following reasons:

The ok cells in the notebook can't actually be run directly since the
notebook won't be exported. More confusingly, the ok script will be run on
old code from the last time the code was exported. This means that the ok
tests can't be run locally if the ok-extension isn't installed.
The ok script needs to run the entire notebook before being able to run
tests which is often slow (conceptually, each ok cell is testing one filled-
in student cell). This often results in the case where a student is partway
finished with a notebook and runs the ok tests only to have them fail
because of a later cell.
As a corollary, the ok script only reads in the final values of student
variables. This is not a huge issue but it causes confusion.

I think these issues can be resolved if the ok client is able to look at cells
in the notebook specifically. I'm not sure how involved this is, so any feedback
would be appreciated.

I'm not sure how DS8 uses JupyterHub and ok - but there seems to be a way to autograde assignments programmatically (in addition to other grading tools for JupyterHub)
this could be extension forked off nbgrader
https://github.com/jupyter/nbgrader/blob/master/nbgrader/apps/autogradeapp.py
Is the challenge here being able to run ok tests both on jupyterhub as well as locally?

The ok script needs to run the entire notebook before being able to run tests which is often slow
This might be alleviated by different test design (I'm not sure how tests are written currently).

It is true that that a syntax error later in the file may cause issues and prevent ok from loading the file.
Perhaps the file export can chop off the file after the question (or maybe most recently run cell?).

As a corollary, the ok script only reads in the final values of student variables. This is not a huge issue but it causes confusion.
Again test design should be to solve this?

Another Idea:
What if ok was summonable from python? as in students would just type (or the button would call)
ok.grade(5)
and the ok tests would run in the current environment?

I think the best solution is to doctor the exported .py file so that it
only contains a subset of the original notebook contents. The same flow we
have now would be preserved, but the problems would go away.
Running in the current environment is also a great idea if we can figure
out how to set it up.
On Mon, Nov 16, 2015 at 7:17 PM, Sumukh Sridhara<EMAIL_ADDRESS>wrote:

I'm not sure how DS8 uses JupyterHub and ok - but there seems to be a way
to autograde assignments programmatically (in addition to other grading
tools for JupyterHub)
this could be extension forked off nbgrader
https://github.com/jupyter/nbgrader/blob/master/nbgrader/apps/autogradeapp.py
Is the challenge here being able to run ok tests both on jupyterhub as
well as locally?
The ok script needs to run the entire notebook before being able to run
tests which is often slow
This might be alleviated by different test design (I'm not sure how tests
are written currently).
It is true that that a syntax error later in the file may cause issues and
prevent ok from loading the file.
Perhaps the file export can chop off the file after the question (or maybe
most recently run cell?).
As a corollary, the ok script only reads in the final values of student
variables. This is not a huge issue but it causes confusion.
Again test design should be to solve this?
Another Idea:
What if ok was summonable from python? as in students would just type (or
the button would call)
ok.grade(5)
and the ok tests would run in the current environment?
—
Reply to this email directly or view it on GitHub
https://github.com/Cal-CS-61A-Staff/ok-client/issues/135#issuecomment-157255365
.

@Sumukh How involved would implementing the functionality to call ok from Python be? I'd be happy to work on it if its reasonable.

I'm not sure. I haven't used the DS8 setup.
It could be as simple as:
ok-integration.py
import os
def grade(qNum, config="lab.ok"):
  # export to notebook py file
  os.exec("python3 ok --config " + config + " -q " + qNum)

iPython Notebook import
import ok-integration as ok

@SamLau95
It looks pretty easy if you bundle the ok-client source code:
$ git clone https://github.com/Cal-CS-61A-Staff/ok-client.git okclient
$  python3
Python 3.4.3 (default, Aug 11 2015, 08:57:25)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import okclient
>>> from okclient.client.cli import ok
>>> ok.main()
=====================================================================
Assignment: Project 4: A Scheme interpreter
OK, version v1.4.7
=====================================================================

Running tests

---------------------------------------------------------------------
Question 20 > Suite 1 > Case 2

....

OK is up to date

You can definitely import source from the ok application just by adding it
to the pythonpath.
Running ok from the ipython environment would be a big win, given how long
it takes to load datasets for the course. Thanks for taking a look, Sam.
albert12132 knows the client codebase very well if you need guidance.
On Mon, Nov 23, 2015 at 2:03 PM, Sumukh Sridhara<EMAIL_ADDRESS>wrote:

@SamLau95 https://github.com/SamLau95
It looks pretty easy if you bundle the ok-client source code:
$ git clone https://github.com/Cal-CS-61A-Staff/ok-client.git okclient
$  python3
Python 3.4.3 (default, Aug 11 2015, 08:57:25)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import okclient
from okclient.client.cli import ok
ok.main()
=====================================================================
Assignment: Project 4: A Scheme interpreter
OK, version v1.4.7
=====================================================================

Running tests

Question 20 > Suite 1 > Case 2
....
OK is up to date
—
Reply to this email directly or view it on GitHub
https://github.com/Cal-CS-61A-Staff/ok-client/issues/135#issuecomment-159080319
.

@Sumukh Ah, that's really cool. Thanks for looking into this for us! When you call ok.main() there, does that run in the current environment? That is, if I wrote
>>> foo = 2
>>> ok.main()

Would the ok tests have access to foo? It looks like it's loading the config file for Project 4 and subsequently importing a python file.
If the ok tests do in fact run in the current environment then it seems like I can avoid importing the student submission in the tests entirely and just call ok using what's currently defined. Does that sound right to you?

@SamLau95 OK doesn't run in the current environment; every test starts with a clean environment. So in the example you give, OK tests would not have access to foo.
I'm not familiar with DS8's assignment/test structure, so correct me if I'm wrong. It sounds like you want to be able to call ok programmatically from within each test (i.e. in your test, you perform whatever setup the test needs, then you call OK to check the student solution). That isn't supported, and could be implemented, but would require few nontrivial changes to the ok-client codebase.
Can you point me to a sample DS8 assignment that I can test? I have no experience with iPython notebooks so I'm having a hard time understanding the problems listed your initial post.

The problem is equivalent to running an OK test from within an interactive
session. E.g.

x = load_data_for_five_minutes()
y =
ok.test('q1') # Executes test cases that reference y and uploads results

The goal is to have students modify their expression and then re-execute
the ok test without ever having to re-load x.
On Mon, Nov 23, 2015 at 5:29 PM, albert12132<EMAIL_ADDRESS>wrote:

@SamLau95 https://github.com/SamLau95 OK doesn't run in the current
environment; every test starts with a clean environment. So in the example
you give, OK tests would not have access to foo.
I'm not familiar with DS8's assignment/test structure, so correct me if
I'm wrong. It sounds like you want to be able to call ok programmatically
from within each test (i.e. in your test, you perform whatever setup the
test needs, then you call OK to check the student solution). That isn't
supported, and could be implemented, but would require few nontrivial
changes to the ok-client codebase.
Can you point me to a sample DS8 assignment that I can test? I have no
experience with iPython notebooks so I'm having a hard time understanding
the problems listed your initial post.
—
Reply to this email directly or view it on GitHub
https://github.com/Cal-CS-61A-Staff/ok-client/issues/135#issuecomment-159123058
.

Where is the test 'q1' coming from (e.g. a file)? In this example, is the desired behavior supposed to reset the test's state (except for the data loaded in x) every time ok.test is called? One workaround is to have a separate python module that loads your data, then import that python module in the OK tests (this is kind of hacky because it relies on the fact that Python only imports modules once, but 61A uses it in at least the Maps project).
In any case, OK doesn't support this use case. ok-client was originally designed with the assumption that each invocation would make a single pass through the protocols. As a result, there's no API for programmatically interacting with individual tests multiple times in a single session. Fully providing this sort of support would probably require a sizable redesign of OK.

@albert12132 Gotcha, thanks for the info.
@papajohn Given this, is there a reason to use the ok grader instead of something like https://github.com/jupyter/nbgrader ?

q1 would be loaded in the same manner as a standard ok test: find a .ok
file, load a tests/q1.py file full of tests, and execute the tests. The
only difference is that we wouldn't start from a fresh environment when
executing a test.
ok has a lot of advantages — let's get it working.
On Mon, Nov 23, 2015 at 6:33 PM, Sam Lau<EMAIL_ADDRESS>wrote:

@albert12132 https://github.com/albert12132 Gotcha, thanks for the info.
@papajohn https://github.com/papajohn Given this, is there a reason to
use the ok grader instead of something like
https://github.com/jupyter/nbgrader ?
—
Reply to this email directly or view it on GitHub
https://github.com/Cal-CS-61A-Staff/ok-client/issues/135#issuecomment-159134233
.

Still trying to understand the workflow. Does this sound correct:

Begin an OK session (i.e. run ok on the command line)
Load q1.py, including datasets
Run the q1 test.
Without quitting the current OK session, the student has the opportunity to change their code
Run the q1 test again.
Repeat step 4 and 5 as necessary.
Exit the current OK session.

Not quite.

Start an interactive Python session and modify the environment by
executing various statements
Import ok module into the interactive session
Load contents of q1.py into the current environment and run its tests by
evaluating a Python expression (such as ok.grade('q1'))
Student can further modify the environment
Re-execute tests when ok.grade('q1') is evaluated again
Repeat steps 4 & 5 as necessary

The interactive session exits whenever the student ends it.
On Mon, Nov 23, 2015 at 9:16 PM, albert12132<EMAIL_ADDRESS>wrote:

Still trying to understand the workflow. Does this sound correct:

Begin an OK session (i.e. run ok on the command line)
Load q1.py, including datasets
Run the q1 test.
Without quitting the current OK session, the student has the
opportunity to change their code
Run the q1 test again.
Repeat step 4 and 5 as necessary.
Exit the current OK session.

—
Reply to this email directly or view it on GitHub
https://github.com/Cal-CS-61A-Staff/ok-client/issues/135#issuecomment-159151719
.

Got it. How early would you need support for running OK in a Python session (e.g. the ok.grade function)? To do it right, I'd need to revisit the design of ok-client, and might take a month or two, depending on how much time I have. If you need it soon, we can try to work out a quick (not so robust) way to do this.

Jan 15.
On Mon, Nov 23, 2015 at 10:18 PM, albert12132<EMAIL_ADDRESS>wrote:

Got it. How early would you need support for running OK in a Python
session (e.g. the ok.grade function)? To do it right, I'd need to revisit
the design of ok-client, and might take a month or two, depending on how
much time I have. If you need it soon, we can try to work out a quick (not
so robust) way to do this.
—
Reply to this email directly or view it on GitHub
https://github.com/Cal-CS-61A-Staff/ok-client/issues/135#issuecomment-159164395
.

I started a short design doc here. Let me know if it suits your use case.

Looks perfect. The only issue is that protecting the global environment
completely is hard, and I don't think we should go out of our way to do so.
For example, I don't think we should deepcopy everything (which could be
slow); just pass a shallow copy of globals to the test.
On Mon, Jan 4, 2016 at 6:30 PM, albert12132<EMAIL_ADDRESS>wrote:

I started a short design doc here
https://docs.google.com/document/d/16_7CHwjObKQNt0vR51E877e1lv00AbviFOec-i-ipWw/edit?usp=sharing.
Let me know if it suits your use case.
—
Reply to this email directly or view it on GitHub
https://github.com/Cal-CS-61A-Staff/ok-client/issues/135#issuecomment-168874788
.

This looks great! Thanks a bunch.
Agree on the point about shallow copying. Tests shouldn't cause
side-effects.
On Tue, Jan 5, 2016 at 8:21 AM John DeNero<EMAIL_ADDRESS>wrote:

Looks perfect. The only issue is that protecting the global environment
completely is hard, and I don't think we should go out of our way to do so.
For example, I don't think we should deepcopy everything (which could be
slow); just pass a shallow copy of globals to the test.
On Mon, Jan 4, 2016 at 6:30 PM, albert12132<EMAIL_ADDRESS>wrote:

I started a short design doc here
<
https://docs.google.com/document/d/16_7CHwjObKQNt0vR51E877e1lv00AbviFOec-i-ipWw/edit?usp=sharing
.
Let me know if it suits your use case.
—
Reply to this email directly or view it on GitHub
<
https://github.com/Cal-CS-61A-Staff/ok-client/issues/135#issuecomment-168874788
.

—
Reply to this email directly or view it on GitHub
https://github.com/Cal-CS-61A-Staff/ok-client/issues/135#issuecomment-169049229
.

Ran into an issue: globals() returns the dictionary of global variables in the current module. The intended API is defined in a module called client.cli.api.assignment, which does roughly the following:
class Assignment:
    def grade(self, *questions, env=None):
        if env is None:
            env = globals()
        # call grading utilities with env

globals() will be scoped to client.cli.api.assignment, not __main__ (i.e. the student's environment). The only way around this (that I can think of) is for API users to pass globals() explicitly:
assignment = load_assignment(config_path)
assignment.grade('q1', globals())   # Can't use the default env anymore.

Are you okay with that?

@brianhou suggested
import __main__

env = dir(__main__)

I'll go with that.

Fancy!
On Tue, Jan 12, 2016 at 5:48 PM, albert12132<EMAIL_ADDRESS>wrote:

@brianhou https://github.com/brianhou suggested
import main
env = dir(main)
I'll go with that.
—
Reply to this email directly or view it on GitHub
https://github.com/Cal-CS-61A-Staff/ok-client/issues/135#issuecomment-171127169
.

@papajohn @SamLau95 do you need the Assignment.backup feature? If not, I'll leave it out for now. If you do, what information are you expecting to backup?

We do not need backup or submit. Submission will be run in the standard
file-oriented way.
On Wed, Jan 13, 2016 at 6:36 PM, albert12132<EMAIL_ADDRESS>wrote:

@papajohn https://github.com/papajohn @SamLau95
https://github.com/SamLau95 do you need the Assignment.backup feature?
If not, I'll leave it out for now. If you do, what information are you
expecting to backup?
—
Reply to this email directly or view it on GitHub
https://github.com/Cal-CS-61A-Staff/ok-client/issues/135#issuecomment-171512549
.

Works great! LGTM. I'll let you merge b/c I've lost track of how versions are incremented in this project.

@brianhou any comments before I merge?


[Bugfix] Fix error in laravel_version when artisan is not present

If PHP could not find the artisan file when building the prompt, it would output Could not open input file: artisan to stdout. Where only stderr was being redirected to /dev/null, this output would get placed into laravel_version variable and displayed on the prompt.
Also the output of php artisan --version follows the format Laravel Framework <version number>, so I adjusted pulling just the version number out accordingly.
The reference PR and conversation about this error can be found here: https://github.com/bhilburn/powerlevel9k/pull/818
On a side note, this is hands down my favorite zsh theme!

Does php artisan --version return multiple lines? On my clean install it returns one line. Just wondering because you use grep and we try to steer clear of externals as much as possible

@onaforeignshore it does return only one line. Ah yeah that makes sense. I was just following after the php version segment, but i suppose a more portable way could be done

@brandon14 - Thanks so much for putting together this PR! I also appreciate you modeling the changes on other segments, which should generally be a good idea, hah. Unfortunately it seems you found what should probably be a bug in the php segment, per @onaforeignshore's note about calling out to external programs =)
@dritter has identified this PR as a priority and a good fit for the v0.6.6 release, so I'd like to get this cleaned up and merged as soon as we can!
Since the command only returns one line, I think we ought to be able to do the parsing with some ZSH regex. @onaforeignshore - agree / disagree?

Yeah that seems to work fine @onaforeignshore . Ill get those changes up ASAP

Thanks so much for pulling in that change, @brandon14, and for suggesting it, @onaforeignshore! I think the code looks great.
We do have one last problem, where a ton of the unit tests are failing with this error:
command not found: build_left_prompt

I can't see how the changeset in this PR could possibly cause those errors, but master is currently passing. I'm not super sure what to make of it. @onaforeignshore @dritter - anything pop out at you?

@dritter @bhilburn sorry about that I didn't see the missed parenthesis there. It's been a busy weekend for me or I would have fixed it sooner. My apologies.

Thanks so much, @dritter! I totally missed that line.
And thanks, @brandon14, for fixing the issue! I'm really happy we are getting this merged, and it will be in the v0.6.6 release. Welcome to P9k as a first-time contributor! =)


Implement backend APIs to retrieve detailed information for each game history record.

https://github.com/sopra-fs23-group-32/SoPra23_Server/commit/a55c10b2b4a05c37c9aa041663aee1db62fbe181, can get shared game info and the personal game score now, still lacking the labels and answers of the game

https://github.com/sopra-fs23-group-32/SoPra23_Server/commit/c2c6d5a4954d4fed143ec31e470327c9b9117593 - DTOs for REST request

https://github.com/sopra-fs23-group-32/SoPra23_Server/commit/7d42d9c6d4faf3315d7505114b12d21bf9639046

https://github.com/sopra-fs23-group-32/SoPra23_Server/commit/9c06afa8930e7a0652f5a4639b13b0348056a62d


new blog: red tile - time of encounter

@dsarkar / @HannaHei
"einemregelmäßigen"
should be two words with a space between them.

See PR https://github.com/corona-warn-app/cwa-website/pull/2365 for typo corrections.


Add home link

A link to home is missing in the top bar.

Implemented in kraiz/mopidy-schubidu/pull/5


ValueError: shapes (15,728) and (784,1) not aligned: 728 (dim 1) != 784 (dim 0)

Getting this error on line:
z = np.dot(w, activation)+b
In Network.backprop(), in this snippet:
for b, w in zip(self.biases, self.weights):
            z = np.dot(w, activation)+b
            zs.append(z)
            activation = sigmoid(z)
            activations.append(activation)

Anyone got any ideas what's going wrong?

How did you resolve the issue?


New package: Lucon v0.1.0

Registering package: Lucon
Repository: https://github.com/toschaefer/Lucon.jl
Created by: @toschaefer
Version: v0.1.0
Commit: 6229a5ce7ababee19c3d3b3f85f389cac4c4be9a
Git reference: HEAD
Description: loss optimization under unitary constraint

I respectfully ask to accept the name Lucon.jl as the package name.
The module implements an optimizer for functions which map a unitary matrix onto a real number (the loss). A name like "LossOptimizer" would meet the package naming guidelines, but it would be grossly inaccurate since loss optimization is a huge field in science and the module is meant to optimize only a subset of these problems.
Accordingly, I would have to use a name like "RealValuedFunctionOptimizationUnderUnitaryConstraint". This is, to say the least, very long, clumsy and unreadable.
The name Lucon stands for Loss optimization under Unitary CONstraint. It is not jargon but simply an invention, and can fluently be pronounced as "loo-kon".
Since it will be part of a new software package for materials science in Julia, which will interface with the globally known VASP code, it is likely to be recognized and used in the scientific community.

I don't see a concern here.


[Bug] SamlSecurityTokenHandler and Saml2SecurityTokenHandler does not fetch configuration from ConfigurationManager on ValidateTokenAsync

Which version of Microsoft.IdentityModel are you using?
Microsoft.AspNetCore.Authentication.WsFederation 8.0.0
Microsoft.IdentityModel.Protocols.WsFederation 7.0.3
Microsoft.IdentityModel.Tokens.Saml 7.0.3
Where is the issue?

[ ] M.IM.JsonWebTokens
[ ] M.IM.KeyVaultExtensions
[ ] M.IM.Logging
[ ] M.IM.ManagedKeyVaultSecurityKey
[ ] M.IM.Protocols
[ ] M.IM.Protocols.OpenIdConnect
[ ] M.IM.Protocols.SignedHttpRequest
[ ] M.IM.Protocols.WsFederation
[ ] M.IM.TestExtensions
[ ] M.IM.Tokens
[X] M.IM.Tokens.Saml
[ ] M.IM.Validators
[ ] M.IM.Xml
[ ] S.IM.Tokens.Jwt
Other (please describe)
[x] M.AspNetCore.Authentication.WsFederation

Is this a new or an existing app?
The app is in production and I have upgraded to a new version of Microsoft.AspNetCore.Authentication.WsFederation and Microsoft.IdentityModel.Tokens.Saml in development.
Repro
var wsfedmessage = new WsFederationMessage();
wsfedmessage.Wa = "wsignin1.0";
wsfedmessage.Wresult = @"<your wresult here>";
wsfedmessage.Wctx =
    "your wctx here";

var token = wsfedmessage.GetToken();
var handler = new SamlSecurityTokenHandler();

var validationParameters = new TokenValidationParameters();
validationParameters.ConfigurationManager = new ConfigurationManager<WsFederationConfiguration>(
    "https://<your wsfederation host here>/FederationMetadata/2007-06/FederationMetadata.xml",
    new WsFederationConfigurationRetriever());

var result = await handler.ValidateTokenAsync(token, validationParameters);
if (!result.IsValid)
{
    throw result.Exception;
}

Expected behavior
I expect SamlSecurityTokenHandler to fetch configuration using the ConfigurationManager and result to be valid.  Microsoft.AspNetCore.Authentication.WsFederation expects the handler to fetch Configuration using the ConfigurationManager as it is done in the JsonWebTokenHandler.
Actual behavior
result.IsValid == false with the exception "IDX10204: Unable to validate issuer. validationParameters.ValidIssuer is null or whitespace AND validationParameters.ValidIssuers is null or empty.".
This is because the configuration is not fetched.
Possible solution
Fetch the current configuration at the start of ValidateTokenAsync and pass this with a new TokenValidationParameters to ValidateToken. I don't know the solution for the non-async ValidateToken as GetBaseConfigurationAsync is async.

I have worked around this issue with the following handler:
public class CustomSamlSecurityTokenHandler : SamlSecurityTokenHandler
{
    public override async Task<TokenValidationResult> ValidateTokenAsync(string token, TokenValidationParameters validationParameters)
    {

        var configuration = await validationParameters.ConfigurationManager.GetBaseConfigurationAsync(CancellationToken.None).ConfigureAwait(false);
        var issuers = new[] { configuration.Issuer };
        validationParameters.ValidIssuers = (validationParameters.ValidIssuers == null ? issuers : validationParameters.ValidIssuers.Concat(issuers));
        validationParameters.IssuerSigningKeys = (validationParameters.IssuerSigningKeys == null ? configuration.SigningKeys : validationParameters.IssuerSigningKeys.Concat(configuration.SigningKeys));

        return await base.ValidateTokenAsync(token, validationParameters);
    }
}

We get this this issue as well - I have a question to the Workaround by Hakon:  Can you share the code how add CustomSamlSecurityTokenHandler?

Yes @MichaelBuehler!
I also would like to know how to use the method ValidateTokenAsync.

In your AddWsFederation options add the following:
                options.TokenHandlers.Clear();
                options.TokenHandlers.Add(new CustomSamlSecurityTokenHandler());

Only do the Clear(); if you know you are not going to encounter Saml2 tokens or jwt.

 options.TokenHandlers.Clear();
                options.TokenHandlers.Add(new CustomSamlSecurityTokenHandler());

Hi @Hakon!
I am trying to use your workaround and now I am getting a different error:
XmlReadException: IDX30011: Unable to read XML. Expecting XmlReader to be at ns.element: '[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.].[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]', found: '[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.].[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'. Microsoft.IdentityModel.Xml.XmlUtil.CheckReaderOnEntry(XmlReader reader, string element, string namespace) Microsoft.IdentityModel.Tokens.Saml.SamlSerializer.ReadAssertion(XmlReader reader) Microsoft.IdentityModel.Tokens.Saml.SamlSecurityTokenHandler.ReadSamlToken(XmlReader reader) Microsoft.IdentityModel.Tokens.Saml.SamlSecurityTokenHandler.ReadSamlToken(string token) Microsoft.IdentityModel.Tokens.Saml.SamlSecurityTokenHandler.ValidateSignature(string token, TokenValidationParameters validationParameters) Microsoft.IdentityModel.Tokens.Saml.SamlSecurityTokenHandler.ValidateToken(string token, TokenValidationParameters validationParameters, out SecurityToken validatedToken) Microsoft.IdentityModel.Tokens.Saml.SamlSecurityTokenHandler.ValidateTokenAsync(string token, TokenValidationParameters validationParameters)

Hard to say without the PII-strings. Do you know if that's a saml1 or saml2 token?

Hi @Hakon
Your fix worked at least for me, thank you!
For the record, I am using the dll versions mentioned above (currently the latest), issue appeared after upgrade to .NET 8:
Microsoft.AspNetCore.Authentication.WsFederation 8.0.0
Microsoft.IdentityModel.Tokens.Saml 7.0.3  (part of nuget Microsoft.IdentityModel.Tokens 7.0.3 (not sure why there is no 8.0.0)

Hard to say without the PII-strings. Do you know if that's a saml1 or saml2 token?

Hi @Hakon!
This is the answer that I had:
`An unhandled exception occurred while processing the request.
XmlReadException: IDX30011: Unable to read XML. Expecting XmlReader to be at ns.element: 'urn:oasis:names:tc:SAML:1.0:assertion.Assertion', found: 'urn:oasis:names:tc:SAML:2.0:assertion.Assertion'.
Microsoft.IdentityModel.Xml.XmlUtil.CheckReaderOnEntry(XmlReader reader, string element, string namespace)
SecurityTokenException: No token validator or token handler was found for the given token.
Microsoft.AspNetCore.Authentication.WsFederation.WsFederationHandler.HandleRemoteAuthenticateAsync()
AuthenticationFailureException: An error was encountered while handling the remote login.
Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler.HandleRequestAsync()`

I have worked around this issue with the following handler:
public class CustomSamlSecurityTokenHandler : SamlSecurityTokenHandler
{
    public override async Task<TokenValidationResult> ValidateTokenAsync(string token, TokenValidationParameters validationParameters)
    {

        var configuration = await validationParameters.ConfigurationManager.GetBaseConfigurationAsync(CancellationToken.None).ConfigureAwait(false);
        var issuers = new[] { configuration.Issuer };
        validationParameters.ValidIssuers = (validationParameters.ValidIssuers == null ? issuers : validationParameters.ValidIssuers.Concat(issuers));
        validationParameters.IssuerSigningKeys = (validationParameters.IssuerSigningKeys == null ? configuration.SigningKeys : validationParameters.IssuerSigningKeys.Concat(configuration.SigningKeys));

        return await base.ValidateTokenAsync(token, validationParameters);
    }
}

Nice workaround! I did not realize that the configuration read from the MetadataAddress set in the options was readily available to the token validation method, so that it could be picked up by a subclass that sets the missing values and then calls the base method.
I came up with a workaround that will be less ideal, as it does not benefit from the built-in logic for automatically retrying configuration fetching. But it is simpler in a way and may therefore be useful to anyone who wants to verify that they suffer from the same issue, before they spend time on possibly having to troubleshoot an implementation of the above workaround.
Simply set the following two parameters in the same place where options.MetadataAddress, options.WtRealm, etc, are set:
options.TokenValidationParameters.ValidIssuer = "[URL-style string found in the entityID attribute of the root element of the metadata XML]";
options.TokenValidationParameters.IssuerSigningKey = new X509SecurityKey(new X509Certificate2(Convert.FromBase64String("[Base64 string found in the KeyInfo element inside a ds:Signature element of the metadata XML]");

If there are multiple valid issuers or keys, use the ValidIssuers and IssuerSigningKeys parameters instead.
I then went on to reading the settings directly from the metadata XML instead (using new WsFederationMetadataSerializer().ReadMetadata(System.Xml.XmlReader.Create(stream))), but I would recommend trying to get @Hakon’s workaround to work, if possible. Though of course, if it is hard to find the values manually in the XML, this retrieves them in a structured format (the Issuer and SigningKeys properties) to use when experimenting.

This is the answer that I had:
`An unhandled exception occurred while processing the request. XmlReadException: IDX30011: Unable to read XML. Expecting XmlReader to be at ns.element: 'urn:oasis:names:tc:SAML:1.0:assertion.Assertion', found: 'urn:oasis:names:tc:SAML:2.0:assertion.Assertion'. Microsoft.IdentityModel.Xml.XmlUtil.CheckReaderOnEntry(XmlReader reader, string element, string namespace)
SecurityTokenException: No token validator or token handler was found for the given token. Microsoft.AspNetCore.Authentication.WsFederation.WsFederationHandler.HandleRemoteAuthenticateAsync()
AuthenticationFailureException: An error was encountered while handling the remote login. Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler.HandleRequestAsync()`

I had similar error messages until I came up with a workaround. (Or sometimes quite different error messages, depending on experimentation with various parameters and removal of token handlers.) The messages make it look like if it all has something to do with SAML 1.0 or SAML 2.0 versions of the token, but in fact, it was missing configuration data that was the problem.
But the versions were mentioned the other way around for me – “expecting …2.0…, found …1.0…” – which makes me think that perhaps your authentication token @fabiano-ferreira is in SAML 2.0 format. In that case, you should subclass the Saml2SecurityTokenHandler instead of the SamlSecurityTokenHandler used in @Hakon’s example. That would explain why his workaround does not (yet) work for you.

This is the answer that I had:
An unhandled exception occurred while processing the request. XmlReadException: IDX30011: Unable to read XML. Expecting XmlReader to be at ns.element: 'urn:oasis:names:tc:SAML:1.0:assertion.Assertion', found: 'urn:oasis:names:tc:SAML:2.0:assertion.Assertion'. Microsoft.IdentityModel.Xml.XmlUtil.CheckReaderOnEntry(XmlReader reader, string element, string namespace) SecurityTokenException: No token validator or token handler was found for the given token. Microsoft.AspNetCore.Authentication.WsFederation.WsFederationHandler.HandleRemoteAuthenticateAsync() AuthenticationFailureException: An error was encountered while handling the remote login. Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler.HandleRequestAsync()

I had similar error messages until I came up with a workaround. (Or sometimes quite different error messages, depending on experimentation with various parameters and removal of token handlers.) The messages make it look like if it all has something to do with SAML 1.0 or SAML 2.0 versions of the token, but in fact, it was missing configuration data that was the problem.
But the versions were mentioned the other way around for me – “expecting …2.0…, found …1.0…” – which makes me think that perhaps your authentication token @fabiano-ferreira is in SAML 2.0 format. In that case, you should subclass the Saml2SecurityTokenHandler instead of the SamlSecurityTokenHandler used in @Hakon’s example. That would explain why his workaround does not (yet) work for you.

Thank you @Hakon and @OttoG !!
After the problem was really the SAML version. Now after changing to this code, it works for me:
`public class CustomSaml2SecurityTokenHandler : Saml2SecurityTokenHandler
{
public override async Task ValidateTokenAsync(string token, TokenValidationParameters validationParameters)
{
    var configuration = await validationParameters.ConfigurationManager.GetBaseConfigurationAsync(CancellationToken.None).ConfigureAwait(false);
    var issuers = new[] { configuration.Issuer };
    validationParameters.ValidIssuers = (validationParameters.ValidIssuers == null ? issuers : validationParameters.ValidIssuers.Concat(issuers));
    validationParameters.IssuerSigningKeys = (validationParameters.IssuerSigningKeys == null ? configuration.SigningKeys : validationParameters.IssuerSigningKeys.Concat(configuration.SigningKeys));

    return await base.ValidateTokenAsync(token, validationParameters);
}

}`

@Hakon @OttoG @MichaelBuehler @fabiano-ferreira @RamonPage This is clearly a test hole that needs to be plugged.
The workaround suggested by @OttoG is similar to what asp.net did internally prior to net8.
It is important to clone TokenValidationParameters before calling base.ValidateTokenAsync since TokenValidationParameters can persist between http requests.

Thank you @brentschmaltz for the warning. This could easily be very important in some scenarios.
However, we have a setup where we only ever expect to get one single configuration in a given environment, there is already a condition in place in our code to avoid changing the parameters if the valid issuer and issuer signing keys are already set (see below, to avoid calling ValidateTokenAsync after the problem has been fixed in .NET), and the assignments are of reference types and are thus atomic. The fact that the changed parameters can persist then effectively becomes a small optimization.
Of course, if the TokenValidationParameters objects persist for very long times, it could become a problem if the metadata sent by the authentication server eventually changes. But that, too, is unlikely to happen in our case.
I mention this in case anyone fears that they have deployed workarounds that may cause security bugs but actually has environments similar to ours.
public class FixedSamlSecurityTokenHandler : SamlSecurityTokenHandler
{
    public override async Task<TokenValidationResult> ValidateTokenAsync(string token, TokenValidationParameters parameters)
    {
        if ((string.IsNullOrEmpty(parameters.ValidIssuer) && parameters.ValidIssuers?.Any() != true) || parameters.IssuerSigningKeys?.Any() != true)
        {
            var configuration = await parameters.ConfigurationManager.GetBaseConfigurationAsync(CancellationToken.None);
            parameters.ValidIssuer = configuration.Issuer;
            parameters.IssuerSigningKeys = configuration.SigningKeys;
        }
        return await base.ValidateTokenAsync(token, parameters);
    }
}

I was upgrading an old project to .Net 8 and a similar error message was returned during a login sequence.
After comparing nuget references with a similar project that used .Net7, I downgraded Microsoft.AspNetCore.Authentication.WsFederation to latest 7.0.x version in my .Net 8 project and got the login to work again.
How can I troubleshoot what is going on in the 8.0.x version of Microsoft.AspNetCore.Authentication.WsFederation when the error occurs?

@OttoG We coordinated with to help with stale credentials, where we throw the exception SecurityTokenSignatureKeyNotFoundException, which occurs when the token being validated has a keyid, but does not match any of the keys available.

Confirming that CustomSamlSecurityTokenHandler  is working wonderfully.  Thanks a TON!

What is the new feature here? This is clearly a regression as code that previously worked before does not work now.

@Hakon The fix for this has been included in the 7.4.1 release

@westin-m Microsoft.AspNetCore.Authentication.WsFederation has not been updated to reference 7.4.1. The latest version 8.0.4 still references to 7.1.2. Do you know if there is any plan to get that updated ? Thanks

@pcibraro I do not know if such plans exist. Please bring your question to the aspnetcore repo where I think they will be able to answer your question.

I was upgrading an old project to .Net 8 and a similar error message was returned during a login sequence. After comparing nuget references with a similar project that used .Net7, I downgraded Microsoft.AspNetCore.Authentication.WsFederation to latest 7.0.x version in my .Net 8 project and got the login to work again.

I've implemented this workaround, such as it is, from @Magnus-K-work, and it's worked for me. I can't say I've completely understood why this issue has cropped up as a result of me migrating a web app project from .NET 7 to .NET 8 (hosted on our servers, nothing to do with Azure, though we do use ADFS for authentication), but I'm hoping that at some point in the future the WSFederation pacakge might be updated to allow us to use the 8.x.x version without the need for a custom token handler.

It still doesn't work without the CustomSamlSecurityTokenHandler workaround, at AspNetCore.Authentication.WsFederation v8.0.8.
I was updating Identity server and .Net versions, it was tricky to find what is happening.


Fix some formatting on buttons

What is the context of this PR?

Fixed icon for the DS search button (view on mobile)
Stopped icons wrapping in buttons.

Fixes: #1665
How to review
Check the above

Percy?


[Windows] Change Alibaba Cloud CLI installation to direct download

Description
Alibaba-cli chocolatey package is outdated, it was updated in 2019 last time
https://chocolatey.org/packages/aliyun-cli
Switch to download the latest release from GitHub since the installation is pretty simple — the archive contains only 1 exe file.
Related issue:
https://github.com/actions/virtual-environments/issues/1350
Check list

[x] Related issue / work item is attached
[x] Tests are written (if applicable)
[x] Documentation is updated (if applicable)
[ ] Changes are tested and related VM images are successfully generated

/azp run windows2016, windows2019

/azp run windows2016, windows2019


Eliminate the non-null comparison for the attributes.type char array as it always return true.

Per discussions with @jspahrsummers
Making a pull-req here, since the non-null comparison doesn't live upstream in libextobjc. If we just pull in this req (or the other one that also updates Quick and Nimble if you prefer), everything should be all squared away -- no more build errors on Xcode 6.3+.

Thank you! 🌟

sweet, thanks!


Subdirs of auctex are missing and hence not byte-compiled

Steps to reproduce the problem in vanilla Emacs:

add bootstrap code of straight to init file.
install auctex by calling straight-use-package. (make sure auctex is from straight's mirror)
list files in straight/repos/auctex and straight/build/auctex.
 It causes auctex to not be able to load the style files, because they are located in the style subdir.
My current workaround is to set TeX-data-directory to repos/auctex, so auctex could find the style files, although they are not byte-compiled.

Thanks for reporting. I can confirm the problem. I'll look into it.

Alright cool, the problem should be fixed now -- let me know if not. Thanks again for your contribution.

Confirmed. Thanks!


(3) Implement collinearity imageToGround and groundToImage

Let's compare collinearity to current implementation
Then figure out where this goes.
Port from python notebook to c++

In an iPython notebook now.  Sweet!


KSERVE_ENABLE_SELF_SIGNED_CA does not work for "make deploy"

/kind bug
What steps did you take and what happened:
Calling "make deploy" with KSERVE_ENABLE_SELF_SIGNED_CA=true, and no cert-manager installed, yields:
# Remove the certmanager certificate if KSERVE_ENABLE_SELF_SIGNED_CA is not false
cd config/default && if [ true != false ]; then \
	/Users/roland/Development/rhods/kserve/bin/kustomize edit remove resource certmanager/certificate.yaml; \
	else /Users/roland/Development/rhods/kserve/bin/kustomize edit add resource certmanager/certificate.yaml; fi;
/Users/roland/Development/rhods/kserve/bin/kustomize build config/default | kubectl apply -f -
...
Error from server (NotFound): error when creating "STDIN": the server could not find the requested resource (post certificates.cert-manager.io)
Error from server (NotFound): error when creating "STDIN": the server could not find the requested resource (post issuers.cert-manager.io)
make: *** [deploy] Error 1

What did you expect to happen:
I would expect that make deploy runs through without error
Observations:

certmanager/certificate.yaml does not exist in config/default/kustomization.yml (but ../certmanager, so the kustomize delete/add command does not work
config/default/kustomization.yaml references Certificate resources directly, those are not available if no cert-manager is installed. So updating the resource path in kustomization.yml to ../certmanager doesn't help.
It seems to work though if cert-manager is installed and its CRDs are available.

Environment:

Latest KServe master branch
No cert-manager installed.

/assign


chore: update deps

:tada: This PR is included in version 1.0.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Upgrade cyclonedx maven plugin to 2.3.0

Upgrade cyclonedx maven plugin to 2.3.0 which no longer use jitpack

Good point. Removing that might increase our testing effort. So let's do another PR for that.


poc(scanner): get started with the blockchain scanner proof of concept

Motivation
Create a new crate zebra-scan and put proof of concept tests into it.
Close https://github.com/ZcashFoundation/zebra/issues/7727
Review
Follow Up Task

[ ] Admin: Add a branch protection rule for Build crates individually / Build zebra-scan crate

@teor2345 i think you made a very detailed review for a draft PR where most of the comments made could had been fixed before marking it as ready for review. Please remember draft PR will generally not be that ready in regards to typos, spaces, comments, etc.
Next time please save those kind of comments for when the PR is ready for review. Thank you.

@teor2345 i think you made a very detailed review for a draft PR where most of the comments made could had been fixed before marking it as ready for review. These kind of comments in this stage are very distractive. Please remember draft PRs will generally not be that ready in regards to typos, spaces, comments, unused dependencies, etc.
Next time please save those kind of comments for when the PR is ready for review. Thank you.

You're right, I could have saved some of these comments for a detailed review. That's tricky on GitHub, but I'll try to remember to do that next time.
Maybe you didn't see my comment on Slack, but I did a detailed review based on your questions at yesterday's planning meeting. You asked what decisions we needed to make at this stage of the project. The comments I marked with "Team Decision" are things that will be difficult to change once we merge this PR, or once we do the first release after the merge.

Should be merged after the release so i added the do not merge label.

I don't need to review this again, so @arya2 feel free to approve it after any minor changes.


Ability to know easily the directory where the script is located

Curretnly this is possible with the help of bash, but I find it cumbersome.
Withi thsi trick, the 1st argument is the path.  This is valid if the script has several entry points:
#!/bin/bash
  cmd=$1
  shift
	exec amm "$0" $cmd "$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)" "$@"
!#

If it has only one entry point:
#!/bin/bash
	exec amm "$0" "$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)" "$@"
!#

I like to have an Ammonite built-in to obtain this data.
I use it to locate resources relative to the current script.

Hi, you can get absolute source code path by sourcecode.File() as String. For convenience, os.Path(sourcecode.File()) will return Path class from os-lib (You don't need to declare dependency because os-lib is built in library).
And also, you can retrieve directory path via os.Path(sourcecode.File() / os.up
example
@main
def main() = {
  val p = os.Path(sourcecode.File())
  println(s"script file: $p")
  println(s"script directory: ${p / os.up}")
}

cf. #493


fix autoScale option

previous version was not the correct version, sorry for the inconvenience.
_initialize min and max with the first value of selection range
_add null values exception
New Pull Request
I'm so sorry, I forgot to push my local changes before making the previous pull request.
The previous version was just not working at all (but didn't create new bugs) I tested this version and it works totally!
Sorry again for the inconvenience
Fixes # (246)
Type of change

[x] Bug fix (non-breaking change which fixes an issue)

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] My changes generate no new warnings
[x] New and existing unit tests pass locally with my changes

I looked into the issue and I have decided to rewrite the autoScale functionality as it is causing issues in multiple axes. Will update this thread when it's done.

thanks :smiley:
I'm looking forward to seeing that :tada:


Groups titles in a catalog-generate/catalog-assemble do not persist.

Issue description / feature objectives
If I create a catalog by hand and add the title to OSCAL json/yaml title it will appear in the markdown. However, repeated loops will strip the title from the markdown and oscal. It is unclear presently where in the cycle (however most likely in catalog assemble).
Side note: If it is being pulled from the square bracketed content in the first like of the control markdown file, a comment should be inserted to explain to the user how it is working and the precedence across multiple files.
Caveats / Assumptions
Completion Criteria

@vikas-agarwal76 @deenine FYI


question about usage and pre-existing models

Hi,
I've looked at the following examples:
integricho/mutant-sample-app
charettes/django-mutant-usecase.rst
I have a lot of already defined "static models" in my models.py. Can mutant be used to extend them,  or do they have to be redefined using ModelDefinition.objects.create()?
I thought I could create a ModelDefinition for one of my pre-existing models and it would recognize that it didn't need to create any new database tables and/or content-types, and would simply allow my to add more fields to my model.
Instead I got a UNIQUE constraint error when it tried to insert a duplicate contenttype.
Am I misunderstanding the usage of this package?  Can MutableModel be used as a base class for my models instead of django.models.Model or perhaps add ModelDefinitionAttribute as a mixin?
Any help would be appreciated,
-Scott

Hi @ckot,

I have a lot of already defined "static models" in my models.py. Can mutant be used to extend them, or do they have to be redefined using ModelDefinition.objects.create()?

If you initially create your ModelDefinition objects with managed=False you should be able reuse your existing model class. You could also define your existing statically defined model classes as abstract=True and reuse them BaseDefinition.
What I'd like to expose in the future is a way to have both dynamic and static model definition living in two different project state. This way you statically reference your model definition just like any other class and also mark them a mutable (by subclassing MutableModel for example) in order to access their dynamic definition on demand using mutan's API (e.g. definition().model_class()).

Hi @charettes , thanks for your reply,

If you initially create your ModelDefinition objects with managed=False you should be able reuse your existing model class. You could also define your existing statically defined model classes as abstract=True and reuse them with BaseDefinition instances.
I just tried that, but perhaps I didn't understand.  What I did was the following:
admin.py
for field_type in FieldDefinitionBase._field_definitions.values():
    fld_name = field_type.__name__
    attrs = {'model': field_type}
    FieldDefAdmin = type('{0}Admin'.format(fld_name),
                         (admin.ModelAdmin,),
                         attrs)
    admin.site.register(field_type, FieldDefAdmin)

admin.site.register(ModelDefinition)

and then in the admin, I clicked on 'add' ModelDefinition and in the form inserted:
App label: <my apps label>
Python Model Class Name: <my static models name>
Object name: <my static models name>
Managed: unchecked
Database table: tried both <app_label_lowercase_model_name> and blank
Verbose name: tried both with a value and blank
Verbose name plural: tried with both a value and blank

and I got the same Unique Constraint error.  Were you perhaps saying that I define a model definition for one of my existing models without using the admin?
Oh, and I've always been confused about Python Model Class Name vs Object name.  Are they supposed to be different things?  If manually defining a ModelDefinition it doesn't seem you need to pass a python model class name - just object_name.
-Scott

Were you perhaps saying that I define a model definition for one of my existing models without using the admin?

Yes.

If manually defining a ModelDefinition it doesn't seem you need to pass a python model class name - just object_name.

object_name is the string used to create the class.

Sorry if I'm being particularly dense. If you can bear with me, I'll be happy to help with documentation.
Just to make things more concrete lets say I have 2 apps:
in app1.models.py I've defined a static model Experiment
in app2.models.py I've defined a static model Condition
I'd like to dynamically add what would otherwise be done statically by defining the field:
experiment = ForeignKey('Experiment',  related_name='conditions')
to my Condition model in app2.models.py

object_name is the string used to create the class.

Are you referring to the model definition class or the static Django model class?
I tried the following in manage.py shell
exp_def = ModelDefinition.objects.create(app_label='app1', object_name='Experiment', managed=False)

and get the Unique Constraint error.  I then instead tried:
exp_def = ModelDefinition.objects.create(app_label='app1', object_name='experimentdefinition', managed=False)

and I don't get an error, but I don't see how it's associated with 'Experiment'
I tried adding the model='Experiment' kwarg, but when I type vars(exp_def), I get:
{'_model_class': app1.models.experimentdefinition,
 '_state': <django.db.models.base.ModelState at 0x7fb27f033cd0>,
 'app_label': 'app1',
 'contenttype_ptr_id': 49,
 'db_table': None,
 'id': 49,
 'managed': False,
 'model': 'experimentdefinition',
 'object_name': 'experimentdefinition',
 'verbose_name': None,
 'verbose_name_plural': None}

Sorry for being such a pain, but could you provide me with the exact parameters to create a ModelDefinition for my 'Experiment' object.  I should be able to take it from there and the help would be much appreciated.

To create the mutable model definition do the following:
ModelDefinition.objects.get_or_create(
    app_label='app1',
    object_name='Experiment',
    defaults={
        'managed': False
    }
)

It should reuse the existing ContentType associated with your app1.Experiment model. The thing is this model won't have any of the fields statically defined on your model.
If you want to create a foreign key from a mutable model use mutant.contrib.related.ForeignKeyDefinition (make sure to add 'mutant.contrib.related' to your INSTALLED_APPS).

Hmm.  tried that and it still gave the UniqueConstraint error.
I then tried adding:
class Meta:
    abstract = True

to my models, blew away my db, and then it worked, but as you said, none of my statically defined fields are defined.  Also, I noticed that I had to specify db_table='app1_experiment' so it didn't name the table 'mutant_app1_experiment'
I not opposed to completely redefining my static fields as part of the model definitions, renaming my old models and doing a data migration, but it seems that methods associated with my static models are lost.  Is there a way to attach methods to  the model class associated with a model definition?

You don't have to rely to monkey patching, simply use BaseDefinition:

class AbstractExperiment(models.Model):
    statically_defined_field = models.TextField()

    class Meta:
        abstract = True

Experiment = ModelDefinition.objects.create(
    app_label='app1',
    object_name='Experiment',
    bases=[BaseDefinition(base=AbstractExperiment)],
)

That's the ticket!  Thanks so much, by using BaseDefinition, it even preserves the statically defined fields!
I still need to try this out on static models which use inheritance, but otherwise it's looking good!

Hmm, Having some trouble with models which are subclasses of abstract models. Here's what my model actually looks like:
class AutoTimeStampModel(models.Model):
    created = models.DateTimeField()
    modified = models.DateTimeField()

    def save(self, *args, **kwargs):
        """On save, update timestamps"""
        if self.id is None:
            self.created = timezone.now()
        self.modified = timezone.now()
        return super(AutoTimeStampModel, self).save(*args, **kwargs)

    class Meta(object):
        abstract = True

    class AbstractExperiment(AutoTimeStampModel):
        statically_defined_field = models.TextField()

        class Meta:
            abstract = True

if I do the following:
Experiment = ModelDefinition.objects.create(
app_label='app1',
object_name='Experiment',
bases=[Experiment = ModelDefinition.objects.create(
app_label='app1',
object_name='Experiment',
bases=[BaseDefinition(base=AbstractExperiment),
BaseDefinition(base=AbstractExperiment)],
)

Sorry most of my comments above were just myself flailing, I've figured out most of my issues since, but as I only needed to add a single field to a model from one of my reusable modules, django-swappable-models  turned out a better fit for my project.  I'm still interested in this project though, and think what I've learned through all my struggling will be useful for some documentation.  I'll revisit this once I'm done working on my project.
One question though.  I was simply playing around with defining my modeldefs in ./manage.py shell. What is the suggested way to do this in actual code.  I played around with doing this in my AppConfig's ready(), but I think I ran into problems.  I was able to do it in a migration via RunPy, but I'm not so crazy about having my models defined in a place where users would be very unlikely to look.


Wrap option values with spaces with quotes

Fixes 'Wrap option values with spaces with quotes' for all commands. Closes #1791
Linked Issue

Closes #1791

Hi @waldekmastykarz
Surprised to see documentation change has failed test case, although my PR does not have any edits to webhook functionality.

spo list webhook add
passes validation if the expirationDateTime is in the future but no more than six months from now:

We had this issue in the past and I was convinced we fixed it but maybe it's a similar issue in a different place. The problem is that the failing test makes an assumption about a date in the future and apparently we just passed that date.
You can either fix the test or ignore it and we'll fix it.

Hi @waldekmastykarz
I will try to fix the failing test.

Hi @waldekmastykarz
Fixed the failing test case. Please review. Thanks.

Merged manually. Thank you! 👍


Valgrind uninitialised value error

Added a test to check for errors reported by Valgrind and fixed reported errors..
Syscall param rt_sigaction(act->sa_mask) points to uninitialised byte(s)
Syscall param rt_sigaction(act->sa_flags) points to uninitialised byte(s)

Thank you for the fixes! I will take a closer look whenever I find the time (quite busy with looking for work atm). If everything works fine I will merge it then. Cheers! :)

Hi again. I was wondering about the second commit "Added checking of Valgrind output for errors"..
What is the test actually checking? Namely is there some anything different from the other tests?

Discarded changes to tests/memleaks.sh since they felt redundant and overlapping with other tests.
Thanks for contribution!


Path problems

when running babel src -d dist --source-maps inline --copy-files I ran into path problems for the *.glsl shader files. So I changed it to e.g. ./src/layers/scatterplot-layer/scatterplot-layer-vertex.glsl and it worked.
https://github.com/uber/deck.gl/blob/master/src/layers/core/choropleth-layer/choropleth-layer.js#L119

now works with latest commits of the last 20hours


WIP

Check the diary for a summary: https://github.com/xh3b4sd/anna/pull/6/files#diff-87435610b36e60819ca47bddc532927a

LGTM


Admonition title bar too large in 1.6.0

Since the 1.6.0 update, admonition titles appear too large. I did update the CSS by running mdbook-admonition install again. Maybe this is related to the  fields that release added in the generation?

Thanks for reporting this - are you sure that the new CSS has file has replaced your existing installation?
I ask because this is exactly what I would expect to see with the CSS from 1.5.0 still installed. If you're sure, could you post the following for me to debug further:

book.toml mdbook-admonish preprocessor section
The HTML of the rendered admonishment, such as:

Info

A beautifully styled message.

The CSS as loaded into your browser in the mdbook-admonish.css file. You can find it in your browser devtools under the Sources section:

I've highlighted the newly added CSS rule I would expect to suppress this problem, which was added here: https://github.com/tommilligan/mdbook-admonish/commit/0e235cb9b52d96476bd4bb6e23959ec1919a9b57#diff-132650f29be6ca05d18cfb5bfbf0262fdd034b0358764d0dcaf36f1763419b95R146

If you're working on an open source repo, also happy for a link to a branch or similar so I can take a look.

Ok, so I don't really get what is going on; today before I could try any of that suggestion, the issue was gone. Everything looks normal now, but I haven't changed the CSS or anything since that last screenshot (and before taking that screenshot, I try deleting my book directory, deleting the mdbook-admonish.css before mdbook-admonish install, running mdbook serve --open again to allow rebuilding everything from scratch and opening the webpage on a fresh tab…).
I guess, maybe I got bitten by Firefox's cache?
Anyway, sorry for the noise, and thanks a lot for your help!

No worries at all, glad it works now!


There is no "mark" element

I was doing some type safe comparisons to check the type of an element and realized that there is no IHtmlMarkElement.
http://www.w3schools.com/tags/tag_mark.asp

There won't be an IHtmlMarkElement as there is nothing distinct on the mark (and the W3C does state its just an IHtmlElement, see https://www.w3.org/TR/html5/text-level-semantics.html#the-mark-element). However, currently it is not part of the factory and hence will spawn a new IHtmlUnknownElement, which is wrong.
So this one will be enhanced, thanks for spotting the issue!

See PR #402.


MSPSDS-552 record case comments

Pull Request Test Coverage Report for Build 1115

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.02%) to 93.284%

Totals

Change from base Build 1101:
0.02%

Covered Lines:
2000

Relevant Lines:
2144

💛  - Coveralls


Add grafana helm charts jobs

Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: abhay-krishna
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [abhay-krishna]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: abhay-krishna
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [abhay-krishna]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@abhay-krishna: Updated the job-config configmap in namespace default at cluster default using the following files:

key grafana-helm-chart-postsubmits.yaml using file jobs/aws/eks-distro-build-tooling/grafana-helm-chart-postsubmits.yaml
key grafana-helm-chart-presubmits.yaml using file jobs/aws/eks-distro-build-tooling/grafana-helm-chart-presubmits.yaml

In response to this:

Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@abhay-krishna: Updated the job-config configmap in namespace default at cluster default using the following files:

key grafana-helm-chart-postsubmits.yaml using file jobs/aws/eks-distro-build-tooling/grafana-helm-chart-postsubmits.yaml
key grafana-helm-chart-presubmits.yaml using file jobs/aws/eks-distro-build-tooling/grafana-helm-chart-presubmits.yaml

In response to this:

Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.


CLI not creating the spec files

Bug Report or Feature Request (mark with an x)
- [X] bug report -> please search issues before submitting
- [ ] feature request

Versions.

angular-cli: 1.0.0-beta.28.3
Repro steps.

In the console, ng ng c blabla
The log given by the failure.

It's not really a failure : the component is created, but the spec files aren't.
installing component
    create src/app/blabla/blabla.component.less
    create src/app/blabla/blabla.component.html
    create src/app/blabla/blabla.component.ts
    update src/app/app.module.ts

Desired functionality.

Mention any other details that might be useful.

in the angular-cli.json file :
"spec": {
  "class": false,
  "component": true,
  "directive": true,
  "module": false,
  "pipe": true,
  "service": true
}

Please, upgrade to the latest version of the angular/cli and report if you are experiencing issues with it. Don't forget to check out the migration guide here https://github.com/angular/angular-cli/wiki/stories-1.0-update

I wanted to avoid updating it for some reason ... But I guess I have no choice. I updated it and it works great, thank you @Nikki1993


PP-5601 Remove legacy service name update mechanism

Remove support for updating service names by sending a PATCH to /{serviceExternalId} with the legacy payload:
[
  {
    "op": "replace",
    "path": "name",
    "value": "New Service Name"
  }
]

The new payload continues to be supported:
[
  {
    "op": "replace",
    "path": "service_name/en",
    "value": "New Service Name"
  }
]

Nothing uses the old payload any more.
Some tests tested updates with the old "name" path even though the particular path wasn’t important. These have been updated.

Addressed comments:

Amended first commit to move FIELD_NAME from Service to ServiceResource (no other changes)
Added another commit to rename tests in ServiceResourceUpdateTest


Bug of above 100% attack speed on sword

i spawned in alot of ancient sword affix and added to my op sword after adding all it had 150% attack speed but the attack indicator was bugged and wont work it was gray and wouldnt hit when i left click at a entity

proof

not reproducible, a sword with +162% attack speed does not cause this issue.


add sql_file option to read SQL statement from file

I have problem that SQL statement with comment like below causes an error.
This YAML is invalid because YAML parser also treat a line starting with # as comment.
So, I propose adding sql_file option to read SQL statement from file.
in:
  sql:
    SELECT *
    # this is a  SQL comment
    FROM `my_project.my_dataset.my_table`

while parsing a block mapping
 in 'string', line 2, column 3:
      sql:
      ^
expected <block end>, but found Scalar
 in 'string', line 5, column 5:
        FROM `my_project.my_dataset.my_t ...
        ^

	at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:569)
	at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:157)
	at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:147)
	at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:224)
	at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:154)
	at org.yaml.snakeyaml.composer.Composer.composeValueNode(Composer.java:246)
	at org.yaml.snakeyaml.composer.Composer.composeMappingChildren(Composer.java:237)
	at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:225)
	at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:154)
	at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
	at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
	at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:122)
	at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:505)
	at org.yaml.snakeyaml.Yaml.load(Yaml.java:424)
	at org.embulk.config.ConfigLoader.fromYamlString(ConfigLoader.java:58)
	at org.embulk.EmbulkRunner.readConfig(EmbulkRunner.java:359)
	at org.embulk.EmbulkRunner.run(EmbulkRunner.java:150)
	at org.embulk.cli.EmbulkRun.runSubcommand(EmbulkRun.java:436)
	at org.embulk.cli.EmbulkRun.run(EmbulkRun.java:91)
	at org.embulk.cli.Main.main(Main.java:26)

Error: while parsing a block mapping
 in 'string', line 2, column 3:
      sql:
      ^
expected <block end>, but found Scalar
 in 'string', line 5, column 5:
        FROM `my_project.my_dataset.my_t ...
        ^

I felt that it is better to support erb if the file extension is ended with .erb like .sql.erb.
But, it can be done with another PR.

YAML supports Folded Sysle, it can include comment.
https://yaml.org/spec/1.2/spec.html#id2796251
example)
in:
  type: bigquery
  keyfile: ...
  project: ...
  sql: >
    SELECT
      # COMMENT
      CURRENT_TIMESTAMP() # COMMENT
    , "test_string" AS string_f
out: {type: stdout}
 ...

output)
embulk run bq2stdout.yml
2019-03-18 13:51:46.161 +0900: Embulk v0.9.7
...
2019-03-18 13:51:58.094 +0900 [INFO] (0001:transaction): determined columns: [{"name"=>"f0_", "type"=>:timestamp}, {"name"=>"string_f", "type"=>:string}]

...

2019-03-18 04:51:56.029676 +0000,test_string

no reply, let me close


fix(cdk/tree): fix issue where isExpanded wouldn't be set if placed before isExpandable

Is this fix only applicable to version 19? Why not include it in version 18.2?

I've sent https://github.com/angular/components/pull/29647 to port it to the patch branch.


Apply backend agnostic ACIR optimization passes separately to backend-specific passes

Problem
In https://github.com/noir-lang/acvm/pull/88, we made the distinction between optimizers (which are generic between backends) and transformers (which use knowledge about the desired proving backend to make the ACIR compatible with it.
Despite this we currently have a single monolithic compile function inside the ACVM which applies both optimizations and transformations.
Happy Case
We should expose optimize and transform (this could be named better) functions to separate these two functions. We could then make use of optimize as a final pass within the Noir compiler so that our outputted ACIR represents the most optimized generic ACIR possible.
This means that our backend step is purely a matter of making the ACIR compatible with the backend rather than a mix of two concepts.
Alternatives Considered
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response

Can this be closed?

Yep this was closed by #2979


Idle server

This PR is for issue #126. It will pause a server when no human players are connected. While paused, the server will still:

Listen for players joining and resume game play.
Make the required Steam callbacks at 10 Hz (this can be increased by decreasing the value used in the Sleep I added). Frequency increases to normal (60 Hz?) when no longer idle.
Update the ban lists so that bans still expire while the server is paused.

Paused means that bots don't move, round timers don't run, scripts don't run, and stats aren't updated.
This behaviour is governed by a new CVar called sv_pauseonidle which defaults to true. When set to false, the server will keep running as before. This can be useful for funky scripts or doing stuff with bots.
I tested recording as well which seems to work as expected.
I think I caught everything, but obviously, I need a second look at this! Also, let me know if you'd still want the OnIdle event for scripts. I'm kind of assuming that setting sv_pauseonidle to false would take care of scripts wanting to keep running, but I might be missing edge cases here.

The Steam callbacks were being called a lot more than once per frame when not idling so I fixed that. And I do still think the OnIdle event is a good idea. Turning off idle functionality, and calling a scripting event when idling are just two different things, and I think they are both useful in some niche circumstances. Maybe it will be useful to run the game with just bots for testing, and maybe a script will want to send heartbeats to some external service while idling. Just hypothetical use-cases, but sound ones I would say. And idling would be the only major server state which scripts have no access to, so it feels better for them to have the option of responding to it. The performance impacts of this should be totally negligible if no scripts have an OnIdle event assigned.
With those changes, this LGTM. Great work.

Oh, I see what you mean with OnIdle now. It's the idle version of OnClockTick. Earlier, I was thinking you meant to call OnIdle as a single signal to the script to indicate that the server had gone to idle mode. This makes perfect sense now!
Anyway, thanks for accepting, this will save me a fair number of CPU cycles.


As a waiter I can delete reservation for tables

...so that I can update the reservation of tables if customers cancel their reservation.

v2.0


Runtime Error: Experiencing issue fetching ISD temperature data

Describe the bug
Calls to methods to pull ISD temperature data raise an exception:
RuntimeError: Could not connect to ftp.ncdc.noaa.gov
To Reproduce
Steps to reproduce the behavior:

call .load_isd_hourly_temp_data() on a station
Exception encountered:

        host = "ftp.ncdc.noaa.gov"
        for i in range(n_tries):
            # attempt anonymous connection
            try:
                ftp = ftplib.FTP(host, timeout=timeout)
                ftp.login()  # default u='anonymous' p='anonymous@'
                logger.info("Connected to {}.".format(host))
                return ftp
            except ftplib.all_errors as e:
                logger.warn(
                    "Failed attempt ({} of {}) to connect to {}:\n{}".format(
                        i + 1, n_tries, host, e
                    )
                )

>       raise RuntimeError("Could not connect to {}.".format(host))
E       RuntimeError: Could not connect to ftp.ncdc.noaa.gov.

../../envs/ohm/lib/python2.7/site-packages/eeweather/connections.py:50: RuntimeError
----------------------------------- Captured stderr call -----------------------------------
2019-11-25 16:01:29,508 WARNING: Failed attempt (1 of 5) to connect to ftp.ncdc.noaa.gov:
530-Unable to set anonymous privileges.
530 Login incorrect.
2019-11-25 16:01:30,036 WARNING: Failed attempt (2 of 5) to connect to ftp.ncdc.noaa.gov:
530-Unable to set anonymous privileges.
530 Login incorrect.
2019-11-25 16:01:30,600 WARNING: Failed attempt (3 of 5) to connect to ftp.ncdc.noaa.gov:
530-Unable to set anonymous privileges.
530 Login incorrect.
2019-11-25 16:01:31,107 WARNING: Failed attempt (4 of 5) to connect to ftp.ncdc.noaa.gov:
530-Unable to set anonymous privileges.
530 Login incorrect.
2019-11-25 16:01:31,511 WARNING: Failed attempt (5 of 5) to connect to ftp.ncdc.noaa.gov:
530-Unable to set anonymous privileges.
530 Login incorrect.```

**Expected behavior**
Normally returns data from NOAA or returns an expected error code

Thanks for the heads up! It appears that NOAA's FTP is down for this week. I found the following alert when going to https://www.ncdc.noaa.gov/isd/data-access
Please note: Due to scheduled maintenance, many NCEI systems will be unavailable during the week of 11/25/2019 - 11/29/2019.

Internally we use Mesonet data to address short term delays in ISD data. We fetch Mesonet data for the most recent 14 days and then overwrite these earlier [temporary & low quality] values with ISD data when it becomes available.  Just fyi.

Since NOAA's data access is restored, I'm going to go ahead and close this issue. Any other suggestions or pull requests like @steevschmidt 's for how to handle this situation more gracefully would still be appreciated.
@TechMaz: If you have a minute, would you mind filling our our new first-time issue contributor survey? The info we get from this will help us to grow to meet the needs of our community of users. https://forms.gle/H5jptzS5rL3hDcNJA Thanks!


Issue 12 - Ensure we can serialize management model objects

@anthonydahanne, @rkavanap : here is a pull request with a unit test. I am using FST (http://ruedigermoeller.github.io/fast-serialization/). It is pretty fast and works fine.

will see later


What's wrong with this pdf to text conversion?

I've been using the pdf2txt tool to convert many PDFs in English and Chinese to TXT format.  A bunch of files are not working as expected:
Here is the PDF file to be converted: 0.pdf
Here is the resulting TXT file:  0.txt
I would be super grateful if someone could tell me what is wrong or point me in the direction towards a fix.

if it helps here is info about the fonts in the pdf
name                                 type              emb sub uni prob object ID

ALPMFJ+Times-Roman                   Type 1C           yes yes yes         243  0
ALPMJK+Times-Italic                  Type 1C           yes yes yes         246  0
MHei-Bold-ETen-B5-H-Identity-H       CID Type 0C       yes no  no          249  0
MSung-Light-ETen-B5-H-Identity-H     CID Type 0C       yes no  no          252  0
Microsoft JhengHei,Bold-ETen-B5-H-Identity-H CID Type 0C       yes no  no   X      857  0
Microsoft JhengHei-ETen-B5-H-Identity-H CID Type 0C       yes no  no   X      852  0
AMACHH+TimesNewRomanPSMT             Type 1C           yes yes no          866  0
AMACNG+ArialMT                       Type 1C           yes yes no          861  0
AMADCF+TimesNewRomanPS-BoldMT        Type 1C           yes yes no          859  0
PMingLiU-ETen-B5-H-Identity-H        CID Type 0C       yes no  no   X      865  0
AMADJE+TimesNewRomanPS-ItalicMT      Type 1C           yes yes no          868  0
MS Mincho-KSCms-UHC-H-Identity-H     CID Type 0C       yes no  no   X      869  0
AMCGMO+Calibri,Italic                Type 1C           yes yes yes         872  0
AMCPNE+Calibri,Bold                  Type 1C           yes yes yes         873  0
Microsoft YaHei,Bold-GBK-EUC-H-Identity-H CID Type 0C       yes no  no   X      876  0
Microsoft YaHei-GBK-EUC-H-Identity-H CID Type 0C       yes no  no   X      877  0
AMDONF+Calibri                       Type 1C           yes yes yes         878  0
AMDPFD+Symbol                        Type 1C           yes yes no   X      879  0
AMEAHN+Arial                         Type 1C           yes yes yes         882  0
SimSun-GBK-EUC-H-Identity-H          CID Type 0C       yes no  no   X      887  0
AMECKA+Wingdings                     Type 1C           yes yes no          888  0
MingLiU-ETen-B5-H-Identity-H         CID Type 0C       yes no  no   X      892  0


Rosella recover flight status error

Hi, I am running into an error when running rosella recover with several metagenomes. The error is not consistent between samples, e.g. I cannot predict when the error will occur, however it does happen consistently on the samples with which it occurs. The error statement is:
Error when running flight process. Exitstatus was : ExitStatus(unix_wait_status(256)) thread 'main' panicked at 'Failed to grab stderr from failed flight process', /home/conda/.cargo/registry/src/github.com-1ecc6299db9ec823/bird_tool_utils-0.3.0/src/command.rs:17:14
The original command was:
rosella recover -i S04_1a9817_spa_t_mtb_cov.txt -r S04_1a9817_spa_t_contigs.fa
I can provide the original files if needed, the coverage file was generated by use of coverm contig in metabat mode.

Hmm, yeah that error is not very informative. Would you please provide the reference file and coverage file? I'll see if I can get to the bottom of it
Rhys

Files are attached, thanks!
S04_1a9817_spa_t_mtb_cov.txt
S04_1a9817_spa_t_contigs.fa.zip

Hi!
So i've looked through your files and tried running Rosella on them. You are right that rosella does error out, but I believe it is not due to a problem on rosella's end.
The assembly you are trying to bin is not very good, here are the stats from bbmap for it:
A	C	G	T	N	IUPAC	Other	GC	GC_stdev
0.2519	0.2479	0.2451	0.2551	0.0000	0.0000	0.0000	0.4930	0.0964

Main genome scaffold total:         	1828
Main genome contig total:           	1828
Main genome scaffold sequence total:	2.745 MB
Main genome contig sequence total:  	2.745 MB  	0.000% gap
Main genome scaffold N/L50:         	663/1.435 KB
Main genome contig N/L50:           	663/1.435 KB
Main genome scaffold N/L90:         	1562/1.067 KB
Main genome contig N/L90:           	1562/1.067 KB
Max scaffold length:                	15.637 KB
Max contig length:                  	15.637 KB
Number of scaffolds > 50 KB:        	0
% main genome in scaffolds > 50 KB: 	0.00%

Minimum 	Number        	Number        	Total         	Total         	Scaffold
Scaffold	of            	of            	Scaffold      	Contig        	Contig
Length  	Scaffolds     	Contigs       	Length        	Length        	Coverage
--------	--------------	--------------	--------------	--------------	--------
    All 	         1,828	         1,828	     2,745,043	     2,745,043	 100.00%
    500 	         1,828	         1,828	     2,745,043	     2,745,043	 100.00%
   1 KB 	         1,828	         1,828	     2,745,043	     2,745,043	 100.00%
 2.5 KB 	            99	            99	       375,466	       375,466	 100.00%
   5 KB 	            15	            15	       115,390	       115,390	 100.00%
  10 KB 	             3	             3	        38,314	        38,314	 100.00%

As you can see, most of the contigs fall below the default minimum contig size that rosella uses (--min-contig-size 1500). The size of the assembly above contigs > 1Kbp is less  500Kbp. That's not really a whole lot of information for rosella, or any binning algorithm, to work with. I doubt you will easily get anything informative out of this assembly without some level of manual inspection.
I think I will go ahead and close this issue now. Hopefully you have found my response helpful, and you can find something useful in your assembly.
Cheers,
Rhys

Hello Rhys,
I had the same issue and most likely due to the same problem with short contigs. My contigs are assembled from metatranscriptome data, so that's what they are. I had the impression that GroopM was able to process contigs as short as 500bp and then moved on to rosella. Do you see any chance rosella could work with contigs shorter than 1500 bp? Even just to try it out or by only using read coverage...
Thanks again for building rosella and the great support!

You can certainly try it out, you just have to set --min-contig-size to the desired value and see how you go. If it returns and error again, then let me know. Thanks for trying it out :)

This was certainly helpful, thanks!

Hi, I have tried a few things, contig size and bin size were lowered. Unfortunately, after successfully completing the "Contigs kmers analyzed" part it crashes:
[00:07:56] ⠋ Calculating UMAP embeddings and clustering...    3/6
[2022-11-24T22:17:10Z ERROR bird_tool_utils::command] Error when running flight process. Exitstatus was : ExitStatus(unix_wait_status(256))
thread 'main' panicked at 'Failed to grab stderr from failed flight process', /home/conda/.cargo/registry/src/github.com-1ecc6299db9ec823/bird_tool_utils-0.3.0/src/command.rs:17:14
Not sure what that could mean...

Would you please be able to post the output of conda list for your rosella conda environment?


Update Time of Test Possible Answers

As a patient, I want it to be clear that I can opt out of answering certain sensitive questions. As a SimpleReport user, I want to make sure I am presenting all of the appropriate response options per HHS guidance.
Time of test questions should have the changes below based on the National Flat File spec possible answers:

[ ] ethnicity should have unknown and refuse to answer
[ ] Gender should have unknown and ambiguous
[ ]  pregnancy should have a "possible pregnancy" option
[ ] First test should have unknown option
[ ] Employed in healthcare should have an unknown option

Needs a review of the allowed values and which ones should be added.

Here are some mocks for discussion @aliciabeckett-gov. Note these are from the first time patient survey -- only because the fields are more consolidated and easier to review. The fields and response options for SimpleReport will mirror these.
Note that for the drop-downs (Type of Prior Test, Result of Prior Test, and Kind of Healthcare Professional), there should be a response option titled "Unknown".

Hot off the press- last test and pregnancy are optional questions!

I saw that on Slack and the design ask in issue #231. I'll work on that today and update in the other ticket.

Note: This is dependent on issue #231. The decision made based on that issue will inform this one. We will hold tight for now.


feat: support Firebase Local Emulator

Is your feature request related to a problem? Please describe:

Firebase Local Emulator is not currently supported.
Describe the solution you'd like:

iOS
#if DEBUG
     Auth.auth().useEmulator(withHost:config.devIP, port:9099)
#endif

Android
String devIP = this.config.getDevIP();

if(BuildConfig.DEBUG) {
     FirebaseAuth.getInstance().useEmulator(devIP, 9099);
}

Hi @tlebeitsuk,
Thank you for your request! I will have a look at it!

Hi @tlebeitsuk,
You can try it out if you want (dev build):
npm i<EMAIL_ADDRESS>
Docs: https://github.com/robingenz/capacitor-firebase/blob/62d5d5ff067cebf175786dafbc082d3931366668/packages/authentication/README.md#useemulator


Add install procedure

curl -o /usr/local/bin/up https://raw.githubusercontent.com/shannonmoeller/up/master/up.sh && chmod+x /usr/local/bin/up

Thanks for the sample install snippet! Because of the completion stuff, this file should be sourceed, not executed directly. I'm looking into best practices for shipping this sort of thing.

Added to develop branch.


5.6.0

use much simpler patch for install_name (submitted upstream as https://github.com/DrTimothyAldenDavis/SuiteSparse/pull/7)
simpler strategy to skip externally packaged graphblas, mongoose that doesn't involve patches (clobber with no-op makefile)

closes #57

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


Add S3 Bucket ACL Allows Read Or Write to AllUsers query for CloudFormation

Platform
CloudFormation
Description
S3 Bucket ACL should not allow read or write operations to 'AllUsers' grantee

Waiting for AWS account to confirm if PublicAccessBlockConfiguration needs to be considered
@nunoocx @ruigomescx