Evaluating results in languages other than English

Ragas version: 0.0.22
Python version: Python 3.11.7
Can ragas correctly evaluate results in other languages? It seems that fully correct answers receive quite low scores. E.g.
Query: Ile kosztuje opłata miesięczna za prowadzenie Konta Santander dla osoby w wieku 35 lat?
Answer: Opłata miesięczna za prowadzenie Konta Santander dla osoby w wieku 35 lat wynosi 0 zł, pod warunkiem spełnienia warunku zwolnienia z opłaty, którym jest płatność kartą lub BLIKIEM na łączną kwotę co najmniej 300 zł miesięcznie. Jeśli warunek nie jest spełniony, opłata wynosi 6 zł miesięcznie.
Expected: Opłata miesięczna wyniesie 0 zł, jeżeli osoba dokona płatności kartą lub BLIKIEM na łączną kwotę co najmniej 300 zł. Jeżeli nie, opłata wynosi 6 zł.

Results:
  ANSWER CORRECTNESS: 0.48
  Faithfulness: 0.67
  Answer Relevancy: 0.91
  Context Precision: 0.00
  Context Recall: 1.00
  Context Relevancy: 0.05

Translation:
Query: How much is the monthly fee for a Santander Account for a person aged 35?
Answer: The monthly fee for a Santander Account for a person aged 35 is PLN 0, provided that the condition for exemption from the fee is met, which is payment with a card or BLIK for a total amount of at least PLN 300 per month. If the condition is not met, the fee is PLN 6 per month.
Expected: The monthly fee will be PLN 0 if the person makes payments with a card or BLIK for a total amount of at least PLN 300. If not, the fee is PLN 6.

As the answer is exactly correct, I would expect that answer correctness be close to 1. However it is only 0.48, whereas many other queries receive scoring of even 0.8 with a wrong answer.
Can it be optimized? Is this an issue with non-English language?

Hi @gitrid , we are working on something for this #407 . Your results should improve once this is merged and released :)

@shahules786 please can you look the issue i posted. It would be highly appreciated

@shahules786 is this merged already and how can you choose the specific language?

Hi @gitrid Yes, it's merged. We are just preparing the docs for if but you can try it out.
## step1: import any metrics you like
from ragas.metrics import faithfulness

## step2 : adapt to any language
faithfulness.adapt(language="hindi")

## step 3: save adapted prompt for later reuser
faithfulness.save()

## step 4: load dataset evaluate as usual
your_dataset = load_dataset("your_dataset")
ragas_score = evaluate(your_dataset, metrics=[faithfulness])

Make sure to use your best llm while doing language adaptation
You can also view the saved prompt by going to .cache/ragas

Hi @gitrid , were you able to use it? We have just merged the feature and docs for it
https://docs.ragas.io/en/latest/howtos/applications/use_prompt_adaptation.html
Let us know your thoughts

Generally it works @shahules786 thanks!
However bringing own LLMs works only with "ragas==0.0.22". When upgrading Ragas from source I cannot from ragas.llms import LangchainLLM anymore. So for my usecase it is not really helping me, as I want to evaluate with my own LLM in a specific language.

Hi @gitrid Yes, it's merged. We are just preparing the docs for if but you can try it out.
prerequisite

install ragas from source

## step1: import any metrics you like
from ragas.metrics import faithfulness

## step2 : adapt to any language
faithfulness.adapt(language="hindi")

## step 3: save adapted prompt for later reuser
faithfulness.save()

## step 4: load dataset evaluate as usual
your_dataset = load_dataset("your_dataset")
ragas_score = evaluate(your_dataset, metrics=[faithfulness])

Make sure to use your best llm while doing language adaptation You can also view the saved prompt by going to .cache/ragas
Your feedback will be very valuable to us :)

Edit: It does not work on my side, even with the default OpenAI Model. I loaded my OpenAI key and executed the code you provided (and installed Ragas from source ragas-0.0.23.dev25+gbad3a8e). When adapting the language with faithfulness.adapt(language="hindi") I am getting this error: AssertionError: LLM is not set.
So for me it is not working with the OpenAI model as well as with an own model.

Hi @gitrid , that's strange. Can you share the full error trace?

hi @shahules786 hope you are doing great. I was able to resolve the validation issue i was getting at my end. I want to understand for better reporting. I followed this n i want my results to be more presentation to the management.
https://docs.ragas.io/en/latest/howtos/customisations/azure-openai.html
Please can you guide if possible

if you mean me @shahules786 here is the full error trace:

Hi @weissenbacherpwc , apologies for the late reply. This was caused due to a recent merge, I have merged a fix and updated the docs for adaptation. Please follow the updated docs here https://docs.ragas.io/en/latest/howtos/applications/use_prompt_adaptation.html

Hi @mariamaslam how can I help? Feel free to join our discord server where our community can help you with queries.
https://discord.gg/5djav8GGNZ

Nice @shahules786 now it works with a ChatOpenAI model (gpt-4). So when evaluating, it is using gpt-4 as well right?
Is there a way to use an own LLM (e.g. Mixtral) for evaluation with a prompt in the specific langauge? When trying to switch to an own LLM, this error persists: ImportError: cannot import name 'LangchainLLM' from 'ragas.llms' (with the installation from source)

Hi @weissenbacherpwc , No in the example I have used gpt-4 to adapt, it will be only used for adaptation. For evaluation you can use any model of your choice.  There is a slight variation in using llms with langchain
from ragas.llm.base import LangchainLLMWrapper

the rest of the steps should work as is.

got it! will try out and let you know if it works! But good to know that the import for langchain llms changed.

@gitrid Just updated the docs. Refer to the latest docs for all recent changes

I tried it out, unfortunately it doesn't work. E.g. when using faithfulness with an own LLM, it seems like it is computing the score, however it results in a  nan object.
I set the faithfulness prompt to german (worked). Afterwards I bring my own LLM:
from ragas.llms.base import LangchainLLMWrapper
vllm = LangchainLLMWrapper(mixtral-8x7b-instruct-v0.1.Q5_K_M.gguf)
faithfulness.llm = vllm

result = faithfulness.score(mistral_mixtrtal_prompt["train"][0])

When calling result afterwards, I get "nan". However in the cell output, I see that statesments are extracted.
My dataset is structured as follows:
{'question': 'Was ist der Unterschied zwischen einem Blog und einem Forum?',
'answer': 'Ein Blog beschreibtt....',
'contexts': ['für den Wissensaustausch eignen....'],
'ground_truths': ['Ein Blog ist ein OnlineJournal...']}

@weissenbacherpwc Apologies for the late reply as I was traveling. I can help you out in person and debug the issue, would you like that? Feel free to book a slot here https://calendly.com/shahules/30min

@weissenbacherpwc @shahules786 Did you manage to fully evaluate in a different language other than English and by not using API-LLMs? May you provide a short snipped for this?

