Support custom tokens for Giveth (not third party) projects

[ ] Set a field name supportCustomToken to organization table ( with false as default value)
[ ] Write a migration file to set this field true giveth and trace organization
[ ] In donation table we should add a field isTokenEligibleForGivback
[ ] in saveDonation mutation we should check if sent token is not in project(organzation) token list , we check if organization support custom token we allow user to donate but we set isTokenEligibleForGivback:false  for this donations ( other donations should have isTokenEligibleForGivback:true )
[ ] Return organization (join table) in projects query response
[ ] Return organization (join table) in projectById query response
[ ] Return organization (join table) in projectBySlug query response

The isTokenEligibleForGivbacks should go in the token table also too no?
Maybe other tokens might be in the list but not elegible for givbacks. Correct me if I am wrong with the business logic.
Everything else seems good.
Do we still use projectByAddress ? if so we should also return the organization there.

The isTokenEligibleForGivbacks should go in the token table also too no? Maybe other tokens might be in the list but not elegible for givbacks. Correct me if I am wrong with the business logic.
Everything else seems good. Do we still use projectByAddress ? if so we should also return the organization there.

Thanks, nice suggestion about projectByAddress
isTokenEligibleForGivbacks can't be in token, because a token can be eligible for givback for an organization but for another organization it can be not-eligible, so when creating donation we should consider that and fill this field in donation ( and givback-calculation would check that field

@RamRamez
After merging PR of this issue you can get organization when getting project/projects
example:
query{
  projectBySlug(slug:"how-many-photos-is-too-many-photos"){
    slug
    slugHistory
    updatedAt
    listed
    id
    title
    traceCampaignId
    totalReactions
    totalDonations
    image
    totalTraceDonations
    status{
        id
        name
    }
    organization {
    name
    label
    supportCustomTokens
    }
  }
}

projectByAddress

I asked @RamRamez  and he said they dont use projectByAddress in frontend

The isTokenEligibleForGivbacks should go in the token table also too no? Maybe other tokens might be in the list but not elegible for givbacks. Correct me if I am wrong with the business logic.
Everything else seems good. Do we still use projectByAddress ? if so we should also return the organization there.

Thanks, nice suggestion about projectByAddress
isTokenEligibleForGivbacks can't be in token, because a token can be eligible for givback for an organization but for another organization it can be not-eligible, so when creating donation we should consider that and fill this field in donation ( and givback-calculation would check that field

I asked @RamRamez and he said they dont use projectByAddress in frontend

@mateodaza PRojects now have a column called isImported which tells you if its a third party project.
But you should check the organization to know from where it is.
This are the labels.
export const ORGANIZATION_LABELS = {
  GIVETH: 'giveth',
  TRACE: 'trace',
  CHANGE: 'change',
  GIVING_BLOCK: 'givingBlock',
};

@CarlosQ96 cool yes! I saw, but I mean the ID, maybe we need that?

For now it's
givingBlocksId
changeId
traceCampaignId

For now it's, Change also has an id. changeId

ok! maybe consider moving that to the organization field it's gonna be cleaner for the frontend to read

Yeah but the organization ID is per project so I can't move it to the org.


Proxy option "target" doesn't redirect to external URLs

The request that is generated when attempting to proxy to an external API redirects to localhost.
Reproduce with the following:
nuxt.config:
modules: [
    '@nuxtjs/axios',
    '@nuxtjs/proxy'
  ],
  axios: {
    proxy: {
      '/geo': {target: 'http://freegeoip.net/json', pathRewrite: {'^/geo': ''}}
    }
  }

component.vue:
export default {
  async created () {
    const location = await this.$axios.$get('/geo')
    console.log(location)
  }
}

Throws a 404 with the following request headers in the call:
Request URL: http://localhost:3000/json/
Request Method: GET
Status Code: 404 Not Found

