Keeps giving me errors.

I've tried this example code and it doesn't seem to function:
from characterai import PyCAI

client = PyCAI('TOKEN')

char = input('Enter CHAR: ')

chat = client.chat.get_chat(char)

participants = chat['participants']

if not participants[0]['is_human']:
    tgt = participants[0]['user']['username']
else:
    tgt = participants[1]['user']['username']

while True:
    message = input('You: ')

    data = client.chat.send_message(
        chat['external_id'], tgt, message
    )

    name = data['src_char']['participant']['name']
    text = data['replies'][0]['text']

    print(f"{name}: {text}")

This is the error it gives me:
    Traceback (most recent call last):
  File "079.py", line 7, in <module>
    chat = client.chat.get_chat(char)
  File "C:\Users\Twangy Money\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\characterai\characterai.py", line 531, in get_chat
    return PyCAI.request(
  File "C:\Users\Twangy Money\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\characterai\characterai.py", line 69, in request
    data = response.json()
  File "C:\Users\Twangy Money\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\tls_client\response.py", line 39, in json
    return json.loads(self.text, **kwargs)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\json\__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I also used another example code provided by someone
from characterai import PyCAI

my_token = '39b1fa309f245479a9440cebb1af394399ac90a' # This is your personal token, let me know if you need help getting yours

# Create the client
client = PyCAI(my_token)

#Character ID, found in the url of the character
char = 'OYYf4iM6fjt9eZ72oXRsY3UGPeXd9Y-uJwfAjF5JAwk' # SM64 Mario

message = input("Your message: ") # Wait for user input...

#Send the message, wait for the response
response = client.chat.send_message(char, message)

#Get last response
last_msg = response['replies'][0]['text'] # Not sure what the "response" object looks like, but this get's the message sent by the character

print(last_msg)

It gave me this error:
Traceback (most recent call last):
  File "079.py", line 14, in <module>
    response = client.chat.send_message(char, message)
TypeError: send_message() missing 1 required positional argument: 'text'

Help? Also don't worry that token there isn't mine it's a broken version of a token provided by someone else.

same

I've found that. Your problem must be in using wrong chat, Use chat2 instead of just chat
import asyncio
from characterai import PyAsyncCAI

async def main():
    client = PyAsyncCAI('TOKEN')

    char = input('Enter CHAR: ')

    chat = await client.chat2.get_chat(char)

    author = {
        'author_id': chat['chats'][0]['creator_id']
    }

    while True:
        message = input('You: ')

        async with client.connect() as chat2:
            data = await chat2.send_message(
                char, chat['chats'][0]['chat_id'],
                message, author
            )

        name = data['turn']['author']['name']
        text = data['turn']['candidates'][0]['raw_content']

        print(f"{name}: {text}")

asyncio.run(main())

I've found that. Your problem must be in using wrong chat, Use chat2 instead of just chat
import asyncio
from characterai import PyAsyncCAI

async def main():
    client = PyAsyncCAI('TOKEN')

    char = input('Enter CHAR: ')

    chat = await client.chat2.get_chat(char)

    author = {
        'author_id': chat['chats'][0]['creator_id']
    }

    while True:
        message = input('You: ')

        async with client.connect() as chat2:
            data = await chat2.send_message(
                char, chat['chats'][0]['chat_id'],
                message, author
            )

        name = data['turn']['author']['name']
        text = data['turn']['candidates'][0]['raw_content']

        print(f"{name}: {text}")

asyncio.run(main())

well still got error.

I found a fix from a discord server. But uh, idk how to explain it. The error is fixed for me now I just used another person's example code.

I found a fix from a discord server. But uh, idk how to explain it. The error is fixed for me now I just used another person's example code.

can i ask you why you reply this message without any solution, even when you have solution?
give solution. this is issues, to find solution.

I didn't give a solution as I replied through gmail not from the website
and I was busy.
On Sun, Oct 22, 2023 at 8:28 PM Yoga Pranata @.***>
wrote:

I found a fix from a discord server. But uh, idk how to explain it. The
error is fixed for me now I just used another person's example code.
can i ask you why you reply this message without any solution, even when
you have solution?
give solution. this is issues, to find solution.
—
Reply to this email directly, view it on GitHub
https://github.com/kramcat/CharacterAI/issues/59#issuecomment-1774110050,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AU5VVYRE7UH3QTAHW5DWRGDYAUUSRAVCNFSM6AAAAAA6GUZJNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZUGEYTAMBVGA
.
You are receiving this because you authored the thread.Message ID:
@.***>

So, as per user zYxDevs and everyone's request, I'm writing this to let you guys know how I got it to work. I did this from python 3.11.6 and on the latest version of character.ai which currently is characterai==0.8.0 To install python 3.11.6 go to python website here: https://www.python.org/downloads/release/python-3116/ To install characterai==0.8.0, make sure you have python installed first and then run:
pip3.11 install characterai==0.8.0

Now, first of all, make sure you go to the characterai website and, whichever character you chose go to it's chat and write 1 message there and let the AI reply. In this specific code we're using chat2 so in the url (for example https://beta.character.ai/chat?char=X4Q7WpO2BcDrxSBtFtrTkJJR3os46b0clYOtoigyWD4) make sure it says chat2 instead for chat after beta.character.ai/ (for example https://beta.character.ai/chat2?char=X4Q7WpO2BcDrxSBtFtrTkJJR3os46b0clYOtoigyWD4) and then write 1 message there after making sure the url says chat2. Now with that said, this is how the python code works:
client = PyAsyncCAI(os.environ['CHARACTER_AI_TOKEN'])
char = os.environ['CHARACTER_ID']

chat = await client.chat2.get_chat(char)
author = {'author_id': chat['chats'][0]['creator_id']}

msg1 = "Hello."

async with client.connect() as chat2:
        data = await chat2.send_message(
            char, chat['chats'][0]['chat_id'],
            msg1, author
        )
text = data['turn']['candidates'][0]['raw_content']

Here, the msg1 variable is where we're sending our message. The msg1 variable will be the message we're sending to the bot. And the text variable is the bot's reply. When using this make sure to await so it can finish loading the bot's message. For example in cases of discord bots, you can await like this:
await message.channel.send(text)

Anywhere else similarly. This way the variable has time to load the bot's message and thus can work correctly. These are all the things you need to make sure so that your code works. Or so I hope. For further help message me on Discord: realtwangy

this is very helpful, after reading this i found my mistake is chat not chat2, after changed to chat2 on character ai web and chatting to the bot its work fine. thank you bro!

So, as per user zYxDevs and everyone's request, I'm writing this to let you guys know how I got it to work. I did this from python 3.11.6 and on the latest version of character.ai which currently is characterai==0.8.0 To install python 3.11.6 go to python website here: https://www.python.org/downloads/release/python-3116/ To install characterai==0.8.0, make sure you have python installed first and then run:
pip3.11 install characterai==0.8.0

Now, first of all, make sure you go to the characterai website and, whichever character you chose go to it's chat and write 1 message there and let the AI reply. In this specific code we're using chat2 so in the url (for example https://beta.character.ai/chat?char=X4Q7WpO2BcDrxSBtFtrTkJJR3os46b0clYOtoigyWD4) make sure it says chat2 instead for chat after beta.character.ai/ (for example https://beta.character.ai/chat2?char=X4Q7WpO2BcDrxSBtFtrTkJJR3os46b0clYOtoigyWD4) and then write 1 message there after making sure the url says chat2. Now with that said, this is how the python code works:
client = PyAsyncCAI(os.environ['CHARACTER_AI_TOKEN'])
char = os.environ['CHARACTER_ID']

chat = await client.chat2.get_chat(char)
author = {'author_id': chat['chats'][0]['creator_id']}

msg1 = "Hello."

async with client.connect() as chat2:
        data = await chat2.send_message(
            char, chat['chats'][0]['chat_id'],
            msg1, author
        )
text = data['turn']['candidates'][0]['raw_content']

Here, the msg1 variable is where we're sending our message. The msg1 variable will be the message we're sending to the bot. And the text variable is the bot's reply. When using this make sure to await so it can finish loading the bot's message. For example in cases of discord bots, you can await like this:
await message.channel.send(text)

Anywhere else similarly. This way the variable has time to load the bot's message and thus can work correctly. These are all the things you need to make sure so that your code works. Or so I hope. For further help message me on Discord: realtwangy

this is very helpful, after reading this i found my mistake is chat not chat2, after changed to chat2 on character ai web and chatting to the bot its work fine. thank you bro!

Np also both chat and chat2 will work, just if you use chat you also needa change the url from chat2 to chat and then write a message, and then your code will work.

What can we do if we want to use the synchronous API (PyCAI)?

client = PyCAI(token)
char = 'mPKDui2e1V7mfbLxTv6S5eu8WTAAwzXmdo1iwfo79IM'
chat = client.chat2.get_chat(char)
author = {'author_id': chat['chats'][0]['creator_id']}

gives AttributeError: 'PyCAI' object has no attribute 'chat2'. Did you mean: 'chat'?

That will be client = PyAsyncCAI(token) not PyCAI(token) the rest seems fine.


Refactor batteries library to allow multiple definitions for model

Checklist

[X] I have filled out the template to the best of my ability.
[X] This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
[X] This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.
The definitions library of batteries is blowing out in size. I observed that some of my devices are already in that file but were not auto-detected simply due to differences in how different integrations, i.e. ZHA vs. Zigbee2MQTT, present models and manufacturers.
Describe the solution you'd like
Allow for one, or more, models and manufacturers against each key in the libraries definition file, e.g.
{
	"manufacturer": [
		"Xiaomi",
		"Aqara"
	],
	"model": [
		"Aqara human body movement and illuminance sensor (RTCGQ11LM)",
		"RTCGQ11LM"
	],
	"battery_type": "CR2450"
}

Or some similar format.
Describe alternatives you've considered
We could simply keep adding to the database but it's going to grow larger and more unmanageable over time, especially so if there were to say be a dropdown selection of models in the future to maybe choose from.
Additional context
.

This would work for Philips and Signify Netherlands B.V. devices too.

Xiaomi and Aqara would be another similar pairing.

This is something I've been thinking about as well but at the moment I'm not going to implement.
The library is under 30kb so no issues on performance yet.
The schema is complex enough for many to edit and I'm regularly adding missing commas, brackets etc. Adding array's will make my maintenance a lot harder.  The json validator catches things but I don't want to be hard and reject submissions as I want to grow the library rather than having people lose interest.
I may implement a GitHub Issues form to submit new devices, this wouldn't be able to handle arrays.
I may change my mind in future though :)


Front test run

:tada: This PR is included in version grc-stamp-fronted-v1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Update to latest stable version and fix style

Update the project dependancies to the latest stable versions.
Uses View Bindings to reference layout items.
Fix Android style formatting.

I've added Spotless to the gradle's build file to automatically check/fix formatting errors with:
./gradlew spotlessCheck
./gradlew spotlessApply

These commands also check that each file includes the right copyright statement.

Sorry for the long review time @pfmaggi .  Thanks for updating this!

Sorry for the long review time @pfmaggi .  Thanks for updating this!


added OctaveConv, OctaveConv1D + test

Hi,
Following our discussion in PR #1782, here is the code for the abstract OctaveConv layer and the OctaveConv1D layer.

Thank you for the pull request. Please fix the CI before we can review. You can see the error messages by clicking on "details".

@amascia Would  you be willing to maintain this contribution into the future? If so could you update the CODEOWNERS file appropriately in this PR.

@seanpmorgan yes I will maintain the contribution into the future. I've made the change in the list of codeowners accordingly. This PR is ready to be reviewed

Hi, could you tell me if there are any further issues with this PR that is blocking the approving review ?
If not I would like to open PRs for the other layers (2D, 3D, and transpose versions).
Thanks!

Hi,
Are there any updates on this PR? If not, could you merge it so that I can start opening PRs with part 2 and part 3 of the features?
Thanks!

Thank you for your contribution. We sincerely apologize for any delay in reviewing, but TensorFlow Addons is transitioning to a minimal maintenance and release mode. New features will not be added to this repository. For more information, please see our public messaging on this decision:
TensorFlow Addons Wind Down
Please consider sending feature requests / contributions to other repositories in the TF community with a similar charters to TFA:
Keras
Keras-CV
Keras-NLP


LICENSE

:wave: Hello, and thank you for this! What’s the license of the code here?

It's MIT, I've just added the file ;)


ImportError: cannot import name '_k_means' from 'sklearn.cluster'

I think the version of scikit-learn being used is old in this repo, could you please update it according to the lastest version scikit-learn==0.23

Were you able to solve this issue?

Hi I was having the same issue here ^

This problem occurs because file "_k_means.py" has been deprecated in higher version sklearn package. You can check it under the path where you install sklearn package.
For myself, I'm using anaconda+virtual env, so the "pip install ..." command install the scikit-learn under path ...\Lib\site-packages\sklearn\cluster. You may find "_k_means.py" in the directory, but there is no function in the file, only some notes of deprecation.
Maybe downgrade the sklearn package is the easiest choice. I'm still figuring out where are the functions in "_k_means.py" moved to.

please make sure your version of scikit-learn is 0.20


Updated Dockerfile, updated to run uvicorn in main

Closes #198
Closes #190

Closing due to not switching to python call of uvicorn in favor of using uvicorn cli


Update undertow-core to 2.2.16.Final

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

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "io.undertow", artifactId = "undertow-core" } ]

