fix: Organization name can be empty

Description
From the general settings page, if you try to update the organization name, it can be left empty.

This PR fixes that on the backend and throws an invalid parameter exception.
Fixes #12301
Type of change

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

How Has This Been Tested?

Tested on local app

Verified the added test case for this.

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes

@trishaanand I think we should add a frontend validation as well for this.

/ok-to-test sha=ccc25f3


Fix activity without "from"

Will fix #1397.

Changes

Patch activity.from.role

"user" if from.id is user ID, otherwise,
"bot" if from.id is anything otherwise,
"channel", because either from or from.id was not defined (e.g. in ConversationUpdate activity)

Should not set suggested actions if there are nothing on the transcript

Pull Request Test Coverage Report for Build 505

4 of 6 (66.67%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.08%) to 46.598%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

packages/core/src/sagas/incomingActivitySaga.js
4
6
66.67%

Totals

Change from base Build 483:
0.08%

Covered Lines:
713

Relevant Lines:
1370

💛  - Coveralls

@compulim @corinagum is this supposed to work in the embedded WebChat in the Azure Portal?
(at https://webchat.botframework.com/embed/?s=)

Also using the following HTML taken from the Full bundle sample the role property is not set in from for bot messages:
<!DOCTYPE html>

This works correctly in the Bot Emulator though.

Tracking in #1886.


Collect Deployment ID (NGF)

As a maintainer of NGF
I want to collect a deployment identifier from all participating NGF installations
So that I can correlate telemetry data with every unique installation of NGF even if they exist on the same cluster.
Acceptance

The deployment identifier does not contain any characters or information that can reveal the identity of the installer.
The deployment identifier is highly likely to be unique across all Kubernetes deployments.

The deployment identifier is highly likely to be unique across all Kubernetes deployments.

This refers to the same cluster right? Meaning, the deployment identifier is likely to be unique across all other deployments in the same cluster? In addition, we only really care about other NGF deployments in the same cluster right?
Was just thinking of an approach to this issue: does getting the name of the deployment and running it through a hash function work?

I would say we want the deployment id to be unique across all Kubernetes deployments, as stated, because when we want to look at stats for unique deployments vs clusters, we won't be able to do that easily if deployments aren't unique across clusters.

I would say we want the deployment id to be unique across all Kubernetes deployments, as stated, because when we want to look at stats for unique deployments vs clusters, we won't be able to do that easily if deployments aren't unique across clusters.

because the cluster ID is unique, even if the deployment ID is not unique among clusters, the combination of cluster ID with deployment ID will be unique though


Set autoshutdown time to never

Hi i noticed via the app you can set auto shutdown to never, i did some testing and did confirm that 45 min does not exist on my b1 model and that 45 min has been replaced with 1 hour and that 1 hour is never

correct enum should be

export enum AutoShutdownTime {
  Shutdown15min = 1,
  Shutdown30min = 2,
  Shutdown60min = 3,
  ShutdownNever = 4,
}

atleast for my printer

Maybe you could create 2 enum variants and accept both in the function?

Well, I've renamed the values to a generic format and added comments. I haven't found a way to figure out how to associate the auto shutdown values with the printer.
https://github.com/MultiMote/niimbluelib/blob/85143808491dd77ad76e0d397062db46815551cb/src/packets/index.ts#L126-L135


Next production release

Reminders for devs
Database
The database will need special consideration. We should bring the app down, make sure we have a backup, and then take our time to set up the new database.

[ ] New DB name
[ ] New user name
[ ] Now deployed from image instead of build

VMs

[x] Create staging & "blue" VM with new name
[x] Create staging & "blue" database VM with new name

[ ] Remove old staging VM

[x] Release Garrison v0.17.0 with final renames

[x] Test integration & QA deployments

Secrets

[x] Add new Benefit Tool secrets
[ ] Clean up old VTA secrets
[ ] Clean up old VTA VMs (app and database)

Instructions for NSIDC SA's

Update Apache proxy to new VM name usaon-benefit-tool

[x] Test in integration & QA
[x] Release to prod

Instructions for NSIDC ops

[x] Blue/green swap new VMs (depends on SA's completing proxy rule)
[x] Destroy old VM
[x] Update Garrison -> v0.17.0
[ ] Update Jenkins application name from usaon-vta-survey -> usaon-benefit-tool

[ ] Garrison deploy usaon-benefit-tool newest release vX.Y.Z

This is in prod, we just need to validate that all the cleanup tasks are complete.


TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/31171

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/31377

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/31379

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/31828

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/32215

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/32322

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/33755

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/66200

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.


FAMD row_contributions

I was trying use row_contributions on FAMD to recover the contributions of each individual column on the principal components, but it throws me an error. Wasn't sure if it is because it hasn't been built?

Hey! Can you share some code?

I sadly don't have the time to make a minimum reproducible example here, but I figured I'd at least note that I also am having the above issue and would flesh it out a bit with some details. The error I get is this:
KeyError: "None of [Index(['outlet_id', 'rain_drizzle', 'prod_txt'], dtype='object')] are in the [columns]"
Of note, those three columns are the only categorical variables in my code; apparently trying to pass them to row_contributions fails. A bit more detail about the example I'm using. The chunk of code that throws this error is here (note the commented conversion of the three categorical columns to strings; I tried that too but it didn't fix this):
`#!pip3 install prince
import prince
df=df.dropna()
y=df['total_quantity_sold']
headers_for_x = ['rain_drizzle','prod_txt','mean_temperature','min_temp','max_temp','precipitation','outlet_id','FRIDAY','SATURDAY','SUNDAY','isHolidayFlag','percent_ann_price','visibility','snow_depth',
'DayOfTheWeek','sold_last_year','sold_this_weekday_last_year','sold_yesterday']
X=df[headers_for_x]
string_cols = ['rain_drizzle','prod_txt','outlet_id']
#X[string_cols]=X[string_cols].astype(str)
#famd = prince.FAMD() #Factor analysis of mixed data - PCA for categorical and non-categorical data
famd = prince.FAMD(
n_components=X.shape[1],
n_iter=10,
copy=True,
check_input=True,
engine='auto',       ## Can be "auto", 'sklearn', 'fbpca'
random_state=42)
famd=famd.fit(X)
#famd.explained_inertia_
print(famd.row_contributions(X))`
Also, a printout of the dtypes of the X dataframe:
 rain_drizzle                    object prod_txt                        object mean_temperature               float64 min_temp                       float64 max_temp                       float64 precipitation                  float64 outlet_id                       object FRIDAY                           int64 SATURDAY                         int64 SUNDAY                           int64 isHolidayFlag                    int64 percent_ann_price              float64 visibility                     float64 snow_depth                     float64 DayOfTheWeek                     int64 sold_last_year                   int64 sold_this_weekday_last_year      int64 sold_yesterday                   int64 dtype: object
Know that's not a lot more helpful than the above, but hopefully better than a complete lack of an error message like the original report had.

Another quick followup on this. After a glance at the code it appears the famd basically splits the dataframe and performs a pca and an mca for numeric and categorical variables respectively. And looking at mca (and ca, which it calls) I don't immediately see a row_contributions property (at least not in the readme documentation). So I'm wondering if in fact this property just isn't available for famd? Or if so, if the function call in famd should be applied only to the numeric/pca portion of the dataset.

Hello there 👋
I apologise for not answering earlier. I was not maintaining Prince anymore. However, I have just refactored the entire codebase. This refactoring should have fixed many bugs.
I don’t have time and energy to check if this fixes your issue, but there is a good chance it does. Feel free to reopen this issue if the problem persists after installing the new version — that is, version 0.8.0 and onwards.


Some scenarios (UI Tests) need not run in all versions of Python

Codecov Report

Merging #7668 into master will decrease coverage by 0.38%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #7668      +/-   ##
==========================================
- Coverage   58.68%   58.29%   -0.39%
==========================================
  Files         493      493
  Lines       21997    21997
  Branches     3533     3528       -5
==========================================
- Hits        12909    12824      -85
- Misses       8279     8355      +76
- Partials      809      818       +9

Impacted Files
Coverage Δ

src/client/testing/serviceRegistry.ts
48.64% <0%> (-46.85%)
:arrow_down:

src/client/testing/codeLenses/main.ts
44.44% <0%> (-33.34%)
:arrow_down:

...t/datascience/jupyter/jupyterDataRateLimitError.ts
66.66% <0%> (-33.34%)
:arrow_down:

src/client/formatters/serviceRegistry.ts
75% <0%> (-25%)
:arrow_down:

src/client/common/utils/platform.ts
64.7% <0%> (-23.53%)
:arrow_down:

src/client/common/utils/icons.ts
83.33% <0%> (-16.67%)
:arrow_down:

src/client/api.ts
78.57% <0%> (-14.29%)
:arrow_down:

src/client/datascience/cellFactory.ts
75.86% <0%> (-13.8%)
:arrow_down:

src/client/providers/providerUtilities.ts
83.33% <0%> (-5.56%)
:arrow_down:

src/client/common/platform/pathUtils.ts
66.66% <0%> (-5.56%)
:arrow_down:

... and 8 more

Continue to review full report at Codecov.

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


VSX-521 Power On doesn't work

Hi,
I am using Homey update 1.2 RC9 and I am an owner of the Pioneer VSX-521. Volume up/down and turning off works like a charm. But turning the device ON isn't working..
Any ideas?
Kind regards,
Dennis

Hi,
i've got the same problem: Turning on mij VSX-921 isn't working.
The other commands works.
I hope that you can find the problem.
Kind regards,
Niek

Hi Niek,

Hi DENNtoet,
I just figured out how to power on de VSX-921 remotely:
For me this did the trick:

Turn on the tv and set it on the right HDMI source of the receiver (make sure youre Pioneer is connected with the internet)
Download and install de iControlAV5 app on your mobile
Open the app
Go to the "cursor" page
Press "Audio parameter" (Now you get the advanced MCACC menu on your TV)
Select "System settings" (or something. I translate is from Dutch)
Select "Network settings"
Select "Network standby"en switch is to "ON"

Hope this will als work for you!
Kind regards,
Niek

Yep works!


description is necessary for "view on github button"

description is need for "view on github button"
You can add this:
github:
is_project_page: ["true" or "false" to indicate whether to add "view on github button]

It was solved: https://github.com/pages-themes/slate/pull/57


[Port] langpack source update for November release (PROPER)

Fixes https://github.com/microsoft/azuredatastudio/issues/24835, Port of https://github.com/microsoft/azuredatastudio/pull/24823 from main.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

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

Totals

Change from base Build<PHONE_NUMBER>:
0.01%

Covered Lines:
30793

Relevant Lines:
69356

💛  - Coveralls


req.body is undefined if request has large body

Bug Report
Is you/your team sponsoring this project

[ ] Yes
[x] No

If your team sponsoring this project, please attach here your team lead or who purchased license GitHub login
Minimal reproducible repo
import nanoexpress from 'nanoexpress';
import cors from 'cors';
import bodyParser from '@nanoexpress/middleware-body-parser';

const app = nanoexpress();

app
.use(cors({
  allowedHeaders: ['Authorization', 'Content-Type']
}))
.use(bodyParser({
  urlEncoded: false
}))

.put('/user', (req, res) => {
  console.log(req.body);

  return res.send({ status: 'ok' });
});

app.listen(3000);

Current Behavior
If request has body > ~1mb, req.body is undefined, but small requests are parsed correctly
Expected behavior/code
Parse body correctly if large requests
Environment

Node/npm version: 14.17.1/7.23.0
OS: Windows 10

Additional context/Screenshots
I've tried to create a middleware too see body content, only with small requests buffer is returned, large requests are undefined. So i think the is not on @nanoexpress/middleware-body-parser

If request body is larger than 512Kb (or Mb don’t remember) or content type is multipart, the handler will think it’s file.
see source code

i need to upload some base64, sometimes they pass 512kb, any suggestions for doing this?

@dalisoft Thank you! It's working now


Add shortest/longest for string and min/max for numbers/string

Hello,
Four common metrics for data :
-min/max for numbers and strings (ordered alphabetically for string)
-shortest/longest/mean length for strings. It may be important during data investigation to have an idea of that.
Best regards,
Simon

Hi Simon,
Thanks a lot for your suggestions.
Min/max for numbers is covered already (see p0 and p100). I like the idea of shortest/longest/mean for strings a lot and would be keen to add this as a feature.
I'm less convinced of the need for an alphabetic min and max for strings though. Would you mind explaining a bit more about how this could be helpful?
Thanks!

Hello @aeturrell  and thanks for your answer :)
"I'm less convinced of the need for an alphabetic min and max for strings though. Would you mind explaining a bit more about how this could be helpful?"
One very simple example that come in mind : let's say you have a customer dataset. It appears that despite having more than hundred, the max alphabetic is MIGHTYCUSTOMER, Inc. Well, it seems suspicious because you expect to have some customers coming after and clearly your dataset is not as complete as you think.
Best regards,
Simon

Please change p0 and p100 to min and max because the names are confusing. I thogh these are percentiles. What are the p25, p50 and p75 then? There should be 4 columns each for a quartile. Same for sd. I did realize later that it is std dev ? SAme notation of NA. It is usually writen as N/A or n/a to better align to the naming convention all either starting with a capital latter or non-capital latter.  See Data Summary for instance. Also align the columns widths to fit to what they contain. I like the histograms but they alignment is screwed at the moment.

At the moment I cannot use the skim generated summaries in professional jupyter notebooks.

Thanks for your comments @simonaubertbd, there will be an update implementing this soon.
@peczakax, I think this would be better in a different issue as it's slightly different than what @simonaubertbd is raising. You are correct that pN, where N takes a range of values are percentiles. For consistency with the other percentiles, I prefer to keep p0 and p100. By the way, some of the names are short to help with fitting everything in. sd is standard deviation, yes, and I think easy to check. NA is quite standard, eg in pandas the NA type is pd.NA, displayed as <NA>.
I have fixed some of the capitalisation and underscores, thank you for flagging these.
Unfortunately the histogram widths is a long running problem and I've not been able to solve it. I would strongly welcome a pull request that did. On some systems, code outputs are shown in monospaced fonts, which I think means the problem goes away. Certainly, the histogram looks fine on Mac. It seems to mostly be on Windows that there's a problem. I have tried to fix it before and it's possible it works in skimr (see this bit of code) but I haven't had time to work out how to do it in Python.

This has now been implemented.

@aeturrell Thanks a lot !


Allow ServerApp sub-class to override webapp handlers

Given e.g. the case of Voilà, you want the server to not add some of the default handlers (while you want some of them). This should ideally be overridable by a subclass of ServerApp (but probably not user configurable?).
Taking the Voilà example again, you probably want to:

Keep the configurable login/logout handlers.
Keep the kernel/kernelspecs/security handlers.
Not keep the contents/file/view/edit/nbconvert handlers.
Modify/customize/restrict the shutdown/sessions/config handlers (?).

These are all currently hard-coded in the web-app. I'm not sure what the best way to configure these would be, but the pattern from extra_services seems like a good one (maybe default_services?).

@rolweber could add more insights but a Gateway extension will need similar functionality.

I think there's a bigger conversation to be had here. I explored an approach where the server handlers were configurable, see #31, and added it to an old draft of the Jupyter Server Enhancement proposal, and received negative feedback.
Rather than remove handlers from the core jupyter server in subclasses, I think we need to define: What is the smallest unit that defines a jupyter server? Then, extra handlers (like nbconvert) become server extensions.
This is open for discussion in the Jupyter Server enhancement proposal (though it's received little attention). There's even an issue opened to discuss this point specifically: jupyter/enhancement-proposals#31
I would encourage us to move this conversation over there, as this has big implications on the Jupyter ecosystem...

I think the point of the Voila example is that it needs a Jupyter Server under the covers, but does not want to appear as a Jupyter Server externally, in the network. So even if we define what constitutes a Jupyter Server, a standalone application should still have the option to use jupyter_server through the Python APIs, while disabling the REST APIs for the core functionality.

I made a comment on the JEP issue trying to clarify the discussion. This PR would address what I list as point 2 there.

Cool, I think this proposal makes sense then. Thanks, everyone, for clarifying (especially @vidartf for reviving conversation on the JEP).
I think either "default_services" or "default_handlers" make sense.

Closed by #84


cron based octobors

Checklist

[x] I have read the Contributor Guide
[x] I have read and agree to the Code of Conduct
[x] I have added a description of my changes and why I'd like them included in the section below

Description of Changes
We trigger Octobors on PR status change. We have a high number of status checks in our repos and results in a large number of Octobors jobs being triggered at once, causing the queue to become highly congested. It can take a long time for the Octobors job that would merge the PR to reach the top of the queue, resulting in a poor experience as developers have to wait for merging.
This converts Octobors to be cron based to avoid this queue congestion.

There is potentially an issue with GitHub actions which means we may not be able to run this every 5 minutes on there. It runs late by up to 30 minutes and the intermediate schedulings are dropped.
Still, I think this is ready for another review.

Thanks


fix(ie9): add json support to cross domain requests in ie9

Fix cors requests in IE9/8
Fix specs
Add specs_runner.html

Hi
Sorry for the delay.
We don't need a html runner file, because we're using run-browser which runs in phantom, but you can run it on a port and open in any browser. see https://www.npmjs.com/package/run-browser
You also committed the spec.runner.js, which is a blob generated from existing source. Someone would have to update it every time anything changes. That's not a good practice.
I see you want to parse body when responseType is JSON. as far as I remember, with that response type, body comes in already parsed.
I'm yet to understand what happened in tests, but I'll try again soon.
I'm closing this pull request, because we don't need a second way of running tests.
Please open an issue for the problem you needed to fix, and I'll help you figure things out. If there's a change needed, I'll help you make a clean pull request with just the needed things.
Thanks for contributing


Add Bob

NOTE: Each discrete (stand-alone) request should be in its own issue.
Put "Add ____" as Title
[x] Done
Provide a link to the proposed addition.
https://github.com/ripperhe/Bob
Explain why it should be added
An app that supports screenshot translation and selection translation. The translation source supports Baidu translation, Youdao translation and Google translation
Additional context

Light
Dark

Issue Checklist
Put an x in the boxes once you've completed each step. You can also fill these out after creating the issue. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before responding to the issue.

[x] I have checked for other similar issues
[x] I have explained why this change is important
[x] I have added necessary documentation (if appropriate)

@jaywcjlove This issue has been resolved. Could you please close it?
Thanks!


gl: Require ARB_shader_bit_encoding in FS

On drivers only supportinmg OpenGL 3.3, like llvmpipe, ARB_gpu_shader5 may
not be available, but (u)intBitsToFloat and floatBitsTo* functions are also
provided by ARB_shader_bit_encoding. By requiring this extension in the FS
shader traces that were captured with the llvmpipe driver can actually also
be replayed by using this driver.

Can you take a step back and explain exactly what the root problem is? ARB_gpu_shader5 is not a required extension, so it's not a problem to run on a driver that doesn't support it. On those implementations renderdoc will use a fallback path and pick integer pixel values through storing their values in floats, which is accurate up to 16-bit integer values at least.

I've opened issue #1586 to explain the issue in more detail and also reworded the commit message. The key point is that (u)intBitsToFloat is actually part of GLSL 330, but  you set the version to 150. So a shader that contains (u)intBitsToFloat needs something to enable this functionality, and ARB_shader_bit_encoding is this little something.
An alternative solution would be to set the language level based on the shader code, (i.e. the failing shader actually sets #version 330). If you prefer I can also look into this instead.
PS: regarding clang-format-3.8: I understand your argument,  but llvm/clang 3.8  is quite old, and no longer available in most distros.

I've continued the discussion in #1586. This fix seems like it might be hiding the real problem. I understand how extension enabling works in GL and that these functions were not core in GLSL 150, but it seems like something else is going on because there is already a check to protect that the functions are only used when the ARB_gpu_shader5 extension is available.
As it stands a correctly behaving compiler shouldn't do anything different with this change because the functionality will still be guarded behind a check for a different extension. I don't want to change the language version used because it's less of a headache using a minimum version + conditional extensions, rather than trying to reliably figure out the highest language version supported.
Yes it's a bit annoying that I have to fix a clang-format version, but without clang-format output remaining stable over versions I'd have to completely reformat the whole repository with a new version and force all contributors to update all in lockstep. It would be constantly tail-chasing and it's more important that everyone has a uniform version to run. LLVM provides binary releases of 3.8.1 that can be downloaded and run on any distro as they have minimal dependencies.

I've split the patch into two to separate the change to handle ARB_gpu_shaders5 and adding the fallback with ARB_shader_bit_encoding.


Citus Compatibility

Is this compatible with the citus extension? I am currently using janusgraph. This looks interesting but I am worried how it would scale if I can't use citus.

+1
I think this is a good point. If AGE support Citus, it would be a great distributed graph database.

-- testing script
LOAD 'age';
SET search_path = ag_catalog, "$user", public;
SELECT create_graph('g');

SELECT create_distributed_table( 'g.ag_label_vertex', 'id' );
-- throw: data type ag_catalog.graphid has no default operator class for specified partition method

I tested follow script with below dockerfile script.
and, it need to support from citus, because of currently only support using the default operator class
https://github.com/citusdata/citus/blob/67bc990c1caaf6aa174b85253e1e154d8b368044/src/backend/distributed/commands/create_distributed_table.c#L1266
# original script from citusdata/docker
FROM postgres:11.11
ARG VERSION=10.0.3

ENV CITUS_VERSION ${VERSION}.citus-1

RUN apt-get update
RUN apt-get install -y --no-install-recommends \
  bison \
  build-essential \
  ca-certificates \
  flex \
  git \
  postgresql-plpython3-11 \
  postgresql-server-dev-11 \
  curl

RUN git clone https://github.com/apache/incubator-age /age \
  && cd /age && make install

# install Citus
RUN curl -s https://install.citusdata.com/community/deb.sh | bash \
    && apt-get install -y postgresql-$PG_MAJOR-citus-10.0.=$CITUS_VERSION \
                          postgresql-$PG_MAJOR-hll=2.15.citus-1 \
                          postgresql-$PG_MAJOR-topn=2.3.1 \
    && apt-get purge -y --auto-remove curl \
    && rm -rf /var/lib/apt/lists/*

# add citus to default PostgreSQL config
RUN echo "shared_preload_libraries='citus,age'" >> /usr/share/postgresql/postgresql.conf.sample

# add scripts to run after initdb
COPY 001-create-age-extension.sql /docker-entrypoint-initdb.d/
COPY 002-create-citus-extension.sql /docker-entrypoint-initdb.d/

# add health check script
COPY pg_healthcheck wait-for-manager.sh /
RUN chmod +x /wait-for-manager.sh

# entry point unsets PGPASSWORD, but we need it to connect to workers
# https://github.com/docker-library/postgres/blob/33bccfcaddd0679f55ee1028c012d26cd196537d/12/docker-entrypoint.sh#L303
RUN sed "/unset PGPASSWORD/d" -i /usr/local/bin/docker-entrypoint.sh

HEALTHCHECK --interval=4s --start-period=6s CMD ./pg_healthcheck

-- 001-create-age-extension.sql
CREATE EXTENSION age;

-- 002-create-citus-extension.sql
-- original script from citusdata/docker

-- wrap in transaction to ensure Docker flag always visible
BEGIN;
CREATE EXTENSION citus;

-- add Docker flag to node metadata
UPDATE pg_dist_node_metadata SET metadata=jsonb_insert(metadata, '{docker}', 'true');
COMMIT;

@emotionbug try https://github.com/bitnine-oss/agensgraph instead extension version.

@yjhjstz of course
CREATE GRAPH g;
SET GRAPH_PATH="g";
CREATE VLABEL people;
SELECT create_distributed_table('g.people', 'id');
-- ERROR:  people is not a regular, foreign or partitioned table

SELECT create_distributed_table('g.ag_edge', 'id');
-- ERROR:  cannot create trigger on graph label

in this time, currently only support using the default operator class has not thrown.
but, citus recognized it as an invalid table or AgensGraph cannot create trigger.
Dockerfile
https://github.com/emotionbug/ag-citus-docker/tree/AgensGraph
FROM bitnine/agensgraph:v2.1.3-debian
ARG VERSION=8.3.2

ENV CITUS_VERSION ${VERSION}.citus-1

# install Citus
RUN apt-get update \
    && build_deps='build-essential libreadline-dev zlib1g-dev flex bison libxml2-dev libxslt1-dev libssl-dev libxml2-utils xsltproc pkg-config uuid-dev' \
    && apt-get install -y $build_deps git libcurl4-openssl-dev pax-utils \
    && git clone git clone https://github.com/citusdata/citus.git \
    && git checkout release-8.3 \
    && cd /citus/citus \
    && ./configure \
    && make install \
    && apt-get purge -y --auto-remove curl \
    && rm -rf /var/lib/apt/lists/*

# add citus to default PostgreSQL config
RUN echo "shared_preload_libraries='citus'" >> /usr/local/share/postgresql/postgresql.conf.sample

# add scripts to run after initdb
COPY 000-configure-stats.sh 001-create-citus-extension.sql /docker-entrypoint-initdb.d/

# add health check script
COPY pg_healthcheck /

HEALTHCHECK --interval=4s --start-period=6s CMD ./pg_healthcheck

Citus doesn't support bare inherited tables (i.e., not a partition or partitioned table).

Is there anything I can test with this to help?

@sstubbs Perhaps you could try to load both Citus and AGE extension and see whether they can both load together?
Is order important?

Has anyone dug around this further? Citus + AGE would be quite the killer combo.

I know some tests have been done for ShardingSphere + AGE.
https://shardingsphere.apache.org/

Has anyone found a workaround to make age work with citus?
I see that the following works if _ag_label_vertex does not have any child table:
SELECT create_distributed_table('qwe._ag_label_vertex', 'id');

However, the CREATE command does not work afterwards. I tried multiple times.
postgres=# SELECT * FROM ag_catalog.cypher('qwe', $$ CREATE ({age:2}) $$) as (a ag_catalog.agtype);
ERROR:  unhandled cypher(cstring) function call
DETAIL:  qwe
postgres=# SELECT * FROM ag_catalog.cypher('qwe', $$ CREATE () $$) as (a ag_catalog.agtype);
ERROR:  cannot display a value of type internal
postgres=# SELECT * FROM ag_catalog.cypher('qwe', $$ CREATE ({age:2}) $$) as (a ag_catalog.agtype);
ERROR:  cannot display a value of type internal


cannot run the four demos of ARAnchor, ARRaycast, ARPlane, and ARMesh demo

I cannot run the four demos of ARAnchor, ARRaycast, ARPlane, and ARMesh on Hololens2 or mobile phone.
Can you provide a detailed tutorial? I packaged these four scenes directly and couldn't even open the camera,
and there were no errors.

Hi @oneSitDown,
The ARAnchor, ARRaycast, ARPlane, and ARMesh scenes are all meant to be run with the SharedSubscene. The camera is located in the SharedSubscene under the XRRig. It should look something like this in editor:

The way the sample is set up by default, all of the scenes are built, with the SharedSubscene at index 0. You start in the menu scene, and can then navigate to all of the others. (And SharedSubscene is always there providing the XRRig and MixedRealityToolkit)

You should be able to:

Clone the repo and open in Unity editor.
Fix any project validation for OpenXR (Mixed Reality -> Project Validation Settings -> Select Your Platform and then resolve any issues in Project Settings -> XR Plugin Management -> OpenXR)
Confirm that your list of scenes in build settings matches the above.
Build and deploy - you should see the Main Menu and can navigate to ARAnchor etc.

If you want to build these scenes on their own, you would need to make some changes. IE Add all the necessary stuff from SharedSubscene into the scene you want to build on its own.

Can I think so, our openxr sdk. Just called the method of AR Foudation and did not pass the dof data to AR Foudation?

And SharedSubscene has nothing to do with the entire demo, right? Will this part of the demo be removed in the future? This function is obviously redundant for the demo

Hi @oneSitDown, what behavior are you seeing on HoloLens2?
Is 'Initialize XR on Startup' enabled in OpenXR project settings?

I actually want to run these demos on Android phones instead of running these demos on Hololens 2. I have enabled Initialize XR on Startup'. Other demos can run normally. These few demos cannot be run. Can these AR Foudation demos be run on mobile phones? Can they only be run on Hololens2? If it doesn’t work on my phone, I won’t try it.

Is there any tutorial on how to run ARAnchor, ARRaycast, ARPlane, and ARMesh on mobile phones?

Does ARcore have to be enabled?

@oneSitDown we only support HoloLens for this project.  If you need help setting up this project on HoloLens, please open a support ticket @ https://aka.ms/hldevsupport
It's recommended to run these samples on HoloLens 2 using the following versions:

Latest Visual Studio 2022
Latest Unity 2021.3 LTS. Please double check the Unity's blocking bugs for HoloLens 2.
Latest Unity OpenXR plugin, recommended 1.3.1 or newer.
Latest Mixed Reality OpenXR Plugin, recommended 1.4.0 or newer. Please follow the latest release notes.
Latest MRTK-Unity, recommended 2.7.3 or newer.
Latest OpenXR Runtime, recommended 109 or newer.

If there is a bug on HoloLens, can you please provide the following information:

Visual Studio version
Unity Version
Unity OpenXR Plugin version
Microsoft Mixed Reality OpenXR Plugin version
MRTK2 version
Hololen's OS version

Okay, I thought you were compatible with Android-related logic, so I connected to AR Foudation. I’ll try the Hololens-related functions again.


Caching finalized streamed HTML response?

I'd like to cache the finalized HTML response with all the proxied script and font URLs. For a typical fetch this seems easy enough using the cache API:
https://developers.cloudflare.com/workers/reference/cache-api/
Given the HTML has been streamed and modified on the fly, however, would the standard cache.put even work?

cache.put works fine for streaming responses. The response that gets cached would just stream into the cache.  You need to tell the worker to wait for the cache operation to complete before exiting by calling event.waitUntil(cache.put...). You'll want to clone the response that is being returned to the fetch handler and cache that.
That said, why (at least for the font CSS worker)?
The CSS is browser-specific so you'd need to shard the HTML cache by browser.  The code already caches the CSS itself so the only overhead of the worker under normal operation is running the regex over the HTML as it streams through.  It should be roughly as fast as if the HTML was cached post-processing.
You'd be better off caching the HTML upstream in the normal CDN cache (which is between the worker and the origin) and letting the worker continue to modify the stream on each response.

Closing this issue because the initial question was addressed. Also the templates have moved over to the worker-sdk monorepo: https://github.com/cloudflare/workers-sdk/tree/main/templates.
if you're still experiencing issues feel free to open an issue there.


mdapi:deploy failing when deploying contentAssets folder

Summary
Deployment is failing when deploying the entire contentassets folder.
Steps To Reproduce:

sfdx force:mdapi:deploy -u vc -d force-app/main/default/contentassets

Expected result
The content assets should have gotten deployed.
Actual result
Deployment failed with the error No package.xml found.
Additional information
_

_.
SFDX CLI Version(to find the version of the CLI engine run sfdx --version):
sfdx-cli/7.33.2-045d48473e darwin-x64 node-v10.15.3
SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)
salesforcedx 47.6.2 (core)
├─ salesforcedx-templates 47.6.2 (core)
└─ salesforce-alm 47.9.0 (core)
OS and version:
macOS Catalina 10.15.1

@vmarasow you need to include a package.xml file in the deploy directory. If you are using source formate you can use source:deploy which does not need a package


The docs refer to older oot api version and dockerfile

While checking docs on : https://kmm.sigs.k8s.io/developer/ there are references to
apiVersion: ooto.sigs.k8s.io/v1alpha1  and dockerfile: |
Those should be updated to
kmm.sigs.x-k8s.io/v1beta1 and  dockerfileConfigMap:

/close


App unexpectedly included in artifacts zip file

PTE apps
the settings.json "appFolders" only contains a single folder name.
al.code-workspace file contains two apps, test app and the performance test app.
Apps.zip file contains both apps from al.code-workspace.
TestApps.zip file contains only the test app, not performance test app.
I expected that by specifying only one app in "appFolders" the build process would ignore the other one.
I am using the "other" app to do manual testing on the "primary" app.

I would expect that as well.
Any chance you can add me to the repo so I can see what happened?

Download the logs and send them to me together with your settings files maybe


Overview/Silencing alerts

Create a "Silencing alerts" section in Sensu 2.0 "Overview": #149

This was completed with https://github.com/sensu/sensu-docs-site/pull/209


test: last assertions are fine in js-ipfs

no reason not to have these assertions as part of the suite, tested in js-ipfs, they run fine

Yeah they were only disabled because they were failing in js-ipfs-api, due to the mentioned go-ipfs encoding issues.


design an exemplary system launch file as a target for generation

Subsumed in https://github.com/ipa-kut/ambs/pull/6


Brief tutorial?

Hey cocoahero - thanks for the awesome PUBG API wrapper. Would it be possible for you to write a brief tutorial for using this library? I've gotten as far as adding the library via carthage, and all is working well there. I just have no idea what commands are now available to me after adding this library to access the PUBG API. If you don't have time to write a tutorial, could you just point me in the right direction for using it? Thanks!

Hi @ritteraf. The library is still currently a WIP, it doesn't do much of anything at the moment. I've attempted to hit the PUBG API a couple times, but it doesn't seem to be functioning correctly. Once it is, I'll resume development of this wrapper.

Oh so the PUB API is still not fully functional? That's a bummer. Let me know if I can help in any way. I've seen you around in the Shopify Mobile Buy SDK - it would seem we have very similar interests :)

Will do

Hey @cocoahero I finally got around to doing some of my own testing today. I was successfully able to grab the user data for my pubg account with the following swift code:
`func attemptPubgIDLookup (playerName: String, completion: @escaping (String) -> Void) {
let region = "pc-na"

let urlString = "https://api.playbattlegrounds.com/shards/" + region + "/players?filter[playerNames]=" + playerName

let headers: HTTPHeaders = [

    "Authorization": "Bearer \(pubgApiKey)",

    "accept": "application/json"

]

Alamofire.request(urlString, method: .get, headers: headers)

    .responseJSON { (response) in

        debugPrint(response)

}

}`

Hmm, for whatever reason when searching for my player name, I don't get any results back. Can you paste what you get in the response?

That's on my player name. We should pwn some noobs sometime ;)

Odd. Whenever I try my player name, or any of my friends, I don't get any data back. AltenaBlue is the first I've seen that worked.

Are you sure you're setting the right region abbrevation?

Yup, pc-na. Try it for yourself, my player name is cocoahero.

I'll try your username with my code if you hook me up

Yea, cocoahero, Cocoahero, and CocoaHero didn't return anything. I just tried it on one of my friends, and it worked as well. MaverickHS

Hmm, yeah I tried a different capitalization of one of my friends and it worked. Must be case-sensitive, which is annoying. Still haven't figured out what my capitalization is. =(

Yep. Definitely case sensitive. If you log into the game it shows you.

Well, apparently it is cocoahero, but data wasn't showing up until I played a few rounds. /shrug

Yea, it seems the only real functionality of the user lookup is to get match ID's, which is a shame.


OCPBUGS-20998: 4.13 golang x net bump

/lgtm
/approve

/hold
To get tide to re-query

/hold cancel
Will this unstick it?

/jira refresh

/retest

/label backport-risk-assessed

/label cherry-pick-approved


feat: Animated tile support!

Description
Tiled supports animated tiles, and now Flame does as well...

Checklist

[x] The title of my PR starts with a [Conventional Commit] prefix (fix:, feat:, docs: etc).
[x] I have followed the [Contributor Guide] when preparing my PR.
[x] I have updated/added tests for ALL new/updated/fixed functionality.
[x] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
[x] I have updated/added relevant examples in examples or docs.

Breaking Change?

[ ] Yes, this PR is a breaking change.
[x] No, this PR is not a breaking change.

Related Issues
Closes #1914

converting to draft: more tests!

Testing other map code paths
I need to also fix #1932 in this commit.

Possible further optimization from discord chat:

add frameTime and frame to TileFrames
update(dt): 1: walk over all TileFrames (very small group), calculatate new frame.
Walk over all TileAnimation (larger group) and update batchedSource if frame value changed

Would be good to have an example for the examples directory too.

Need to remember to update it to the newest version of Flame_tiled when it's available.

Need to remember to update it to the newest version of Flame_tiled when it's available.

The examples are managed by Melos, so Melos should be updating it automatically once we release a new version.

done!


Add logo to README.md, correct text for running filters

Two README updates rolled into this PR.

Add a logo image for H3
The example invocations of the *nix style filters was out of date, updated those.

Coverage remained the same at 100.0% when pulling b96c369f2d2cb60cffe5c2d6cd394e15823abd1c on isaacbrodsky:add-logo into feff1ddd22afde2a639ac8e95d94c782b8c19fd6 on uber:master.


Fix minor mistakes to run on Azure OpenAI

Fix minor mistakes, Now it can run on Azure OpenAI

thanks!! will take a look tomorrow :)


Where are the logs for DAG loading?

My DAGs are failing to load, with the following error:
Broken DAG: [/opt/airflow/dags/repo/ppm/ppm.py] Traceback (most recent call last):
  File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)

I've ran this command, to get all logs:
for pod in `kubectl get pods -o jsonpath="{range .items[*]}{'\n'}{.metadata.name}{end}"`; do for container in `kubectl get pods $pod -o jsonpath="{range .spec.containers[*]}{'\n'}{.name}{end}"`; do kubectl logs $pod -c $container >> logs.txt; done; done;

And, I can't find any errors in the logs.
Where are the logs for DAG loading?

@javamonkey79 you should just be able to see them in the Sheduler pod logs?
What do you see when you look at those?

@thesuperzapper I don't seem them in the scheduler pod logs. I did find DAG loading logs in:
airflow-new-worker-0 -> dags-git-sync
Command for someone else, in case it helps:
for pod in `kubectl get pods -o jsonpath="{range .items[*]}{'\n'}{.metadata.name}{end}"`; do for container in `kubectl get pods $pod -o jsonpath="{range .spec.containers[*]}{'\n'}{.name}{end}"`; do echo "$pod -> $container" >> logs.txt && kubectl logs $pod -c $container >> logs.txt; done; done;


In the lib project reference encapsulation, use error in the main project (在lib项目引用封装,在主项目使用报错)

org.greenrobot.eventbus.EventBusException: Subscriber class com.soft.supervise.activity.SplashActivity and its super classes have no public methods with the @Subscribe annotation

Do you minify (use ProGuard) on the library project? Maybe add a rule to keep the @Subscribe annotation name, like -keep @interface org.greenrobot.eventbus.Subscribe.
Related to #614.


Add details to teasers

@thewilkybarkid Approach looks good.
Will need data updates for specimen home page examples.


add code and tests to detect vboxnet collision with host interfaces

With the virtualbox machine driver, if one of the host's network interfaces has the same subnet/broadcast as the host-only virtualbox network, there will be problems creating and accessing the docker-machine vm(s).  The only indication of the problem is a "no route to host" error in the logs.  Virtualbox does not complain if a host-only network is created that conflicts with a host interface.
This change will raise an error if docker-machine attempts to create or start a vm that has a host-only network with a CIDR that overlaps/collides with an interface on the host.
unit tests pass and core-commands.bats passes with virtualbox driver.
Fixes #3060
Signed-off-by: Paul Callahan<EMAIL_ADDRESS>

Nice!  Thanks for the PR.   Will take a look.

LGTM

Hm, I get an error trying a create with the PR, are these host only interfaces are invalid?
$ VBoxManage list hostonlyifs
Name:            vboxnet0
GUID:            786f6276-656e-4074-8000-0a0027000000
DHCP:            Disabled
IPAddress:       <IP_ADDRESS>
NetworkMask:     <IP_ADDRESS>
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:00
MediumType:      Ethernet
Status:          Up
VBoxNetworkName: HostInterfaceNetworking-vboxnet0

Name:            vboxnet1
GUID:            786f6276-656e-4174-8000-0a0027000001
DHCP:            Disabled
IPAddress:       <IP_ADDRESS>
NetworkMask:     <IP_ADDRESS>
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 0a:00:27:00:00:01
MediumType:      Ethernet
Status:          Down
VBoxNetworkName: HostInterfaceNetworking-vboxnet1

@nathanleclaire I wasn't excluding existing host-only nets, so that error occured.   I fixed that and added an extra test case.
To exclude the existing host-onlies, I had to call listHostOnlyAdapters... so to prevent this from being called twice in a row (and also messing up the order of the vbox mock calls), I had to take that method out of getOrCreateHostOnlyNetwork (and I updated the tests to reflect this).   I'll make some notes in the review.
Hope this is ok.
Also, one other thing - I'm not mocking the calls to net.Interfaces(), etc, so the tests might pick up some interfaces if the host running the tests have some existing virtualbox host only networks - this could cause spurious test errors.   Is this ok, or should I try to mock the calls to net.* ?

@nathanleclaire I wasn't excluding existing host-only nets, so that error occured.   I fixed that and added an extra test case.
To exclude the existing host-onlies, I had to call listHostOnlyAdapters... so to prevent this from being called twice in a row (and also messing up the order of the vbox mock calls), I had to take that method out of getOrCreateHostOnlyNetwork (and I updated the tests to reflect this).   I'll make some notes in the review.
Hope this is ok.
Also, one other thing - I'm not mocking the calls to net.Interfaces(), etc, so the tests might pick up some interfaces if the host running the tests have some existing virtualbox host only networks - this could cause spurious test errors.   Is this ok, or should I try to mock the calls to net.* ?

Also, one other thing - I'm not mocking the calls to net.Interfaces(), etc, so the tests might pick up some interfaces if the host running the tests have some existing virtualbox host only networks - this could cause spurious test errors. Is this ok, or should I try to mock the calls to net.* ?

Please mock them.  Thanks!

Great.  @paul-callahan is this ready for final review / merge?

Yup, ready.  Thanks.
On Fri, Mar 11, 2016 at 12:20 PM, Nathan LeClaire<EMAIL_ADDRESS>wrote:

Great. @paul-callahan https://github.com/paul-callahan is this ready
for final review / merge?
—
Reply to this email directly or view it on GitHub
https://github.com/docker/machine/pull/3165#issuecomment-195530715.

Create works for me now :+1:
LGTM
Nice work on this!


test: Unit-Tests for plugin package

We need tests for the whole plugin package.
Please use the standard test framework for this: https://golang.org/pkg/testing/

This has been done although coverage could be higher.


import error: import deform_conv_cuda

Enviroment:
python:3.6.9
pytorch:1.6.0
torchvision:0.7.0
mmcv:1.4.8
mmcv-full:1.3.2
mmdet:1.0
I don't know how to check the mmdetection version.
I have the following problem, can you help me?
/home/wanghan/anaconda3/envs/open-mmlab/bin/python3.7 /home/wanghan/ZTT-video/zero_shot_detection-master/mmdetection/tools/train.py
Traceback (most recent call last):
File "/home/wanghan/ZTT-video/zero_shot_detection-master/mmdetection/tools/train.py", line 11, in
from mmdet.apis import (get_root_logger, set_random_seed,
File "/home/wanghan/ZTT-video/zero_shot_detection-master/mmdetection/mmdet/apis/init.py", line 3, in
from .inference import (inference_detector, init_detector, show_result,
File "/home/wanghan/ZTT-video/zero_shot_detection-master/mmdetection/mmdet/apis/inference.py", line 11, in
from mmdet.core import get_classes
File "/home/wanghan/ZTT-video/zero_shot_detection-master/mmdetection/mmdet/core/init.py", line 6, in
from .post_processing import *  # noqa: F401, F403
File "/home/wanghan/ZTT-video/zero_shot_detection-master/mmdetection/mmdet/core/post_processing/init.py", line 1, in
from .bbox_nms import multiclass_nms
File "/home/wanghan/ZTT-video/zero_shot_detection-master/mmdetection/mmdet/core/post_processing/bbox_nms.py", line 3, in
from mmdetection.mmdet.ops.nms import nms_wrapper
File "/home/wanghan/ZTT-video/zero_shot_detection-master/mmdetection/mmdet/ops/init.py", line 2, in
from .dcn import (DeformConv, DeformConvPack, DeformRoIPooling,
File "/home/wanghan/ZTT-video/zero_shot_detection-master/mmdetection/mmdet/ops/dcn/init.py", line 1, in
from .deform_conv import (DeformConv, DeformConvPack, ModulatedDeformConv,
File "/home/wanghan/ZTT-video/zero_shot_detection-master/mmdetection/mmdet/ops/dcn/deform_conv.py", line 10, in
from mmdetection.mmdet.ops.dcn import deform_conv_cuda
ImportError: /home/wanghan/ZTT-video/zero_shot_detection-master/mmdetection/mmdet/ops/dcn/deform_conv_cuda.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe26detail36_typeMetaDataInstance_preallocated_7E
Process finished with exit code 1

It is very likely that your MMCV is compiled in an environment but ran in another environment. Please follow the trouble shooting page here.

I followed your suggestion, but I don't know how to solve it. Can you help me?
python mmdet/utils/collect_env.py
fatal: not a git repository (or any of the parent directories): .git
sys.platform: linux
Python: 3.7.9 (default, Aug 31 2020, 12:42:55) [GCC 7.3.0]
CUDA available: True
GPU 0: GeForce RTX 2080 Ti
CUDA_HOME: /usr/local/cuda-10.1
NVCC: Cuda compilation tools, release 10.1, V10.1.243
GCC: gcc (Ubuntu 6.5.0-2ubuntu1~18.04) 6.5.0 20181026
PyTorch: 1.6.0
PyTorch compiling details: PyTorch built with:

GCC 7.3
C++ Version: 201402
Intel(R) Math Kernel Library Version 2019.0.5 Product Build 20190808 for Intel(R) 64 architecture applications
Intel(R) MKL-DNN v1.5.0 (Git Hash e2ac1fac44c5078ca927cb9b90e1b3066a0b2ed0)
OpenMP 201511 (a.k.a. OpenMP 4.5)
NNPACK is enabled
CPU capability usage: AVX2
CUDA Runtime 10.2
NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75
CuDNN 7.6.5
Magma 2.5.2
Build settings: BLAS=MKL, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_VULKAN_WRAPPER -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_STATIC_DISPATCH=OFF,

TorchVision: 0.7.0
OpenCV: 4.1.2
MMCV: 1.3.2
MMCV Compiler: GCC 7.3
MMCV CUDA Compiler: 10.1
MMDetection: 1.0.rc0+1c9afec+

It seems the CUDA version of pytorch and runtime is different. You can try to install pytorch with CUDA10.1

I've taken care of it. Thank you very much indeed


Add Travis badge

Addon is missing the 10 points on emberobserver.com probably because of this (says it has no build). 😉

awesome, thanks! can you add an NPM badge too in a follow-up PR?


Validate Push API key when installing

When the install command is run and the user inputs an API key, it makes a request to AppSignal to validate it. If it's not valid, the installer aborts with a message.
Closes #42

I kept the HTTP proxy and the CA file out of this PR. Based on our other installers, that's something to take into account during the diagnose command, which is not present yet in this integration.

I kept the HTTP proxy and the CA file out of this PR. Based on our other installers, that's something to take into account during the diagnose command

I'm happy to keep it out for now and merge this, but I'm not sure what you mean about it being for the diagnose command?
For example, the Ruby integration's install command calls the Appsignal::AuthCheck with a config (which reads the environment variables) and that in turn uses the Appsignal::Transmitter, which uses the HTTP proxy and CA file path configuration to make the request.


[WIP] Refactor the PSF Photometry API

@christinahedges and @geert pair-coded a non-functional doodle of our dream API for PSF photometry.  The idea is to re-factor @mirca's existing PSF-fitting code to make it slightly easier to use.
The core of the idea is that we should have a tpf.psf_photometry(catalog="kic") function that returns a collection of LightCurve objects.
This is very much work in progress and just a doodle!

This is KEY for an intuitive/user-friendly PSF photometry API, thanks for putting y'all's thoughts in the open ❤

The doodle looks good to me.  In my experience with inference frameworks, friction arises when users wish to extend the model with more tunable knobs.  I don't catch sight of anything that limits extensibility.
Presumably most users will want photometry, but some might also find value in the fitted (x,y) centroids, or future added fit parameters, if any.

I think we need some ability to "freeze" parameters to stop them being fit. This will then overcome the issue of fitting a single target for RA/Dec and Motion (which is degenerate), because we'll freeze the RA/Dec.

@christinahedges I think a nice and simple way to freeze parameters would be to create another instance of your model. Say your model parameters are x, y, flux and you call it using psf_model(x, y, flux), then to freeze, say, the centroids, you could do psf_model_flux = lambda flux: psf_model(x=1., y=2., flux=flux)

@mirca that sounds good, do we think users want the ability to freeze and thaw parameters as they go? Something like...
PSF = psfmodel(priors=priors)
PSF.freeze([RA, Dec])
PSF.fit()
Perhaps this isn't super necessary. Perhaps they can specify which are frozen like this:
PSF = psfmodel(priors=priors, freeze=[RA, Dec])
PSF.fit()

@christinahedges Yeah, I think having a keyword option to freeze the parameters is very convenient.

Codecov Report

Merging #157 into master will decrease coverage by 1.5%.
The diff coverage is 35%.

@@            Coverage Diff             @@
##           master     #157      +/-   ##
==========================================
- Coverage   92.32%   90.81%   -1.51%
==========================================
  Files          17       18       +1
  Lines        2189     2352     +163
==========================================
+ Hits         2021     2136     +115
- Misses        168      216      +48

Impacted Files
Coverage Δ

lightkurve/psf_photometry_prototype.py
35% <35%> (ø)

lightkurve/lightcurve.py
91.5% <0%> (-0.67%)
:arrow_down:

lightkurve/utils.py
100% <0%> (ø)
:arrow_up:

lightkurve/tests/test_targetpixelfile.py
90.71% <0%> (ø)
:arrow_up:

lightkurve/targetpixelfile.py
89.02% <0%> (+0.02%)
:arrow_up:

lightkurve/lightcurvefile.py
95% <0%> (+0.17%)
:arrow_up:

lightkurve/tests/test_lightcurve.py
97.86% <0%> (+0.17%)
:arrow_up:

Continue to review full report at Codecov.

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

Update: we have a working prototype!
The snippet below shows an example of what the new API in this PR currently looks like.  It demonstrates the main goal of this PR, which is to introduce high-level classes such as StarPrior and BackgroundPrior which make it easier to setup a model.  There can also be a MotionPrior and FocusPrior once the simple version produces reasonable lightcurves.
@mirca @amcody @gully please post your thoughts!
(@mirca we lost gradients for now 😢)
def psf_photometry_demo():

    # We will attempt to make a lightcurve for Tabby's star
    tpf = KeplerTargetPixelFile.from_archive(8462852, quarter=16, quality_bitmask='hardest')

    # First, set up a simple scene model with one star and no motion or focus changes
    star_prior = StarPrior(flux=np.nansum(tpf.flux[0]), col=tpf.column, row=tpf.row,
                           err_flux=1e5, err_col=2, err_row=2,
                           targetid=tpf.keplerid)
    background_prior = BackgroundPrior(flux=np.nanpercentile(tpf.flux[0], 10), err_flux=100.0)
    scenemodel = SimpleSceneModel(star_priors=[star_prior],
                                  background_prior=background_prior,
                                  prfmodel=tpf.get_prf_model())

    # Now make the lightcurve by fitting each cadence
    time = tpf.time[1400:1700]
    flux = []
    for idx in tqdm(range(len(time))):
        result = scenemodel.fit(tpf.flux[idx])
        flux.append(result.stars[0].flux)
    return LightCurve(time, flux)

Codecov Report

Merging #157 into master will decrease coverage by 3.15%.
The diff coverage is 29.41%.

@@            Coverage Diff             @@
##           master     #157      +/-   ##
==========================================
- Coverage   92.32%   89.17%   -3.16%
==========================================
  Files          17       18       +1
  Lines        2189     2411     +222
==========================================
+ Hits         2021     2150     +129
- Misses        168      261      +93

Impacted Files
Coverage Δ

lightkurve/psf_photometry_prototype.py
29.41% <29.41%> (ø)

lightkurve/lightcurve.py
91.5% <0%> (-0.67%)
:arrow_down:

lightkurve/tests/test_targetpixelfile.py
90.71% <0%> (ø)
:arrow_up:

lightkurve/utils.py
100% <0%> (ø)
:arrow_up:

lightkurve/targetpixelfile.py
89.02% <0%> (+0.02%)
:arrow_up:

lightkurve/lightcurvefile.py
95% <0%> (+0.17%)
:arrow_up:

lightkurve/tests/test_lightcurve.py
97.86% <0%> (+0.17%)
:arrow_up:

Continue to review full report at Codecov.

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

@barentsen This looks exciting to me!!

Codecov Report

Merging #157 into master will decrease coverage by 2.89%.
The diff coverage is 28.44%.

@@            Coverage Diff            @@
##           master     #157     +/-   ##
=========================================
- Coverage   92.27%   89.37%   -2.9%
=========================================
  Files          17       18      +1
  Lines        2292     2401    +109
=========================================
+ Hits         2115     2146     +31
- Misses        177      255     +78

Impacted Files
Coverage Δ

lightkurve/psf_photometry_prototype.py
28.44% <28.44%> (ø)

Continue to review full report at Codecov.

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

Codecov Report

Merging #157 into master will decrease coverage by 2.83%.
The diff coverage is 26.92%.

@@            Coverage Diff             @@
##           master     #157      +/-   ##
==========================================
- Coverage   92.27%   89.44%   -2.84%
==========================================
  Files          17       18       +1
  Lines        2292     2396     +104
==========================================
+ Hits         2115     2143      +28
- Misses        177      253      +76

Impacted Files
Coverage Δ

lightkurve/psf_photometry_prototype.py
26.92% <26.92%> (ø)

Continue to review full report at Codecov.

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

The refactored code currently doesn't work properly. If you compare to the original PRF photometry on tabby's star it gives completely the wrong answer.

Alright I fixed it.

@barentsen there was an error in the way you wrong your test,
This
time = tpf.time[1400:1700]  # this cadence range include the deepest dip
for idx in tqdm(range(len(time))):

should be this
time = tpf.time[1400:1700]  # this cadence range include the deepest dip
for idx in tqdm(np.arange(1400, 1700)):

This took me ages to find it's not even funny. I did fix a different bug in the mean time with the _predict and from_array functions. All fixed now!

@christinahedges zoodles points as well; that was a sick finding, Chedges!

Update: I added the ability to fit the telescope focus and motion parameters.  Fitting these is optional and can easily be switched on/off via the fix_motion and fix_focus flags.   The API now looks like this:
%matplotlib inline
import numpy as np
from lightkurve import KeplerTargetPixelFile, LightCurve
from lightkurve.prf_photometry import StarPrior, FocusPrior, MotionPrior, SceneModel, PRFPhotometry
from oktopus import GaussianPrior, UniformPrior

tpf = KeplerTargetPixelFile("https://archive.stsci.edu/missions/kepler/target_pixel_files/0084/008462852/"
                            "kplr008462852-2013098041711_lpd-targ.fits.gz", quality_mask='hardest')

# First, compute a few values from our TPF which will inform the priors
bgflux = np.nanpercentile(tpf.flux[0], 10)
maxflux = np.nansum(tpf.flux, axis=(1, 2)).max()
col, row = np.nanmedian(tpf.centroids(), axis=1)

# Set up the model
model = SceneModel(star_priors=[StarPrior(col=GaussianPrior(mean=col, var=2**2),
                                          row=GaussianPrior(mean=row, var=2**2),
                                          flux=UniformPrior(lb=0, ub=maxflux),
                                          targetid=tpf.keplerid)],
                   background_prior=GaussianPrior(mean=bgflux, var=bgflux),
                   focus_prior=FocusPrior(scale_col=GaussianPrior(mean=1, var=0.0001),
                                          scale_row=GaussianPrior(mean=1, var=0.0001),
                                          rotation_angle=UniformPrior(lb=-3.1415, ub=3.1415)),
                   motion_prior=MotionPrior(shift_col=GaussianPrior(mean=0., var=0.01),
                                            shift_row=GaussianPrior(mean=0., var=0.01)),
                   prfmodel=tpf.get_prf_model(),
                   fix_background=False,
                   fix_focus=False,
                   fix_motion=False)

pp = PRFPhotometry(model)
pp.run(tpf.flux[1650:1850], pos_corr1=tpf.pos_corr1[1650:1850], pos_corr2=tpf.pos_corr2[1650:1850])
pp.plot_results()

Note: fitting the extra parameters and specifying their priors is entirely optional.  If you wish to rely on the defaults, you can make a much simpler model like this:
model = SceneModel(star_priors=[StarPrior(col=GaussianPrior(mean=col, var=2**2),
                                          row=GaussianPrior(mean=row, var=2**2),
                                          flux=UniformPrior(lb=0, ub=maxflux),
                                          targetid=tpf.keplerid)],
                   prfmodel=tpf.get_prf_model())

Also note: the pos_corr data is passed to the PRFPhotometry class which takes care of updating the MotionPrior at each cadence using the pos_corr measurements.

Nice, I like it! Gonna take a closer look and see if we can run it on some K2 sources..

Feedback from pair-chatting with @christinahedges:

classes like MotionPrior, FocusPrior, etc... should accept fixed values for their parameters (which, behind the scenes, may or may not be represented as a delta distribution);
consider renaming fix_focus into fit_focus (etc);
create a BackgroundPrior to avoid confusion;
we need to improve the oktopus reprs;
we need unit tests;

Codecov Report

Merging #157 into master will decrease coverage by 6%.
The diff coverage is 40.5%.

@@            Coverage Diff             @@
##           master     #157      +/-   ##
==========================================
- Coverage   92.27%   86.27%   -6.01%
==========================================
  Files          17       18       +1
  Lines        2292     2440     +148
==========================================
- Hits         2115     2105      -10
- Misses        177      335     +158

Impacted Files
Coverage Δ

lightkurve/tests/test_prf.py
100% <100%> (ø)
:arrow_up:

lightkurve/targetpixelfile.py
89.02% <100%> (ø)
:arrow_up:

lightkurve/prf.py
88.76% <100%> (-1.01%)
:arrow_down:

lightkurve/prf_photometry.py
37.4% <37.4%> (ø)

lightkurve/lightcurve.py
91.14% <71.42%> (-0.37%)
:arrow_down:

Continue to review full report at Codecov.

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

Does this version give back uncertainties? We have PR #11 open which is supposed to add errors to PSF photometry.

It does not return uncertainties yet!  Let's see if we can incorporate #11 into this PR.
This PR is otherwise ready for review, apart from the unit tests needing to become more comprehensive.  It still lacks a TargetPixelFile.prf_photometry() function, but we may want to do that in a separate PR once the Collection and StarPrior-generating classes have been meged.

@mirca I am attempting to add support for uncertainties, but I am getting confused as to how to implement SceneModel.gradient().  Should it return deltaFlux / deltaParameters like KeplerPRF.gradient() does, or should it return deltaProbability / deltaParameters?
My current (poor, incorrect) implementation lives at https://github.com/barentsen/lightkurve/blob/eee2eaa8d0bd5738a1a42bfd5ebf14a5355fc201/lightkurve/prf/scenemodels.py#L457

It should be the gradient of SceneModel._predict with respect to params. Will
share more thoughts later!
On Thu, Jun 28, 2018 at 5:50 PM, Geert Barentsen<EMAIL_ADDRESS>wrote:

@mirca https://github.com/mirca I am attempting to add support for
uncertainties, but I am getting confused as to how to implement
SceneModel.gradient(). Should it return deltaFlux / deltaParameters like
KeplerPRF.gradient() does, or should it return deltaProbability /
deltaParameters?
My current (poor, incorrect) implementation lives at
https://github.com/barentsen/lightkurve/blob/
eee2eaa8d0bd5738a1a42bfd5ebf14a5355fc201/lightkurve/prf/
scenemodels.py#L457
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/KeplerGO/lightkurve/pull/157#issuecomment-401169053,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMeKO3SB8SxZyCxcw4oF1Lg-MlNTpasqks5uBUGOgaJpZM4UjeTk
.

--
webpage: http://mirca.github.io
github: @mirca http://www.github.com/mirca
twitter: @mircaze http://www.twitter.com/mircaze

The following example gives me a LinAlgError: Singular matrix error.  It does work fine with fit_focus=False.  This makes sense because KeplerPRF.gradient() does not implement the gradient with respect to the focus parameters yet, and therefore there is a hack in SceneModel.gradient() to pretend these gradients are all zeroes.  This is probably what leads to the singular matrix...
@mirca Do you think we can add the derivatives with respect to scale_col, scale_row, and rotation_angle to KeplerPRF.gradient()?
from lightkurve import GaussianPrior, UniformPrior
from lightkurve import KeplerPRF
from lightkurve import StarPrior, BackgroundPrior, SceneModel

shape = (12,12)
starflux, bgflux = 1000., 10.
col, row = 60, 70
prf = KeplerPRF(channel=42, shape=(10, 12), column=col, row=row)
star_prior = StarPrior(col=GaussianPrior(col + 6, 0.01),
                       row=GaussianPrior(row + 6, 0.01),
                       flux=UniformPrior(lb=0.5*starflux, ub=1.5*starflux))
background_prior = BackgroundPrior(flux=UniformPrior(lb=0, ub=100))
scene = SceneModel(star_priors=[star_prior],
                   background_prior=background_prior,
                   prfmodel=prf,
                   fit_background=True,
                   fit_focus=True)
# Generate and fit fake data
fake_data = bgflux + prf(starflux, col + 6, row + 6,
                         scale_col=1., scale_row=1.,
                         rotation_angle=0)
results = scene.fit(fake_data, tol=1e-10, options={'maxiter': 100})

Error message:
---------------------------------------------------------------------------
LinAlgError                               Traceback (most recent call last)
<ipython-input-1-a3c8403f8af5> in <module>()
     20                          scale_col=1., scale_row=1.,
     21                          rotation_angle=0)
---> 22 results = scene.fit(fake_data, tol=1e-10, options={'maxiter': 100})

~/dev/lightkurve/lightkurve/prf/scenemodels.py in fit(self, data, loss_function, method, **kwargs)
    527         fit = loss.fit(x0=self.get_initial_guesses().to_array(), method=method, **kwargs)
    528         result = self.params.from_array(fit.x)
--> 529         result.uncertainties = loss.loglikelihood.uncertainties(fit.x)
    530         result.predicted_image = self._predict(fit.x)
    531         result.residual_image = data - result.predicted_image

~/bin/anaconda/lib/python3.6/site-packages/oktopus/likelihood.py in uncertainties(self, params)
     52         Information Matrix
     53         """
---> 54         inv_fisher = np.linalg.inv(self.fisher_information_matrix(params))
     55         return np.sqrt(np.diag(inv_fisher))
     56

~/bin/anaconda/lib/python3.6/site-packages/autograd/tracer.py in f_wrapped(*args, **kwargs)
     46             return new_box(ans, trace, node)
     47         else:
---> 48             return f_raw(*args, **kwargs)
     49     f_wrapped.fun = f_raw
     50     f_wrapped._is_autograd_primitive = True

~/bin/anaconda/lib/python3.6/site-packages/numpy/linalg/linalg.py in inv(a)
    526     signature = 'D->D' if isComplexType(t) else 'd->d'
    527     extobj = get_linalg_error_extobj(_raise_linalgerror_singular)
--> 528     ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj)
    529     return wrap(ainv.astype(result_t, copy=False))
    530

~/bin/anaconda/lib/python3.6/site-packages/numpy/linalg/linalg.py in _raise_linalgerror_singular(err, flag)
     87
     88 def _raise_linalgerror_singular(err, flag):
---> 89     raise LinAlgError("Singular matrix")
     90
     91 def _raise_linalgerror_nonposdef(err, flag):

LinAlgError: Singular matrix

and therefore there is a hack in SceneModel.gradient() to pretend these gradients are all zeroes. This is probably what leads to the singular matrix.

Yeah, that will make the determinant of the matrix become zero, so we can't find its inverse.

@mirca Do you think we can add the derivatives with respect to scale_col, scale_row, and rotation_angle to KeplerPRF.gradient()?

I can happily take a look at that this weekend!

Oh, and we can't use autograd to get those gradients because the scipy interpolation we use is not supported by autograd.

Other than removing the array of zeros in the Jacobian matrix, I think this is ready to be merged! 🎉🎉🎉🎉

@christinahedges and I came across this issue yesterday. It turns out that prfmodel=tpf.get_prf_model() couldn't sucessfully find the tpf model due to keyword argument.
We temporarily fixed it by mannually calling KeplerPRF to generate the PRF model.
prfmodel=KeplerPRF(tpf.channel, tpf.flux.shape[1:], tpf.column, tpf.row)
Could we warn the users if the PRF model is used the wrong way?
Also, in tpf.get_prf_model() we could maybe add a keyword argument simple=True to choose method by default.

This is probably a trivial error.  I have to run but will try to fix later.  Feel free to push a commit or open a PR against this branch if you find the fix before I'm back/

Codecov Report

Merging #157 into master will decrease coverage by 1.71%.
The diff coverage is 84.06%.

@@            Coverage Diff             @@
##           master     #157      +/-   ##
==========================================
- Coverage   93.14%   91.42%   -1.72%
==========================================
  Files          19       22       +3
  Lines        2465     2729     +264
==========================================
+ Hits         2296     2495     +199
- Misses        169      234      +65

Impacted Files
Coverage Δ

lightkurve/prf/__init__.py
100% <100%> (ø)

lightkurve/prf/tests/test_scenemodels.py
100% <100%> (ø)

lightkurve/prf/tests/test_prfmodels.py
100% <100%> (ø)

lightkurve/targetpixelfile.py
90.4% <100%> (ø)
:arrow_up:

lightkurve/prf/scenemodels.py
74.91% <74.91%> (ø)

lightkurve/lightcurve.py
92% <83.33%> (-0.14%)
:arrow_down:

lightkurve/prf/prfmodels.py
89.88% <89.88%> (ø)

lightkurve/utils.py
100% <0%> (ø)
:arrow_up:

... and 3 more

Continue to review full report at Codecov.

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

@AndyTza I am unable to re-produce the error you posted above.  Can you double-check that you are using a clean version of the refactor-psf-photometry branch?  If you still have a prf_photometry.py file in your tree (which should no longer be there), then try git reset --hard to remove all outdated files.  (Warning: this will also remove any other files you may be working on but haven't committed ... if you are worried about that, then please check out the branch in some new directory.)
If the problem keeps happening, please copy/paste a full failing example below.
PS: the API now works as follows (note the import from lightkurve.prf instead of lightkurve.prf_photometry in this updated example):
%matplotlib inline
import numpy as np
from lightkurve import KeplerTargetPixelFile, LightCurve
from lightkurve.prf import StarPrior, BackgroundPrior, FocusPrior, MotionPrior, SceneModel, PRFPhotometry
from oktopus import GaussianPrior, UniformPrior

tpf = KeplerTargetPixelFile("https://archive.stsci.edu/missions/kepler/target_pixel_files/0084/008462852/"
                            "kplr008462852-2013098041711_lpd-targ.fits.gz", quality_mask='hardest')

# First, compute a few values from our TPF which will inform the priors
bgflux = np.nanpercentile(tpf.flux[0], 10)
maxflux = np.nansum(tpf.flux, axis=(1, 2)).max()
col, row = np.nanmedian(tpf.centroids(), axis=1)

# Set up the model
model = SceneModel(star_priors=[StarPrior(col=GaussianPrior(mean=col, var=2**2),
                                          row=GaussianPrior(mean=row, var=2**2),
                                          flux=UniformPrior(lb=0, ub=maxflux),
                                          targetid=tpf.keplerid)],
                   background_prior=BackgroundPrior(flux=GaussianPrior(mean=bgflux, var=bgflux)),
                   focus_prior=FocusPrior(scale_col=GaussianPrior(mean=1, var=0.0001),
                                          scale_row=GaussianPrior(mean=1, var=0.0001),
                                          rotation_angle=UniformPrior(lb=-3.1415, ub=3.1415)),
                   motion_prior=MotionPrior(shift_col=GaussianPrior(mean=0., var=0.01),
                                            shift_row=GaussianPrior(mean=0., var=0.01)),
                   prfmodel=tpf.get_prf_model(),
                   fit_background=True,
                   fit_focus=False,
                   fit_motion=False)

pp = PRFPhotometry(model)
pp.run(tpf.flux, pos_corr1=tpf.pos_corr1, pos_corr2=tpf.pos_corr2, cadences=range(1650, 1850))
pp.plot_results()
print('The star flux in the first cadence is {}'.format(pp.results[0].stars[0].flux))

I renamed SceneModel into TPFModel, so the example above is outdated again.  (You can see the updated example at the top of lightkurve/prf/tpfmodel.py.
I implemented a convenience function which uses the API with some default assumptions as follows:
from lightkurve import KeplerTargetPixelFile
tpf = KeplerTargetPixelFile("kplr008462852-2013098041711_lpd-targ.fits.gz", quality_mask='hardest')
pp = tpf.prf_photometry(cadences=range(1650, 1800))
pp.plot_results()

You can also simply do:
lc = tpf.to_lightcurve(method='prf')

...but please don't assume it will work great out of the box yet, we'll have to tune the default assumption on the priors.
Bonus: PRFPhotometry.run() now fits cadences in parallel using multiprocessing.
This is getting really close to being merged.  Please review!

I can confirm that the example in tpfmodel.py runs smoothly. (I tried different combinations of fit_focus, fit_motion, fit_background)

Thanks @mirca !!  I expect to merge this later today after a few final improvements.
There is some work to do. In particular, we need tutorials, we need to add uncertainties, and we need to think about how to include a data-driven PSF approach, e.g. using tensorflow.  But we can develop those technologies in the background and in separate packages.  In meanwhile, @amcody & friends can start experimenting with this API!

@mirca YOU ARE MY HERO!!  The background-fitting performed really poorly while I was writing a tutorial yesterday, so I turned it off by default for now.  However: I was fitting tpf.flux instead of tpf.flux + tpf.flux_bkg.  Thanks for the suggestion to use the latter, that does work way better!
Turning background fitting back on by default when I push the next commit.  Thanks++++. :+1: :+1: :+1:

I added a first PRF photometry tutorial (2.10-how-to-use-prf-photometry.ipynb), and convinced myself that the API is good enough to be merged as an experimental feature ahead of the start of today's K2 Supernova Workshop!   When PSF photometry is used, a warning message is sent to logging regarding the experimental nature.
I am going to merge this now and start separate PRs on future improvements, most notable the addition of support for uncertainties (cf. https://github.com/barentsen/lightkurve/pull/2 )

@barentsen the AppVeyor build seems stuck, but Travis is happy, we should merge! =D

@barentsen Something is going wrong, as we are getting a flat light curve with a particular [non-zero] flux value. But so far we have only made psf photometry attempts on M35, and unfortunately the background prior is hiccuping because it is set to 'nan' in Campaign 0. I guess I will manually specify the bg prior to get around this for now.

Question: how is the flux prior range being determined? Because the example that I just tried picked a very large range of values (uniform prior). I guess I can dig into the code, but thought you might have a quick answer.


Urgent! Can't use vanilla event listeners w/ barba (using function to re-init scripts on newPageLoad)

Hi,
Super close to a deadline here. I went to add event listeners & suddenly everything is going wrong.
I keep getting "Cannot read property 'addEventListener' of null" on any event listeners. jQuery works fine however... although I really can't afford to add the library just for this case.
I'm assuming it's just firing before they are available to attach to, so I've tried all sorts of load listeners & events... no cigar just yet.
Any idea what I can do? Thank you in advance :)

window.addEventListener("load", function () {
   Barba.Dispatcher.on('transitionCompleted', function(currentStatus, oldStatus, container) {
        reInitializeScripts();
    });
}

function reInitializeScripts() {

  let nextButton = document.querySelector(".swipe-button-next"),
      backButton = document.querySelector(".swipe-button-prev"),

      nextButtonText = document.querySelector('.swiper-button-next-text'),
      backButtonText = document.querySelector('.swiper-button-back-text'),

      nextButtonStroke = document.querySelector('.swiper-btn-next-stroke-clr'),
      backButtonStroke = document.querySelector('.swiper-btn-back-stroke-clr');

      nextButtonArrow = document.querySelector('.fuego-button-arrow-next'),
      backButtonArrow = document.querySelector('.fuego-button-arrow-back');

  TweenMax.set([nextButtonStroke, backButtonStroke], {drawSVG: "0% 0%"});

  let nextButtonTL = new TimelineMax({paused:true, reversed:true}),
      prevButtonTL = new TimelineMax({paused:true, reversed:true});

  nextButton.addEventListener('mouseover', function() {
    nextButtonTL.to(nextButtonStroke, 0.52, {
      drawSVG:"100% 0%"
    }, 0);
    nextButtonTL.to(nextButtonText, 0.52, {
      color:"#DA8978"
    }, 0);
    nextButtonTL.to(nextButtonArrow, 0.52, {fill:"#DA8978"}, 0);
    nextButtonTL.play();
  });

  backButton.addEventListener('mouseover', function() {
    prevButtonTL.to(backButtonStroke, 0.52, {
      drawSVG:"0% 100%"
    }, 0);
    prevButtonTL.to(backButtonText, 0.52, {
      color:"#DA8978"
    }, 0);
    prevButtonTL.to(backButtonArrow, 0.52, {fill:"#DA8978"}, 0);
    prevButtonTL.play();
  });

  nextButton.addEventListener('mouseout', function() {
    nextButtonTL.reverse();
  });

  backButton.addEventListener('mouseout', function() {
    prevButtonTL.reverse();
  });
}

Hello @smallio ,
sorry it's not clear exactly what your problem is.
Can you expand on it a little bit?

Hey @luruke first of all love barba! It's pretty much all I use :)
So basically as mentioned (& with all ajax projects) I wrap listeners and other scripts that need to run on pages & call via "transitionCompleted" or "onNewPageReady".
Pretty much always used jQuery but this site has to be Vanilla due to loading times. When I use event listeners I can't seem to get the elements at the right stage, no matter what I do I keep getting "Cannot read property 'addEventListener' of null"... even after calling reInitScripts (which contains the listeners) wrapped a function such as DOM is loaded, surely that would mean the elements are available to attach stuff to but apparently not... However using jquery to call functions like below seems to work fine:
 $(".swipe-button-next").mouseenter(swipeNextHoverIn);   $(".swipe-button-prev").mouseenter(swipeBackHoverIn);
I'm stumped!!! Super frustrating aha.
Maybe you've seen this behaviour?

Hi @smallio ,
when you use the jQuery selector, dom elements are wrapped in a jQuery object and this prevent any error like adding a listener to a element that does not exists in the page. That's one of the beauty of jQuery.
Your vanilla code search for elements with document.querySelector and then attach an event listener to them but without checking if the elements exist.

Hey @gfnool :)
I actually did not know that... awesome thank you :) However I'd love to know how you can make it work with vanilla. I'm gradually moving over to purely vanilla just to get better at not using libraries so I'd love to know how you'd get past this in barba. If you or @luruke could shed some light on that I'd be forever thankful as I use barba for almost every project.
:) have a great day.

Hi @smallio,
I do not see anything wrong with your code.
You can find here a small working example.
Just Barba, with a button and listeners…
I think the problem is elsewhere… :/

Thank you guys, I'm going to try and bring everything to a new project & see what the problem was.
One other question... All my page transitions are gsap timelines & one page has a slider on it. When you refresh/reload the same page manually via the browser refresh icon the slider gets destroyed. Is there anyway to trigger the reload of the timelines in this case? Been looking at "window.onbeforeunload" but I'd love to know what you all do.

I actually did not know that... awesome thank you :) However I'd love to know how you can make it work with vanilla. I'm gradually moving over to purely vanilla just to get better at not using libraries so

I guess that you are using the same script on every page, listening the transitionCompleted event, but not every page contains all the elements that are initialized in your script.
For example, if a page does not contain the '.swipe-button-next' element, the variable will be null and therefore the addEventListener method will thrown an error.
You have to test it before like this:

var nextButton = document.querySelector(".swipe-button-next");

if(nextButton != null)
    nextButton.addEventListener(...);

Otherwise you can run specific code based on different namespace, have a look at the View documentation here: http://barbajs.org/views.html
In the same way you have to destroy everything when the old container is removed, to prevent memory leaks or duplicated listeners.
Do not get me wrong, but Barba has nothing to do with this problems. These are common patterns of a Single Page Application and you should understand the plugins/modules lifecycle better before using them.

Thank you guys, I'm going to try and bring everything to a new project & see what the problem was.
One other question... All my page transitions are gsap timelines & one page has a slider on it. When you refresh/reload the same page manually via the browser refresh icon, the slider gets destroyed. Is there anyway to trigger the play of the timelines on refresh? The home page replays timelines just not the other pages.
I've been looking at "window.onbeforeunload" but I'd love to know what you all do.

I personally do not ever used window.onbeforeunload in my life.
If the user click the browser's refresh button it's absolutely ok to reload the page

@gfnool Thank you for the great replies. I do use view & my code is modified for each page, but I must have missed something.
Regarding your second reply, yup I wouldn't want to stop that, I'm just wondering what the best way of re re-firing the pages barba transition is?
Cheers!

If you want to show an animation on page refresh you do not have to use a barba transition. That's simply an animation on page start, for example entering a View or starting a Tween timeline attached to a dom element on the page.

If you want to show an animation on page refresh you do not have to use a barba transition. That's simply an animation on page start, for example entering a View or starting a Tween timeline attached to a dom element on the page.

Okay fantastic, I thought so! Cheers for all the help @gfnool :)

Ok everything is working now with no problems between page transitions (yay!!!) Thank you all for the knowledge :)
One last issue with this (I promise this is the last lol), when I refresh any page after the animation has finished I need my hover/click events to work.  The pages I get that error on are the ones that have no global hover/click events stored in "reInitializeScripts()".
Do you guys compartmentalise your hover/clicks in separate function wraps then call them via views depending on what is needed on the page & then again for page refreshes use the same functions to call via load/DOM content loaded calls?
Sorry for the TLDR, just want to make sure I get this right for the future!!
<3

100% fixed guys! Sorry for the long thread & thank you for being patient.
Fixed by separating into modules & calling via views :) (also 1 typo lol)
Cheers & thank you for the fantastic work on Barba :)

Glad to hear! 👍


Stylized scrollbar [minor fix]

Feature description
When i see the scrollbar on our extension it makes you feel it's a bit old or not properly sized.

Describe the solution
Can we gat something in style, like:

Describe alternatives
No response
Additional context
No response
Are you working on this?
None

Is it open for contribution?

we hide scrollbar for now. there will be no scrollbars shown in popup's


Configuration being ignored somehow?

Hey!
I've been trying to make use of this action, initially to show a preview of how release notes will look, as a comment in each PR.
My workflow yml is: https://github.com/Hammerspoon/hammerspoon/blob/master/.github/workflows/pr_release_note_preview.yml
and the configuration file is: https://github.com/Hammerspoon/hammerspoon/blob/master/.github/workflows/release_notes_config.json
I'm pretty sure they are correct, and I have a checkout action, but the comments that get put on PRs just say "* no changes", see: https://github.com/Hammerspoon/hammerspoon/pull/2691#issuecomment-789693712
I think that indicates that my configuration json isn't being applied properly, because I specified a different empty_template
If it helps, this should show the Actions run that produced that comment, with debug logging enabled: https://github.com/Hammerspoon/hammerspoon/runs/2022165003?check_suite_focus=true
What am I doing wrong? :)

Sorry, I was being dumb and had an error in the JSON after I'd last validated it. Thanks!

@cmsj anything we can improve in the messaging for that case?
Currently the warning is logged like this:
⚠ Configuration provided, but it couldn't be parsed. Fallback to Defaults.


Api

Phoscon gw unlock Gateway and set Exposé to obtain an api key
what i do wrong
it have work since yesterday

I had to revert to 1.0.2 and also the deConz 2.22.02. There are so many issues with 1.0.3 + 2.23.x / 2.24 that I lost all my setup and nothing connects between homebridge and deconz anymore.


Collateral Damage (Shrapnel)

When you have 2 jewels (100% chance to double damage) , it seem not be calculated in the dps.

When looking at Shrapnel Shot you have to select the "Cone" instead of the "Arrow".

You are right I missread and it work with the cone  TY !


More compatibility fixes for 0.3.0

Need to check them more thoroughly. But do you really have access to 80GB of RAM on your OSX laptop????
Peak memory on linux seems to be about 79 GB..... from 2.44 at rest.

But do you really have access to 80GB of RAM on your OSX laptop????

No, just 16GB 🤔


Refactoring beacon

Remove the majority of the crufty code in opportunities/util and migrate it to various classes
Add more class methods/form methods to further shrink the views
Still TODO: write some unit tests for the new class methods

@hamhands can you take a look at this? I'd like to get it merged as it will make working on Beacon a bit easier in the longer term.

Cool, LGTM :+1:


Formatter function prop in traction-input

Added 'formatter' property in traction-input  - a function that determines how the value to be displayed in traction-input
Added unit test case for formatter property
Use case in PacbioRunWellEdit

@stevieing @BenTopping I have added a 'formatter' prop to traction-input and added unit test cases as well. It would be great if you can check whether it is working in the real context/ page it is displaying


feat(script/env_check): check overriden NFS version

Which issue(s) this PR fixes:
Issue longhorn/longhorn#9830
What this PR does / why we need it:
Though the node supports NFSv4, the NFS client picks the protocol version by Defaultvers defined in nfsmount.conf. This may cause problem while using backup-related features.
This change is kind of a backport version of longhorn/cli#129. It is needed since Longhorn v1.6 is still maintained, while longhornctl check preflight is provided after v1.7.
Special notes for your reviewer:
Additional documentation or context

@mergify backport v1.7.x

@mergify backport v1.6.x

My bad. We don't need to implement this in master and v1.7.x, because we've implemented it in the CLI.


created a yes/no pop-up window when exiting application #8

Issue Number 8
ISSUE 8
fixes # created a yes/no pop-up window when exiting the application
Describe the changes you've made
I have added an messagebox that pops up at the time of exiting the application asking to confirm whether the user really wants to exit the application
Describe if there is any unusual behaviour of your code(Write NA if there isn't)
NA
Additional context

worked on the above issue

The same mistake again @shashwat-2077.
What I want to say is, when I typed #13 it becomes blue. When you hover blue hashtag it shows the issue or pull request associated with the text. You have to do this.
Now, reply by typing #13 so it becomes blue. Let's see did you got it this time or not.

Fine.
One more thing, before working on any issue always ask the project admin to assign you that issue.

@shashwat-2077 ping me in issue number 8 thread so I can assign you.


Convert Docs for the Junit5

Convert inline example code to use codeinclude macro for the JUnit5 Testframework documentation.
See #1158 for more details.

Difference in the docs, left (old) contains the inline code, right (new) was generated from the unit tests.

Merged - thanks @raynigon!


Change directory layout to support 'go get' for the nats client commands

With this, we can do: go get github.com/nats-io/nats/…
and these go binaries will be built in $GOPATH/bin

No "go install" is needed. Currently these are treated as examples, and are not built. Some or all could be moved to be client commands which user can easily get to help testing and validating gnatsd with the suggested change. It is more of a WIP PR, need related doc changes.

I think we can add some of these to server (gnatsd) codebase to install and have some utilities. Don't think we do that at the Go client layer.

SGTM


I can't run frontend server with yarn dev

here is screenshot
Could you tell me who is know this problem?

Could you tell me what branch I should fork? @MaxMillington

@forbesus stage. Make sure to run build back

I am still getting same error.
Could you check it? @MaxMillington

Also I check this error is displaying now @MaxMillington

@forbesus are you building from the web directory or the root?

I am building on root directory
But I analyzed error and it said error is occurring on packages/web so I tried on web directory once

I am getting error on root directory exactly @MaxMillington

What branch are you on? This type error should be fixed on stage branch.

I remove source code on local and re-forked repo again
It work well now
Thank you for your support @jonator and @MaxMillington

I need one help
Could you tell me how to install new npm module?
@jonator @MaxMillington


The CPU feature is failing for containers in kernels 4.x

The cgroup node for cpu stats was called cpuacct before 4.x, now it's called cpu,cpuacct.

#37 fixes this.


Ignore dynamic (random) project data

Does not make sense to index the dynamic data from random projects.

Absolutely not. This is a planned section of the page, along with the Incubating Projects section below it. This stays.
If you have a major change to suggest, don't make a PR, make an issue out of it, where it can be discussed. PRs for errors are one thing, PRs for dismissing planned designed changes just because you don't like them are way outside your purview @sebbASF

Re-opened, and merging.