The automatic language adaption is a true mess. Tried with several models, including gpt-4o but fails everytime. Here's an example of a GPT-4o adapted score_context.json for Dutch:
{
    "name": "score_context",
    "instruction": "\n    Given a context, perform the following task and output the answer in VALID JSON format: Assess the provided context and assign a numerical score of 1 (Low), 2 (Medium), or 3 (High) for each of the following criteria in your JSON response:\n\nclarity: Evaluate the precision and understandability of the information presented. High scores (3) are reserved for contexts that are both precise in their information and easy to understand. Low scores (1) are for contexts where the information is vague or hard to comprehend.\ndepth: Determine the level of detailed examination and the inclusion of innovative insights within the context. A high score indicates a comprehensive and insightful analysis, while a low score suggests a superficial treatment of the topic.\nstructure: Assess how well the content is organized and whether it flows logically. High scores are awarded to contexts that demonstrate coherent organization and logical progression, whereas low scores indicate a lack of structure or clarity in progression.\nrelevance: Judge the pertinence of the content to the main topic, awarding high scores to contexts tightly focused on the subject without unnecessary digressions, and low scores to those that are cluttered with irrelevant information.\nStructure your JSON output to reflect these criteria as keys with their corresponding scores as values\n    ",
    "output_format_instruction": "The output should be a well-formatted JSON instance that conforms to the JSON schema below.\n\nAs an example, for the schema {\"properties\": {\"foo\": {\"title\": \"Foo\", \"description\": \"a list of strings\", \"type\": \"array\", \"items\": {\"type\": \"string\"}}}, \"required\": [\"foo\"]}\nthe object {\"foo\": [\"bar\", \"baz\"]} is a well-formatted instance of the schema. The object {\"properties\": {\"foo\": [\"bar\", \"baz\"]}} is not well-formatted.\n\nHere is the output JSON schema:\n```\n{\"type\": \"object\", \"properties\": {\"clarity\": {\"title\": \"Clarity\", \"type\": \"integer\"}, \"depth\": {\"title\": \"Depth\", \"type\": \"integer\"}, \"structure\": {\"title\": \"Structure\", \"type\": \"integer\"}, \"relevance\": {\"title\": \"Relevance\", \"type\": \"integer\"}}, \"required\": [\"clarity\", \"depth\", \"structure\", \"relevance\"]}\n```\n\nDo not return any preamble or explanations, return only a pure JSON string surrounded by triple backticks (```).",
    "examples": [
        {
            "context": "translate_to: Dutch\ninput: The Pythagorean theorem is a fundamental principle in geometry. It states that in a right-angled triangle, the square of the length of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the lengths of the other two sides. This can be written as a^2 + b^2 = c^2 where c represents the length of the hypotenuse, and a and b represent the lengths of the other two sides.\noutput: De stelling van Pythagoras is een fundamenteel principe in de meetkunde. Het stelt dat in een rechthoekige driehoek het kwadraat van de lengte van de hypotenusa (de zijde tegenover de rechte hoek) gelijk is aan de som van de kwadraten van de lengtes van de andere twee zijden. Dit kan worden geschreven als a^2 + b^2 = c^2, waarbij c de lengte van de hypotenusa vertegenwoordigt en a en b de lengtes van de andere twee zijden vertegenwoordigen.",
            "output": {
                "clarity": 3,
                "depth": 1,
                "structure": 3,
                "relevance": 3
            }
        },
        {
            "context": "Albert Einstein (14 maart 1879 - 18 april 1955) was een in Duitsland geboren theoretisch natuurkundige die algemeen wordt beschouwd als een van de grootste en meest invloedrijke wetenschappers aller tijden.",
            "output": {
                "clarity": "duidelijkheid",
                "depth": "diepte",
                "structure": "structuur",
                "relevance": "relevantie"
            }
        },
        {
            "context": "translate_to: Dutch\ninput: I love chocolate. It's really tasty. Oh, and by the way, the earth orbits the sun, not the other way around. Also, my favorite color is blue.\noutput: Ik hou van chocolade. Het is echt lekker. Oh, en trouwens, de aarde draait om de zon, niet andersom. Ook is mijn favoriete kleur blauw.",
            "output": {
                "clarity": "duidelijkheid",
                "depth": "diepte",
                "structure": "structuur",
                "relevance": "relevantie"
            }
        }
    ],
    "input_keys": [
        "context"
    ],
    "output_key": "output",
    "output_type": "json",
    "language": "Dutch"
}

will fix this with #890
tehre were a lot of bugs with adaption, using that to track everything

This has been fixed with v0.2 - I know finally 😅 🎉
do checkout the docs here: https://docs.ragas.io/en/stable/howtos/customizations/metrics/_metrics_language_adaptation/
reference here: https://docs.ragas.io/en/stable/references/prompt/#ragas.prompt.PromptMixin
and if you're migrating from v0.1 check out the migration docs here: https://docs.ragas.io/en/stable/howtos/migrations/migrate_from_v01_to_v02
could you check it out and verify if not feel free to comment here and I'll help you out - really sorry again that it tool this while


Adding video as a vrView scene

I am able to have multiple scenes with images and hotspots to emulate a user walking around a specific area. I wanted to add one of the scenes as a 360 video, but when I set the video url to either a local video in the project or a file hosted publicly on S3 I get the following
Error
Renderer: either image or video url must be specified
For example for that scene I have the following
victorymoment: {
			video: 'myvideo.mp4',
			hotspots: {
			}

Also tried
victorymoment: {
			video: 'HTTP URL TO MY VIDEO',
			hotspots: {
			}

You need to make sure of the video path, probably you are not setting it correctly.
If you are setting it like video: 'myvideo.mp4' you need to put myvideo.mp4 in the same level as you js file that is accessing it.


astrobase.services.tesslightcurves improvements

Ideas for a hack over the next few days:

[ ] get_eleanor_lightcurves needs to have less restrictive **args and **kwargs
https://github.com/waqasbhatti/astrobase/blob/master/astrobase/services/tesslightcurves.py#L225

[ ] get_cpm_lightcurve(tic_id) needs to be implemented and tested. See https://github.com/soichiro-hattori/tess_cpm/blob/master/dwarfs.ipynb

[ ] get_all_tess_lightcurves(tic_id, method_rank=[‘SPOC’,‘eleanor’]) seems like it would be worth writing, to iterate through a list of methods and download light curves from all of them.

EDIT:

[ ] Get some good tests implemented for each of these, in tests.test_tesslightcurves

Sounds good to me. Go for it!


Login blocked by Cors policy.

I'm in GSSOC'23.
Login route not working.

I can solve this issue. Can you assign it to me.


ci(workflows): Reviewed and replaced contents of workflows with shareable workflow repo

:tada: This PR is included in version 3.0.13 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Responsive Classes

Is there a possibility of adding responsive classes to the framework? It would be nice to be able to build a web app, tablet app and mobile app all at once, but the gridding system provided does not provide responsive elements - so this is difficult.

+1

+1

+1

+1

+1

+1

Hi guys, any movement here. Would be nice to have a tablet layout and also portrait/landscape customization.
+1

@adamdbradley your example above is broken, I'd like to know how to implement the navigation stack

+1  - &  plus 1 million customers :)

+1

+1

+1

+1

+1

+1
Even a guide on how to make tablet version would be appreciated.

+1


pinit:0.2.1

I am submitting

[ ] a new package
[x] an update for a package

Description: To be compatible with Typst 0.12

Thank you.


WIP Legend tweaks

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

2 of 2 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.004%) to 70.407%

Totals

Change from base Build<PHONE_NUMBER>:
-0.004%

Covered Lines:
1164

Relevant Lines:
1557

💛  - Coveralls


OCPBUGS-38976: Change base image of operator-sdk from rhel8 to rhel9

