feat: Track more data source metrics during execution

Adds additional metrics tracking for data sources:
> CREATE EXTERNAL DATABASE my_pg
::: FROM postgres OPTIONS (
:::   host = 'pg.demo.glaredb.com',
:::   port = '5432',
:::   user = 'demo',
:::   password = 'demo',
:::   database = 'postgres',
::: );
Database created
> explain analyze select * from my_pg.public.customer;
┌───────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ plan_type         │ plan                                                                                │
│ ──                │ ──                                                                                │
│ Utf8              │ Utf8                                                                                │
╞═══════════════════╪══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡
│ Plan with Metrics │ RuntimeGroupExec: runtime_preference=local, metrics=[]↵                                                                                │
│                   │   RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=1, metrics=[send_time=514.826µs, fetch_time=1.588055543s, repart_time=1ns]↵ │
│                   │     PostgresBinaryCopyExec, metrics=[output_rows=150000, elapsed_compute=1ns, bytes_processed=40962000]↵                                         │
│                   │                                                                                │
└───────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

This also includes a bytes_processed counter for tracking the number of bytes when reading in batches. The idea is that we can walk the plan after execution to get the total number of bytes processed, and emit that somewhere.

I opened this up to get thoughts before moving on to replace the session_query_metrics table and related code and look at how we want to persist them.

maybe also track bytes written? Thats sort of harder?
Do we have to commit to a set of fields now or is this flexible?

I'm not sure how much schema change we can tolerate? I think this is a good start for data but don't know if we'd end up wanting other data? (Input rows, output bytes, etc.)

Defining the metrics is easy and flexible, but I don't have a good idea on what that looks like at the persistence layer (or even if we want to persist these ourselves).

Added issue for additional metrics we want to track: https://github.com/GlareDB/glaredb/issues/1862


elmPackages.elm-0.19 is elm-0.18

Issue description
When I want to install elm-0.19 from 18.09 nix says it is version 0.19 but it is 0.18
Steps to reproduce
$> nix-shell -p elmPackages.elm -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/18.09.tar.gz
unpacking 'https://github.com/NixOS/nixpkgs/archive/18.09.tar.gz'...
these paths will be fetched (2.18 MiB download, 13.70 MiB unpacked):
  /nix/store/m4mx8yhbfscq34gfpplgn6f47l710i79-elm-0.19.0
copying path '/nix/store/m4mx8yhbfscq34gfpplgn6f47l710i79-elm-0.19.0' from 'https://cache.nixos.org'...

$> elm --version
0.18.0

Technical details

system: "x86_64-linux"
host os: Linux 4.14.78, NixOS, 18.09.git.06fb025 (Jellyfish)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.1.1
channels(palo): ""
channels(root): "nixos-18.03.133245.d16a7abceb7"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Strange on my other machine this is not the case.


Make sure warning codes are unique in IE

We currently manually create warning code numbers and have no way of making sure they're unique.
See https://github.com/prisma/prisma-engines/blob/main/introspection-engine/connectors/sql-introspection-connector/src/warnings/generators.rs

Hi there,
As part of our effort to clean up our GitHub repo, we’re closing this issue to help focus on features and improvements that align with our focus areas and those of our community.
This issue was originally created for internal tracking purposes, but if you feel this is important to you, feel free to reopen the issue and get like-minded users to upvote as we will prioritize fixing issues based on community interest.
For more insight into our priorities and how we’re thinking about the future of Prisma, please see our blog post: https://www.prisma.io/blog/prisma-orm-manifesto.
Thank you for your understanding and support!


Cursed Skeleton Arrows Don't Despawn

Issue Description
Arrows from Cursed Skeletons don't despawn and they are keep building up
Screenshots
https://imgur.com/a/EOUGbRU

Hi, does this mod work for you on 1.12.2? Because I'm sorry I'm spawning this mod's mobs.
To solve your problem use: /kill @e [type=!Player]


Intermittent 502 error in Azure otherwise runs great locally

I've come across an issue I've had before. I previously thought I had solved it by finding a bug in my function but now I'm just not sure. I think something else is happening. Could still be my fault but I don't know where to look.
I have a function that queries UPS for tracking information. I process the result and send my own result. This function is used in a Logic App. This is what I just experienced.

I manually ran the Logic App
I sat and waited for the app to finish (normal time is about 2 minutes)
The job took almost 7 minutes to finish
When reviewing the run I found that some requests to my Function took 7 minutes to return and those that did return, returned a 502 error
I immediately ran the function locally (against the same tracking numbers that failed) and got correct responses within 1 second
I tried manually running the function in the Azure portal (via the Test feature) and, this time, it took almost one minute to complete but it did complete
A few seconds later I reran the same test run and it took just a few seconds to run

Investigative information

Timestamp: 2017-07-14T18:53:23.461
Invocation ID:  b58af0fb-6e85-4836-8ea0-87b7c564bdd2
Region: South Central US

Repro steps

Run the function an unknown number of times and intermittently you'll get a very slow execution or timeout

Expected behavior
The function should complete execution in under 5 seconds.
Actual behavior
Execution time varies wildly from seconds to 7 minutes.
Known workarounds
None.
Related information
This is a JavaScript HTTP trigger. I have two NPM modules loaded at the root of the function app.
This was the output of the test run I mentioned above in step 5.
2017-07-14T18:53:17  Welcome, you are now connected to log-streaming service.
2017-07-14T18:53:23.461 Function started (Id=b58af0fb-6e85-4836-8ea0-87b7c564bdd2)
2017-07-14T18:54:41.650 Function completed (Success, Id=b58af0fb-6e85-4836-8ea0-87b7c564bdd2, Duration=78181ms)

I checked on another run of the Logic App and found another sample of slowness. I did another manual test in the Azure portal and got the following output.
2017-07-14T19:56:09.142 Function started (Id=6213b2d1-320c-4fe5-ae14-57a42fe1d222)
2017-07-14T19:57:06.559 Function completed (Success, Id=6213b2d1-320c-4fe5-ae14-57a42fe1d222, Duration=57409ms)

Immediately after I started that test I went and tested in locally. In ~2 seconds I got the expected result. I also got the expected result from the Azure portal but it just took much longer to process.
Other things to note are:

The Logic App reports the time taken as 7m - 8m whereas the portal is just about 1m.
Subsequent clicks of the Run button in the Azure portal give me <1s execution times.

OK umm... why is this happening to me? I struggle with a problem, find nothing but confusing (to me) results, then finally give up and come to the team for help, and then... find the problem. Seriously.
Here's the thing. Everything I've said above is true: the Logic App 7-9m execution times for some UPS tracking numbers so I run it locally and it works flawlessly. No idea what's going on.
I checked about 4 different failed tracking numbers. All run fine (maybe a little slow in the Azure portal). And then I checked a 5th one and my local dev environment crashes. I've found a problem and I've fixed it. I pushed a new commit and reran my Logic App. Success!
Assuming I know how Functions is architected, the results here have given me an idea on what might be happening. why I'm seeing such weird results.
I think the one "bad" tracking number was poisoning the Function App. It might be a timing thing.
For example:

Logic App has 20 numbers to check
It runs through a foreach and does 20 calls to my Function
Depending on what order they are actually executed in (versus how they display in the Logic App results) determines whether they are "poisoned" by the "bad" number (the one causing my Function to crash.)

In other words, the displayed results might look like this:

Success
Success
502
502
Success
502
...
Success
502
502

But the actual execution order was:

Success
Success
Success
...
Success
Bad # (502)
502
502
502
502
502
502
502
502

This brings up one last thing, I think. Can the log window show a stack trace at crashes like the local dev environment does? That would be great.

I think I am also getting these http 502 , after function is IDLE for long time, and is called
https://github.com/Azure/azure-functions-host/issues/2763

has this been solved at all yet ? just come across the same issue in one of my apps hosted. it wouldnt be quite as bad if the failures were consistent

@Bithellio Can you try rebuild and publish using latest Visual Studio 2019 Preview and Azure Functions (V2)? Seems to have solved this here for me.

I just ran into this as well.

Same issue, I am facing. Also using Microsoft.NET.Sdk.Functions Version 1.0.29.
Tried re-publish app with new repository but found no solution.

I have updated my Azure Functions to v3, TargetFramework to netcoreapp3.1, and Microsoft.NET.Sdk.Functions to version 3.0.2 and it is much stable.
For reference, here is a csproj file:
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <AzureFunctionsVersion>v3</AzureFunctionsVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.2" />
    <PackageReference Include="MySql.Data" Version="8.0.18" />
    <PackageReference Include="System.Data.OleDb" Version="4.7.0" />
  </ItemGroup>
  <ItemGroup>
    <None Update="host.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="local.settings.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <CopyToPublishDirectory>Never</CopyToPublishDirectory>
    </None>
  </ItemGroup>
</Project>


Bug/#19 add feature fails on null symbol code

