JSON Mapping in Couchbase lite 2.0

Hi,
Thanks for this wonderful library.
I'm migrating the existing couchbase lite 1.4 database changes to use 2.0. So, properties map is not anymore in 2.0. We've been using Jackson library to do JSON Serialisation/Deserialisation Document Properties map.
Now it looks like there is no way I can get the 'Properties Map' to do this JSON Mapping.
Should I just create and use my own "Properties" Map inside the Document?
What is the recommended way to do JSON to Object Mapping in Couchbase 2.0?
Any help will be much appreciated!

Hi @BharathMG,
Thank you very much for using CBL 2.0.
CBL v2.x does not provide JSON serialization. The app can use Jackson, GSON, or own codes to serialize between JSON string and Map. Then by using Document(Map), Document.set(Map) or Document.set(String key, Object value), then the app stores Map in the database. Note:  Object could be Map.
NOTE: From CBL Android v2.x does not depend on Jackson.
I hope this info helps.

It sounds like you want to get the contents of a Document as a JSON string? What's the use case for this? Maybe we can provide a more direct API for what it is you want to do.

@hideki Thank you! It looks like toMap() will be the right candidate for my use case.
@snej So I want to convert my custom objects to map structure to store it in the CB Document. With the toMap() method suggested by @hideki , I can convert Map to custom Object using my Jackson adapter.
Thanks for answering my query in very short time!

It sounds like you want to get the contents of a Document as a JSON string? What's the use case for this? Maybe we can provide a more direct API for what it is you want to do.

@snej exactly this is the right usage of Couchbase Document sending to React Native Bridge.
FB have this issue with the bridge: https://github.com/facebook/react-native/issues/10504
And its need to serialize couchbase Document to JSON to send it with native RN bridge to be accessible from React Native JS.
On the native Java side I have:
Document trip = getDatabase().getDocument(tripId);
new JSONObject(trip.toMap()).toString())

can we optimize this conversions to: trip .toJSON() ?

We can consider adding API for this in future releases; I'll file an internal ticket. This will just be for performance and simplicity; you can pretty easily write code to do the conversion yourself using the 2.0 API.

Yes this is just a performance issue. Thanks!


Create dependabot.yml

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

Coverage data is based on head (6a58a13) compared to base (8fc9f7d).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #4   +/-   ##
=======================================
  Coverage   51.72%   51.72%
=======================================
  Files          11       11
  Lines         319      319
=======================================
  Hits          165      165
  Misses        154      154

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@8fc9f7d). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #4   +/-   ##
=======================================
  Coverage        ?   51.72%
=======================================
  Files           ?       11
  Lines           ?      319
  Branches        ?        0
=======================================
  Hits            ?      165
  Misses          ?      154
  Partials        ?        0

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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


Generate interesting examples

We want to test interesting dataframe examples for namely our roundtrip tests, as different aspects of a df could highlight distinct bugs in a library's adoption of the interchange protocol.
My current idea is to generate interesting dicts that can act as the data arguments in say pd.Dataframe() or vaex.from_dict() via Hypothesis. This seems a few hours to get the ball rolling with a strategy that generates dicts with elements respective to all the valid dtypes. This won't meet the standard of a first-party strategy but will do the job just nicely.
Additional work would however be needed to map the dtypes to the library's respective dtype "identifiers" (i.e. dtype objects like np.int64 and/or strings) and piped correctly to the library's respective dataframe constructor (e.g. pd.DataFrame(), vaex.from_dict()). Seems like a fairly simple problem, maybe just an hours work.

Dicts with lists of Python elements didn't quite work out, as I realise specifying dtypes is rather limited in the ecosystem. So instead I've opted to use dicts of numpy arrays, which is easily supported by all current adopters.
This gets us pretty far thanks to hypothesis.extra.numpy.arrays(). The only limiting factor is categoricals, which we definitely want to test—I think for now I'll pipe in a manual example, as they're pretty annoying to generate universally for the adopting libraries.
It'd also be nice to play around backends, namely for Vaex. Initialising a Vaex df with NumPy arrays limits what we're testing, as the typical Vaex df will instead be using Arrow, which changes the information given by it's interchange APIs and thus could uncover more errors e.g. https://github.com/vaexio/vaex/issues/2083. Probably low prio though.

hypothesis generates numpy arrays with string dtypes

Yep. No easy universal way to treat them as categorical arrays universally in the current architecture (i.e. generating a dict of numpy arrays and passing them as-is to the adopting libraries) it looks like unfortunately—will update this issue with any new thoughts/relevations.

We're generating columns of valid dtypes now :tada: Note whilst we can generate valid datetime columns, it seems no one supports interchanging them yet.


Fix broken and redirected links.

Reran the W3C Link Checker, fixed broken and moved links. Adjusted the navigation generation code to include a trailing slash (to avoid server side redirects) in one case where it did not.

<3


Syntax error building in Windows

I am trying to build in Windows 10 (VS 2017).  I did a clean clone from the repo today.  I ran build_host_protoc.bat, which completed with no issues.  However, when I run build_windows.bat, I get the following error(s):
"E:\Projects\NeuralNets\caffe2\build\ALL_BUILD.vcxproj" (default target) (1) ->
"E:\Projects\NeuralNets\caffe2\build\caffe2\caffe2.vcxproj" (default target) (5) ->
(ClCompile target) ->
E:\Projects\NeuralNets\caffe2\caffe2\core\plan_executor.cc(147): error C2059: syntax error: 'template' [E:\Projects\NeuralNets\caffe2\build\caffe2\caffe2.vcxproj]
E:\Projects\NeuralNets\caffe2\caffe2\core\plan_executor.cc(148): error C2039: 'global_ws_id_blob': is not a member of 'caffe2::Tensorcaffe2::CPUContext' [E:\Projects\NeuralNets\caffe2\build\caffe2\caffe2.vcxproj]
E:\Projects\NeuralNets\caffe2\caffe2\core\plan_executor.cc(148): error C2059: syntax error: 'template' [E:\Projects\NeuralNets\caffe2\build\caffe2\caffe2.vcxproj]

Well, I was able to resolve the syntax error and build.  In plan_executor.cc, changed:
global_ws_id_blob->template GetMutable()->template Resize();
To:
global_ws_id_blob->template GetMutable()->template Resize<>();
But now I am back to this when I try to run tutorial_blob:
[F operator.h:628] You might have made a build error: the Caffe2 library does not seem to be linked with whole-static library option. To do so, use -Wl,-force_load (clang) or -Wl,--whole-archive (gcc) to link the Caffe2 library.
  Otherwise, I always get the above error message (even with /WHOLEARCHIVE for caffe2.lib).

Related to #1415

I have the exact same errors I'm not using Visual Studio, but Visual C++ Build Tools 2017 tho.

Got same erros, but I had outdated clone. It seems to be fixed with https://github.com/caffe2/caffe2/pull/1442