Description of the change:
Change base image of operator-sdk from rhel8 to rhel9
Motivation for the change:
The operator-sdk release Dockerfile (https://github.com/openshift/ocp-release-operator-sdk/blob/2fcf5f0457f4aaccf3043cd99488b1d5050deada/release/sdk/Dockerfile) uses rhel9 based builder image, but uses rhel8 based base image. This may lead to version mismatch of GLIBC and end up in runtime error.
Checklist
If the pull request includes user-facing changes, extra documentation is required:

[ ] Add a new changelog fragment in changelog/fragments (see changelog/fragments/00-template.yaml)
[ ] Add or update relevant sections of the docs website in website/content/en/docs

/cc @TrilokGeer @chiragkyal

/lgtm
/approve

/cherrypick release-4.17

/cc @michaelryanpeter for docs-approved label
/cc @Senthamilarasu-STA for px-approved label

/label px-approved

/label docs-approved


[FEATURE] create GET ProjectsByUserId API

Description
Requirement:
Create an API where we will be getting all projects related to the userid.
It should be secure, authorised user can only see the data.

done by @leewan-09


[BUG] Guacamole does not refresh the VMs list

Describe the bug
Whenever we add a new VMs (user-resource) to the workspace, we expect the guacamole to acknowledge it.
However, Guacamole does not refresh the list of VMs until it is restarted.
Steps to reproduce

Add a new win10 vm user resource
Try reaching it with Guacamole, fails
Restart Guacamole
The VM is now reachable

Method to retrieve the list of VMs need to refresh at some other point, not just on logon.


Add license to project classifiers

This allows tools such as python-license-check to correctly identify the license.

I assumed this project qualified for the MIT license, because that's the one you included in the repository. I see that MRML uses a custom license, rather than one of the common ones. I guess this library would need to use that license as well, at least for the MRML part. In that case, setting a license classifier in pyproject.toml isn't possible, because it's not a common license.


feat: enable jsii builds for the api construct

Description of changes
Building the AmplifyGraphqlApi construct using JSII instead of TSC. This is a required for indexing in Construct Hub.
CDK / CloudFormation Parameters Changed
Input prop shapes for the CDK construct have changed slightly, but the underlying system is unaffected by this PR.
Issue #, if available
N/A
Description of how you validated changes
Unit + E2E Tests pass, build + package all work.
E2E Test Run (only excluding prettierignore change)
Checklist

[x] PR description included
[x] yarn test passes
[x] Tests are changed or added

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

E2E Tests are all passing now except for the existing one that's known, failing.

Is there a way to add a test to make sure that the construct we build here (using JSII) is compatible with CDK on other programming languages? I don't think we need to necessarily do it in this PR, something to consider later.

Re: the questions about testing other platforms, we'll want to add that, but this out of the box doesn't support other platforms.


No plugin file.

How do I get a hold of the plugin file? (.dll, and .so).
I have added all the files where they need to be, and I've compiled my script and it works just fine like that, but I do not have a sscanf.dll file. How am I ment to use this without that file?

There's a special "Releases" section in every Github project, where compiled and packaged releases are made available.


Accounting Ratios widgets

https://github.com/maestrano/impac/pull/420
This needs to go to prod this week as part of the new widgets/kpis for demos
thx @xaun :beers:

@xaun thanks for the review. After having done a first round of testing, I've pushed a few more commits.
Could you please review those and merge the PR if all good for you?
I'm going to deploy the feature branch on UAT to keep the testing going in the meantime


Add Version Support Table

I'm working on a standard for displaying version support on React-Native module README files. I would love your feedback: react-native-version-support-table

that's a nice idea. It looks great to me!

Thanks! Let me know if you end up using it, I'm going to try to keep a running list of repositories at the bottom of my README that are currently supporting it.

will do. I'll add it tomorrow

added!


winit or sdl

Can someone tell me why choose sdl now ?

We are seriously considering switching and I do have a draft ready. Just waiting for kethku to drop multigrid, then it's full steam ahead.


doc tooltips: Part of the definitions-en.tex file is in french

The documentation tooltip is always in french, even if the application is loaded in english.

Actually, the definitions-en.tex file is quite a lot in french, so I guess it is normal and the code in transition works fine, the bug is with the definitions file.

Yes, the english version is still not completley translated


SO-5412: make upload and download buffer size configurable (7.x)

set default upload buffer size to 10 Mb
set default download buffer size to 1 Mb

When large enough files were being uploaded with a small upload buffer
size, promise evaluation halted the upload process possibly of the
reason: the number of upload chunks is equal to the number of promises
wrapped into each other in AttachmentRegistryClient.upload()

💯

The 8.x counterpart PR is https://github.com/b2ihealthcare/snow-owl/pull/1012.


Animating a sequence of meshes

If I have a sequence of meshes where the vertices keep on changing while the faces remain the same. How can I create an animated visualization or save in a video/gif? Sorry, but I can't figure it out from the documentation.

This should work:
scene = mesh(my_mesh)
meshplot = scene[end]
meshplot[1] = new_mesh

You can make the vertices an Observable Array, and update that array.

I am doing this:
scene = mesh(vertices,faces) meshplot = scene[end] meshplot[1].val = convert_arguments(Mesh,new_vertices,faces)[1]
I don't see any change in the rendered window.

Try update!(scene)?

Still unchanged. It did update the scene (the camera view got back to the original), but the mesh remains unchanged.

Why would you change my example code to:
meshplot[1].val

?!?
Updating the private field val is exactly why it doesn't update the plot...

What happens if you do:
overts = Node(vertices)
scene = mesh(overts, faces)
overts[] = new_vertices
update!(scene)

@SimonDanisch It was giving the following error:
ERROR: MethodError: Cannot convert an object of type GLNormalMesh to an object of type Array{Float64,2}
then I checked typeof(meshplot[1]) and it was Observables.Observable{GLNormalMesh}
meshplot[1].val was of type GLNormalMesh so I tried assigning to it.

Ok, well the mistake must have been, that you were trying to update it with something that isn't a Mesh, but setting the val directly doesn't help with that (it just circumvents propagating the update to the plot) ;)
I thought you already have a mesh - but if you don't @asinghvi17 solution might be the way to go!

@asinghvi17 Thanks! it is working as I want.
@SimonDanisch I used convert_arguments(Mesh,new_vertices,faces)[1] to get a GLNormalMesh. Do I need a different type of mesh?

It's not the type but the way it was assigned.  Try meshplot[1][] = newmesh?

Got it! Working perfectly :)
I am new to Julia. Is this kind of assignment specific to Makie or something we can find in Julia too? And if it is not a lot of work for you, I would like to know why this work and the previous one doesn't.

Sorry, you actually run into some pretty confusing behavior of Makie - I didn't realize immediately, because you didn't post the code you actually tried ;) So you should always post what your current code looks like!
The confusing behaviour is that plot[1] returns the signal from convert_arguments(args....)
while plot[1] = new_args... actually corresponds to the input arguments.
So if you do:
meshplot = mesh(arg1, arg2, arg3)[end]
# you will need to do:
meshplot[1] = new_arg1;
meshplot[2] = new_arg2;
meshplot[3] = new_arg3;

This was a work around that I introduced at some point - will try to reevaluate if this is still needed, since it's indeed super confusing!

If I am recording this sequence using record function. The camera view is reset when the record loop executes. Here is what I am doing.
msh = mesh(vertices[1,:,:],faces)
After this, I adjust the camera view using the mouse. Next I do
record(msh,"out.gif",1:size(vertices,1)) do i
       msh[end][1][] = convert_arguments(Mesh,vertices[i,:,:],faces)[1]
       end

During the recording, the camera view is reset. How can I render and save with my desired camera view?

put scene.center = false in front of record

Awesome! center is not a member of scene so scene.center doesn't exist but scene[:center]=false works perfectly.

Did you try it?

julia> using Makie

julia> scene = scatter(rand(4))

julia> scene.center = false
false

Works!

Sorry, my bad. It works. In REPL I was using tabs to scene. and it didn't show center so I tried scene[:ceneter] and it worked.

I see ;) Yeah it's enabled via getproperty which doesn't work with autocomplete :(

You can add it to propertynames for it to work I think?

Oh, good point! I was meaning to research how I can make autocomplete work :)


minimal evaluation

Hi
Thanks for this code.
What you suggest for evaluating this conditional generation?
E.g. what is the easiest code change to get a meaningful evaluation with some metrics (e.g. what about FID)
Any suggestion on which metric could be suitable here
Best regards

I think FID would make sense. Inception score etc also fine. I don't plan on implementing this, but I'm sure there are some easy packages out there that do this already (e.g. https://github.com/mseitzer/pytorch-fid)


HighDPI support?

Hello!
I just tried this out on a windows 10 laptop with a 4k screen, and it's very hard to read the text and everything is tiny.
The windows 10 scaling setting is 200%, which the default for this laptop.
Is this a bug, or is there just no support?
(I'm happy to test more on this machine if needed in the future)
Love the quick start-up time of this app btw!

Hello!
On the Preferences page take a look at "UI Size" and set it to Large. You can also use Shift + and Shift -.
I admit that even 'Large' is quite small, but give it a shot nonetheless.

Cool, yes slightly better!
If the app would also take the windows scaling setting into account, three would be enough!
However, without taking it into account I would need something larger to avoid eye strain!
For reference, here's the windows explorer with Tacentview behind:

Thanks for the pic. Don't disagree ;)
So the easy part would be reading the OS scaling factor. The hard part is testing every window at the new larger size -- whether a function of the scale-factor or the UISize setting, this would need to be done considering how the ImGui calls are being made -- in addition, the font is prerendered into a texture (for speed), so the font sizes are not 'dynamic' and need to be predetermined.
I think the easiest would be to leave this issue open and probably introduce a couple more sizes... it 'could' later take the UI scale into account, but that wouldn't be the lion's share of the work in any case.

I see, yeah, these things are tricky to implement!
For DPI support, having font texture dynamically/lazily created/cached would probably be good since there is also the case with multi-monitor setups with different DPI, so the app might need to switch when the window is dragged between them...

You're welcome ;) I am planning to (eventually) get to this task... I've been doing some experiments... not sure the best approach yet. This comment is mostly for my own reference, so no need to respond unless you want to ;)
I was hoping to just have one higher resolution font texture and globally scale it down. If this could work it would allow reading the OS scale directly and applying it. The image below is not completely convincing though.

The worst case is keeping the really small UI size looking ok... 14 pt.
The left is a magnified view of the font rendered at 14pt and scale 1.0
The right is a magnified view at a 28pt render at scale 0.5. The scale is an ImGui parameter (not quite sure what filtering is being done for the downscale).
Unfortunately the right has a few problems. Will see if I can get better results at higher pt values.

56pt (0.25 scale) left. 14pt right. Still not great. Think I'll stick with the sep renders for 8 distinct pt sizes (14 to 28 in steps of 2). On load only 1 (the current size) need be generated... only if UISize is modified will it need to add to the font atlas. Will need a dictionary to go from the current UISize [0,8) to the ImFont index, since they may be out of order.

Progress on this is proceeding (slowly). The final point sizes are 14pt to 36.4pt. This range is divided into 8 steps. The last step at 36.4pt roughly corresponds to an OS scaling of 250% (max allowed by windows). The first step up after 14pt is equivalent to 100%.
At present some of the UI has been made to work with these extended UI size ranges. Specifically the main operation buttons at the bottom, the details pane, the menu bar, the bottom nav bar, and the slideshow progress indicator now all work. The committed code is still restricted to the bottom three sizes until all UI elements work with the full range -- there's a RESTRICT_UI_SIZES define in Config.h that can be commented out to test the current state.

Cool! I tried it out, already better!
I understand the issue, a lot of values (like button widths) now need to have a multipliers for larger text not to be cut-off!
(Build process was great btw, just works!)

Super. Gotta give some credit to cmake for the build system -- it sure does deal with a lot of the ugly details!
This HighDPI task is forcing a lot of code cleanup... the contact sheet and thumbnail view should work now. I've defaulted it to 'on' and will fix the remaining dialogs / initial positioning of modals b4 next release -- as well as getting it to read the OS scale... the easy part ;)
Appreciate the feedback.

In progress:

Keybindings
Save Multiframe

The system now reads the OS scale. There is an 'auto' mode in the UI Size preferences dropdown. Outstanding issues:

Do not poll the OS scale setting... instead cache it. Set dirty on: a) Regain focus, b) pref change to auto mode, c) Any reset op that changes the UI Size (eg. Reset All, Reset Tab).
Shift+- currently do nothing when UISize set to auto. They should take it out of auto and go to the next bigger or smaller explicit UI size.
Font atlas efficiency. Need a dictionary that maps UISize to font-atlas index. Only load the single needed font on startup instead of all 8. Only load additional if UI size changes (for whatever reason.. maybe DPI scale was modded, or maybe UI size is explicitly set and was modified).