Added code in several methods to throw IllegalStateException if symbol code is null.
Also added checks in Feature and Overlay classes if caller tries to add a feature with a null symbol code.

All comments have been addressed

To test, build this branch #19 and run test basic.  From the Test menu, draw a mil std symbol and in the dialog box leave the symbol code empty.

Tested

app crashed after continuing without symbol code

That's correct.  We no longer fail 'silently' as the ticket says.


slice bounds: slice expands sometimes, out of range error other times

I'm a bit confused by the behavior of this code:
a = make([]int, 2)

a[0] = 10
a[1] = 20
printf("%v\n", a)
a[2] = 30
printf("%v\n", a)
a[4] = 40
printf("%v\n", a)

It prints this:
[10 20]
[10 20 30]
8: index out of range

(see http://play-anko.appspot.com/p/05fd341ac9a532e97d1fed1f66f264ba479aa6ec for a runnable example)
Based on my limited exploration, it seems like assigning to a[len(a)] is ok, even though the slice was declared to be smaller than that, but assigning a value to a[len(a)+1] is not ok. Here's how I'd expect things to work:
a = make([]int, 2)
a[0] = 10   # ok
a[1] = 20   # ok
a[3] = 30   # not ok!
a += 30   # ok!

Looks like it is working as expected. There is an auto append feature.
For example, this code should not error:
a = make([]int, 2)
for i = 0; i < 1000; i++ {
  a[i] = i + 1
}

Ok, so to make sure I understand properly before I close the issue: it will auto-append if you specify an index immediately after the current end of the slice, but not any other index?

Basically: if len(slice) == index then auto append else error
If you want, here is the code to look at:
https://github.com/mattn/anko/blob/master/vm/vmLetExpr.go#L107-L128


Updating REST Transport Documentation

This PR updated the REST Transport Documentation to reflect the new modified REST Transport
Test Steps:

Include steps to test these changes

Changes

Include a comprehensive list of changes in this PR
(For web UI changes) Include screenshots/video of changes

Checklist
Testing

[ ] Tested locally?
[ ] Ran ./prime test or ./gradlew testSmoke against local Docker ReportStream container?
[ ] (For Changes to /frontend-react/...) Ran npm run lint:write?
[ ] Added tests?

Process

[ ] Are there licensing issues with any new dependencies introduced?
[ ] Includes a summary of what a code reviewer should test/verify?
[ ] Updated the release notes?
[ ] Database changes are submitted as a separate PR?
[ ] DevOps team has been notified if PR requires ops support?

Linked Issues

Fixes #issue
https://app.zenhub.com/workspaces/engagement-6166edbd409257001e09f1b2/issues/gh/cdcgov/prime-reportstream/12680

To Be Done
Create GitHub issues to track the work remaining, if any

#issue

Specific Security-related subjects a reviewer should pay specific attention to

Does this PR introduce new endpoints?

new endpoint A
new endpoint B

Does this PR include changes in authentication and/or authorization of existing endpoints?
Does this change introduce new dependencies that need vetting?
Does this change require changes to our infrastructure?
Does logging contain sensitive data?
Does this PR include or remove any sensitive information itself?

If you answered 'yes' to any of the questions above, conduct a detailed Review that addresses at least:

What are the potential security threats and mitigations? Please list the STRIDE threats and how they are mitigated

Spoofing (faking authenticity)

Threat T, which could be achieved by A, is mitigated by M

Tampering (influence or sabotage the integrity of information, data, or system)
Repudiation (the ability to dispute the origin or originator of an action)
Information disclosure (data made available to entities who should not have it)
Denial of service (make a resource unavailable)
Elevation of Privilege (reduce restrictions that apply or gain privileges one should not have)

Have you ensured logging does not contain sensitive data?
Have you received any additional approvals needed for this change?

Used the existing Report.formFileName to generate the filename.  Therefore, we don't need to update the document.


[RV_DM]rv_dm_scoreboard

This commit contains a change which add a condition which check for signal 'lc_hw_debug_en'. This change is for sequence 'rv_dm_sba_debug_disabled_vseq'(#21042).If this signal this Off then it would not check error condition because this is expected behaviour. Otherwise if signal is On, then it will check error condition.

@jdonjdon


[Quasar2] QCalendar wrapper template ref

Describe the bug
At the moment the wrapper works, as you can specify all properties etc, but accessing the wrapped component by ref does not.
E.g. if you want to call next().
You can not simply assign a template ref to the QCalendar component as this will target the wrapper and not the wrapped component.
Adding a property (e.g. reference and use ith(..., {..., ref: props.reference},...) does not work either (neither using the variable name of the ref as done in the the template , nor using a variable directly).
The only working version I found was using provide() and inject()[1].
To Reproduce

Assign a template ref to QCalendar
Call a valid method on that ref
See error

Expected behavior
Wrapped components behavior.
[1] Using inject for ref

@susnux Yes, this will be an interesting one to handle. Might have to be how it was previously with wrapper methods that call child methods.

@susnux If you were curious, this is what I came up with: https://github.com/quasarframework/quasar-ui-qcalendar/blob/next/ui/src/components/QCalendar.js
If you can see improvements needed, feel free to let me know or PR them.

Looks good!


suggestion for updating the news

Just a tiny update to show what is going on before the workshop

Thanks! I will add more here.


Add phar?

Most tools similar to this one (e.g. phpstan, php-cs-fixer) make a phar version available for download.
It would be nice to see the same here.

Most tools similar to this one (e.g. phpstan, php-cs-fixer) make a phar version available for download. It would be nice to see the same here.

Hi, thanks for the suggestion.
I never build a phar, how hard is it ? I'm open to PR.
Also I'm not sure a phar would be the better way to use this tool ; wouldn't it recreate issues like https://github.com/VincentLanglet/Twig-CS-Fixer/issues/206 ?
I automatically add TokenParser based on dependencies installed in the same folder than the Twig-Cs-Fixer, would it still work if it was installed with a phar ?

Building a PHAR distribution is easy with https://github.com/box-project/box
Twig-CS-Fixer does not require a specific config file, so we 've just to run the following command from root of this repo. box compile
Here is an example of execution :
Box version 4.6.2@29c3585 2024-04-23 19:35:41 UTC

 // Loading without a configuration file.

🔨  Building the PHAR "/shared/backups/forks/Twig-CS-Fixer/bin/twig-cs-fixer.phar"

? Checking Composer compatibility
    > Supported version detected
? No compactor to register
? Adding main file: /shared/backups/forks/Twig-CS-Fixer/bin/twig-cs-fixer
? Adding requirements checker
? Adding binary files
    > No file found
? Auto-discover files? Yes
? Exclude dev files? Yes
? Adding files
    > 494 file(s)
? Generating new stub
  - Using shebang line: #!/usr/bin/env php
  - Using banner:
    > Generated by Humbug Box 4.6.2@29c3585.
    >
    > @link https://github.com/humbug/box
? Dumping the Composer autoloader
? Removing the Composer dump artefacts
? No compression
? Setting file permissions to 0755
* Done.

No recommendation found.
No warning found.

 // PHAR: 537 files (2.26MB)
 // You can inspect the generated PHAR with the "info" command.

 // Memory usage: 23.03MB (peak: 23.23MB), time: 1sec

And if you want to have a manifest in your phar version, I suggest to use my application https://github.com/llaville/box-manifest that is compatible with official BOX v4.
Include it into your CI pipeline is also easy.

Hi @llaville, would you be ok to provide a PR then ?
Big thanks

@VincentLanglet Of course.
Did you want to have the basic BOX support or the BOX with manifest(s) ?
Manifests are in different formats :
For examples, a console like this one

and/or a SBOM contents like this one
<EMAIL_ADDRESS>in /shared/backups/forks/Twig-CS-Fixer $ /shared/backups/php/sarif-php-sdk-2.0.phar --manifest sbom.json
{
    "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
    "bomFormat": "CycloneDX",
    "specVersion": "1.5",
    "serialNumber": "urn:uuid:619b8aa9-0c11-423d-82ce-299fde3c60af",
    "version": 1,
    "metadata": {
        "timestamp": "2024-07-02T15:34:26Z",
        "tools": [
            {
                "vendor": "box-project",
                "name": "box",
                "version": "4.3.8@5534406"
            },
            {
                "vendor": "bartlett",
                "name": "box-manifest",
                "version": "3.5.1"
            }
        ],
        "properties": [
            {
                "name": "specVersion",
                "value": "1.5"
            },
            {
                "name": "bomFormat",
                "value": "CycloneDX"
            }
        ]
    },
    "components": [
        {
            "bom-ref"<EMAIL_ADDRESS>            "type": "application",
            "name": "composer-bin-plugin",
            "version": "1.8.2",
            "group": "bamarni",
            "purl"<EMAIL_ADDRESS>        },
        {
            "bom-ref"<EMAIL_ADDRESS>            "type": "library",
            "name": "php-console-color",
            "version": "v1.0.1",
            "group": "php-parallel-lint",
            "purl"<EMAIL_ADDRESS>        },
        {
            "bom-ref"<EMAIL_ADDRESS>            "type": "library",
            "name": "php-console-highlighter",
            "version": "v1.0.0",
            "group": "php-parallel-lint",
            "purl"<EMAIL_ADDRESS>        }
    ],
    "dependencies": [
        {
            "ref"<EMAIL_ADDRESS>        },
        {
            "ref"<EMAIL_ADDRESS>        },
        {
            "ref"<EMAIL_ADDRESS>        }
    ]
}

Thanks a lot
Let's start with the basic box support first and we'll see later if manifest is needed/requested. :)

Always difficult to identify a version (especially with PHAR distribution), but it's your choice. I'll propose a PR this afternoon.

Available with standard BOX version to build a PHAR version (without manifest).
See available results on my fork https://github.com/llaville/Twig-CS-Fixer/actions/runs/9907085104/job/27369999556
I've just added steps to build the PHAR, but not how to reuse it (upload artfifact or not)
It's up-to-you to decide whatever you want.

Phar is available in the 3.0.0-rc-1 version
https://github.com/VincentLanglet/Twig-CS-Fixer/releases/tag/3.0.0-rc-1
Could you try it and tell me if anything is wrong @garak @llaville ?
Thanks

It seems it does not work with Twig components

File is invalid: Unknown "props" tag.

File is invalid: Unexpected "component" tag (expecting

File is invalid: Unexpected token "spread operator" of value "...".

But it's maybe related to 3.0 ?
Or does it require to be run from a specific path ?

On my side, I found no issues, but I run PHAR version only on copy of my fork of this repo:

[x] Identify application version

Works as expected

[x] Uses absolute path on checkstyle and junit report only

Works as expected

While junit  and checkstyle reports used absolute paths, but not github that still continue to use relative path.

It seems it does not work with Twig components

File is invalid: Unknown "props" tag.

File is invalid: Unexpected "component" tag (expecting

File is invalid: Unexpected token "spread operator" of value "...".

But it's maybe related to 3.0 ?
Or does it require to be run from a specific path ?

Hi @smnandre, I assume the TokenParser are not automatically added when using the PHAR
https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/src/Environment/StubbedEnvironment.php#L124-L154
Maybe class_exists returns false (?).
If you follow https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#token-parser-twig-extension--node-visitors to add the token parser manually it should fix the issue.
But I'm not sure if there is a way to still auto-detect those classes...

It works for me

But I'm not sure if there is a way to still auto-detect those classes...

A "solution" might be to remove the code
https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/src/Runner/Linter.php#L71-L75
I would stop to validate the twig file before linting/fixing it...
I try it in https://github.com/VincentLanglet/Twig-CS-Fixer/pull/274

I have no need to use the phar one, and that would not shock me if the PHAR version is released without support for external Parser ;)

I have no need to use the phar one, and that would not shock me if the PHAR version is released without support for external Parser ;)

Sure, but it could also make sens to not trying to validating/parsing the twig (and let symfony doing it https://symfony.com/doc/7.2/templates.html#linting-twig-templates). Unless someone use NodeVisitor, I don't need it, so I made it optional.
New rc is ready with those changes https://github.com/VincentLanglet/Twig-CS-Fixer/releases/tag/3.0.0-rc-2

No regression found for me on PHAR RC2 distrib !

@VincentLanglet I've a recommendation on PHAR building distribution.
Even if BOX project is a zero config application and works in most of case, we can improve the artifact built with a little config option : learn more at https://github.com/box-project/box/blob/main/doc/configuration.md#compression-algorithm-compression
Currently, default is compression is none, that means we have a huge PHAR copy.
But if you create on root of your project a box.json.dist default file with following entry
{
    "compression": "GZ"
}

The artifact built will decreased from 2.2 Mb to 682 kB. It may be cool for final stable version 3.0.0

I'll try it @llaville https://github.com/VincentLanglet/Twig-CS-Fixer/pull/279
Also, I found an issue with the PHAR, maybe you could help me on it.
If I write a custom rules in my project-src folder and use the config to add
$ruleset = (new Ruleset())->addRule(new \App\Cs\Twig\CustomRule());

I get a Class not found error, which doesn't occur when I use the tool directly from composer.
Can I avoid this ?

@VincentLanglet Of course you can avoid this, but it will need to add a --bootstrap option (IMO).
Reason came from your autoloader that is not included when you build the PHAR artifact.
By adding an option to include a script before execution, we can define a custom autoloader that goal is to load additional resources like your custom rules.
Lot of projects used this possibility. Checks
PHPUnit implement such feature with --bootstrap <file>
PHPLint implement such feature with --bootstrap <file>
PHPStan implement such feature with --autoload-file <file>


[DS-2034] added emptystring handling to the notnull method in ControlPanel

+1

seems reasonable. Didn't test it, but I trust others testing. It's a tiny change. +1


Exogeneous variables

Hi! Do you support exogeneous variables for zero-shot predictions and training from scratch? As I see gluonts supports it like static and dynamic features but not sure this works for lag-llama too

Hi!
We didn't pretrain the model with support for covariates, so it can't be used zero-shot/finetuned with covariates.
But an idea is you can pretrain it from scratch again, with covariate support if you'd like. We don't have code for this now too.
Please check this issue for more updates: https://github.com/time-series-foundation-models/lag-llama/issues/58


[BUG]: Gifts shifting in time

Describe the bug
Looks like the Gifts are shifting in time (Calendar view). One day next.
To Reproduce
Go to the Dashboard (logged in).
Fill the fields for manual contribution's record (add for single day, more than one contribution).
See that one of the contribution is shifed to the next day.
In my case, at this moment I can see the contribution for tomorrow, but I'm pretty sure that the last day typed by me was today.
Best wishes,
Michal
Expected Behavior
Contribution is not shifed to the next day on the Calendar view (works correct).
Screenshot/ Video
Screenshot attached:

Today is 3rd of Dec., but we can see the 4th of Dec there.

Additional context
I will check it again / deep into it, and let know now ASAP.
Quick update - confirmed. Still exist (today I can see marked for tomorrow again).

This one is a question of how y'all want the gift calendar to work. Currently it populates one PR per day, it looks like, no matter which day the PR actually occurred. That's why they appear to be shifting: the date on the calendar has no relation to the date the PR was put in.
@andrew I'm assuming that this should be changed so the PR is shown on the correct date? Allowing multiple PRs per date?

So this one could end up being pretty involved with lots of changes, a bit of a rabbit hole as the whole "autogift" concept was added and changed a number of times over the years, currently it tries to fill up the calendar view with one contribution each day which can be confusing.
There's a few different ways we could make it work, I'm kinda tempted to throw out the calendar view all together and show more of a timeline view with contributions grouped by date in a list.

What’s the point of “24 pull requests” if it’s not an advent calendar? 0, or 1+ contributions per day, and if you miss a day you miss one.

In my opinion, the point is to celebrate these amazing days with the Open Source contributions. For me, the idea is similar like for 'Open Source Friday'. By the way, I'm not sure, but if you have a "chocolate advent calendar", you can always take the missed one piece of chocolate :P

in that case why do the PRs need to be in December at all? Why not grab any pull requests from November, or the entire year?

From my point of view, because it's about designated holiday days. Such as Friday in 'Open Source Fri.'

Right - but if it’s about designated days, then the contributions should have to happen on those days too.
The point of an advent calendar is to think about Christmas each day until Christmas - if you skip a day then that day was simply skipped.

So, I'm looking at this one again. After skimming the code, it looks like the steps are basically:

Make sure the gift date set to the contribution date instead of whatever date is up next
Update views displaying calendars to show events on those dates, not just one after another
Tests :(
Update past gifts to reflect their contribution dates instead of what they're set to now???

Does that look accurate or are there places that gift dates are used that I'm missing?


Update to latest Bitbucket API; simplify validation; add logging and helpful response

This looks good. However, you have a mix of tabs/space indentation. The project should be done in tab indentation. If you fix this, I will merge in.

I've improved some of the logging functionality in #10, along with adding code style verification and updating outdated deps. Feel free to apply your additional parameter verifications on top of the latest of master.

I wish you'd just copied and replaced spaces with tabs before your latest pull request. Now there are lots and lots of merge conflicts now. I feel like my work was wasted :-P
Regarding "code style verification" I see your tabs4life but it seems it lacks a style guide? Can you provide a .jsbeautifyrc so that those of us who don't yet know your "very opinionated" personal preference can let our editors do the heavy lifting?

Ah crap, you're right. I should have merged this in first. Sorry. I can apply your express validate additions later if you don't have the time. Just let me know.
I will look into editor integration with tabs4life as well.

Not sure if you saw, but bit bucket recently released native build status integration. Although I don't think Codeship has updated to support it yet.
https://blog.bitbucket.org/2015/11/18/introducing-the-build-status-api-for-bitbucket-cloud/

No worries. Actually JSBeautify has a grunt plugin that would work well for this purpose (no IDE integration needed). One of the build steps would format according to your guideline. Here's an example of how it can be done:
https://github.com/matmar10/grunt-env-config-to-file/blob/master/Gruntfile.js
Need your tweaks to make this work, but this is the general idea for a .jsbeautifyrc config:
{
  "js": {
    "allowed_file_extensions": ["js", "json", "jshintrc", "jsbeautifyrc"],
    "brace_style": "end-expand",
    "break_chained_methods": true,
    "e4x": false,
    "end_with_newline": true,
    "indent_char": "\t",
    "indent_level": 0,
    "indent_size": 1,
    "indent_with_tabs": true,
    "jslint_happy": true,
    "keep_array_indentation": false,
    "keep_function_indentation": false,
    "max_preserve_newlines": 3,
    "preserve_newlines": true,
    "space_after_anon_function": true,
    "space_before_conditional": true,
    "space_in_empty_paren": false,
    "space_in_paren": false,
    "unescape_strings": false,
    "wrap_line_length": 120
  }
}

I've also been looking at http://eslint.org as well which has a similar .eslintrc type configuration file. Haven't had time to update my grunt-tabs4life to use it yet though.
In the meantime, you can run npm test which will print out any lint errors.


Allow async validation

@erikras Have you thought about this a bit more? Since the validation currently happens inside the decorator's render function, making it async will require some changes there obviously. How about having a 2nd validation function, only for async validations? It could be debounced, so that it does not trigger too often during re-renders. And if it is being triggered a boolean, indicating that async validation is going on, could be passed to the component. Just a few ideas :)


feat: add mailparse 3.1.5 release

update mailparse with release 3.1.5

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


WriteUpgradeAck method

Description

closes: #3642

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

[ ] Targeted PR against correct branch (see CONTRIBUTING.md).
[ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
[ ] Code follows the module structure standards and Go style guide.
[ ] Wrote unit and integration tests.
[ ] Updated relevant documentation (docs/) or specification (x/<module>/spec/).
[ ] Added relevant godoc comments.
[ ] Provide a commit message to be used for the changelog entry in the PR description for review.
[ ] Re-reviewed Files changed in the Github PR explorer.
[ ] Review Codecov Report in the comment section below once CI passes.

Looks good, @charleenfei! Should we also have some tests for this function?

if you look at the other Write functions, we usually test them as part of testing the handler (in this case, UpgradeAck which has not been submitted as a PR yet. if we want to change this testing pattern going forward, im happy to accomodate (we can try to test it as we test validate basic), but i think it's a bit easier to test this when the handler function is in as we rely on the packets to be flushed, etc. cc @damiannolan @colin-axner


Incorporating open power common test framework

I have made same changes in the basic framework of OpTest like adding exception and constants.
Let me know what you think about this

Please be sure the command from the README.md still works with your code changes (or update if needed).


when to use vim and vmodl

I am very new to this and basically trying to understand API.
Below I can connect to a esxi and retrieve various objects. These are what I can see from https:///mob
from pyVim.connect import SmartConnect, Disconnect
c = SmartConnect(
host=hyperVisorIP,
user=esxiUser,
pwd=esxiPW,
port=httpsPort
)
I was able to relate all the objects that I see from the https:///mob site to the Reference 'c'. Please help me if there is a way I can view/retrieve that are retrievable with a 'vim.' prefix.
For example, one of the samples uses vim.vm.ConfigSpec(). Is this viewable anywhere on the https:///mob web page?
Is there any other way to retrieve config spec of a vm through API?

vim.vm.ConfigSpec() is typically a user-provided object, so I don't think you'll find it anywhere in /mob.
If you navigate to a VM and its 'config', then you'll see vim.vm.ConfigInfo() which is fairly similar.
Note that the MOB will display the types in their wsdl format (e.g. vim.vm.ConfigInfo is VirtualMachineConfigInfo). Online documentation has that layout as well.
You can add an &vmodl to the mob url to have it display in a pyVmomi friendly format.

Thanks for responding. Referring to this sample: https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/set_note.py
spec = vim.vm.ConfigSpec()
spec.annotation = args.message
task = vm.ReconfigVM_Task(spec)
tasks.wait_for_tasks(si, [task])
Can I replace above with below?
spec = vim.vm.ConfigInfo()
spec.annotation = args.message
task = vm.ReconfigVM_Task(spec)
tasks.wait_for_tasks(si, [task])
Where can I find all user-provided objects and relevant documentation? Are these only part of samples here?

It did not accept that.

task = vm.ReconfigVM_Task(spec)
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/pyVmomi/VmomiSupport.py", line 580, in
self.f(*(self.args + (obj,) + args), **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pyVmomi/VmomiSupport.py", line 385, in _InvokeMethod
list(map(CheckField, info.params, args))
File "/usr/local/lib/python2.7/dist-packages/pyVmomi/VmomiSupport.py", line 972, in CheckField
% (info.name, info.type.name, valType.name))
TypeError: For "spec" expected type vim.vm.ConfigSpec, but got vim.vm.ConfigInfo

I need to get this: vim.vm.ConfigSpec, please let me know where I can get this from ?

Sorry, when I said user-provided objects, I just meant that it is something the client will pass to the server, rather than server returning to the client. So you won't see it populated in the MOB.
The links I provided in the previous comment should be the documentation on what properties can go in those objects.
I'll paste it as a link here: https://code.vmware.com/apis/196/vsphere#/doc/vim.vm.ConfigSpec.html
You can't replace ConfigSpec with ConfigInfo in a ReconfigVM_Task (https://code.vmware.com/apis/196/vsphere#/doc/vim.VirtualMachine.html#reconfigure) call because the function expects a ConfigSpec (see the Parameters section of that function).
The samples provide some guidance for what to populate with various "Spec" that are never returned by the server.
Also if there aren't pyVmomi samples, other language bindings (e.g. java) might have samples that translate in a relatively similar fashion (but that might take some getting familiar with the API first).

Thank you, appreciate you answering my questions.


PR: Index column of DataFrame view should be always visible (Issue #2512)

Fixes #2512

@ccordoba12 According to the Qt and the PyQt documentation (4.8), the function setResizeMode(ResizeMode mode) does exist. However, there are execution errors in all the CI Engines

@andfoy, setResizeMode is handled differently for Qt4 and 5. Please see this block to see how to do it
https://github.com/spyder-ide/spyder/blob/master/spyder/widgets/projects/explorer.py#L67

You also need to rebase your changes on top of latest 3.x to fix the errors in CircleCI

@ccordoba12 All the errors were fixed!

@andfoy, thanks a lot for this. I did a first, quick review with style issues :-)

Thanks @andfoy for the improvements! I asked you to add docstrings to all methods and classes you introduced, so it's easier to understand what's going on with this code later.
Please also verify that your changes don't break the DataFrame editor when you have more than 100.000 rows and specially more than 60 columns.

Also, please merge with 3.x to fix the style errors in CircleCI

@ccordoba12 I tested against a dataframe of size 100000x70, and there were no errors or failures at all.

Last comments, and then this is definetly ready :-)


Web assembly publishing needs to be fixed

Steps to Reproduce
Web assembly packaging needs to be fixed.
The wasm was previously published on unpkg.com and is not part of the dart package. Therefore, currently it's not published anywhere (except for the release folder on GitHub)
Code sample
Details

Platform: iPhone 13 Pro, Galaxy S7, x86 Android Emulator on Windows etc.
Flutter version: [e.g. 3.19.0]
Isar version: [e.g. 4.0.1]

[ ] I searched for similar issues already
[ ] I filled the details section with the exact device model and version
[ ] I am able to provide a reproducible example

Fixed in 4.0.2


Getting Started docker-compose.yml uses version 1.0.3 but docs suggest it should be 1.2.1

I am working through the Quick Start in your documentation site and have downloaded the docker-compose.yml file.
When I run the curl -s http://localhost:8080/v1/meta command, I get  "version": "1.0.3" instead of what is expressed in the docs as expecting  "version": "v1.2.1"

Hi @bkoltai - thanks for noticing. We'll look into it and make sure everything will get updated.
@laura-ham @bobvanluijt, the linked Quick-Start guide uses the docker-compose of the newspub repo which indeed still uses version 1.0.3. Is there any particular reason? Can we just update it to the latest?

This is fixed, the page is updated. Thanks for noticing @bkoltai
Additional note: the dataset uses the transformers module if you run it on CPU, it works but it will not be that fast. The exact same dataset is also available as an online demo dataset. You can start exploring it here.


Allow Partial to annotate fields of nested classes

Closes #287

Since this PR changes the behaviour of Partial to return {} on all classes that don't inherit from BaseModel, do you think it would be sensible to just raise an Exception from Partial if a class is passed in that doesn't inherit from BaseModel.
I think it may help prevent some headaches down the line for anyone who tries and can't figure out why Partial is just returning {} and sort of suppressing an error? If they're using a type checker (I assume most people using this library would be?!) then the checker will catch it for them since the generic type, T, that Partial inherits from is bound to BaseModel so I'm not sure what your opinions on this are.

Since this PR changes the behaviour of Partial to return {} on all classes that don't inherit from BaseModel, do you think it would be sensible to just raise an Exception from Partial if a class is passed in that doesn't inherit from BaseModel.
I think it may help prevent some headaches down the line for anyone who tries and can't figure out why Partial is just returning {} and sort of suppressing an error? If they're using a type checker (I assume most people using this library would be?!) then the checker will catch it for them since the generic type, T, that Partial inherits from is bound to BaseModel so I'm not sure what your opinions on this are.

Yes, an exception makes sense tbh. You can use the ImproperlyConfiguredException for this. Can you also update the docs regarding partial to make this clear?

Since this PR changes the behaviour of Partial to return {} on all classes that don't inherit from BaseModel, do you think it would be sensible to just raise an Exception from Partial if a class is passed in that doesn't inherit from BaseModel.
I think it may help prevent some headaches down the line for anyone who tries and can't figure out why Partial is just returning {} and sort of suppressing an error? If they're using a type checker (I assume most people using this library would be?!) then the checker will catch it for them since the generic type, T, that Partial inherits from is bound to BaseModel so I'm not sure what your opinions on this are.

Yes, an exception makes sense tbh. You can use the ImproperlyConfiguredException for this. Can you also update the docs regarding partial to make this clear?

Where should I put the documentation for this? I looked through the docs and I couldn't find any API reference for Partial, just lots of examples :)

Where should I put the documentation for this? I looked through the docs and I couldn't find any API reference for Partial, just lots of examples :)

I can speak for this. For API docs do them in the class/func/method docstrings using google style. Just describe the ins and outs - and only really needed to do for parts of the public interface. For internal interfaces, just a good docstring description of what is going on is enough. I've got a task there to add the api docs to the pages site, so it would be good to have if you've added to the public interface anywhere, or want to pad existing stuff out.
As for the prose sections, if there isn't one already and it warrants it then feel free to add a section.. or maybe you can use a note section somewhere around the examples if it doesn't warrant a full section, such as:
https://github.com/starlite-api/starlite/blob/a2c8a86d42fb347133a5c0c278ae9bc950c75cb7/docs/usage/1-routers-and-controllers.md?plain=1#L46-L49
Note the prettier ignore bit if you go that route.

@all-contributors add @Harry-Lees code doc


Extend from Yaml Parser from Core Parser

Extending from io.circe.Parser adds some convenience methods to the io.circe.yaml.Parser out of the box, such as decodeAccumulating.
The io.circe.yaml.Parser class already matches the io.circe.Parser interface.
Also added decode and friends to the io.circe.yaml.parser package manually as well (using the io.circe.Parser trait had some compilation issues)
supersedes https://github.com/circe/circe-yaml/pull/284

Codecov Report
Base: 91.66% // Head: 87.30% // Decreases project coverage by -4.36% :warning:

Coverage data is based on head (ec34f8d) compared to base (7ce1041).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #338      +/-   ##
==========================================
- Coverage   91.66%   87.30%   -4.37%
==========================================
  Files           5        5
  Lines         120      126       +6
  Branches        7        6       -1
==========================================
  Hits          110      110
- Misses         10       16       +6

Impacted Files
Coverage Δ

src/main/scala/io/circe/yaml/Parser.scala
89.09% <0.00%> (-3.37%)
:arrow_down:

src/main/scala/io/circe/yaml/parser/package.scala
37.50% <0.00%> (-12.50%)
:arrow_down:

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

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


S3 mock failed to list file key in Windows

Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the
Amplify Console GitHub Issue Tracker

Describe the bug
In the Windows system, launch amplify mock and open the url http://localhost:20005/becketname-env. It returns the following result. The key are all undefined. This issue only happens in Windows for me.

Amplify CLI Version
4.18.1
To Reproduce
create a amplify project with S3 storage
add some files to the S3 storage
amplify mock
visit http://localhost:20005/becketname-env in the browser
Expected behavior
key shows the file name
Screenshots
see it above
Desktop (please complete the following information):

OS: Windows 10
Node Version. 12

Hi @gaochenyue
To reproduce this can you also tell me the aws-amplify and aws-amplify-react libs version you are using?

@akshbhu I'm using Amplify Cli 4.18.1. I use Vue.js, but this issue can be reproduced without frontend. To reproduce, you just have to start mock and visit http://localhost:20005/becketname-env in the browser.

Hi @gaochenyue
Thank you for your patience and apologies for the delay.I want know the aws-amplify lib version to reproduce this error as there is some changes in lib version from 2.x to 3.x.

@akshbhu no problem.
Here are all my amplify related libs
'''
"@aws-amplify/api": "^2.1.2",
"@aws-amplify/pubsub": "^2.1.2",
"aws-amplify": "^2.2.1",
"aws-appsync": "^2.0.0",
'''
Thanks


feat: Support GatewayAPI route attachment restriction

Type of change:

close: https://github.com/apache/apisix-ingress-controller/issues/1424
close: https://github.com/apache/apisix-ingress-controller/issues/1349
What this PR does / why we need it:

Add new feature for support GatewayAPI route attachment
Fix https://github.com/apache/apisix-ingress-controller/issues/1424. GatewayClass is cluster scoped resource, shouldn't  filter by namespace.
Fix Gateway sync function. Compatible with scenario: GatewayClass add event is received after the Gateway event.

Codecov Report

Merging #1440 (a8b399e) into master (c38ae66) will increase coverage by 0.76%.
The diff coverage is 66.00%.

@@            Coverage Diff             @@
##           master    #1440      +/-   ##
==========================================
+ Coverage   40.89%   41.66%   +0.76%
==========================================
  Files          78       83       +5
  Lines        7231     7273      +42
==========================================
+ Hits         2957     3030      +73
+ Misses       3933     3897      -36
- Partials      341      346       +5

Impacted Files
Coverage Δ

pkg/providers/gateway/translation/gateway.go
0.00% <0.00%> (ø)

...providers/gateway/translation/gateway_httproute.go
64.10% <ø> (ø)

pkg/providers/utils/domain.go
96.55% <96.55%> (ø)

pkg/providers/utils/string.go
22.72% <100.00%> (+22.72%)
:arrow_up:

pkg/apisix/resource.go
56.79% <0.00%> (-6.23%)
:arrow_down:

pkg/providers/utils/manifest.go
42.79% <0.00%> (-2.83%)
:arrow_down:

pkg/config/config.go
64.13% <0.00%> (-2.22%)
:arrow_down:

pkg/apisix/nonexistentclient.go
41.20% <0.00%> (-2.07%)
:arrow_down:

pkg/apisix/ssl.go
35.91% <0.00%> (-0.45%)
:arrow_down:

pkg/apisix/consumer.go
36.30% <0.00%> (-0.44%)
:arrow_down:

... and 20 more

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

Hi @tao12345666333 @lingsamuel @AlinsRan .
Since https://github.com/apache/apisix-ingress-controller/pull/1445, Gateway and HTTPRoute has been upgraded to v1beta1. But other route resources are still under v1alpha2. Hence I need to implement both v1alpha2 and v1beta1 validation to support all route resources. If we planning to support multiple versions. Why Translator just replace the older version? I'm confused about our GatewayAPI's versioning management.

Hi @tao12345666333 @lingsamuel @AlinsRan . Since #1445, Gateway and HTTPRoute has been upgraded to v1beta1. But other route resources are still under v1alpha2. Hence I need to implement both v1alpha2 and v1beta1 validation to support all route resources. If we planning to support multiple versions. Why Translator just replace the older version? I'm confused about our GatewayAPI's versioning management.

TCPRoute、UDPRoute etc. have not entered v1beta1.
In fact, only one version needs to be implemented, and gateway-api CRDs will be compatible with it. The final effect is that only one stable version needs to be maintained.

as @AlinsRan said
we only need maintain only one version.

Hi @tao12345666333 @lingsamuel @AlinsRan . Since #1445, Gateway and HTTPRoute has been upgraded to v1beta1. But other route resources are still under v1alpha2. Hence I need to implement both v1alpha2 and v1beta1 validation to support all route resources. If we planning to support multiple versions. Why Translator just replace the older version? I'm confused about our GatewayAPI's versioning management.

TCPRoute、UDPRoute etc. have not entered v1beta1. In fact, only one version needs to be implemented, and gateway-api CRDs will be compatible with it. The final effect is that only one stable version needs to be maintained.

Thanks for your reply. I should RTFM at first.

The code LGTM, just need to resolve the conflicts.
Thanks for your contribution!

@tao12345666333 I have run  the golangci-lint and no errors occurred. PTAL.

ping @tao12345666333 @lingsamuel . All CI passed.

sorry for delay, I recently got covid-19.
plase resolve conflicts, thanks!

@tao12345666333 All done. PTAL.

Sorry for the delay, the code LGTM.
Please resolve the conflicts, thanks!

The test case job failed. Please check it. Thanks

2023-03-08T18:02:17+08:00	error	gateway/gateway.go:269	failed to record status change for Gateway resource	{"error": "Operation cannot be fulfilled on gateways.gateway.networking.k8s.io \"test-gateway\": StorageError: invalid object, Code: 4, Key: /registry/gateway.networking.k8s.io/gateways/ingress-apisix-e2e-tests-default-299106829/test-gateway, ResourceVersion: 0, AdditionalErrorMsg: Precondition failed: UID in precondition: 043033bc-3aa5-445c-b8bb-0149f5734dc2, UID in object meta: ", "name": "test-gateway", "namespace": "ingress-apisix-e2e-tests-default-299106829"}
It appears from the information above that the UID of the Gateway resource has changed, making it unable to update the Status sub-resource, which has led to the test failing. I have tested this several times in my local environment, but have been unable to replicate the issue, so I may need more time to resolve this problem.

@tao12345666333 Please help me run the test again.

I will rerun the failed job.


Run tuning for different algorithms

[x] PPO (in progress)
[ ] A2C
[ ] Recurrent PPO
[ ] TRPO

PPO Results:
High person, low traffic, 4 n_envs, 1000x4000, 100 trials:


Ruby Tip 51-73 Title Update

Ruby Tip 51 Title Update

What does it mean if the test build fails? Is this still able to be merged?

Yep it should work, the changes are in the previous files that would fox it.

I don't think these files are done
@janackeh correct me if I'm wrong


Not an issue, Feature request. Invisible Ethereal Glass

All the features of Ethereal Glass but an invisible block. It can be used to keep mobs, and villagers in specific areas of a building. For example an open-air Trading Hall of in large builds like a castle you can keep your villagers in specific areas so they dont all wander into a corner somewhere.

Or add a mob blocking block that the player doesn't have to crouch for. A Barrier Block that only effects mobs and villagers.

Hey, sorry for the late reply, but being invisible kinda defeats the purpose of being glass..
However you might want to have a look at the Entity Barrier from Peculiar Pieces, it does exactly what you are asking for!


CORs header missing from sign in callback request

I've set up an auth.service.ts file with this package in a react application. After looking at a few similar issues I've managed to configure my request config and added the necessary metadata that allows my first redirect to succeed to get to the IDS login page (I was initially having CORs errors but adding the metadata resolved it for the initial sign in request and redirects me to our OIDC login page).
After logging in this then redirects to https://localhost:3000/signin-callback where the secondary part of the PKCE token flow is initiated and the userManager.signinRedirectCallback is fired to then request and retrieve the token to complete authentication. However, this secondary request is being rejected by CORs and failing despite returning a 200 success on the request but still throws a CORS error to the console.
I found that when attempting to utilise the chrome extension CORS unblock the request succeeds and token is fetched with the response headers now containing the values for:

Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: *
Access-Control-Allow-Origin: https://localhost:3000
Whereas when this extension is disabled these headers are missing and therefore the token request fails to complete.

Essentially I need to add Access-Control-Allow-Origin: https://localhost:3000 to the response headers in the secondary request to the x/connect/token end point for it to be allowed through to complete the token request I believe but I can't seem to add it via the configuration file. I've tried to pass it via extraHeaders on the config but this still seems to fail.
I'd appreciate any help with this as the code is almost functional it is just this issue that seems to be the last obstacle. Below is my current configuration.
export default class AuthService implements IAuthService {
    private userManager: UserManager;

    // Constructor to initialise the UserManager with settings
    constructor() {
        const stsSettings: UserManagerSettings = {
            authority: config.OIDCIssuer,
            client_id: config.ClientId,
            redirect_uri: `${config.OIDCRedirectURI}signin-callback`,
            silent_redirect_uri: config.OIDCRedirectURI,
            scope: config.Scope,
            response_type: "code",
            post_logout_redirect_uri: config.OIDCRedirectURI,
            metadata: {
                issuer: config.OIDCIssuer,
                authorization_endpoint: `${config.OIDCIssuer}/connect/authorize`,
                token_endpoint: `${config.OIDCIssuer}/connect/token`,
                userinfo_endpoint: `${config.OIDCIssuer}/connect/userinfo`,
                end_session_endpoint: `${config.OIDCIssuer}/connect/endsession`
            },
            extraTokenParams: {
                "Access-Control-Allow-Credentials": true,
                "Access-Control-Allow-Methods": "*",
                "Access-Control-Allow-Origin": config.OIDCRedirectURI
            }
        };
        this.userManager = new UserManager(stsSettings);

        // Add event listeners for token expiration and silent renew errors
        this.userManager.events.addAccessTokenExpiring(() => {
            console.log("Token is expiring, attempting silent signin...");
            this.signinSilently();
        });

        this.userManager.events.addSilentRenewError((error) => {
            console.log("Silent renew error:", error.message);
        });
    }

    // Initiate the signin process, redirecting the user to the identity provider
    signin(): Promise<void> {
        console.log("trying to redirect");
        return this.userManager.signinRedirect({ state: window.location.href });
    }

    // Complete the signin process, handling the callback after redirection
    completeSignin(): Promise<User> {
        const returnUrl =
            window.location.href !== "/" ? window.location.href : "";
        return this.userManager
            .signinRedirectCallback(returnUrl)
            .then((user) => {
                return user;
            });
    }

// Attempt to signin silently, renewing the access token without user interaction
    signinSilently(): Promise<User | void> {
        console.log("Attempting silent signin...");
        return this.userManager.signinSilent().then(
            (user) => {
                console.log("Silent signin successful");
                return user;
            },
            (error) => {
                console.log("Silent signin failed:", error);
                // If silent signin fails, initiate a regular signin
                this.signin();
            }
        );
    }

    // Handle the silent signin callback
    silentSignInCallback(): Promise<void> {
        return this.userManager.signinSilentCallback() as Promise<void>;
    }

    // Initiate the signout process, redirecting the user to the identity provider
    signout(): Promise<void> {
        return this.userManager.signoutRedirect();
    }

    // Get the access token if available and not expired
    getAccessToken(): Promise<string | null> {
        return this.userManager.getUser().then((user) => {
            if (!!user && !user.expired) {
                return user.access_token;
            } else {
                return null;
            }
        });
    }
}

Typically for CORS is that you must properly configure the authorization server, so its knows your host and callback URL...

Both permitted CORs origin and redirect URI are in the relevant database, and the fact the first request passes and redirects the user to the ids login page shows that the database recognises the provided parameters. From what I can tell looking at the requests the only thing apparently missing in the secondary callback request is the Access-Control-Allow-Origin: https://localhost:3000 header.

The missing header also matches the console error  being logged as it specifies Access-Control-Allow-Origin is missing and hence the request is failing.

Access-Control-Allow-Origin, .. are part of the response header coming from the authorization server...


Deprecate IncQuantizedModel class

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


Export tab no longer works

The export tab in the project properties window no longer works. If I comment out the line 'include "../url_library.php";' then it will load the data but download zips are empty (as that file is clearly needed!).
@torinfo I'm aware that this could very well be my fault as I recently made changes to lots of the project properties window to make it more accessible. I didn't change url_library.php though and I have tried replacing with the old export_template.php file and it still doesn't work. Would you be able to have a look please? Thanks, and sorry if it was me who broke this! I'm sure I will have tested this after changes but whether something I later did broke things, I'm not sure.

This must have been a problem with my local version as ok now


Update mocha and move types to dev deps

What I did

Moved some [at]types dependencies to dev section
Update mocha to version 8

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Latest changes to trap handler break this crate

https://github.com/esp-rs/esp-hal/pull/207 breaks this crate.

@TheButlah the linked PR should fix this


prevLogIndex in appendEntries

I can only find one reference to prevLogIndex in the raft js code, the rest of the code is accessing prevIndex. The PDF explaining AppendEntries has a prevLogIndex that sounds like prevIndex used through out the js code. I'm assuming prevIndex in the raft js code is actually prevLogIndex from the PDF and that the reference here to prevLogIndex should be renamed to prevIndex or all prevIndex should be renamed to prevLogIndex.
https://github.com/ongardie/raftscope/blob/a581e3dc24f7ab5954389aa00a9dc8a55b56f2fa/raft.js#L194

Thanks, @cphillips83. You're right, that should be prevIndex. I don't think it'll make much difference though, since if prevIndex is 0,
request.prevIndex <= server.log.length &&
logTerm(server.log, request.prevIndex) == request.prevTerm

will be:
0 <= server.log.length &&
0 == 0

which will always evaluate to true.


Week 3 Hacks

Blog post about applab work
Quiz
Extra Project

2.7

Quiz looks good
Blog post for the quiz is made
Also created another app


feat: scaffolding nextjs

Description

I'm migrating my blog using Gatsby to NextJS. This is the first PR in the migration process where I scaffolding NextJS project

[x] Install next

[x] Install taildwindcss

[x] Remove unused code

Question

To install Taillwindcss, we need to update postcss.config.js. Follow document here (https://nextjs.org/docs/advanced-features/customizing-postcss-config#customizing-plugins), if we customize PostCSS configuration file, we disable the default behavior, so we need to config it by ourself to preverse features like Autoprefixer and fix Cross-browser Flexbox bugs and IE11 compatibility.

// postcss.config.js
module.exports = {
  "plugins": [
    "postcss-flexbugs-fixes",
    [
      "postcss-preset-env",
      {
        "autoprefixer": {
          "flexbox": "no-2009"
        },
        "stage": 3,
        "features": {
          "custom-properties": false
        }
      }
    ]
  ]
}

However, follow tailwindcss guide here (https://tailwindcss.com/docs/guides/nextjs), after running command npx tailwindcss init -p, we have
// postcss.config.js
module.exports = {
  plugins: {
    tailwindcss: {},
    autoprefixer: {},
  },
}

I am wondering if I am using above postcss settings, do I get fix Cross-browser Flexbox bugs and IE11 compatibility features?

Answer: follow tailwindcss's guide will disable the fix for Cross-browser Flexbox bugs and IE 11 compatibility, we might need to enable this if we need. But as Adam Wathan suggests, we might not need them
Reference: https://github.com/tailwindlabs/tailwindcss.com/issues/660#issuecomment-745306472

Actually, postcss-flexbugs-fixes tries to fix bug 4, 6, and 8.1a. All those bugs affects IE only, so we do not to use postcss-flexbugs-fixes since I do not IE anyway.


Race condition between server watch processes

Description
I've been encountering IOExceptions pretty often while trying out the scaffold, and I think I've narrowed it down to the changes introduced in #129: there are two dotnet watch processes running, and when I change a file in the server code, they both try to generate the src/Server/bin/Debug/netcoreapp1.1/Server.runtimeconfig.json file at the same time, resulting in one of them throwing an IOException and shutting down.
Repro steps

Clone the https://github.com/fable-compiler/fable-suave-scaffold repo.
Run ./build.sh run in the freshly-cloned repo.
Wait for it to build and start the two dotnet watch processes.
Edit the src/Server/WebServer.fs file and save it.
One of the two dotnet watch processes is very likely to throw an IOException.

Expected behavior
The watch processes should not interfere with each other, or there should be just a single watch process.
Actual behavior
One of the two watch processes throws an IOException with the error message:

System.IO.IOException: The process cannot access the file '/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/bin/Debug/netcoreapp1.1/Server.runtimeconfig.json' because it is being used by another process. [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]

Full exception stack trace:
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018: The "GenerateRuntimeConfigurationFiles" task failed unexpectedly. [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018: System.IO.IOException: The process cannot access the file '/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/bin/Debug/netcoreapp1.1/Server.runtimeconfig.json' because it is being used by another process. [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at System.IO.UnixFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at System.IO.UnixFileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteToJsonFile(String fileName, Object value) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteRuntimeConfig(ProjectContext projectContext) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.ExecuteCore() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__25.MoveNext() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]

The build failed. Please fix the build errors and run again.
watch : Exited with error code 1

That same stack trace, with the Microsoft.NET.Sdk.targets path trimmed so it's easier to read:
error MSB4018: The "GenerateRuntimeConfigurationFiles" task failed unexpectedly. [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018: System.IO.IOException: The process cannot access the file '/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/bin/Debug/netcoreapp1.1/Server.runtimeconfig.json' because it is being used by another process. [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at System.IO.UnixFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at System.IO.UnixFileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteToJsonFile(String fileName, Object value) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteRuntimeConfig(ProjectContext projectContext) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.ExecuteCore() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__25.MoveNext() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]

The build failed. Please fix the build errors and run again.
watch : Exited with error code 1

Known workarounds
If I remove unitTestsWatch from the Run target in build.fsx so that there's only a single dotnet watch process running, everything goes smoothly.
Related information

Operating system: Linux Mint 18.1 (based on Ubuntu Xenial 16.04)
Branch: master
.NET Runtime, CoreCLR or Mono Version: 1.0.4

Thanks for tracking this down @rmunn! Could you please have a look @aprooks?

@alfonsogarciacaro @rmunn #134 fixes this. We need @forki comment there and I will fix conflicts

@aprooks Thanks for the quick reply! Sorry, I forgot about that PR 😅 I'll merge it right away!

...well, after the conflicts are fixed ;)

I have pushed merge. @rmunn  could you please check if these changes are working under Linux?

I think it works, but now I'm getting a different error, so I can't confirm this bugfix yet as I can't yet run the scaffold. I'm on a different computer with a different .Net Core installation, and now I get the following error:
  The specified framework 'Microsoft.NETCore.App', version '1.1.2' was not found.
    - Check application dependencies and target a framework version installed at:
        /opt/dotnet/shared/Microsoft.NETCore.App
    - The following versions are installed:
        1.0.4
        1.1.1
    - Alternatively, install the framework version '1.1.2'.

The 1.1.2 requirement for Microsoft.NETCore.App is coming from https://github.com/fable-compiler/fable-suave-scaffold/commit/a9b873bf98824d8e5d7ee80f49d0b0ccaadf5ad4, which was merged 13 days ago so I'm a little puzzled why I didn't encounter problems with it earlier. I'll put this in a different issue report -- but because of this new problem, I may not be able to test #134 until tomorrow when I'm back at the computer where I first reported this issue.
I'll leave this open until I can confirm the bugfix.

/cc @enricosada

Is this happening because of the server side? In Fable we solved a similar problem (also thanks to Enrico's guidance) using the prefercliruntime file. See https://github.com/fable-compiler/Fable/issues/961

I deleted paket.lock and re-ran paket install and got the same crash, for the same reason: Microsoft.NETCore.App version 1.1.2 had shown up again in my paket.lock file. So I reran paket install, giving it the -v flag this time so I could try to figure out where version 1.1.2 was coming from. The only two actual requirements for Microsoft.NETCore.App listed in my paket install -v log were:
     - Microsoft.NETCore.App, >= 1.0.4 (from dotnet-fable 1.1.14)
     - Microsoft.NETCore.App, >= 1.0.5 (from Microsoft.DotNet.Watcher.Tools 1.0.1)

However, when I grepped for where that 1.1.2 version was coming from, I found the following:

Request 'https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app/index.json?semVerLevel=2.0.0' finished with: [2.0.0-preview2-25407-01 ; 2.0.0-preview1-002111-00 ; 1.1.2 ; 1.1.1 ; 1.1.0 ; 1.1.0-preview1-001100-00 ; 1.0.5 ; 1.0.5-servicing-004880-00 ; 1.0.4 ; 1.0.3 ; 1.0.1 ; 1.0.0 ; 1.0.0-rc2-3002702]

Paket has made the natural assumption that a package that bumps just minor dependencies will not cause problems, and has therefore specified a dependency of 1.1.2. But because I don't have 1.1.2 globally installed on my system, just 1.1.1, .Net Core complains. (1.1.2 has been quite successfully installed in my packages folder just like any other NuGet dependency, but apparently that location isn't being searched by something in the .Net Core process, and I don't yet know enough to know what is failing to search the packages folder).
So I explicitly added Microsoft.NETCore.App = 1.1.1 to my paket.dependencies file and re-ran paket install, then ./build.sh run (in a brand-new clone to make sure I didn't have any old object references hanging around). Paket obligingly grabbed Microsoft.NETCore.App 1.1.1 for me this time instead of 1.1.2, but I still got the same error, because version 1.1.2 was still being referenced in project.assets.json. Specifically, in src/Server/obj/project.assets.json and test/ServerTests/obj/project.assets.json.
At this point, I'm running too far past my knowledge base to dredge up any more useful information. I don't know how .Net Core generates its project.assets.json files. I'll post my log file from paket install -v, and those two project.assets.json files, as attachments to this issue and maybe someone else with more .Net Core experience will be able to glean useful information from them. (I'll post them as attachments because the log file, for one, is too large to post as a gist).

Here's the log from my run of paket install -v after deleting the paket lock file. WARNING! The uncompressed file is 48.8 MiB! Compressing it with xz got it down to a mere 72 KiB (!!!). GitHub then refused the attachment because they don't allow .xz files (don't ask me why they don't handle a standard Unix filetype, but they don't), so I had to put the .xz file into a .zip, gaining nothing (and padding the file by about 2 KiB) in order for GitHub to accept it.
log-from-paket-install-no-lockfile.txt.xz.zip
Again, WARNING: this file is 48.8 MiB when uncompressed.

Microsoft.NETCore.App comes from the sdk as well and AFAIK there is no way for paket to influence that. It's a serious flawed in the design. I already reported that to vf# but at this point I doubt anyone except us cares.

And here are the two project.assets.json files I got after explicitly specifying version 1.1.1 of NETCore.App: one from src/Server/obj/ and one from test/ServerTests/obj/.
both-assets-files.zip

@forki - Where is the report? I'll chime in with another report of how this is screwing things up for me. The squeaky wheel gets the grease, after all, and I think they need to know about how this design is causing problems. If they don't get complaints (VERY polite complaints) they might think that everything's fine.

I think we need to raise it with dotnet itself and only using nuget

If you could create a minimal repro showing that issue then we have better chances. Nobody is understanding  paket.exe over there.

I don't understand NuGet, so I'm going to run into a few practical difficulties creating that repro. Any tips?

Probably relevant: https://www.hanselman.com/blog/TheMysteryOfDotnetWatchAndMicrosoftNETCoreAppVersion110preview100110000WasNotFound.aspx

Ok try the following;

create a new c# netcore app
look which packages it draws into assets file
find one that has a closed version range and where you can find something incompatible on nuget org
add that package to the csproj with normal PackageReference xml tag and add pin it to the version that doesn't match the one that comes with the Microsoft.NETCore.App

Now run dotnet restore again and investigate the assets file.
Personally I think it should have told you about the error.
But IIRC it will just ignore your settings from the csproj and use what the sdk wants

@rmunn please let me know if you want to help me on this front

Power outage at the office today (transformer blew) so couldn't do anything about this. I'll ping you if I do need help.

Working on verifying this issue since that's what I first started with, and there's yet another weird exception this time. Running ./build.sh run in a freshly-cloned copy of the scaffold repo, I get the error "The "ResolvePackageDependencies" task failed unexpectedly", with the exception:

System.MissingMethodException: Method not found: 'System.Collections.Generic.IList`1<NuGet.Packaging.Core.PackageDependency> NuGet.ProjectModel.LockFileTargetLibrary.get_Dependencies()'

I never got this error before either. I have to go work on something else just now, but I'll try to post a new issue about this one, since it's probably unrelated. But this does mean that I still can't confirm that merging https://github.com/fable-compiler/fable-suave-scaffold/pull/134 fixed this for me on Linux. I think it did, but I haven't yet been able to get a clean run to confirm for sure.

That MissingMethodException I'm getting looks like the one over at https://github.com/OmniSharp/omnisharp-vscode/issues/1495#issuecomment-302751595. He's using .NET Core SDK 2.0.0-preview2 and so am I, so maybe I should try to remove that and install .NET Core SDK 2.0.0-preview1 or something in the .NET Core SDK 1.x series instead.
I really have not had a good experience with .NET Core so far. I'd expect moving from preview1 to preview2 not to break MAJOR things like the package manager (NuGet is the apparent source of the MissingMethodExceptions here) in any sensible project -- but by that definition, it appears that .NET Core is not sensible. Oh well, this is not the right place to rant about .NET Core. I'll try to downgrade my .NET Core installation on this machine to a .NET Core 1.x SDK version, and see if I can finally confirm this bug as fixed with that approach.

Okay, removing the dotnet-sdk-2.0.0-preview2-006497 package from my Linux box and installing the dotnet-dev-1.0.4 package finally made everything work for me. So I can finally confirm that this bug is fixed.
The other errors I had are apparently caused by trying to run two different versions of .NET Core on my system: one installed globally, and the other one downloaded by the build.fsx script in this scaffold. Apparently that's a recipe for pain and should be avoided. Now I know.
I'll close this issue since it is actually fixed. The other problems I encountered, I'll report in the appropriate repos once I can get a good repro for them.


Fixing HttpResponse headers value

Could simplify the test, otherwise good to go.

@aledsage @neykov The test has been simplified


setup.py, avoid installation of 'tests' package

fixes https://github.com/RogerSelwyn/skyq_hub/issues/4

Please drop me a note if it's fixed, so I can remove the patch from my repository.
Currently it works, so no need to hurry :-)

Hiya - I wasn't concentrating and didn't use your PR, sorry, so going to close it. Note that I have changed your proposal slight to exclude 'tests' and 'manage', since they were both in the package. There was no need to exclude 'tests.*'

No problem. I'll took a universal string, which I applied to more components. So I don't have to check further into them. It only sorts our what is forbidden in Gentoo.


fill_form not working

I'm trying to programmatically fill out this PDF: http://www.irs.gov/pub/irs-pdf/f1065sk1.pdf
and I'm seeing if your gem can help me. Here's the test script I'm using:
#!/usr/bin/env ruby

require 'pdf_forms'
require 'pry'

pdftk = PdfForms::PdftkWrapper.new('/usr/local/bin/pdftk')
pdf   = PdfForms::Pdf.new('2014_k1.pdf', pdftk)

field_names = pdf.fields.map(&:name)

field_values = field_names.map do |name|
  ret = {}
  ret[ name ] = name
  ret
end

pdftk.fill_form '2014_k1.pdf', 'filledout_k1.pdf', field_values

A PDF named filledout_k1.pdf is written to disk, but it doesn't have any fields filled out.
Do I need to convert the PDF to some other format to be able to fill it? I haven't done much with PDFs so I'm not sure how to go about it.

In your code field_values is an array of one-element hashes, but fill_form takes a single hash holding the data to fill in.
I think this
field_values = Hash[ pdf.fields.map{|f| [f.name, f.name]} ]

does what you want.

That worked, thanks for pointing out my oversight @jkraemer and nice work on this gem!


nodemcu-uploader problem

when I try to use nodemcu uploader, this happends:
C:\Users\Lukasz\Desktop>pip install nodemcu-uploader
Requirement already satisfied (use --upgrade to upgrade): nodemcu-uploader in c:\python34\lib\site-packages
Requirement already satisfied (use --upgrade to upgrade): pyserial>=2.7 in c:\python34\lib\site-packages (from nodemcu-uploader)
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\Lukasz\Desktop>nodemcu-uploader
Traceback (most recent call last):
File "C:\Python34\Scripts\nodemcu-uploader-script.py", line 9, in
load_entry_point('nodemcu-uploader==0.3.2', 'console_scripts', 'nodemcu-uploader')()
File "c:\python34\lib\site-packages\pkg_resources_init_.py", line 558, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "c:\python34\lib\site-packages\pkg_resources_init_.py", line 2682, in load_entry_point
return ep.load()
File "c:\python34\lib\site-packages\pkg_resources_init_.py", line 2355, in load
return self.resolve()
File "c:\python34\lib\site-packages\pkg_resources_init_.py", line 2361, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "c:\python34\lib\site-packages\nodemcu_uploader\main.py", line 76
print 'sources', sources
^
SyntaxError: Missing parentheses in call to 'print'
any ideas? wrong python? wrong windows?

Looks like you have python 3, and that will sadly not work yet.
Den 25 juli 2016 11:24 fm skrev "msbrigittte"<EMAIL_ADDRESS>
when I try to use nodemcu uploader, this happends:
C:\Users\Lukasz\Desktop>pip install nodemcu-uploader
Requirement already satisfied (use --upgrade to upgrade): nodemcu-uploader
in c:\python34\lib\site-packages
Requirement already satisfied (use --upgrade to upgrade): pyserial>=2.7 in
c:\python34\lib\site-packages (from nodemcu-uploader)
You are using pip version 7.1.2, however version 8.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade
pip' command.
C:\Users\Lukasz\Desktop>nodemcu-uploader
Traceback (most recent call last):
File "C:\Python34\Scripts\nodemcu-uploader-script.py", line 9, in
load_entry_point('nodemcu-uploader==0.3.2', 'console_scripts',
'nodemcu-uploader')()
File "c:\python34\lib\site-packages\pkg_resources__init__.py", line 558,
in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "c:\python34\lib\site-packages\pkg_resources__init__.py", line 2682,
in load_entry_point
return ep.load()
File "c:\python34\lib\site-packages\pkg_resources__init__.py", line 2355,
in load
return self.resolve()
File "c:\python34\lib\site-packages\pkg_resources__init__.py", line 2361,
in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "c:\python34\lib\site-packages\nodemcu_uploader\main.py", line 76
print 'sources', sources
^
SyntaxError: Missing parentheses in call to 'print'
any ideas? wrong python? wrong windows?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/kmpm/nodemcu-uploader/issues/62, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAF5audH38xZnS7iigxTDX_UxE-nXU7nks5qZIDkgaJpZM4JT78A
.

thanks :)