The translation function changes during rendering

Problem: The translation function changes during rendering
I experiencing this issue with the next code:
import React, { useEffect, useState } from 'react'
import useTranslation from 'next-translate/useTranslation'
import Button from '../Button/Button'

const FormErrorHandler = () => {
  const [state, setState] = useState(false)
  const { t } = useTranslation('validation')

  useEffect(() => {
    console.log('T WAS CHANGED!', state)
  }, [t])

  return <Button title={t('email')}  onClick={() => setState((p) => !p)} />
}

export default FormErrorHandler

Console output:
T WAS CHANGED! false
T WAS CHANGED! true
T WAS CHANGED! false
...

I think this is a big problem: I am passing t function to any hook, that need to be recreated after language changed.
There was no issues using next-i18next with it: Translate function was changed only when language changed.
Currently I can avoid this problem with useMemo hook like:
import React, { useEffect, useMemo, useState } from 'react'
import useTranslation from 'next-translate/useTranslation'
import Button from '../Button/Button'

const _useTranslation = () => {
  const { t, lang } = useTranslation('validation')
  const T = useMemo(() => t, [lang])
  return { T, lang }
}

const FormErrorHandler = () => {
  const [state, setState] = useState(false)
  const { T } = _useTranslation()

  useEffect(() => {
    console.log('T WAS CHANGED!', state)
  }, [T])

  return <Button title={T('email')} onClick={() => setState((p) => !p)} />
}

export default FormErrorHandler

... due to I have a wrapper function for your library.
But this could be a really big problem for all who hasn't.

But this is not really a problem... you put it as a dependency of the hook but in reality it would only make sense to put the lang as the dependency, right?
import React, { useEffect, useState } from 'react'
import useTranslation from 'next-translate/useTranslation'
import Button from '../Button/Button'

const FormErrorHandler = () => {
  const [state, setState] = useState(false)
  const { t, lang } = useTranslation('validation')

  useEffect(() => {
    // ...
  }, [lang]) // doesn't make sense to put the `t` function as dependency

  return <Button title={t('email')}  onClick={() => setState((p) => !p)} />
}

export default FormErrorHandler