The last part is done. In ab913d6d2a7f96c105be99a7b755e1ef53d55295 "Font optimization. On startup we only create the font atlas with a single font-size. Only if the UISize is modified do we regenerate the atlas with the remaining font sizes. This speeds up load time and in most cases UISize is not going to be modified."
I'm going to close this issue. If there are issues with any of the dialogs not showing text correctly they can be logged as separate issues or we can re-open. I'm not currently aware of any. There may be issues with multiple monitors at different scales... but that can be addressed when I start looking at better multi-monitor support ;)


Linking a node to multiple other nodes of the same type in one transaction

I have a database of people off those people I have a year node that will contain all the friendships they have. Using the map notation I can link the year node to a pre-exisiting person using the uid. But when it comes time to link them to multiple people it doesnt work. It will take what ever the second friend is and link them to that, overriding the first one.
`map = %{
uid: "0x#{attrs[:person_id]}",
person_id: "#{attrs[:person_id]}",
name:  "#{attrs[:person_id]}",
type: "person",
  year: %{
    name: "#{year}",
    friends: %{
      uid: "0x#{attrs[:friend1]}",
    },
    friends: %{
      uid: "0x#{attrs[:friend2]}",
    },
  },
}`

This will link the node to friend2 but not friend1 and if I then add a third friend it will add it to friend3.
The end result would be person has edges from the year to 6 different friends.
Using this map notation is it possible to add multiple edges two the same type of node at once?

As I understand the year node already exists. Correct? If you want to reference and change a node, you have to set the uid in the map. Otherwise a new node will be created every time. Try setting the uid in year.

Yeah i've figured it out, i wasnt using the right syntax so now i can grab the uid and then assign it to that uid as a friend

So I consider this one solved.


Autocompletion in comments for some reason

I don't know why, but autocompletion does not seem to be properly suppressed in comments. I've noticed that if I uninstall and reinstall R-box, autocompletion won't trigger in comments, but then for some reason it starts up again. It doesn't trigger incorrectly if I change the syntax language to R.
Could this be a bug, or am I just doing something wrong?
EDIT: Autocompletion only appears to trigger at the end of commented lines, not in the middle of them, if that helps.

Thanks for the bug report. It is fixed in v3.4.8.


Use CCS in create-cluster test

CCS credential(s) can now be supplied and are used when executing the create-cluster test
Configuration values can be fetched directly from Viper

LGTM! Awesome work fleshing out the implementation @chentex!


corona help doesn't work

corona help doesn't work like advised in the readme file, understood ?

Stop creating multiple issues for the same thing understood ?
Update your CLI npm i -g corona-cli


go build fail UnsafePointer

Discussed in https://github.com/go-gorm/gorm/discussions/6538

Originally posted by SunnyDate August 22, 2023
go version
go version go1.17 linux/amd64
go build
gorm.io/gorm
./gorm.go:382:64: reflect.ValueOf(tx).Elem().FieldByName("db").UnsafePointer undefined (type reflect.Value has no field or method UnsafePointer)
UnsafePointer was added in go 1.18<EMAIL_ADDRESS>In go 1.16 and 1.17, there is not UnsafePointer<EMAIL_ADDRESS>Problem was happened after https://github.com/go-gorm/gorm/pull/6535
To reproduce, run go build gorm v1.25.4 in go version 1.16 or 1.17.
@qqxhb, could you fix it or bump up go version in go.mod?
fyi @jinzhu

Did you solve the problem


Use six.assertRegex to avoid Python 3 test method deprecation.

In contrast to what I said here, there is a point to using six.assertRegex,
as otherwise assertRegexpMatches in Python 3 gives "DeprecationWarning: Please use assertRegex instead."

In contrast to what I said here

Ironically, you actually haven't reverted this change you requested in this PR :wink:


Constructor throw "File is not a zip file" on file created using Word

Hi. I'm trying to parse docx using the BytesIO overload of the Document ctor.  when I parse any docx created using python-docx, the codes snippet below works just fine. However, with those saved from Word, I get the "File not valid zip" error.   I notice that the Word-created files are indeed larger than those created using python-docx, indicative of it not being a zip file. Is there a way to parse a non-zipped stream in this case? I'm on Python 3.11

I'm not seeing any doc.save() call. What's the traceback?
I don't know what the type of stream is, but it will need to be IO[bytes], meaning either an open file or an instance of io.BytesIO, not just bytes.

@scanny , The exception is thrown at the constructor so I still don't have the chance to save the file. Just curious, if I'm just parsing why would I call save()?
The other files created using python-docx work. Only those created in Microsoft Word fail. I got the stream using this function

and is based on Microsoft suggestion here

And lastly, the trace

I hope these make things clear. Thanks for looking into this

It looks like the problem is getting from Azure to BytesIO. I expect if you just save the BytesIO to a file then Word will not open it and probably not zip either. Maybe the .readinto() mechanism defaults to text (str) rather than bytes, I'm not familiar. But the problem occurs before you get to python-docx.

The do open after saving to Azure. I suspect it's Word that's doing something to it. Too bad because all I did here is plain-vanilla save and this is what we expect from our users too.
I'll try to experiment with other versions of the lib and python.
Thank you for your time.

My colleague figured this out. It was the cp037 encoding used by Word.

My colleague figured this out. It was the cp037 encoding used by Word.


ENH: Support S3 LST L2

It would be great to support Sentinel-3 LST level 2 product:
https://sentinels.copernicus.eu/web/sentinel/user-guides/sentinel-3-slstr/product-types/level-2-lst
Unless it is already possible, but after going thru documentation (https://eoreader.readthedocs.io/en/latest/notebooks/why_eoreader.html) I only find level-1, am I correct?

Hello!
Yes you are correct, L2 products are not handled because they are not used in CEMS rapid mapping 😅
Do you know if they are handled like L1 products ?
Did you try EOReader geocoding ? Are you satisfied with it ? I am hesitating to swith from my homemade version to the pyresample library

Hi, thanks for a quick answer.
I am not familiar with L1 or L2 products since I find the whole idea of S3 dataset geometry structure and requirement of using SNAP really tedious.
I do work with MODIS LST & Landsat data.
None of them requires more than gdal & numpy to be processed, and that is why I do not use any other libraries.
But at some point, I will have to add Sentinel data. There is quite a lot of scripts/tools/libraries for S2, but not much for S3.
While looking for the approach (outside SNAP) to transform (and reproject)  S3 LST L2 to geotiff, I found your EOReader library.
So, had no chance to try it.
Are you interested in adding LST L2? I think that would be a very first version of processing w/o SNAP. Unless, there is something out there, which I cannot locate.

I think I will handle this product, especially since it seems easier to handle than L1 products.(S3-L1 products are soooo hard to handle correctly, it is a pity 🙄 )
But this may take some time. I will try to add it to the 0.17.0 but I wont promise anything 😅

Sounds great!
If need any help, please let me know!

So I was on holidays last week, and I just looked deeper into S3 L2-LST data 😅
If I'm right, LST products don't offer spectral bands anymore, only processed data (the whole point of LST haha).
So, I will not implement them (sadly), as the point of EOReader is to map spectral bands between sensors (for optical data) but not to handle any type of product.
However, I think you can automatize the geocoding (and conversion to GeoTiff) quite easily.
It seems there is only one grid, so it simplifies the processing.
You can look at this tutorial (➡ #3b.-Define-Projection-and-Output-Grid)  to see how to handle lat/lon files in Python.
If you have questions, feel free to ask here 😉

Ok, I will explore the tutorial and see how the resulting image compares with SNAP's output product. If that works, I can share the script if interested.
Thanks!

If that works, I can share the script if interested.

Yes I would be very interested !
I think this should follow the tutorial but a confirmation would be great ! 🙏

Hi Remi, I do have a few questions ,and since you have already dealt with S3 I hope you can provide me with answers. Do you mind sending me an email so I can reach you<EMAIL_ADDRESS>If not, then I will elaborate here:)

Email sent :)
However, when reaching a runnable script, it should be nice to post it here 😉