labels: library-update, commit-count:1

Superseded by #207.


Missing image definition creation step

The steps are missing the 'az sig image-definition create' step. Right now, the image creation will fail since no definition was created. It may be because the assumption is you'd have used the previous Linux one without a VNet but it would be best to make it completely independent.

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

ID: 2ae3967f-3f7d-0dfa-00c1-e1ff7e0ec292
Version Independent ID: 6f7abb43-169e-567f-16e6-ce006bf764fb
Content: Use Azure Image Builder for Linux VMs allowing access to an existing Azure VNET - Azure Virtual Machines
Content Source: articles/virtual-machines/linux/image-builder-vnet.md
Service: virtual-machines
Sub-service: image-builder
GitHub Login: @kof-f
Microsoft Alias: kofiforson

@josefehse we'll review your feedback and get back to you shortly. Thanks.

Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.

@ericd-mst-github Can you follow-up with Kofi on this and see if it has been fixed?

Hi all, I recently confirmed with the Image Builder team that this still working to resolve this issue.
I apologize for the delay and thank you for your patience.


File not found when using replace

bump-my-version version: 0.24.2
Python version: 3.12
Operating System: Windows

Description
I want to run bump-my-version replace patch and see my pyproject.toml version updated.
What I Did
Installed and ran bump-my-version sample-config --no-prompt --destination .bumpversion.toml which successfully created .bumpversion.toml automatically setting current_version to 0.1.0 from pyproject.toml
Content
[tool.bumpversion]
current_version = "0.1.0"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
ignore_missing_files = false
tag = false
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = false
message = "Bump version: {current_version} → {new_version}"
commit_args = ""