@Mourdraug - thanks for the suggestion.  I cloned the latest commit and I can no longer even get past building the protocol buffers (see #1528).  I tried switching to the actual commit referenced in #1442, and I have the same issue (protocol buffer link errors).  Did you have to make any modifications to the build scripts to get your build to work in Windows?

It turns out my latest build attempts were fighting with the version I downloaded/built using VCPKG in an attempt to circumvent the previous errors.  It is working now (with commit afc0d96b89776eff874b548240e6931be5b6c42d).


[Feature]: Rect-select using shift-drag

About
Self explanatory

This is already a feature 💀. Unless you're talking about anything different; please describe the behavior you intend.

Huh, I swear it was not working for me before, it is working now though. Closing


{opendht,jami}: use msgpack-cxx instead of msgpack

Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 281061 run on x86_64-linux 1

5 packages built:

jami
opendht
opendht.dev
opendht.lib
opendht.man


Update handle-events.md

Removes unnecessary "Visual Studio 2019" title.

@Jaiganeshkumaran : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Fix externally hosted [Spiget] test

For some reason, the previously-used resource is no longer found by the API. I've flagged the problem in https://github.com/SpiGetOrg/Spiget/issues/28, in the meantime we can simply use a different Spigot resource.

Messages

:book:
:sparkles: Thanks for your contribution to Shields, @PyvesB!

  Generated by :no_entry_sign: dangerJS against f988c91ebd72963f7d0f3658a7cd054b525c9ebf

I didn't even know this was a thing lol

I didn't even know this was a thing lol

Yep indeed, we do support Spiget badges! Maybe something worth mentioning on the Spiget website or in one of the READMEs?

I didn't even know this was a thing lol

Yep indeed, we do support Spiget badges! Maybe something worth mentioning on the Spiget website or in one of the READMEs?

Absolutely!  http://badges.spiget.org/ is a thing but this is so much nicer to have! ^^


add pdm and update requirements

Realizei as alterações que você demarcou.
https://github.com/orgs/gogixweb/projects/2/views/1?pane=issue&itemId=59435159


Azure Kuberentes Error : libnghttp2-14 security vulnerability

After creating Aks cluster , we are getting security alert with the below description.
The package ‘libnghhtp2-14’ version 1.43.0-1 was detected in APT package manager on a container image running ‘ Debian 11.8’ is vulnerable to CVE-2023-44487 which exist in version <1.43.0+deb11u1
Is there any suggestion on how to resolve this security vulnerability on the AKS.

@sid1206
It would be great if you could add a link to the documentation you are following for these steps? This would help us redirect the issue to the appropriate team. Thanks!!

We are using terraform azurerm provider to spin up azure kubernetes services  and we are getting this issue .
We have found similar thread in this link
github.com/Azure/AKS/issues/4025
Kindly help with the steps to resolve this issue.

@sid1206
Please Note, GitHub forum is dedicated for Microsoft documentation related issues. So kindly share Microsoft document link.

@sid1206
Since we have not heard back from you, we will now proceed to close this thread.If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


Option to allow Doze

I know Doze can end up cancelling moods in the background when the phone is idle but I think it'd be handy for users who know what they're doing and are sticklers for battery optimization to be able to suppress the startup prompt.
The item in the settings screen could possibly be moved to a separate "Advanced" section away from the normal settings, wasn't sure.

Pic of the setting - not totally sure about the wording.

Yes, LampShade could really use a separate "Advanced Settings" page. You're welcome to build it :-)


Very high CPU & memory consumption in language server

I noticed my fans were spinning very loud and checked my Activity View (OSX):

As you can see in the above, it's using ~2 cores on my 4 core laptop, and consuming over 4Gb of memory.
Looking at open files, it seems clear this dotnet process is the ARM VSCode extension:

I also see some VSCode render processes with high CPU when I look at the full view (note that PID 66808 is the parent of this dotnet process).

I captured a perf trace by running dotnet trace collect -p 68211 --providers Microsoft-DotNETCore-SampleProfiler - will send this via email. Another interesting thing to note is that I didn't have any active editor windows with ARM template files.

@anthony-c-martin I'm not seeing anything unexpected on the stack - parsing and validation of JSON for schema and backend.  Of course, it shouldn't be stuck there.  Is this something you can reproduce, or did it only happen once?
Also, I assume you had loaded some JSON template files before, right?  Did you happen to have any very large files open that might have been misinterpreted as template files?

If it's something you can repro, you can force a lot of tracing info into the Output window with this setting:

@anthony-c-martin I'm not seeing anything unexpected on the stack - parsing and validation of JSON for schema and backend. Of course, it shouldn't be stuck there. Is this something you can reproduce, or did it only happen once?
Also, I assume you had loaded some JSON template files before, right? Did you happen to have any very large files open that might have been misinterpreted as template files?

Unfortunately I only noticed it this one time, and don't have a repro for it. I definitely could have had other large-ish JSON files open; I wouldn't expect anything over 2k lines though.

Closing for now, please let me know if you get more info, thanks.


Stability and Publish errors because of Layouts [assembly: AssemblyVersion("<IP_ADDRESS>")]

Created #6762 which was corrected but on trying to publish the latest dev or 1.10x Dashboard says:
Severity	Code	Description	Project	File	Line	Suppression State
Error		Could not load file or assembly 'Orchard.Layouts' or one of its dependencies. The system cannot find the file specified.	Orchard.Web C:\OrchardWeb\src\Orchard.Web\obj\Release\AspnetCompileMerge\Source\modules\orchard.dashboards\web.config
Line 35
Which is <add assembly="Orchard.Layouts" />
If you view the reference in any Module referencing Orchard.Layouts it still version <IP_ADDRESS> not 1.10
Assembly info for Layouts is [assembly: AssemblyVersion("1.10")]
Delete =reference and add it again still version <IP_ADDRESS>
What would I need to change to get this to Compile and publish off of latest source?
Made all the changes from #6829
still the same error.
Versions now are correct 1.10 but the same publishing error???

These references between modules are project based so the version will be in sync with whatever the version of the Orchard.Layouts.dll in the bin folder is. Have you tried running the PowerShell script .\CleanSolution.ps1 followed by a build of the solution? After applying the changes from #6829 that is definitely a good start.

I run CleanSolution.ps1 after every publishing try.
Someone try it, try to figure it out, its beyond me whats up.
It still will not publish, Iunless you remove Layouts and Dynamic forms and references to them, then it will, but without two essential modules.
If you ever noticed no Orchard package has been compiled and published, just Zipped up files and call it good. I got 1.10x several weeks  ago to publish then they merged dev and now it wont, Not sure what changed. Get it to publish compiled and see the performance difference and the size with most all files in, ".dll's", is much smaller than all the files, easier to ftp.
I cannot get Orchard to work on my server unless it is published = 3 years now working with Orchard just by ftping the Orchard.Web.zip or a built version it will not work.

@donaldboulton did you discover a solution or did later builds sort this (as I'm suffering from the same thing)? Thanks in advance, Liv

The assembly versions have been fixed in the latest release.


MB Arabic Hyperlink-Part5

When I go to Welcome to Canada Manitoba Theatre Company, the first one is only link without the text.

Not Fixed.


Run functional test task split the trx files and code coverage in the attachments

Hi all,
We are facing an issue using TFS 2015 (on-premise) with "Run funcional test task". When the task finishes the test execution of our dlls, we see in the test results attachments several trx files (one per dll). Do we have any way to generate just one trx/codecoverage file? As VSTest tasks is already doing?
We are using Run functional test task version 1.0.28

Regards,
Alex

Hi,
Thanks for suggestion. Currently we produce individual TRX file per slice.
Please add your suggestion https://visualstudio.uservoice.com/forums/330519-team-services and vote for it. Will happy to improve the experience.

Hi,
I'm also quite interested on this feature.
It is quite annoying to have several trx generated per solution, because then I will need to check each of them to review its test output.
In my opinion the output from the Fuctional Test Task Run should be as close as possible to the output from the VSTest task.

@PBoraMSFT FYI
Please do give feedback/suggestions through UserVoice.


Wrong Usage code section in README.md

In the Usage section, these two lines are given out
unzip  submission-checker-{version}-jar-with-depencies.jar.zip java -jar submission-checker-{version}-jar-with-depencies.jar --help
This misspells the word dependencies and does not match the file name submission-checker-0.3.0-jar-with-dependencies.jar.zip in latest release.

Thanks!
Better way of releasing would be to distribute jar via github actions -- that's a todo item.


Automated cherry pick of #9756

Cherry pick of #9756 on release-6.4.
/cc  @hmhealey
NONE

Will try to auto merge this PR once all tests and checks are passing. This might take up to an hour.

Pull Request successfully merged
SHA: 340f68f6210abe1567cd0485bd5f053caa38e365


jquery-confirm WIDTH BUG

hi
iam using jquery-confirm on my website http://z3pm.hd.free.fr/mphp3dev/
it apprears than the context of alertbox do not auto size and is then displayed full width
iam using jquery 3.1.1 and migrate 3.0.0
anyone with help ?
thx

just setted a max-width: 444px; but problem is the same
the demo version seemed to autofit width and height

can u please try out running setDialogCenter function ? and let me know ?

i called $.setDialogCenter(); just after $.alert('plop');
seems to aufot height but not width
(source code doesnt seems to do anything with width
    setDialogCenter: function () {
        if (this.$contentPane.css('display') == 'none') {
            var contentHeight = 0;
            var paneHeight = 0;
        } else {
            var contentHeight = this.$content.outerHeight();
            var paneHeight = this.$contentPane.height();
            if (paneHeight == 0)
                paneHeight = contentHeight;
        }
        var off = 100;
        var w = this.$content.outerWidth();

        //var s = '-clip-path: inset(0px 0px '+contentHeight+'px 0px);'

      //    'clip-path: inset(0px 0px '+contentHeight+'px 0px)';

      this.$content.css({
          'clip': 'rect(0px ' + (off + w) + 'px ' + contentHeight +

'px -' + off + 'px)'
});
        this.$contentPane.css({
            'height': contentHeight
        });

        var windowHeight = $(window).height();
        var boxHeight = this.$b.outerHeight() - paneHeight +

contentHeight;
var topMargin = (windowHeight - boxHeight) / 2;
var minMargin = 100;
if (boxHeight > (windowHeight - minMargin)) {
var style = {
'margin-top': minMargin / 2,
'margin-bottom': minMargin / 2
}
$('body').addClass('jconfirm-noscroll');
} else {
var style = {
'margin-top': topMargin
}
$('body').removeClass('jconfirm-noscroll');
}
this.$b.css(style);
},
i am using jquery-confirm 2.5.1
maybe i didnt call the setdialogcenter the right way
On Wed, Nov 2, 2016 at 7:11 PM, Boniface Pereira<EMAIL_ADDRESS>wrote:

can u please try out running setDialogCenter function ? and let me know ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/craftpip/jquery-confirm/issues/161#issuecomment-257951675,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AWE4hAH8KtUwTFeoY9mZnsKASKoHK1H9ks5q6NJvgaJpZM4KkVe9
.

--
.-=yUGz=-.

ure demo seems to run with jquery 1.x
i am using jquery 3.1.1

i tried to set width as u set height in the setDialogCenter() function ...
the problem seem to come from jquery-confirm-box size and not content or contentpane width

@yugzafterlife888
okay i guess i got it right, the problem is not with jquery, but you're missing bootstrap css framework, that is responsible to fit the modal to center of the page horizontally.

ok thanx ure right the problem seems to be resolved
thx a lot dude and good work
On Mon, Nov 7, 2016 at 3:00 PM, Boniface Pereira<EMAIL_ADDRESS>wrote:

@yugzafterlife888 https://github.com/yugzafterlife888
okay i guess i got it right, the problem is not with jquery, but you're
missing bootstrap css framework, that is responsible to fit the modal to
center of the page horizontally.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/craftpip/jquery-confirm/issues/161#issuecomment-258842317,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AWE4hDG3O3QFGQs3iGQak7jP2X6jbPsHks5q7y7zgaJpZM4KkVe9
.

--
.-=yUGz=-.

Thanks 👍  have a great day


Internationalize fields on vessel view page

The Vessel View page has some fields that are not internationalized.
To Reproduce
Steps to reproduce the behavior:
Set browser language to Spanish (ecuadorian/latin american)
Log in
Go to a vessel view page

Please add in the translations into src/components/vessels/vessel-view/vessel-view.component.js, as part of the TABLE group (just like TABLE.DATE, TABLE.CAPTAIN, etc), for:
PERMIT_NUMBERS
FLAG_STATES
HOME_PORTS
CAPTAINS
Desktop (please complete the following information):

Mac OS X
Firefox
80.0.1

found while checking #11 #261

I think I can help you with this 👷

Awesome! We'd love your help. I've assigned this to you.


Support defaulting query parameter values when not supplied, and default is set.

Right now, using the default parameter in openAPI specs does functionally nothing in the generator.
We could improve the strict generator by setting the query parameters to the default values set, and not have a pointer to them in the code, marking them as optional.

An up vote for addtional support for default values from me. I came across this when I had a query param that had a default value of false, found myself having check if it was nil and assuming a default which introduces a disconnect between the OAPI spec and the code:
var field bool
if params.Field != nil && params.Field {
    field = params.Field
}

// do something with `field`

I think the auto-generated client code requires no changes since a pointer value (!= nil) is used to differentate between a user provided value and no value.
So as you suggest, if the schema has a default value then having that set automatically if the request does not give a value would be a start. Dropping the pointer for a more user-friendly experience would be the next step. In my example I could then just use params.Field directly.
I've been having a look at the code changes to support this, I think that passing the default value to https://github.com/oapi-codegen/runtime/blob/912bc9f39f1e8fd175f1f39c48b4adf5ceca39f1/bindparam.go#L309 and using it is the majority of the solution to respecting the default value.


garnet: used combined dotnet-sdk

This allows the sdk dependencies to be removed from deps.nix, so the package will build on newer sdks.
Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 326408 run on x86_64-linux 1

1 package built:

garnet


how to use in  windows system

HI ,somebody could tell me how to run this program in windows platform. THX so much!

Run notepad in ADMIN mode, then open C:\Windows\System32\Drivers\etc\hosts,
then edit it, then save, finally reboot.
CodeMing<EMAIL_ADDRESS>10:59写道：

HI ,somebody could tell me how to run this program in windows platform.
THX so much!
—
Reply to this email directly or view it on GitHub
https://github.com/lennylxx/ipv6-hosts/issues/33.

This project is for hosts file, which apparently is not a program.
Let me google that for you.
https://en.wikipedia.org/wiki/Hosts_(file)


Update docs with parameters that default to None to use Optional

First check

[x] I added a very descriptive title to this issue.
[x] I used the GitHub search to find a similar issue and didn't find it.
[x] I searched the FastAPI documentation, with the integrated search.
[x] I already searched in Google "How to X in FastAPI" and didn't find any information.
[x] I already read and followed all the tutorial in the docs and didn't find an answer.
[x] I already checked if it is not related to FastAPI but to Pydantic.
[x] I already checked if it is not related to FastAPI but to Swagger UI.
[x] I already checked if it is not related to FastAPI but to ReDoc.
[x] After submitting this, I commit to:

Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there.
Or, I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.
Implement a Pull Request for a confirmed bug.

Example
Here's a self-contained minimal, reproducible, example with my use case:

from fastapi import FastAPI, Query

app = FastAPI()

@app.get("/")
def read_root(q: str = Query(None)):
    return {"q": q.lower()}

Description

Open the editor with that code, similar to many examples in the docs.
It's quite probable that the editor won't complain that q can be None and that q.lower() could raise an error.

The solution you would like

I would like the examples in the docs to use Optional:
from typing import Optional

from fastapi import FastAPI, Query

app = FastAPI()

@app.get("/")
def read_root(q: Optional[str] = Query(None)):
    return {"q": q.lower()}

By using Optional the editor would be able to warn that q.lower() could raise an error if q is None.
Describe alternatives you've considered

To leave it as is.
Environment

OS: [e.g. Linux / Windows / macOS]: All (docs)
FastAPI Version [e.g. 0.3.0]: 0.56.0

To know the FastAPI version use:
python -c "import fastapi; print(fastapi.__version__)"

Python version: All (docs)

To know the Python version use:
python --version

Additional context
I was waiting to first introduce Optional in the docs, but it was done in https://github.com/tiangolo/fastapi/pull/1377 :tada:
The new docs are here: https://fastapi.tiangolo.com/python-types/#optional
Now it's a good moment to update all the examples that have a default of None in all the docs to also use Optional.

I'll be working on this with @chrisngyn

I believe this was already solved with #1644 being merged to master. Should this issue be closed @tiangolo?

Thanks a lot!

@tiangolo
Is this issue still accepting contributors?
You mentioned here that you merged another branch.

@tiangolo Is this available to take up?

@tiangolo is this fixed or do you want someone to take it up a quick search through the docs makes it look all solved?

This issue was solved on https://github.com/tiangolo/fastapi/pull/1644
To confirm I've made a quick search and the docs are following the request on this issue. :nerd_face:

Is this still up for grabs?

@azimovMichael

First check

[x]  I added a very descriptive title to this issue.

[x]  I used the GitHub search to find a similar issue and didn't find it.

[x]  I searched the FastAPI documentation, with the integrated search.

[x]  I already searched in Google "How to X in FastAPI" and didn't find any information.

[x]  I already read and followed all the tutorial in the docs and didn't find an answer.

[x]  I already checked if it is not related to FastAPI but to Pydantic.

[x]  I already checked if it is not related to FastAPI but to Swagger UI.

[x]  I already checked if it is not related to FastAPI but to ReDoc.

[x]  After submitting this, I commit to:

Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there.
Or, I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.
Implement a Pull Request for a confirmed bug.

Example
Here's a self-contained minimal, reproducible, example with my use case:
from fastapi import FastAPI, Query

app = FastAPI()

@app.get("/")
def read_root(q: str = Query(None)):
    return {"q": q.lower()}

Description

Open the editor with that code, similar to many examples in the docs.
It's quite probable that the editor won't complain that q can be None and that q.lower() could raise an error.

The solution you would like
I would like the examples in the docs to use Optional:
from typing import Optional

from fastapi import FastAPI, Query

app = FastAPI()

@app.get("/")
def read_root(q: Optional[str] = Query(None)):
    return {"q": q.lower()}

By using Optional the editor would be able to warn that q.lower() could raise an error if q is None.
Describe alternatives you've considered
To leave it as is.
Environment

OS: [e.g. Linux / Windows / macOS]: All (docs)
FastAPI Version [e.g. 0.3.0]: 0.56.0

To know the FastAPI version use:
python -c "import fastapi; print(fastapi.__version__)"

Python version: All (docs)

To know the Python version use:
python --version

Additional context
I was waiting to first introduce Optional in the docs, but it was done in #1377 🎉
The new docs are here: https://fastapi.tiangolo.com/python-types/#optional
Now it's a good moment to update all the examples that have a default of None in all the docs to also use Optional.

Ah, I forgot to close my own issue! Haha. This is done now. ✅
Thanks for the interest and discussion everyone! ☕


In Progress Release Page

In progress release notes need to be displayed on the site. For the currently being developed version of Boost.

@frankwiles Some questions for the team:

This seems like this is a couple of different requests: Getting the release notes on the release details page, and adding the develop version as a "Version" (is that a duplicate of #386?)
For the release notes, are we displaying the ones that are here, but for the currently being developed version? https://www.boost.org/users/history/version_1_83_0.html If so, where do these live to retrieve them? I'm not sure if they are in a github repo, or hosted in S3, or somewhere else. I had a look around and didn't see anything obvious.
For the "currently being developed" version, is that the develop branch?
For the currently being developed version, does it need its own page separate from the existing releases details page?
Should the develop version appear in the drop-down on the Releases and Libraries pages?

@sdarwin Do you know where the release notes come from, the ones we should display in the body of the page on a release details page? Is it these notes? https://www.boost.org/users/history/version_1_83_0.html If so, where are those stored? A sample path for a specific version like 1.83.0 and one for the master or develop versions would be very helpful.
This is the screen I am referencing: https://www.preview.boost.org/releases/

https://www.preview.boost.org/releases/ links to www.boost.org/users/history/version_1_83_0.html which is problematic since  the new website shouldn't have dependencies on the old website.

where the release notes come from

https://raw.githubusercontent.com/boostorg/website/master/feed/history/boost_1_83_0.qbk
during a sync, copy that file from the GitHub (githubusercontent.com) to the database.
Only if it's missing or within the last couple versions. Most content would already be in the DB.  If it's already there and a few versions back, it doesn't even need to generate an API call.

what should be displayed for master or develop

option 1:  don't display release notes. or downloads, or anything other than documentation for master or develop . They aren't releases.
eventually, another solution will need to be implemented, where the release notes are migrated into the temp-site github repository or the database itself.

@sdarwin I know this ticket is for the "in progress" (master/develop) release notes, but let's set that aside for a second.
About release notes for existing full Boost releases: Will the repo https://github.com/boostorg/website/ still be used once we are using the new site? Or will the process that creates that quickbook file be added to this repo https://github.com/cppalliance/temp-site/?
Also, from prior conversations, it sounded like Python options to convert from quickbook to asciidoc or Markdown, etc. aren't great because of some customizations that Boost has. Is that right? (cc @frankwiles)

In progress release page is here: https://www.boost.org/users/history/in_progress.html
we should also clearly mark in-progress pages similarly.
"""
In Progress Releases
Note: The release notes on this page are for releases still under development. Please don't use this page as a source of information, it's here for development purposes only. Everything is subject to change.
"""

Will the repo https://github.com/boostorg/website/ still be used once we are using the new site?

They will exist in-parallel for some number of months.  Eventually, in the long term, it will be archived read-only.

@sdarwin do you know of any tooling that might convert qbk to other formats so we can avoid having to write a qbk parser from scratch? Is there docs on qbk anywhere we can look at if nothing else?

Quickbook docs: https://www.boost.org/doc/libs/1_83_0/doc/html/quickbook.html

This may not be the answer, but just for reference, building the documentation of a boost library involves compiling and using quickbook, among other tools.  An example: search for 'quickbook" on this page:  https://github.com/boostorg/release-tools/blob/develop/build_docs/linuxdocs.sh

search in https://github.com/boostorg/website. References to quickbook.

A boostorg/website CI file previously downloaded a quickbook release. https://github.com/boostorg/quickbook/releases    Perhaps those quickbook releases could be updated.

Alternatives: ask boost developers to submit release notes in AsciiDoc format instead.

avoid having to write a qbk parser

Only speculative, but to avoid quickbook entirely:

In future releases, after 1.84.0, request that developers submit pull requests to the new website using another markdown format which is not quickbook.

For past releases, find a way to ingest the already-rendered release notes (html format, not qbk format)
https://raw.githubusercontent.com/boostorg/website/master/users/history/version_1_82_0.html
https://raw.githubusercontent.com/boostorg/website/master/users/history/version_1_83_0.html

For past releases, find a way to ingest the already-rendered release notes (html format, not qbk format)

I really like this idea and am going to go with it, and not write a parser from scratch :)
Once that is done, I'll touch base with you @sdarwin about future releases, since that sounds like something that might require consensus.

@williln we can assume that all future versions will be in AsciiDoc, so if we can quick/hacky convert the old HTML into the system (either raw HTML or into AsciiDoc in the DB) and assume the future ones are AsciiDoc that is fine.


onClick w/o Drag new color not updated for call-back

When opening the color-picker I simply click on a new area for a new color and listen for 'colorpicker-selected' to be emitted. The callback does not return to me the new color value and instead the previous one that was selected.
This works perfectly if you drag around the cross-hairs and let go, just not for a single click.

Thank you, @aschroederSportsdigita! I will be using your branch until it is merged.


fix(clerk-js): Keep the session cookie while cache is being invalidated

Otherwise, in Nextjs apps the invalidate cache server action will result in a 404 if current route is being protected by auth().protect()
Description

Checklist

[ ] npm test runs as expected.
[ ] npm run build runs as expected.
[ ] (If applicable) JSDoc comments have been added or updated for any package exports
[ ] (If applicable) Documentation has been updated

Type of change

[ ] 🐛 Bug fix
[ ] 🌟 New feature
[ ] 🔨 Breaking change
[ ] 📖 Refactoring / dependency upgrade / documentation
[ ] other:

@nikosdouvlis @octoper does this reintroduce the bug that was fixed by https://github.com/clerk/javascript/pull/3371?
We explicitly made a change to ensure the session cookie was cleared before clearing the cache on sign out.


Update Styleguidelines and Testguidelines to meet Pester v4 - Fixes #330

This PR:

Updates StyleGuidelines.md:

To meet Pester v4 guidelines

Updated TestGuidelines.md:

To meet Pester v4 guidelines
To remove Markdown rule violations

This change is

Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion.

TestsGuidelines.md, line 90 at r1 (raw file):

Add any variables that are required to be accessed outside the module by unit tests to the Export-ModuleMember cmdlet in the DSC Resource:

This is seen as a new list, so this starts with 1. as well. Uncertain, but I think you must indent the code block and remove the spaces so it is rendered as a full list, or just change this to '2.'.

Comments from Reviewable

Awesome! Thanks @johlju . I'll fix this PR up after Sunday as I'm taking a mini holiday. Cheers for reviewing.

Review status: 1 of 2 files reviewed at latest revision, 1 unresolved discussion.

TestsGuidelines.md, line 90 at r1 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
This is seen as a new list, so this starts with 1. as well. Uncertain, but I think you must indent the code block and remove the spaces so it is rendered as a full list, or just change this to '2.'.

Done.

Comments from Reviewable

Thanks @Johlju - back from holiday now. I've made the changes.

Review status: 1 of 2 files reviewed at latest revision, 1 unresolved discussion.

Comments from Reviewable

@kwirkykat Can you look at this and merge whenever you have a chance?

Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


NH-43527: add support of activerecord 7.1 for non-rails app

Description
This patch is for non-rails app (e.g. sinatra) that use activerecord >= 7.1.0
From 7.1.0, query() changed calling from exec_query() to internal_exec_query()
Postgresql is not affected by this because in psql, internal_exec_query calls execute_and_clear
Test (if applicable)
Sinatra + ActiveRecord 7.1.3 on MySQL Trace Info

LGTM @xuan-cao-swi! Do you have some example traces from testing that I can look at?

Yes, I will generate a test case/trace

Added trilogy support at marginalia

Thanks for the example trace @xuan-cao-swi! It's helping me see a few things, for example that there would be a span collected at the ORM layer that does not capture any db.statement, then the actual database adapter/client span that captures the db.statement per semantic convention.
One problem--in the example trace, all of the injected trace context have the span ID fbca35e202fef348 which is that of the entry span, rather than the span ID of each actual client span.  Can you investigate?

Yes, it seems like the primary key query is one-time query after web app initialize the mysql client. If execute the query multiple time, it won't appear.
2024-03-08T19:07:34.586923Z	    8 Connect<EMAIL_ADDRESS>on classicmodels using TCP/IP
2024-03-08T19:07:34.587546Z	    8 Query	SET  @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'),  @@SESSION.wait_timeout = 2147483
2024-03-08T19:07:34.589472Z	    8 Query	SHOW FULL FIELDS FROM `customers`
2024-03-08T19:07:34.595909Z	    8 Query	SELECT `customers`.* FROM `customers` WHERE `customers`.`contactLastName` = 'Schmitt' LIMIT 1 /*traceparent='00-158681749140f2cc180de6bdd94ed8ba-1e061713922ef3e0-01'*/
2024-03-08T19:07:34.599769Z	    8 Query	SELECT table_name FROM information_schema.tables WHERE table_schema = database() /*traceparent='00-158681749140f2cc180de6bdd94ed8ba-1e061713922ef3e0-01'*/
2024-03-08T19:07:34.601892Z	    8 Query	SELECT column_name
FROM information_schema.statistics
WHERE index_name = 'PRIMARY'
  AND table_schema = database()
  AND table_name = 'customers'
ORDER BY seq_in_index
 /*traceparent='00-158681749140f2cc180de6bdd94ed8ba-1e061713922ef3e0-01'*/
2024-03-08T19:07:37.170407Z	    8 Query	SELECT `customers`.* FROM `customers` WHERE `customers`.`contactLastName` = 'Schmitt' LIMIT 1 /*traceparent='00-d056227ec44489124e81e01e8940689d-d15bff727002c228-01'*/
2024-03-08T19:07:38.305680Z	    8 Query	SELECT `customers`.* FROM `customers` WHERE `customers`.`contactLastName` = 'Schmitt' LIMIT 1 /*traceparent='00-e6b06aae22daa97be0104485e4d1a7e7-160b285525404cf7-01'*/

The primary_keys-like initialization will be called each time, but I think after first time, the query  like SELECT column_name FROM information_schema.statistics won't be called.
The reason they have same span_id probably because of the entire activerecord span is initialized by find_by_sql, and marginalia is injected at activerecord level, so the span id is same

I see. How about this trace. The Trace Info I posted in test section was created while I was testing active support notification on active record. Not sure why it will cause the entry span id to query.
More following up trace

Looking over the trace with Xuan, there are two "db-related" spans, one from ActiveRecord instrumentation (does not have db.statement), and the underlying mysql adapter instrumentation (has db.statement). The trace context comment is inserted into the mysql adapter span's db.statement but carries the span ID from the ActiveRecord span, which is due to marginalia working at the ORM rather than adapter level.  This won't work for our APM <-> DBO integration so @xuan-cao-swi is going to investigate customizing the db adapter instrumentation.

Close as we need to inject trace context in db level instead of activerecord level


Accessibility fixes

There are a few things that don't quite match up with the Design System at the moment. This PR is to make sure everything aligns and that the full benefits of the Design System are being pulled across.
Things to address:

[x] Missing id on <main> elements
[x] Links missing Design System class
[x] ~Fix links in error summary panel (they need to link to the form element with the error in and not the error message that appears just above them)~

Each of this issues will be addressed in a separate commit, and the rationale behind them will be in the commit message details.
This is a work in progress, and this list will keep updating (until I remove this line)

'Fix links in error summary panel (they need to link to the form element with the error in and not the error message that appears just above them)' will be addressed in a separate PR (#32) by @tmckernan, as it turned out to be quite complex

Didn't realised the en.yml still contains the original structure before the splitting into smaller files.
We should refactor it and remove everything that has been moved to separate files otherwise there will be duplications.

@tmckernan and I had a chat about it, and for now I've moved across the necessary changes to the separate yml files, but I'm leaving it as that because Tony will be removing the en.yml file in a separate PR he's working on :)

@BNewing sure, no problem at all.


chore(master): release 0.6.3

:robot: I have created a release beep boop
0.6.3 (2024-11-27)
Bug Fixes

Fix linting of global symbols (#51) (e2c0d8d)
Remove misplaced-load lints from WORKSPACE files (#61) (951cdd4)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v0.6.3
:sunflower:


new Design plus Features

Description
made new design and added few feature and remove static code.
Fixes #398

Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Explain the Testing instructions
Test Configuration:

Operating system:
Version:
Text-editors used:

Checklist:

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

ATTACH SCREEN-SHOTS / DEPLOYMENT LINK

Also @arpit456jain afaik someone made a PR to add a button on the home page clicking on which we are redirected to the GitHub repo of that project. Did you remove it or was it in some other repo?

LGTM but am just confused, why do we have the calculator page in the navbar? Am I missing something?

@VidhiBhatt01 Ummm... @arpit456jain  told me to do that, and also, It was already in the previous design so that's why. I included this here


Hacktoberfest: Update Dependencies

Hello! : )
To celebrate the Hacktoberfest festivities, everyone is welcome to update the a following group of dependencies to their latest versions. It should be really simple and easy. Here are the links to the packages on npmjs.com, you can find their latest version on the right side of the page:

ms
fs-extra
simple-get
time-stamp

Happy Hacktoberfest and happy hacking! 🎉

@klauscfhq Hi! Can I take this up? :)


RFC: Store and display individual pipeline steps

Currently in the Drone UI there is no information on what the pipeline looks like and why a certain step was not run within a build. This makes debugging difficult especially for users who are new to Drone.
I would like to propose that the logs contain metadata on the build itself and what is happening within it so users can diagnose their YAML files for any issues with configuration.
During the preparation for the build the agent should output metadata on what the pipeline looks like and why a certain step is not going to run. It could also potentially let the user know what secrets are present and if the image matches why it is not injected into the current build.
Within the UI you could do something like this. This would visualize the pipeline and show why certain steps are executing but others are not. Programmer art follows.

so we should be able to trace why a step is skipped and write that reason to the build logs as you can see below:
-	if !pipeline.Head().Constraints.Match(
-		a.Platform,
-		payload.Build.Deploy,
-		payload.Build.Event,
-		payload.Build.Branch,
-		status, payload.Job.Environment) { // TODO: fix this whole section
-
-		pipeline.Skip()
-	} else {
-		pipeline.Exec()
-	}

+	var (
+		skip = true
+		reason string
+	)
+
+	switch {
+	case !c.Environment.Match(target):
+		reason = "..."
+	case !c.Event.Match(event):
+		reason = "..."
+	case !c.Branch.Match(branch):
+		reason = "..."
+	case !c.Status.Match(status):
+		reason = "..."
+	case !c.Matrix.Match(matrix):
+		reason = "..."
+	default:
+		skip = false
+	}
+
+	if skip {
+		pipeline.Skip()
+	} else {
+		pipeline.Exec()
+	}

this would happen here:
https://github.com/drone/drone/blob/master/agent/agent.go#L220
the skip reason could be logged as meta-data using the existing logging type and metadata enumeration, which you can see here:
https://github.com/drone/drone/blob/master/build/types.go#L9

/cc @timgent @danielepolencic

I like the sequence-diagram style pipeline visualization

Any movement on this @bradrydzewski ? Quite an exciting concept - especially if you could re-start parts of the pipeline?

@Spedge agreed this will be a nice feature. I am not actively working on new features right now. I'm focused on stabilizing the codebase and getting things documented before I jump into the next feature sprint.
The challenge with this change is that it ends up being somewhat complex. We do not currently store the steps in the database as structured data. The steps are instead parsed from the logs. Each log entry is tagged with metadata including the timestamp, line number and process name (ie step). This data is aggregated in the UI to organize the logs by process name.
Ideally we would store the steps as structured data. This also probably means storing the logs for each step as separate entries, instead of a single blob for the entire build. This would allow us to tag each step with useful metadata such as total duration, exit code, resource usage, whether or not it was skipped, and more and could lead to some nice visualizations in the UI. This sort of structural change ends up impacting almost every tier of the code (front-end, websockets, api, database, log server, agent to server protocol).
So while this definitely won't be an easy feature to implement, it will certainly bring some exciting new capabilities. I think the best way to push this forward would be to come up with some different database designs so we can understand pros / cons and performance and database size implications. I'm definitely open to help in this area. Once we know how we are going to structure the data we can figure out how to start updating the surrounding modules accordingly, hopefully one at a time :)

My proposal would be to alter the data structure to support a more tree-like structure. This would involve removing the jobs table and replacing with something more generic that could represent matrix jobs, but also their sub-processes.
CREATE TABLE procs (
 proc_id         INTEGER PRIMARY KEY AUTOINCREMENT
,proc_build_id   INTEGER
,proc_pid        INTEGER
,proc_ppid       INTEGER
,proc_pgrp       INTEGER
,proc_name       TEXT
,proc_state      TEXT
,proc_error      TEXT
,proc_exit_err   BOOLEAN
,proc_exit_code  INTEGER
,proc_created    INTEGER
,proc_updated    INTEGER
,proc_started    INTEGER
,proc_finished   INTEGER
,proc_tty        TEXT
,proc_platform   TEXT
,proc_environ    TEXT
,proc_machine    TEXT
);

We would then need to store the build logs for each process:
CREATE TABLE files (
 file_id        INTEGER PRIMARY KEY AUTOINCREMENT
,file_build_id  INTEGER
,file_proc_id   INTEGER
,file_name      TEXT
,file_mime      TEXT
,file_data      BLOB
,file_created   INTEGER
,file_updated   INTEGER
);

Unfortunately progress and new features of this nature come with the guarantee that we are going to break things. So that is my only warning to the community. If we push forward with this sort of feature we are going to create (more) breaking changes, and I'm not personally going to spend my cycles coming up with automated data transformation / migration scripts (unless someone wants to fund it). Otherwise it would need to be a community effort.

Update. I'm now working on this. I created a github project to track all breaking changes that I wanted to complete prior to 1.0 and this is one of the last (and biggest) items on the list
https://github.com/drone/drone/projects/1
I expect an initial implementation in ~2 weeks, given the complexity involved. Please note that the initial implementation will focus on the server side, agent to server, and database changes required. It will not include any UI visualizations. That is phase 2

ok ... if someone wants to really see this advanced and wants to help, I could really use a react component that takes the below javascript object and create a well-styled graph (similar to Jenkins image above)
[
        {
          "pid": 2,
          "ppid": 1,
          "pgid": 2,
          "name": "clone",
          "state": "success",
          "exit_code": 0,
          "start_time":<PHONE_NUMBER>,
          "end_time":<PHONE_NUMBER>
        },
        {
          "pid": 3,
          "ppid": 1,
          "pgid": 3,
          "name": "frontend",
          "state": "success",
          "exit_code": 0,
          "start_time":<PHONE_NUMBER>,
          "end_time":<PHONE_NUMBER>
        },
        {
          "pid": 4,
          "ppid": 1,
          "pgid": 3,
          "name": "backend",
          "state": "success",
          "exit_code": 0,
          "start_time":<PHONE_NUMBER>,
          "end_time":<PHONE_NUMBER>
        },
        {
          "pid": 5,
          "ppid": 1,
          "pgid": 5,
          "name": "deploy",
          "state": "success",
          "exit_code": 0,
          "start_time":<PHONE_NUMBER>,
          "end_time":<PHONE_NUMBER>
        }
]

The above javascript object would look like this in graphical form:

Note that parallel steps are denoted by the pgid field. Steps with the same group are executed in parallel.
Any takers?

ok, the pull request to store individual steps as structured data is complete. This was a major breaking change and there are going to be a lot of rough edges and even some regressions. I wouldn't rule out more breaking changes and would not advise drone:0.6 until we announce a release candidate.
... but at least the hard part is done 😄

@bradrydzewski Is the React component still needed? It seems like Jenkins has their pipeline graph in a seperate repository here and that they are constructing an SVG from some data in the Blue Ocean repository.
I'm fairly good at React, so I might want to take a stab at this if it's not done already.

The drone server and agent changes are in place and we now display all steps in the user interface at the start of the build. We have also added a skipped status.
I am therefore moving this issue to the drone-ui repository, since the remaining action items are all front-end work. Moved to https://github.com/drone/drone-ui/issues/130


Corrected comparison call in OCI_TimestampCompare

The third and fourth argument to the OCIDateTimeCompare function should be the first and second timestamp to compare, respectively. Unfortunately, the second timestamp is used for both third and fourth argument.

Thanks for reporting :)
Fix merged.


Created Splash screen

A basic Splash screen is created with a logo in center.

#7
Enhancement Done Created Splash Screen


Analytics overview re-enabled

Not intended to be launched publicly yet, but it can be accessed if you know the URL.

main

#62   👈

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @NathanFlurry and the rest of your teammates on  Graphite


Go client library cannot be used with dep

What happened?:
looking at the godoc
I followed the example and created a main.go file in test package:
mkdir $GOPATH/src/test_pach
touch $GOPATH/src/test_pach/main.go
cd $GOPATH/src/test_pach

I added these contents to the main.go file:
package main

import (
	"github.com/pachyderm/pachyderm/src/client"
)

func main() {
	c, err := client.NewFromAddress("<IP_ADDRESS>:30650")
	if err != nil {
		panic(err)
	}
	println("we did it")
}

Here is dep.  We use this tool to manage go dependencies.   I ran a: dep init command.  This generates a lock file for the project with all the transitive dependencies.
I then ran: go build
What you expected to happen?:
I expected the minimal project to build.  Instead I got this error:
$ go build .
#<path_to_project>/vendor/github.com/pachyderm/pachyderm/src/client/pkg/config
vendor/github.com/pachyderm/pachyderm/src/client/pkg/config/config.go:36:13: assignment mismatch: 2 variables but 1 values

How to reproduce it (as minimally and precisely as possible)?:
paste the example above into a new go package/main.go, cd into that file and run

dep init (takes awhile)
go build

Anything else we need to know?:
Environment?:
$ dep version
dep:
 version     : devel
 build date  :
 git hash    :
 go version  : go1.10.2
 go compiler : gc
 platform    : darwin/amd64
 features    : ImportDuringSolve=false

$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/<my_name>/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/<my_name>/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.10.2/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.10.2/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
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/0x/0tyyz8f97gl2m8n0hp3n209m0000gn/T/go-build993181416=/tmp/go-build -gno-record-gcc-switches -fno-common"

system_profiler SPSoftwareDataType

Software:

    System Software Overview:

      System Version: macOS 10.13.5 (17F77)
      Kernel Version: Darwin 17.6.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name: <my_computer_name>
      User Name: <my_user_name>
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
      Time since boot: 5:43

Gopkg.lock file (from dep)
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.

[[projects]]
  name = "github.com/emirpasic/gods"
  packages = [
    "containers",
    "lists",
    "lists/arraylist",
    "trees",
    "trees/binaryheap",
    "utils"
  ]
  revision = "f6c17b524822278a87e3b3bd809fec33b51f5b46"
  version = "v1.9.0"

[[projects]]
  name = "github.com/gogo/protobuf"
  packages = [
    "gogoproto",
    "proto",
    "protoc-gen-gogo/descriptor",
    "sortkeys",
    "types"
  ]
  revision = "1adfc126b41513cc696b209667c8656ea7aac67c"
  version = "v1.0.0"

[[projects]]
  name = "github.com/golang/protobuf"
  packages = [
    "proto",
    "ptypes",
    "ptypes/any",
    "ptypes/duration",
    "ptypes/timestamp"
  ]
  revision = "b4deda0973fb4c70b50d226b1af49f3da59f5265"
  version = "v1.1.0"

[[projects]]
  branch = "master"
  name = "github.com/jbenet/go-context"
  packages = ["io"]
  revision = "d14ea06fba99483203c19d92cfcd13ebe73135f4"

[[projects]]
  name = "github.com/kevinburke/ssh_config"
  packages = ["."]
  revision = "9fc7bb800b555d63157c65a904c86a2cc7b4e795"
  version = "0.4"

[[projects]]
  branch = "master"
  name = "github.com/mitchellh/go-homedir"
  packages = ["."]
  revision = "3864e76763d94a6df2f9960b16a20a33da9f9a66"

[[projects]]
  name = "github.com/pachyderm/pachyderm"
  packages = [
    "src/client",
    "src/client/admin",
    "src/client/auth",
    "src/client/deploy",
    "src/client/enterprise",
    "src/client/health",
    "src/client/pfs",
    "src/client/pkg/config",
    "src/client/pkg/grpcutil",
    "src/client/pkg/pbutil",
    "src/client/pps",
    "src/client/version",
    "src/client/version/versionpb",
    "src/server/pkg/errutil"
  ]
  revision = "c3f9e2ebd030325f0dc576f812015c75172e9bf6"
  version = "v1.7.3"

[[projects]]
  name = "github.com/pelletier/go-buffruneio"
  packages = ["."]
  revision = "c37440a7cf42ac63b919c752ca73a85067e05992"
  version = "v0.2.0"

[[projects]]
  name = "github.com/satori/go.uuid"
  packages = ["."]
  revision = "f58768cc1a7a7e77a3bd49e98cdd21419399b6a3"
  version = "v1.2.0"

[[projects]]
  name = "github.com/sergi/go-diff"
  packages = ["diffmatchpatch"]
  revision = "1744e2970ca51c86172c8190fadad617561ed6e7"
  version = "v1.0.0"

[[projects]]
  name = "github.com/sirupsen/logrus"
  packages = ["."]
  revision = "c155da19408a8799da419ed3eeb0cb5db0ad5dbc"
  version = "v1.0.5"

[[projects]]
  name = "github.com/src-d/gcfg"
  packages = [
    ".",
    "scanner",
    "token",
    "types"
  ]
  revision = "f187355171c936ac84a82793659ebb4936bc1c23"
  version = "v1.3.0"

[[projects]]
  branch = "master"
  name = "github.com/xanzy/ssh-agent"
  packages = ["."]
  revision = "ba9c9e33906f58169366275e3450db66139a31a9"

[[projects]]
  branch = "master"
  name = "golang.org/x/crypto"
  packages = [
    "cast5",
    "curve25519",
    "ed25519",
    "ed25519/internal/edwards25519",
    "internal/chacha20",
    "openpgp",
    "openpgp/armor",
    "openpgp/elgamal",
    "openpgp/errors",
    "openpgp/packet",
    "openpgp/s2k",
    "poly1305",
    "ssh",
    "ssh/agent",
    "ssh/knownhosts",
    "ssh/terminal"
  ]
  revision = "df8d4716b3472e4a531c33cedbe537dae921a1a9"

[[projects]]
  branch = "master"
  name = "golang.org/x/net"
  packages = [
    "context",
    "http/httpguts",
    "http2",
    "http2/hpack",
    "idna",
    "internal/timeseries",
    "trace"
  ]
  revision = "1e491301e022f8f977054da4c2d852decd59571f"

[[projects]]
  branch = "master"
  name = "golang.org/x/sys"
  packages = [
    "unix",
    "windows"
  ]
  revision = "c11f84a56e43e20a78cee75a7c034031ecf57d1f"

[[projects]]
  name = "golang.org/x/text"
  packages = [
    "collate",
    "collate/build",
    "internal/colltab",
    "internal/gen",
    "internal/tag",
    "internal/triegen",
    "internal/ucd",
    "language",
    "secure/bidirule",
    "transform",
    "unicode/bidi",
    "unicode/cldr",
    "unicode/norm",
    "unicode/rangetable"
  ]
  revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0"
  version = "v0.3.0"

[[projects]]
  branch = "master"
  name = "google.golang.org/genproto"
  packages = ["googleapis/rpc/status"]
  revision = "81158efcc9f219c511e4d3c0d61a0e6e49c01a24"

[[projects]]
  name = "google.golang.org/grpc"
  packages = [
    ".",
    "balancer",
    "balancer/base",
    "balancer/roundrobin",
    "channelz",
    "codes",
    "connectivity",
    "credentials",
    "encoding",
    "encoding/proto",
    "grpclb/grpc_lb_v1/messages",
    "grpclog",
    "internal",
    "keepalive",
    "metadata",
    "naming",
    "peer",
    "resolver",
    "resolver/dns",
    "resolver/passthrough",
    "stats",
    "status",
    "tap",
    "transport"
  ]
  revision = "41344da2231b913fa3d983840a57a6b1b7b631a1"
  version = "v1.12.0"

[[projects]]
  name = "gopkg.in/src-d/go-billy.v4"
  packages = [
    ".",
    "helper/chroot",
    "helper/polyfill",
    "osfs",
    "util"
  ]
  revision = "df053870ae7070b0350624ba5a22161ba3796cc0"
  version = "v4.1.1"

[[projects]]
  name = "gopkg.in/src-d/go-git.v4"
  packages = [
    ".",
    "config",
    "internal/revision",
    "plumbing",
    "plumbing/cache",
    "plumbing/filemode",
    "plumbing/format/config",
    "plumbing/format/diff",
    "plumbing/format/gitignore",
    "plumbing/format/idxfile",
    "plumbing/format/index",
    "plumbing/format/objfile",
    "plumbing/format/packfile",
    "plumbing/format/pktline",
    "plumbing/object",
    "plumbing/protocol/packp",
    "plumbing/protocol/packp/capability",
    "plumbing/protocol/packp/sideband",
    "plumbing/revlist",
    "plumbing/storer",
    "plumbing/transport",
    "plumbing/transport/client",
    "plumbing/transport/file",
    "plumbing/transport/git",
    "plumbing/transport/http",
    "plumbing/transport/internal/common",
    "plumbing/transport/server",
    "plumbing/transport/ssh",
    "storage",
    "storage/filesystem",
    "storage/filesystem/internal/dotgit",
    "storage/memory",
    "utils/binary",
    "utils/diff",
    "utils/ioutil",
    "utils/merkletrie",
    "utils/merkletrie/filesystem",
    "utils/merkletrie/index",
    "utils/merkletrie/internal/frame",
    "utils/merkletrie/noder"
  ]
  revision = "57570e84f8c5739f0f4a59387493e590e709dde9"
  version = "v4.4.0"

[[projects]]
  name = "gopkg.in/warnings.v0"
  packages = ["."]
  revision = "ec4a0fea49c7b46c2aeb0b51aac55779c607e52b"
  version = "v0.1.2"

[solve-meta]
  analyzer-name = "dep"
  analyzer-version = 1
  inputs-digest = "a39403e546765aea0b2e17ce7f287a38a752f6a594275bf114c7570e09c491b0"
  solver-name = "gps-cdcl"
  solver-version = 1

So poking around here a bit.
It seems that this function call ... uuid.NewV4() returns 2 args at the version we have vendored (36e9d2ebbde5e3f13ab2e25625fd453271d6522e) but not at release 1.2.0 (f58768cc1a7a7e77a3bd49e98cdd21419399b6a3). Unfortunately the API at version 1.1.0 doesn't seem compatible either.
So there is a bit of impedance mismatch between these vendoring tools.
Since there is a way to specify an override using dep ... I've added this to my Gopkg.toml file:
 [[override]]
   name = "github.com/satori/go.uuid"
   revision="36e9d2ebbde5e3f13ab2e25625fd453271d6522e"

And that did the trick.

@iamneal this issue seems resolved so I'm going to close this. Let us know if there's anything else we can do to help you out.


git-codereview: doesn't work correctly on windows

Any files has not been uploaded.
https://go-review.googlesource.com/#/c/1352/
This should have three files in the commit.
https://go-review.googlesource.com/#/c/1354/

@mattn what is the problem here? Is it still broken?
Alex

Seems to be solved (as far as you can see I send some windows patches)

In the time I filed this issue, I could push commit just like below.

modify files.
git change
git push


append mod id doesnt work

or i am misunderstanding what it does but it just straight up doesnt show mod id anywhere, not in  inventory, not in emi

Certain mods that are incompatible with others like obscuria api can break tooltips for mods like EMI. Otherwise, tooltips work perfectly fine in vanilla and most modded environments.


Scientific names are built upon GBIF codes, but they don't always match the Soort column

Currently, the species in the darwincore occurrence output is determined based on the GBIF_Code column in the raw data, not on the Soort column.
However, if we look up the values for the Soort column for Rattus norvegicus, we also get rabbits and chickens, which makes me think that perhaps this field isn't 100% reliable.
filter(raw_data, GBIF_Code == 2439261) %>% count(Soort, sort = TRUE)

Soort
n

Bruine rat bak/buis
87074

Kippen
8

Andere (soort vermelden):
3

Konijnen
1

Steenmarter
1

However, the Soort column isn't necessarily more reliable either, especially the "Other" field.
@damianooldoni I remember you mentioning you had trouble with this in the past, do you maybe have a bit more context? What do you think we should do?

As mentioned in #24 I would map them manually. In other words, I would not use the GBIF codes they provide. They started to add it by a request of @timadriaens some years ago. The reason was that their data were at that time not on GBIF yet and by having a backbone GBIF taxonKey was practical to use RATO data and join them with other data sources.

indeed, manual seems the way to go, they do not have the technical and species knowledge to always be aware of the correct codes.


Add property advertising-clause to indiana-extreme license.

@mmurto you're right, the license we're discussing doesn't have an advertising clause, just a standard attribution requirement for documentation. However, we've mistakenly applied the "advertising clause" label to similar licenses like Apache-1.1 in the past (or to be exact I have). These, along with the license at hand, only require attribution in documentation. True advertising clauses, as seen in licenses like Apache-1.0 and BSD-4-Clause, mandate attribution in advertising materials.

The Apache-1.1 includes, according to our classification, an advertising clause. The corresponding text is:
3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear.
So the indiana extreme -license has quite identical text and therefore these both should be treated in a similar way. Apache-1.1 contains, as per general undestanding, a wider notice/advertising requirement than the Apache-2.0 (while being less than Apache-1.0).
On the other hand, it might be useful to consider moving Apache-1.1 outside of the advertising clause. It would be easier for compliance. Looking at how we describe the notice requirement in license classification versus the advertising requirement, there could be room for it already now. The gist would be that if the requirement can be fulfilled by notice reproduction (and it can be considered to be end-user documentation), then it would not be an advertising clause. Considering our current client cases, itheir notice practices would seem to fulfil the notice requirement in Apache-1.1.
This means, however, that mere reproduction of software code would not be sufficient to fufill all notice requirements. E.g. the MIT license has:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
Which does not require a separate notice, and giving the client access to the source code arguably, and as per our practice, fulfils this requirement. Now, if we mix MIT-style notice requirements with Apache-1.1 style, we will loose this distinction.
For completeness here is a pure advertising-clause (BSD-4-clause, however, this has been given up, but this is still a representative example):
all advertising materials mentioning features or use of this software display the following acknowledgement: "This product includes software developed by the University of California, Lawrence Berkeley Laboratory and its contributors.''
I wonder, should we acutually have three levels of notice requirements? Ping @sschuberth

I wonder, should we acutually have three levels of notice requirements? Ping @sschuberth

Whatever you guys deem necessary / meaningful to distinguish is fine with me. On the ORT level, it might be that we fulfill multiple of these obligations in the same way (e.g. by making source code available), but have fine-grained classifications here certainly is a good thing to be prepared for future use-cases.

The Apache-1.1 includes, according to our classification, an advertising clause. The corresponding text is: 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear.  So the indiana extreme -license has quite identical text and therefore these both should be treated in a similar way. Apache-1.1 contains, as per general undestanding, a wider notice/advertising requirement than the Apache-2.0 (while being less than Apache-1.0).

I'd say classification of Apache-1.1 and others like that could be modified then. We discussed with Martin, and while the obligations may differ somewhat (MIT-style requirement being fulfilled by distributing the source code, Apache-1.1 maybe not), best practice is to create and distribute a notice wile within the end-user documentation, which fulfills both.
So my suggestion is to have one property (include-in-notice-file), which includes all of these, and the guidance for using it is that those licenses should be, ahem... included in notice file and the file distributed.

I'd say classification of Apache-1.1 and others like that could be modified then. We discussed with Martin, and while the obligations may differ somewhat (MIT-style requirement being fulfilled by distributing the source code, Apache-1.1 maybe not), best practice is to create and distribute a notice wile within the end-user documentation, which fulfills both. So my suggestion is to have one property (include-in-notice-file), which includes all of these, and the guidance for using it is that those licenses should be, ahem... included in notice file and the file distributed.

Let's keep it simple for now, we will handle MIT and Apache-1.1 type notice requirements with the property:include-in-notice-file and we could still separate those later, if client needs arise. So this PR should be closed.


Export to an HTML file

It might be nice to be able to spit out a separate HTML file that works independently of the notebook. This would allow one to share the HTML file easily without requiring iPython/Jupyter.

Yea this would be a nice feature. We have a remote_js flag on the show_grid function which would allow you to render qgrid such that it could be rendered by nbviewer.  That's how the [demo notebook] (http://nbviewer.jupyter.org/gist/TimShawver/b4bc80d1128407c56c9a) on nbviewer works.  Let me know if you need help with that, the way to use it is not documented too well.
From my experience working on that remote_js flag I don't think supporting exporting to HTML is something we want to do.  The reason is it's a feature that would be tightly coupled with the way jupyter notebook's export to html feature works, so it's something that will break easily.  The only reason I was willing to add the nbviewer support is because the demo notebook helps to attract people to the project.

This appears to be almost functional already.  Here are the steps:

After importing qgrid and running nbinstall at the top of your notebook, add the following line to set some options:

qgrid.set_defaults(remote_js=True, show_toolbar=True)

Render a qgrid and notice the Export button above it.
Click Export to generate a version of the grid that can be rendered outside of the jupyter notebook.  You'll actually see two grids there at this point, and that's OK.
Click save to save your notebook.
Go to File, Download As, Html to download your notebook as a standalone HTML file.

The only thing that didn't work for me is the filter icons in the column headers of the grid were missing in the resulting HTML file.  The grid appeared to be totally functional other than that.

I would really like to use qgrid outside of Jupyter notebooks to save dataframes as interactive html tables.
It would be great if you had to first create a qgrid object which has methods show_grid and export.
Currently, it looks like we'd have to create another method that is very similar to save_grid just to have the grid object accessible for the grid.export() call.

I tried above steps in the hope to get this working for reveal slides (jupyter nbconvert presentation.ipynb --to slides --post serve). Unfortunately, it does not give a useful output yet: once I add more than one four columns, the table becomes garbled (in the slides, not in the notebook) with all columns of extremely small width. Also the filter icon image is broken in the slides.

Please re-open this issue until a method that works with latest qgrid works :)
qgrid.set_defaults(remote_js=True, show_toolbar=True) yields TypeError: set_defaults() got an unexpected keyword argument 'remote_js'.
I tried exporting using embed_minimal_html:
import pandas as pd
import qgrid
from ipywidgets.embed import embed_minimal_html
from IPython.display import IFrame

df = pd.read_csv(
  "https://gist.githubusercontent.com/rgbkrk/a7984a8788a73e2afb8fd4b89c8ec6de/raw/db8d1db9f878ed448c3cac3eb3c9c0dc5e80891e/2015.csv"
)
view = qgrid.show_grid(df)
embed_minimal_html('qgrid.html', views=[view], title='QGrid')

While this results in a standalone web-page (can be displayed with IFrame("qgrid.html", width=1000, height=400)), its interactivity is broken. It tries to include non-existing qgrid.js and base/js/dialog.js relative to the current directory.

Aha, just read https://github.com/quantopian/qgrid/issues/110#issuecomment-336929573 - worth including here as well:

The export button is gone in qgrid 1.0 and it's no longer possible to export a fully functional version of qgrid to static html, because in the new version of qgrid the sorting/filtering logic is done on the server. That being said, you should still be able to export a partially functional version of qgrid where sorting/filtering is broken (and only 200 rows are included) once jupyter-widgets/ipywidgets#1597 is fixed.
I realize that's probably not all that useful to people so another alternative that might be a better option is to use the new "binder" service for rendering live notebooks. I'm using it to host the demo notebook for qgrid and it's been great so far: https://beta.mybinder.org/v2/gh/quantopian/qgrid-notebooks/master?filepath=index.ipynb
I'm going to close this since I no longer plan to provide full support for static html exporting, and I think "binder" will be a suitable alternative for a lot of users.

Hi @motin
I am running a jupyter notebook and hosting it via binder.
Do you experience your server connection dropping frequently? If so how did you manage this?
Did you have any issues rendering your QgridWidget. If so do you have a suggestion for how you solved this?

will open this issue elsewhere


Renamed Quest API methods.

There have been three Quest API methods renamed to the following:

download_options => get_download_options
apply_filter_options => get_filter_options
visualize_dataset_options => get_visualization_options

The same has done in QuestWeb.

fixes #51

Pull Request Test Coverage Report for Build 166

0 of 0   changed or added relevant lines in 0 files are covered.
243 unchanged lines in 9 files lost coverage.
Overall coverage decreased (-3.8%) to 66.965%

Files with Coverage Reduction
New Missed Lines
%

/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/quest/plugins/base/service_base.py
2
55.56%

/Users/travis/miniconda/envs/test-environment/lib/python3.5/site-packages/quest/plugins/base/service_base.py
2
55.56%

/home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/quest/plugins/base/service_base.py
2
55.56%

/home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/quest/util/misc.py
7
66.33%

/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/quest/util/misc.py
7
66.33%

/Users/travis/miniconda/envs/test-environment/lib/python3.5/site-packages/quest/util/misc.py
7
66.33%

/home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/quest/plugins/base/provider_base.py
72
41.48%

/home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/quest/plugins/base/provider_base.py
72
41.24%

/Users/travis/miniconda/envs/test-environment/lib/python3.5/site-packages/quest/plugins/base/provider_base.py
72
41.48%

Totals

Change from base Build 154:
-3.8%

Covered Lines:
7178

Relevant Lines:
10719

💛  - Coveralls


Allow the Ability to Input Coordinate and Then Input Distance Calculator Parameters to Draw Circle

I currently have to enter in Distance Calculator parameters, paste in coordinates/click on the Center Point Coordinate icon, and click on the map in order to get a Circle to draw.

Hitting Enter on your keyboard creates the circle.  This should be documented.

This issue was moved to Esri/solutions-webappbuilder-widgets#738


Don't crash on reused command buffers.

Command buffers can be reused without calling vkResetCommandBuffer
(followed by vkBegin/EndCommandBuffer). In this case, the timer
slots that are baked into the command buffer, need to be invalidated,
as we could have "Submit"->"Wait"->"Submit"->"Present" (note that
we are only querying for timeslots on present, and thus can not
uniquely identify the slots anymore).
This fixes this by introducing a two staged reset of slots.
We mark slots that we will not read anymore. Further we mark
slots that were part of a vkResetCommandBuffer.
The actual slot is only reset once marked with both.
Thus for the case of a re-use command buffer, we will never reset
the slot completely (at least unless vkResetCommandBuffer is called).
To not query resubmitted slots again, we keep the command buffer state
until reset/new begin, and added an optional timestamp for the submission.
This allows us to only persist (and therefore read) a slot if
it originates from this submission.
Test: Run Tests, Capture on Trata, Infiltrator and hello_ggp
Bug: http://b/181098020.

Thanks for the review. I changed the logic, to only make use of the state and added a state machine diagram + description to the class description.


docs: add link to "adding a new ssh key to your github account"

We should add a link to how to add a new ssh key in the contributing guide, as it's come up a couple of times that people didn't know they had to do this in sprints

May I handle this issue?


BUT ... unfortunately it's the best tooling / solution we've got for now so that's that.
Anyways.

What this code is doing, is mapping React Props onto TS Objects in a way, that the "variant objects" are reusable for other components and can be defined in a single file (usually … not in this example). This enables developers to work with props again instead of classes because passing classnames makes the whole component thing useless in styling terms.
It's simple but made my life sooo much easier (I got to mention that I am a designer who codes components that frontend teams use without having to think about how they look). It's kind of a necessity for our projects that styles can be applied via props instead of classes.

So here's what's happening (feel free to ignore steps WOT and jump to commit history / code instead).

Create the base Variant type. (optional)
This is just a dumbed down version of a Record<YourPropName, string> to make things a bit easier.

type Variant<T> = { [P in T]: string };

Create the Token type that you need.
This can be literally just anything you want to map onto the string.

type ColorToken = "blue" | "red" | "black";

Crate the Variant object.
Object is used here so typescript screams at you if you forget one of the options.

const colors: Variant<ColorToken> = {
  blue: "text-blue-500",
  red: "text-red-300 font-semibold",
  black: "text-gray-700 text-sm",
};

Add the Token to the component.

interface ComponentProps {
  color?: ColorToken;
}

const FancyComponent = ({ color = "black" }) => (

Example Text

);

Use Prop like usual prop

<FancyComponent color="red" />

Limitations of this approach

There is no Tailwind class autocompletion / IntelliSense / whatever it's called.
If there is a typo in the css classes part yer fucked. From what i've seen Tailwind doesn't export a Type definition for their classnames. This could be better but for me it's a minor tradeoff.

Benefits of this approach

Variants can be reused in other components (I usually collect them in a separate variants.ts file).
If you have to add a variant you simply extend the Token type + object and your done (no need to touch the component).
Variants can be relatively complex (e.g. typography tokens can be a set of line-height, leading, weight, etc.).

I kinda got inspired to share this solution with the t3-oss crowd when I lurked in Theo's "In defence of Tailwind" twitter space today morning (for SF it's night I guess :P). I love the spirit of this community so much that I wanted to contribute something.
If you'd like to express your opinion about this, feel free to do so in whatever fashion you fancy ... I am too lazy and old for nice words, just speak your mind, I can take it. If for whatever reason this approach makes you vomit / scream, please let me know. As I mentioned I am more a designer than a programmer so the solution has great potential to just be trash - if so I'd be happy to get some feedback so I can further learn and improve.