For information, as for release 0.18.0, Sentinel-3 geocoding is using pyresample 😄

Thank you for the information!


fix: Links wrong color - teleport

PR Type

[x] Bugfix

Needs Design check

@exezbcz please review

Context

[x] Closes #9063

how it works link should be blue

✅ Updated

thanks!
pay 20 usd


[New Port Request]  reactphysics3d

Library name: ReactPhysics3D
Library description: ReactPhysics3D is an open source C++ physics engine library that can be used in 3D simulations and games.
Source repository URL: https://github.com/DanielChappuis/reactphysics3d
Project homepage: https://www.reactphysics3d.com/

If you wish to add this port in the future, you can reopen this issue, but we're closing it for now, consider making a pull request instead.


DON'T PANIC: set errormsg font-family CSS to monospace

Some error messages (like those of psycopg2) contain a caret in its own line to indicate the position of an error. Like:
ERROR:  relation "barf" does not exist
LINE 1: SELECT * FROM barf
                      ^

The problem just is that if such an error message is displayed using a non-monospaced font the caret position will be misleading.

good thinking, please line-wrap the css in the same way the rest of the file is

@RonnyPfannschmidt like this?

Excellent, thanks!


[Event Request] Table 5991 Service Shipment Line - InsertInvLineFromShptLine

We have a requirement to add text lines of our own and modify the description of the already created text line. To make this possible we require the following publisher:
[External]
PROCEDURE InsertInvLineFromShptLine@2(VAR ServiceLine@1000 : Record 5902);
VAR
  ServiceInvHeader@1011 : Record 5900;
  ServiceOrderHeader@1008 : Record 5900;
  ServiceOrderLine@1005 : Record 5902;
  TempServiceLine@1002 : TEMPORARY Record 5902;
  ServDocReg@1013 : Record 5936;
  TransferOldExtLines@1007 : Codeunit 379;
  ItemTrackingMgt@1009 : Codeunit 6500;
  ExtTextLine@1006 : Boolean;
  NextLineNo@1001 : Integer;
  lrecServiceOrderHeader@11095585 : Record 5900;
  lbAddYourRefTextLine@11095586 : Boolean;
BEGIN
  SETRANGE("Document No.","Document No.");

  TempServiceLine := ServiceLine;
  IF ServiceLine.FIND('+') THEN
    NextLineNo := ServiceLine."Line No." + 10000
  ELSE
    NextLineNo := 10000;

  IF ServiceInvHeader."No." <> TempServiceLine."Document No." THEN
    ServiceInvHeader.GET(TempServiceLine."Document Type",TempServiceLine."Document No.");

  IF ServiceLine."Shipment No." <> "Document No." THEN BEGIN
    ServiceLine.INIT;
    ServiceLine."Line No." := NextLineNo;
    ServiceLine."Document Type" := TempServiceLine."Document Type";
    ServiceLine."Document No." := TempServiceLine."Document No.";
    ServiceLine.Description := STRSUBSTNO(Text000,"Document No.");
    ServiceLine."Shipment No." := "Document No.";
    ServiceLine.INSERT;
    NextLineNo := NextLineNo + 10000;
  END;

  ///// START
  OnBeforeInsertInvLineFromShptLineOnAfterInsertTextLine(VAR ServiceLine, Rec, VAR NextLineNo);
  ///// END

  TransferOldExtLines.ClearLineNumbers;

Many thanks.

Why in this place? So it will run event if ServiceLine is not inserted?

We need it after the INSERT so I wouldn't mind if it was put inside the IF condition, however I thought this position would be more generic.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.


Could WAWSDeploy be used in an existing Azure Web App?

I'm sorry for making this an issue... it is more of a question. I hope that is ok?
What I am trying to solve is how to take en existing Azure Web App and be able to Deploy this web app to another existing Azure Web App (from TEST -> STAGE for example)
What would be very nice is if one could simply have a Site Extensions (maybe based on WAWSDeploy) that would, given a publishSettings file) Deploy the website to the server given in the publishSettings file.
I'm helping a hosting provider that is running a PaaS services and they can not enforce teir customers to package in a special way. And they do not have access to source. code...
The partners Deploy to DEV Environments (Web Apps in Azure) and what then needs to be done is move that to Another Web App.
Could WAWSDeploy help? or are there better ways?
/Joakim

Please take a look at Site Replicator (https://github.com/projectkudu/AzureSiteReplicator), which does something like this. Though note that it's not an official offering.


[Workers] Add --name to wrangler secret commands

Closes https://github.com/cloudflare/cloudflare-docs/issues/4892

Looks good @KianNH you may want to update this page as well to be consistent with the KEY change.

Hi @lauragift21 - good catch! Updated that page too.


NextJS 10.1.2 Error: Cannot find module 'webpack/lib/rules/BasicEffectRulePlugin'

Do you want to request a feature, report a bug or ask a question?
Report a Bug
What is the current behavior?
NextJS throw this error at runtime:
Error: Cannot find module 'webpack/lib/rules/BasicEffectRulePlugin'
What is the expected behavior?
Everything to be working (had no issue with 10.0.5)
Edit: After testing the error occurs from 10.0.6 and after
https://github.com/vercel/next.js/releases/tag/v10.0.6
If the current behavior is a bug, please provide the steps to reproduce, at least part of webpack config with loader configuration and piece of your code.
next.config.js:
const path = require('path')

module.exports = {
  future: {
    webpack5: true
  },
  reactStrictMode: true,
  target: 'serverless',

  webpack (config) {
    config.module.rules.push({
      test: /\.svg$/,
      include: path.join(process.cwd(), 'assets', 'icons'),
      use: [
        {
          loader: 'svg-sprite-loader',
        },
        'svgo-loader'
      ]
    })
    return config
  }
}

The best way is to create repo with minimal setup to demonstrate a problem (package.json, webpack config and your code).
https://github.com/AlexisWalravens/svg-sprite-loader-nextjs-bug-example
Please tell us about your environment:

Node.js version: 14.16.0
webpack version: 5.28? (nextjs one)
svg-sprite-loader version: ? 6.0.2
OS type & version: MacOS Big Sur 11.2.2

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
./assets/icons/menu.svg
Error: Cannot find module 'webpack/lib/rules/BasicEffectRulePlugin'
Require stack:
- /Users/awa/Documents/Personnal_projects/simply-clean/please-work/node_modules/svg-sprite-loader/lib/utils/get-matched-rule-5.js
- /Users/awa/Documents/Personnal_projects/simply-clean/please-work/node_modules/svg-sprite-loader/lib/utils/get-matched-rule.js
- /Users/awa/Documents/Personnal_projects/simply-clean/please-work/node_modules/svg-sprite-loader/lib/utils/index.js
- /Users/awa/Documents/Personnal_projects/simply-clean/please-work/node_modules/svg-sprite-loader/lib/configurator.js
- /Users/awa/Documents/Personnal_projects/simply-clean/please-work/node_modules/svg-sprite-loader/lib/loader.js
- /Users/awa/Documents/Personnal_projects/simply-clean/please-work/node_modules/next/dist/compiled/webpack/bundle5.js
- /Users/awa/Documents/Personnal_projects/simply-clean/please-work/node_modules/next/dist/compiled/webpack/webpack.js
- /Users/awa/Documents/Personnal_projects/simply-clean/please-work/node_modules/next/dist/next-server/server/config-utils.js
- /Users/awa/Documents/Personnal_projects/simply-clean/please-work/node_modules/next/dist/next-server/server/config.js
- /Users/awa/Documents/Personnal_projects/simply-clean/please-work/node_modules/next/dist/next-server/server/next-server.js
- /Users/awa/Documents/Personnal_projects/simply-clean/please-work/node_modules/next/dist/server/next.js
- /Users/awa/Documents/Personnal_projects/simply-clean/please-work/node_modules/next/dist/server/lib/start-server.js
- /Users/awa/Documents/Personnal_projects/simply-clean/please-work/node_modules/next/dist/cli/next-dev.js
- /Users/awa/Documents/Personnal_projects/simply-clean/please-work/node_modules/next/dist/bin/next

Not that if I manually install webpack (5.28) I have another error just after trying to load the svg:
TypeError: cannot find property 'version' of undefined
There is no stack trace provided.

I added webpack to the devDependencies and the error is gone but I think it more a workaround than anything else.
It's related to that issue: https://github.com/vercel/next.js/issues/21679
Next fixed it by making the webpack object available but you don't require webpack directly so, it not working.
Also now I have this error:
./assets/icons/menu.svg
TypeError: Cannot read property 'version' of undefined

There is no further stack trace.
Repo is up to date if you want to test: https://github.com/AlexisWalravens/svg-sprite-loader-nextjs-bug-example

any update on this issue?

nextjs10.1.2 报错，目前没有办法解决

I have the same problem, but no one seems to be maintaining the issues

I added webpack to the devDependencies and the error is gone but I think it more a workaround than anything else.
It's related to that issue: vercel/next.js#21679
Next fixed it by making the webpack object available but you don't require webpack directly so, it not working.
Also now I have this error:
./assets/icons/menu.svg
TypeError: Cannot read property 'version' of undefined

There is no further stack trace.
Repo is up to date if you want to test: https://github.com/AlexisWalravens/svg-sprite-loader-nextjs-bug-example

Have you completely solved this mistake?

@pangxiaolong No, as I said it's more a workaround than anything, and it works only when using webpack 4 with NextJS if you switch to v5 the error above is still there.

I also have this issue.
Although the problem is gone when you add webpack package to dependencies.
I would rather not have webpack there since Next.js deals this for me.


Support namespaced tags

Is it worth supporting namespaced tags (commonly used in svgs)?
<svg role="img" class="next-icon next-icon--size-16" aria-labelledby="next-website-aecd81959dee2d276ba35c68b2e61e59-title">
  <title id="next-website-aecd81959dee2d276ba35c68b2e61e59-title">View your online store</title>
  <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#next-website"></use>
</svg>

Here xmlns:xlink and xlink:href are not valid in JSx. React works around this by allowing camel cased versions (xmlnsXlink and xlinkHref).

@fandy These are supported in the beta.  Prior to 5.0 (the beta), preact-svg was required in order to support SVG.

@developit Namespaces are valid in JSX now, in fact they are the preferred route instead of camelCase.

Woah, that's awesome. I've been supporting them because they were always possible via hyperscript, I guess that pays off now, haha.

I'm not sure what to do with this issue, since both ways of specifying the attributes should already be supported.  Is there something missing we need to add?

Can confirm this is working in 5.x:  https://jsfiddle.net/developit/0qgbw2sg/4/  (jsfiddle's version of Babel is not current so I'm using hyperscript directly).


Update checkbox style on all pages

Description
Please provide a summary of the pull request and the issue it fixes. Please add necessary details, context, dependencies, explanation of when review is needed (see next section), etc.
Please merge #1020 before merging this pull request
Fixes #1022
Review Time Estimate
Please give your idea of how soon this pull request needs to be reviewed by selecting one of the options below. This can be based on the criticality of the issue at hand and/or other relevant factors.

[ ] Immediately
[x] Within a week
[ ] When possible

Type of changes
Please select a relevant option:

[ ] Bug fix (non-breaking change which fixes an issue).
[x] New feature (non-breaking change which adds functionality).
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected).
[ ] Other (any another change that does not fall in one of the above categories.)