This question is available on Nuxt.js community (#c4)

hey anyone doese something about that? @gorango did you have any workaround?

It works well. @appinteractive @gorango
component.vue
async asyncData ({ $axios }) {
  let { data } = await $axios.get('/api/')
  return {
    prices: data.data
  }
}

nuxt.config.js
modules: [
  '@nuxtjs/axios',
  '@nuxtjs/proxy'
],
axios: {
  proxy: true
},
proxy: {
  '/api/': {
    target: 'http://api.travelpayouts.com/v2/prices/latest',
    pathRewrite: {'^/api/': ''} }
}

Thank you very much @llavre .
It was not clear for me while reading the documentation that proxy is a property of exported object in nuxt.config.js . I was trying to include it in the module options ...
Thank you very much for clarification.

@gorango you configuration is wrong...
See https://axios.nuxtjs.org/options#proxy
@abumalick in the module options you only change the default values.
If you do not set the proxy property the module will not start https://github.com/nuxt-community/proxy-module/blob/master/lib/module.js#L10

@pi0 I think we can close this

@gorango I think we can close this

@manniL, @pi0 can close this?

hey, I am currently working a nuxtjs project where i have to fetch some data from an api. i am getting cors issue. I tried adding @nuxt/proxy and configure proxy by using array like :
proxy: ['https://dev[id].service-now.com/api/now/v1/*/']** and sometimes ago i did it and it worked somehow and i didnt understood it how it worked. and now working on new project it doesnt work. can someone help me.
The api i am trying to access is :  https://dev[id].service-now.com/api/now/table/incident

Hi i have some problem with nuxt.config.js
  proxy: {
    '/api/': {
      target: process.env.API_URL,
      pathRewrite: {
        '^/api': ''
      }
    }
  },

and error
 ERROR  [HPM] Missing "target" option. Example: {target: "http://www.example.org"}                                         12:12:03

  at Object.createConfig (node_modules/http-proxy-middleware/lib/config-factory.js:43:11)
  at new HttpProxyMiddleware (node_modules/http-proxy-middleware/lib/index.js:17:30)
  at module.exports (node_modules/http-proxy-middleware/index.js:4:10)
  at proxy.forEach (node_modules/@nuxtjs/proxy/lib/module.js:63:30)
  at Array.forEach (<anonymous>)
  at ModuleContainer.proxyModule (node_modules/@nuxtjs/proxy/lib/module.js:61:9)
  at ModuleContainer.addModule (node_modules/@nuxt/core/dist/core.js:190:34)
  at ModuleContainer.requireModule (node_modules/@nuxt/core/dist/core.js:133:17)
  at ModuleContainer.axiosModule (node_modules/@nuxtjs/axios/lib/module.js:106:10)
  at ModuleContainer.addModule (node_modules/@nuxt/core/dist/core.js:190:34)

but if im replace process.env.API_URL with direct url its work, how to use process.env. ?

process.env reads the environment variables.
You can use this to add some env variables for your project easily:
https://www.npmjs.com/package/dotenv
I believe that adding an file ".env" with your api url and adding
"require('dotenv').config()" on the top of your nuxt config should do the
trick
On Wed, Feb 26, 2020, 7:12 AM yogi saka<EMAIL_ADDRESS>wrote:

Hi i have some problem with nuxt.config.js
proxy: {
'/api/': {
target: process.env.API_URL,
pathRewrite: {
'^/api': ''
}
}
},
and error
ERROR  [HPM] Missing "target" option. Example: {target: "http://www.example.org"}                                         12:12:03
at Object.createConfig (node_modules/http-proxy-middleware/lib/config-factory.js:43:11)
at new HttpProxyMiddleware (node_modules/http-proxy-middleware/lib/index.js:17:30)
at module.exports (node_modules/http-proxy-middleware/index.js:4:10)
at proxy.forEach (node_modules/@nuxtjs/proxy/lib/module.js:63:30)
at Array.forEach ()
at ModuleContainer.proxyModule (node_modules/@nuxtjs/proxy/lib/module.js:61:9)
at ModuleContainer.addModule (node_modules/@nuxt/core/dist/core.js:190:34)
at ModuleContainer.requireModule (node_modules/@nuxt/core/dist/core.js:133:17)
at ModuleContainer.axiosModule (node_modules/@nuxtjs/axios/lib/module.js:106:10)
at ModuleContainer.addModule (node_modules/@nuxt/core/dist/core.js:190:34)
but if im replace process.env.API_URL with direct url its work, how to
use process.env. ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nuxt-community/proxy-module/issues/3?email_source=notifications&email_token=AB75GYIUYLNVRAJRHVABWJLREYB3ZA5CNFSM4EUWCB52YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM66GXY#issuecomment-591258463,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB75GYNMWVQ6CGJ4ZIKCPK3REYB3ZANCNFSM4EUWCB5Q
.

Thank you very much @abumalick, im just need add
require('dotenv').config()
on the nuxt.config.js its work, i tink im just need add '@nuxtjs/dotenv' on module but need declare on top too. thanks.
modules: [
    // Doc: https://github.com/nuxt-community/dotenv-module
    '@nuxtjs/dotenv',
    // Doc: https://axios.nuxtjs.org/usage
    '@nuxtjs/axios',
  ],

Hi, I have a problem about proxy in nuxt.config.js for CORS.
This code can work.
proxy: {
   '/api/': { target: process.env.PRIMARY_API, pathRewrite: { '^/api/': '/' } }
}

But I want to use multiple proxy.  For example,
proxy: {
  '/api/': { target: process.env.PRIMARY_API, pathRewrite: { '^/api/': '/' } }
  '/api2/': { target: process.env.SECONDARY_API, pathRewrite: { '^/api2/': '/' } }
}

But It can't work.  How can I use multiple proxy?

I wanna know as well

It's also not working for me
my spa url is localhost:9430, while proxy url is localhost:9431
export default {
modules: [
    '@nuxtjs/axios',
    '@nuxtjs/pwa',
    '@nuxtjs/proxy',
  ],

  axios: {
    proxy: true,
    credentials: true,
  },
  proxy: {
    '/backend': {
      target: 'http://localhost:9431',
      pathRewrite: { '^/backend': '/' },
    },
  },
}

const loginCredentials = {
  email: this.email,
  password: this.password,
}
await this.$axios.get('/backend/sanctum/csrf-cookie').then(() => {
  this.$axios
    .post('/backend/login', loginCredentials)
    .then((response) => {
      console.log(response)
    })
})

i getting following response from browser
Error occured while trying to proxy to: <IP_ADDRESS>:9430/sanctum/csrf-cookie

It's also not working for me
my spa url is localhost:9430, while proxy url is localhost:9431
export default {
modules: [
    '@nuxtjs/axios',
    '@nuxtjs/pwa',
    '@nuxtjs/proxy',
  ],

  axios: {
    proxy: true,
    credentials: true,
  },
  proxy: {
    '/backend': {
      target: 'http://localhost:9431',
      pathRewrite: { '^/backend': '/' },
    },
  },
}

const loginCredentials = {
  email: this.email,
  password: this.password,
}
await this.$axios.get('/backend/sanctum/csrf-cookie').then(() => {
  this.$axios
    .post('/backend/login', loginCredentials)
    .then((response) => {
      console.log(response)
    })
})

i getting following response from browser
Error occured while trying to proxy to: <IP_ADDRESS>:9430/sanctum/csrf-cookie

It's also not working for me
my spa url is localhost:9430, while proxy url is localhost:9431
export default {
modules: [
    '@nuxtjs/axios',
    '@nuxtjs/pwa',
    '@nuxtjs/proxy',
  ],

  axios: {
    proxy: true,
    credentials: true,
  },
  proxy: {
    '/backend': {
      target: 'http://localhost:9431',
      pathRewrite: { '^/backend': '' },
    },
  },
}

const loginCredentials = {
  email: this.email,
  password: this.password,
}
await this.$axios.get('/backend/sanctum/csrf-cookie').then(() => {
  this.$axios
    .post('/backend/login', loginCredentials)
    .then((response) => {
      console.log(response)
    })
})

i getting following response from browser
Error occured while trying to proxy to: <IP_ADDRESS>:9430/sanctum/csrf-cookie

@devlim Hi, did you find any solution? I am stuck in it for last 10 days! I'll be glad if you can share your thoughts.
I am using nuxt 2.15, ssr and stuck for social login issue. I am using local scheme for authentication with @nuxtjs/auth-next.
I am facing the exact issue! proxy config is not replacing the 'apiv1' with target!
Thanks in advance!

Hi @codeperl ! Did you find any solution yet ? I'm dealing with the exact same problem


[Update] Table top translationFactor doc

This PR updates the TableTopSceneView.init(anchorPoint:translationFactor:clippingDistance:sceneView:) doc with more info that can be found in the Implement tabletop AR conceptual doc.
Linked Issue(s)

swift/issues/6175

@yo1995 You mentioned also adding this text to step 1 of the tutorial, but it made it rather cluttered since there can only be one caption paragraph. If you are still in favor of adding the tutorial, I think it would be worth breaking step 1 up. Let me know what you think!

I think adding it to the API reference is more important, and I like the changes in this PR so far.
I'd like to know Destiny's opinion on updating the tutorial. I prefer a slightly colloquial explanation (maybe a new step) in the tutorial, giving a numeric example of how to set the translation factor.

I think adding it to the API reference is more important, and I like the changes in this PR so far.

Agreed.

I'd like to know Destiny's opinion on updating the tutorial. I prefer a slightly colloquial explanation (maybe a new step) in the tutorial, giving a numeric example of how to set the translation factor.

Updating the tutorial with a new step would be beneficial. The tutorial currently does not follow this formula to determine the translation factor so that would need to be updated. The image example shows a scene on a table (< 1 meter wide) with a clipping distance of 400, so the translation factor should be 400 meters / 1 meter = 400 translation factor.

I tried to fit it into step 1 following a suggestion from Ting and also update the tutorial to use a 400 translation factor. Let me know what you think.

Thank you both!


Spending from Exchange with zero balance

While working on my taxes I found something that is kind of concerning.
Example:
Say you have 1 BTC and two Exchanges defined in RP2: E1 and E2.
Your 1 BTC was purchased and resides on E1 (according to the RP2 spreadsheets).
But then record a transaction to SELL 1 BTC from E2. (Remember, E2 should have no BTC.)
A few problems are encountered when you run RP2:

There is no error/warning of "overspending" for E2.
In open_positions.ods the "Asset" tab will list that you still have 1 BTC, even though you actually have zero BTC.
In open_positions.ods the "Asset - Exchange" tab will list that you have 1 BTC on E1, and will not list E2 at all. (But E2 should have a balance of negative 1 BTC, right?)
In both of these tabs cost basis is shown as zero because it has all been "spent".

This is quite confusing and concerning. One could have bad data in the input spreadsheet and never notice it because there are no errors/warnings and open_positions.ods does not reflect what should be a negative balance on "over-spent" exchanges.
Please understand I don't mean this to be critical. This is open-source, free software, and I'm well aware that I have not paid anything for it or directly contributed to writing it. I am very grateful to have it, but felt it was still important to report the issue.
Thanks!

For issue 1, can you provide a simple ods and config file reproducing the issue?
For the other issues, CC: @mdavid217, who worked on the open position plugin.

Sure!
First of all, I made a small change to my original post to change "warning" to "error/warning" as, in retrospect, I think an error may be more appropriate. (Warnings can easily be missed, but there is no getting past an error.)
I have created an ODS and config file to reproduce the issue, however, I did realize in doing so that what I wrote above is not totally correct. A few points.
Regarding #1, there are no errors/warnings (as mentioned above):
INFO: Country: us
INFO: Generation Language: en
INFO: Accounting method: fifo
INFO: Configuration file: Config_Test.ini
INFO: Input file: RP2_Input_Test.ods
INFO: Processing BTC
INFO: Generating output for plugin 'rp2.plugin.report.open_positions'
INFO: Plugin 'rp2.plugin.report.open_positions' output: /mnt/h1/_Data/Financial/Crypto/RP2_CryptoTax/Config_Test/output/fifo_open_positions.ods
INFO: Generating output for plugin 'rp2.plugin.report.rp2_full_report'
INFO: Plugin 'rp2.plugin.report.rp2_full_report' output: /mnt/h1/_Data/Financial/Crypto/RP2_CryptoTax/Config_Test/output/fifo_rp2_full_report.ods
INFO: Generating output for plugin 'rp2.plugin.report.us.tax_report_us'
INFO: Plugin 'rp2.plugin.report.us.tax_report_us' output: /mnt/h1/_Data/Financial/Crypto/RP2_CryptoTax/Config_Test/output/fifo_tax_report_us.ods
INFO: Log file: ./log/rp2_2024_03_02_17_01_17_447657.log
INFO: Generated output directory: output/
INFO: Done

But regarding the other issues, it makes a difference whether the coin is fully spent or only partially spent.
In the former case, if the coin (in the sample: BTC) is fully spent, it will not show up at all in open_positions.ods. To test this set crypto_out_no_fee to 1 to fully spend the BTC.

In this case "Asset - Exchange" looks like this:

And "Asset" looks similar:

This could be considered correct behavior for open_positions.ods.
But in the latter case, if the coin is only partially spent, it will show up in open_positions.ods, but with very confusing results. (The results seem to indicate that you have not spent anything, though the cost basis will show that you have.) To test this set crypto_out_no_fee to 0.99999 to partially spend the BTC.

In this case "Asset - Exchange" looks like this:

And "Asset" looks like this:

Since overall there should only be 0.00001 BTC remaining, I'm sure you can see how this is confusing. In the absence of any error when generating the output (which I think would be the ideal behavior), is it possible to show a balance of -0.99999 for E2 in "Asset - Exchange" and a balance of 0.0000 for total BTC in "Asset"?
Hopefully this makes sense. Thanks for looking into this!
Config_Test.zip

Thanks for reporting the bug and providing the repro files! It does look like a missing check. The Account Balances table in rp2_full_report shows a balance for E2 of -0.99999.

No problem!
Ah, good to know that rp2_full_report.ods includes that info. I have typically not looked at that sheet, but will do so going forward to make sure I don't have any negative balances.
Thanks!

The negative balance issue has been fixed with commit aa39258. Now at balance creation time there are a new check to ensure the balance never goes negative (these checks can be disabled with the new -n switch).
@gbtorrance could you verify the fix? Thanks.

Thanks @eprbell! I will give it a try.
But to be clear, is there a new build to install or do I need to build from source?

There is no new release yet, so you need to use top of tree.

OK, thanks @eprbell. It may take me a bit to get around to testing this, but I will do so. (Hopefully this week.)

No worries, take your time!

@eprbell I'm looking into testing this now. Following the Development README I've cloned the source, installed all the dependencies, and successfully executed the unit tests. But I'm not a Python guy, and I'm not sure how to actually execute rp2_us from the source. Can you assist? Thanks. (BTW, I'm on Linux.)

Sure:

open a shell window
cd /tmp/
git clone https://github.com/eprbell/rp2
cd rp2/
follow these instructions: https://github.com/eprbell/rp2/blob/main/README.dev.md#setup-on-ubuntu-linux
use rp2_us normally

Thanks @eprbell!
OK, I've tested and it seems good to me. I've tested both with and without the -n flag, on input that has negative exchange balances and input that does not have negative exchange balances ... and it operates as expected in all cases.
To be thorough, the open_positions.ods sheets will still present potentially confusing results when the -n flag is provided and exchanges hold negative balances (as described in points 2 - 4 of the original post). But given that rp2_us now defaults to providing an error in the case of negative exchange balances, I'd say this is very minor.
Thank you so much for making the change. Much appreciated!

I added the flag because there were a few unit tests...

Makes sense.

Is it OK to close the issue?

Yes, please go ahead ! Thanks again.


Add new citation: Numeroso et al.

Hi all, I've added a new reference to a paper of mine related to counterfactual explanations for molecule predictions. I hope this is appreciated :)
Link to paper: https://arxiv.org/abs/2104.08060

Hi @danilonumeroso,
This is super cool stuff. Feel free to add other papers :)
Thank you for your contribution!
Benedek


creating a new feature to make package generate other routes without having 'api' middleware

Hi @AndreasElia
I am considering if we can add a new feature to make it possible to generate routes without having 'api' middleware only.
I saw  in ExportPostmanCommand file that the package has this line of code :

 if (empty($middleware) || ! in_array('api', $middleware)) {
                    continue;
 }

I think hard coding the 'api' and just generating postman collection only for routes that have 'api' middleware is not a good way. In my project I have about 200 routes but the package can only generate roughly 20 routes in the exported collection.
I noticed that that's because other routes didn't have 'api' middleware.

Hey @sepisoltani,
What would your ideal outcome be here to match your use case? Would you prefer "api" was in the config file or would an option to disable the api middleware check be better for you?

@AndreasElia My idea is to defining a new config in config file . for example : 'ignored_middlewares'
then in the package we can  check every route and then deny the one if it has middleware which exists in the 'ignored_middlewares' array.
I think 'ignored_middlewares' can have default value of 'web' . which ignore routes that hav 'web' middleware and users can add other middlewares in 'ignored_middlewares' array.

The issue with an ignored-first approach would be that nobody wants to have to enter all of the non-API related middleware that they wouldn't want included.
We would do an included-first approach, where it's something like included_middleware and that would be something like:
'included_middleware' => ['api'],

This would then allow you to add whatever middleware names you'd like to the list.
Unrelated to this comment, but related to this issue - Are you trying to include web routes within your Postman export?

@AndreasElia I do not need to include web routes in the postman collection . but I wanna include routes with custom middlewares . something like this :

 Route::group(['middleware' => ['web_service', 'role:user']], function () {

});

'included_middleware' would be nice

@sepisoltani new config option added in v1.6.4

@tomirons 👍


Add tourism to internal datasets

🚀 Feature Request
We want to add tourism with different frequency modes to internal datasets. It contains 366 monthly series, 427 quarterly series and 518 yearly series.
Proposal

Add tourism to datasets_dict with monthly, quarterly, yearly frequencies:

datasets_dict = {
    "tourism_monthly":  {
        "get_dataset_function": partial(get_tourism_dataset, dataset_freq="monthly"),
        "freq": "MS",
        "parts": ("train", "test", "full")
    },
    "tourism_quarterly":  {
        "get_dataset_function": partial(get_tourism_dataset, dataset_freq="quarterly"),
        "freq": "Q",
        "parts": ("train", "test", "full")
    },
    "tourism_yearly":  {
        "get_dataset_function": partial(get_tourism_dataset, dataset_freq="yearly"),
        "freq": "Y",
        "parts": ("train", "test", "full")
    },
}

Add get_tourism_dataset function for loading tourism dataset. We have to add dataset description and reference link to docstring:

def get_tourism_dataset(dataset_path: Path, dataset_freq: str) -> None:

Dataset has no missing values.
We have to create custom timestamps, because TSDataset can't work with series that have different last dates. We should also save real timestamps as exogenous data (like in M3 dataset).
We define train and test parts using original split (e.g. we have two files for quarterly freq from source: quarterly_in.csv (train part) and quarterly_oos.csv (test part)).

Test cases

Check tourism datasets statistics (number of segments, min/max dates).
Check tourism exog data statistics (shapes, dates).

Additional context
See https://github.com/etna-team/etna/pull/84 as an example.

Closed by https://github.com/etna-team/etna/pull/120.


Namespace refactor

Perform the following namespace renames:

Remove the document- prefix:

document-resources.activity-profile -> resources.activity-profile
document-resources.agent-profile -> resources.agent-profile
document-resources.state -> resources.state

Ensure all (object) namespaces are singular:

activities -> activity
activity-types -> activity-type
attachment-usage-types -> attachment-usage-type
verbs -> verb
versions -> version
rules -> rule

utils.json-schema -> json-schema

Move ::inline-or-iri and ::related-only-deprecated specs to new concepts.util ns.
Non-breaking changes:

:require reformat
Renames in test directories

@FeLungs Indeed, this is why I wanted to perform this ns refactor during this major update.


v3-beta7: ionic cordova platform outputs error / cordova commands broken

What version of the CLI are you using? Output of ionic --version
3.0.0-beta7
Short description of the problem:
Calling ionic cordova platform outputs an error:
> ionic cordova platform
[ERROR] Command not found: cordova

What behavior are you expecting?
Calling a command without the required parameters should either give you an interactive prompt or the help output to discover the parameters.
Steps to reproduce:

Install the v3-beta7 CLI
Start project, go into directory
Execute ionic cordova platform

Post the output of ionic info below please
  Your system information:
    Cordova CLI: Not installed
    Ionic Framework Version: 3.0.1
    Ionic CLI Version: 3.0.0-beta7
    ios-deploy version: Not installed
    ios-sim version: Not installed
    OS: Windows 10
    Node Version: v7.9.0
    Xcode version: Not installed

Same output for ionic cordova platform list although it is mentioned in ionic cordova platform --help as a valid action.

Same for ionic cordova platform add android:
> ionic cordova platform add android
\ Executing cordova command: cordova platform add android --save [ERROR] Command not found: cordova

I suspect all cordova commands are broken :/

https://github.com/driftyco/ionic-cli/tree/v3#existing-ionic2-project
Please execute the commands listed. This should solve the issue it appears that you do not have the new plugins installed.

I actually created a new project using the v3-beta7 CLI ionic start, so this shouldn't be necessary, right?
Part of the package.json of the project:
  "devDependencies": {
    "@ionic/app-scripts": "1.3.0",
    "typescript": "~2.2.1",
    "@ionic/cli-plugin-cordova": "0.0.12",
    "@ionic/cli-plugin-ionic-angular": "0.0.6"
  },

I executed the command from the link anyway (npm install --save-dev @ionic/cli-plugin-ionic-angular@beta @ionic/cli-plugin-cordova@beta), just to be sure:

No change to package.json (but reordering)
Some interesting output, maybe:

PS C:\Users\Jan\Documents\cliBeta7> npm install --save-dev @ionic/cli-plugin-ionic-angular@beta @ionic/cli-plugin-cordov
a@beta

><EMAIL_ADDRESS>postinstall C:\Users\Jan\Documents\cliBeta7\node_modules\@ionic\cli-plugin-cordova
> node ./bin/postinstall

You will need to install the following global dependencies in order to use this plugin.
npm install -g cordova ios-deploy ios-sim

<EMAIL_ADDRESS>C:\Users\Jan\Documents\cliBeta7
+-- UNMET PEER DEPENDENCY<EMAIL_ADDRESS>+--<EMAIL_ADDRESS>`--<EMAIL_ADDRESS>
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any
"} (current: {"os":"win32","arch":"x64"})
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none was installed.
PS C:\Users\Jan\Documents\cliBeta7>

@piotrowski Do you have Cordova installed globally? The CLI seems to think you don't. You seem to be on Windows, perhaps it's an issue with that.

Oh, you're right! Sorry...
For testing the CLI I switched to a new node version with nvm - and of course nuked my Cordova along the way. Now I installed it, and of course all the cordova commands are working.
I created #2103 as a request to improve this error message.

@piotrowski No worries! 😄


Convert dismissable_test.dart to ListView

This test was a bit tricky to convert because it subtly relied upon the
lazy evaluation of an Iterable.
The onDismissed from Dismissable happens during the animation phase of
the pipeline. Previously, the ScrollableList had already been built for
that frame but had not evaluated its Iterable yet. When we got to the
layout phase, ScrollableList evaluated its Iterable and saw the updated
version of dismissedItems.
A straightforward conversion to ListView calls toList() when building
the ListView, but that evaluates the iterable when buildTest() is
called, which is before the calls to pump and therefore before the
animation phase, meaning the Iterable sees the old value of
dismissedItems.
This patch fixes the test to use the normal setState pattern to signal
that state upon which the build depends has changed. Now, the
onDismissed callback happens during the animation phase and the
StatefulBuilder is marked as dirty via setState, which causes it to
rebuild the ListView and re-evaluate the Iterable, seeing the updated
version of dismissedItems.
This change also lets us replace the gratuious use of pumpWidget with
pump now that we use setState rather than pumpWidget to trigger a
rebuild.

@Hixie @HansMuller


Feature/94 daprclients

implement pubsub example. pls use readme.md to try it out.

Hi,
I am currently testing the PR and have some trouble to execute the DAPR example.
Especially, the DAPR publisher where it seems that there is a syntax error in this file (see attached screenshot).
My setup: Python3.9.2, DAPR 1.0.1 and PR commit: commit f06c92ac48d11d27910201a93bc35b6723c13520

updating pip3 to point to latest version of python3 installed did the trick to install the dependencies.
Now, I am able to start the DAPR executables, however, the DAPR subscriber does not get any data from the publisher.
Do I missed something to be executed? I see some messages from DAPR publisher to kuksa.val but no message appears at subscriber side (figure top right window).

using a virtual env solved the problem. I was able to verify the PR for both pub/sub and state-store.
So I verify the PR as ready to be merged


Always show commits count of default branch on tab

Gogs version: <IP_ADDRESS>3
Operating system: Debian Linux 8 amd64
Database:

[ ] PostgreSQL
[x] MySQL
[ ] SQLite

Description
When viewing a certain commit  in the history with: /<userorcompany>/<repo>/commit/<hash> the commits button at the top only shows the number of commits from the beginning until this commit instead of the total number of commits. Also when you click on the 'commits' button, it doesn't list all commits but only those instead. The button refers to: /<userorcompany>/<repo>/commits/<hash> instead of /<userorcompany>/<repo>/commits/master

confirmed with <IP_ADDRESS>9,
i think the number in the "commits" button should show the total number of commits in the repository at all times and the button should always link to <userorcompany>/<repo>/commits/<currentbranch>

//commits/

There is no such thing called currentbranch when view a commit. But I think we can use the default branch.

There is no such thing called currentbranch when view a commit. But I think we can use the default branch.

i think there should be, check github. the total number of commits updates based on the selected branch. on github the "commits" links to https://github.com/<user>/<repo>/<tree>/<currentbranch>

@neolit123 I don't think you can select a branch while viewing the commit. Git does not have such concept. Branch is just a collection of commits, so one commit can belong to many branches.

@Unknwon, yes of course.
the thing is, there is a number of commits per branch. for github this isn't visible once you enter the UI to view a commit (like you said a commit can belong to many branches). for gogs the "commits (N)" button is visible when a commit is viewed, so either it should be hidden or it should show the number of commits for the last branch the user selected - presumably the branch from which the user navigated to the currently viewable commit.
this gets complicated if the user navigated from a direct link to this commit; in that case the commits for the default branch, might be shown. but, always showing the number of commits for the default branch, even if the user selected another branch previously might be confusing.
just some thoughs...hiding the button is probably the best option, like github does.

@neolit123 That .. could be an option, which I was thinking, when commits number are very large, count operation slows down everything.
It would be better to propose PR for this.


Spring : isAuthenticated()

Hi Guys,
how can we call a function from pebble template?
for Example If we need something like this:
"user Blah is logged in":
{% if org.springframework.security.core.context.SecurityContextHolder.getContext().getAuthentication().isAuthenticated()  %} user Blah is logged in {% endif %}"
Any suggestion how we can access SecurityContextHolder as static method call?

Looks like we should use https://github.com/hectorlf/pebble-spring-security-extension by @hectorlf ...

Thanks for the plug, @damir78 😅
The security extension does more or less that. You can have a look at it's code if you want to implement it yourself. TBH, the extension is a ripoff of Spring's JSP tags.


0 Intensities in output mzML

When converting continuous data from Waters (.raw), or data with Ionic mobility (Waters .raw), the resulting mzML file still contains data points with a mass, a retention time but intensity at 0.
I'm using (python code to run the docker image but all the parameters are here):
arguments += f"wine msconvert {docker_file} "
arguments += "--outdir /out_data "
arguments += "--mzML "  # write mzML format [default]
arguments += "--zlib "  # use zlib compression for binary data
arguments += "--numpressAll "  # same as --numpressLinear --numpressSlof
arguments += "--32 "  # set default binary encoding to 32-bit precision
arguments += "--inten32 "  # encode intensity values in 32-bit precision
arguments += "--mz32 "  # encode m/z values in 32-bit precision

if "_QCP_" in docker_file.upper() or "_QCI_" in docker_file.upper(): # QC files as they're continuous data not already centroid
    arguments += """--filter "peakPicking true msLevel=1" """

if "_HDMSE_" in docker_file.upper(): # Ionic mobility raw data
    arguments += "--combineIonMobilitySpectra "

arguments += f"""--filter "lockmassRefiner mz={lock_mass} tol=0.5" """
arguments += """--filter "msLevel 1" """
arguments += """--filter "zeroSamples removeExtra" """

Thus the output mzML data is twice or thrice as big because of those data points with 0 intensities.
Thanks in advance,
Have a great day.

Continuous (profile) data is expected to have 0s to bound the peak profiles. Otherwise the data would look really weird when plotted and it can mess with peak fitting algorithms as well. If you're talking about the zeroSamples filter, note that it's removing EXTRA zeros, not ALL zeros. I think you can tell it how many flanking zeros to keep and it defaults to 1.

Hi @chambm, Thanks for the fast response!
Doing --filter "peakPicking true msLevel=1"  I was expecting to get the centroids (from the vendor) and thus not have the bounding zeros. Is it the behaviour I should expect ? Else could I get that ?
Thanks for the precision about the zeroSamples I understood it correctly.

Well, you are specifying only msLevel=1 to be centroided, so I'd expect centroided MS1s and profile MS2s. Is that what you're saying? Also only the QC files would be getting that peakPicking. If you're getting 0 samples for MS1s with a command that included peakPicking, are the spectra still in profile mode? Or are they 0 samples in a centroided spectrum?

Sorry if I wasn't clear...
I'm specifying --filter "msLevel 1" for all as I just want MS1 data.
Yes, only the QC will be peakpicked as it's acquired in a continuous manner. The non-QC data is already acquired in a non-continuous so I don't need peakpicking for them (it's working fine alreay).
I have the zeros problem only for the QC (continuous acquired) data, I don't have this problem for the non-qc (already vendor peak acquired data).
However, for the Ion Mobility data, they're non-continuous acquired, so I should have no zeros (like the non-qc non-ion-mobility which are perfectly fine).
But I got data with a mass, a retention time, no (0) intensity, and ionic mobility.
So I don't know if it comes from the vendor, my understanding of physics (how can I get an ionic mobility without intensity..), or if we should remove them at conversion time.
I hope I better explained my problem and my use case...
Thanks a lot for you precious help.

Can you provide an example .raw file for both cases? I'm not sure I have any non-continuous Waters IMS data.

Yes I think the latest Docker image should address the problem you saw with the QC files not being centroided. Let me know if it didn't.

I've tried the latest docker image (version :
{
    "Id": "sha256:aa3912ac1c59e4f19c39a69bbacd764a17ec1199f48fcd50f374a84036fb7267",
    "RepoTags": ["chambm/pwiz-skyline-i-agree-to-the-vendor-licenses:latest"],
    "Created": "2023-08-04T18:42:50.856597747Z",
)

Here is the code to convert
# Run Docker
docker.DockerClient().containers.run(
    "chambm/pwiz-skyline-i-agree-to-the-vendor-licenses",
    _get_conversion_arguments(docker_file), # Parameters on top of this issue
    volumes={
        f"{NAS_ROOT}": {"bind": "/data", "mode": "ro"},
        f"{output_directory}": {"bind": "/out_data", "mode": "rw"},
    },
    stdout=True,
    stderr=True,
    stream=True,
    detach=True,
    remove=True,  # To unmount the volume.
    auto_remove=True,
)
data = load_with_pyopenms_or_pyteomic(mzml_output_by_docker)
np.savez(output_path, data)

And the one to load :
array = np.load(Path("Path/To/My/File.npz"))["arr_0"]
print(array.shape[0])
print(len(array[:,2].nonzero()[0]))

# 166997200
# 122351946 Should be the same as the one above if no zeros.

print(array)
# array([[   1.308   ,   49.954525,    0.      ],
#       [   1.308   ,   50.003902,    0.      ],
#       [   1.308   ,   50.006992,    3.      ],
#       ...,
#       [ 845.946   , 1159.4888  ,   33.      ],
#      [ 845.946   , 1159.5037  ,    0.      ],
#       [ 845.946   , 1200.2019  ,    0.      ]], dtype=float32)

I didn't notice before but the peakPicking filter syntax is slightly wrong. It mixes the old and new syntax which apparently just results in it silently doing nothing (not an ideal result!). You can either do:
peakPicking true 1
peakPicking vendor msLevel=1
This syntax change came when CWT peak picking was added and there needed to be a way to pick between local maxima peak picking and CWT (or vendor). CWT needed extra params, so key=value params were added for it. But experimenting with it now it's clear the syntax validation could be a lot better...

Yeah ! Putting peakPicking vendor msLevel=1 indeed solves the problem for QC (continuum) files :D
However, I still have the ion mobility 0 ones... However, for this one, I don't know if it's "normal" or not...
As it's LC-IMS-MS, is it possible that the IMS is detecting something and not the MS ?
We could say that this issue is closed and I will investigate with the chemists :)
Thanks again for your help !

You should get a warning in stderr that the vendor peak picking doesn't work for IMS. You can use CWT peak picking instead.

Indeed, sorry I was in INFO not DEBUG but I got the error message.
However with peakPicking cwt msLevel=1 (also tried capital CWT) or peakPicking true 1 I still get the
 [SpectrumList_Waters]: vendor centroiding is not supported for Waters ion mobility data
Which raise the error but still convert the file and thus the data keep the 0...

The 'true' version says you do want vendor centroiding, so it's expected to get the error there. You shouldn't get it for cwt though. I think that may be because you're putting peakPicking before lockmassRefiner. Lockmass refiner must either be the first filter or the second one after vendor peakPicking. Because lockmass refinement is a Waters API operation, we can't apply lockmass refinement to CWT peak picking, but we can apply CWT peak picking to lockmass refinement. This is indeed a confusing situation. It would be so nice if lockmass refinement could just be applied unconditionally by automatically knowing or finding the lockmass m/z.

Using peakPicking then lockmass I indeed got a [SpectrumList_Waters]: vendor centroiding is not supported for Waters ion mobility data
Using lockmass then peakPicking I got  MassLynxRawScanReader: Unable to open lockmass gain file.
Using only peakPicking (no lockmass) I got no error and a good output (no more 0s) but if I understood your message correctly I would be able to do lockmass then peakPicking ?
Thanks again for your help, it might be nice to add that to the documentation ? (as vendor cwt and possible combinations are not indicated).

I think the "unable to open lockmass gain file" is probably an error related to the Docker setup or something, perhaps the .raw directory is mounted read-only? I don't get that error on Windows when I do lockmass followed by CWT on your HDMSe files. I'd assume that warning means the data isn't lockmass corrected.
I just made a PR to allow lockmass to work as the first filter, so peakPicking can come after it and you can choose vendor or cwt as the algorithm depending on whether it's IMS data or not.

The Waters lockmass feature in the SDK creates/modifies the lmgt.inf file when lockmass correction is applied. So yes, for lockmass read-write is necessary for the .raw directory. That used to be the case for peak picking too but no longer.


Make Blackboard dependency optional

Make Blackboard dependencies optional and add documentation explaining how to acquire and use when desired.

Assigning to @doolse as part of build effort

The blackboard dependencies were all for the blackboard building block, which is now in it's own repository: https://github.com/equella/equella-blackboard-integration


Create 425.md

Add 425 Too Early status code

Thanks for the PR! I'll try to get this reviewed and deployed within the next week. 👍


[AB3: Tracing Code] Enhance conclusion to provide answers for students

Current

Problem
This section is relevant and can be helpful for students to check on their understanding. However, as no answers are provided it falls short of allowing students to check their knowledge fully as they cannot verify whether their answers and path tracing are correct.
Proposed
Have a drop-down to reveal the answers for students to reference to, similar to the CS2103T website:

@ruth-lim Yes, this could be useful. If you can post the answers here, I can add them to the tutorial.

Answers for Question 1
1. redit 1 n/Alice Yu

Exception Thrown: ParseException
Reason: Unknown command as the command word redit is not recognized.
Where the exception is thrown: AddressBookParser#parseCommand()

java {.line-numbers highlight-lines="7"}
public Command parseCommand(String userInput) throws ParseException {
    ...
    switch (commandWord) {
    ...
    default:
        logger.finer("This user input caused a ParseException: " + userInput);
        throw new ParseException(MESSAGE_UNKNOWN_COMMAND);
    }
}

Where the exception is handled: MainWindow#executeCommand()

java {.line-numbers highlight-lines="3"}
private CommandResult executeCommand(String commandText) throws CommandException, ParseException {
    ...
    } catch (CommandException | ParseException e) {
        logger.info("An error occurred while executing command: " + commandText);
        resultDisplay.setFeedbackToUser(e.getMessage());
        throw e;
    }
}

2. edit 0 n/Alice Yu

Exception Thrown: ParseException
Reason: Invalid command format as index 0 is not a non-zero unsigned integer.
Where the exception is thrown: EditCommandParser#parse()

java {.line-numbers highlight-lines="6"}
public EditCommand parse(String args) throws ParseException {
  ...
  try {
      index = ParserUtil.parseIndex(argMultimap.getPreamble());
  } catch (ParseException pe) {
      throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE), pe);
  }
  ...
}

Where the exception is handled: MainWindow#executeCommand()

3. edit 1 n/Alex Yeoh

No exception thrown.
Reason: "1" is a valid index in the person list. The command is correctly formatted and will edit the name of the person at index 1 to "Alex Yeoh".

4. edit 1

Exception Thrown: ParseException
Reason: At least one field to edit must be provided.
Where the exception is thrown: EditCommandParser#parse()

java {.line-numbers highlight-lines="4"}
public EditCommand parse(String args) throws ParseException {
  ...
  if (!editPersonDescriptor.isAnyFieldEdited()) {
      throw new ParseException(EditCommand.MESSAGE_NOT_EDITED);
  }
  ...
}

Where the exception is handled: MainWindow#executeCommand()

5. edit 1 n/アリス ユー

Exception Thrown: ParseException
Reason: Names should only contain alphanumeric characters and spaces, and it should not be blank.
Where the exception is thrown: ParserUtil#parseName()

java {.line-numbers highlight-lines="4"}
public static Name parseName(String name) throws ParseException {
  ...
  if (!Name.isValidName(trimmedName)) {
      throw new ParseException(Name.MESSAGE_CONSTRAINTS);
  }
  ...
}

Where the exception is handled: MainWindow#executeCommand()

6. edit 1 t/one t/two t/three t/one

No exception thrown.
Reason: The command is correctly formatted and will edit the tags of the person at index 1 to "one", "two" and "three".

<panel header="Why didn’t the second tag with value “one” get added?">

Duplicate values are handled by the `ParserUtil#parseTags()` method because tags are added to a HashSet. The HashSet class inherently handles duplicates by not allowing any equal elements to be added. Therefore, any duplicate tags are not added.

 Read more on the `add` method of the HashSet class here.

</panel>

Answers for Question 2
1.  Make command words case-insensitive

Modify AddressBookParser#parseCommand() to convert command words to lowercase before parsing.
    ```java {.line-numbers highlight-lines="3['.toLowerCase()']"}
    public Command parseCommand(String userInput) throws ParseException {
        ...
        final String commandWord = matcher.group("commandWord").toLowerCase();
        final String arguments = matcher.group("arguments");
    }
    ```

2.  Allow delete to remove more than one index at a time

Modify DeleteCommandParser to parse a list of indices.
Update DeleteCommand to take in a list of indices.

<box type="info" seamless>

              Remember to update other usages of `DeleteCommand` class to handle the change in type of Index.
</box>

3.  Save the address book in the CSV format instead

Import the following classes:
       ```java
       import java.io.FileWriter;
       import java.io.PrintWriter;
       ```

Modify the JsonAddressBookStorage#saveAddressBook() method.
       ```java
       public void saveAddressBook(ReadOnlyAddressBook addressBook, Path filePath) throws IOException {
        requireNonNull(addressBook);
        requireNonNull(filePath);

        FileUtil.createIfMissing(filePath);

        try (PrintWriter out = new PrintWriter(new FileWriter(filePath.toFile()))) {
            out.println("Name,Phone,Email,Address,Tags"); // CSV header
            addressBook.getPersonList().forEach(person -> {
                out.println(
                        escapeField(person.getName().toString()) + "," +
                        escapeField(person.getPhone().toString()) + "," +
                        escapeField(person.getEmail().toString()) + "," +
                        escapeField(person.getAddress().toString()) + "," +
                        escapeField(person.getTags().toString())
                );
            });
        } catch (IOException e) {
            logger.severe("Failed to save address book to " + filePath + ": " + e.getMessage());
            throw e;
        }
       }
       ```

Add a helper method to handle special characters in the fields for Person.
       ```java
       private String escapeField(String field) {
           if (field.contains(",") || field.contains("\"")) {
           field = field.replace("\"", "\"\"");
           field = "\"" + field + "\"";
       }
       return field;
       }
       ```

4.  Add a new command

Add a class for your new command in the seedu.address.logic.commands package.
Add a class for your parser to parse the new command in the seedu.address.logic.parser package.
Update AddressBookParser to use the new parser.

<box type="info" seamless>
      For a more detailed explanation, refer to [AB3 Tutorial: Adding a Command]
</box>

5.  Add a new field to Person

Add a new class for the field in seedu.address.model.person.
Update the Person class to include the new field.
Update the JsonAdaptedPerson class in seedu.address.storage to include the new field.

<box type="info" seamless>

     Remember to update other usages of `Person` class to handle the new field.
</box>

6.  Add a new entity to the address book
For instance, if we are adding Event as the new entity to the address book:

Add a new class Event in seedu.address.model.event to represent an Event entity.
Add a new class AddEventCommand in seedu.address.logic.commands that is similar to AddCommand.
Implement a AddEventCommandParser parser in seedu.address.logic.parser to parse the relevant arguments.
Update the Model interface to add in new methods such as addEvent and hasEvent.
Update the ModelManager to implement these new methods.
Update the AddressBook class to create methods like setEvent or getEventList etc.
Create a UniqueEventList class in seedu.address.model.event to handle a list of unique events.
Implement a JsonAdaptedEvent in seedu.address.storage to save the data in JSON format.

@se-edu/summer-2024-pr-reviewers This is not a PR yet, but your inputs on the proposed content welcome.

@ruth-lim Feel free to create a PR for this.


[flutter_tools] support new SDK structure for sdkmanager

Description
We're not currently able to accept android licenses in the latest SDK. We also need to update our documentation to explain which component to download.
Fixes https://github.com/flutter/flutter/issues/51712

The documentation to update is here: https://flutter.dev/docs/get-started/install/macos#install-android-studio

Sir is the error resolved or not?

This change is in v1.15.12, so currently master and dev channels.


EventDataBatch - working with already disposed object

Contact Details
No response
Version
8.x
On which operating system(s) are you experiencing the issue?
Windows
Using which broker(s) did you encounter the issue?
Azure Event Hub
What are the steps required to reproduce the issue?
Unfortunatelly I dont have any simple setup which I could share.
In my project I setup MassTransit in the following manner:
serviceCollection
    .AddMassTransit(massTransitConfiguration =>
    {
        massTransitConfiguration.AddRider(riderConfiguration =>
        {
            riderConfiguration.Configure<MassTransitHostOptions>(options =>
                options.WaitUntilStarted = true);

            riderConfiguration.UsingEventHub((_, eventHubConfiguration) =>
            {
                eventHubConfiguration.UseJsonSerializer();
                eventHubConfiguration.Host(eventHubConnection);
                eventHubConfiguration.Storage(storageConnection);
                eventHubConfiguration.ConfigureProducerOptions(eventHubProducerOptions =>
                {
                    eventHubProducerOptions.RetryOptions = new EventHubsRetryOptions()
                    {
                        MaximumRetries = 3,
                        Delay = TimeSpan.FromSeconds(2),
                        Mode = EventHubsRetryMode.Exponential
                    };
                });
            });
        });

        massTransitConfiguration.UsingInMemory((context, cfg) =>
        {
            cfg.UseMessageData(messageDataRepository);
            MessageDataDefaults.AlwaysWriteToRepository = false;
            MessageDataDefaults.Threshold = ingestOptions.MessageThresholdInBytes;
        });
    });

and producing messages like this:
var producer = await _eventHubProducerProvider.GetProducer(_options.TopicName).ConfigureAwait(false);
await producer
    .Produce(
        messages,
        new DatasetUpdateMessageSendPipe<TMessageType>(),
        cancellationToken)
    .ConfigureAwait(false);

What is the expected behavior?
Producing messages without throwing an exception.
What actually happened?
Producing messages failed after some time with and exception System.ObjectDisposedException: EventDataBatch has already been closed and cannot perform the requested operation.
I suspect that the problem lies here:
https://github.com/MassTransit/MassTransit/blob/6f6d8f479233a084af1048204558bf459d249738/src/Transports/MassTransit.EventHubIntegration/EventHubIntegration/EventHubProducerSendTransportContext.cs#L162C27-L162C27
while (!eventDataBatch.TryAdd(eventData) && eventDataBatch.Count > 0)
{
    await FlushAsync(eventDataBatch).ConfigureAwait(false);
    if (sendContexts.Length - i > 1)
        eventDataBatch = await producerContext.CreateBatch(options, context.CancellationToken).ConfigureAwait(false);
}

Imagine having sendContexts.Length = 4 and the for loop is now running i = 3 (the last iteration).
When it goes to the while block and TryAdd() returns false (because the eventDataBatch is full)
it calls FlushAsync() but after that it does not recreate the eventDataBatch inside the while block (because sendContexts.Length=4 and i=3).
Then it calls TryAdd for the second time but the eventDataBatch was already Disposed!
Related log output, including any exceptions
S-FAULT "loopback://localhost/event-hub/api-data-updates-evh"
System.ObjectDisposedException: EventDataBatch has already been closed and cannot perform the requested operation.
Object name: 'EventDataBatch'.
   at Azure.Core.Argument.AssertNotDisposed(Boolean wasDisposed, String targetName)
   at Azure.Messaging.EventHubs.Amqp.AmqpEventBatch.TryAdd(EventData eventData)
   at Azure.Messaging.EventHubs.Producer.EventDataBatch.TryAdd(EventData eventData)
   at MassTransit.EventHubIntegration.EventHubProducerSendTransportContext.Send[T](ProducerContext producerContext, EventHubSendContext`1[] sendContexts) in /_/src/Transports/MassTransit.EventHubIntegration/EventHubIntegration/EventHubProducerSendTransportContext.cs:line 158
   at MassTransit.EventHubIntegration.EventHubProducer.BatchSendPipe`1.Send(ProducerContext context) in /_/src/Transports/MassTransit.EventHubIntegration/EventHubIntegration/EventHubProducer.cs:line 209

System.ObjectDisposedException: EventDataBatch has already been closed and cannot perform the requested operation.
Object name: 'EventDataBatch'.
   at Azure.Core.Argument.AssertNotDisposed(Boolean wasDisposed, String targetName)
   at Azure.Messaging.EventHubs.Amqp.AmqpEventBatch.TryAdd(EventData eventData)
   at Azure.Messaging.EventHubs.Producer.EventDataBatch.TryAdd(EventData eventData)
   at MassTransit.EventHubIntegration.EventHubProducerSendTransportContext.Send[T](ProducerContext producerContext, EventHubSendContext`1[] sendContexts) in /_/src/Transports/MassTransit.EventHubIntegration/EventHubIntegration/EventHubProducerSendTransportContext.cs:line 158
   at MassTransit.EventHubIntegration.EventHubProducer.BatchSendPipe`1.Send(ProducerContext context) in /_/src/Transports/MassTransit.EventHubIntegration/EventHubIntegration/EventHubProducer.cs:line 209
   at MassTransit.EventHubIntegration.EventHubProducer.BatchSendPipe`1.Send(ProducerContext context) in /_/src/Transports/MassTransit.EventHubIntegration/EventHubIntegration/EventHubProducer.cs:line 226
   at MassTransit.Agents.PipeContextSupervisor`1.Send(IPipe`1 pipe, CancellationToken cancellationToken) in /_/src/MassTransit/Agents/PipeContextSupervisor.cs:line 69
   at MassTransit.Agents.PipeContextSupervisor`1.Send(IPipe`1 pipe, CancellationToken cancellationToken) in /_/src/MassTransit/Agents/PipeContextSupervisor.cs:line 69
   at MassTransit.Agents.PipeContextSupervisor`1.Send(IPipe`1 pipe, CancellationToken cancellationToken) in /_/src/MassTransit/Agents/PipeContextSupervisor.cs:line 69
   at MassTransit.Transports.HostConfigurationRetryExtensions.Retry(IHostConfiguration hostConfiguration, Func`1 factory, CancellationToken cancellationToken, CancellationToken stoppingToken) in /_/src/MassTransit/Transports/HostConfigurationRetryExtensions.cs:line 39

Link to repository that demonstrates/reproduces the issue
No response

Thank you for the quick fix. One more question though... do you know when this will get merged into new release (I guess 8.0.17)? The issue is kind of troublesome for me as I am unable to recover from this exception with simple try catch.


Introduce SignedTransaction

https://github.com/iotaledger/tips-draft/blob/tip45/tips/TIP-0045/tip-0045.md#transaction-structure

Closed by https://github.com/iotaledger/iota-sdk/pull/1483


Add overridden duration timeout to StreamTestKit

The context of this change is https://github.com/apache/pekko-http/pull/590#pullrequestreview-2281514043. It turns out its extremely cumbersome to manually override the duration so I am adding this public method
@raboof @jrudolph Let me know if this line of thinking is on the right lines.

including in 1.1.2 milestone - if 1.1.1-RC1 vote fails, we can consider adding this to a 1.1.1-RC2

Adding some reviewers to this PR to get an idea whether its even on the right track, @jrudolph @raboof Maybe you have some comments?


Baseline: nan reported in metadata text file

We've had a report of a burst insar job reporting nan for the perpendicular baseline in the metadata date file. This causes MintPy processing to fail when including that interferogram in an SBAS time series stack.

https://azdwr-hyp3.asf.alaska.edu/jobs/de7e9b1a-941e-4744-bcca-444a5023b2e2

S1_275818_IW2_20220622_20220728_VV_INT20_6F73.txt
{
  'apply_water_mask': False,
   'granules': [
    'S1_275818_IW2_20220622T132025_VV_1160-BURST',
    'S1_275818_IW2_20220728T132027_VV_DE17-BURST'
  ],
  'looks': '5x1'
}

Two other jobs with the same reference burst and two other jobs with the same secondary burst all reported value baseline values:

https://azdwr-hyp3.asf.alaska.edu/jobs/1a3aa363-a220-410f-bdda-578e6eac6091
https://azdwr-hyp3.asf.alaska.edu/jobs/b7a988c9-f69e-41ac-9133-658694caf602
https://azdwr-hyp3.asf.alaska.edu/jobs/651ee18e-7430-4f3f-a722-eff745250ee3
https://azdwr-hyp3.asf.alaska.edu/jobs/0bc3e190-5f53-467a-8ad8-2757335ae61d

The baseline value is sourced from topsProc.xml in make_metadata_file() at https://github.com/ASFHyP3/hyp3-isce2/blob/develop/src/hyp3_isce2/packaging.py#L351 . This could point to an underlying issue with isce2; we'd have to run this interferogram outside of HyP3 and inspect the topsProc.xml file to confirm.

Looking at a quick search on Vertex, the baseline should be 0.0 but ends up nan in the output metadata txt file.


Support Infracost usage file

Resources that solely use usage costs will have a 0.00 cost shown. We should alter the extension to allow users to supply a usage file, or parse it from a known location/name.
It's better that the logic lay within the Infracost CLI. As the VSCode native solution did not detect initialization.

Note for community
Please 👍 if you'd like to upvote this or receive updates.
Add a comment if you'd like to contribute.

I think this is perfect, at first just identifying a file as an 'infracost-usage.yml' along with the terraform files, but in the future it would be perfect to be able to select the extension

Hello, I've just made a small change in the extension.ts file to add the support of infracost usage file by updating the breakdown command if I detect the presence of a infracost-usage.yml file in the project. I also add that file in the isValidTerraform file to re execute the infracost calculation if the infracost usage data is updated. I can do a PR if needed but for that I need to clean my code. Let me know if it's interesting for you and I will proceed

Hey @matthieupetite, sure thing, open a PR and we can have a look ❤

Ok, I do that after cleaning my code ... probably tonight or tomorrow ;)

@matthieupetite just wondering if there were any updates on this? Another user ran into an issue, which I think would be addressed by your proposed solution (detect infracost-usage.yml).

@alikhajeh1, @matthieupetite delivered a solution native to the VSCode extension, but it was decided that it was better that the logic lay within the CLI. As the VSCode native solution did not detect initialization.

Thanks for clarifying! I updated the issue desc.

Hello, I come back on this issue to see if there is a planned date for this. I am still working with my fork but it's too tricky and unstable :(

@matthieupetite I don't have an ETA on this unfortunately. I'll try and work on something this weekend, with aim to get a relase out late next week.

Hi all, we've added usage file support as part of the 0.2.11 release. The recommended way to let the extension know about usage, is by referencing it in a Infracost config file. Please give the latest release a whirl and let us know any bugs you find. 🙏 .

Thanks a lot for that release


Is there a way to use textAngular's taApplyCustomRenderers with ng-admin?

Hi, I want to save the content of the wysiwyg value to the server in order to display custom embeds from soundcloud and vimeo. I've found that the way to do it is using taApplyCustomRenderers from textAngular, but I'm not sure how it would integrate with ng-admin.
Thanks for your help.

For now, you'll need to use a template field instead of a WYSIWYG field, with the exact markup you want. In the future, all field types may support the .template() method.


WIP: Update scheduler and optimizer

According to the suggestion from the meeting, there are a couple of changes in the optimizers configuration.

According to Karol's suggestion, the scheduler and optimizer were updated. The green configuration, which seems to be the best, is optimizer: Adam, scheduler: OneCycleLR.

Oh sorry, it should be in the training step of course! My fault!

After doing some improvements suggested by @AgaMiko and after merging main into this branch, I conducted three experimental pieces of training to compare scheduler/optimizer options again. Due to the time limit, my plots represent only 1 epoch (so the advantages of the new scheduler and optimizer can not be very reliable). However, taking into account @karolmajek intuition, I would like to merge this PR. :)


feat: Adding tolerations to scan jobs

Resolves #538
Adds tolerations to vulnerability scan jobs so that the pods can run on tainted nodes where the taints are tolerated.  Tolerations are read in JSON format from the vulnerabilityReports.podTolerations key of the starboard ConfigMap.

Can we please also add support to pass that tolerations via Helm values?


PyFunction::call does not give error when not called correctly

🐛 Bug Reports
When reporting a bug, please provide the following information. If this is not a bug report you can just discard this template.
🌍 Environment

Your operating system and version: Linux 5.12.10-arch1-1
Your python version: 3.9.5
How did you install python (e.g. apt or pyenv)? Did you use a virtualenv?: pacman, no
Your Rust version (rustc --version): rustc 1.54.0-nightly
Your PyO3 version: 0.13.2
Have you tried using latest PyO3 main (replace version = "0.x.y" with git = "https://github.com/PyO3/pyo3")?: yes

💥 Reproducing
Please provide a minimal working example. This means both the Rust code and the Python.
Please also write what exact flags are required to reproduce your results.
Rust
#[pyfunction]
fn test(test_func: &PyFunction) -> PyResult<&PyAny> {
    test_func.call((), None)
}

#[pymodule]
fn pyo3_closure_exp(py: Python, m: &PyModule) -> PyResult<()> {
    m.add_function(wrap_pyfunction!(test, m)?)?;
    Ok(())
}

Python
import pyo3_closure_exp
pyo3_closure_exp.test(lambda: should_throw_error_since_i_am_not_defined)

The python code does not give any error and I do not know how to discover the function does not run correctly.

I cannot reproduce this. I get
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 1, in <lambda>
NameError: name 'should_throw_error_since_i_am_not_defined' is not defined

Please make sure that what you're not swallowing the traceback printout somehow.

BTW, you should not take PyFunction as an argument; it will needlessly exclude other callable objects.

I cannot reproduce this. I get
>>> import pyo3_closure_exp
>>> pyo3_closure_exp.test(lambda: should_throw_error_since_i_am_not_defined)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 1, in <lambda>
NameError: name 'should_throw_error_since_i_am_not_defined' is not defined

Please make sure that you're not swallowing the traceback printout somehow.

Thanks！ I do not see anything in my current code that could swallow the traceback. Could you share your Python version so that I can also check my Python environment?

Just tried to reproduce in a fresh installed miniconda environment and I cannot reproduce either.. Maybe there are some misconfigurations previously on my side. Sorry for bothering. Thanks!


added test with new cross platform app

@jlipps as discussed i have refactored AndroidDragAndDrop with the new app(iOS and android)
Execution Command:
mvn clean -Dtest=AndroidDragAndDrop test
Application repo:
https://github.com/saikrishna321/VodQAReactNative

@saikrishna321 you'll need to close this and resubmit with the commit coming from your github user's e-mail address (see instructions from clabot). meanwhile i'll give a review


Bucket Sorting in Python

I added Bucket sort in Python which was not present in this repo. I added with description, proper code(with comment), and time and space complexity also.

I have also added BFS searching in Python which was not present in this repo. I added with description, proper code(with comment), and time and space complexity also. please review it


fix(postgraphile-getMeshSource): Fallback to empty array when no plugins

The sample for postgres did not work after downloading. After looking into why I discovered that is was due to the fact that when no plugins are provided undefined was passed into Promise.all which causes getMeshSource to fail.
Luckily only a very minor fix was needed.
Fixes #604

Thank you @ntziolis 🙏


[cmake] Recognize "arm64" as a supported arch

Summary
On macOS with ARM processors, CMAKE_SYSTEM_PROCESSOR is set to "arm64", which was not properly recognized as an "aarch64" architecture.
Dependencies
N/A
Testing
Build with CMake on a Mac with an ARM processor.
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.

[N/A] Added tests
[X] Ran the ./bin/test script and it succeeded
[N/A] Updated documentation if necessary

@swift-ci please test


Error with on entity spawns event 1.13.2

Got some errors in this event
Spigot-2474d93-e693496 (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT)
Denizen version 1.0.3-SNAPSHOT (build 451-DEV)
Can't get a decent nice to look at debug submit because that event really fires a lot. Here is the error
http://one.denizenscript.com/paste/50623

Depenizen issue, report on Depenizen page (though it might be fixed in Depenizen build DEV-421 already)

This should be fixed in the latest Depenizen build


Fit script editor grid with others

Fixes #10876

fit text editor also. here is an old screenshot.

Fixes #11037?

@Noshyaar definitely yes. I will update my first comment on this PR.


Payment Method Code

Can you explain more on this feature? What is the purpose. How does it interact with BC

Document details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 450f9b98-bead-cd35-a10c-ccb67995c9e8
Version Independent ID: 251d06f2-9ff2-3f53-f5e9-53597ae4d771
Content: Create a Customer Card to Register New Customers - Business Central
Content Source: business-central/sales-how-register-new-customers.md
Service: dynamics365-business-central
GitHub Login: @SorenGP
Microsoft Alias: sgroespe

Hi makdaddy888,
You can read about payment methods here:
https://docs.microsoft.com/en-us/dynamics365/business-central/finance-payment-methods

I don’t think that helped.
Kind Regards
Ben Opit
+61411707070

On 11 Jul 2019, at 6:42 pm, Eva Dupont<EMAIL_ADDRESS>wrote:
Hi makdaddy888,
You can read about payment methods here:
https://docs.microsoft.com/en-us/dynamics365/business-central/finance-payment-methods
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Hi Ben,
OK, but what kind of content are you looking for concerning payment methods?

What was the original question?
Kind Regards
Ben Opit
+61411707070

On 12 Jul 2019, at 7:17 pm, Eva Dupont<EMAIL_ADDRESS>wrote:
Hi Ben,
OK, but what kind of content are you looking for concerning payment methods?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

A link has been added from "Register New Customers" to "Defining Payment Methods", which we believe is an effective help topic.


Do not emit "unlogged error" when a task fails because of calling into another project

When a task builds other tasks, and one of those tasks fails and logs an error, the building task should fail as well, but since the error is already logged, it does not need to log an error itself. This caused the failure message for "this task failed but did not log an error" to erroneously think an error had not been logged. This fixes #5179—that problem.

azp /run

I created a WPF app and intentionally introduced a compile-time error in a C# file. I then tried building with a version of MSBuild from before MSB4132 was introduced and found three errors. Building with a version from after it was introduced, MSB4132 was added to those three errors. Building with code from this PR led to three errors—the three from before MSB4132 was introduced.


juju remove-application cleanup not complete

running juju remove-application flannel does not cleanup everything

/etc/ssl/flannel still contains all certs
/var/run/flannel/subnet.env still there
/lib/systemd/system/flannel.service still there (but the link in /etc/systemd/system is removed)
the flannel interface is still up & running after removal (ip link set flannel.1 down && ip link delete flannel.1  not run)

https://github.com/juju-solutions/layer-docker/pull/92
and
https://github.com/juju-solutions/charm-flannel/pull/20
and
https://github.com/juju-solutions/interface-sdn-plugin/pull/4
should clean this issue up. This will go out with this weeks / next weeks release of our k8s bundle. Thanks for reporting this one @SaMnCo


Command to show excluded files

A command to temporarily show excluded files. A sort of toggle switch for files.exclude.

This is a fair feature request, however we do not have it on our immediate plan. Thus assigning to backlog and we might add this in the future. Thanks

This extension might help: https://marketplace.visualstudio.com/items?itemName=eamodio.toggle-excluded-files

Great! So please use that extension. Thus closing this


Upgrade redis to version 6.2.1 in one node and three node cluster

Feature request and bugs are created and tracked from https://wiki.odim.io/. Hence closing this issue and for the remaining work https://jira.lfnetworking.org/browse/ODIM-18 feature request is created.


Phoenix (cdn1_t1) gives distorted turrets

When mounting turrets (doesn't matter which ones) on a Phoenix (cdn1_t1) the turrets become completely distorted.

Should be fixed in the latest update


Flaky test tests.cupy_tests.cuda_tests.test_texture.TestCUDAarray

tests.cupy_tests.cuda_tests.test_texture.TestCUDAarray_param_253_{dimensions=(67, 19, 31), dtype=uint8, n_channels=1, stream=True, xp='cupy'}.test_array_gen_cpy
tests.cupy_tests.cuda_tests.test_texture.TestCUDAarray_param_261_{dimensions=(67, 19, 31), dtype=uint8, n_channels=4, stream=True, xp='cupy'}.test_array_gen_cpy
tests.cupy_tests.cuda_tests.test_texture.TestCUDAarray_param_281_{dimensions=(67, 19, 31), dtype=uint32, n_channels=2, stream=True, xp='cupy'}.test_array_gen_cpy

https://jenkins.preferred.jp/job/chainer/job/cupy_pr/3316/
I've seen a variety of different test parameter combinations, and I think the only parameter that matters is xp='cupy', meaning we copy GPU arrays to texture memory.

We need to do a stress test: Open two terminals locally, and run the following script simultaneously in each terminal:
import cupy as cp
import pytest

for i in range(100):
    s = cp.cuda.Stream()
    s.use()
    status = pytest.main(['tests/cupy_tests/cuda_tests/test_texture.py'])
    if status != 0:
        raise RuntimeError(i, status)

Random failures will appear! It's important to have each run on a different stream to push the limit. I'll look into it further and see if I can come up with a proper fix.

(The test is done with the latest master branch, CUDA 11.0, RTX 2080 Ti with driver 450.57.)


Fix Running locally CodeSandbox

Have fixed the CodeSandbox of the Running locally page. You can check it out using this link.

Refer #1032
Tag #891

Adding this in the merge list, because it's a mere formality for Shwetal Soni to review and I will approve it once approved by mentors (see my comment).

@huan but this was a fix for an issue with the official Code Sandbox of the Ding Dong bot which is in the root directory here: https://github.com/wechaty/wechaty-getting-started (because the sandbox.config.json file is present in the root dir)

@huan but this was a fix for an issue with the official Code Sandbox of the Ding Dong bot which is in the root directory here: https://github.com/wechaty/wechaty-getting-started (because the sandbox.config.json file is present in the root dir)

What do you mean "the sandbox.config.json file is present in the root dir"?
In our official example directory, the sandbox example is at https://github.com/wechaty/wechaty-getting-started/tree/main/examples/third-parties/codesandbox, please change the CodeSandbox link to here.
My understanding is, If there's any improvement/changes that should be made, we should send a PR and fix our official example.

Sorry I made a mistake, I have created a new PR. @huan can you please take a look at this: https://github.com/wechaty/wechaty-getting-started/pull/206

Related to #1296

Fixed by https://github.com/wechaty/wechaty.js.org/issues/1296


Static code analyzer cribbing about function return discrepancies

I am integrating Outscrapper's Maps review API with Obsei.
When I integrated SDK with Obsei, mypy started showing error about function return type. For example following function signature shows that they return dict -
def google_play_reviews(self, query: list, reviewsLimit: int = 100, sort: str = 'most_relevant', cutoff: int = None,
        rating: int = None, language: str = 'en'
    ) -> dict:

def google_maps_reviews(self, query: list, reviewsLimit: int = 100, limit: int = 1, sort: str = 'most_relevant',
        skip: int = 0, start: int = None, cutoff: int = None, cutoff_rating: int = None, ignore_empty: bool = False,
        coordinates: str = None, language: str = 'en', region: str = None
    ) -> dict:

But as per API docs and code they supposed to returning list -
        if 199 < response.status_code < 300:
            return self._wait_request_archive(response.json()['id']).get('data', [])

https://app.outscraper.com/api-docs#tag/Google-Maps/paths/~1maps~1reviews-v2/get
This mismatch causing static code checker to throw the error.

Hello Lalit,
Thank you for the reporting on this. The fix is pushed into master and will be updated in the next SDK release.
https://github.com/outscraper/google-maps-scraper-pyhton/pull/5

Thanks @vlad-outscraper for faster response.
Closing this issue.


How to find MAC adrress of esp8266?

Ho to find MAC adress of ESP8266? So I could enter it to LED strip manager?
Or maybe I dont need it? Maybe I should disable autodetecting(but I dont know how to do it..)?
Also should I connect LED strip do RX pin on esp8266? in webcontroller.ino it says LED_PIN is 7.

how did u disable  MAC adress in config?

I disabled "Autodetect", by making it "False" in config.py file.


Service Catalog can't be deployed after running cluster role

Steps
ansible-playbook playbook/generate_inventory.yml -e ip_address=<IP_ADDRESS> -e type=simple
ansible-playbook -i inventory/simple_host playbook/cluster.yml --tags "up"
ansible-playbook -i inventory/simple_host openshift-ansible/playbooks/openshift-service-catalog/config.yml -e openshift_master_unsupported_embedded_etcd=true

Error
TASK [Evaluate groups - Fail if no etcd hosts group is defined] ******************************************************************************************************
fatal: [localhost]: FAILED! => {
"changed": false,
"msg": "Running etcd as an embedded service is no longer supported. If this is a new install please define an 'etcd' group with either one, three or five hosts.
These hosts may be the same hosts as your masters. If this is an upgrade please see https://docs.openshift.com/container-platform/latest/install_config/upgrading/migrating_embedded_etcd.html for documentation on how to migrate from embedded to external etcd.
"}
        to retry, use: --limit @/Users/dabou/Code/snowdrop/cloud-native/temp/openshift-infra/ansible/openshift-ansible/playbooks/openshift-service-catalog/config.retry

I would suggest you give this a look first, since I have very little service broker experience and will probably take a lot longer to figure out the issue.

issue reported Fail if no etcd hosts group is defined has nothing to do with Service Catalog but due to missing parameter not defined within the simple inventory file ...

I will try using the cloud inventory template and ansible-playbook -i inventory/cloud_host playbook/cluster.yml --tags "up"

Interesting...
We use the simple inventory file since the only that is needed for all the other roles is the IP address of the machine.
I propose that we keep it simple, and document that the service-catalog can only be used with the cloud_inventory

Using the cloud_inventory does work with all roles, that is not a problem

No luck as playbook reports
TASK [openshift_service_catalog : Label <IP_ADDRESS> for APIServer and controller deployment] ***********************************************************************
fatal: [<IP_ADDRESS>]: FAILED! => {"changed": false,
"msg": {"cmd": "/usr/local/bin/oc label node <IP_ADDRESS> node-role.kubernetes.io/master=true --overwrite", "results": {}, "returncode": 1,
"stderr": "Error from server (NotFound): nodes \"<IP_ADDRESS>\" not found\n", "stdout": ""}}

This is because when oc cluster up is launched using our playbook's role, then the node is created using localhost instead of the ip <IP_ADDRESS>
oc get nodes
NAME        STATUS    ROLES     AGE       VERSION
localhost   Ready     <none>    1m        v1.9.1+a0ce1bc657

Interesting...
Although I can definitely understand why would want to have the service-broker work on a cluster provisioned with the cluster role, currently it seems to pose too many problems.
I propose that clearly document that the service-catalog role only be used on a cluster provisioned with openshift-ansibile using the cloud_host inventory file

I agree. We will document as you suggested that servicecatalog can't be used with cluster role

Sounds good to me :)


Parse flags in more tests.

This is a backport of commit 1d463480dd967f0054bc9e59e8eff1256888d993.
Does not fix everything, but makes it better...

Note that Travis is failing, but that's expected. It's failing "less badly" than before, and hopefully a follow up PR should get it passing. 😉


Change how "nearby" a shop is

Default is 999 meters. This would allow users to change that value

I don't feel as strongly about this feature as I did when I started working on it. My fear is it'll only serve to complicate the code and confuse users.


Add StackOverflow dataset for testing/tutorial purpose

I put a first version here: https://quickwit-datasets-public.s3.amazonaws.com/stackoverflow.posts.json.gz
This is a ndjson file with document like:
{
	"user": "45",
	"tags": ["c#", "linq", ".net-3.5"],
	"questionId": "59",
	"creationDate": "2008-08-01T13:14:33.797",
	"title": "How do I get a distinct, ordered list of names from a DataTable using LINQ?",
	"acceptedAnswerId": "43110",
	"type": "question",
	"body": "Let's say I have a DataTable with a Name column. I want to have a collection of the unique names ordered alphabetically. The following query ignores the order by clause. var names = (from DataRow dr in dataTable.Rows orderby (string)dr[\"Name\"] select (string)dr[\"Name\"]).Distinct(); Why does the orderby not get enforced? "
}

To be more quickwit friendly, we need to transform some data like ids and the creation date.

I have been playing with this dataset for a bit by using a very small jq script that converts the record above into
{
	"user": 45,
	"tags": ["c#", "linq", ".net-3.5"],
	"questionId": 59,
	"creationDate": "2008-08-01T13:14:33Z",
	"title": "How do I get a distinct, ordered list of names from a DataTable using LINQ?",
	"acceptedAnswerId": 43110,
	"type": "question",
	"body": "Let's say I have a DataTable with a Name column. I want to have a collection of the unique names ordered alphabetically. The following query ignores the order by clause. var names = (from DataRow dr in dataTable.Rows orderby (string)dr[\"Name\"] select (string)dr[\"Name\"]).Distinct(); Why does the orderby not get enforced? "
}

The script is
jq -c '
    .user=(.user|tonumber) |
    .questionId=(.questionId|tonumber) |
    if .acceptedAnswerId then .acceptedAnswerId=(.acceptedAnswerId|tonumber) else . end |
    .creationDate=(.creationDate[:-4]+"Z")
'

I can upload the processed file somewhere if that would be easier for you.
I also think that a smaller subset of this dataset could be a great dataset to use in #1618, it has pretty much everything (except maybe json) to show off the current set of features in quickwit including timestamp based search and aggregations.

@imotov nice, I would be happy to update our S3 dataset with yours, and indeed, it would be nice to have it on the quickstart page.

I'm about to revive the VRL branch (#2555), so the transformation can be performed natively in Quickwit.

Hmm, maybe we can do both. I think converting these 4 fields might be too much processing for the getting started page. Since “you never get a second chance to make a first Impression” having a dynamic and exciting getting started page is crucial. Coming from Elasticsearch, converting json strings to numbers just doesn’t excite me that much since Elasticsearch does this by default (it can be disabled with coerce flag in mapping). I feel that adding this part into getting started guide might bog down the reader with unnecessary details. What would excite me though is to do some additional transformation in VRL like calculating some metric on the text (length or word count for example) and then show it off in aggregation. First thing that comes to mind is to show how to find tags associated with the most (or the least) verbose answers on average. In other words, I think that for the getting started page it would be great to demonstrate VRL as add-on functionality instead of using it as a workaround for strange data. In more detailed tutorials, showing some ways to transfer data in bad format on the way in would be really helpful.

I agree with you :)

@fmassot here is the transformed dataset:
https://f000.backblazeb2.com/file/transport-public/stackoverflow.posts.transformed.json.gz
I also created a smaller version with the first 10000 records:
https://f000.backblazeb2.com/file/transport-public/stackoverflow.posts.transformed-10000.json
I tested the bigger dataset with the following index settings:
https://f000.backblazeb2.com/file/transport-public/stackoverflow.yaml
I will open PR with changes to getting started guide in a bit. But here are some fun queries we could mention there:
What are the top 10 tags related to "rust":
curl -XPOST localhost:7280/api/v1/stackoverflow/search -H 'Content-Type: application/json' -d '{
    "query": "tags:rust",
    "max_hits": 1,
    "aggs":
    {
        "rust_related_tags":
        {
            "terms":
            {
                "field": "tags",
                "size": 10
            }
        }
    }
}'

What topics were users happy about:
curl -XPOST localhost:7280/api/v1/stackoverflow/search -H 'Content-Type: application/json' -d '{
    "query": "body:happy",
    "max_hits": 0,
    "aggs":
    {
        "happy_tags":
        {
            "terms":
            {
                "field": "tags",
                "size": 10
            }
        }
    }
}'

It's fun list, but I wouldn't read too much into it since it most likely just reflects frequency of questions on these topics. If you replace "happy" with "frustrating" the top 10 almost doesn't change with the exception of "ios" tag replacing "c++", which somewhat matches my experience in the last 8 months 😄. We need a significant_terms aggregation to make this example truly interesting.
Who was the most prolific answerer who mention rust in their answers?
curl -XPOST localhost:7280/api/v1/stackoverflow/search -H 'Content-Type: application/json' -d '{
    "query": "body:rust AND type:answer",
    "max_hits": 0,
    "aggs":
    {
        "rust_answerers":
        {
            "terms":
            {
                "field": "user",
                "size": 10
            }
        }
    }
}'