Screenshots
No screenshot. Just code. (Explained above and in commit history).
💯

No offence but at least for me this takes away from tailwind and the concept of tailwind, you're styling with props now instead of just putting together a bunch on class names.
For a lot of people this is great, but I think there more people who just like the vanilla tailwind way, I'm one of them.

I am curious on how you @nexxeln go about implementing a  that should be available in 3 different colors (red, blue and green)?

Personally, I would probably do something like this
type Variant = "primary" | "secondary";
const Button: React.FC<{ variant: Variant }> = ({ variant }) => {
  return (
    <button
      className={clsx("px-2 py-4 border-1", {
        "bg-pink-600 hover:bg-pink-500": variant === "secondary",
        "bg-cyan-600 hover:bg-cyan-500": variant === "primary",
      })}
    ></button>
  );
};

We appreciate the work that has gone into this PR and there are definetely interesting stuff that I think some people will find interesting. However, I do think they are still in the minority and that for the majority, starting out a project with simply tailwind suffice.
You could also extend the tailwind-config to allow classnames like text-primary (that is aliasing a color in your config according to your preferred theming), card (that has a bunch of classes to represent a card) etc that are "simpler" and would also work with the native Intellisense.
Again, thank you for the work put in but for a scaffolding it's a bit too much and opinionated to include as default.