Checklist:
Please select all applicable options:

[ ] I have signed the Rokwire Contributor License Agreement (CLA). (Any contributor who is not an employee of the University of Illinois whose official duties include contributing to the Rokwire software, or who is not paid by the Rokwire project, needs to sign the CLA before their contribution can be accepted.)
[x] I have updated the CHANGELOG.
[ ] I have read the Contributor Guidelines.
[x] I have performed a self-review of my own code.
[ ] I have commented my code, particularly in hard-to-understand areas.
[ ] My change requires updating the documentation.
[ ] I have made necessary changes to the documentation.
[ ] I have added tests related to my changes.
[ ] My changes generate no new warnings.
[ ] New and existing unit tests pass locally with my changes.
[ ] Any dependent changes have been merged and published in downstream modules.

campus setting page checkbox

Will update checkbox on setting page


Simple HTTP Request library added, new random joke generator endpoint…

… added and exception handler added for that endpoint
Kotlin khttp library support added from github with jitpack khttp library
New endpoint added on GET /joke that generates a random Chuck Norris joke
Exception Handler added for error requesting Chuck Norris api Joke API

There are 1 or 2 files (UnitTest) that i didn't modified but appear as modified by me, i don´t really know why.


Update nginx and replace lua5.1 with luajit

The reason to replace lua with luajit is the support of yield/resume in coroutines

LGTM, will merge when travis is green

ping @bprashanth


updated links to show correctly and open in a new tab

updating!

merging to update the links to make them properly display and open in a new tab.

merging to update the links to make them properly display and open in a new tab.


[Feat/ecosystem seata] adding triple sample, adjust non-idl sample