Unfortunately, when I tried to run this aggregation on the entire dataset I got an error message "Aborting aggregation because too many buckets were created". It seems like we could apply some optimization there since we are only asking for 15 buckets per split.

This is very interesting, thanks! I’m going to upload your datasets very soon. @PSeitz can you have a look at the aggregation query?

@imotov datasets uploaded here:

stackoverflow.posts.transformed.json.gz
stackoverflow.posts.transformed-10000.json

We have a limit on the buckets set to 65000. The limit is shared between bucket aggregations within a request.
https://github.com/quickwit-oss/quickwit/blob/main/quickwit/quickwit-search/src/collector.rs#L314
For the terms aggregation we could circumvent this limit, by periodically removing the N lowest counts.

@fmassot could you make these files publicly readable?

@fmassot actually please wait a bit with it. I just discovered that I missed a field during the conversion. Let me regenerate the file and re-upload it again.

@fmassot I have uploaded the new versions to the same location. Could you re-upload them to S3 and fix permissions, please? Thanks!

@imotov should be good now

@fmassot Thanks! It seems to work. I opened #2725 that replaces wikipedia with stackoverflow. Not sure if we can consider this issue done or if you also want to create a more detailed tutorial that uses this dataset.

Quickstart updated: https://quickwit.io/docs/get-started/quickstart
Thanks!