ESP32: Fix temperature-measurement app after the addition of temperat…

Problem
temperature-measurement-app for ESP32 cannot compile at ToT
This is due to the latest changes related to temeprature-measurement cluster #7026
Change overview
The APIs emberAfPluginTemperatureMeasurementServerReadEventControl and emberAfPluginTemperatureMeasurementServerReadEventHandler are removed from the above PR and hence removing them from here
Testing
Locally compiled the temperature-measurement app with CMake
Fixes #7302

Note that, this might still require adding the actual calls for temperature-measurement cluster. But, currently, we use this example for optimization of the Flash/RAM footprint and hence the build failure needs to be fixed sooner.


Reverse word in a String

Description 📜
Different approaches to reverse a string
Reverse Word in string #8512

Type of change 📝

[ ] Au#dio (Should be in mp3 format Includes speech clarity, Concise ,Low distortion)
[ ] Vi#deo (Animations, screen-recordings, presentations and regular explanatory films are all possibilties etc)
[x] Doc#umentation (Content Creation in the form of codes or tutorials)
[ ] Other (If you choose other, Please mention changes below)

Domain of Contribution 📊

[ ] Android Dev #(Flutter)
[ ] Android Dev #(Java)
[ ] Android Dev #(Kotlin)
[ ] Backend Dev #(Java)
[ ] Backend Dev #(.NET)
[ ] Backend Dev #(PHP)
[ ] Backend Dev #(Python)
[ ] C/#CPP
[x] Competitive #Programming
[ ] Cyber #Security
[ ] DS#A
[ ] Data#base
[ ] Datascience with #Python
[ ] Datascience with #R
[ ] Frontend Dev #HTML/CSS/JS
[ ] Frontend Dev #React/Angular/Vue
[ ] Go#lang
[ ] Interview #Prep
[ ] Java_#Domain
[ ] JavaScript_#Domain
[ ] ME#RN
[ ] Machine #Learning
[ ] Open #Source
[ ] Python_#Domain
[ ] Ru#st
[ ] Statis#tics
[ ] UI/#UX