Adjusted the previous sample because it was found that under the new non-idl invocation mode, it cannot be used by the Seata-go proxy (Seata-go's proxy directly uses its methods for invocation). Therefore, a new proxy layer was written using Seata-go's API and non-idl Dubbo-go's API (referencing the implementation approach of the corresponding Seata-go API).
For APIs defined using the proto approach, the implementation approach on the server side involves adding another layer of proxy on top of the Seata-go proxy to serve as the actual invocation proxy for the generated Triple protocol (Triple proxy -> Seata-go proxy -> real function). On the client side, the implementation approach is similar to that of non-idl, with only the corresponding invocation parts being modified.

plz add integration test for this case


Danish translation update for Devise 2.0.0

I forked jgrau's gist and updated it to accommodate with Devise 2.0.0.
The updated gist is located here: https://gist.github.com/1710884

We don't ship translations inside Devise. There is a page in the wiki with links though.


proposal: introduce a build configurations file

(this is a joint proposal by @dominikh and @mvdan)
Abstract
We describe a file format for specifying a list of build configurations, where build configurations are characterized by environment variables and command-line arguments for the build system.
Background
Go has the notion of build tags, which control the set of files that make up a package under a given configuration. Tags can be user-defined and specified with the -tags flag, or they may be defined by the build system itself, bound to parameters such as the operating system and CPU architecture, overridable with environment variables such as GOOS and GOARCH.
Due to these tags, a single import path may effectively refer to a set of packages, each package differentiated by the active tags. While referring to a single build configuration is straightforward (by specifying the correct tags and environment variables), it is much more difficult to explore all relevant build configurations.
Many tools, however, would like to know the list of relevant build configurations, either for correctness reasons (static analysis) or for UI reasons (IDEs, …). A CI pipeline should execute the tests of all relevant build configurations, not just one. Static analysis tools such as staticcheck should analyze all relevant build configurations to detect issues under all viable code paths. Detecting unused functions needs to observe function calls under all relevant build configurations, not just one. A language server such as gopls needs to be able to provide accurate code intelligence and offer the user a list of build configurations to choose from. The list goes on.
Naively iterating through all unique combinations of tags quickly leads to combinatorial explosion. Go supports a dozen operating systems on a dozen CPU architectures, can be used with and without cgo support, and makes use of tags such as netgo and timetzdata to affect how the standard library gets built. On top of this, users define their own tags, for example for debug-only code. This results in thousands of possible build configurations, most of them unique due to a transitive dependency on the runtime package.
In practice, however, only a small fraction of possible build configurations are actually relevant to the user. For example, a project may only be interested in actively supporting Linux and Windows on amd64, never use any of the standard library's tags, and only differentiate their build based on whether it is a debug build or not. This reduces thousands of build configurations down to four.
Since many tools would benefit from knowing the list of relevant build configurations, and because it cannot be determined automatically, it is desirable to be able to explicitly list relevant build configurations in a format that can be shared between different tools.
Proposal
We propose a file format, as well as best practices for using files in this format.
File format
The format is line-based, with each non-empty line describing a build configuration. A build configuration consists of a name, a (possibly empty) set of environment variable assignments, followed by a (possibly empty) set of command-line arguments.
Names are separated from environment variables and command-line arguments by a colon followed by a space. Names can consist of Unicode letters, Unicode numbers, dashes (-) and underscores (_). Names must begin with a Unicode letter or Unicode number.
Quoted strings may be used for elements containing whitespace. The specific format for quoted strings will match that of GOFLAGS, which is currently TBD (see https://github.com/golang/go/issues/26849.) Names must not use quoted strings.
Syntactically valid examples include
windows-release: GOOS=windows GOARCH=amd64 -tags=debug,feature1 -gcflags=-N
b1: GOOS=windows GOARCH=amd64
debug-feature: -tags=debug,feature1
debug: -tags=debug

A line is split into environment variables and command-line arguments at the first element that is not a valid environment variable assignment. Usually, this would be an element that begins with a dash, or one that does not contain an equal sign.
The process environment described in a build configuration is merged with the existing environment, with the existing environment taking precedence. Command-line arguments will be passed to the build system verbatim, but tools are free to add additional arguments, and it is not specified whether tools pass their own arguments before or after the arguments specified in a build configuration.
The format itself puts no restrictions on allowed environment variables or command-line arguments. However, it is strongly advised not to modify the workspace itself. That is, variables such as GOPATH or GO111MODULE should not be modified. It is assumed that build configurations are executed in the context of an already configured workspace. Furthermore, command-line arguments should only be used for passing flags and their values and not, for example, to specify additional packages.
Tools
Different tools have different requirements and may make use of files in this format in different ways, but they should keep the following points in mind.
Tools should allow specifying a file, but they may look for a default file name.
There are various reasons why a project may use more than one build configuration file. For example, it may want to build binary releases for only a small set of first class platforms, while still running static analysis for more platforms, to future-proof their code. Or, a parameter that meaningfully differentiates binary builds does not contribute anything to static analysis: compiling with and without -gcflags=-N will produce meaningfully different binaries, but statically analysing both versions would be a waste of time. Or it may have different lists of platforms to execute tests on for CI and local development. Many other reasons exist.
Therefore, tools should allow selection of the file to use.
It is, however, desirable to agree on a default file name to look for, so that every tool needn't be configured manually, especially for projects that can make do with a single file, and so that tools can use build configuration files by default. The default file is located at the top of the project, for example the top of a Go module. For build systems that do not have a notion of projects, such as Go in GOPATH mode, we don't define a default location at this moment.
Most tools should deduplicate build configurations to avoid unnecessary work
For most tools, it makes no sense to execute duplicate configurations. However, duplicate configurations may occur from concatenating files, or from on-the-fly generators that do not deduplicate configurations themselves. Therefore, tools should only execute unique configurations.
Tools should allow using the current build configuration
While tools may use existing build configuration files by default, they should also allow executing the active build configuration as specified by the user's current environment. In its simplest form this would be by ignoring build configuration files and operating as tools did before implementing this proposal. It may also take the form of manually or automatically appending the current configuration to the list of configurations to execute. For example, when executing staticcheck, the user would assume that their active configuration will be used, regardless of other configurations that may be used as well.
Tools may allow using specific build configurations
Depending on the tool, it may be useful to allow selection of individual build configurations, for example by their name.

placeholder

placeholder

I don't really like the idea of having a file that causes tools to run with arbitrary environments and I don't really understand why it's needed here. ISTM that by putting flags into the build configuration, we already make that configuration specific to a certain build system - bazel or others don't really have a -gcflags flag, do they? And if the file was specific to the go tool, then ISTM a pretty easy thing to do for the environment whitelist would be to restrict to that mentioned by running go env. Though TBH, I don't really want even CC to be set from a local config. I could well imagine that it would be possible to have a repository contain a malicious config that sets CC or so to a binary shipped in the repo and have gopls execute this when I open a file in vim.
The other comment I have would be: Why not Make? I'm not a huge fan of needing Makefiles to build code, but ISTM that all this format needs to be a Makefile would be some linebreaks and tabs and a "go build" in the right spot. So, if we have this file anyway, why not converge on something existing?

ISTM that by putting flags into the build configuration, we already make that configuration specific to a certain build system - bazel or others don't really have a -gcflags flag, do they?

A given file would be specific to a build system, yes. Projects don't usually use multiple build systems. But the file format would be generic enough that any project could use it, regardless of chosen build system.

Why not Make?

Because executing a program multiple times isn't always a viable solution. For example, staticcheck wants to know the different combinations of GOOS, GOARCH and tags, in a single invocation. And gopls ideally doesn't want to depend on make and a Makefile following a certain structure.
This proposal is much more about tools being able to discover build configurations than it is about spawning executables.

I could well imagine that it would be possible to have a repository contain a malicious config that sets CC or so to a binary shipped in the repo and have gopls execute this when I open a file in vim.

I'm ashamed to say that I did not consider the security implications of this. We have similar problems with changing GOPATH or GOBIN or GOPROXY/GOSUMDB and probably many others. I don't have a solution to this.

A given file would be specific to a build system, yes. Projects don't usually use multiple build systems. But the file format would be generic enough that any project could use it, regardless of chosen build system.

I still don't understand this. You mention an example file:
windows-release: GOOS=windows GOARCH=amd64 -tags=debug,feature1 -gcflags=-N
b1: GOOS=windows GOARCH=amd64
debug-feature: -tags=debug,feature1
debug: -tags=debug

To clarify: Would that file look exactly the same if you'd use bazel, for instance? If so, how would I, as a project maintainer, use this to build my project?
Or would the file in this case look more like
windows-release: :main --platforms=windows
linux-release: :main --platforms=linux

and in that case, how would a tool that has never heard of bazel translate that into useful information?

I realize that I come off as intensely negative here, so I want to clarify: I'd really like having a mechanism like this. As elegant as I find the tags- and GOARCH/GOOS approach to conditional compilation the go tool has taken, the exact issues you are mentioning and are trying to solve have always bugged me. I'm all for explicitly listing a set of valid build configurations. I just don't see how build configurations can be listed agnostic to the build system used, while staying even remotely declarative.
If, OTOH, we were to restrict this to the go tool itself, this would open up possibilities for a purely declarative format. If, say, you could only specify combinations of GOARCH/GOOS and the build tags to use, this would still fulfill at least 90% of the use-cases I could think of, while being absolutely declarative with no security issues I could think of. And you could then have a detailed look at other flags or environment variables to whitelist them and might even be able to come up with a way to make it forwards- and/or backwards-compatible with future additions to that whitelist.
Of course, that would also mean that this file can't be used if your project can't be built with the go tool. Personally, I find that a small price to pay for far more well-defined semantics; at the end of the day, I don't really see it as the job of the go project to define its interactions with any and all third-party tools out there. And it would still be possible for projects like bazel or the like to provide a way to programmatically generate this new build format from a BUILD.bazel or vice versa (akin to what gazelle does) to take advantage of the benefits.
So, anyway, it's because of how much I'd like a solution to this problem that I'm trying to hammer the suggested solution into something I'd consider more workable :)

Would that file look exactly the same if you'd use bazel

The file would look different depending on what build system your project uses. This is the same approach that https://pkg.go.dev/golang.org/x/tools/go/packages takes, if you look at its Env and BuildFlags inputs.
The main use case here is tooling, so it makes sense to me that the design should be compatible with go/packages, and with how it can support more build systems than just go list.

how would a tool that has never heard of bazel translate that into useful information?

If you use go/packages as a tool on a project, the right build system should be chosen automatically. Following the same rule, if the project has a default "build configurations file", it should contain environment variables and flags for that default build system.
This is all a bit theoretical at the moment, as go/packages only supports one build system as of today.

I'm trying to hammer the suggested solution into something I'd consider more workable

For what it's worth, we did consider a more constrained and less generic format at first, where we could interpret each "build configuration" statically. However, that didn't make sense to us because it would mean only supporting a single build system. It could make sense for cmd/go itself, but it would not make sense for go/packages or the tooling ecosystem in general.

Also, I concur with the sentiment that this is a problem really worth solving, but it's also really hard to solve well. I also worry about potentially malicious or costly files being picked up automatically. Personally speaking, I don't care about build systems other than Go's own, but I don't think it's good long-term planning for tooling.

A few loosely related thoughts:

This reminds me of .bazelrc files. Essentially, line in a .bazelrc file consists of a command (build, test, and so on), an optional configuration name, and a list of arguments. When running a command, Bazel acts as if those flags were passed on the command line. If the configuration has a name, you have to explicitly pass a flag like --config=remote to get the flags for that configuration (allowing you to easily switch configurations). bazelrc files can be project-specific (in the workspace root directory), user specific (in your home directory), or system-wide (in /etc).
Along that line of thought, it would be difficult for Bazel to support this directly. Automatically it to a .bazelrc file or something else might work.
CI systems would probably not be able to consume this directly either. You'd have to tell CI to run on Linux and Windows, and so on, and you'd have to tell it which configurations to use for each platform.
In general, I think this should be restricted to global configuration for a build. If the go command picks up configuration info from other modules, that would be very confusing.
I'm anxious that any new configuration file would be the target of a lot of scope creep. I could see people wanting to use this to configure other analysis and code generation tools. We have a lot of similar requests for go.mod features.

@mvdan Ah, so the intended way for tools to consume this file is to use it as an input for go/packages. That makes total sense and it also makes sense to design the format to work well with the existing API. So my questions are mostly answered and my concerns are probably more relevant to the eventual integration of go/packages with other build systems :)

The background could maybe use a summary of ways this problem is solved in other dev environments requiring a build step, and why each of those couldn't be made to work well with Go, and shouldn't be emulated in a new solution.

We do not attempt to implement a whitelist of environment variables