Successfully ran  bump-my-version bump patch which bumped ok to 0.1.1
[tool.bumpversion]
current_version = "0.1.1"

Tried running bump-my-version replace patch and got no file found error
  File "c:\Users\David.Budd\Documents\Github\blocksets\.venv\Lib\site-packages\bumpversion\cli.py", line 537, in replace
    modify_files(configured_files, version, next_version, ctx, dry_run)
  File "c:\Users\David.Budd\Documents\Github\blocksets\.venv\Lib\site-packages\bumpversion\files.py", line 269, in modify_files
    f.make_file_change(current_version, new_version, context, dry_run)
  File "c:\Users\David.Budd\Documents\Github\blocksets\.venv\Lib\site-packages\bumpversion\files.py", line 187, in make_file_change
    raise FileNotFoundError(f"File not found: '{self.file_change.filename}'")  # pragma: no-coverage
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: File not found: 'patch'

@daveisagit It sounds like you want to do the change to pyproject.toml at the same time you bump the version.
To do this add this to your configuration:
[[tool.bumpversion.files]]
regex = true
filename = "pyproject.toml"
search = "^version = \"{current_version}\""
replace = "version = \"{new_version}\""

Here is a reference to the search and replace docs for more details.

Thanks, but I still get the same error. It seems to me the replace has trouble finding the file which is odd given it found it by default fine.