I also recommend using the t function only in the template to avoid problems:
function Example() {
  const { t } = useTranslation('validation')
  const [state, set] = useReducer(reducer, initialArg, init);

  useEffect(() => {
    set('translationKey', 'example-of-translation')
  },
  []) // No dependencies

  return
{t(state.translationKey}

}

But this is not really a problem... you put it as a dependency of the hook but in reality it would only make sense to put the lang as the dependency, right?
import React, { useEffect, useState } from 'react'
import useTranslation from 'next-translate/useTranslation'
import Button from '../Button/Button'

const FormErrorHandler = () => {
  const [state, setState] = useState(false)
  const { t, lang } = useTranslation('validation')

  useEffect(() => {
    // ...
  }, [lang]) // doesn't make sense to put the `t` function as dependency

  return <Button title={t('email')}  onClick={() => setState((p) => !p)} />
}

export default FormErrorHandler

I also recommend using the t function only in the template to avoid problems:
function Example() {
  const { t } = useTranslation('validation')
  const [state, set] = useReducer(reducer, initialArg, init);

  useEffect(() => {
    set('translationKey', 'example-of-translation')
  },
  []) // No dependencies

  return
{t(state.translationKey}

}

Yes, I can put lang as dependency, but after migration from i18next, I need to change it everywhere in the project (this is probably 100+ places)
Don't you think this library should work as much similar as other popular i18n libraries? I don't really know, if every JS library works similar, but I think next-translate is very similar to i18next now.
"I also recommend using the t function only in the template to avoid problems:"
I was talking about dependecy for useCallback and useMemo, which return ReactNode.

Yes, I can put lang as dependency, but after migration from i18next, I need to change it everywhere in the project (this is probably 100+ places)
Don't you think this library should work as much similar as other popular i18n libraries? I don't really know, if every JS library works similar, but I think next-translate is very similar to i18next now.
"I also recommend using the t function only in the template to avoid problems:"
I was talking about dependecy for useCallback and useMemo, which return ReactNode.

Ran into the same issue. Fixed it by removing t from dependency array and  adding // eslint-disable-next-line react-hooks/exhaustive-deps. I do agree with @iksent that this can lead to serious issues for people not realising that t changes on render.

@iksent @RandomDude123 I did a PR to fix this inside the useTranslation hook, this way you do not need a workaround.

@iksent @RandomDude123  already pre-released on 1.0.6-canary.3 😊  If you can confirm that it works, that would be great

I think we can revert the PR, because it also does not solve the problem it was trying to solve and introduces this other one: https://github.com/vinissimus/next-translate/issues/604

@aralroca Memoizing t does prevent translations from being removed before any page/route transition animation. As of now, people should be aware they’ll have to memoize t themselves when using page transitions, wouldn’t it be more appropriate to solve this within the library.

Create a custom hook which returns a memoized copy of t.
// /src/hooks/use-memo-translation.ts

import { useMemo } from 'react'
import { Translate } from 'next-translate'
import useTranslation from 'next-translate/useTranslation'

/**
  In the current version of next-translate `t` will change before
  any page-transition-animation starts. Memoizing `t` will keep it
  around while animating.
*/
const _useTranslation = (key?: string): { t: Translate; lang: string } => {
  const { t: _t, lang } = useTranslation(key)
  // eslint-disable-next-line react-hooks/exhaustive-deps
  const t = useMemo(() => _t, [lang]) // `t` should NOT be a hook dependency here.
  return { t, lang }
}

//  Default export to make reverting to non wrapped version more seamless
export default _useTranslation

Next making sure the baseUrl in tsconfig.json is set (docs) will allow you te replace all next-translate/useTranslation imports with hooks/use-memo-translation and makes you easily revert to the original hook.

@timohofmeijer Thanks! I ran into unexpected useEffect infinite loops due to this issue too. It really kills any useEffect or useMemo usage unfortunately.
I tried your hook and the tsconfig baseUrl suggestion you made:
"baseUrl": ".",
    "paths": {
      "next-translate/useTranslation":["src/feature/i18n/useMemoTranslation.ts"]
    }

.. but got a different infinite loop - because import useTranslation from 'next-translate/useTranslation' inside useMemoTranslation was being re-written to itself.
I suppose it'd work if use-memo-translation was a separate library?

@timohofmeijer Thanks! I ran into unexpected useEffect infinite loops due to this issue too. It really kills any useEffect or useMemo usage unfortunately.
I tried your hook and the tsconfig baseUrl suggestion you made:
"baseUrl": ".",
    "paths": {
      "next-translate/useTranslation":["src/feature/i18n/useMemoTranslation.ts"]
    }

.. but got a different infinite loop - because import useTranslation from 'next-translate/useTranslation' inside useMemoTranslation was being re-written to itself.
I suppose it'd work if use-memo-translation was a separate library?

I used baseUrl to get rid of relative import paths to make it easy to replace back all imports in my codebase. I simply set "baseUrl": "./src", so I could import like this import useTranslate from 'hooks/use-memo-translation'. Making it easy to replace could have been achieved by a simple regex search/replace as well though. It was not actually part of the fix, sorry for putting you on the wrong track there.

Thanks @timohofmeijer! I ended up manually using useMemoTranslation instead - likely clearer for future maintainers of this code too, rather than tsconfig 'magic'. All works well so far.

Is there a fix for this? in 1.5.0 it is still a problem where I think it could be a really simple fix inside the library.
Especially since eslint-disable-next-line react-hooks/exhaustive-deps wants to add the t function to every dependency-array


Fix multiline sorting with force-alphabetical-sort

Raised in https://github.com/timothycrosley/isort/issues/364
The separate code for --force-alphabetical-sort has been removed and
a boolean flag added to handle sorting with or without case in the
_module_key function (which handles the sorting).
Note this commit alters these 2 tests:
test_alphabetic_sorting_no_newlines, test_alphabetic_sorting
This results in the lone imports being moved to the top of the file.
I think this is better as it means the force_alphabetical_sort tests
now behave similarly to the other tests in the file.
Please advise if it is ok to change the tests like this.
The big red commit in isort.py is because lines 444 -> 468 were removed and the
if statement was removed

Awesome work! Great job reducing the line count while improving the functionality. Thanks!
~Timothy


dist.tarball points to http instead of https

My reason:
Although using the registry with SSL, in the package.json that describes all the versions of a package (in the storage directory) I still get dist.tarball pointing to http instead of https
 "dist": {
    "shasum": "4d2c8bcc24c92531270815b8be372ab0ea104e3c",
    "tarball": "http://registry.xxxx.io/<EMAIL_ADDRESS>}

Also see https://github.com/npm/npm/issues/11471 and http://blog.npmjs.org/post/142077474335/npm-registry-is-now-fully-https
which might be related
I'm serving the verdaccio registry through a nginx SSL proxy.
Any pointers?

@radubrehar it would be helpful

your configuration
and perhaps more questions based on that

Hello, I can't reproduce this issue, could your provide your nginx config and verdaccio config?

My config.yaml is:
storage: ./storage

web:
  enable: false

https:

listen: <IP_ADDRESS>:4873
auth:
  htpasswd:
    file: ./htpasswd
    # Maximum amount of users allowed to register, defaults to "+inf".
    # You can set this to -1 to disable registration.
    max_users: 6

# a list of other known repositories we can talk to
uplinks:
  npmjs:
    url: https://registry.npmjs.org/

packages:

  '@private/private':
    access: admin user
    publish: admin

# log settings
logs:
  - {type: file, path: ./logs/http.log, format: json, level: http}
  - {type: file, path: ./logs/info.log, format: json, level: info}

My nginx relevant portion:
server {
	listen 80 default_server;
	listen [::]:80 default_server;
	# SSL configuration
	server_name registry.xxxx.io;

	location / {
          proxy_pass http://<IP_ADDRESS>:4873/;
          proxy_set_header Host $host:$server_port;
          proxy_read_timeout 90;
          proxy_set_header X-Forwarded-For $remote_addr;
	}

    listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/registry.xxxx.io/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/registry.xxxx.io/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot

    if ($scheme != "https") {
        return 301 https://$host$request_uri;
    } # managed by Certbot

}

@radubrehar which verdaccio version are you using? I'd recommend the latest one.

@juanpicado I'm using 2.2.1 - i'll switch to the last version and come back with a status. Thanks for the great work!

Sadly, seems like using the latest version, 2.2.7-r makes no difference

Ok, good to know. I will try to see next days what could be.  I need set up a similar env

The above issue came from usage with yarn, which tries to download the package from http://registry.xxx.io:443/.... which is obviously not correct. The npm client though works correctly and manages to download the tar.gz file. Could this be an issue with yarn instead of verdaccio? Have you experimented something similar?
I wondering if there's something strange in my setup...

As i see, you have add https section into verdaccio configure file, if  your verdaccio is running behind nginx reverse proxy, you don't need this section.
And, when you are using verdaccio with https reverse proxy, you MUST set url_prefix to https://you-registry.corp.com, this is a known issue, because reverse proxy will not tell verdaccio what's the origin protocol
/cc @juanpicado

@Meeeeow can we add that to the documentation?

@Meeeeow thanks a lot!
Seems like usage with yarn is now solved by adding url_prefix!
That was my main problem, so I think we can close the issue now.

@radubrehar Thanks for feedback, we will close it after update documentation


In Python3 - error writing XML to file

When downloading the xml file for a license submittal, the following error occurs:
  File "C:\Users\gary\git\temp\spdx-online-tools\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
    response = get_response(request)
  File "C:\Users\gary\git\temp\spdx-online-tools\venv\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "C:\Users\gary\git\temp\spdx-online-tools\venv\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "C:\Users\gary\git\temp\spdx-online-tools\src\app\views.py", line 360, in licenseInformation
    xmlFile.write(xmlString)
TypeError: a bytes-like object is required, not 'str'

is this still a unique open issue? seems similar to something more recent (or has been fixed?)
@goneall @rtgdk


Add versions plugin.

This will allow for automatic dependencies and plugins updates.
http://www.mojohaus.org/versions-maven-plugin/examples/advancing-dependency-versions.html
For example, use the following command to update to the latest release versions of dependencies:
mvn versions:use-latest-releases

FYI: @lesv

[Current coverage][cc-pull] is 25.00%

Merging [#14][cc-pull] into [master][cc-base-branch] will not change coverage

@@             master        #14   diff @@
==========================================
  Files             1          1
  Lines             4          4
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits              1          1
  Misses            3          3
  Partials          0          0

Powered by Codecov. Last updated by [7b23e99...5076e17][cc-compare]
[cc-base-branch]: https://codecov.io/gh/GoogleCloudPlatform/java-repo-tools/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/GoogleCloudPlatform/java-repo-tools/compare/7b23e99d53cd593465acb1177bc4d18fde2ffd08...5076e173dfc15756935d0c3a45cbc66d5df49d9e
[cc-pull]: https://codecov.io/gh/GoogleCloudPlatform/java-repo-tools/pull/14?src=pr

LGTM

Current coverage is 25.00%

Merging #14 into master will not change coverage

@@             master        #14   diff @@
==========================================
  Files             1          1
  Lines             4          4
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits              1          1
  Misses            3          3
  Partials          0          0

Powered by Codecov. Last updated by 7b23e99...5076e17

This will allow for automatic dependencies and plugins updates.
http://www.mojohaus.org/versions-maven-plugin/examples/advancing-dependency-versions.html
For example, use the following command to update to the latest release versions of dependencies:
mvn versions:use-latest-releases

FYI: @lesv


scan: ability to local directory

For example:
$ chain-bench scan .

I think currently passing --repository-url is a must.

Hi @Dentrax, Could you please elaborate on the motivation and the expected behaviors?
Just to mention that most of the checks require API data fetching.

If you have a git repo checked out locally to disk, can you scan that repo locally? ( without connecting to a git server.. )

Sorry for the lack of detail - I was rushing up to something, so couldn't explain the details well. 🙏
Imagine how official $ gh tool works. I can easily play with gh without passing additional --repository-url <REPOSITORY_URL> --access-token <TOKEN> flags. It somehow automatically recognize the URL and gets the token from ~/.config/gh/hosts.yml file.
My idea is here to implement similar UX (auth parameterless) to scan remote repository. It's not about the "scanning repo locally".

@Dentrax you're suggesting to improve the experience to support the gihub config ~/.config/gh/hosts.yml of the tool "gh" , is another use case of your proposal ? or is only an improvement to gh?


[REQUEST] Support for more providers

AniWorld seems to have stopped using Streamtape and Vidoza for new uploads. This means the only remaining, supported provider that's actively used for new uploads is VOE. And with VOE being prone to breaking (as is the case right now, #67) I believe it would be important to support some of the other providers AniWorld uses now to ensure this tool will not die.
From what I've seen, the providers mostly used now are:

Doodstream
Filemoon
Luluvdo
SpeedFiles
Vidmoly

The point of this issue is not to suddenly support all of these providers (allthough that would of course be the ideal case) but to look into at least some of these providers.
I'm not very experienced in web-scraping nor python, so I don't think I can implement any of these myself, but from the looks of it, at least some of the new providers look like they should be quite simple to download from.

Actually, it appears that for Streamtape, they even removed it completely, even for all sites. This makes this even more important, I'd say.

Just so i said it im already looking at this. idk how long it will take as im not the best with JS and reversing websites.

Btw. there is already a Fork with Doodstream:
https://github.com/Denfie/aniworld_scraper/commit/0af601ce55021d7eb3edfd98edc5795c07c8ffec#diff-f16ecba451a7e462768fd2dbd677bba9624f4ab1c8c24aca99655575356877a1R85
Maybe this can help a bit.

Ill look into it thanks @FantaZimt !
I have a few more days left of work and then im on christmas break so i will have a lot more time to work on this.
I also started working on the rework so a complete recode from the ground as this code is very bad to be honest. (It was my first project i made with 1 month of python knowledge...)


removing operator folder

removing operator folder in favor of cloning from spinnaker-kustomize-patches

The title of this Pull Request needs to be changed to match the format:
<type>(<scope>): <subject>

See more details here: https://www.spinnaker.io/community/contributing/submitting/#commit-message-conventions
Some common examples are:
feat(armory.io): add docs.armory.io
fix(parser): grammar and spelling
style(loadingPage): made it super pretty!
refactor(helpMessages): changed order to make more sense

The title of this Pull Request needs to be changed to match the format:
<type>(<scope>): <subject>

See more details here: https://www.spinnaker.io/community/contributing/submitting/#commit-message-conventions
Some common examples are:
feat(armory.io): add docs.armory.io
fix(parser): grammar and spelling
style(loadingPage): made it super pretty!
refactor(helpMessages): changed order to make more sense

Definitely think that's a good idea so people don't get confused.

Definitely think that's a good idea so people don't get confused.


Update .pre-commit-config.yaml

Allow the flag ignore at the module level
If we don't skip the scan in terraform downloaded modules (It's doing it twice), the ignore flag doesn't work at that level; adding it makes it work and doesn't affect any vulnerability scan in the module.
Change description

Description here

Type of change

[x] Bug fix (fixes an issue)
[ ] New feature (adds functionality)

Related issues

Fix #1

Checklists
Development

[x] Lint rules pass locally
[x] Application changes have been tested thoroughly
[ ] Automated tests covering modified code pass

Security

[x] Security impact of change has been considered
[ ] Code follows company security practices and guidelines

Code review

[ ] Pull request has a descriptive title and context useful to a reviewer. Screenshots or screencasts are attached as necessary
[ ] "Ready for review" label attached and reviewers assigned
[ ] Changes have been reviewed by at least one other contributor
[ ] Pull request linked to task tracker where applicable

has this change been tested?

It was tested thoroughly with the EPB project; I'll proceed to merge it.


pull request for e2e test at 02/04/2017 21:45:07

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


headerShown is false

headerShown is false but it still visible with like title1 or titl2

Header is not hiding though header shown is false. Any solution??

same issue....

@yetki After so many attempts to achieve this, at last, I made my own custom bottom tab bar.

I couldn't able  to hide header

@Chetanya2809 How did you fix it? I'd love to get access to your code, if you are willing.

add screenOptions={{ headerShown: false, }} on CurvedBottomBar

@Usamaliaquat123 Thank you!


⚠ Bofrost.at has degraded performance

In 4ded279, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 2478 ms

Resolved: Bofrost.at performance has improved in c3e2968 after 6 minutes.


[Storage] Remove retries for the tests

Removing mocha retry configs for both the node tests and the browser tests
(Meaning, if a test fails, it won't be re-run)

Any links to prior discussions on why we are removing the retries?

More Info
https://github.com/Azure/azure-sdk-for-js/issues/4196
In the current retry mechanism for the tests, we have enabled retries at the test-suite level which might hide flaky tests and we might potentially lose any hidden bugs with the SDK or even with the service.
In case we are addressing the flaky connectivity issues by retrying, the ideal solution is to be scoping it better(like retrying that specific request).
@mikeharder is currently working on getting the live tests to succeed at least 90% without the retries for tests.


using [indentation] in 2.0

The PHP version you are using:
7.0
PHP CS Fixer version you are using:
2.0
The command you use to run the fixer (and the configuration file you are using if any).
https://github.com/FriendsOfPHP/PHP-CS-Fixer/blame/v2.0.0/UPGRADE.md#L97
as document said:
indentation =>no_tab_indentation
but no_tab_indentation not found
is anything wrong here?

Yes, the docs are exactly the wrong way around. no_tab_indentation is the old name.

This is currently missing as feature, @ see
https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/770
https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/1438
I've opened an PR to fix the docs, let me know what you think.

This is currently missing as feature, @ see
https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/770
https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/1438
I've opened an PR to fix the docs, let me know what you think.

Closing, as:

docs were updated
for array it's a duplicated issue


Build fails with default settings if 3rd party dependencies aren't installed

When running the dev server with default settings, I get these messages:
Could not resolve id quill <path>/node_modules/.pnpm/primevue@3.37.0_vue@3.3.4/node_modules/primevue/editor/editor.esm.js?v=d38541b8
Could not resolve id chart.js/auto <path>/node_modules/.pnpm/primevue@3.37.0_vue@3.3.4/node_modules/primevue/chart/chart.esm.js?v=d38541b8

And if I try to build, I get this:

Details
 ERROR  [vite]: Rollup failed to resolve import "quill" from "<path>/node_modules/.pnpm/primevue<EMAIL_ADDRESS>This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external

[6:10:26 PM]  ERROR  Nuxt Build Error: [vite]: Rollup failed to resolve import "quill" from "<path>/node_modules/.pnpm/primevue<EMAIL_ADDRESS>This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external

  This is most likely unintended because it can break your application at runtime.
  If you do want to externalize this module explicitly add it to
  build.rollupOptions.external
  at viteWarn (node_modules/.pnpm/vite@4.4.9_@types+node@18.17.16/node_modules/vite/dist/node/chunks/dep-df561101.js:48142:27)
  at onRollupWarning (node_modules/.pnpm/vite@4.4.9_@types+node@18.17.16/node_modules/vite/dist/node/chunks/dep-df561101.js:48174:9)
  at onwarn (node_modules/.pnpm/vite@4.4.9_@types+node@18.17.16/node_modules/vite/dist/node/chunks/dep-df561101.js:47902:13)
  at node_modules/.pnpm/rollup@3.29.3/node_modules/rollup/dist/es/shared/node-entry.js:24271:13
  at Object.logger [as onLog] (node_modules/.pnpm/rollup@3.29.3/node_modules/rollup/dist/es/shared/node-entry.js:25945:9)
  at ModuleLoader.handleInvalidResolvedId (node_modules/.pnpm/rollup@3.29.3/node_modules/rollup/dist/es/shared/node-entry.js:24857:26)
  at ModuleLoader.resolveDynamicImport (node_modules/.pnpm/rollup@3.29.3/node_modules/rollup/dist/es/shared/node-entry.js:24915:58)
  at async node_modules/.pnpm/rollup@3.29.3/node_modules/rollup/dist/es/shared/node-entry.js:24802:32

 ELIFECYCLE  Command failed with exit code 1.

This makes sense since I don't have those packages installed and never will. I can of course exclude them, but I feel like options that require 3rd party dependencies should either need to be explicitly included in the settings or at least be mentioned in the docs that the default settings won't work without them.
Also, a question: would leaving the options at default, i.e. auto-importing everything, increase the bundle size or create any other potential performance issues?

Yes, for now, you can use exclude: ['Editor', 'Chart']. We'll discuss it and get back to you.

Hi,
Thank you very much for the feedback, but we do not plan to work on this at the moment. You can use the exclude option.
primevue: {
   components: {
      exclude: ['Editor', 'Chart']
   }
}

Best Regards,

Hi,
Due to popular demand from users, we excluded the Chart and Editor components by default. Ref; https://github.com/primefaces/primevue-nuxt-module/issues/17
Best Regards,


As a developer, I want an equivalent of "Breadcrumbs" in the state, so that I can include all the data in GraphQL and Archive node interactions

To be able to send all the data expected by the archive node and in the response of some of the GraphQL queries, the node must be able to reconstruct something equivalent to what in the OCaml node is called a "Breadcrumb". We have almost all the data necessary to reconstruct that easily, but there is one value that we are not storing anywhere, which is the flag that marks if a ledger proof was emitted for a particular block or now.

Fixed in #744


Copy campaign - [Depends on Database]

Add feature to allow campaign creators to choose from pre-existing campaigns

@timlinux @cchristelis @smit1678 Implementation for the copy campaign feature.
Depends on the database from the previous PR, needs to be rebased.

Can you make sure all tests pass please?


Task failed 'cloudify_aws.ec2.elasticip.create' -> 'dict' object has no attribute 'encode' [retry 6]

I saw there was a section for adding .awsconfig items, and looking into if these are a requirement for the example.
Traceback (most recent call last):
File "/tmp/pip-build-4JYaOO/cloudify-plugins-common/cloudify/dispatch.py", line 600, in main
File "/tmp/pip-build-4JYaOO/cloudify-plugins-common/cloudify/dispatch.py", line 366, in handle
File "/opt/mgmtworker/env/plugins/ansible-nodecellar-demo-deploy-v001-aws/lib/python2.7/site-packages/cloudify_aws/ec2/elasticip.py", line 34, in create
return ElasticIP().create_helper(args)
File "/opt/mgmtworker/env/plugins/ansible-nodecellar-demo-deploy-v001-aws/lib/python2.7/site-packages/cloudify_aws/ec2/elasticip.py", line 191, in init
resource_states=constants.ELASTICIP['STATES']
File "/opt/mgmtworker/env/plugins/ansible-nodecellar-demo-deploy-v001-aws/lib/python2.7/site-packages/cloudify_aws/base.py", line 280, in init
super(AwsBaseNode, self).init(client)
File "/opt/mgmtworker/env/plugins/ansible-nodecellar-demo-deploy-v001-aws/lib/python2.7/site-packages/cloudify_aws/base.py", line 33, in init
client if client else connection.EC2ConnectionClient().client()
File "/opt/mgmtworker/env/plugins/ansible-nodecellar-demo-deploy-v001-aws/lib/python2.7/site-packages/cloudify_aws/connection.py", line 61, in client
return EC2Connection(**aws_config)
File "/opt/mgmtworker/env/plugins/ansible-nodecellar-demo-deploy-v001-aws/lib/python2.7/site-packages/boto/ec2/connection.py", line 103, in init
profile_name=profile_name)
File "/opt/mgmtworker/env/plugins/ansible-nodecellar-demo-deploy-v001-aws/lib/python2.7/site-packages/boto/connection.py", line 1100, in init
provider=provider)
File "/opt/mgmtworker/env/plugins/ansible-nodecellar-demo-deploy-v001-aws/lib/python2.7/site-packages/boto/connection.py", line 569, in init
host, config, self.provider, self._required_auth_capability())
File "/opt/mgmtworker/env/plugins/ansible-nodecellar-demo-deploy-v001-aws/lib/python2.7/site-packages/boto/auth.py", line 977, in get_auth_handler
ready_handlers.append(handler(host, config, provider))
File "/opt/mgmtworker/env/plugins/ansible-nodecellar-demo-deploy-v001-aws/lib/python2.7/site-packages/boto/auth.py", line 301, in init
HmacKeys.init(self, host, config, provider)
File "/opt/mgmtworker/env/plugins/ansible-nodecellar-demo-deploy-v001-aws/lib/python2.7/site-packages/boto/auth.py", line 71, in init
self.update_provider(provider)
File "/opt/mgmtworker/env/plugins/ansible-nodecellar-demo-deploy-v001-aws/lib/python2.7/site-packages/boto/auth.py", line 75, in update_provider
self._hmac = hmac.new(self._provider.secret_key.encode('utf-8'),
AttributeError: 'dict' object has no attribute 'encode'

cfy events list --include-logs --execution-id 77394412-9526-4a6c-a402-ffd72da4b190
Listing events for execution id 77394412-9526-4a6c-a402-ffd72da4b190 [include_logs=True]
2017-04-12T17:47:14 CFY  Starting 'install' workflow execution
2017-04-12T17:47:14 CFY  [key_gj6k7v] Creating node
2017-04-12T17:47:14 CFY  [vpc_p3dkwy] Creating node
2017-04-12T17:47:14 CFY  [key_gj6k7v.create] Sending task 'cloudify_aws.ec2.keypair.create'
2017-04-12T17:47:14 CFY  [vpc_p3dkwy.create] Sending task 'cloudify_aws.vpc.vpc.create_vpc'
2017-04-12T17:47:14 CFY  [application_ip_cquttq] Creating node
2017-04-12T17:47:14 CFY  [key_gj6k7v.create] Task started 'cloudify_aws.ec2.keypair.create'
2017-04-12T17:47:14 CFY  [vpc_p3dkwy.create] Task started 'cloudify_aws.vpc.vpc.create_vpc'
2017-04-12T17:47:14 CFY  [application_ip_cquttq.create] Sending task 'cloudify_aws.ec2.elasticip.create'
2017-04-12T17:47:15 CFY  [application_ip_cquttq.create] Task started 'cloudify_aws.ec2.elasticip.create'
2017-04-12T17:47:15 CFY  [key_gj6k7v.create] Task failed 'cloudify_aws.ec2.keypair.create' -> 'dict' object has no attribute 'encode'
2017-04-12T17:47:15 CFY  [vpc_p3dkwy.create] Task failed 'cloudify_aws.vpc.vpc.create_vpc' -> 'dict' object has no attribute 'encode'
2017-04-12T17:47:15 CFY  [application_ip_cquttq.create] Task failed 'cloudify_aws.ec2.elasticip.create' -> 'dict' object has no attribute 'encode'
2017-04-12T17:47:45 CFY  [key_gj6k7v.create] Sending task 'cloudify_aws.ec2.keypair.create' [retry 1]
2017-04-12T17:47:45 CFY  [key_gj6k7v.create] Task started 'cloudify_aws.ec2.keypair.create' [retry 1]
2017-04-12T17:47:45 CFY  [vpc_p3dkwy.create] Sending task 'cloudify_aws.vpc.vpc.create_vpc' [retry 1]
2017-04-12T17:47:45 CFY  [vpc_p3dkwy.create] Task started 'cloudify_aws.vpc.vpc.create_vpc' [retry 1]
2017-04-12T17:47:45 CFY  [application_ip_cquttq.create] Sending task 'cloudify_aws.ec2.elasticip.create' [retry 1]
2017-04-12T17:47:45 CFY  [application_ip_cquttq.create] Task started 'cloudify_aws.ec2.elasticip.create' [retry 1]
2017-04-12T17:47:46 CFY  [key_gj6k7v.create] Task failed 'cloudify_aws.ec2.keypair.create' -> 'dict' object has no attribute 'encode' [retry 1]
2017-04-12T17:47:46 CFY  [vpc_p3dkwy.create] Task failed 'cloudify_aws.vpc.vpc.create_vpc' -> 'dict' object has no attribute 'encode' [retry 1]
2017-04-12T17:47:46 CFY  [application_ip_cquttq.create] Task failed 'cloudify_aws.ec2.elasticip.create' -> 'dict' object has no attribute 'encode' [retry 1]
2017-04-12T17:48:16 CFY  [key_gj6k7v.create] Sending task 'cloudify_aws.ec2.keypair.create' [retry 2]
2017-04-12T17:48:16 CFY  [key_gj6k7v.create] Task started 'cloudify_aws.ec2.keypair.create' [retry 2]
2017-04-12T17:48:16 CFY  [vpc_p3dkwy.create] Sending task 'cloudify_aws.vpc.vpc.create_vpc' [retry 2]
2017-04-12T17:48:16 CFY  [vpc_p3dkwy.create] Task started 'cloudify_aws.vpc.vpc.create_vpc' [retry 2]
2017-04-12T17:48:16 CFY  [application_ip_cquttq.create] Sending task 'cloudify_aws.ec2.elasticip.create' [retry 2]
2017-04-12T17:48:16 CFY  [application_ip_cquttq.create] Task started 'cloudify_aws.ec2.elasticip.create' [retry 2]
2017-04-12T17:48:17 CFY  [key_gj6k7v.create] Task failed 'cloudify_aws.ec2.keypair.create' -> 'dict' object has no attribute 'encode' [retry 2]
2017-04-12T17:48:17 CFY  [vpc_p3dkwy.create] Task failed 'cloudify_aws.vpc.vpc.create_vpc' -> 'dict' object has no attribute 'encode' [retry 2]
2017-04-12T17:48:17 CFY  [application_ip_cquttq.create] Task failed 'cloudify_aws.ec2.elasticip.create' -> 'dict' object has no attribute 'encode' [retry 2]
2017-04-12T17:48:47 CFY  [key_gj6k7v.create] Sending task 'cloudify_aws.ec2.keypair.create' [retry 3]
2017-04-12T17:48:47 CFY  [key_gj6k7v.create] Task started 'cloudify_aws.ec2.keypair.create' [retry 3]
2017-04-12T17:48:47 CFY  [vpc_p3dkwy.create] Sending task 'cloudify_aws.vpc.vpc.create_vpc' [retry 3]
2017-04-12T17:48:47 CFY  [vpc_p3dkwy.create] Task started 'cloudify_aws.vpc.vpc.create_vpc' [retry 3]
2017-04-12T17:48:47 CFY  [application_ip_cquttq.create] Sending task 'cloudify_aws.ec2.elasticip.create' [retry 3]
2017-04-12T17:48:47 CFY  [application_ip_cquttq.create] Task started 'cloudify_aws.ec2.elasticip.create' [retry 3]
2017-04-12T17:48:48 CFY  [key_gj6k7v.create] Task failed 'cloudify_aws.ec2.keypair.create' -> 'dict' object has no attribute 'encode' [retry 3]
2017-04-12T17:48:48 CFY  [vpc_p3dkwy.create] Task failed 'cloudify_aws.vpc.vpc.create_vpc' -> 'dict' object has no attribute 'encode' [retry 3]
2017-04-12T17:48:48 CFY  [application_ip_cquttq.create] Task failed 'cloudify_aws.ec2.elasticip.create' -> 'dict' object has no attribute 'encode' [retry 3]
2017-04-12T17:49:18 CFY  [key_gj6k7v.create] Sending task 'cloudify_aws.ec2.keypair.create' [retry 4]
2017-04-12T17:49:18 CFY  [key_gj6k7v.create] Task started 'cloudify_aws.ec2.keypair.create' [retry 4]
2017-04-12T17:49:18 CFY  [vpc_p3dkwy.create] Sending task 'cloudify_aws.vpc.vpc.create_vpc' [retry 4]
2017-04-12T17:49:18 CFY  [vpc_p3dkwy.create] Task started 'cloudify_aws.vpc.vpc.create_vpc' [retry 4]
2017-04-12T17:49:18 CFY  [application_ip_cquttq.create] Sending task 'cloudify_aws.ec2.elasticip.create' [retry 4]
2017-04-12T17:49:18 CFY  [application_ip_cquttq.create] Task started 'cloudify_aws.ec2.elasticip.create' [retry 4]
2017-04-12T17:49:19 CFY  [key_gj6k7v.create] Task failed 'cloudify_aws.ec2.keypair.create' -> 'dict' object has no attribute 'encode' [retry 4]
2017-04-12T17:49:19 CFY  [vpc_p3dkwy.create] Task failed 'cloudify_aws.vpc.vpc.create_vpc' -> 'dict' object has no attribute 'encode' [retry 4]
2017-04-12T17:49:19 CFY  [application_ip_cquttq.create] Task failed 'cloudify_aws.ec2.elasticip.create' -> 'dict' object has no attribute 'encode' [retry 4]
2017-04-12T17:49:49 CFY  [key_gj6k7v.create] Sending task 'cloudify_aws.ec2.keypair.create' [retry 5]
2017-04-12T17:49:49 CFY  [key_gj6k7v.create] Task started 'cloudify_aws.ec2.keypair.create' [retry 5]
2017-04-12T17:49:49 CFY  [vpc_p3dkwy.create] Sending task 'cloudify_aws.vpc.vpc.create_vpc' [retry 5]
2017-04-12T17:49:49 CFY  [vpc_p3dkwy.create] Task started 'cloudify_aws.vpc.vpc.create_vpc' [retry 5]
2017-04-12T17:49:49 CFY  [application_ip_cquttq.create] Sending task 'cloudify_aws.ec2.elasticip.create' [retry 5]
2017-04-12T17:49:49 CFY  [application_ip_cquttq.create] Task started 'cloudify_aws.ec2.elasticip.create' [retry 5]
2017-04-12T17:49:50 CFY  [key_gj6k7v.create] Task failed 'cloudify_aws.ec2.keypair.create' -> 'dict' object has no attribute 'encode' [retry 5]
2017-04-12T17:49:50 CFY  [vpc_p3dkwy.create] Task failed 'cloudify_aws.vpc.vpc.create_vpc' -> 'dict' object has no attribute 'encode' [retry 5]
2017-04-12T17:49:50 CFY  [application_ip_cquttq.create] Task failed 'cloudify_aws.ec2.elasticip.create' -> 'dict' object has no attribute 'encode' [retry 5]
2017-04-12T17:50:20 CFY  [key_gj6k7v.create] Sending task 'cloudify_aws.ec2.keypair.create' [retry 6]
2017-04-12T17:50:20 CFY  [vpc_p3dkwy.create] Sending task 'cloudify_aws.vpc.vpc.create_vpc' [retry 6]
2017-04-12T17:50:20 CFY  [key_gj6k7v.create] Task started 'cloudify_aws.ec2.keypair.create' [retry 6]
2017-04-12T17:50:20 CFY  [vpc_p3dkwy.create] Task started 'cloudify_aws.vpc.vpc.create_vpc' [retry 6]
2017-04-12T17:50:20 CFY  [application_ip_cquttq.create] Sending task 'cloudify_aws.ec2.elasticip.create' [retry 6]
2017-04-12T17:50:20 CFY  [application_ip_cquttq.create] Task started 'cloudify_aws.ec2.elasticip.create' [retry 6]
2017-04-12T17:50:21 CFY  [key_gj6k7v.create] Task failed 'cloudify_aws.ec2.keypair.create' -> 'dict' object has no attribute 'encode' [retry 6]
2017-04-12T17:50:21 CFY  [vpc_p3dkwy.create] Task failed 'cloudify_aws.vpc.vpc.create_vpc' -> 'dict' object has no attribute 'encode' [retry 6]
2017-04-12T17:50:21 CFY  [application_ip_cquttq.create] Task failed 'cloudify_aws.ec2.elasticip.create' -> 'dict' object has no attribute 'encode' [retry 6]
2017-04-12T17:50:24 CFY  'install' workflow execution cancelled
Total events: 68

Here is the blueprint that I'm using and slightly modified:
(342) [centos@cfy342-cli ansible-blueprint]$ cat aws-ansible-blueprint.yaml
tosca_definitions_version: cloudify_dsl_1_3
imports:

http://www.getcloudify.org/spec/cloudify/4.0/types.yaml
http://getcloudify.org.s3.amazonaws.com/spec/aws-plugin/1.4.4/plugin.yaml
http://www.getcloudify.org/spec/diamond-plugin/1.3.5/plugin.yaml
types/aws-ansible-types.yaml

#####################################################################################
inputs section allows the user to use same
blueprint for creating different deployments, each one
with its own parameters.
to specify deployment inputs run:
- cfy deployments create -b <blueprint_id> -d <deployment_id> -i inputs.json
#####################################################################################
inputs:
key_name:
default: demo_cfy_instance_keypair.pem
private_key_path:
default: ~/.ssh/demo_cfy_instance_keypair.pem
vpc_id:
type: string
vpc_cidr_block:
type: string
subnet_id:
type: string
subnet_cidr:
type: string
ec2_region_name:
default: us-west-2
ec2_region_endpoint:
default: ec2.us-west-2.amazonaws.com
availability_zone:
default: us-west-2a
ami:
description: >
Amazon Ubuntu 14.04 AMI
instance_type:
description: >
Agent VM Instance Type
agent_user:
default: ubuntu
dsl_definitions:
aws_config: &aws_config
  aws_access_key_id: { get_secret: aws_access_key_id }
  aws_secret_access_key: { get_secret: aws_secret_access_key }
  ec2_region_name: { get_input: ec2_region_name }
  ec2_region_endpoint: { get_input: ec2_region_endpoint }

node_templates:
ansible:
type: ansible.nodes.Ansible
properties:
playbook_file_name: main.yaml
public_ip: { get_attribute: [application_ip, aws_resource_id] }
relationships:
- type: ansible.relationships.contained_in
target: application_host
mongod:
type: ansible.nodes.MongoDatabase
properties:
public_ip: { get_attribute: [application_ip, aws_resource_id] }
relationships:
- type: cloudify.relationships.contained_in
target: application_host
- type: ansible.relationships.provisioned_by
target: ansible
nodejs:
type: ansible.nodes.NodecellarApplicationModule
properties:
public_ip: { get_attribute: [application_ip, aws_resource_id] }
relationships:
- type: cloudify.relationships.contained_in
target: application_host
- type: ansible.relationships.provisioned_by
target: ansible
- type: node_connected_to_mongo
target: mongod
application_host:
type: cloudify.aws.nodes.Instance
properties:
agent_config:
install_method: remote
port: 22
user: { get_input: agent_user }
key: { get_property: [ key, private_key_path ] }
aws_config: *aws_config
image_id: { get_input: ami }
instance_type: { get_input: instance_type }
parameters:
placement: { get_property: [ subnet, availability_zone ] }
relationships:
- type: cloudify.aws.relationships.instance_connected_to_keypair
target: key
- type: cloudify.aws.relationships.instance_connected_to_elastic_ip
target: application_ip
- type: cloudify.aws.relationships.instance_connected_to_subnet
target: subnet
- type: cloudify.aws.relationships.instance_connected_to_security_group
target: application_security_group
application_security_group:
type: cloudify.aws.nodes.SecurityGroup
properties:
aws_config: *aws_config
description: Security Group for ansible VMs
rules:
- ip_protocol: tcp
from_port: 22
to_port: 22
cidr_ip: { get_input: vpc_cidr_block }
- ip_protocol: tcp
from_port: 8080
to_port: 8080
cidr_ip: <IP_ADDRESS>/0
- ip_protocol: tcp
from_port: 27017
to_port: 27017
cidr_ip: { get_input: vpc_cidr_block }
relationships:
- type: cloudify.aws.relationships.security_group_contained_in_vpc
target: vpc
subnet:
type: cloudify.aws.nodes.Subnet
properties:
aws_config: *aws_config
use_external_resource: true
resource_id: { get_input: subnet_id }
cidr_block: { get_input: subnet_cidr }
availability_zone: { get_input: availability_zone }
relationships:
- type: cloudify.aws.relationships.subnet_contained_in_vpc
target: vpc
application_ip:
type: cloudify.aws.nodes.ElasticIP
properties:
aws_config: *aws_config
domain: vpc
vpc:
type: cloudify.aws.nodes.VPC
properties:
aws_config: *aws_config
use_external_resource: true
resource_id: { get_input: vpc_id }
cidr_block: { get_input: vpc_cidr_block }
key:
type: cloudify.aws.nodes.KeyPair
properties:
aws_config: *aws_config
resource_id: { get_input: key_name }
private_key_path: { get_input: private_key_path }
###########################################################
This outputs section exposes the application endpoint.
You can access it by running:
- cfy deployments -d <deployment_id> outputs
###########################################################
outputs:
endpoint:
description: Web application endpoint
value:
ip_address: { get_attribute: [ application_ip, aws_resource_id ] }
port: 8080

(342) [centos@cfy342-cli ansible-blueprint]$ cat inputs/aws-ansible-blueprint-inputs.yaml
vpc_id: vpc-1fe66d78
vpc_cidr_block: <IP_ADDRESS>/16
subnet_id: subnet-5c0fa33b
subnet_cidr: <IP_ADDRESS>/24
ec2_region_name: us-west-2
ec2_region_endpoint: ec2.us-west-2.amazonaws.com
availability_zone: us-west-2a
ami: ami-d2c924b2
instance_type: t2.large


[Script]: want to add checksum script

Aim
I want to add checksum script.
can you please assign me this task under gssoc'23 @av
Details
checksum script
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSoC'23 contributor
[X] I want to work on this issue

Go Ahead @Kalivarapubindusree


[Release] sdk/resourcemanager/migrationdiscovery/armmigrationdiscoverysap/0.1.0

https://github.com/Azure/sdk-release-request/issues/5007

/azp run prepare-pipelines

/azp run go - armmigrationdiscoverysap - ci

Wait for 3/30 to merge and release.

/check-enforcer override


Changes to project organization

This project is growing and I'm really loving how the community is turning out. One of my favorite things is being able to personally attend to every question, issue, pull request, and contributor to the level of detail that they deserve.
Caddy is an open source project built entirely on donated time and talent -- thank you, to all who have contributed -- we do it because we love the Web, Go, and it's a lot of fun! But seeing as I can't make a living off of this, it's going to continue to get harder for me to balance my life with this project. I love it, but my life immediately around me (family, school, work, etc.) obviously takes priority.
There's a lot of different aspects that make Caddy possible. It used to just be the core server, middleware, a website, and some documentation. I could manage all that. But now I'm starting to get a little overwhelmed. In order to ensure I don't hinder the growth and progress of Caddy, I propose that we group Caddy into separate, but tightly coupled, projects:

Figure A. Proposed project structure. (Don't read too much into this. Placement and ordering doesn't really matter.)

Build Server The back-end software that powers the Download page. Produces custom builds of Caddy on-demand.

Middleware All the middleware components located in the middleware folder. These give Caddy its magic powers.

Production Ops Caddy is a web server, but being one, is closely tied to sysadmin tasks which prepare the system to run a web server. I never intended to get into this because production environments are harsh and highly varied, but we've had a lot of issues, questions, and blog posts about this. People are skeptical that Caddy can be used in production, but I am confident that Caddy belongs in production as much as it does in dev. This team will help make Caddy easy to run in production.

Distribution This team will package up Caddy for Linux repos (apt-get, yum, ...), homebrew, and others, maintain the install script at getcaddy.com (which right now is just an experiment), and help make Caddy generally available to as wide an audience as possible. I'd love to see it on the Android and iPhone app stores some day.

Website This is, obviously, the Caddy website. Marketing, but also the download page.

Documentation This aspect includes the docs on the website, the developer wiki on GitHub, the main README.md file, the README.txt file in the dist folder, and the godoc comments.

Plugins This is an umbrella for all the various Caddy plugins (add-ons). Each plugin author is of course responsible for their own plugin but it'd be good to have a way to coordinate them all, especially where plugins may overlap or use code from one another.

API In version 0.9, Caddy will get an API. This aspect is all about the API's endpoints and client development.

Plugin Tooling Caddy developers benefit from caddydev and caddyext right now, but these tools need real names (might as well) and better unification, if possible. Anyway, developing plugins without these tools is very inconvenient, so they deserve our attention.

I'd like to appoint some volunteers to head up these projects and be the decision-makers for these aspects of Caddy. Of course I'm still able to provide direction where necessary, but I'd like to spread out the autonomy across all these aspects without me having to oversee/approve everything. This way the project can continue to progress without being hindered by my lack of time for it all.
To clarify, I'm not withdrawing from the project. :smile: I'm just trying not to be spread too thin.
Thoughts? Volunteers?
I dunno how this is going to go over with everyone else, so what do you think about this? Expectations for project leads aren't any different from regular contributions; it's basically just a more focused approach to development and directing questions to a project manager or lead contributor for that aspect of Caddy, rather than always to me.
Let me know what you think. If you'd be willing to be a project lead for one of these aspects, also let me know and I'll see about assembling a good team and making sure you have push rights, etc.

For what it's worth, I'll still oversee Caddy core and probably be heavily involved with website, API, build server, and documentation, at least in the short term. (Did you know? A new build server is already under way.)

I think it is a good idea. I help my brother with a couple repos that are way less traffic than caddy I know how exhausting it can be responding to everyone. Sharing the load will keep you from getting burned out and keep the caddy project growing. I like the project structure you proposed. Those seem like logical divisions of skills, interest, etc. for each project.
That being said I would be happy to help with whatever. Personally I think I would be most helpful working on the middleware project as that is what I have done in the past and is most relevant for what I use caddy for. I looked at couple of a the reverse proxy issues that have been opened up and think I could address most of those pretty easily. I also want to move some of my static sites over to using caddy and should have some bandwidth in the coming weeks to look at creating some caching middleware for those sites.

This is a good decision for the progress of the project. I really appreciate and I am pretty impressed with how much time you devote to the maintenance of a growing project like this. You have managed to get it this far and I think you have made the right decision.
My main contributions have revolved around Middleware, Plugins and Plugin Tooling. I am also pretty familiar with the different parts of the codebase bar API. I think I am best suited to those three but I am willing to help out in any aspect as I have been doing.
I also share the opinion that caddydev and caddyext may need to be merged for better all round experience.
Well done.

Hey Matt, I haven't (yet!) contributed to Caddy, but I just wanted to chime in here and add to the gratitude and praise others have shown. Thank you so much for all the time you have devoted to the project, it is a true inspiration to me to see all the progress you've made with the server.
Splitting things up and getting some extra help to help on the issue tracker and prioritization are the right steps to take. Hopefully after I've gotten a couple of pull requests under my belt I'll be in a place to be more helpful.
For now. Thank you for everything you've done here! Big fan of caddy!

Awesome idea! Big step push forward!

I think it is an ok, idea, but would caution against over-organizing too early. Would not be good to get into a situation where such and such can't be touched because it is so and so's domain only. It does seem this is growing beyond an individual effort and that is great.
There is a fairly active community, and lots of people willing to contribute. I am happy to contribute where I see a need, but also have a hard time wanting to pick a "bucket". I'd consider myself more general purpose / miscellaneous stuff.

I've reached out to a RH consultant to have a public yum package. Is there a repo to store things like SPEC files or signed package keys?

@nicholasa Thanks for doing that; not yet, but let's chat on gitter about it or in a new issue rather than in this one.
@captncraig Yeah, that's something that I'm trying to be sensitive to. Leading an aspect isn't so much about ownership as it is about coordinating and delegating the decision-making.
Thanks for those who have commented so far, I'm taking notes. :smile: Further feedback and suggestions are welcome.

Wish I could help. This is really great package, and fantastic for the golang community. When I get time I will come back for sure, and see what I can help with.

Wish I could help. This is really great package, and fantastic for the golang community. When I get time I will come back for sure, and see what I can help with.

Oops double post...

I like the idea. Count me in.

@wafture https://github.com/Xe/rpmspecs/tree/master/caddy https://copr.fedoraproject.org/coprs/xena/caddy/

@Xe while i'm not opposed to using systemd, it cuts out a severely large portion of servers, essentially anything below 7.x. It might be the future but millions of servers are still rockin 6.x, like all 5000 of the servers i manage during the day for example.

Yeah, I get that. I'd be willing to take a patch for RHEL 6 support. I just need a sysvinit script.

Looks like a good idea although I see "production ops" and "distribution" somewhat combined because their responsibility overlaps for me, if I'm wrong it would be nice to have a clear separation in the description.
I'm not able to help on a daily basis but I would be glad helping with some pull requests as well as filing issues for enhancement and design ideas from time to time, especially addressing packaging for the various Linux and BSD flavors (maybe we could provide init scripts and sample configuration within the dist/ folder of the repository as well as a packaging system based on Vagrant or Docker for automatically building packages for the respective distribution) as well as API server and client design, if desired (I'm working in API development almost all day and could provide client libraries for PHP and Ruby as well as maybe Python and Swift).

Hey everyone, sorry it's taking me some time to get around to this. I wanted to leave the issue open long enough to give more people a chance to see it and participate. I think we're having a pretty good response and I should have responded to this sooner!
I will be very happy to accept all of you into the project and to have you contribute simply where your expertise is or where you feel a certain amount of interest. I'm also thinking of giving commit rights to everyone who has submitted non-trivial, merged PRs. Node.js does something like this, and I like their model for a growing open source project: https://medium.com/the-javascript-collection/healthy-open-source-967fa8be7951
This'll hopefully grow our base of maintainers and hopefully bring more people back to improving the project by getting involved in bug fixes, code reviews, etc. I'm still mulling the details of this over in my head, but I'd like to know what you think of this.

@dencold What's your availability look like as far as contributing? I'll help onboard you.
@wafture Should those be in this repo or something separate? I know nothing when it comes to this stuff. :smile:
@hubertbanas Are you still interested in contributing again? If so, I'll give you push rights so you can help with issues and PRs when you can.
@dprandzioch and @acmacalister Thanks for your contributions so far! You're both collaborators now (Austin has been for a while, woo hoo!), so feel free to contribute whenever you are able and with whatever interests you. You have both already been a significant part of what makes Caddy great!
@Unknwon Of course I'd welcome contributions from a talented engineer such as yourself. :smile: But Gogs is so cool, you know? It must demand a lot of your time!
@captncraig I hear ya, so I'm gonna give people collaborator status and let the contribute how and when they wish. I hope that having more collaborators will be able to help with reviewing and merging PRs and spreading out the load of fixing bugs, etc.

Absolutely. I will try to help as much as I can.

Go go go! :blush:


DropDown menu type mismatch

I wanted to implement a dropdown menu in my app but noticed that the DropdownMenuRadioItem was not indicating which option was currently selected, even though I was passing the controlled values to it. After checking the documentation, I found that the dropdown radio-related components were supposed to accept a boolean, and the onValueChange was also expected to return a boolean. However, in my code, the value was expecting a string, and onValueChange was returning the selected radio item's value as a string. I downloaded the latest version of the dropdown menu, but it’s still receiving a string, which seems more appropriate to me than a boolean, despite what the documentation suggests.

@ImamJanjua Thanks for contributing! The fix can be found in the commit above this comment.


testing: no way to get a snapshot of current coverage data accumulator

What version of Go are you using (go version)?

$ go version
go version go1.12.7 darwin/amd64

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/wei.wu/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/wei.wu/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/wei.wu/repos/go/src/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/t0/zqt5zk8152n89780p5_qvb9r0000gn/T/go-build258050164=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?
Tried to find a way to get value of coverage data accumulator.
What did you expect to see?
There's a way to register a coverage data accumulator. Hence there should be a way to get value of coverage data accumulator.
What did you see instead?
Found no way to get the value of a package level non-exposing variable cover.

Hi @straightdave,
Can you please add more detail about what you're trying to do? Does testing.RegisterCover(c) do what you want?
https://godoc.org/testing#RegisterCover

Hi @toothrot
Thanks for the reply 😃
I am trying to upload the line coverage data periodically while the binary code is running. I've tried to use RegisterCover to inject mine Cover instance but failed to get any data other than zero value from it. Meanwhile the hack function GetCover could always return the data no matter when and where I call it.
So the working way (and it's convenient) I found so far is to add this GetCover function to return the package level variable cover in src/testing/cover.go:
var cover Cover

// hack function
func GetCover() Cover {
    return cover
}

Any ideas?

@straightdave Thanks for following up!
The Cover struct is documented as such:

NOTE: This struct is internal to the testing infrastructure and may change. It is not covered (yet) by the Go 1 compatibility guidelines.

Many parts of the testing library predate "internal" packages, and were exported for internal usage only. I think there's a single example in the Go codebase of how to use RegisterCover, but again, it could break in the future and we have no promises to support it externally.
Finally, I don't think we will be adding a new API to something that ought to have been internal in the first place, so I am going to close this issue.
I don't know the best way to help you do what you want, but a better place to ask this kind of question is golang-nuts. See https://golang.org/wiki/Questions. It'll reach a wider audience of people who may have tried something similar.

🤔Makes sense. Thanks @toothrot


Update testsuite, typing, utils, utilstest, ... to 0.2.14

Updates

es.weso:testsuite
es.weso:typing
es.weso:utils
es.weso:utilstest
es.weso:validating

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

Files still referring to the old version number
The following files still refer to the old version number (0.2.4).
You might want to review and update them manually.
website/yarn.lock

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "es.weso" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequest = { frequency = "@monthly" },
  dependency = { groupId = "es.weso" }
}]