This scares me. Let's say go build wants to invoke gcc. If you clone my project, can I guess your home directory and assume the repo is in ~/go/src/example.com/myproject, add PATH=/home/jdoe/go/src/example.com/myproject/evil:/bin:/usr/bin and get you to run my attack shell script, named evil/gcc?

This is, to me a very interesting topic, although I think a simple text file with env variables would not be enough. I really like Rust's build.rs and Zig's build.zig (another example here). I personally include a build.go file with the build flags set to //+build build and I just run it as a standalone script (example in one of my projects). What do you think of this?
PS: I generally use my build.gos to also package binaries, assets and whatnot but I know the main concern now is the build step

@Baldomo running arbitrary code as part of the build is definitely not something we want. The fact that the current design allows for that kind of thing to happen via flags like -toolexec is a bug, not a feature. In general, the build configuration should be about parameters to go build, not about running a script or doing any extra work one might want.

@mvdan I totally understand and I think at least having something like this declarative descroption file is the right way forward (also it being possibly optional is pretty cool). I hope someone comes up with a way of avoiding malicious program being called but it's not an easy problem to solve. I will be sticking to the build.go for now but I'll be keeping an eye on this proposal and I hope people will find it useful

I am retracting this proposal. It has an obvious flaw (arbitrary code execution) and hasn't gained any traction. The idea can be revisited in the future, in a less wrong way.


let's hope TypeDoc is not a overkill ...

#252
#73
Sorry, I was struggling to make jsDoc work for typescript. However, I found a blog by cloudflare talked about TypeDoc.
I tried it, it's simple, powerful ! And worked for the entire project!
To install:
npm install typedoc --global

To run
cd wechaty
npm install
typedoc --out typedoc src/

And it generated the entire html doc page as I pull requested.

This is auto-generated content, just give an idea about how TypeDoc looks like.
I will close this PR, since it's not necessary an enhancement on Wechaty project.


macOS package universal binary fix

hostArchitectures="arm64,x86_64" option is added to the distribution.xml of the macOS package to remove rosetta dependency.
Closes #172

Awesome! I need to look into how I can verify that this is the fix.
It'll be sufficient to approve to build and verify that everything that used to work still does.

The package should work as it already does on Intel Macs and Rosetta-enabled M1 Macs. To test the fix, an M1 Mac without Rosetta is required. I If you don't have access to a suitable Mac, I might test the fix on my system if you are willing to create a package with it.


Implement filetype detection unit test.

Let me know if this is a good way to structure it.

lgtm, merge away!

Sorry, I just saw the actual path to the test fixture... Maybe putting it in e.g. lua/tests/fixtures/example-lean-project/ is a bit tidier than having it in the root directory.


Does it support collapsible header for top tab?

Hey,
Looks like exactly what I was looking for. Only issue for me seem to be whether this can support material-top-tab swipe? I tried the demo react-native-header/example/src/screens/usage /TwitterProfile.tsx but it has Buttons instead of tab.
Are there any workarounds to make it work with swipe, and be able to collapse the header like that page? Basically, it's TwitterProfile.tsx but with an actual top tab. I played with it and replaced SectionListWithHeaders with ScrollViewWithHeaders but got nowhere.
Thanks!

Thanks for opening this issue. I simplified the implementation slightly for the TwitterProfile example. I'm not exactly free at the moment to tackle this but these are the challenges:

Synchronizing the "swipe gesture" on a sibling view with a ScrollView does not have much documentation right now on react-native-gesture-handler AFAIK (I know that gorhom's bottom sheet is able to achieve this with their BottomSheetView component but I haven't had time to dive deeper). When I say synchronizing, I mean applying a swipe on the native view that will scroll the ScrollView with the correct momentum and deceleration rate.
Having multiple swipeable tabs can be done with react-native-pager-view, but will require a sizeable re-write of this library to do correctly
"Collapsible" headers are not implemented yet, would require a sizeable amount of work to do

I won't be free for the next few weeks, but if you would like to contribute, feel free to open a PR!


Make call to FakeValues#loadValues once

Probably a solution for #574

Codecov Report

Merging #575 (13ce1f2) into main (d4c21e1) will decrease coverage by 0.12%.
The diff coverage is 77.77%.

@@             Coverage Diff              @@
##               main     #575      +/-   ##
============================================
- Coverage     92.56%   92.43%   -0.13%
+ Complexity     2427     2424       -3
============================================
  Files           252      252
  Lines          5082     5089       +7
  Branches        551      553       +2
============================================
  Hits           4704     4704
- Misses          249      251       +2
- Partials        129      134       +5

Impacted Files
Coverage Δ

...rc/main/java/net/datafaker/service/FakeValues.java
82.17% <77.77%> (-0.81%)
:arrow_down:

...ker/idnumbers/pt/br/IdNumberGeneratorPtBrUtil.java
92.59% <0.00%> (-3.71%)
:arrow_down:

.../java/net/datafaker/service/FakeValuesService.java
86.07% <0.00%> (-0.63%)
:arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


luci-theme-material: fix wrong active state on common prefix node

Before fixed, if we have two nodes: 'services/ddns' and 'services/ddnsto',
click any one of they, will show they all actived.
Signed-off-by: Liangbin Lian<EMAIL_ADDRESS>

ping @jow- @feckert

Merged, thanks


Add documentation for turf-aggregate

PR for the first one, will commit directly to master for the others (if that's cool).
/cc @tmcw @morganherlocker

:+1: awesome - want rpl-ize this too, so you can get the hang of that off the bat? I'll add inline notes

Should be ready to go but could use a once-over.

:+1: merge it!

Hooray! Onto the next one. :goat: :egg: :vhs:


Make it a official github supported language

Not a bug, but like a feature request.
Refer to: https://github.com/github/linguist
Lets make Ark an official github supported language, this will highlight code on GitHub and adds something like an 'trending' page.
This could also be done in future.

You have to have at least 100 repos to qualify for linguist :/ , we were discussing this on Gitter the other day.

@SamTebbs33 Ok didn't knew that. Is there a reference for this? Haven't seen it in the README of linguist.

Yeha, here it is: https://github.com/github/linguist/blob/master/CONTRIBUTING.md

ahahaha I like your optimism, maybe one day -- for now let's just focus on getting it to work :wink:

@SamTebbs33 Yes, but note the language used "we prefer that each new file extension be in use in hundreds of repositories before supporting them in Linguist.". This means that they would prefer it to be in the hundreds, but it isn't mandatory.

Well, good point. I do think that they wouldn't accept a pull request from a language that doesn't have like 50.

There is (almost) 0 lines of "real" Ark code written in other repositories, so we wouldn't even make a change as of now.


Systray icon has insufficient contrast in Windows light themes

I've just installed the proxy on a new Windows 11 laptop, which came configured with a Windows "Light" theme that uses light background colors in the taskbar and elsewhere.  The "OA" systray icon is designed to be white with a transparent background, and as a result, it is practically impossible to identify the icon unless I customize the Windows operating system to a darker theme:

I would suggest modifying the icon to give it sufficient contrast to work in both dark or light modes.  One possibility is to add internal and external borders in a dark color, as illustrated in this mock-up:

Alternatively, change the icon color to something other than white.
Thanks!

This is a trade-off between having sufficient cross-platform compatibility and the need to do lots of per-platform customisation.
I use macOS, so have focused on that platform. With macOS it is possible to set menu bar (i.e., system tray) icons to be seen as "templates", which makes the OS treat them as a mask that is automatically modified in light/dark mode, rather than using the icon directly. I'm not sure if this is possible on Windows, but I'm happy to accommodate it if something like that exists.
If not, you can change the colour of the icon here.

To follow up, this small edit should make the icon colour react to the theme type (at startup only; not if you change theme while running the proxy). Could you add it here and let me know whether this works for you?
         icon_background_height = 44
         icon_width = 40  # to allow for padding between icon and background image size

+        if sys.platform == 'win32':
+            import winreg
+            try:
+                key = winreg.OpenKey(winreg.HKEY_CURRENT_USER,
+                                     r'Software\Microsoft\Windows\CurrentVersion\Themes\Personalize')
+                icon_colour = 'white' if winreg.QueryValueEx(key, 'AppsUseLightTheme')[0] == 0 else 'black'
+            except FileNotFoundError:
+                pass
+
         # find the largest font size that will let us draw the icon within the available width
         minimum_font_size = 1
         maximum_font_size = 255

To make things easier, this change is now in the icon-colour branch. Let me know how you get on?

Here's a preview build of this branch – could you let me know whether this works?

Thanks for the pointer. Does this new version with that change work as expected for both theme types?

Great – third time lucky, then: how about this version?

Excellent! Thanks for reporting this and for testing the various attempts to solve it. I'll merge this branch and it'll be in the next release.