Ok, so this me not understanding how to use it.
For anyone else in a similar mindset, the replace option is not the way.
Simply use bump with the version_part and that will update the pyproject.toml file if you add the [[tool.bumpversion.files]] entry as suggested.
In fact you only need to add
[[tool.bumpversion.files]]
filename = "pyproject.toml"


[Feature] Config option for the Fire Spawn Cage

On the wiki, it says that this mod is highly configurable. I didn’t quite believe it until I looked at the configs. Wow, almost every single value in the mod can be adjusted with the configs. That’s amazing, I’m super impressed. Plus specific features like the Night Beacon enforcing eternal night or the Arca death save mechanic that people may not like can be turned on and off.
I’m making a custom pack for a group of friends and I’m including Goety, and the only feature that people have been concerned about is the ability to move mob spawners around. Okay, technically it’s not moving the spawner with the Fire Spawn Cage, it’s destroying it and making a new one, but it’s basically moving a spawner around.
I figured, sure, that’s fine, moving spawners around is one of those features that tends to be a bit controversial, that’s gonna have a config option. I’ll just disable it. But what do you know, it’s not there.
Unless I’m just blind or being an idiot, which is always an option, but I took a good look and couldn’t find it.
So… yeah. Sorry for the long backstory, but you get the point. It would be really nice to have a config option to disable the Fire Spawn Cage so you can’t move spawners around.

Idk why this is labeled as “bug”, I guess GitHub just automatically does that. It’s not a bug. Just enhancement.

Sounds like a good idea! Will add in next update!

Fire Spawn Cages' functionality can now be disabled through goety.toml under "fireSpawnCage".


Update dvc package

The dvc package is on version 0.24, but PyPI has version 0.87 with a bunch of new features. The old version can't handle new dvc files.

Dunno if you are interested yet, but it is a hell of a dependency-chasing to compile it.


Ensure loader settings Input UI displays while loader is loading

Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/645
Originally created by @derek-knox on 2019-05-07 20:30:13