Checklist ✅

[x] I follow Contributing Guidelines & Code of conduct of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I'm GWOC'21 contributor

Screenshots / Gif (Optional) 📸

@ravireddy07 please review.

Please create a PR with proper steps. Why all this commits..? @iam-sakshi
Just updating your branch will solve this issue.


Code in MainPage.xaml.cs incorrect

Code should be:
public partial class MainPage : ContentPage
{
    string _fileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "notes.txt");
    public MainPage()
    {

        InitializeComponent();

        if (!File.Exists(_fileName))
        {
            return;
        }
        editor.Text = File.ReadAllText(_fileName);

    }
    void OnSaveButtonClicked(object sender, EventArgs e)
    {
        File.WriteAllText(_fileName, editor.Text);
    }

    void OnDeleteButtonClicked(object sender, EventArgs e)
    {
        if (File.Exists(_fileName))
        {
            File.Delete(_fileName);
        }
        editor.Text = string.Empty;
    }

}

}

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

ID: 5a064123-54f2-0eb2-c76a-65b36c5ec1a7
Version Independent ID: dbf4119a-2c24-e0f1-8041-bb3755c29c24
Content: Create a single page Xamarin.Forms application - Xamarin
Content Source: docs/get-started/quickstarts/single-page.md
Product: xamarin
Technology: xamarin-forms
GitHub Login: @davidbritch
Microsoft Alias: dabritch