labels: library-update, early-semver-minor, semver-spec-patch, old-version-remains, commit-count:1

Superseded by #361.


Translation cannot start with %

Hi, if translation starts with '%' character,
translation fails on error:
Example - if translation is:
perc_of_clients: % of clients
then error is thrown:
I18nFileLoadError: Invalid YAML: while scanning for the next token found character '%', that cannot start any token
What can I do, to allow % character in translations?

Hi,
You can simply quote the string, it should work:
perc_of_clients: "% of clients"

Please comment if that does not fix it.

Hi,
You can simply quote the string, it should work:
perc_of_clients: "% of clients"

Please comment if that does not fix it.

Hi, this does not really work. That means, this still throws an error:
free_sentence: "25% of people are young people."
What helped is this syntax - write character % twice:
free_sentence: 25%% of people are young people.


Add localisations for other languages.

Is your feature request related to a problem? Please describe.
Currently, the lack of localization support limits users who require the application in languages other than English.
Describe the solution you'd like
I propose adding localization support for other languages. Specifically, integrating tools like Hosted Weblate for community-driven translations would be beneficial. This approach ensures translation accuracy and reliability as translations are created and maintained by native speakers proficient in their respective languages.

Duplicates a request that appeared earlier.


Update set-transaction-isolation-level-transact-sql.md