This is the loader equivalent of the extractor (#642) where the baseline endpoint and frontend hooks are ready for wiring.

View 3 previous comments from the original issue on GitLab


⚠ Bofrost.be has degraded performance

In 2e646fc, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 2100 ms

Resolved: Bofrost.be performance has improved in 048e168.


path_prefix

path_prefix is not working...

I'm working on a fix. You can use root instead of path_prefix which I recommend, as this is the config that Google is actually using.


Items duplicate or disappear if you interact with them while dragging the container

If you click items into a Shulker Box while that Shulker Box is actively selected (as in you left-clicked on it to move it around), the items put into that Shulker Box will be deleted when you navigate out of that box.
Similarly, if you click items out of a Shulker Box while that Shulker Box is selected, the items you take out of that Shulker Box will still be in that Shulker Box as well as your inventory once you navigate out of that box.
A fix for the base 1.19 version of this mod would also be much appreciated.

A fix is in progress.

This should now be fixed in 2.0.1


Is the Care-X HR or above available in India and Dubai?

I need to buy some for my colleague in India and Dubai. I can only find the following one from amazon. Is it working with SDK? And do we have other channels to buy for them?
https://www.amazon.com/PAPAGO-Fitness-Activity-Notification-Messengers/dp/B00NEU4BI0/ref=sr_1_7?srs=9497845011&ie=UTF8&qid=1535363043&sr=8-7
Many thanks!

Yes, It is working with SDK。
My suggestion is contact the sales manager Andy<EMAIL_ADDRESS>to buy Care X ，which is better performance，or Leave your contact information，we will help you to get the products.
Thanks.

Many thanks.
Please reach me at<EMAIL_ADDRESS>Sorry I cannot want to leave my business email on the open internet.

No Problem。 I saw Andy has been reach with you. Enjoy!


Facebook ripper created

Category
This change is exactly one of the following (please change [ ] to [x]) to indicate which:

[ ] a bug fix -- which issue? #...
[x] a new Ripper - #13
[ ] a refactoring
[ ] a style change/fix

Description
Facebook ripper
Testing
To be done
Required verification:

[ ] I've verified that there are no regressions in mvn test (there are no new failures or errors).
[ ] I've verified that this change works as intended.

[ ] Downloads all relevant content.
[ ] Downloads content from multiple pages (as necessary or appropriate).
[ ] Saves content at reasonable file names (e.g. page titles or content IDs) to help easily browse downloaded content.

[ ] I've verified that this change did not break existing functionality (especially in the Ripper I modified).

Optional but recommended:

[ ] I've added a unit test to cover my change.

Ugh.. I'm trying out VS Code and these indents didn't appear in the editor.

@lukepayne I mainly use VS Code for Ripme. It's good until you need a debugger, in which case Eclipse seems to be the least bad option. Debugging projects built with Maven isn't that well-supported across the board, it seems.
In VS Code, try turning on whitespace markers and make your indentation settings so that you use spaces (4 per tabstop), not tabs.

Is this still maintained ?
I have a slightly modified version of this on a local branch that I plan on upgrading once the Facebook API is open again (They closed a lot of stuff with the Cambridge Analytica situation).

@MrTimscampi Feel free to take and build on this, I haven't looked at it in some time.

@lukepayne Unfortunately, i'm a bit busy with work and other projects, these days :/


Fix upper ontology conflicts causing failure of FBbt Uberon bridge

(@Clare72  - don't worry about this one.  Nico and I'll will deal with fixes.)
Combining FBbt, Uberon and CL using bridge/uberon-bridge-to-fbbt causes a number of inconsistencies.  These date back to the development of CARO & its separate implementation in Uberon and FBbt.  We need to fix these problems for a number of reasons, including:

Ensuring Monarch can properly use FlyBase phenotypes
Generating nested Uberon + CL + FBbt files for use in multi-species resources that need to group anatomy and cell types.  This includes EBI resources including the single cell atlas.

This is an umbrella ticket for documenting these issues and their fixes.
There is a serious possibility of becoming bogged down in upper ontology issues which are of little interest to biologists, so some slightly unsatisfactory compromises may have to be made.  In these cases the aim should be to document those compromises and park any remaining issues on a ticket.   This ticket can be closed once issues are resolved and compromises suitably documented.
Fixes may be in FBbt or Uberon.  If the latter, then any Uberon tickets should be linked from here.

Brief outline of issues
Issue 1:   Anatomical group in Uberon vs FBbt:  https://github.com/obophenotype/uberon/issues/1430
Possible solutions:

Fix Uberon following CARO (This is clearly longer term and requires much more testing.)
Remove mapping of anatomical group to Uberon term - they are clearly incompatible.  This solution is preferable as long as it doesn't leave too many orphan terms.
Remove 'anatomical structure'/'anatomical group' disjointness in FBbt?  -

Issue 2: non-connected anatomical system is classified in uberon under 'anatomical entity' which is defined as connected.  Possible solutions:

Fix Uberon following CARO (This is clearly longer term and requires much more testing.)
Remove mapping of non-connected anatomical system to Uberon term.  This solution is preferable as long as it doesn't leave too many orphan terms.   Not entirely satisfactory though.  Anatomical system being a reasonable grouping that will be lost.

Issue3: What's a ganglion ?

cell cluster organ vs multi-tissue structure.

Issue4: Gonadal sheath

granularity issue.   Gonadal sheath in mammals is an epithelium. Gonadal sheath in insects includes a visceral muscle component.
Poss solution: Does FBbt have gondal sheath epithelium?  Could map to that.

Issue5: Single cell muscles!

granularity issue!
Map to myotubes instead?

@cmungall for changes to mappings I'm assuming I should create a pull request with and edit to
https://github.com/obophenotype/uberon/blob/master/bridge/uberon-bridge-to-fbbt.owl + change xrefs to FBbt in uberon-edit.obo.  Is this correct?

Note: this is required for EBI scAtlas to be able to consume FBbt and use it for annotation.
@cmungall - Almost  all of these issues are to do with granularity and in general I think FBbt is justified in  the granularity/composition based classifications it makes  given  what we know of fly biology.   Given that, I think  the  best course may be to make the problematic granularity-based classifications in Uberon more general.  Either that or we need more general grouping classes for FBbt to  map up to.

You only need to change the edit.obo file, the bridge axioms are auto-generated from those

Regarding issue 1:
Uberon now has disconnected anatomical group (UBERON:0034923), mapped to the same term in CARO (CARO:0020000). The definition does not exactly match that of FBbt’s anatomical group:

FBbt’s anatomical group: “Material anatomical entity generated by coordinated expression of the organism’s own genome and whose component parts are not all connected to each other.”
Uberon’s disconnected anatomical group: “Material anatomical entity consisting of multiple anatomical structures that are not connected to each other.”

but it still looks like a better match than Uberon’s anatomical group.
Suggestion is thus to map FBbt’s anatomical group to Uberon’s disconnected anatomical group instead of anatomical group.

Regarding issue 2:
As far as I can tell there is no non-connected anatomical system term in Uberon. Are you referring to non-connected functional system (UBERON:0015203)? If so:
That term is mapped to an identical term in FBbt (FBbt:00007278) with an identical definition. The mapping looks correct to me, but maybe the problem stems from the fact that anatomical system in Uberon (UBERON:0000467) is defined as a “connected anatomical structure“? Some of the systems below it are made of components that are certainly not physically connected, e.g. immune system or exocrine system.

Regarding issue 3:
FBbt’s ganglion (FBbt:00005137) is a multi-tissue structure (FBbt:00007010) while Uberon’s ganglion (UBERON:0000045) is a cell cluster organ (UBERON:0010001).
Both classifications make some sense, except that Uberon’s definition of a cell cluster organ is that of “a small cluster of cells of various types […]”. In my opinion this “small” adjective should preclude ganglion from being a cell cluster organ, given that ganglions can be quite large, at least in Drosophila. For example the entire ventral nerve cord is a ganglion – if I recall correctly that’s at least a few thousands of cells, so not really a “small” cluster.

Regarding issue 4:
Yes, FBbt now has gonadal sheath epithelium (“epithelial component of the gonadal sheath”) (FBbt:00047208). I’ll update the mapping accordingly.

Regarding issue 5:
We plan to introduce new terms to represent the muscles themselves, so that should take care of this.

Regarding issue 6:
FBbt’s central nervous system is a organ system subdivision as in Uberon, so I am not sure I understand what the issue here is…

I think 'cell cluster organ' was one of my terms - designed for sensilla and other small cuticular organs.  I'm not sure how it came to be applied to Uberon:Ganglion.  Maybe just map both to organ?

I've given thumbs up to solutions you proposed that I think are good.

Issue 6 - maybe this has been fixed? It caused inconsistencies previously so if those have gone away then there is no issue.

All the problems above (and some more) have been fixed; Uberon, CL, and FBbt can be merged while keeping all disjointness axioms without leading to unsatisfiable classes.


Build failure on Apple M1 at current HEAD

Building the jaxlib wheel from source is broken on my machine at current main HEAD:
➜ python build/build.py

     _   _  __  __
    | | / \ \ \/ /
 _  | |/ _ \ \  /
| |_| / ___ \/  \
 \___/_/   \/_/\_\

Bazel binary path: /opt/homebrew/bin/bazel
Bazel version: 5.0.0
Python binary path: /Users/nicholasjunge/Workspaces/python/jax/venv/bin/python
Python version: 3.9
NumPy version: 1.22.2
MKL-DNN enabled: yes
Target CPU: arm64
Target CPU features: release
CUDA enabled: no
TPU enabled: no
ROCm enabled: no

Building XLA and installing it in the jaxlib source tree...
/opt/homebrew/bin/bazel run --verbose_failures=true --config=mkl_open_source_only :build_wheel -- --output_path=/Users/nicholasjunge/Workspaces/python/jax/dist --cpu=arm64
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=0 --terminal_columns=80
INFO: Reading rc options for 'run' from /Users/nicholasjunge/Workspaces/python/jax/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'run' from /Users/nicholasjunge/Workspaces/python/jax/.bazelrc:
  Inherited 'build' options: --apple_platform_type=macos --macos_minimum_os=10.9 --announce_rc --define open_source_build=true --spawn_strategy=standalone --enable_platform_specific_config --define=no_aws_support=true --define=no_gcp_support=true --define=no_hdfs_support=true --define=no_kafka_support=true --define=no_ignite_support=true --define=grpc_no_ares=true -c opt --config=short_logs --copt=-DMLIR_PYTHON_PACKAGE_PREFIX=jaxlib.mlir.
INFO: Reading rc options for 'run' from /Users/nicholasjunge/Workspaces/python/jax/.jax_configure.bazelrc:
  Inherited 'build' options: --strategy=Genrule=standalone --repo_env PYTHON_BIN_PATH=/Users/nicholasjunge/Workspaces/python/jax/venv/bin/python --action_env=PYENV_ROOT --python_path=/Users/nicholasjunge/Workspaces/python/jax/venv/bin/python --distinct_host_configuration=false
INFO: Found applicable config definition build:short_logs in file /Users/nicholasjunge/Workspaces/python/jax/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:mkl_open_source_only in file /Users/nicholasjunge/Workspaces/python/jax/.bazelrc: --define=tensorflow_mkldnn_contraction_kernel=1
INFO: Found applicable config definition build:macos in file /Users/nicholasjunge/Workspaces/python/jax/.bazelrc: --config=posix
INFO: Found applicable config definition build:posix in file /Users/nicholasjunge/Workspaces/python/jax/.bazelrc: --copt=-fvisibility=hidden --copt=-Wno-sign-compare --cxxopt=-std=c++14 --host_cxxopt=-std=c++14
Loading:
Loading: 0 packages loaded
Analyzing: target //build:build_wheel (0 packages loaded, 0 targets configured)
ERROR: /Users/nicholasjunge/Workspaces/python/jax/jaxlib/mlir/BUILD.bazel:58:15: no such target '@llvm-project//mlir/python:FuncPyFiles': target 'FuncPyFiles' not declared in package 'mlir/python' (did you mean 'QuantPyFiles'?) defined by /private/var/tmp/_bazel_nicholasjunge/270a4a78734ae0f3124fa7265b8a65ef/external/llvm-project/mlir/python/BUILD.bazel and referenced by '//jaxlib/mlir:_func_dialect_srcs'
ERROR: Analysis of target '//build:build_wheel' failed; build aborted:
INFO: Elapsed time: 0.154s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
ERROR: Build failed. Not running target
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
b''
Traceback (most recent call last):
  File "/Users/nicholasjunge/Workspaces/python/jax/build/build.py", line 527, in <module>
    main()
  File "/Users/nicholasjunge/Workspaces/python/jax/build/build.py", line 522, in main
    shell(command)
  File "/Users/nicholasjunge/Workspaces/python/jax/build/build.py", line 53, in shell
    output = subprocess.check_output(cmd)
  File<EMAIL_ADDRESS>line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File<EMAIL_ADDRESS>line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/opt/homebrew/bin/bazel', 'run', '--verbose_failures=true', '--config=mkl_open_source_only', ':build_wheel', '--', '--output_path=/Users/nicholasjunge/Workspaces/python/jax/dist', '--cpu=arm64']' returned non-zero exit status 1.

Looks like a bazel problem, failing to discover an MLIR Python dependency.
jax on  main [⇡$] via jax
➜ git log
commit e8f1a020a2ebc920657b79ca94b2b6a4ea8dea03 (HEAD -> main, upstream/main)
Merge: dc2ca18d ad5144f5
Author: jax authors<EMAIL_ADDRESS>Date:   Tue Mar 8 05:44:05 2022 -0800

    Merge pull request #9798 from hawkinsp:initdoc

    PiperOrigin-RevId: 433187449

Device is Apple M1 Pro @ macOS 12.2.1. Just let me know if you need more info, also happy to contribute a fix (if applicable).

Currently JAX produces MHLO, which we translate into XLA HLO immediately in our C++ layer before handing it to XLA.
But... you don't have to use XLA. e.g., there is a toy integration with IREE checked in already. And IREE consumes MHLO and lowers it using MLIR-based infrastructure. I think there's also another toy prototype sitting around that does something similar with the upstream MLIR ExecutionEngine. None of these are production ready, but emitting MHLO makes it easier to experiment along these lines. It is also possible to emit other MLIR dialects from JAX if there's a toolchain that consumes them, e.g., IREE should allow you to include, say, linalg.


Fixes typo

Thanks for contributing to Logstash! If you haven't already signed our CLA, here's a handy link: https://www.elastic.co/contributor-agreement/

Duplicate of #8 which is a duplicate of #6


Setup coveralls action instead of ancient coveralls maven plugin

Bumps dependencies to fix some security warnings. Sets up to use coverallsaction instead of outdated coveralls maven plugin

coverage: 86.458% (-0.006%) from 86.464%
when pulling 009e51d8d0adfb9bb038f13fec24683ebe77c30d on chore/dependencyUpgrades
into efef58804421ebcd1eaeb8d5334222f580130dd2 on main.


Linked list

Have you read the Contributing Guidelines on Pull Requests?
Yes
Description
Implemented Linked List in Java
Checklist

[x] I've read the contribution guidelines.
[x] I've checked the issue list before deciding what to submit.
[x] I've edited the README.md and link to my code.

Related Issues or Pull Requests
#400

Please review.
Thanks to @iamrajiv @siddharth25pandey @plazzy99 for helping me in correcting this code.

@iamrajiv Please merge this pr.


Address deprecations

We were getting deprecation warnings for setting a computed property.  This should get rid of those warnings because the computed properties are being handled by a getter and setter.
Also, I did npm audit fix to hopefully fix some dependency issues.

@JimSchofield Thank you! Can you paste the specific deprecation you were getting?
This package uses yarn and not npm, so we don't want to have both a package-lock.json and a yarn.lock. For clarity, can you please separate out the npm audit changes into a separate PR (that only includes changes to yarn.lock, not package-lock)? Thanks!

https://deprecations.emberjs.com/v3.x/#toc_computed-property-override
I will remove the audit changes and attempt that in a different pr :)