discard trailing blank comments

close #539

The packed_simd build fails with the following. However, it is strange that all but the first line of the comment is indented to begin with; I feel it shouldn't be indented.
It seems related to https://github.com/rust-lang-nursery/rustfmt/issues/2917
Diff in /home/yfful/documents/code/rustfmt/packed_simd/src/api/from/from_vector.rs at line 18:
         }

         // FIXME: `Into::into` is not inline, but due to
-                                                // the blanket impl in `std`, which is not
-                                                // marked `default`, we cannot override it here with
-                                                // specialization.
-                                                /*
-                                                impl Into<$id> for $source {
-                                                    #[inline]
-                                                    fn into(self) -> $id {
-                                                        unsafe { simd_cast(self) }
-                                                    }
-                                                }
-                                                */
+                                                        // the blanket impl in `std`, which is not
+                                                        // marked `default`, we cannot override it here with
+                                                        // specialization.
+                                                        /*
+                                                        impl Into<$id> for $source {
+                                                            #[inline]
+                                                            fn into(self) -> $id {
+                                                                unsafe { simd_cast(self) }
+                                                            }
+                                                        }
+                                                        */

         test_if!{
             $test_tt:
Diff in /home/yfful/documents/code/rustfmt/packed_simd/src/api/reductions/min_max.rs at line 41:
                     target_arch = "arm",
                     all(target_arch = "x86", not(target_feature = "sse2")),
                     target_arch = "powerpc64",
-                ),))]
+                )))]
                 {
                     use llvm::simd_reduce_min;
                     let v: $ielem_ty = unsafe { simd_reduce_min(self.0) };

The packed_simd build fails with the following

Is this a new issue? It doesn't look like it should be caused by your patch, but if it is, it would be good not to and to add this as a test.

And the code looks great, thanks!

With the latest packed_simd master, I don't see anymore differences in packed_simd, but it was happening up to commit  https://github.com/rust-lang-nursery/packed_simd/commit/1a6450d9f31ad7b42042ca4c18c4b05dff5e75ea.
It is interesting to note that the indentation of that commented code increased already in a previous commit https://github.com/rust-lang-nursery/packed_simd/commit/0cab9e92b6d9f7294b391864be833e09a39f1bc3#diff-a70485da056880cc8fbf5e1bd3cb33fa
Although that indentation shift is not due to a change in this PR, should I open an issue for it though ? The indentation should not increase and stay at the // FIXME column I guess.
The problem with rand still occurs: it's an extra comma:
Diff in /home/yfful/documents/code/rustfmt/rand/src/rngs/entropy.rs at line 290:
         all(target_arch = "wasm32", feature = "stdweb"),
         all(target_arch = "wasm32", feature = "wasm-bindgen"),
     ),