Hi @rjwhitlock
The change you've made adds one line of code to the existing code, without changing the logic.

Yeah I realized that just after I posted and couldn't delete it
Randy Whitlock
On Mon, Feb 24, 2020, 05:32 David Britch<EMAIL_ADDRESS>wrote:

Hi @rjwhitlock https://github.com/rjwhitlock
The change you've made adds one line of code to the existing code, without
changing the logic.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/xamarin-docs/issues/2557?email_source=notifications&email_token=AAR2FUJMYSDVKZNXTLY2YCDREOO5VA5CNFSM4KZ32LHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMXJU3Q#issuecomment-590256750,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAR2FUL27DTE6463VZTEZE3REOO5VANCNFSM4KZ32LHA
.

@rjwhitlock
No worries :)


referenceerror: launchnavigator is not defined

I am using ionic 2.1.4 and cordova 5.0.0. I am testing my app on android 5.1.
When I call navigate() method using $cordovaLaunchNavigator, it throws an error that is "referenceerror: launchnavigator is not defined"
When I was debugging, I have found this error in below code (https://github.com/driftyco/ng-cordova/blob/master/src/plugins/launchNavigator.js#L12):
angular.module('ngCordova.plugins.launchNavigator', [])
  .factory('$cordovaLaunchNavigator', ['$q', function ($q) {

    return {
      navigate: function (destination, start, options) {
        var q = $q.defer();
        launchnavigator.navigate(
          destination,
          start,
          function (){
            q.resolve();
          },
          function (error){
            q.reject(error);
          },
		  options);
        return q.promise;
      }
    };

  }]);

Could you please suggest me any idea to fix it.

@madhurigr, Are you tried to use it on real device and call for it inside $ionicPlatform.ready?


[HDRP] Shader Errors on Unity 2020.2 Beta & HDRP 10.1.0+ Versions

Describe the bug
On the beta version of Unity 2020.2 with HDRP 10.1 (and 10.2), Crest shaders gives shader error and doesn't work. It is most probably because of the HDRP 10.1 changes (for example: Removed BLEND shader keywords.). I was using Crest without any problem on Unity 2020.2.0b9 and HDRP 10.0.0.preview27 before. This is not an urgent problem of course, because these versions are still in beta =)
Logs
Shader error in 'Crest/Ocean': undeclared identifier '_BlendMode' at HDRP_Test/Library/PackageCache/com.unity.render-pipelines.high-definition@10.2.0/Runtime/Material/Material.hlsl(51) (on d3d11)

Compiling Vertex program
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
Disabled keywords: LOD_FADE_CROSSFADE INSTANCING_ON CREST_FOAM_ON CREST_CAUSTICS_ON CREST_FLOW_ON UNITY_NO_DXT5nm UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_VIRTUAL_TEXTURING UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_ASTC_NORMALMAP_ENCODING SHADER_API_GLES30

Actually, there are more shader errors (One of them is in the some Shadow shader I think), but I can't reproduce the log right now.
Versions
HDRP 10.1.0+ and Unity 2020.2.0b12 (No problem in HDRP 10.0.0.preview27 and Unity 2020.2.0b9)

Came here to report the same problem! Thank you for reporting it.
We had this problem since b10 and it's preventing us to upgrade as we are dependent on features in 2020.2 Beta.

Will be fixed for next release (4.7).

Crest 4.7 is out so I will close this. Thank you for reporting.

I'm using HDRP 10.2.0 and I get the following error after updating:
Shader error in 'Crest/Ocean': undeclared identifier '_BlendMode' at /[...]/Library/PackageCache/com.unity.render-pipelines.high-definition@10.2.0/Runtime/Material/Material.hlsl(51) (on d3d11)
Maybe it has to do with something that changed in 10.2.0, the changelog mentions this:

Removed _BLENDMODE_PRESERVE_SPECULAR_LIGHTING keyword from shaders.

I had to delete the package from the asset store cache in order to get it to import the 4.7 instead of the 4.6, I don't know if it was a bug with unity's package manager but I spent 3 hours trying to figure out why I still had the same error, so just in case it happens to someone, the asset store cache is at C:/Users/[...your user folder...]/AppData/Roaming/Unity/Asset Store-5.x

I was debugging this issue on Crest HDRP 4.7 tonight, where you said this was fixed but unfortunately I figured out how to cause the problem on this version.  I never had a previous version of Crest HDRP 4.7.   I noticed that the demo scene doesn't have the problem with the horizon line gap after reading that you said it is very hard to reproduce.   I was able to isolate that what you did to get rid of this horizon gap was to reduce Spectrum 512 to a very low value.  If you put spectrum 512 above 60%, it reintroduces the gap.   What I did to get myself in trouble was build a from scratch crest setup, and I thought that it didn't make sense for the 512 spectrum to be less then the rest of the curve, so I made it slightly more then 256, and didn't realize this caused the gap issue.   If 512 can't function properly in the range that the interface allows, maybe you should constrain its value, or automate a safe min() value at runtime.   The problem also only appears when Shape Gerstner Batch script is enable.   I don't think LOD values matter.  I copied the same LOD values as demo and it persisted with the same horizon gap line problem.   Anyway, I'm happy I was able to come up with the reason it breaks.  I hope anyone else finding this thread, will be able to fix it too.

posted in wrong place, deleted comment.


Add transactions support for removeByFind

Adds transaction support for removeByFind.

Good catch. Thank you.

@mobsense Thanks for accepting the PR. I see this change in the v2.4.0 tag and it's in pre-release status. Is there something blocking the official release?

Our process is to accumulate changes under the next release tag and let folks test them out for a while before release.  There is nothing blocking release, but nothing forcing either. We try to balance between getting fixes out quickly and having too many releases.
Can you post here if the current repo 2.4 source is working well for you. That feedback helps accelerate the release.


Update index.rst

Edited grammatical errors to make it clearer and easier to read.

Thanks you sir to your feedback. According to brainchop contribution rules, contributions are allowed to code only with new functionalities or enhancements. Please refer to the section typos in discussions board for any typos correction: https://github.com/neuroneural/brainchop/discussions/categories/typos.