@bantic Do you have some time to review?

@JimSchofield This looks good to me, thanks!


tectonic sandbox first boot fails

Issue Report Template
Tectonic Version
<IP_ADDRESS>
Environment
ubuntu 16.04.3
vagrant 2.0.1
vagrant-hostmanager (1.8.7)

Version Constraint: > 0
vagrant-ignition (0.0.3)
vagrant-share (1.1.9, system)
Version Constraint: > 0

What hardware/cloud provider/hypervisor is being used with Tectonic?
Vagrant (sandbox)
Expected Behavior
the sandbox finishes booting and gives me a sandbox
Actual Behavior
   c1: ~1GB of data will be downloaded.
    c1: Tectonic is still starting, sleeping 30 seconds
    c1: Tectonic is still starting, sleeping 30 seconds
    c1: Tectonic is still starting, sleeping 30 seconds
    c1: Tectonic is still starting, sleeping 30 seconds
    c1: Tectonic is still starting, sleeping 30 seconds
    c1: Tectonic is still starting, sleeping 30 seconds

Forever.
Inside c1:
● bootkube.service - Bootstrap a Kubernetes cluster
   Loaded: loaded (/etc/systemd/system/bootkube.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2017-12-12 15:56:41 UTC; 30min ago
  Process: 1209 ExecStart=/usr/bin/bash /opt/tectonic/bootkube.sh (code=exited, status=254)
 Main PID: 1209 (code=exited, status=254)
      CPU: 2.228s

Dec 12 15:56:40 c1.tectonicsandbox.com bash[1209]:         Quay.io ACI Converter (ACI conversion signing
Dec 12 15:56:40 c1.tectonicsandbox.com bash[1209]: Trusting "https://quay.io/aci-signing-key" for prefix
Dec 12 15:56:40 c1.tectonicsandbox.com bash[1209]: Added key for prefix "quay.io/coreos/bootkube" at "/et
Dec 12 15:56:40 c1.tectonicsandbox.com bash[1209]: Downloading signature:  0 B/473 B
Dec 12 15:56:40 c1.tectonicsandbox.com bash[1209]: Downloading signature:  473 B/473 B
Dec 12 15:56:41 c1.tectonicsandbox.com bash[1209]: run: bad HTTP status code: 500
Dec 12 15:56:41 c1.tectonicsandbox.com systemd[1]: bootkube.service: Main process exited, code=exited, st
Dec 12 15:56:41 c1.tectonicsandbox.com systemd[1]: Failed to start Bootstrap a Kubernetes cluster.

and attempting to run the script from bootkube.service:
ume=assets,target=/assets   --volume etc-kubernetes,kind=host,source=/etc/kubernetes   --mount volume=etc-kubernetes,target=/etc/kubernetes   "quay.io/coreos/bootkube:v0.6.2"   --net=host   --dns=host   --exec=/bootkube -- start --asset-dir=/assets
image: keys already exist for prefix "quay.io/coreos/bootkube", not fetching again
Downloading signature: [=======================================] 473 B/473 B
Downloading ACI: [=============================================] 21.1 MB/21.1 MB
image: signature verified:
  Quay.io ACI Converter (ACI conversion signing key<EMAIL_ADDRESS>[ 2076.299162] bootkube[5]: Starting temporary bootstrap control plane...
[ 2076.299956] bootkube[5]: Error: lstat /assets/tls: no such file or directory
[ 2076.300234] bootkube[5]: Tearing down temporary bootstrap control plane...
[ 2076.301077] bootkube[5]: Error: lstat /assets/tls: no such file or directory
[ 2076.301408] bootkube[5]: Error: lstat /assets/tls: no such file or directory
[ 2076.301637] bootkube[5]: lstat /assets/tls: no such file or directory

Reproduction Steps

download tectonic sandbox
vagrant up

Other Information
Feature Request
Environment
What hardware/cloud provider/hypervisor is being used with Tectonic?
Desired Feature
Other Information

Hmm, haven't seen this before. If you haven't tried, can you do a destroy and up again? It should re-generate all of the TLS certificates.

I am also facing the same issue, it keeps tectonic is starting

suffering from it !!!
c1: Tectonic is still starting, sleeping 30 seconds
c1: Tectonic is still starting, sleeping 30 seconds
c1: Tectonic is still starting, sleeping 30 seconds
c1: Tectonic is still starting, sleeping 30 seconds
c1: Tectonic is still starting, sleeping 30 seconds
c1: Tectonic is still starting, sleeping 30 seconds
c1: Tectonic is still starting, sleeping 30 seconds
c1: Tectonic is still starting, sleeping 30 seconds
Is it solved?


Langchain Ollama: OAuth2 authentication and URL parameters

What this is  about:
Add OAuth2 and basic authentication to the langchain Ollama libraries as well as flexible URLs and ports.
Why:
Not everyone runs Ollama on the local machine. As for me I run it on Kubernetes and use it always with its langchain library. For that proper authentication is required.
How:
I propose to keep Ollma "as-is" and let the wrapping platform define the authentication. That way, only the langchain components need enhancement to offer OAuth or basic authentication through parameters (".env").
Status:
I've already enhanced the Ollma libraries to use OAuth2 with Client Credentials. I'm happy to add Basic to it as well if there is interest to add the code to the main langchain libraries.
I'm talking about these classes:

ChatOllama
Ollama
OllamaEmbeddings

Let me know if/ how I can contribute my code to it.

This issue would be better served if it's created in the langchain repo. The integration is maintained by LangChain, not Ollama.