Add a way to create InviteClientContext asynchronously, then send the INVITE

Is your feature request related to a problem? Please describe.
We have some code where we create an InviteClientContext then wrap it into some object that contains more information. That object will be registering some handlers against the session. The problem is that we need to instantiate this object asynchronously, but SIP.js would send the INVITE in the next tick after the InviteClientContext is instantiated.
For us, this causes a race condition, as SIP.js might try to trigger event handlers before we got a chance to register them.
Describe the solution you'd like
Any officially supported way to instantiate the InviteClientContext then trigger its invite() method later. Possible solutions are:

UA.invite() would accept a callback that returns a Promise, and calls session.invite() when the Promise is resolved. If no Promise is passed, then it invites immediately.
UA.invite() takes some option that prevents calling session.invite() so we can call it later.

Describe alternatives you've considered
Right now, our workaround is to "cut and paste" UA.invite() in such a way that we can trigger InviteServerContext.invite() at the moment we like.
Additional context
Add any other context or screenshots about the feature request here.

It does appear we have an interface deficiency with regard to the inherent race condition implicit in...
var ua = new UA(...);
var inviteClientContext = ua.invite(..); // send my INVITE
inviteClientContext.on(...); // register my handler(s)

That's undeniably "closing the stable door after the horse has bolted" (not to mention arguably  confusing for the API consumer). And it simply fails if the caller yields...
var ua = new UA(...);
var inviteClientContext = ua.invite(..); // send my INVITE
Promise.resolve().then(() => inviteClientContext.on(...)); // I yield, then register handler(s)
// At this point I may have missed events