-)))]
+),))]
 type Os = NoSource;

 type Custom = NoSource;

should I open an issue for it though ?

Yes please!


some issues on data preparation stage

Hello, author
Thanks for your great work and sharing
I tried to prepare data using ycbv_pbr datastet, but there is an error
usage: collect_image_list.py [-h] [--source-dir SOURCE_DIR]
[--save-path SAVE_PATH] [--pattern PATTERN]
collect_image_list.py: error: unrecognized arguments: --image_list /home/ivc2411/path/data/image_lists/train_pbr.txt
Can you give me some advice?
Best

thanks for your reply
I have some questions about the paper

In the training process, the optimal result is to find the optimal seeds and the distance of the target pixel?
In the selection of predicited bboxs, the paper mentions fusing the same category of predicted bboxs to obtain more accurate results. Specifically, by what method is the fusion done. What are the specific differences with nms.

Thanks,
Best

@YangHai-1218
Please open the issue!


TLS SNI Support

Does not seem to support TLS Server Name Indication.
Cannot connect to this HTTPS server: https://httpbin.org:443/ip

Thank you, should be fixed now.


Druid Kinesis: add support for plain JSON events

This mode of operation makes kinesis-druid usable by non-Snowplow users.

closing


consider adding docstrings

I am still unsure whether we need them everywhere. Some methods are already obvious in usage...