The READ_COMMITTED_SNAPSHOT is set to OFF by default on SQL Server, on Azure Databases it is ON by default

@DanielSSilva : Thanks for your contribution! The author, @CarlRabeler, has been notified to review your proposed change.


ICL Reformat

This PR has the following reformatting:

Moves the format_choices() function from the OutlinesTransformersADM class in outlines_adm.py to a new utils file: adm_utils.py. This function is used across ADMs and in ICL so it's better as a standalone function.
Moves the ICL functionality to incontext_utils.py

I created the abstract class IncontextExampleGenerator() with an abstract method set_icl_datasets() that is called in initalization. The set_icl_datasets() function creates a dataset of possible ICL examples for each target KDMA, where each example is a dictionary with keys prompt and response. With this setup, we can create different implementations of IncontextExampleGenerator() (as I did with ComparativeRegressionIncontextExampleGenerator()) that have specific prompts and responses.
Then IncontextExampleGenerator() has a generic function select_icl_examples(target_kdma, prompt_to_match) that selects a subset of the examples for the target KDMA given the current probe (prompt_to_match). This is where the random and bert_similarity down-selection strategies are implemented, and we can add more.
So when an ADM uses ICL, we first initialize a specific instance of IncontextExampleGenerator(). Then for each prompt, we call  generator.select_icl_examples() to get the relevant examples of prompt and response pairs.