The non-yield case only works today because of the following "implementation choice" in InviteClientContext.invite()...
// This should allow the function to return so that listeners can be set up for these events
Promise.resolve().then(() => {
  if (this.inviteWithoutSdp) {

These "stable door" and "caller yields" interface issues also exists for the other "context factory" instance methods of UA (subscribe, etc), so we have a consistency issue to be concerned with. As a bit of a side note, #583 is potentially exacerbated by doing anything async like this currently.
Anyway, for what is is worth, while I believe the solutions proposed by @nud would work, I'd thought I'd document another approach to solving the issue. We could "add a step", which in general looks something like this...
// It's perhaps worth noting that this example works with zero
// changes to the current library (0.13.x I believe, I haven't tried it,
// it is NOT officially supported/documented, and as such will likely
// break in future, so likely a mistake to mention it at all, etc etc)
var ua = new UA();
var icc = new InviteClientContext(ua, ...);
// ... async time passes ...
// ... setup handlers ...
icc.invite();

This eliminates the "stable door" and the "caller yields" API issues, but introduces an additional way to invite, subscribe, etc. Adding a step also arguably introduces a hurdle, confusion, room for error, etc
Out of Scope...
The downsides of adding a step are, I think it is safe to say, non-trivial. But that could perhaps be offset up introducing a new API (and thus I'm "out of scope"). But for giggles...
// TLDR; This is fantasy code (don't try this at home, it doesn't run).

// UserAgent
const userAgent = new UserAgent(...);
userAgent.on(...); // or userAgent.delegate = {...};

// Invite UAC
const invite = new OutgoingInviteRequest(userAgent, ...);
invite.on(...); // or invite.delegate = {...};
invite.send()
  .then((session: Session) => /* Outgoing INVITE accepted, have a new session. */ )
  .catch((failureReason) => /* Outgoing INVITE send failed, have a reason. */ );

// Invite UAS
onIncomingInvite((invite: IncomingInviteRequest) => {
  invite.on(...); // or invite.delegate = {...};
  invite.accept()
    .then((session: Session) => /* Incoming INVITE accepted, have a new session. */ )
    .catch((error) => /* Incoming INVITE accept failed, have an error */ );
};

In the new API, you can construct an Inviter and at some point in the future call Inviter.invite().


List all users that have some level of privilege assigned

STORY
As a platform admin, I would like to see a list of all privileged users (administrators, editors, other users with specific roles assigned) across all presses, so that I don't have to go-to each press's user page separately.
ACCEPTANCE

[ ] There is a privileged users page that restricted to platform admins
[ ] The page lists all users that have a platform or press level role assigned
[ ] For each user, the User ID, press, and role is displayed

Related to #201

Waiting on Sufia dashboard.


Chrome show 'NotAllowedError' because the page does not have focus.

My Environment

Windows 10
Chrome Version 67.0.3396.10 (Official Build) dev (64-bit)

issue
When I register new account, Chrome show message
http://localhost:3000 want to
 see the make and model of your security key

after click "Allow" button, chrome show error below and don't return registration response.
NotAllowedError: The operation is not allowed at this time because the page does not have focus.

This is a Chrome bug where, on Windows, the popup takes focus. The fix is already in the works.

Thanks for confirming @agl
Closing it then *)

It seems that Chrome has been fixed. It works on Chrome version 68.0.342.0 on Windows 10 :)


Subscribe ota even if disabled

Can Homie subscribe to $ota even when $implementation/ota/enabled is false? That way, Homie could send a 403 ("FORBIDDEN") if someone tried updating firmware on an OTA-disabled device.
NB. Something is wrong with my forked repo. Even though (I think) I merged your develop branch into my develop, Github still says that I'm 8 commits ahead of you. I guess that is why this PR lists all my commits from the old PR, but only shows the changes made for this PR. Strange. Can I delete my forked repo and re-fork it without causing issues to the closed PR?

No, you can refork and it won't harm the project, thanks for caring. I can still merge this PR as a single commit, don't worry. 😉


LAB_AK_07_Lab1_Ex2: Update playbook name at Task 3 step 6

Followup to #209.
Learning Path 7 - Lab 1 - Exercise 2 - Create a Playbook
Task 3: Update a Playbook in Microsoft Sentinel
Step: 6
Update playbook name at the above step to match other steps.
This step was the subject of a customer report; the change made in this commit will resolve their reported issue. Thank you for lab updates.

Thanks for the merge!


add permission for maven-jenkins-dev-plugin

permission to deploy maven-jenkins-dev-plugin

@olamy Could you send an FYI/RFC to the dev list if you haven't, so we have a record of this? Otherwise :+1:

@daniel-beck then will I be ok with all administrative paperwork? :P

@daniel-beck suspens -> crossing fingers :-)

@daniel-beck no idea why but it's not working :-(
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project maven-jenkins-dev-plugin: Failed to deploy artifacts: Could not transfer artifact org.jenkins-ci.tools:maven-jenkins-dev-plugin:jar:9.4.5.v20170502-jenkins-1 from/to maven.jenkins-ci.org (https://repo.jenkins-ci.org/releases/): Access denied to: https://repo.jenkins-ci.org/releases/org/jenkins-ci/tools/maven-jenkins-dev-plugin/9.4.5.v20170502-jenkins-1/maven-jenkins-dev-plugin-9.4.5.v20170502-jenkins-1.jar, ReasonPhrase: Forbidden. -> [Help 1]

ok I fixed manually the tag.

@olamy If you could share the full build log in gist, that would be helpful.
Perhaps even a wireshark log or similar to see exactly what failed?


add default install prefix

Description
adding and using GNUInstallDirs on Linux platform ...
GitHub Issues
... as a suggestion to close #218

Thanks!


'Duration' import from '@bufbuild/protobuf' results in a none working sdk/cli

https://github.com/livekit/node-sdks/blob/12ca25c5b0765d43dcf19ed3cba2c19e207157d9/packages/livekit-server-sdk/src/SipClient.ts#L4
When starting an Agent(js) Node, Deno and Bun fail on this import line.
1 | (function (entry, fetcher)
    ^
SyntaxError: Export named 'Duration' not found in module<EMAIL_ADDRESS>
Removing it solves the issue.
The import seems to be a mistake by the last commit, since it has no purpose afaik.

There's a PR for this I believe. The following fixed it for me in the meantime:
// .pnpmfile.cjs

module.exports = {
  hooks: {
    readPackage(pkg) {
      if (pkg.name === 'livekit-server-sdk') {
        // the problem is outlined here https://github.com/livekit/node-sdks/pull/351
        // Check if the devDependencies contains "@bufbuild/protobuf"
        if (pkg.dependencies && !pkg.dependencies['@bufbuild/protobuf']) {
          // Add it to dependencies
          pkg.dependencies['@bufbuild/protobuf'] = '^1.7.2';
        }
      }
      return pkg;
    },
  },
};


don’t flatten top level key/values

per @yumaoka — leave alone items such as {"key": "value"} at the top level

Current: {key2: "value2", key3: "value3"} turns into:
       {
       "$.key2": "value2",
       "$.key3": "value3"
    }

Make this switchable.
Note that expand() is not affected.


Support.json Get Support Ticket serviceId + ProbClassId filter changes

MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Changelog
Add a changelog entry for this PR by answering the following questions:

What's the purpose of the update?

[ ] new service onboarding
[ ] new API version
[x] update existing version for new feature
[ ] update existing version to fix swagger quality issue in s360
[ ] Other, please clarify

When are you targeting to deploy the new service/feature to public regions? Please provide the date or, if the date is not yet available, the month.
When do you expect to publish the swagger? Please provide date or, the the date is not yet available, the month.
If updating an existing version, please select the specific language SDKs and CLIs that must be refreshed after the swagger is published.

[ ] SDK of .NET (need service team to ensure code readiness)
[ ] SDK of Python
[ ] SDK of Java
[ ] SDK of Js
[ ] SDK of Go
[ ] PowerShell
[ ] CLI
[ ] Terraform
[x] No refresh required for updates in this PR

Contribution checklist:

[x] I commit to follow the Breaking Change Policy of "no breaking changes"
[x] I have reviewed the documentation for the workflow.
[x] Validation tools were run on swagger spec(s) and errors have all been fixed in this PR. How to fix?

If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist

Applicability: :warning:
If your changes encompass only the following scenarios, you should SKIP this section, as these scenarios do not require ARM review.

Change to data plane APIs
Adding new properties
All removals

Otherwise your PR may be subject to ARM review requirements. Complete the following:

[ ] Check this box if any of the following appy to the PR so that the label "ARMReview" and "WaitForARMFeedback" will be added by bot to kick off ARM API Review.  Missing to check this box in the following scenario may result in delays to the ARM manifest review and deployment.

Adding a new service
Adding new API(s)
Adding a new API version
-[ ] To review changes efficiently, ensure you are using OpenAPIHub to initialize the PR for adding a new version. More details, refer to the wiki.

[x] Ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.

[ ] If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist
If any of the following scenarios apply to the PR, request approval from the Breaking Change Review Board as defined in the Breaking Change Policy.

[ ] Removing API(s) in a stable version
[ ] Removing properties in a stable version
[ ] Removing API version(s) in a stable version
[ ] Updating API in a stable or public preview version with Breaking Change Validation errors
[ ] Updating API(s) in public preview over 1 year (refer to Retirement of Previews)

Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
Please follow the link to find more details on PR review process.

/azp run

/azp run

@devinlstoen Please address the Avocado and PrettierCheck error.

/azp run

@devinlstoen Please address the Avocado and PrettierCheck error.

Hello, I addressed the Avocado and PrettierCheck errors.

/azp run

@devinlstoen Please address the Avocado and PrettierCheck error.

Hello, I addressed the Avocado and PrettierCheck errors.

I have a question about the filter parameters. Should I include the entire
problem classification id ("/providers/Microsoft.Support/services/service_guid/problemClassifications/compute_vm_problemClassification_guid",)
and service id ("/providers/Microsoft.Support/services/vm_windows_service_guid/problemClassifications/problemClassification_guid")
in the filter request?
Or am I fine just requiring the guid? (i.e "$filter": "ProblemClassificationId eq 'compute_vm_problemClassification_guid'")

for the list operation, filter is ok.


Servers must reject {} when deserializing a union

Once we're inside of a {} JSON object, a known union variant must be
provided. Servers must not accept {} as "the union shape was not set"
when the union shape is optional (which was the behavior in smithy-rs
prior to https://github.com/smithy-lang/smithy-rs/pull/3481).
This commit adds a protocol test to pin this behavior.
Testing
I verified that the added test fails in smithy-rs when checking out a commit
prior to https://github.com/smithy-lang/smithy-rs/pull/3481
thread 'operation::server_union_with_empty_body_operation_test::rest_json_with_empty_json_object_for_union_variant_malformed_request' panicked at 'request should have been rejected, but we accepted it; we parsed operation input `UnionWithEmptyBodyOperationInput { member: None }`', rest_json_extras/rust-server-codegen/src/operation.rs:774:52

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Note that clients should reject {} too when deserializing a union in a response (instead of setting an "unknown union variant"). But there's no @httpMalformedResponseTests to pin this behavior :(


Initial Version

This is a mock PR to provide a forum for leaving feedback on the initial version of the library.

Codecov Report

:exclamation: No coverage uploaded for pull request base (initial-commit@498a4d5). Click here to learn what that means.
The diff coverage is n/a.

@@                Coverage Diff                @@
##             initial-commit       #1   +/-   ##
=================================================
  Coverage                  ?   97.38%
=================================================
  Files                     ?        8
  Lines                     ?      498
  Branches                  ?        6
=================================================
  Hits                      ?      485
  Misses                    ?        7
  Partials                  ?        6

Continue to review full report at Codecov.

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


hello_world_client can't commuicate with the hello_world_async_server_with_work_queue

hello,I used the hello_word_client to communicate with the hello_world_async_server_with_work_queue,but can't get response,the errors are:
1.C:\Users\Administrator\Desktop>hello_world_client.exe http://<IP_ADDRESS>:8000
[DEBUG C:\boost_1_55_0\boost/network/protocol/http/client/connection/async_proto
col_handler.hpp:119]: [parser:1] buffer contents: "Hello, <IP_ADDRESS>:2460:52685!"
Invalid Version Part.
2.I use the client to post a string to server .I find that the the body of request that the server recieved is empty,
what' s matter?
ps： if I use the hello_world_server it is OK.I use the vs2013+cpp-netlib 1.1+boost1.55

Interesting. What version of the library are you using? 0.11.1? I think this is a bug in the example, but I don't have time to have a look at the async example. Do you mind trying to debug that particular implementation if you have time?

Hello all
I got the same exception/crash "Invalid Version Part" when using:

netlib 0.11.1, boost 1.57, gcc5
network/example/http/ssl async_server example
simple http client get such as:

    boost::network::http::client::request request("https://localhost:8080");
    boost::network::http::client::response response = client.get(request);
    std::cout << status_message(response) << std::endl;
    std::cout << body(response) << std::endl; // expecting "Hello World"

Is it supposed to work ?
Cheers

ok, it looks like the async server has to set headers in the handler in order for the async client to work:
example:
server::response_header headers[] = { {"Connection","close"} ,{"Content-Type", "text/plain"} };
connection->set_headers(boost::make_iterator_range(headers, headers+2));
Dont know why curl is doing well whatever the server is doing: with or without setting the headers.

Yes, you need to set the headers -- otherwise cpp-netlib will not know when/how to interpret the response.
Can you send a pull request to the 0.11-devel branch @WilliamTambellini to fix this?

Same thing happened when I used the http_client to make ssl connection with ssl_server.
The Invalid Version Part went away after setting the headers in ssl_server
Something like
struct handler {
     void operator()(server::request const& req,
                          const server::connection_ptr& conn) {
      conn->set_status(server::connection::ok);
      server::response_header headers[]={{"Connection","close"},{"Content-Type","text/plain"}};
      conn->set_headers(boost::make_iterator_range(headers,headers+2));
      conn->write(std::string("Hello World!!\n"));
     }
};


add methods to get reads and writes of Access

This makes it possible to e.g. show resource and component access on hover in bevy_mod_debugdump:

bors r+


*: move vendor to binary.

Refer https://github.com/coreos/etcd/tree/master/cmd
Move vendor to binary execution.
@ngaut  @qiuyesuifeng
@coocood, can you help me check it tidb?

LGTM

LGTM

LGTM


Handle both implicit and explicit include for a single request

Hi,
Not sure if this is a feature request or a bug. Should be easy to replicate. We have a resource that we specify ?include= when we make a request. The associated records that are included also have relationships that we want to side load. We specify the include: Array<string> in the serializer however the queryParam.include overrides the settings there.
For example
GET /posts?include=comments
CommentSerializer. include = ['user']
The expectation is that the payload for the request returns both all comments related to posts and the associated users. Currently it will just return comments and not users.
As far as I understand, the JSONAPI spec does not disallow the combination like the above of both an implicit and explicit include. Especially as the queryParams.include relates to just the top level resource requested and not the associated resources, and therefore there is no explicit way of adding an include for them.
Like I said, not sure if this is a feature or a bug. We've run into this issue a few times in our production app. The work around that I have in place is to manually remove the queryParams.include in a custom serialize function override in the Serializer class. This then allows for the default behavior for an implicit include for all associated resources.
 PostSerializer extend BaseSerializer {
  include: ['comments'],

  serialize(object, request) {
    // NOTE Mirage doesn't handle both query param include and an implicit include for associated records
    delete request.queryParams.include;

    return BaseSerializer.prototype.serialize.apply(this, arguments);
  },
}

Thanks!

(Hey Jordan!)
I do think the JSON:API spec does say, if the request has an include query param that it must take precedence over any default server-side includes. And this is how Mirage behaves today.
Fortunately JSON:API also has a way to support what you're asking: dot-path includes. You just need to include all nested relationships using dot notation. Here's a REPL:
https://miragejs.com/repl/v1/152
Try loading that, then making a GET request to /posts?include=comments.user. You should see each comment's user included in the payload.
Let me know if that helps!

Hey Sam!
Thanks for the information! Here is the section you were referencing from the spec - https://jsonapi.org/format/#fetching-includes.
Makes sense and glad to hear about the dot notation for nested relationships with include. Going to close this issue.
Thanks again!


Updated advanced RAG notebook dependencies

What does this PR do?

Fixes #120.
I added dependencies installation to solve issues when running using Colab.
Who can review?
@merveenoyan and @stevhliu.

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Thanks for fixing these dependency issues! langchain-community was already added in #116 so I think we can remove that here

#116 was a PR for the Simple RAG for GitHub issues using Hugging Face Zephyr and LangChain notebook and this PR is for the Advanced RAG on Hugging Face documentation using LangChain one 😄

Ah my bad! Everything looks then and thanks again! 🙂


InputFor for FormInputType.Password repopulates the field with submitted password (unlike Html.PasswordFor) when returning the submitted model to the view back.

Quoting this stackoverflow page: http://stackoverflow.com/questions/5642849/asp-net-mvc3-html-passwordfor-does-not-populate
"This is as designed. Passwords are not filled to prevent accidental resubmits, and to prevent the page from containing unencrypted passwords. Obviously the password was wrong to begin with if you're posting back the credentials."
FluentBootstrap InputFor with InputType.Password

Razor Html.PasswordFor

The first issue that I see is that there is a password set in the model to fill the password box in the first place. Ideally, using .InputFor() would result in an empty text box in both Razor and FluentBootstrap, even with current behavior, because the model property being referenced is either null or empty. The fact that something is getting placed in the text box suggests that a password was passed to the view via the model. However, this particular issue isn't really the domain of a front-end library and is more an matter of following best practices for page generation.
That said, Razor appears to try and protect the developer from accidentally populating the password box. If you want to create a pre-populated password box in Razor, it looks like you actually need to call Html.TextboxFor() and then manually set the input type, or just use HTML directly. In other words, Razor takes the default position that a password box should be empty and the developer needs to do extra work to populate it.
FluentBootstrap takes a different default stance. Since it's intended to be a wrapper around the Bootstrap components, everything is designed to work like it would if you were writing straight Bootstrap HTML code (the exception is DisplayFor() and EditorFor() since those need to use the ASP.NET MVC template mechanism). In other words, FluentBootstrap assumes the developer knows that they're doing and doesn't try to "protect them" from mistakes. There may be good reasons why a developer wants to consciously populate a password box. If you do want to clear the password, you can set the model object to null or string.Empty before calling .EditorFor().
Does all this make sense? While my preference is to keep the current behavior since it's closer to what happens when you make a raw HTML text box with a password type, I'd be open to changing it to the Razor style of stripping password content if there's a strong desire to do so. Any other project watchers have input on this?

Ah, I see. What you said makes sense.
Although I honestly prefer the "safe" way to be the default and the "unsafe" way to be made explicit (Just to protect me from negligence from failing to strip password fields prior to returning to views and considering there's little reason to returning a pre-populated password field), I'll leave the decision up to you.
:+1:

Yeah, I started to question my stance as soon as I submitted the comment. Given that Razor does it this way, perhaps it does make sense to replicate that. Or even better, make a new PasswordFor() helper that matches the Razor behavior and leave the InputFor() as-is. Does that seem like a good compromise?

Adding PasswordFor that replicates Razor's behavior would be a godsend!
Although there might be arising questions about the differences InputFor(, FormInputType.Password) vs PasswordFor by people who are new to the library. But eh, as long as the difference is properly documented I guess it won't hurt.
:+1:

Okay, that's what I'll do then. Might take a few days find a chance, but I'll let you know when it's in the repo.

The new PasswordFor extension is in the develop branch. I hope to push it out to NuGet (along with some other changes) later today or tomorrow.


Fix the skip gram training bug

outputNeurons.value was getting set to NaN because while computing softmax, exp was getting set to Infinity.

Awesome! Thank you, @prasanna513


docs(ast): correct doc comment for StringLiteral

Correct doc comment for StringLiteral's value field. The doc comment was wrong.

#7255  👈
main

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

Join @overlookmotel and the rest of your teammates on  Graphite

Just corrects a comment, so merging without review.

Merge activity

Nov 12, 8:43 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.


removed last mention of build number

Looks fine, but any particular reason for removing it?

build number was used in the old ci but has been removed with moving to github actions
just forgot to remove that part in there


Drop git rev-parse from golangci-lint.sh

The ci-operator image appears to be ignoring its git config for safe.directory, causing git commands run during the ci-job to fail with 'dubious ownership' error. Until this issue is resolved, avoid git commands in the linter scripts.
Unfortunately, this means that the check-git-tree.sh script isn't able to check the git status. As a result, it's possible for commits with stale generated code files to be missed, where normally this check would catch such issues. Developers will need to manually run 'make ci-job' prior to posting PRs as a safety check.

/test ci-job

/test all

/test ci-job

/test ci-job

/test ci-job

/test ci-job

/test ci-job

/test ci-job

/lgtm

/override ci-prow-integration

/override ci/prow/integration

/approve


Property:culturalAffiliation

Definition
Any cultural groups affiliated (e.g., as owners or creators) with the collection

Dimension
Yes?

Existing property

Existing class

Existing property identifier

Format
Text

Required

Repeatable

Constraints
Controlled vocabulary

Examples

Notes

Would this be more for cultural collections, e.g. to represent the cultural affiliation of a group of anthropological artifacts? Or?

Would this really have a controlled vocabulary?
@mswoodburn @mtrekels

I think the example that @ekrimmel is giving is a good one. But seems to me indeed something rather limited to anthropological collections.
I would clarify in the definition what is exactly meant by 'cultural groups'. Something like 'group with shared identity that may be reasonably traced historically or prehistorically'.
@qgroom : no I don't think it should be a controlled vocabulary

Ah! I hadn't appreciated it was referring to anthropology! Yes, this does need to be made clearer.
So it means associated with the objects of the collection, such as native American artifacts.
I somehow assumed understood that this related to general organisations that might support the work of the collection, such as hobbyists who have a "cultural" link to the collection.

@qgroom : I interpreted this one similar to 'ecoRegion'. Your interpretation on the other hand is also an interesting one, something like 'collectionSponsors'? Main (financial) contributors do like to get credit for their efforts :-)

Hi,
yes, cultural collections but also economic botany collections.
Sharon
On Tue, 17 Mar 2020 at 07:30, Maarten Trekels<EMAIL_ADDRESS>wrote:

@qgroom https://github.com/qgroom : I interpreted this one similar to
'ecoRegion'. Your interpretation on the other hand is also an interesting
one, something like 'collectionSponsors'? Main (financial) contributors do
like to get credit for their efforts :-)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tdwg/cd/issues/71#issuecomment-600044484, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAFLR5I27YRTFPM6UACNEJTRH5UPZANCNFSM4JRVI2MA
.

--
Information Systems Director
+(1)<PHONE_NUMBER>
Field Museum
1400 S. Lake Shore Dr.
Chicago, IL 60605
fieldmuseum.org
orcid: https://orcid.org/0000-0002-0201-732X
Search our collections zoolog http://collections-zoology.fieldmuseum.orgy,
anthropology http://collections-anthropology.fieldmuseum.org, botany
https://collections-botany.fieldmuseum.org/
Check out the Field Revealed
http://fieldmuseum.org/explore/the-field-revealed

I've updated the definition and removed the vocab constraint in the table at the top of the thread. @ekrimmel @rondlg do you have any good examples that we can add?

IF anyone did want to use a vocab, http://www.getty.edu/vow/ULANFullDisplay?find=&role=&nation=&subjectid=500125081 might be an option

Here's a bunch of examples in use by collections in Arctos, although at the specimen level: http://arctos.database.museum/info/ctDocumentation.cfm?table=CTCULTURE

Definition idea: Any group connected to the collection, for example as owners or creators of cultural anthropology or economic botany collections.

Definition update: Any cultural group(s) that may be reasonably associated historically or prehistorically with the collection, for example as original owners or creators of cultural anthropology or economic botany collections.


Suggest installing deprecation rules as dev dependency

Hola!
Testing this package, and just noticed what I find is a somewhat bad advice :)
One probably wants to install the deprecation rules package as a dev dependency (as one does with all other phpstan libraries)

Yep! Good catch, thanks.

:+1:
What a totally awesome package btw! Sorry I did not say that first in my PR body (I usually make a point of it). :D


Revert "Upgrade to v2.0.0 of the AzureRM Terraform Provider"

Reverts pulumi/pulumi-azure#471

Looks like the test itself needs to be changed. Closing.


fix: Table of contents duplication

Types of changes

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

Description, Motivation and Context
On the docs page, the "TableOfContent" component shows the list of headings and that's ok. But on the "Input" component page there are two "Input Types" heading and that causes the problem.
Steps to reproduce

Go Theme/Palette page
Go Input page
Go Theme/Palette page and you will see "Input Types" in the content list. If you repeat this circle it will add more "Input Types"

Screenshots - Animations

Thank you so much @ibrahimtelman 🙌🏻


Support for Twilio 6.0 library

The 5.7 version of the official Twilio library will lose support in July 2017 (see https://www.twilio.com/docs/libraries/python/migration-guide). It seems the changes required would be minimal. Is it possible to transparently add support for both versions?

Sure, although dropping support for 5.7 would be fine by me as well. Any chance you could work on a PR for this?

PR is here: https://github.com/Bouke/django-two-factor-auth/pull/206

@Bouke Can you cut a new release for this?

I've just released 1.6.1 with this fix! :shipit:


fix: return underlying sasl error message

The SASL Authentication response message from Kafka has an additional field which can contain a description of why the authentication failed. Currently we drop this in Sarama and just return a generic message based on the kError code.

Added a commit to condense the default output a little which now gives:
kafka: client has run out of available brokers to talk to (Is your cluster reachable?): 3 errors occurred:
        * kafka server: SASL Authentication failed.: Authentication failed, invalid credentials
        * kafka server: SASL Authentication failed.: Authentication failed, invalid credentials
        * kafka server: SASL Authentication failed.: Authentication failed, invalid credentials


Update pyproject.toml

I updated the aiohttp version to resolve an error that occurred when installing the library in newer versions of Python.

I updated the aiohttp version to resolve an error that occurred when installing the library in newer versions of Python.

Which error occurred, and in which version of Python? Could you provide a step-by-step guide so that I can reproduce the error?

I updated the aiohttp version to resolve an error that occurred when installing the library in newer versions of Python.

Which error occurred, and in which version of Python? Could you provide a step-by-step guide so that I can reproduce the error?

yes of course!
python version: Python 3.12.1
I run the command to install the squarecloud-api library using
pip install squarecloud-api
and then I got this error:
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for aiohttp
Failed to build aiohttp
ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based projects
but when updating the aiohttp version to the latest the installation is successful.

I updated the aiohttp version to resolve an error that occurred when installing the library in newer versions of Python.

Which error occurred, and in which version of Python? Could you provide a step-by-step guide so that I can reproduce the error?

yes of course!
python version: Python 3.12.1
I run the command to install the squarecloud-api library using
pip install squarecloud-api
and then I got this error:
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for aiohttp Failed to build aiohttp ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based projects
but when updating the aiohttp version to the latest the installation is successful.

I was able to reproduce the error you mentioned by updating the version of the "aiohttp" dependency. It seems like the proposed change is valid and helps address the issue.
I will proceed with merging your pull request. If you have any further suggestions or changes, please feel free to discuss or submit new pull requests.
Once again, thank you for your valuable contribution!


Chase Cars!

It would be good to have these back! Currently the chase car mode in the tracker uploads to the wrong place:
https://github.com/projecthorus/sondehub-amateur-tracker/blob/main/js/chasecar.lib.js#L11
Presumably this should be https://api.v2.sondehub.org/amateur/listeners instead.

Can confirm that chase cars do work with the db, just added support to chasemapper :-)


Add postcss-pseudo-classes to the plugins repo

Hey there,
I wrote a port of rework-pseudo-classes with some small changes.
Given some pseudo-classes this plugin generates companion css classes that can be used for testing.
E.g.
.foo:hover {
  text-decoration: underline;
}

yields
.foo:hover,
.foo.\:hover {
  text-decoration: underline;
}

In your html then you'd use it as follow:
<button class="foo :hover">hello</button>

Closed by #60


[xerces-c] Control network dependencies

Do not find libnsl:
The package doesn't use a single header from https://packages.debian.org/bookworm/amd64/libnsl-dev/filelist.
The alternative autotools buildsystem checks for the lib with regard to gethostbyname which is usually provided by libc, and checked separately in the CMake buildsystem.
Fixes #32170.
Add a default-feature network.
Updates dependency lookup and export - Fixes android builds.

[x] Changes comply with the maintainer guide
[x] SHA512s are updated for each updated download
[x] The "supports" clause reflects platforms that may be fixed by this new version
[x] Any fixed CI baseline entries are removed from that file.
[x] Any patches that are no longer applied are deleted from the port's directory.
[x] The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
[x] Only one version is added to each modified port's versions file.

halide:x86-windows seems to be a baseline regression:
https://dev.azure.com/vcpkg/public/_build/results?buildId=91282&view=ms.vss-test-web.build-test-results-tab&runId=151214&resultId=100068&paneView=history
FTR it fails to run a tool which it builds:
FAILED: src/autoschedulers/adams2019/adams2019_cost_model.runtime.obj D:/buildtrees/halide/x86-windows-dbg/src/autoschedulers/adams2019/adams2019_cost_model.runtime.obj
cmd.exe /C "cd /D D:\buildtrees\halide\x86-windows-dbg\src\autoschedulers\adams2019 && D:\buildtrees\halide\x86-windows-dbg\bin\_Halide_gengen.exe -r adams2019_cost_model.runtime -o . -e object target=x86-32-windows,x86-32-windows"

Usage passed on x64-windows.


Automated cherry pick of #9424

Cherry pick of #9424 on release-6.3.
/cc  @mickmister
NONE

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

Trying to auto merge this PR.

Pull Request successfully merged
SHA: e2bfce46672728508332538ae1e5ec2a16b6b7ce


Update readme

[x] Clarify module purpose
[x] Explain basic steps CSS passes to get the result (this includes explanation of not a some obvious cases, and why they are correct in term of this module)

fixed in 7c96c95110b92e163dde6da9ddfc733dec0f4547


Cast ranges to lists for force and adjacency plots

This is a fix for the problem addressed in this issue: https://github.com/lightning-viz/lightning-python/issues/16
This will enable Python 3 users to use Lightning without getting errors when plotting.
The errors were due to the difference between the ways Python 2 and Python 3 handle the range built-in. Python 2 range returns an actual container of values, whereas Python 3 range returns an iterator object. By casting range to list, it forces Python 3 to create a container for the values of the range iterator, while Python 2 will behavior remains the same.

This LGTM, will merge in. Just modified the title to make it a little shorter. Thanks for the contribution @brianbreitsch !


Adding optional field to NetworkWatcherFlowLog API

ARM (Control Plane) API Specification Update Pull Request

[!TIP]
Overwhelmed by all this guidance? See the Getting help section at the bottom of this PR description.

PR review workflow diagram
Please understand this diagram before proceeding. It explains how to get your PR approved & merged.

Purpose of this PR
What's the purpose of this PR? Check the specific option that applies. This is mandatory!

[ ] New resource provider.
[ ] New API version for an existing resource provider. (If API spec is not defined in TypeSpec, the PR should have been created in adherence to OpenAPI specs PR creation guidance).
[ ] Update existing version for a new feature. (This is applicable only when you are revising a private preview API version.)
[ ] Update existing version to fix OpenAPI spec quality issues in S360.
[ ] Other, please clarify:

edit this with your clarification

Due diligence checklist
To merge this PR, you must go through the following checklist and confirm you understood
and followed the instructions by checking all the boxes:

[ ] I confirm this PR is modifying Azure Resource Manager (ARM) related specifications, and not data plane related specifications.
[ ] I have reviewed following Resource Provider guidelines, including
ARM resource provider contract and
REST guidelines (estimated time: 4 hours).
I understand this is required before I can proceed to the diagram Step 2, "ARM API changes review", for this PR.

Additional information

 Viewing API changes
For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the Generated ApiView comment added to this PR. You can use ApiView to show API versions diff.

Suppressing failures
If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
suppressions guide to get approval.

Getting help

First, please carefully read through this PR description, from top to bottom. Please fill out the Purpose of this PR and Due diligence checklist.
If you don't have permissions to remove or add labels to the PR, request write access per aka.ms/azsdk/access#request-access-to-rest-api-or-sdk-repositories
To understand what you must do next to merge this PR, see the Next Steps to Merge comment. It will appear within few minutes of submitting this PR and will continue to be up-to-date with current PR state.
For guidance on fixing this PR CI check failures, see the hyperlinks provided in given failure
and https://aka.ms/ci-fix.
For help with ARM review (PR workflow diagram Step 2), see https://aka.ms/azsdk/pr-arm-review.
If the PR CI checks appear to be stuck in queued state, please add a comment with contents /azp run.
This should result in a new comment denoting a PR validation pipeline has started and the checks should be updated after few minutes.
If the help provided by the previous points is not enough, post to https://aka.ms/azsdk/support/specreview-channel and link to this PR.

Please complete "Purpose of this PR"  and "Due diligence checklist" at the top of the PR.
This PR is changing multiple RPs' Swaggers and API-versions at once. I do not think this is expected , as the PR title is saying that it is supposed to update an optional field. Please verify and only check-in the files that are needed.


Added version argument on the CLI

Closes #15

@garethr but in https://github.com/snyk/parlay/blob/main/.goreleaser.yml#21-L24 the line is commented out.

@garethr Thanks for your guidance. I implemented change with cobra's version attribute. I have enabled command in the goreleaser to get the version. but i am not sure where does the goreleaser will get the version. i am currently researching that, it would be helpful if can share any insights you might have.

Goreleaser is opionated about versions, and then exposes that as a template variable {{.Version}} in the config. You can see the docs for this here https://goreleaser.com/customization/templates/
That's what this example uses:
https://github.com/open-policy-agent/conftest/blob/master/.goreleaser.yml#L20
ldflags are a way of passing buildtime information to be embedded in the resulting binary https://www.digitalocean.com/community/tutorials/using-ldflags-to-set-version-information-for-go-applications
The above example binds the value passed in to this variable
https://github.com/open-policy-agent/conftest/blob/master/internal/commands/default.go#L23-L25


Video Length

My source video and the driving video are the same length and frame rate but the result is significantly shorter (maybe 60% shorter) why is that and how do i fix it. - noob, first github post. Many thanks for this amazing tool.

I figured out the answer in case anyone else need to know... put the number of frames you want into the frame_load_cap node.

我找到了答案，以防其他人需要知道......将您想要的帧数放入 frame_load_cap 节点。

我找到了答案，以防其他人需要知道......将您想要的帧数放入 frame_load_cap 节点。

I encountered the same problem as you, how do I solve it?

The value in primitive can be set larger to generate a longer value.
Seconds, but the premise is that your graphics card memory must be large enough.


Add Drum Kit

This is a simple virtual drum kit project built using HTML, CSS, and JavaScript. Press corresponding keys or click on the drum pads to play different drum sounds. Enjoy creating music!

Closing this as exists #1518


aarch64 support

I am looking at aarch64 linux support for rancher-desktop, but some deps are missing, such as lima-and-qemu.
Could you add aarch64 linux support, please?

The biggest hurdle right now is that Github does not support ARM64 runners (unless you host them yourself).
This has been a request to Github for years, and previously was closed because Azure didn't have ARM64 machines. Now they do, and the current issue asking for ARM64 was locked by Github, probably because they don't want to hear people asking for it over and over: https://github.com/actions/runner-images/issues/5631.
So I don't know what is happening; I still hope that they will offer this at some time.
I believe that this is the first time anyone asked for Rancher Desktop for Linux on ARM64, so the priority for us is low given that the effort to get hardware and install and maintain it somewhere as a self-hosted runner is somewhat high.


[Windows] Remove border, setAsFrameless: Enable reset to TitleBarStyle, remove resizing jitter

Enables resetting window style to TitleBarStyle.normal/hidden from setAsFrameless(). Fixes #68
Removes crazy jittering when resizing window
Remove default window border, so it's possible to implement custom border.

Not working correctly yet, I think I forgot to add something.

I've forgotten whatever I did to remove the window border, not saved either. Might revert if I still forget.

Should I still review it?

Sure.


Sphinx documentation

Hello,
I don't know much about Blackjax but thought I could help setup a sphinx doc seing https://github.com/blackjax-devs/blackjax/issues/154
Build with e.g. sphinx-build -b html docs docs/_build/html and then open docs/_build/html/index.html
Current problems:

The modules structure is a bit large, so I only documented part of it for now (see docs/api.rst).
NamedTuple: the parameters are thrice in the documentation: once as properties, once as parameters, and once for type hints
References don't work
The HierarchicalBNN notebook contains base64-encoded images that don't play well with myst-nb. I thus removed it from the doc for now, but it is still parsed so it slows the process down.
The use_with_pymc3 notebook has incorrect header sections, so it messes with the notebook stuff
The Github README is included but with the name Blackjax, so it is not very explicit

Wow that's amazing! Is there any chance you could add a github workflow to build the doc automatically whenever something is pushed on main? There should be a recipe already in https://github.com/rlouf/mcx

I see you are using myst-nb to include notebooks in the documentation. Is there anyway we could do the same for notebooks in a jupytext format?
I eventually want to get rid of .ipynb files in the the repo but want to keep a rendered version of the example notebooks somewhere.

I see you are using myst-nb to include notebooks in the documentation. Is there anyway we could do the same for notebooks in a jupytext format?
I eventually want to get rid of .ipynb files in the the repo but want to keep a rendered version of the example notebooks somewhere.

I see you are using myst-nb to include notebooks in the documentation. Is there anyway we could do the same for notebooks in a jupytext format?
I eventually want to get rid of .ipynb files in the the repo but want to keep a rendered version of the example notebooks somewhere.

I think it is possible given https://myst-nb.readthedocs.io/en/latest/examples/custom-formats.html#using-jupytext
However in jupytext format there is no output so they will need to be run every time the documentation is generated, which I guess is not very convenient if you need to run them on beefy machines or if the execution time is large. Is it the case ?
There are some options to do caching of this stuff, but I guess it would be hard to share the cache across machines : https://myst-nb.readthedocs.io/en/latest/use/execute.html#triggering-notebook-execution
It seems that JAX is doing this, but it adds a layer of complexity to the process https://jax.readthedocs.io/en/latest/developer.html#update-documentation

I see you are using myst-nb to include notebooks in the documentation. Is there anyway we could do the same for notebooks in a jupytext format?
I eventually want to get rid of .ipynb files in the the repo but want to keep a rendered version of the example notebooks somewhere.

I think it is possible given https://myst-nb.readthedocs.io/en/latest/examples/custom-formats.html#using-jupytext
However in jupytext format there is no output so they will need to be run every time the documentation is generated, which I guess is not very convenient if you need to run them on beefy machines or if the execution time is large. Is it the case ?
There are some options to do caching of this stuff, but I guess it would be hard to share the cache across machines : https://myst-nb.readthedocs.io/en/latest/use/execute.html#triggering-notebook-execution
It seems that JAX is doing this, but it adds a layer of complexity to the process https://jax.readthedocs.io/en/latest/developer.html#update-documentation

It does add a layer of complexity, but having .ipynb in the repo is already hard to manage collaboration-wise. I suggest we do it in another PR as this is a separate concern. I was just curious.

It does add a layer of complexity, but having .ipynb in the repo is already hard to manage collaboration-wise. I suggest we do it in another PR as this is a separate concern. I was just curious.

@horaceg I finally had time to look at your PR in details. This looks great for a first pass! Since I am a bit more familiar woth BlackJAX I'll take it from there for the content of the API reference and the front page. I'll have a look at the outstanding issues as well. Thank you for your help.

It is not perfect but it is already a net improvement to the library, so merging. Thank you again for your help.

Just a quick note to say that I've played with the documentation recently, and MyST-NB was a very good pick. Thank you again!


The 'Voice Assistant supported regions' link is not helpful

Please provide us with the following information:

This issue is for a: (mark with an x)
- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [X] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

On page
https://github.com/Azure-Samples/Cognitive-Services-Voice-Assistant/tree/master/clients
it says
"The Azure region of your speech subscription. Limited to the Voice Assistant supported regions. "
which links to
https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started
That page has no relevant information.

Thanks! We'll be in touch soon.

This is the useful link
https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/regions#voice-assistants


possibly a fix for inkscape 1.2.x

also, a weird edge-case was patched for borderless circles
I might need to run this version on a couple of inkscape versions
the second commit contains a few refactors, but you can also choose not to include it if you want

@liam-o-marsh does it work for you right now?

Weird... 2W ago I tried with Inkscape 1.3 (0e150ed, 2023-07-21) and got weird errors, now they're gone.
Is this fix supposed to be compatible with 1.0.x?

Finally found that for me even the old version breaks when the bubbles are of the same size, even though it's supposed to treat this case separately

that's weird, it works on my side... both with the exact same size and with an epsilon difference.
do you have a file and inkscape version that actually causes this bug?

Haven't saved it then because I was in a hurry and now can't reproduce the bug! It happened with the second circle being a copy of the first one (probably in some specific circumstances)...


[BUG] Incorrect reason when point in time creation fails with 'allow_partial_pit_creation' param

Describe the bug
The response reason is incorrect when a point in time creation fails when allow_partial_pit_creation is set to false.
To Reproduce
Steps to reproduce the behavior:

Try to create a PIT on a index which has unassigned shards with allow_partial_pit_creation param set to false.
The reponse will be of this type:

{
 "error": {
 "root_cause": [],
 "type": "search_phase_execution_exception",
 "reason": "",
 "phase": "create_pit",
 "grouped": *true*,
 "failed_shards": [],
 "caused_by": {
 "type": "search_phase_execution_exception",
 "reason": "Search rejected due to missing shards [[my-index-1][0]]. Consider using `allow_partial_search_results` setting to bypass this error.",
 "phase": "create_pit",
 "grouped": *true*,
 "failed_shards": []
 }
 },
 "status": 503
}

Expected behavior
The reason should have stated the allow_partial_pit_creation setting instead of allow_partial_search_results flag.
Plugins
N/A
Screenshots
N/A
Host/Environment (please complete the following information):
Opensearch version: 2.5
machine: Mac OS
Additional context
Add any other context about the problem here.

Hi @Arpit-Bandejiya, are you actively working on this? can I assign it to you?


Add Security

Description
I would like to propose adding security features to this project to ensure the protection of sensitive data and secure user interactions. Currently I see 2 enhancements :

Authentication with a registration feature and more.
Integrating a dependency check using OWASP dependency-check  (avaiable for Maven and Gradle).

Authentication:
Probably a form based authentication: Implement a form login mechanism to provide a user-friendly authentication process for accessing the application, this includes creating the forms, validation, and session management.
Define admin user and authorities (read, create, update ..) then protect endpoints and/or resources.
👉 This may lead to more features later..
Use OWASP dependency-check plugin
Integrate a security check using OWASP Deps Check Plugin to scan project dependencies for known security vulnerabilities.
Configure the plugin to run as part of the build process and generate reports or notifications when vulnerabilities are detected.
Benefits

Protection of sensitive data and resources.
Early detection of security vulnerabilities in project dependencies.
Help community understand security measures, patterns and paradigms in simple ways.

I believe that adding such features will serve as valuable learning opportunities for Spring community. Also, contributors will gain hands-on experience in implementing user authentication and integrating security checks into a real-world application.

The benefits are clear. The costs are the extra effort to understand, maintain, and interact with the project. My judgement at this time is that the costs outweigh the benefits. There has always been some tension with the temptation to add every possible feature to this one tiny project, just to show the possibilities. It used to be a lot more complex, and a few things were taken out to make it easier to get on board. I think we have a good balance right now..
The Spring Petclinic organization is an open source community that might be interested in accepting contributions of this sort: https://github.com/spring-petclinic. Some of the existing projects there already have security features.


Copy of file using Drive

Is it possible to use the Drive (File System) in a copying a file outside of the app directory?
The scenario is I uploaded a file then put it in the public folder.
I want to create a copy of that file and put it outside the app directory.
Is that possible?
Thanks.

Something to be discussed on the forum or discord server


sliders of Color Picker behave wrong in RAW mode

there is a button named raw mode in color picker,
when turned on, rgb become from 0 to 1 but not from 0 to 255.
bug1: the slider still has the range of 0~255. it should be 0~1 then
bug2: alpha is not affected, at least in preview, e.g. 128 is still half opaque

This is not a bug, RAW mode allows to multiply the value for over 1, increasing the gamma of the sprite in the given colors, try putting the value in 2,2,2 to know what i mean

@MarianoGnu I was talking about the UI element

0 to 255 is the value of Color8(), 0 to 1 is used in the Color() constructor, and colors avobe 1 are used for HDR.
if i set both default values form 0 to 255 it will be confusing, because it's using two coloration scales according to the mode...

@MarianoGnu I was talking about the sliders, not Color8 or something.
The slider controlling alpha in Color Picker has range of 0~255 whether RAW mode is turned on.

Ah, right, that's not correct.

This is actually strange, the code seems to be very explicit that it has to happen to alpha
https://github.com/godotengine/godot/blob/master/scene/gui/color_picker.cpp#L143
https://github.com/godotengine/godot/blob/master/scene/gui/color_picker.cpp#L174

@djrm right above, outside the condition, it set max to 255, I believe this is what this issue is about. The slider goes to 255 even in raw mode.

what i was trying to say, is that maybe is there for a reason (i dont know). Also i noted that the color picker is very broken, but im fixing it.

so theres is no bug here the sliders goes from 0 to 255 even though the internal values are from 0 to 1, the thing with Raw mode is that you should be able to increase the R,G,B components past the 1 value, even if that means that they are really 255, so in this case the get_color function will return a color that looks like a Color8, even though its not a Color8, alpha slider max value cant be set to 1 because that would be an inconsistent behavior (because as explained before value in non raw mode are from 0 - 255 even though the internal representation is from 0 to 1)

What's the status on this one guys, is #5511 good to merge, and if not, what should be changed?


improve orphan tx hash calculation

currently we use keccak256([...hexToU8a(blockHash), ...nToU8a(index)]); , however,@polkadot/api slightly changed how nToU8a works, which broke the hash after upgrading to @polkadot/api@9
I think we can just use keccak256(blockHash + index) which removes dependency for nToU8a, and the result is still deterministic & unique
a reproduce can be found here

maybe just move out the hash calculation part to bodhi, so it will never change


Testnet release: CLI tools for Hypha and exchanges

:tada: This issue has been resolved in version 0.25.0-rc.1 :tada:
The release is available on:

npm package (@testnet dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This issue has been resolved in version 0.25.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


400 HTTP error when deleting google instance

Trying to delete google instance via googleAPI - the code which worked for me for the last year.
Now I receive the following error while trying to execute the compute.instances().delete().execute():
   File "/home/ilya/.local/lib/python2.7/site-packages/googleapiclient/http.py", line 844, in execute     raise HttpError(resp, content, uri=self.uri) googleapiclient.errors.HttpError: <HttpError 400 when requesting https://www.googleapis.com/compute/v1/projects/***?alt=json returned "The resource '*** is not ready">

Hi @akaars, this does not appear to be an issue with this client library. I would recommend asking your question on Stackoverflow. The people who look after this repo do not typically have deep insights into server behavior.

You're absolutely right, my mistake, sorry for the disturbance.
The library behaves 100% as expected.


Choppy Infinite scrolling over table elements in Chrome

When using the demos(and in my own code) I experience choppy, momentum-less infinite scrolling. I've noticed if I scroll with my cursor over the data table it's choppy, but if I hold my cursor over the scrollbar it scrolls normally. Firefox scrolls normally in all cases.
I'm still looking for a workaround, only thing that works for me so far is to set pointer-events to none on the td elements, but this is not a real solution of course. Anyone else experience this or have any insight?
OSX Chrome Version 43.0.2357.124 (64-bit)

I'm able to workaround this issue by setting transform: translate3d(0px,0px,0); on the div containing the table with the style below, it doesn't run as well as FF but 95% there.
.griddle-body > div > div {
  transform: translate3d(0px,0px,0);
}

:+1: Same thing goes for me, it fells choppy.

Chrome works fine for me on my mac, however I have this issue when using safari. @astrism: the css you suggested does not work for me.

Hmm I wonder if we're somehow re-rendering on mouseover. I'll ping this thread when we have the 1.0alpha examples online -- I would like to make sure we don't have any known performance bottlenecks for the 1.0 actual release. Thanks!

No, that is not the case from what I can see. I think for some reason just modifying the dom elements is all it take to interrupt the scrolling in some browsers.
Here are the browsers that scroll just fine for me:
Chrome Version 49.0.2614.0 canary (64-bit) Mac & Windows
Chrome Version 47.0.2526.106 (64-bit) Mac & Windows
Chrome for Android
Microsoft Edge 20.10240 (yuck!)
Internet Explorer 11 (double yuck!)

Now I am not so sure about my last comment. I just noticed that positioning the cursor directly over the scrollbar in safari allows for smooth scrolling. :confused:

I'm having the same issue...
@astrism's css did help. The issue seems to be caused by updating the existing rows instead of adding rows? Is there any way to turn this off?
I'm on version 0.4.1 installed via npm. (thanks for the lib btw it's great)

Sorry -- I realize this is from some time ago but this should no longer be an issue in Griddle 1.0 with the virtual scrolling plugin. Closing for now but please feel free to open an issue if any problems are encountered. 👍


row- column wise dragging  and column sifting like trello

Your Demo Project is awesome,  i am using that
but how can i drag and drop cart in same column as well as other ??
also not working column sifting

I have the same problem

@dajdouj10  i found another library please check it https://github.com/KalpeshTalkar/DragDropBoard

i like SCTrelloNavigation :(


Simple Exome Alignment + QC

A new basic workflow for generic, non-human exome alignment and qc.

This is replaced by #713


unread_ops: Don't mark all msgs as read when msg_list is rendering.

It is possible to mark messages not seen by the user as read if
msg_list.data was populated with the messages, but they are not
rendered yet and user hit the bottom of the msg_list.
We fix this by not marking all messages as read when more messages
are being appended to the message list.
Discussion: https://chat.zulip.org/#narrow/stream/137-feedback/topic/scrolling.20to.20the.20reload.20point.20causes.20mark-all-as-read
How to reproduce: This is hard to reproduce. The only way I was able to reproduce this was on 5k unread message with network throttled to fast 3g. Just keep scrolling after pressing G until messages that are rendered after the selected message are already read. The bug happens just before the last batch of unread messages are rendered.
We cannot rely on fetch status here too, since fetch status is synchronous to the data and not with what is rendered.

Cool, this is looking like an algorithm that might be correct; this has turned out to be quite tricky! One thing I'm not sure about, though, is how this interacts with messages outside the render_window; I think this algorithm will mark them as read, but the user won't have scrolled past them yet.
I'm not sure exactly how to test the race I have in mind, but the main logic around this is in maybe_rerender. Let me post on the chat.zulip.org thread.

If behaviour in  https://chat.zulip.org/#narrow/stream/137-feedback/topic/scrolling.20to.20the.20reload.20point.20causes.20mark-all-as-read get reported again then we should look into this PR again, otherwise #22452 currently stands to fix the issue.

Hmm, I'm not sure I expect #22452 to fix this issue. I don't think the race is fixed?

Seems like I confused two different issues here. Reopened the PR. :)


Add support for sorting districts

Is your feature request related to a problem? Please describe.
Would be really helpful if we add sorting to districts table like how we have for the states table

@jeremyphilemon: we can close this issue.


TypeError: unsupported operand type(s) for -: 'str' and 'int' from oobabooga.py

Description
When I have my provider set too oobabooga I try to run a task agent on any task it errors out on the tokens being both a str and int.  I could be doing something wrong but I haven't been able to get past the error. I have done a recent git pull and docker compose up -build. This is very similar behavior to what is listed in bug #251
Error message:
agent-llm-backend-1   | Executing task 1: Develop a task list.
agent-llm-backend-1   |
agent-llm-backend-1   | INFO:     <IP_ADDRESS>:51576 - "GET /api/agent/brand_new/task/status HTTP/1.1" 200 OK
agent-llm-backend-1   | Exception in thread Thread-5 (run_task):
agent-llm-backend-1   | Traceback (most recent call last):
agent-llm-backend-1   |   File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
agent-llm-backend-1   |     self.run()
agent-llm-backend-1   |   File "/usr/local/lib/python3.10/threading.py", line 953, in run
agent-llm-backend-1   |     self._target(*self._args, **self._kwargs)
agent-llm-backend-1   |   File "/app/AgentLLM.py", line 373, in run_task
agent-llm-backend-1   |     result = self.run(task=task["task_name"], prompt="execute")
agent-llm-backend-1   |   File "/app/AgentLLM.py", line 165, in run
agent-llm-backend-1   |     self.response = self.CFG.instruct(formatted_prompt, tokens=tokens)
agent-llm-backend-1   |   File "/app/provider/oobabooga.py", line 22, in instruct
agent-llm-backend-1   |     new_tokens = self.MAX_TOKENS - tokens
agent-llm-backend-1   | TypeError: unsupported operand type(s) for -: 'str' and 'int'
Steps to Reproduce the Bug

git pull
docker compose up -build
navigate to localhost:3000 in web browser
make a new user
set provider to oobabooga
set uri, context length, temp, model (any vicuna, default)
enter task for agent "write me a short story"
click start pursuing task
nothing happens

Expected Behavior
To start trying to complete the task the agent is given with the local install of oogabooga text generation.
Actual Behavior
If you start docker without -d you can see the backend fail with the above error.
Additional Context / Screenshots
No response
Operating System

[ ] Microsoft Windows
[ ] Apple MacOS
[X] Linux
[ ] Android
[ ] iOS
[ ] Other

Python Version

[ ] Python <= 3.9
[ ] Python 3.10
[ ] Python 3.11

Environment Type - Connection

[X] Local
[ ] Remote

Environment Type - Container

[X] Using Docker
[ ] Not Using Docker

Acknowledgements

[X] My issue title is concise, descriptive, and in title casing.
[X] I have searched the existing issues to make sure this bug has not been reported yet.
[X] I am using the latest version of Agent-LLM.
[X] I have provided enough information for the maintainers to reproduce and diagnose the issue.

You could try modifying that line
new_tokens = self.MAX_TOKENS - tokens
like so
new_tokens = int(self.MAX_TOKENS) - tokens
For me it resolved the problem.

But I see in v1.1.14-beta it was modified, so try this version.

This is an issue in the agent config, not for the provider.
If you go in to the agent config manually, (data folder, agent name, config) and edit the end of the line to change "2048" (or whatever you have it set to) to 2048 without the "" it will resolve the issue for now. I have not looked where the agent config is getting saved  in code yet but it will need to be fixed in there to resolve this.

Thanks a bunch, now I'm back to my original error with connecting to the api of textgen.  Probably another issue with the new json format? I dunno when I enter the normal url http://<IP_ADDRESS>:5000 it hits nothing.  I have tested to see if something else is wrong with textgen's api but it seems good.  There are some formatting errors it pushes out if I do anything other than http://<IP_ADDRESS>:5000 eg. it will add extra api like http://<IP_ADDRESS>:5000/api/api/v1/generate if you use http://<IP_ADDRESS>:5000/api or if you leave the slash at the back end it shows http://<IP_ADDRESS>:5000//api/v1/generate. Anyway back to the error I was experiencing before the str-int confilct.  That was definitely the fix Electorfried. Here is a sample of the next error.  I'll give it a bit and make a new bug report if it persists but I understand this is a very active project.
agent-llm-backend-1   | During handling of the above exception, another exception occurred:
agent-llm-backend-1   |
agent-llm-backend-1   | Traceback (most recent call last):
agent-llm-backend-1   |   File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
agent-llm-backend-1   |     self.run()
agent-llm-backend-1   |   File "/usr/local/lib/python3.10/threading.py", line 953, in run
agent-llm-backend-1   |     self._target(*self._args, **self._kwargs)
agent-llm-backend-1   |   File "/app/AgentLLM.py", line 373, in run_task
agent-llm-backend-1   |     result = self.run(task=task["task_name"], prompt="execute")
agent-llm-backend-1   |   File "/app/AgentLLM.py", line 165, in run
agent-llm-backend-1   |     self.response = self.CFG.instruct(formatted_prompt, tokens=tokens)
agent-llm-backend-1   |   File "/app/provider/oobabooga.py", line 45, in instruct
agent-llm-backend-1   |     response = requests.post(f"{self.AI_PROVIDER_URI}/api/v1/generate", json=params)
agent-llm-backend-1   |   File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
agent-llm-backend-1   |     return request("post", url, data=data, json=json, **kwargs)
agent-llm-backend-1   |   File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
agent-llm-backend-1   |     return session.request(method=method, url=url, **kwargs)
agent-llm-backend-1   |   File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
agent-llm-backend-1   |     resp = self.send(prep, **send_kwargs)
agent-llm-backend-1   |   File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
agent-llm-backend-1   |     r = adapter.send(request, **kwargs)
agent-llm-backend-1   |   File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 519, in send
agent-llm-backend-1   |     raise ConnectionError(e, request=request)
agent-llm-backend-1   | requests.exceptions.ConnectionError: HTTPConnectionPool(host='<IP_ADDRESS>', port=5000): Max retries exceeded with url: /api/v1/generate (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fa4c14bf160>: Failed to establish a new connection: [Errno 111] Connection refused'))

Should be fixed in #273


Effector website theme is not properly set

What is the current behavior:
When I change theme to non-system mode (i.e. i have "Dark" in my system, but I toggled it to "Light"), and reopen website, it flashes from "Light" to "Dark", but when I click on other pages it goes "Light" again
Please provide the steps to reproduce and if possible a minimal demo of the problem via https://effector.now.sh/try, https://codesandbox.io or similar

Open website on macOS
Change theme to non-system (e.g. if you have set "Dark" in your system, set it to "Light") in theme website
Reopen website and go to other pages

What is the expected behavior:
When I toggle it to be "Light", it should stay "Light" without any temporary changes "Dark"
Which versions of Effector packages, and which browser and OS are affected by this issue? Did this work in previous versions of Effector?:
macOS 10.14.4
latest version of website

We've had to add an odd hack for dynamic system theme changes because docusaurus doesn't manage it properly.
I found a way to detect and save manual theme changes, it should help. Feel free to open new issue or mention me here if it doesn't.


Fix issue 48 : Fixed Favorite Icon and Home Icon

Issue fixed :

[✔ ] file formatted
[✔ ] fixed favorite icon
[ ✔] fixed home icon

Hi @lcrojano , just a friendly reminder to take a look at this pull request when you have a moment.


Add critical section API

It didn't seem worth adding tests for a trivial define like this. Let me know if you'd like me to add something.

Merged, thank you.


Rendering issues with output

See https://github.com/GoogleChromeLabs/jsvu/blob/be49b12f5393cb2681a4cdac73ad48d9245f3dac/README.md#jsvu- — any idea what’s going wrong here?
The relevant commit is https://github.com/GoogleChromeLabs/jsvu/commit/be49b12f5393cb2681a4cdac73ad48d9245f3dac and the command used to create the SVG is:
svg-term --cast=rfS1M5ynKm1hGaBqJYJj0mGCi --frame --at=43250 --out=screenshot.svg

Looking at the svg file I can't see any issues. The file is delivered with a wrong Content-Type header, though:
Server: GitHub.com
Content-Type: text/html; charset=utf-8
Location: https://raw.githubusercontent.com/GoogleChromeLabs/jsvu/be49b12f5393cb2681a4cdac73ad48d9245f3dac/screenshot.svg?sanitize=true
X-Runtime: 0.056509

I created a PR on jsvu adressing this by using rawgit.com:
https://github.com/marionebl/jsvu/blob/32353c45a135526bd81b3dce31a5426ab77648c7/README.md

It’s not just the Content-Type header. The ?sanitize=true part of GitHub’s auto-generated URL hints that it sanitizes the SVG, stripping font styles, among others. Compare:

https://raw.githubusercontent.com/GoogleChromeLabs/jsvu/master/screenshot.svg
https://raw.githubusercontent.com/GoogleChromeLabs/jsvu/master/screenshot.svg?sanitize=true

It’s a little silly that GitHub forces sanitization in this case, as <img src=svg> has no security issues. +cc @mastahyeti


PetriNet Stochastic Simulation Refactor

This PR does a few things:

PetriNet rewriting could take place in an MarkedLabelledPetriNet or a discrete C-Set (which does not carry around the Petri net structure everywhere - it's effectively a vector of integers). This latter option is now a possibility when you pass in a PetriNet or a LabelledPetriNet, rather than a MarkedLabelledPetriNet. The old way of doing things sirout = run_spn(statepn::MarkedLabelledPetriNet, clockdists) still works.

The file structure has been refactored to be more project-like, separating src from examples

The generation of ClockSystem is decoupled from the running of the clocksystem, so one can in principle run other systems than PetriNet simulations

Sorry that the simultaneous file structure refactor makes the diff with the old code harder!

Thanks @kris-brown! It's nice to see the token game on the discrete PN at the end of the sirs.jl example, that's actually nicely similar to the approach proposed in https://www.sciencedirect.com/science/article/pii/S1571066105801811


Disable file without hide it

Is there a way to make a file not writable  but not hide it from the user ? Rignt now i have hidden the files
   <SandpackProvider template="react" customSetup={{
                files: {
                  "/App.js": Appcode,
                  "/App.test.js": {
                    code: testAppCode,
                    hidden: true
                  },
                  "index.js": indexFile,
                  "SetupTest.js": {
                    code: code,
                    hidden: true
                  }
                },
....

Hey @gdimitropoulos, as far as I understood you would like to turn a file read-only for the user?
If so, currently we don't support that, but let me know more about yours needs and then we can consider it
Thanks

Yes that was my plan  just  read-only view of the  file


Breach Protocol Autosolve Bug

Describe the bug
Hello, I've been using this mod for quite a while and it worked mostly fine. However, recently I started encountering issues with the automated process. Running analyse or auto solve tells me that an error has occured while trying to gather data.
When I attempted to recalibrate, the software is able to see all the numbers correctly but still is unable to solve.
I have tried:

Running as admin
Checking my display setting (Ensure autobreacher is looking at the right screen)
Recalibrating grid threshold
Switching on and off various settings such as Extended daemons and type range ON/OFF or Automated Grid Threshold ON/OFF etc
Using different cyberdecks

To Reproduce

Have main mission "Disasterpiece" be active
Go to the terminal outside of the old power plant in Charter Hill. A netrunner can be seen sitting in front of the television with the terminal on it's right
Attempt to jack into the terminal
Use autobreacher
Error will proc

Expected behavior
Autobreacher was expected to solve breach protocol.
Software information

Operating System:
Cyberpunk 2077 platform: Native, V2.11
BPA version: 2.12.0
relevant BPA settings:
Filter OCR results ON
Automated grid threshold OFF(170)
Automatic daemons threshold ON
Automatic types threshold ON
Used fixed buffer size ON
Fixed Buffer Size 20
Extended daemons and type range ON

Additional files

bpa-snapshot-1ca78172-410e-4f49-b766-08d95beaec2e.zip

@Arbiter1479  Please try to set fixed threshold for daemons. 140 works for me.


Cleveland Public Library

Source API Endpoint / Documentation
Collections are hosted in ContentDM, a digital image management platform administered by OCLC.
Public interface to the collections is here:
https://cdm16014.contentdm.oclc.org/digital/
Provider description
Cleveland Public Library Digital Gallery (https://cdm16014.contentdm.oclc.org/digital/) houses 30 collections of objects, of varied formats and licenses.
Licenses Provided
Searching the "Rights" and "Rights License" fields for "CC" should return only those objects that are CC-licensed. As to which licenses are in use, we do not have an exhaustive list.
Provider API Technical info
Checklist to complete before beginning development
Please do not modify this section. No development should be done on a Provider API Script until the following info is gathered:

[ ]  Verify there is a way to retrieve the entire relevant portion of the provider's collection in a systematic way via their API.
[ ]  Verify the API provides license info (license type and version; license URL provides both, and is preferred)
[ ]  Verify the API provides stable direct links to individual works.
[ ]  Verify the API provides a stable landing page URL to individual works.
[ ]  Note other info the API provides, such as thumbnails, dimensions, attribution info (required if non-CC0 licenses will be kept), title, description, other meta data, tags, etc.
[ ] Attach example responses to API queries that have the relevant info.

General Recommendations for implementation
To create the script, run just add-provider cleveland_public_library endpoint (replace endpoint with this provider's API endpoint). This will create the script that is based on the ProviderDataIngester class, and test files. Follow the instructions in the comments to complete the script.

If the provider API has can be queried by 'upload date' or something similar, the script should take a --date parameter when run as a script, giving the date for which we should collect images. The form should be YYYY-MM-DD (so, the script can be run via python my_favorite_provider.py --date 2018-01-01).
The script must conform to PEP8. Please use just lint before committing.
The test suite for the script may break PEP8 rules regarding long lines where appropriate (e.g., long strings for testing).

Examples of other Provider API Scripts
For example Provider API Scripts and accompanying test suites, please see

catalog/dags/providers/provider_api_scripts/flickr.py and
catalog/dags/providers/provider_api_scripts/test_flickr.py, or
catalog/dags/providers/provider_api_scripts/wikimedia_commons.py and
catalog/dags/providers/provider_api_scripts/test_wikimedia_commons.py.

Issue migration
This issue has been migrated from the CC Search Catalog repository
Author: janetpkr
Date: Tue Apr 09 2019
Labels: providers,✨ goal: improvement,❓ talk: question,🙅 status: discontinued

see relevant email thread

Original Comments:
Issue author sclachar commented on Mon Aug 05 2019:

@kgodey shouldn't this be in the backlog since we have been waiting for a response?

annatuma commented on Mon Feb 24 2020:

Provider API Endpoint / Documentation

Collections are hosted in ContentDM, a digital image management platform administered by OCLC.
Public interface to the collections is here:
https://cdm16014.contentdm.oclc.org/digital/
For metadata and interacting with the back end, two options.
Option 1, OAI
Link to OAI repository is here: http://cdm16014.contentdm.oclc.org/oai/oai.php
OAI specification document is here: https://www.openarchives.org/OAI/openarchivesprotocol.html
We can use OAI to download all metadata.
Option 2: ContentDM's API (preferred)
Here is the key to formatting an API request:
https://help.oclc.org/Metadata_Services/CONTENTdm/Advanced_website_customization/API_Reference/CONTENTdm_API
On this page, note that OCLC is playing around with IIIF access to images, too.
Here is the API reference:
https://www.oclc.org/support/services/contentdm/help/customizing-website-help/other-customizations/contentdm-api-reference.en.html
CPL is structuring metadata for Digital Public Library of America at the moment, so it may be useful to reference DPLA documentation as well, and to see what the status of this metadata structuring is. DPLA is working towards using linked data for some of the rights statements that they require.
Provider description

Cleveland Public Library Digital Gallery (https://cdm16014.contentdm.oclc.org/digital/) houses 30 collections of objects, of varied formats and licenses.
Licenses Provided

Searching the "Rights" and "Rights License" fields for "CC" should return only those objects that are CC-licensed. As to which licenses are in use, we do not have an exhaustive list.
SECTIONS BELOW THIS POINT NEED TO BE WORKED ON PRIOR TO INTEGRATION
Provider API Technical info

General Recommendations for implementation

The script should be in the src/cc_catalog_airflow/dags/provider_api_scripts/ directory.
The script should have a test suite in the same directory.
The script must use the ImageStore class (Import this from
src/cc_catalog_airflow/dags/provider_api_scripts/common/storage/image.py).
The script should use the DelayedRequester class (Import this from
src/cc_catalog_airflow/dags/provider_api_scripts/common/requester.py).
The script must not use anything from
src/cc_catalog_airflow/dags/provider_api_scripts/modules/etlMods.py, since
that module is deprecated.
If the provider API has can be queried by 'upload date' or something similar,
the script should take a --date parameter when run as a script, giving the
date for which we should collect images. The form should be YYYY-MM-DD (so,
the script can be run via python my_favorite_provider.py --date 2018-01-01).
The script must provide a main function that takes the same parameters as from
the CLI. In our example from above, we'd then have a main function
my_favorite_provider.main(date). The main should do the same thing calling
from the CLI would do.
The script must conform to PEP8. Please use pycodestyle (available via
pip install pycodestyle) to check for compliance.
The script should use small, testable functions.
The test suite for the script may break PEP8 rules regarding long lines where
appropriate (e.g., long strings for testing).

Examples of other Provider API Scripts

For example Provider API Scripts and accompanying test suites, please see

src/cc_catalog_airflow/dags/provider_api_scripts/flickr.py and
src/cc_catalog_airflow/dags/provider_api_scripts/test_flickr.py, or
src/cc_catalog_airflow/dags/provider_api_scripts/wikimedia_commons.py and
src/cc_catalog_airflow/dags/provider_api_scripts/test_wikimedia_commons.py.

akshgpt7 commented on Wed Mar 11 2020:

@mathemancer @annatuma
The following endpoint: https://cdmserver.com/dmwebservices/index.php?q=dmGetCollectionList/json of the ContentDM API doesn't seem to work?
Can someone help me out in figuring out the flow of this integration?

This is where I took reference from: https://www.oclc.org/support/services/contentdm/help/customizing-website-help/other-customizations/contentdm-api-reference.en.html
mathemancer commented on Wed Mar 11 2020:

@akshgpt7 https://cdmserver.com looks like a placeholder to me.

@annatuma Do we have a way to figure out the proper host to hit?  I tried
https://cdm16014.contentdm.oclc.org/dmwebservices/index.php?q=dmGetCollectionList/json,
but that doesn't work.  Do we have a contact we can ask about that?
kss682 commented on Tue Jun 02 2020:

@mathemancer , @annatuma
The implementation for CPL can be done by partitioning the requests by collections and then paging through records in collections and as we page get the indiviual Item/record info .
So this requires 3 functions

dmGetCollectionList
dmQuery
dmGetItemInfo

Sample queries:
CollectionList
Quering with the first collection
Image Info of the first record
While quering the rights field can be included to filter out non-CC records.
But there are certain problems, I couldn;t find a proper key showing the landing page url .
link.
Another thing is the image url in the above json is .tif format  and to get the .jpg format we need to request another function getImageInfo image-info
annatuma commented on Wed Jun 03 2020:

@akshgpt7 https://cdmserver.com looks like a placeholder to me.

@annatuma Do we have a way to figure out the proper host to hit? I tried
https://cdm16014.contentdm.oclc.org/dmwebservices/index.php?q=dmGetCollectionList/json,
but that doesn't work. Do we have a contact we can ask about that?

I am so sorry, I completely missed this @mathemancer the last contact we had was July 2019 but we can definitely send over any questions we may have. Will sync with you on Slack as to what those might be.
source
annatuma commented on Fri Jun 19 2020
:

Nothing for clarity, this is what we sent our contacts at the museum:

_We're still in the research phase of the integration, and appear to be getting most of what we need from three functions:
dmGetCollectionList
dmQuery
dmGetItemInfo
However, what we're missing is:

A direct link to the image in JPG format
We did notice that while this isn't available in a response from dmGetItemInfo (such as this one) there is an IIIF link on the individual record page (like here) with that information. However, we're unable to find it via the API.

A landing page URL
Our user flow on CC Search is to take users through to the record's information site on the source site.

An Image ID, if possible
It should be noted that in our research, we haven't found any objects with multiple images, but in case that happens we'd need a unique ID per image._

I'm going to mark this as "blocked" and "question" for now, since we can't commence work until we have a response from them.


Policy on the basic CRUD operations

Seems that we're having some disagreements on what our surfaces should look like. Here's my opinion to start the discussion. I use a "thing API" that deals with "things". You can replace with "storage" and "bucket" if it that's easier.
/cc @daspecster @dhermes @tseaver @jonparrott
Client pattern
A client handles your credentials and is the pipe to the API.
from gcloud import thing
client = thing.Client()

Instantiate a thing
Create the thing object and eventually save it remotely.
thing = client.thing(parameters)
# ...
thing.save()

It's unusual, but perhaps you want to "load" a thing from the API by first creating the thing object with the right ID, and then reloading it.
thing = client.thing()
thing.id = 'identifier'
thing.reload()

Get a thing
Give me a thing from the API service.
thing = client.get_thing(identifier)

Update a thing
The same pattern as creating a thing, except I start with a loaded thing.
thing = client.get_thing(identifier)
thing.property = 'new value'
thing.save()

Reload a thing
I have a thing, but I suspect it's changed since I loaded it. I want to make sure what i have is fresh...
thing = client.get_thing(identifier)
# ... some time later ...
thing.reload()

List a bunch of things
I have many things stored and I want to go through all of them.
for thing in client.list_things():
  do_something_with(thing)

I have lots of things, but I only want 100 of them. I don't care how many API calls there are.
for thing in client.list_things(limit=100):
  do_something_with(thing)

I have lots of things, and I want to control specifically how many API calls I'm making -- I'm on a budget!
for thing in client.list_things(api_call_limit=5):
  do_something_with(thing)

Delete a thing
I have a thing that I loaded, or paged through, and I want to delete it.
thing = client.get_thing(identifier)
thing.delete()

I want to delete a thing, but I know it's unique ID.
client.delete_thing(identifier)

Technically this could also be done with...
client.thing(identifier).delete()

Related

#895
#911
#1718
http://stackoverflow.com/questions/30243687/verify-if-a-topic-exists-based-on-topic-name/32019553#32019553

FWIW, we already discuss this in #911.

Added #911 to the related list. I think the discussion there got side-tracked for a few things (the main one was the debate about whether .create_thing() should exist, which I've specifically left alone.

The main issue is really the disagreement about the Zen of Python:

There should be one-- and preferably only one --obvious way to do it.

In addition, we've never heard a request from a user for the extra methods.
FWIW, I don't really have much fight in me on this one. I'm happy to acquiesce and implement whatever.

Devil's advocate here:

Although practicality beats purity.

the main one was the debate about whether .create_thing() should exist

I'm fine with leaving create_thing out in favor of client.thing().save().
I'm personally in favor of @jgeewax's proposal for the API here.

Still happy to acquiesce and implement whatever.

Definitely want to hear @tseaver's view here.

From a user's perspective, this is the natural way to fetch a thing:
thing = client.get_thing(identifier)

Whether additionally offering a reload() method makes sense depends on the API. If the resource does not have attributes that can change, it probably doesn't make sense.

Is anyone Dutch?
I'm not sure if these methods break the zen.  Batteries included almost makes it sound like convince methods are welcome if logical and clear.
I think the most important part is consistency so a user can find the rhythm of the library.
Also I think it might help to keep in mind that in these cases we are working from a client object and interacting outside of a local context.
I'm game like @dhermes for whatever as long as we're consistently consistent. :-D

@rimey : What if we standardized on client.thing().<action>() ?
This would mean:

Option A
Option B

thing = client.thing('id').get()
thing = client.get_thing('id')

thing = client.thing('id, name='Foo').save()
(The same)

thing.name = 'Bar'; thing.save()
(The same)

success = client.thing('id').delete()
success = client.delete_thing('id')

OK. I updated the body of this issue to summarize things, but the note above suggests ways we could avoid having get_thing and delete_thing as unique actions (replaced by client.thing(id).get() and client.thing(id).delete()).
Regardless of that, some key points are...

.create_thing() shouldn't exist
thing.<action>() should return the thing when useful (ie, .save()), or a boolean about whether the action is successful if not useful (ie, delete())
.thing() should never have required parameters

@jgeewax I'm okay with that, too. That's a pretty major change for the API surface though. Definitely want to hear @tseaver and @dhermes take on this.

The client.thing(id).get() proposal seems to have come out of the blue. It has many problems:

As a user, I would prefer to write client.get_thing(id).
Thing.get is naturally a class method. Seeing it be an instance method would surprise me. If the class method were ever desired in the future, the instance method would get in the way.
How would list() fit in? Badly, I think.
thing.reload() returns None to emphasize that it is side-effectful, like list.reverse(). This consideration typically outweighs enabling method chaining, except where method chaining is a key element of the interface (e.g., in building database queries).
client.thing(id).get() forces the client library to tolerate partly constructed objects. If certain attributes need to be defined before save() can be called, making them required parameters of the factory (and the constructor) would make this apparent in the method signature. Informing the user of the usage error through an exception raised by save() is not optimal.

I would be wary of trying too hard to define a one-size-fits-all CRUD pattern. Different APIs are different:

Some resources are about named objects offering little more than object identity (e.g., PubSub topics), sometimes with names assigned by the client, and sometimes with names assigned by the service. Some resources have associated second-class properties like ACLs or "metadata" (e.g., Cloud Storage blobs). Other resources have lots of essential attributes (e.g., metric descriptors). Some are nothing more than saved collections of attributes (e.g., Stackdriver groups, which are really just saved filters).
Some resources are mutable. Some can only be created and deleted (e.g., metric descriptors). Others are read-only (e.g., managed resource descriptors).

@rimey, just tossing out ideas. Not sure if they're any good.

I would be wary of trying too hard to define a one-size-fits-all CRUD pattern.

This is a guideline for the common case that we keep seeing. Cloud Storage, Pub/Sub, etc all have basic CRUD operations and static resource names. We do different things for these similar scenarios and I don't think we should.
This isn't meant to be commandments stating that all APIs must look exactly like this. If they can look this way, they should. If we have a good reason to deviate, we should.

client.thing(id).get() forces the client library to tolerate partly constructed objects.

I'm fine with dropping the client.thing(id).get() pattern generally in favor of client.get_thing(id), however no matter what we do I think we need to support "partially constructed objects".
The API might require something by the time it arrives, however our client needs to accommodate people who don't have all of the information at init-time. Otherwise, we're just encouraging people to fill in dummy values until they have all the information they need. Sanjay G is a big proponent of "tell users quickly when they supply bad data", and even in Protobuf we don't deal with required fields this way.
In other words, I don't think __init__() methods should use parameters without defaults as a way of conveying that certain fields are required.

Informing the user of the usage error through an exception raised by save() is not optimal.

If a field has to be a number and a user gives us "foo", we should tell them right away (protobuf does this). If they make a Thing object and so far haven't set the id field (which is required), any sort of exception at this point seems premature.
In other words, users say "I'm done!" by calling an API-contacting method (.get(), .save(), etc). At that point, it makes sense to say "hey... you didn't provide an ID... and to save this you have to pick one...".
As I mentioned above, this isn't a commandment. In Datastore, the ID field is "required" to be a persisted entity, but it's fine to omit the ID when saving a new one -- that's how you say "give me an auto-generated ID" -- so this certainly isn't a one-size-fits-all mandate.

Another point of refrence for this:
It's awkward in the bigquery API to have to do this:
    bigquery_client = bigquery.Client()
    dataset = bigquery_client.dataset(dataset_name)
    table = dataset.table(table_name)

    # Reload the table to get the schema.
    table.reload()

Just to make sure the table has schema populated so data can be added.

If the back-end already knows the schema (which it must, or else table.reload() wouldn't fetch it), then it should be willing to accept the uploaded data without having us resend it.  If the back-end is so willing, then we need to change upload_from_file to skip populating configuration['schema'] if it isn't set.  @jonparrott can you confirm that the upload would succeed even without having configuration['schema'] populated?

In this case I can't because of another bug.
On Thu, Aug 18, 2016, 6:17 PM Tres Seaver<EMAIL_ADDRESS>wrote:

If the back-end already knows the schema (which it must, or else
table.reload() wouldn't fetch it), then it should be willing to accept
the uploaded data without having us resend it. If the back-end is so
willing, then we need to change upload_from_file to skip populating
configuration['schema'] if it isn't set. @jonparrott
https://github.com/jonparrott can you confirm that the upload would
succeed even without having configuration['schema'] populated?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/GoogleCloudPlatform/gcloud-python/issues/1722#issuecomment-240902741,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPUc9vi6zJ_DLiTUZ4kcoHUbUEw-9SGks5qhQQlgaJpZM4IGbgp
.

I am going to close this because:

It is mostly a meta-discussion which is now stale.
The ship has sailed at this point.