for example
browser.quit
browser.close

Yeah, for some commands it's good to have docstrings:)
like for the ones you mentioned.

It's pretty good practice to have docstrings for methods - helps a lot with IntelliSense in most IDE's. It's always nice to have, it looks good too. Some of the most popular libraries out there have comments for the most obvious methods. Let us not assume everyone is intelligent enough to figure it out :).
If you would like help with docstrings for methods for documenting everything, I will be more than glad to help @yashaka !

@MatuMikey
I am not sure "most popular libraries" should be used as authority to follow:) I believe we should filter "popularity" by common sense :)
Probably the majority of Selene methods would benefit from having docstrings... If the minority of methods don't need docstrings, then because of "minority" – we still can add docstrings for consistency... But if "half of selene methods" (i.e. not minority) have the context of "nothing useful can be added as docstring", then I would not bloat code with something useless just for consistency. Nevertheless, we have to start adding usefull docstrings first, to see - how much "obvious methods" will remain. Then we can decide what to do with them:) Maybe it will happen that something useful can be added to docstrings of all selene methods:)
Right now I working on #406, that is pretty big chunk of work... Probably we should start working on docstrings after #406 is done...

connected to #456


Add awesome-newsletters

It's just front-end + Node at this moment, but should grow.

https://github.com/sindresorhus/awesome/blob/master/contributing.md ;)