@dmjoy and @eveenhuis let me know what you think of this restructure. I left a TODO to add the KDMA value normalization option, I'll add that once we are happy with the format

@eveenhuis and @dmjoy I think I've addressed most of Emily's comments now. It's ready to be looked over again when you have a chance

In generally this looks like an improvement (pulling most of the ICL code out into it's own module), and Emily provided some good low level feedback / suggestions.  I'm content to merge this as is, but have some high level thoughts maybe worth briefly discussing (so I can cover with a bit more nuance).


Multiple Image extraction and merging appears unnecessarily slow

Hi @lovell,
I would like to start by saying what a fantastic find your library is - and how impressed I am by your responsiveness and willingness to help the other issues here. Having also seen how many other issues you have to deal with, I note that the opening of this issue was not a whimsical decision, but I just can't seem to find the solution to the problem, and time is becoming a bit pressing. I am working on a project for university that requires the processing (extracting of certain regions and stitching) of many thousands of images.
For reference, similar issues have been thoroughly read and tried at #405 #699 #728 #864 #886 #971
The workflow is as follows:
I have a 2D array of .PNG files on the local filesystem, which make up "tiles" of a much larger image. Many requests will be made to the node server for fast on-the-fly regions of the whole image.
I know all the x/y coordinates and offsets of all base tiles, as well as the region to be extracted, and therefore the area and coordinates of the overlap to be created as a new image.
The regions to be extracted and stitched together will not overlap each other but need to be stitched side by side.
All base tiles are <1Mb in size with most ~600Kb
Approaches considered:

Use sharp to load and extract the desired specific region from each base tile image, and place in a 2D Buffer object. step through to append all buffers in each row, then step through to combine all row buffers into final image.
Use sharp to stitch all of the base tiles into a single large image, then do a single extraction of the desired region.
Start with an empty image of the final resolution, and iterate over all related tiles adding to the canvas as I go.

I have managed to use the code and suggestions provided in the various comments mentioned above, to create a working solution but it is extremely slow - given what "little" work is actually required specifically in the case of approach 2. (The most primary reason I chose sharp was due to the toted speed up it provides over others). In working solutions so far, calls to .extend(), .toBuffer() and overlayWith() are needed but results have to be wrapped in new instances of a SharpInstance, which is where I have convinced myself from basic testing, the significant slowdown is taking place.
These are needed in order to avoid the main issue: using multiple .overlayWith() calls on the same instance only applies the last operation, and either deletes or ignores the work of previous calls.
The reason I say this appears slow and the key motivation behind this issue submit, is that the particular test case I have been working with only contains 12 base tiles, totalling 7.1Mb with the final image only resulting in 2697px by 3125px at 5.6Mb, yet it takes ~1 minute to complete with all previous working attempts.
Any input would be much appreciated - thanks,
Calum.

If "time is becoming a bit pressing" then I'd use vips at the command line for this.
http://jcupitt.github.io/libvips/API/current/libvips-conversion.html#vips-arrayjoin
To stitch 4 images in a 2x2 arrangement:
vips arrayjoin "1.png 2.png 3.png 4.png" out.png --across 2

Ah, yes perhaps I was looking too tunnel vision at it,
I used vips directly and noticed a speed up of around 7x,
Thanks for the speedy reply and suggestion.


"Step Offset" input in StyleAxesPanel fails prop validation when axis is date

Related to #68 due to the default editor not yet supporting Date / Category types on axes.
When an axis has date values, the Numeric input for "Step Offset" in StyleAxesPanel fails prop validation for the defaultValue prop, due to the value being a date instead of a number.

Ditto min/max on range


Empty duplicate of airtable base

Hi,
I'm working on some similar mutual aid efforts in Colorado. Someone from the group may have already reached out regarding this, but I was wondering if you could duplicate the airtable you're using so that I can test drive this node app. I think this is a useful workflow and we can contribute back to this app if we're both working off the same schema.

Hey @tysonvinson, sorry for the delay in response, I hadn't seen this issue here.
Our README now has a link to a template of our Airtable base, which you can copy with one click! The only thing left would be to procure those API keys.

Let us know if you have any further questions!


Diff Only

Build.Reason:Manual by Michael Jin
Build.Url:https://apidrop.visualstudio.com/Content CI/_build/results?buildId=309382&view=results

Docs Build status updates of commit 4183db8:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

docs-ref-autogen/azure-core/azure.core.serialization.yml
:x:Error

Details

docs-ref-autogen/azure-core/azure.core.settings.yml
:x:Error

Details

docs-ref-autogen/msrest/msrest.version.yml
:x:Error

Details

docs-ref-autogen/msrestazure/msrestazure.version.yml
:x:Error

Details

docs-ref-autogen/azure-datalake-store/azure.datalake.store.lib.DatalakeRESTInterface.yml
:warning:Warning

Details

docs-ref-autogen/msrest/msrest.serialization.Model.yml
:warning:Warning

Details

docs-ref-autogen/azure-core/azure.core.serialization.yml

Line 8, Column 3: [Error: unknown-field] Could not find member 'data' on object of type 'Object'.

docs-ref-autogen/azure-core/azure.core.settings.yml

Line 9, Column 3: [Error: unknown-field] Could not find member 'data' on object of type 'Object'.

docs-ref-autogen/msrest/msrest.version.yml

Line 6, Column 3: [Error: unknown-field] Could not find member 'data' on object of type 'Object'.

docs-ref-autogen/msrestazure/msrestazure.version.yml

Line 6, Column 3: [Error: unknown-field] Could not find member 'data' on object of type 'Object'.

docs-ref-autogen/azure-datalake-store/azure.datalake.store.lib.DatalakeRESTInterface.yml

Line 7, Column 3: [Warning: xref-not-found] Cross reference not found: 'builtins.object'.
Line 38, Column 19: [Warning: xref-not-found] Cross reference not found: '2018-09-01'.
Line 43, Column 20: [Warning: xref-not-found] Cross reference not found: '60'.
Line 50, Column 7: [Warning: xref-not-found] Cross reference not found: '<xref:optional arguments to auth'.

docs-ref-autogen/msrest/msrest.serialization.Model.yml

Line 7, Column 3: [Warning: xref-not-found] Cross reference not found: 'builtins.object'.
Line 32, Column 7: [Warning: xref-not-found] Cross reference not found: 'function'.
Line 59, Column 11: [Warning: xref-not-found] Cross reference not found: 'DeserializationError if something went wrong'.
Line 95, Column 11: [Warning: xref-not-found] Cross reference not found: 'DeserializationError if something went wrong'.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Update README

Updates and some grammar
*some subjective changes so feel free to nit

Updated on my end


General Public Access to BCRHP

ACCESS TO VIEW DATA WILL BE OPEN, BUT THE FIELDS AVAILABLE TO VIEW WILL BE RESTRICTED BY HERITAGE BRANCH.
Public access will provide a better understanding of BC Heritage and for research
This needs to be available for public presentation May1-3.
To be captured in additional tickets:

Ability to view and export (but not edit) data fields on register database flagged as “Publish” from all layers of historic place information (e.g. historic trails, Heritage Conservation Areas, sites nominated for provincial recognition projects, etc.)
Ability to search on any field in attribute list and search by ‘tags’.
View information, images, media and documents about each site in a consistent format so that images, audio/visual clips of each site are available..
See selected associated documents and other content about each site.
Ability to suggest new sites for consideration and addition to database, also to provide comments and additional information and images (vetted by Branch staff) about existing sites.

NOT PART OF MVP
Dependencies
Epic

[ ] bcgov/BCHeritage/issues/692
[x] bcgov/BCHeritage/issues/693
[x] bcgov/BCHeritage/issues/694 - tracked in epic 692
[x] bcgov/BCHeritage/issues/695
[x] bcgov/BCHeritage/issues/696 - tracked in epic 692
[x] bcgov/BCHeritage/issues/697 - tracked in epic 692
[ ] bcgov/BCHeritage/issues/698
[ ] bcgov/BCHeritage/issues/699

Done in test


Feat: Adding more funtctions in BBCNews Module

Describe the feature
I will be adding a function to scrape the data of the BBC News article using the link given by the user.
I will also be improving the function getHeading by adding getting links with the heading functionality to the scraper.
Add ScreenShots

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC 23 contributor
[X] I want to work on this issue

Go ahead @Swapnil-Singh-99
Note

Create a separate module for this, as per the folder and project structure
Do not use the `selenium web driver as it is not compatible with all devices as well as cloud platforms.
Before making any changes, check if the module you want to add already exists or not. If yes, then add your functionality as a method only else make a separate module and class for it.

All the best 👨💻


Generate skirt vertices and triangles

Added a getMeshWithSkirts function to generate skirts while populating vertices and triangles arrays.
Could modify getMesh with a skirts flag but I didn't want to affect any non-skirts retrieval performance or bloat the function

@chrisgervang any news on this ? would love to have skirts in deck.gl

Maybe a repo owner can pull this in, since it seems all is ok? This is a pretty useful addition to the library.

Agreed, seems like a very nice addition so considering a merge would be much appreciated!


Update MD file on new branch 2017-11-06_13-57-59

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

split/updateTestRef1.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Remove no-std-compat dependency

Again, this will need rebasing before it can be merged due to conflict from another PR of yours :D


Support to drag the debug hover inspector

After hovering over a variable while in debug mode, I would like to be able to drag the tooltip around so that I could easily refer to both it and my code. For example, in the shot below I have hovered over the params variable

But after I expand the elements in the array I see this:

Ideally I would still like to be able to read the code following the line I am paused on and refer to the data in the inspector. I was imagining that I could click and hold on a blank area in the tooltip and then move the mouse to drag the tooltip to a convenient location.

@stevencl I think this is a valid feature request and would be useful for some users. But what you then expect this behavior across all our hovers or just for the debug hover? If it is only the debug hover would it make it inconsitent?


Headless Chrome

I want to ask if you have any plan for switch from PhantomJS to Headless Chrome.
Basically, because creator of Phantom stepping down as maintainer
https://groups.google.com/forum/m/#!topic/phantomjs/9aI5d-LDuNE
Headless Chrome sounds promising with lower error rate,.
I suppose it isn't in your plan in terms of short or medio actions, but could be interesting use Headless Chrome in the future.
I see some projects working on that.

Yep! See this issue:
https://github.com/prerender/prerender/issues/318
We also have our current state of our chrome implementation on the chrome branch of our prerender repo


[Feature Request] Choosing different styles for tasks

Fantastic plugin! I'm very grateful!
Suggestion: It would be amazing to have more styling options for my scheduled tasks. Right now, the only customization available is through heading levels, but I'd prefer to format my tasks like this:

>[!Daily tasks]
> - [ ] 8:00 - 8:30 Make coffee
> - [ ] 8:30 - 9:00 Review emails

Could there be a feature to include code in the heading text and offer more flexibility in task formatting?

Hello, @doschroeder,
I think those tasks should already be visible in the planner, since it collects all the tasks in daily notes by default. The heading from the config serves only as a destination point for tasks created with drag-and-drop.

Hello @ivan-lednev,
many thanks for the reply. No, unfortunately not. If I am writing >[!Daily tasks] then it inserts #>[!Daily tasks]

Oh, I see what you meant now. For now, if you want to use a custom section, you can create a daily note template with that > [!Daily tasks]

Yes, this is what it did. But when I insert a new time block in the week planer, it adds a new section. Many thanks for your great work! =)


Added a NTXent loss

An normalized temperature scaled cross entropy (NTXent) loss for a contrastive learning objective. I am fairly new to submitting pull requests to public repos, so I didn't add a ton of tests for this outside a batched test. Let me know if there is anything else I should add!

Oh also, I know NTXent isn't really a classification loss, but I didn't know where else to put it.

Hello @GrantMcConachie!
Yes, it's a bug due to a new release of jax, it's already been pointed out in #904. I've upstreamed the bug internally to the jax team, I hope it can get solved. I don't see any quick hot fix (the bug shall affect many of our modules). I can ping you when it gets solved :)

The tests have been fixed in #908. You should be able to proceed. Again it would be really nice if you could avoid passing through an exponential without careful tricks like the losumexptrick (see https://en.wikipedia.org/wiki/LogSumExp). Alternatively, you may use directly functions like jax.nn.log_softmax that implemented such a trick.
Thanks again for the PR!

I am still working on this! It is trickier to implement than I thought due to the partitioning of positive and negative pairs. For example If there is 4 embeddings with labels like this:
e1 -> 0
e2 -> 0
e3 -> 0
e4 -> 1

then your cosine similarity matrix will be a 4x4 matrix like this:
[ 0          sim01+     sim02+     sim03-]
[sim10+        0        sim12+     sim13-]
[sim20+      sim21+       0        sim23-]
[sim30       sim31      sim32        0   ]

Where the pluses indicate positive pairs.
So we want the loss to be log(exp(sim01+) / (exp(sim01+) + exp(sim03-)) + log(exp(sim02+) / (exp(sim02+) + exp(sim03-)) + log(exp(sim10+) / (exp(sim10+) + exp(sim13-)) + .... However a row wise log_softmax on this matrix will return values log(exp(sim01+) / (exp(sim01+) + exp(sim02+) + exp(sim03-)) and will incorporate exp(sim02+) in the denominator when it shouldn't.
I think there's probably a way around this using the logsumexp or log_softmax, but I am still trying to figure out how to do it.

Hi @vroulet! I believe that I implemented the loss function using the same trick that logsumexp and log_softmax. I did not use these functions explicitly, but I was able to "normalize" the cosine similarity values by subtracting the row wise maximum cosine similarity values from each cosine similarity value before exponentiating, summing, then taking the logarithm. I believe this is sufficient to avoid overflow/underflow problems, but please let me know if you see an issue with this!

Thanks for all the edits! I am happy that this will get added. Please let me know if there's more I can do!


[Azure Identity] InteractiveBrowserCredential fails in GraalVM native image if AWT is not supported

Describe the bug
If AWT packages are not in the classpath, InteractiveBrowserCredential fails with NoClassDefFoundError.
Exception or Stack Trace
Caused by: java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:239)
java.awt.Desktop.isDesktopSupported(Desktop.java:328)
com.microsoft.aad.msal4j.AcquireTokenByInteractiveFlowSupplier.openDefaultSystemBrowser(AcquireTokenByInteractiveFlowSupplier.java:112)
com.microsoft.aad.msal4j.AcquireTokenByInteractiveFlowSupplier.getAuthorizationResult(AcquireTokenByInteractiveFlowSupplier.java:61)
com.microsoft.aad.msal4j.AcquireTokenByInteractiveFlowSupplier.execute(AcquireTokenByInteractiveFlowSupplier.java:37)

To Reproduce
Run the following JUnit test for native-image. See instructions to set up the maven plugin in this blog post.
@Test
void createInteractiveBrowserCredential() {
        InteractiveBrowserCredential interactiveBrowserCredential = new InteractiveBrowserCredentialBuilder()
            .port(8765)
            .build();

        // Azure SDK client builders accept the credential as a parameter
        SecretClient client = new SecretClientBuilder()
            .vaultUrl(AZURE_KEY_VAULT_URL)
            .credential(interactiveBrowserCredential)
            .buildClient();
        assertNotNull(client);
        client .setSecret(new KeyVaultSecret("foo", "f4G34fMh8v")
           .setProperties(new SecretProperties().setExpiresOn(OffsetDateTime.now().plusYears(1))));

}

Expected behavior
Instead of throwing an exception when AWT classes are not found, provide a link that can be opened in a browser.
Screenshots
If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):

OS: MacOS, Windows and Linux native images
IDE: Any
Library/Libraries: com.azure:azure-identity:1.3.1

Additional context
This was tested using GraalVM version 21.1.0
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

[x] Bug Description Added
[x] Repro Steps Added
[x] Setup information Added

A link that can be opened in browser for interactive auth, is already provided by Device code credential for interactive auth. Having Two Credentials do the same thing will not offer any extra value I feel.
So, Device Code Credential will work perfectly fine for interactive auth and is built for platforms where browsers are not accessible programatically.
Interactive Auth is possible on GraalVM via DC credential.

Closing this, as the suggested Interactive flow is available via Device code credential and not a blocker for GraalVM.


Update news-resources.md with a blog post from Mia-Platform

@ugho16 : Can you give us an introduction, what your involvement in OSDM is?

Hello @schlpbch, Mia-Platform is a software vendor that has gathered relevant expertise in the mobility sector by providing its suite of software solutions to many of the main companies in the public transportation sector here in Italy - like Trenord, ATM, and Italo - and therefore partnering up with them in their digital transformation efforts.
Specifically, with the adoption of Mia-Platform Fast-Data, we allow transportation companies to diffuse and seamlessly integrate services across different channels, by turning data from custom formats into market standards (GTFS, GTFS-RT, NeTEx, SIRI, TOMP). We're currently working to integrate OSDM as well, and that's why we've researched and studied this data standard more thoroughly over the last few weeks.


error messages when opening exported pgn from ocgdb in other chess GUI like Scid

I used these commends
ocgdb -pgn ecoE.pgn -db ecoE.db3 -cpu 4 -o moves2
ocgdb -db ecoE.db3 -cpu 4 -dup -o printall;remove
ocgdb -pgn ecoE_out.pgn -db ecoE.db3 -cpu 4 -export
When I open the exported pgn in Scid I get thes error messages
(game 9933, line 227803) Unexpected end of game: PGN header '[' seen inside game (result missing ?).
(game 10333, line 235866) Unexpected end of game: PGN header '[' seen inside game (result missing ?).
(game 14439, line 332695) Unexpected end of game: PGN header '[' seen inside game (result missing ?).
When I open the pgn's ecoE.pgn and ecoE_out.pgn in a text editor to compare them.
I can see that games without a result have no result tag in the pgn exported by ocgdb.

[Result "*"]

This is how a game without a result looks like in the exported pgn from ocgdb

[Event "Rated Correspondence game"]
[BlackElo "2430"]
[White "Flowerdragon"]
[Black "arvischess"]
[TimeControl "-"]
[Date "2019-02-26"]
[Round "0"]
[WhiteElo "2476"]
[ECO "E06"]
[PlyCount "32"]

d4 d5 2. c4 e6 3. g3 Nf6 4. Bg2 Be7
Nd2 O-O 6. Ngf3 c5 7. dxc5 Bxc5 8. O-O Nc6
Nb3 Bd6 10. cxd5 exd5 11. Nbd4 Re8 12. Bg5 h6
Bxf6 Qxf6 14. Rc1 Bd7 15. e3 Ne7 16. Qb3 b5

In the original pgn the game looks like this

[Event "Rated Correspondence game"]
[BlackElo "2430"]
[White "Flowerdragon"]
[Black "arvischess"]
[Result "*"]
[TimeControl "-"]
[Date "2019-02-26"]
[Round "0"]
[WhiteElo "2476"]
[ECO "E06"]
[PlyCount "32"]

d4 d5 2. c4 e6 3. g3 Nf6 4. Bg2 Be7
Nd2 O-O 6. Ngf3 c5 7. dxc5 Bxc5 8. O-O Nc6
Nb3 Bd6 10. cxd5 exd5 11. Nbd4 Re8 12. Bg5 h6
Bxf6 Qxf6 14. Rc1 Bd7 15. e3 Ne7 16. Qb3 b5

It is not a major issue but it would be nice if it could be fixed, so I don't get these annoying messages when opening the exported pgn from ocgdb in Scid.
A also wonder if it will not give problems if the is no result tag in the game headers, when trying to make bin book with polyglot from the exported pgn's from ocgdb

Fixed with commit https://github.com/nguyenpham/ocgdb/commit/8726834462c0037d7b8fe97bc6228e28feca31db

Thanks!


Two typo in graph_gan

Please pay more attention on coding

Maybe you can try to take a look at my code
https://github.com/tomatowithpotato/GraphGAN-pytorch
may be some bugs, hope to improve together


Bad example of N+1 in current implementation

This implementation here should be improved by not fetching single items at a time:
for (JdbcPet pet : pets) {
    owner.addPet(pet);
    pet.setType(EntityUtils.getById(getPetTypes(), PetType.class, pet.getTypeId()));
    List<Visit> visits = this.visitRepository.findByPetId(pet.getId()); // Problematic call
    for (Visit visit : visits) {
        pet.addVisit(visit);
    }
}

I'm not 100% convinced that the JDBC implementation of the pet clinic is very sensible in general. With SQL, I might be doing things a bit differently from JPA. It looks as though the whole example has been shoehorned into some pre-existing repositories.
But anyway, this one should be a no-brainer. There should be a method like:
interface VisitRepository {
    Map<Integer, List<Visit>> findByPetIds(Integer... ids);
}

Thanks @lukaseder, we will look into it. The whole piece of code is indeed complicated.

There is a good example of what we should do here: http://stackoverflow.com/questions/6521937/using-spring-jdbc-template-for-populating-results
(proposed by @jnizet)

Hmm, that all seems very backwards (= too many LoC for little value) to me. With Java 8 (and e.g. jOOQ), I'm sure there's a more functional approach to generating nested collections in non-JPA environments...

Hi Lukas, sure please feel free to propose something. In general, it's better if we don't have to add an additional dependency in the POM (there are already a lot...)

You won't like my proposition :) (because I don't think a repository with multiple implementations is a good idea in the first place)

Sure, please feel free to share. I can't guarantee that it will be suitable but it's always good to discuss.
Cheers,
Michael.

Sure.
In a JPA / Repository approach, you mostly operate on what a Java developer prefers to work on, i.e. domain objects written in Java. It is natural to navigate those objects in a rather imperative style, i.e. fetching the parent, and then iterating its children, possibly letting the ORM figure out what to fetch eager or lazy (hint: it's mostly wrong by default and needs tuning).
In a SQL approach (JDBC / SpringJDBC / jOOQ / etc.), you would do things very differently. You would think of your data as sets (or bags) of tuples (or rows), which you materialise all at once as required. You wouldn't fetch the pets and visits individually. You'd either:

Join them.
Fetch both sets in 2 queries and join them in memory.
Nest sets via the MULTISET operator (unfortunately, not supported in many databases)

In fact, you probably wouldn't even make use of any extra DTOs which are just boilerplate in a SQL context. You'd pass the sets of tuples directly to the UI. If writing back to the database is required (it is here), then you'd probably use an active record pattern as implemented by jOOQ, to store the results that are modified by the UI directly, instead of expressing INSERT and / or UPDATE statements.
I'm aware that such a change would be a lot of work, but Spring has a lot of responsibility as well. You guys are an inspiration for a lot of programmers, many of which are not yet very experienced.
My take here is that if you're showing them the JDBC solution as it is now, they will get things wrong. They will think that JPA and JDBC are "similar", instead of learning to think in terms of sets and set theory, as they should when working with SQL...

Thanks for your feedback.
It makes sense, however the only way we could do that is to remove JDBC from the master branch and have a dedicated JDBC branch (that we will mention clearly on the Petclinic github homepage).
I haven't really used JDBC for years and I'm not the right person to create that branch. In case we would like to go that way, would you be interested to do it?

In case we would like to go that way, would you be interested to do it?

Only if I can contribute a jOOQ branch, too :)

I'll have to check internally, given that jOOQ is a commercial product. Let me get back to you on that a bit later.

Note that jOOQ is commercial, but ASL 2.0 (dual-)licensed.
Here's some help for your argumentation showing how other commercial products can add value to Spring :)
https://spring.io/blog/2014/10/01/webinar-building-bootful-uis-with-spring-boot-and-vaadin

@michaelisvy and @lukaseder, to map the one-to-many relationships between Pet and Visit we may extends the OneToManyResultSetExtractor class provided by the Spring Data Core JDBC Extensions:
http://docs.spring.io/spring-data/jdbc/docs/1.1.0.RELEASE/reference/html/core.support.html#core.support.onetomany
The JdbcVisitRowMapper anonymous class used in the JdbcVisitRepositoryImpl has been reused by the JdbcOwnerRepositoryImpl
Here the corresponding pull request : https://github.com/arey/spring-petclinic/commit/818529b5b10bbf2f5ef861f0439ef1d84fc69577

Hi, I think Antoine's solution is good enough for now. I'll close this issue.


Nethereum integration of Requests / Responses

Hi!
I am Juan Blanco from https://github.com/Nethereum/Nethereum, I am in the process to create a wallet connect package similar to the https://github.com/Nethereum/Nethereum/tree/master/src/Nethereum.Metamask, so far (architecture wise :) ) so good, as I will be creating and interceptor for:
 "eth_sendTransaction",
  "eth_signTransaction",
  "eth_sign",
  "personal_sign",
  "eth_signTypedData",

Now I am stuck creating the mapping objects for the Request / Response, and I don't know if I should craft myself something bypassing these and calling directly, as they are the standard rpc objects (no?)
  id[0] = await MessageHandler.SendRequest<SessionRequest<T>, TR>(topic, new SessionRequest<T>()
            {
                ChainId = defaultChainId,
                Request = request
            });

What I have tried so far is to create these mapping objects, but I assume this might be incorrect as I cannot see where the serialisation is taking place.

    [RpcMethod("eth_sendTransaction"), RpcRequestOptions(Clock.ONE_MINUTE, 99998)]
    public class WCEthSendTransactionRequest
    {
        public TransactionInput TransactionInput { get; set; }
    }

    [RpcResponseOptions(Clock.ONE_MINUTE, 99999)]
    public class WCEthSendTransactionResponse
    {
        public string TransactionHash;
    }

Maybe this will help you 😃
https://github.com/WalletConnect/WalletConnectSharp/issues/92#issuecomment-1569067536

Thanks @axenteoctavian, still stucked as I need the right signature for wc, ill keep trying variations :)

@juanfranblanco Have you got personal_sign working and do you have an example I could look at?

Any update on this?

The rpc request classes built for SendRequestmust match the param field type for the given method. For example, for eth_sendTransaction, you would need to make WCEthSendTransactionRequest a List<TransactionInput>
You can view an example here

Thanks @gigajuwels I missed your response ill try it!


Invalid Signature using this JWT provider

was getting invalid signature without encoding the secret. Added encoding the secret, catch the UnsupportedEncodingException and log it as a warning before encoding the token as it was previously done.

Coverage decreased (-1.09%) to 86.722% when pulling d1631e208dc836a52fd1706c9b0d186a9b3dae58 on Kaydub00:development into 55caffb772be2e43542126b2b59d91c5180873c3 on brahalla:develop.


ERROR: Service 'css' failed to build : COPY failed: forbidden path outside the build context:

Hi,
Great project, should save a lot of time! I'm trying to run on Ubuntu 20.04.3 LTS and I get the following error:
Step 10/12 : COPY --chown=node:node ../ ../
ERROR: Service 'css' failed to build : COPY failed: forbidden path outside the build context: ../ ()

Commenting out line 23 of the Dockerfile allows the build to finish
COPY --chown=node:node ../ ../
Perhaps I'm doing something wrong. Django starts up and everything looks good but I'm unsure the impact. Using WSL2 on Windows with the same OS works OK.
Thanks!

Hi,
Are you using Docker Desktop or did you install Docker straight up within your Ubuntu WSL 2 instance?
That error usually happens when Docker's buildkit isn't enabled but Docker Desktop should enable it by default. It's been available from Docker for years but I don't think it's enabled by default with native Linux.
If you run DOCKER_BUILDKIT=1 docker-compose build does that fix it?
If so and you're not using Docker Desktop you can goto /etc/docker/daemon.json and add { "features": { "buildkit": true } } then restart the Docker daemon. That'll always enable buildkit without needing to supply the env variable.

Hi,
In Windows where it was working it was with Docker Desktop.
On the Ubuntu 20.04 VM I tried setting the env variable and it didn't work, seems like buildkit was missing in the install. I re-created the VM and install docker/docker-compose following official docker instructions and now that env variable works.
Thank you!

No problem.
Did you enable it in the json config to avoid needing to set the env var every time?

Just tried that now, the file didn't exist on my machine so I created it and put the mentioned line and it's working without setting it every time. Much appreciated, thanks for the support and great project.


Add collaborators to this repo

Comment below to be added as a collaborator
We will all be using this repository today. Even though it's public right now, you will not be able to make changes until you're given the correct permissions. We've automated this process via the GitHub API. Once you comment, we will add you as a collaborator.
You'll start to receive a lot of emails. (❗) You can slow these down immediately by clicking the Unwatch button at the top of the page and selecting either the Participating and @mentions or Ignore option.

test

Commenting for class.

Add me!

Commenting!

Commenting :-)


feat: show that the Riemann integral is equal to the Bochner integral for continuous functions

Thanks! :tada:
bors merge


How are environments specified?

How shall people specify the environments for each hub? I guess we'll ask people to just tell us packages that they need installed and we just build a docker image for them using repo2docker (and manually specify the image in the hubs.yaml file?)
In addition, what happens when somebody installs libraries within their session? Does it persist over time?
Basically, I think we should add a section to the usage docs about how to customize the environment, and trying to figure out both the workflow of the user and the administrator.

I just pushed a base image to https://github.com/2i2c-org/low-touch-hubs/tree/master/image.
I think my current plan is to have one base image for all low-touch hubs, with customizations on top of that image being possible. I also wanna allow users the opportunity to build their own docker image, but trying to figure out the best way to do that.

ah gotcha - so I guess the question is "how do those customizations happen?". Do they require the hub users to open issues that we manually change? (and if so, how do we change them so that others on the team can help out instead of just you!). Just trying to un-bottleneck knowledge here :-)
also cross-linking https://github.com/plasmabio/tljh-repo2docker which @yuvipanda mentioned could be a nice solution to letting others build their own image.

Documented in  https://2i2c.org/pilot-hubs/#updating-environment for now.

nice - I'll close this 👍


Retry example integration tests that didn't finish after 5 minutes

The idea is, that our example integration tests should finish after a short period of time. But sometimes then hang in CI, so we simply abort and retry them automatically, instaed of manually.
The hardcoded timeout of 5 minutes is just a guess. I want to see the CI results. Maybe, we can make it configurable per test suite.

The problem with this approach is that the Future is not cancelled, so the other runs will run concurrently with the first.

The problem with this approach is that the Future is not cancelled, so the other runs will run concurrently with the first.

How about using a Java future, which is cancellable?

I'm not very familiar with it, but if it's cancelable it is better, yes. Otherwise you need to run a Thread and handle it manually.