Add 'objectAcl' Option to the S3 Storage Backend

Adds objectAcl as a new option for the S3 storage backend to allow registry operators to specify a canned object ACL for each object stored in S3.
This solves the issue where a registry in AWS Account A is set to use an S3 bucket owned by AWS Account B. By default, all objects are set to private, which means that Account B cannot view or modify the uploaded files in their own bucket. If the object ACL option is set to bucket-owner-full-control on the registry, then there would be no problem.
closes #1865
closes #1730

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "frankchn/add-objectacl-to-s3" git@github.com:frankchn/distribution.git somewhere
$ cd somewhere
$ git rebase -i HEAD~2
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Ammending updates the existing PR. You DO NOT need to open a new one.

[Current coverage][cc-pull] is 52.50% (diff: 0.00%)

Merging [#1867][cc-pull] into [master][cc-base-branch] will decrease coverage by 6.93%

@@             master      #1867   diff @@
==========================================
  Files           120        120
  Lines         10547      10511    -36
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits           6269       5519   -750
- Misses         3445       4250   +805
+ Partials        833        742    -91

[][cc-pull]

Powered by Codecov. Last update [4abae2a...90c31e1][cc-compare]
[cc-base-branch]: https://codecov.io/gh/docker/distribution/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/docker/distribution/compare/4abae2ae560ba91db98779db2739eb97d7592fba...90c31e19652b7cff9d13862c34d0d63a9ac407fe?src=pr
[cc-pull]: https://codecov.io/gh/docker/distribution/pull/1867?src=pr

A couple of nits, but LGTM 👍

Can you rebase with master please @frankchn

@RichardScothern Done! This branch is 3 commits ahead of docker:master.

Great, thanks @frankchn


WIP: Feature: add more set operations

Codecov Report
Base: 100.00% // Head: 100.00% // No change to project coverage :thumbsup:

Coverage data is based on head (323db68) compared to base (4ce3c61).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #18   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            2         2
  Lines          204       204
=========================================
  Hits           204       204

Flag
Coverage Δ

unittests
100.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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


Fix compile error when using TLSF memory manager

when CONFIG_TLSF is enabled, board.c for bl808 failed to compile as it was trying to print out system_mmheap which wasn't used.
add a function to export used/free memory from TLSF and print that out in board.c

Thank you for your PR!

Thank you for your PR!


Further refactor of hostcalls

This PR does further refactoring of the hostcalls. In particular, it

introduces helper type Result<T> = Result<T, host::__wasi_errno_t>
swaps &FdEntry for &File wherever possible

As a by-product of the second bulletpoint, fd_renumber is now platform independent. I've also added a positive testcase for fd_renumber to verify that it indeed is correct.
EDIT: NB while this PR builds on #37, it is not a prerequisite for it, and should we decide to go with pure &str and String instead of WasiPath and WasiPathBuf wrapper types as per our discussion in #37, I'll make all the necessary rebasing work, so don't let this sway you when going over this PR :-)

cc @sunfishcode @alexcrichton

This seems reasonable to me! I ended up seeing #39 first and left one tangential comment there which is probably also equally applicable to this, but both seem fine to land now.

Looks good!