Is there a way to mark "bad example" as such, to (fx) avoid future AIs training on it?

Sometimes the best example is an example of what not to do.
We have "BAD" sections in our lint descriptions because they are specifically telling you what not to do.
In this "age of AI", is there anything we can do to discourage AIs from considering such an example as positive?
Or maybe make them just not think it's Dart? (As if the AI can understand that.)
For markdown, could we introduce an "invalid-dart" code fence tag which highlights just like Dart, but is presumably "another language"? (I guess that's a GitHub feature, not a Dart feature.)
Or is this just a lost cause, and we should stop writing bad examples, or hope that good examples outweigh them.
(The latter might be optimistic, when the bad example works and discourages other code like it, and therefore becomes a unique example of a particular code pattern.)

Perhaps most llms would be able to deduce that an example is discouraged just from the natural language textual context that it occurs in?


Allow comma for type literal delimiter

Request

TSLint version: 5.7.0
TypeScript version: 2.5.3
Running TSLint via: CLI

Is it possible to let us decide which delimiter to use for type-literal-delimiter? Whether semicolon (default), comma or none ?
#2787 Changed the default behavior of type-literal-delimiter from comma to semicolon.
While this can work for some, those of us with "semicolon": [true, "never"] rule would probably prefer not to use semicolon anywhere.
However, I do see the important of adding a delimiter for type literal, I just wish it wasn't semicolon.

Ideally it would be something like member-delimiter-style from eslint-plugin-typescript, which lets you choose "semi", "comma", or "none" for the delimiter.

☠ TSLint's time has come! ☠
TSLint is no longer accepting most feature requests per #4534. See typescript-eslint.io for the new, shiny way to lint your TypeScript code with ESLint. ✨
It was a pleasure open sourcing with you all!


Explicit support for exotic paths on Windows

There are a plethora of various interesting types on Windows, including but not limited to:

local device paths (\\.\…)
root local device paths (\\?\…)

Read the comprehensive guide on the paths to learn more.
TruePath should at least support parsing and manipulating these. We should also decide what to do about path canonicalization: should we consider new AbsolutePath("C:\Foo") to be equal to new AbsolutePath("\\?\C:\Foo")? Should we trim the \\?\ part on parsing, and automatically add it back on path quoting if requested? These are for now open questions.
I am looking for a discussion on how these are used in reality, so that we can decide on what to do with them properly.

@PaGrom, some examples from you on the potential use of these paths may help to move the discussion forward.


Is there a way to view incident history?

⚠ Please verify that this bug has NOT been raised before.

[X] I checked and didn't find similar issue

🛡 Security Policy

[X] I agree to have read this project Security Policy

📝 Describe your problem
A list of unpinned incidents.
🐻 Uptime-Kuma Version
1.11.1
💻 Operating System and Arch
Ubuntu 20.04 LTS
🌐 Browser
Firefox Nightly
🐋 Docker Version
Latest version
🟩 NodeJS Version
n/a

All created incidents are stored in the incidents table in the SQLite DB, with their title, content, created date, type (style i.e. warning/info etc), so the data is there, but there isn't any front end for viewing past incidents currently I don't think.

+1

I would love to see that feature too. Maybe even expanding incidents with updates like initial incident, issue found, watching and fixed. Or is this a new feature request?

+1

+1

Are we any closer to having this feature?

comment

+1

+1

+1

currently have an open pr for this https://github.com/louislam/uptime-kuma/pull/4943


Remove green dot and hover effect from cards.

This PR fixes issue #709, which was solved in part by PR #741.
Two anomalies were observed around the cards:

A green dot and
a hover effect, as seen in here.

Changes made:
I noticed that the default styling of links included a green bottom border.
Both issues were handled by applying the styling below:
.container .columns.three-pillars .column {
  a {
    border-bottom: none;
  }
  a:hover {
    background-color: #fff;
  }
}

Screenshot:

Deploy preview here...
Thanks for the review!

Thanks
Can you just check if it passes the accessibility tests?

(Sorry @bebatut !! )

Can you just check if it passes the accessibility tests?

Yep yep! I Waved the pages and got this:
"Congratulations! No errors were detected!"
Thanks for mentioning! ❤


[FEATURE]: [Worldpay] Currency Unit Conversion

:memo: Feature Description

Each currency can be described in terms of base or minor units.
For instance, when dealing with USD currency, the Cent is considered as the minor unit, while the Dollar is considered the base unit.
In Hyperswitch, the amount value is expected to be always provided in minor units.
For example: In USD, If the amount is 1 in base unit (Dollar), then it will be equivalent to 100 in minor units (Cent)
Some of the connectors integrated require the amount to be converted to a desirable unit before being passed to them.
We have functions to_currency_base_unit and to_currency_lower_unit in place to convert the minor unit amount to its decimal equivalent and vice versa. These conversions are handled explicitly based on the connector.

:hammer: Possible Implementation

ConnectorCommon trait have been implemented for the connector.
This trait contains get_currency_unit method. This method needs to be implemented.
It will define what type of conversion needs to be done during connector_router_data creation. Concurrently handle the creation of connector_router_data to be passed for the connector request body creation.
You can check this PR for further reference https://github.com/juspay/hyperswitch/pull/2196

:bookmark: Note: All the changes needed should be contained within hyperswitch/crates/router/src/connector/
:package: Have you spent some time checking if this feature request has been raised before?

[X] I checked and didn't find a similar issue

:package: Have you read the Contributing Guidelines?

[X] I have read the Contributing Guidelines

:sparkles: Are you willing to submit a PR?

@VedantKhairnar can you assign this issue to me. I have gone through the codebase and think that I can help in this one.

Hey @Suraj3240 , Sure! I've assigned this to you.
In case you have any queries, you can ask them on this issue thread, or on our discord server, or on slack whichever you are comfortable with.
Thanks!  : )

@VedantKhairnar How will I get the merch which was said upon successful merging of PR?

Hey @Suraj3240  👋,
Just commented a form link on one of your merged PRs. You may fill it multiple times for multiple PRs.
Let me know if you face any issues. Thanks.

Hey @Suraj3240 👋, Just commented a form link on one of your merged PRs. You may fill it multiple times for multiple PRs. Let me know if you face any issues. Thanks.

So will I get multiple swag kits for multiple merged PRs? :))

Yep @Suraj3240 , we are giving goodies for every merged PR. : )

That's quite impressive 👏


[editor]: toggle animation can be improved

The crinkle should collapse and expand during the folding and unfolding animations. This makes it easier for the users to see what has been hidden or revealed. You have already animated this motion in the hover state, this should be very similar.
Here is a sketch for folding. Unfolding will be the same but in reverse.


More scalable unary polling

admit only one poller for read and one for write at a time
(poll is level triggered, so this avoids a thundering herd on each event)
wake only one poller when more pollers are needed, again avoiding a thundering herd

@dklempner @dgquintas @nicolasnoble @yang-g - please help giving this a brutal review...

This may need my other pollset work to get mergable first to avoid some tests timing out.

Very interesting read.
What's the rationale behind the inactive watchers? Preallocation? Which scenarios would benefit from those preallocated inactive watchers?

Watchers are there for (approximately) the length of a poll. The inactive
list let's the fd know which pollsets would be willing to but are not
currently polling on it. Suppose the current read poller times out and
needs to return control to the application, having a list of alternates
lets polling continue.
On Mon, May 18, 2015, 7:09 PM David G. Quintas<EMAIL_ADDRESS>wrote:

Very interesting read.
What's the rationale behind the inactive watchers? Preallocation? Which
scenarios would benefit from those preallocated inactive watchers?
—
Reply to this email directly or view it on GitHub
https://github.com/grpc/grpc/pull/1608#issuecomment-103301124.

Got it, thanks!
On Mon, May 18, 2015 at 7:25 PM, Craig Tiller<EMAIL_ADDRESS>wrote:

Watchers are there for (approximately) the length of a poll. The inactive
list let's the fd know which pollsets would be willing to but are not
currently polling on it. Suppose the current read poller times out and
needs to return control to the application, having a list of alternates
lets polling continue.
On Mon, May 18, 2015, 7:09 PM David G. Quintas<EMAIL_ADDRESS>wrote:

Very interesting read.
What's the rationale behind the inactive watchers? Preallocation? Which
scenarios would benefit from those preallocated inactive watchers?
—
Reply to this email directly or view it on GitHub
https://github.com/grpc/grpc/pull/1608#issuecomment-103301124.

—
Reply to this email directly or view it on GitHub
https://github.com/grpc/grpc/pull/1608#issuecomment-103304503.

Holding this change back until post-release.

Post release. Let's see about getting this reviewed and in.

Yup, will get back to it now
On Wed, May 27, 2015 at 7:29 AM Craig Tiller<EMAIL_ADDRESS>wrote:

Post release. Let's see about getting this reviewed and in.
—
Reply to this email directly or view it on GitHub
https://github.com/grpc/grpc/pull/1608#issuecomment-105931653.


feat: Add types to config-array

This adds type checking to the config-array package, generating types for both ESM and CJS.

@mdjermanovic would like your review here to get this moving.

Looks like packages aren't being properly built in CI, so I created a script to ensure packages are built in the correct order so tsc will be happy.

Removing prepare script breaks the release workflow. This is because the current workflow does not run build script before NPM publish, but instead relies on installing and executing prepare at the same time. Also JSR publish have a separate build step.
We can remove the prepare scripts for all packages and the JSR publish builds from the workflow, and then add the prepare - build script to the workspace root

But I'm sure this can be fixed in another PR

prepare is not going to work in this repo. I've added a build step to the release workflow to account for that.


Update version string to 1.6.0

Looks like it might need to be
I have 2 more cherrypicks, will update this line too.

That's a fairly new file. I'll ask the owner if I should just automatically update that line using our script.


Fix doc link in error handler

Found bad link from https://github.com/fastlane/fastlane/issues/11165

@KrauseFx there are a couple more, but they seem to be appropriate 🎈:baby:

hi, @taquitos, I solved here, my question is the Xcode automatic certificate management needs to be set to come into effect until after nine, I in other people's questions to find the answer.
And the problem that the cocoapods because I lack of Gemfile configuration.
add allowProvisioningUpdates:
gym(export_method: "ad-hoc", export_xcargs: "-allowProvisioningUpdates", configuration: "Adhoc")

Now, I can used the fastlane, hope can help to friends meet the same problem and thanks for your.


[Feature Request] CSV import: connection label reference to a field

So we have the ability to add any label we want to a particular shape by specifying the following in CSV import: # label: %name%
But seems like there is no way to specify a connection label like that: # connect: {"from":"refs", "to":"id", "label": %name%} puts the string "%name%" as a label of all connections, instead I want it to refer the name column of the given CSV

+1 one for this feature.
Is there any known workarounds for this?

You can use fromlabel and tolabel column

1 for this feature.  @jbperrin88 can you expand on thefromlabel tolabel solution?  I can't seem to find documentation for that.

+1 one for this feature.
Is there any known workarounds for this?

There is no currently known workaround, but we haven't investigated in depth.

Hello,
I am trying to write something to convert structurizr DSL JSON [1] to the diagrams.net CSV format, but I am facing the same problem as @Merisho.
Since C4 objects are already in diagrams.net, I would like to import similar objects to what we can manually do with the C4 objects:

I think the connectors should be defined in the "normal" CSV content, not in comments. One mandatory CSV column could serve to tell "this is a box or a connector". Then we can use a "comment" similarly to what is currently done to tell "use this connector from this box to that one", but it should be possible to attach properties to the connectors, just like we can do for boxes.
Alternatively, is there maybe another mechanism to programmatically transfer data from another format to something diagrams.net can read:

beside the CSV or text importer
without having to dive deep in diagrams.net source code
without having to deal with positioning of the elements
?

Thanks
[1] https://github.com/structurizr/dsl

If the data provides a column named (for example) relationLabel then you will be able to create a connector between nodes with a label taken from data in that named column, by using the fromlabel property in # connect referencing that column.
# connect: {"from": "relatedTo",  \
  "to": "id", \
  "fromlabel": "relationLabel", \
  "invert": false, \
  "style": "curved=1" \
}

## CSV below this line. First line contains comma-separated column names
id,name,relatedTo,relationLabel
car,Car,person,drives
person,Person,car,drivenBy


Don't set jmxremote.authenticate system property by default

What this PR does:
Which issue(s) this PR fixes:
Fixes #
Checklist

[x] Changes manually tested
[x] Automated Tests added/updated
[ ] Documentation added/updated
[ ] CHANGELOG.md updated (not required for documentation PRs)
[x] CLA Signed:  DataStax CLA

By making this change we're changing our defaults. I think we should allow to opt out of having jmx auth enabled instead of changing the default, which will trigger a rolling restart upon upgrade ;)

By making this change we're changing our defaults. I think we should allow to opt out of having jmx auth enabled instead of changing the default, which will trigger a rolling restart upon upgrade ;)

I don't know, that sounds overkill for such a small change.

@olim7t, should we close this and fully remove changes we make on the JMX config now that Reaper moved to using the management api?


"Cancel running queries" popup alert message is malformed

Description
When attempting to close an SQL script tab with a running query, a malformed alert message is displayed ('There are "<missing argument>" running SQL queries in this editor.')
DBeaver Version
CE 22.3.4
Operating System
Windows 10 x64
Database and driver
Postgres 13.4, JDBC driver 42.5.0
Steps to reproduce

Open a new SQL tab
In the new tab, start a long-running query
Try to close the tab by clicking on the "x"
The following popup window is displayed:

"<missing argument>" is apparently a placeholder for the actual figure, expected to be 1 in this particular case.
Additional context
No response

Thank you for bug report.


Disabled RxSoftwareSerial not reflected in examples

rangeSensorTx features in both Simple and Advanced examples, but has been disabled in the library files.
You can either remove rangeSensorTX from the examples, or restore RxSoftwareSerial as it has been disabled for a reason not known to me.

This is to avoid conflict with existing libraries. If needed you can rename it and use it.

It's possible to add this lines in example files around to TX parts (declaration and utilisation):

#ifdef MAXBOTIX_WITH_SOFTWARE_SERIAL
#endif

Can you submit a PR with that?


--- stderr: turtlebot3_gazebo CMake Error at CMakeLists.txt:24 (find_package):   By not providing "Findgazebo_ros_pkgs.cmake" in CMAKE_MODULE_PATH

My environment info : win11+wsl2_ubuntu20.04+ROS2-foxy
I want to build the turtlebot3,  download the source code according to turtlebot3.repos and use the version foxy-devel.
but when do the build cmd :colcon build --symlink-install.
an error occurs :

--- stderr: turtlebot3_gazebo
CMake Error at CMakeLists.txt:24 (find_package):
By not providing "Findgazebo_ros_pkgs.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"gazebo_ros_pkgs", but CMake did not find one.
Could not find a package configuration file provided by "gazebo_ros_pkgs"
with any of the following names:
gazebo_ros_pkgsConfig.cmake
gazebo_ros_pkgs-config.cmake

Add the installation prefix of "gazebo_ros_pkgs" to CMAKE_PREFIX_PATH or
set "gazebo_ros_pkgs_DIR" to a directory containing one of the above files.
If "gazebo_ros_pkgs" provides a separate development package or SDK, be
sure it has been installed.

Failed   <<< turtlebot3_gazebo [18.6s, exited with code 1]

I check the source code downloaded, and can't find the gazebo_ros_pkgs, and also in repos foxy-devel. should  i download gazebo_ros_pkgs from other repos version to fix this error?
plz help me!

Hi,
It looks like you have not installed the gazebo_ros_pkgs package.
https://answers.ros.org/question/349782/why-is-not-building-package-turtlebot3_gazebo-on-ros2/


[Feature] Fix Fangorn GitHub off branch issues  [OSF-4973]

Purpose
Most Fangorn actions on non-default github branches fail. This fixes a load of them.

Changes

Renaming in non default branch works (add proper branch references to WB calls) (OSF-4973)
Downloading files on the off branch now works (OSF-4972)
Downloading zip files of off branch (will soon; pending WB fix) work (OSF-7150)

Side effects

Folder creation in off branch now works
Copying files from the off branch to another provider now works

Known issues

Moving or copying multiple files at once does not work (dragging a folder should work thought)
https://openscience.atlassian.net/browse/OSF-5724

Ticket

https://openscience.atlassian.net/browse/OSF-4973
https://openscience.atlassian.net/browse/OSF-4972
https://openscience.atlassian.net/browse/OSF-7150
[#OSF-4973]
[#OSF-4972]
[#OSF-7150]
QA Considerations

Test file renaming in Github master and off branch
Test folder creation in master and off branch
Test downloading a file in master and off branch
Test downloading a zip of the branch in master and off branch
Test combinations of these on the off branch:
a. Rename a file then move to another provider (this copies, but doesn't move, fyi)
b. Drag a file into a folder then rename it
c. Drag a file into a folder then drag it to another provider
d. Rename a file and then drag it into a folder

In each of these cases test that the action occurs without error and then refresh the page and ensure that the changes persist. Check both the master and off branch for changes. The typical issue is that folders or files from the off branch will move to the master branch.

@alexschiller Could you merge develop, fix conflicts, and make sure tests pass?


enhance Refactor TaskWorkerPool

Proposed changes
Refactor TaskWorkerPool
Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall

run buildall

run buildall

run buildall

run buildall

run buildall


Adapt selectize with tabler

[x] incorrect color for text in default option #040A11 (should be #182433)

[x] incorrect color for text in disabled option #040A11 0.5 opacity (should be #182433 0.5 opacity)

[x] incorrect background color for hovered option #DCE1E7 (should be #6C7A91 0.08 opacity)

[x] incorrect background color #066FD1 (should be #066FD1 0.04 opacity) and text color #FFFFFF (should be #066FD1) for selected option

[x] incorrect top&bottom paddings for option 6px (should be 8px)

[x]  incorrect top&bottom paddings for dropdown menu container (selectize-dropdown-content class) 5px (should be 4px)

[x]  incorrect border color for dropdown menu container #DCE1E7 (should be #042045 0.1 opacity)

[x]  incorrect avatar size for recruiter select (position and candidate) 32x32px (should be 20x20px)

[x] Styles for disabled and readonly should be the same as we changed for Text Input (fix(style): Returned .text-input-component-disabled style)

[x] Try to apply for Tabler’s badges (tags) for multiple selects

@amgalanbadmaev may i ask you to clarify

Dropdown menu sizes differs (Recruiter, placement search)
Try to apply for Tabler’s badges (tags) for multiple selects

Previously dropdown menu sizes differed, meaning that we had different font-sizes in and paddings in them. Now seems to be OK
Pill select (i.e. Location and previously was Watchers for tasks) uses badges/tags with styles that doesn't match Tabler's default badge (2nd screenshot), related issue: https://github.com/freeats/freeats/issues/16

Previously dropdown menu sizes differed, meaning that we had different font-sizes in and paddings in them. Now seems to be OK

Note that avatar size for people in Assignee select should also be changed to 20x20px (currently 32x32px)

Pill select (i.e. Location and previously was Watchers for tasks) uses badges/tags with styles that doesn't match Tabler's default badge (2nd screenshot), related issue: Change badges border color #16

ok, removed "Dropdown menu sizes differs (Recruiter, placement search)"
avatar for assignee already fixed here and merged into migration-to-tabler branch
looking into badges

moved checkpoints for quick search select input into separate issue

incorrect text color for disabled option in dropdown menu (white), should be #040A11 0.5 opacity

@amgalanbadmaev need to clarify previously we have "incorrect color for text in disabled option #040A11 0.5 opacity (should be #182433 0.5 opacity)" currently we need "incorrect text color for disabled option in dropdown menu (white), should be #040A11 0.5 opacity (high priority)"
what color for disabled option is correct for us? #040A11 or #182433

Sorry, #182433, mistakenly copy-pasted wrong hex


Getting correction error due to captcha

After using it for a little while I am getting
grammarly:auth<EMAIL_ADDRESS>connection failed { error: 'SHOW_CAPTCHA' }

When trying to log-in again I get:

Are you on the latest version of the extension? If yes, then it reuses session to minimize the number of authentication requests, hence preventing captcha prompts. Try logging in after an hour or so (I am not sure what is cooldown period for auth API).
I am closing the issue for now, but if it doesn't work, I'll reopen and dig deeper.

I'm using 0.12.1, the SHOW_CAPTCHA error happens frequently.

This happened to me as well, would it be possible to expose the captcha in the interface somehow?

Well, I guess this just happens because of lacking OAuth API of Grammarly.

I met the same problem, will try after an hour. Thanks


update: Various over-provisioning language fixes

What this PR does / why we need it:
Fixes various language issues identified in the Over-provisioning section of the CAS lab
Which issue(s) this PR fixes:
Fixes #
Quality checks

[x] My content adheres to the style guidelines
[x] I ran make test module="<module>" it was successful (see https://github.com/aws-samples/eks-workshop-v2/blob/main/docs/automated_tests.md)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

LGTM


Error modifying NSG with ICMP rule

I have a question regarding security-lists and NSGs with respect to ICMP policies.  I found that I had an interesting condition when trying to specify ingress rules for ICMP using the template.  Below is an example of the error output and the same NSG I had created.  If I understand the condition, it seems to be matching against a check for TCP, when in fact the added rule is for ICMP.  I had to comment the lines below out of my NSG in order for the TF plan to complete successfully.
Excerpt from .../config/net_2.3-2.4.tf
    {
      description   = "PATH MTU Discovery ingress rule for ${local.anywhere}."
      stateless     = false
      protocol      = "1"
      src           = local.anywhere
      src_type      = "CIDR_BLOCK"
      src_port      = null
      dst_port      = null
      icmp_code     = 4
      icmp_type     = 3
    },
    {
      description   = "VCN Connectivity error ingress rule for ${var.vcn_cidr}."
      stateless     = false
      protocol      = "1"
      src           = var.vcn_cidr
      src_type      = "CIDR_BLOCK"
      src_port      = null
      dst_port      = null
      icmp_code     = null
      icmp_type     = 3
    }

Error: Attempt to get attribute from null value
on ../../../modules/network/security/main_nsg.tf line 75, in locals:
75:       } if i.protocol == "6" && i.src_port == null && i.dst_port != null && (i.src != var.anywhere_cidr || (i.src == var.anywhere_cidr && length(setintersection(range(i.dst_port.min,i.dst_port.max+1),var.ports_not_allowed_from_anywhere_cidr)) == 0))
|----------------
| i.dst_port is null
This value is null, so it does not have any attributes.
Error: Attempt to get attribute from null value
on ../../../modules/network/security/main_nsg.tf line 89, in locals:
89:       } if i.protocol == "6" && i.src_port != null && i.dst_port != null && (i.src != var.anywhere_cidr || (i.src == var.anywhere_cidr && length(setintersection(range(i.dst_port.min,i.dst_port.max+1),var.ports_not_allowed_from_anywhere_cidr)) == 0))
|----------------
| i.dst_port is null
This value is null, so it does not have any attributes.

Hi Jim, we'll be looking at this as soon as possible.

I believe I have found the issue in the code evaluation logic for security lists.  I still don't quite understand the expected inputs for ICMP and NSGs.
Security-List
It is expected a dst_port to be specified; however, that is being evaluated ahead of the protocol number, which triggers the condition above when dst_port value is set to "null".   However, if the destination port is set to "any", the condition evaluation will continue.
For example....
    {
      description   = "PATH MTU Discovery ingress rule for ${local.anywhere}."
      stateless     = false
      protocol      = "1"
      src           = local.anywhere
      src_type      = "CIDR_BLOCK"
      src_port      = null
      dst_port      = {
        min = 0
        max = 0
      }
      icmp_code     = 4
      icmp_type     = 3
    },
    {
      description   = "VCN Connectivity error ingress rule for ${var.vcn_cidr}."
      stateless     = false
      protocol      = "1"
      src           = var.vcn_cidr
      src_type      = "CIDR_BLOCK"
      src_port      = null
      dst_port      = {
        min = 0
        max = 0
      }
      icmp_code     = null
      icmp_type     = 3
    }

The latest PR #11  has fixed issues with ICMP in NSGs.  Thank you for addressing.


Making unav configurable for consuming client

Making unav version configurable for consuming client's config

Resolves: MWPW-156207
Test URLs:

Before: https://main--milo--adobecom.hlx.page/?martech=off
After: https://gnav--milo--adobecom.hlx.page/?martech=off

QA:

https://adobecom.github.io/nav-consumer/navigation.html?env=stage&navbranch=gnav&unav-version=1.2

Closing this for now as we need more discussion. Thanks @narcis-radu and @mokimo for your feedback.


docs: remove excess quotes in Restricted parameters object

Description

found a small typo when pass through

/rtm

@alequetzalli we need your approval here

/rtm


🐛📄 – trips_performed primary key {date, trip_id} is insufficient to identify trips on frequency based schedules

Describe the problem

date and trip_id_performed are necessary but not sufficient to uniquely identify a trip performed, which may require a trip start_time if the GTFS feed contains frequencies.txt.
For example:
GTFS trips.txt

route_id
service_id
trip_id
direction_id
shape_id

r1
weekday
trip1
0
r1p1

GTFS frequencies.txt

trip_id
start_time
end_time
headway_secs
exact_times

trip1
8:00
16:00
600
1

trip1 is any of the trips on route r1, direction 0, service_id weekday that start between 8:00 and 16:00 (40 trips).
Possible Solutions

Recommended: add start_time to the fields and primaryKey of trips_performed, making it required.
or, make start_time conditionally required if GTFS contains frequencies.txt. No change to the primary key.
or, require that when exact_times is true, frequencies.txt trips are expanded into the stop_times table. But this doesn't work when exact_times is false.

Additional context

trip_id_performed is meant to be a unique ID generated by the AVL system for the trip performed, not the scheduled trip.  This unique ID should be unique across all trips of all routes and all dates for the transit agency.  In general, trip_id_performed should not equal the schedule trip ID.  The trips_performed table has a trip_id_scheduled for that purpose.  If for some reason the AVL system does not generate trip IDs, then the converter to TIDES format should create a surrogate ID.  In the example of a scheduled trip specified in GTFS frequencies.txt, many operated trips, each with their unique operated ID, would all point to the same scheduled ID.  And even in the simpler case of a typical scheduled trip at a specific time, there will be many operated trips pointing to the same scheduled trip... once for each day that scheduled trip is operated.

Thanks for these insights, the description of the field in the report isn't super clear how this field needs to be unique, although it is implied by the primary key. I'm concerned that the way it was intended to work is a little too rigid, and that there may be an easier and more consistent way.
For one, trips_performed is supposed to be a summary table. To me, summary means that a table can be summarized from event tables and the GTFS schedule. From figure 4 (page 22) I see that trips_performed is the only summary table that doesn't have that property, and is not a pure summary table. It also looks like trip_id_scheduled is the only such field that prevents trips_performed from being a true summary table. One solution is to add trip_id_scheduled to the event tables. This would make trips_performed a true summary table, because it wouldn't depend on information unavailable in the event tables or the GTFS feed.
Finally, there's the issue of how CAD/AVL systems behave and how that differs from assumptions in the report. Our system (Transit Master) reports a new or replacement vehicle as operating the original scheduled trip_id, so it would seem that we'd have to create a composite trip_id_performed composed of trip_id_scheduled, vehicle_id and possibly trip start_time. Why not just add those to the primary key? I don't see a lot of advantages to having the requirement for a unique trip_id_performed over adding additional fields to the primary key.
So far I see two options:

require a converter for vendor outputs to ensure that trip_id_performed is unique
or, add additional fields to the primary key, possibly vehicle_id and actual_trip_start, essentially building a unique trip_id_performed from those additional fields. This would allow direct interpretation of trip_ids when systems use unique IDs for service as run, and those that re-use the scheduled trip_id, without requiring an extra step in the converter.

In either case, I think it's desirable to have trips_performed be a true summary table that can be generated from event tables, and I think that would require adding trip_id_scheduled to the event tables.
Here's an abbreviated sample of some stop-crossing records where two vehicles were serving the same scheduled trip. Our system (Transit Master) records and reports only the scheduled trip_id as the trip_ids of the trips as run:

PATTERN_GEO_NODE_SEQ
CALENDAR_ID
ROUTE_DIRECTION_ID
PATTERN_ID
GEO_NODE_ID
BLOCK_STOP_ORDER
SCHEDULED_TIME
ACT_ARRIVAL_TIME
ACT_DEPARTURE_TIME
ODOMETER
DAILY_WORK_PIECE_ID
TIME_POINT_ID
SERVICE_TYPE_ID
VEHICLE_ID
TRIP_ID
PULLOUT_ID
IsRevenue
SCHEDULE_TIME_OFFSET
CROSSING_TYPE_ID
OPERATOR_ID
CANCELLED_FLAG
IS_LAYOVER
ROUTE_ID

1
120200403
3
879705
21046
490
55200
54035
55471
2907
11354696
1435
6
2229
11109919
9139345
R
NA
2
4254
FALSE
TRUE
115815

4
120200403
3
879705
9036
493
55500
55618
55667
2946
11354696
786
6
2229
11109919
9139345
R
NA
0
4254
FALSE
FALSE
115815

6
120200403
3
879705
5010
495
55680
55725
55780
2981
11354696
541
6
2229
11109919
9139345
R
NA
0
4254
FALSE
FALSE
115815

12
120200403
3
879705
21948
501
56100
56080
56130
3057
11354696
561
6
2229
11109919
9139345
R
NA
0
4254
FALSE
FALSE
115815

18
120200403
3
879705
23490
507
56580
56585
56615
3193
11354696
2013
6
2229
11109919
9139345
R
NA
0
4254
FALSE
FALSE
115815

25
120200403
3
879705
17075
514
57060
56861
57917
3287
11354696
1125
6
2229
11109919
9139345
R
NA
1
4254
FALSE
TRUE
115815

4
120200403
3
879705
9036
493
55200
55006
55158
4056
11355948
786
6
2235
11109919
9140138
R
NA
0
6335
FALSE
FALSE
115815

6
120200403
3
879705
5010
495
55380
55216
55377
4091
11355948
541
6
2235
11109919
9140138
R
NA
0
6335
FALSE
FALSE
115815

12
120200403
3
879705
21948
501
55800
55573
55735
4172
11355948
561
6
2235
11109919
9140138
R
NA
0
6335
FALSE
FALSE
115815

18
120200403
3
879705
23490
507
56280
56202
56247
4311
11355948
2013
6
2235
11109919
9140138
R
NA
0
6335
FALSE
FALSE
115815

Another thing to consider is the trip_id of GTFS Realtime, which should have added ids for any trip added to the schedule (or generated from a frequency-based schedule)

For one, trips_performed is supposed to be a summary table. To me, summary means that a table can be summarized from event tables and the GTFS schedule. From figure 4 (page 22) I see that trips_performed is the only summary table that doesn't have that property, and is not a pure summary table. It also looks like trip_id_scheduled is the only such field that prevents trips_performed from being a true summary table.

I think of trips_performed as a summary table only because a trip is not an event at a particular time, but a collection of events that is "summarized" into a single row.  This is consistent with the distinction made in page 16 of the report, in which event tables have one row per event, each at an instant in time.  Even a serviced stop is considered a summary type in this regard, because arrival, departure, and each boarding and alighting are individual events happening while the stop is being visited.  There may be a system that has simple GPS breadcrumb data for each vehicle, and not routes and trips, and in that case the individual events could be processed to distill stop visits and trips, but if you have AVL like Transit Master, it will give you "summary" data for each trip, for each (or at least some) stops, etc.  So where summary data comes from is situation-dependent.

One solution is to add trip_id_scheduled to the event tables. This would make trips_performed a true summary table, because it wouldn't depend on information unavailable in the event tables or the GTFS feed.

I support your idea to add trip_id_scheduled to the vehicle_locations table as an optional field.  There are AVL systems like Clever that report breadcrumbs or heartbeats, which are timestamped events, and those events come decorated with a trip_id.  Not all systems do that, but some do.  I don't know of any AVL system that records trips and doesn't generate stop-level and trip-level data files (considered "summary" files in TIDES), and this is probably why the TIDES spec omitted that field: if you have both, you can always join the events to the stops and trips based on vehicle ID and time, and get the scheduled trip ID that way.  But there is no harm in having the option to identify the scheduled trip in vehicle events, and it could be convenient to avoid the fuzzy join.

Finally, there's the issue of how CAD/AVL systems behave and how that differs from assumptions in the report. Our system (Transit Master) reports a new or replacement vehicle as operating the original scheduled trip_id, so it would seem that we'd have to create a composite trip_id_performed composed of trip_id_scheduled, vehicle_id and possibly trip start_time.

Although those three columns can indeed serve to identify an operated trip, it's not an ideal primary key because not all operated trips are scheduled, and it is more efficient and direct to identify operated trips with an ID generated for that purpose, which most AVL systems have.  Transit Master deployments I'm familiar with have a unique trip_id column in addition to the reference to a scheduled trip ID, block ID, etc.  In a system that didn't have such an ID, the TIDES implementer should indeed create an ID, either by generating a surrogate serial number and keeping track of it, or by concatenating a few fields that are guaranteed to be unique in that system.

Why not just add those to the primary key? I don't see a lot of advantages to having the requirement for a unique trip_id_performed over adding additional fields to the primary key.

Because not all systems will identify trips using that combination of fields, many/most will use a single-field serial number to do so, and adding fields to the primary key would signify that the other fields aren't sufficient to identify a trip.  Primary keys are generally defined with the minimum set of fields required to uniquely identify records, and in practice when there are many fields required, a surrogate ID is usually generated.  Besides, requiring a multi-field key would complicate the software that consumes TIDES data.

So far I see two options:
1. require a converter for vendor outputs to ensure that trip_id_performed is unique

Definitely!  And the converter will have to check many other things to comply with TIDES.

Our system (Transit Master) records and reports only the scheduled trip_id as the trip_ids of the trips as run

Are you sure?  Maybe in another table, version of the table, etc. that you don't have access to?  I ask only because if the system is keeping track of operated trips, it probably has an identifier for those internally, and it would be strange if it were left out of the file/table.  It's conceivable that there really isn't an ID, in which case one should be generated.

For one, trips_performed is supposed to be a summary table. To me, summary means that a table can be summarized from event tables and the GTFS schedule. From figure 4 (page 22) I see that trips_performed is the only summary table that doesn't have that property, and is not a pure summary table. It also looks like trip_id_scheduled is the only such field that prevents trips_performed from being a true summary table.

I think of trips_performed as a summary table only because a trip is not an event at a particular time, but a collection of events that is "summarized" into a single row. This is consistent with the distinction made in page 16 of the report, in which event tables have one row per event, each at an instant in time. Even a serviced stop is considered a summary type in this regard, because arrival, departure, and each boarding and alighting are individual events happening while the stop is being visited. There may be a system that has simple GPS breadcrumb data for each vehicle, and not routes and trips, and in that case the individual events could be processed to distill stop visits and trips, but if you have AVL like Transit Master, it will give you "summary" data for each trip, for each (or at least some) stops, etc. So where summary data comes from is situation-dependent.

One solution is to add trip_id_scheduled to the event tables. This would make trips_performed a true summary table, because it wouldn't depend on information unavailable in the event tables or the GTFS feed.

I support your idea to add trip_id_scheduled to the vehicle_locations table as an optional field. There are AVL systems like Clever that report breadcrumbs or heartbeats, which are timestamped events, and those events come decorated with a trip_id. Not all systems do that, but some do. I don't know of any AVL system that records trips and doesn't generate stop-level and trip-level data files (considered "summary" files in TIDES), and this is probably why the TIDES spec omitted that field: if you have both, you can always join the events to the stops and trips based on vehicle ID and time, and get the scheduled trip ID that way. But there is no harm in having the option to identify the scheduled trip in vehicle events, and it could be convenient to avoid the fuzzy join.

I'm moving the discussion of summarizing events into trips_performed to its own issue #70

GTFS-realtime supports duplicating existing trips by setting schedule_relationship to DUPLICATED, adding a TripProperties message with trip_id (the new ID, not contained in the static feed, equivalent to trip_id_performed here), start_date and start_time. The TripProperties.trip_id field must be empty if schedule_relationship is not duplicated. All feed entities (regardless of schedule_relationship status) contain a TripDescriptor message, which contains trip_id, equivalent to our trip_id_scheduled.
Each GTFS-realtime TripUpdate for duplicated service contains both the unique trip_id_performed and the trip_id_scheduled, similar to my proposal above to add trip_id_scheduled to the event tables. In GTFS-realtime, trip_id_performed is expected to be the GTFS ID unless it's duplicated service.
I think there is value in matching the GTFS-realtime semantics as much as possible.

I agree with the spirit of trying to match GTFS where possible, but in this case the approach is convoluted and messy.  Maybe it makes sense for GTFS-realtime because it's purpose it to give riders real-time updates about schedule adjustments and when the bus is coming to their stop.  It doesn't make sense for TIDES, since it's purpose is to standardize AVL/APC/AFC data.  Moreover, TIDES should work cleanly and simply when we have data of operated trips without a schedule, whether it is because schedule data doesn't exist or because it isn't relevant for the analysis task at hand and therefore those working on it don't want to go through the work of converting schedules too.

Finally, there's the issue of how CAD/AVL systems behave and how that differs from assumptions in the report. Our system (Transit Master) reports a new or replacement vehicle as operating the original scheduled trip_id, so it would seem that we'd have to create a composite trip_id_performed composed of trip_id_scheduled, vehicle_id and possibly trip start_time.

Although those three columns can indeed serve to identify an operated trip, it's not an ideal primary key because not all operated trips are scheduled, and it is more efficient and direct to identify operated trips with an ID generated for that purpose, which most AVL systems have. Transit Master deployments I'm familiar with have a unique trip_id column in addition to the reference to a scheduled trip ID, block ID, etc. In a system that didn't have such an ID, the TIDES implementer should indeed create an ID, either by generating a surrogate serial number and keeping track of it, or by concatenating a few fields that are guaranteed to be unique in that system.

Ours does not provide a unique ID. The sample data I provided contains TM internal IDs, not our public facing GTFS IDs. But we've also identified examples in the TM generated GTFS-realtime TripUpdates feed with multiple vehicles assigned to the same trip_id. Which makes sense because until recently there really was no way to provide a unique trip_id in realtime that would mean anything, because there was no way to link it to an existing trip_id in GTFS static.
That's a great point, not all trips are scheduled. There are a few options, as reflected in the GTFS-realtime TripUpdates documentation, shown with their schedule_relationship value in all-caps:

trip runs as scheduled: SCHEDULED, TripDescriptor.trip_id MUST match a trip_id in GTFS trips.txt, or trip must be identified using: schedule_relationship = SCHEDULED, and TripDescriptor.{route_id, direction_id, start_time, start_date}. TripProperties.trip_id must not be populated.
trip runs on a route without a fixed schedule: UNSCHEDULED, uses GTFS frequencies.txt with exact_times = 0, identifying the trip requires TripDescriptor.{trip_id, start_date, start_time}. TripProperties.trip_id, the equivalent of trip_id_performed is not allowed.
trip added to the schedule: ADDED, basically deprecated and replaced by DUPLICATED. The ability to provide an entirely new trip not based on anything in the schedule is part of the GTFS-realtime ServiceChanges proposal. This ability is an issue for TIDES because we currently specify relationships to GTFS static only, and there would need to be a way to archive and reference the contents of GTFS-realtime ServiceChanges to access extended attributes about service (e.g., block_id, route_short_name, shape_dist_traveled), see #50.
trip removed from schedule: CANCELED, not run, won't appear in TIDES event tables.
trip copied from the schedule: DUPLICATED, the new trip uses an existing trip as a template and requires a new start_date/time, a unique trip_id not found in GTFS trips.txt (all from the TripProperties message) and the scheduled trip_id (TripDescriptor) found in trips.txt. Can also refer to a new shape that doesn't exist within GTFS shapes.txt.

GTFS-realtime TripProperties.trip_id, the equivalent of trip_id_performed is prohibited unless schedule_relationship is DUPLICATED, or potentially ADDED if/when GTFS realtime gains the ability to describe entirely new trips not related to the schedule.

Why not just add those to the primary key? I don't see a lot of advantages to having the requirement for a unique trip_id_performed over adding additional fields to the primary key.

Because not all systems will identify trips using that combination of fields, many/most will use a single-field serial number to do so, and adding fields to the primary key would signify that the other fields aren't sufficient to identify a trip. Primary keys are generally defined with the minimum set of fields required to uniquely identify records, and in practice when there are many fields required, a surrogate ID is usually generated. Besides, requiring a multi-field key would complicate the software that consumes TIDES data.

A trip doesn't exist unless a vehicle is serving it, and if it exists, it must have started on some date and time, so, vehicle_id and date (already required in passenger_events and vehicle_locations) and start_time will always exist for any row in trips_performed.
Can you explain how a multi-field key would complicate software that consumes TIDES data? I regularly use multi-field primary keys across a variety of vendor products (and GTFS) and find them quite useful.

So far I see two options:
1. require a converter for vendor outputs to ensure that trip_id_performed is unique

Definitely! And the converter will have to check many other things to comply with TIDES.

Our system (Transit Master) records and reports only the scheduled trip_id as the trip_ids of the trips as run

Are you sure? Maybe in another table, version of the table, etc. that you don't have access to? I ask only because if the system is keeping track of operated trips, it probably has an identifier for those internally, and it would be strange if it were left out of the file/table. It's conceivable that there really isn't an ID, in which case one should be generated.

I'm pretty sure. In the sample data a few fields distinguish trips operating under the same TRIP_ID, the most obvious and reliable is VEHICLE_ID, but DAILY_WORK_PIECE_ID, OPERATOR_ID and PULLOUT_ID also work.
As I noted previously, in GTFS-realtime the equivalent of trip_id_performed MUST NOT be provided if the schedule relationship is not duplicated. So the proposed table structure is very much at odds with existing practice, even if it is "experimental".

A trip doesn't exist unless a vehicle is serving it, and if it exists, it must have started on some date and time, so, vehicle_id and date (already required in passenger_events and vehicle_locations) and start_time will always exist for any row in trips_performed.

Yes, a compound primary key of (vehicle_id, date, start_time) without trip_id_scheduled would be a valid natural key.  This would work for bus systems in almost all cases.  (Hardware could glitch and generate two records for the same vehicle at the same time, but it would be reasonable for a TIDES processor to de-duplicate that, selecting the one that makes the most sense or combining records if necessary.  This should be quite rare anyway.)
It could be a little bit more challenging (but not impossible) to apply this in rail systems, because in that case vehicles are formed each day by joining rail cars, and it is rail cars that have IDs, but it is not uncommon for the wayside detection equipment to not detect one or more cars.  A vehicle location cleaner would have to deal with this.  But rail systems often give a trip_id_operated that is independent of the cars detected, and helpful for analysis and for the cleaning process.  Although rare, it is sometimes the case that a train is coupled or uncoupled mid-trip, in which case the natural key would change.
My sense, based on over a decade of experience dealing with data of multiple rail and bus systems, and having tried both approaches, is that the surrogate trip_id_performed is the better approach, but I do understand that if you don't see such a key generated by your system you would naturally prefer to create a key based on what you do have.  At the risk of complicating the standard, could we say in the spec that trip_id_performed is the preferred primary key, but that if that is not available then the compound natural key is a valid alternative, at least in TIDES data generated by minimally processing vendor equipment data?  (This data could later be processed and restated in the same format, fixing location/time issues and adding trip_id_performed.)

Can you explain how a multi-field key would complicate software that consumes TIDES data? I regularly use multi-field primary keys across a variety of vendor products (and GTFS) and find them quite useful.

The natural key would work conceptually (especially for bus), but it could get a bit more complicated in some of the cases I outlined above, and in some cases it would be problematic if the key included trip_id_scheduled.

As I noted previously, in GTFS-realtime the equivalent of trip_id_performed MUST NOT be provided if the schedule relationship is not duplicated. So the proposed table structure is very much at odds with existing practice, even if it is "experimental".

GTFS-realtime is designed to provide real-time data to customers on variations from the schedule as appearing in the trip planner and on real-time vehicle locations.  It is not a good standard for bulk transit ITS data, and it was never meant to be that.  The team that drafted TIDES looked at existing practice as it relates to bulk transit ITS data, and set out to build the best standard for that purpose.  As it pertains to this issue, the idea of making the TIDES spec require that performed trips be identified by trip_id_scheduled when that works as a unique identifier in a day, but otherwise use another ID seems possible but awkward and conducive to bugs in user code, in light of how TIDES data will be used.  Since the trip_id_performed that does work in cases of duplicate scheduled trips would sometimes be required, changing the spec wouldn't save TIDES implementors from having to handle that.
I would be curious to look at your bus AVL data sometime, including the Transit Master data dictionary provided for your implementation, all available lookup tables, etc.

Hello,
We have a use case, that I don't think is that unique, that would be
relative to this discussion. It revolves around two types of service--extra
service for schools, and special event service for sporting events. For the
first case, we run extra service for as many as twenty (20) school
districts across our nine garages, with each district having its own school
calendar. Rather than try to maintain a precise calendar across HASTUS,
TransitMaster, and GTFS-Static, we treat every weekday in TransitMaster as
a school day and annul the trips as necessary. On the other hand, in GTFS
every day is a non-school day, and no extra service appears in GTFS-Static
due to the perceived calendar complexity issues. These trips actually have
trip numbers that are distinct in TransitMaster, and are compatible with
GTFS, so we would like to be able to pick these up through the GTFS-RT
data, if possible.
The second issue is special events service. This is primarily service to
regional sports teams. As started times can vary, and be changed at the
last moment due to broadcasting requirements, we do not try to schedule the
trips. However, we do have runs set up in HASTUS and TransitMaster that are
dedicated to these services. Several buses can log into each run (perhaps
up to 12 buses per run?). In this way, we at least have identifiers out as
to the nature of the service. Can there be a way to capture this through
GTFS-RT that can be fed through to TIDES? We have trouble capturing this
data without currently capturing our own GTFS-RT data.
Thanks for looking at these two use cases in this discussion. I don't think
the first one is that abnormal. Extra service is an issue for many transit
agencies.
Regards,
James Garner
On Fri, Sep 30, 2022 at 10:55 AM Joey Reid @.***> wrote:

Finally, there's the issue of how CAD/AVL systems behave and how that
differs from assumptions in the report. Our system (Transit Master) reports
a new or replacement vehicle as operating the original scheduled trip_id,
so it would seem that we'd have to create a composite trip_id_performed
composed of trip_id_scheduled, vehicle_id and possibly trip start_time.
Although those three columns can indeed serve to identify an operated
trip, it's not an ideal primary key because not all operated trips are
scheduled, and it is more efficient and direct to identify operated trips
with an ID generated for that purpose, which most AVL systems have. Transit
Master deployments I'm familiar with have a unique trip_id column in
addition to the reference to a scheduled trip ID, block ID, etc. In a
system that didn't have such an ID, the TIDES implementer should indeed
create an ID, either by generating a surrogate serial number and keeping
track of it, or by concatenating a few fields that are guaranteed to be
unique in that system.
Ours does not provide a unique ID. The sample data I provided contains TM
internal IDs, not our public facing GTFS IDs. But we've also identified
examples in the TM generated GTFS-realtime TripUpdates feed with multiple
vehicles assigned to the same trip_id. Which makes sense because until
recently there really was no way to provide a unique trip_id in realtime
that would mean anything, because there was no way to link it to an
existing trip_id in GTFS static.
That's a great point, not all trips are scheduled. There are a few
options, as reflected in the GTFS-realtime TripUpdates documentation
https://gtfs.org/realtime/reference/#message-tripupdate, shown with
their schedule_relationship value in all-caps:

trip runs as scheduled: SCHEDULED, TripDescriptor.trip_id MUST match
a trip_id in GTFS trips.txt, or trip must be identified using:
schedule_relationship = SCHEDULED, and TripDescriptor.{route_id,
direction_id, start_time, start_date}. TripProperties.trip_id must not be
populated.
trip runs on a route without a fixed schedule: UNSCHEDULED, uses
GTFS frequencies.txt with exact_times = 0, identifying the trip requires
TripDescriptor.{trip_id, start_date, start_time}.
TripProperties.trip_id, the equivalent of trip_id_performed is not
allowed.
trip added to the schedule: ADDED, basically deprecated and replaced
by DUPLICATED. The ability to provide an entirely new trip not based on
anything in the schedule is part of the GTFS-realtime ServiceChanges
proposal. This ability is an issue for TIDES because we currently specify
relationships to GTFS static only, and there would need to be a way to
archive and reference the contents of GTFS-realtime ServiceChanges to
access extended attributes about service (e.g., block_id, route_short_name,
shape_dist_traveled), see #50
https://github.com/TIDES-transit/TIDES/issues/50.
trip removed from schedule: CANCELED, not run, won't appear in TIDES
event tables.
trip copied from the schedule: DUPLICATED, the new trip uses an
existing trip as a template and requires a new start_date/time, a unique
trip_id not found in GTFS trips.txt (all from the TripProperties message)
and the scheduled trip_id (TripDescriptor) found in trips.txt. Can also
refer to a new shape
https://gtfs.org/realtime/reference/#message-shape that doesn't
exist within GTFS shapes.txt.

GTFS-realtime TripProperties.trip_id, the equivalent of trip_id_performed
is prohibited unless schedule_relationship is DUPLICATED, or potentially
ADDED if/when GTFS realtime gains the ability to describe entirely new
trips not related to the schedule.
Why not just add those to the primary key? I don't see a lot of advantages
to having the requirement for a unique trip_id_performed over adding
additional fields to the primary key.
Because not all systems will identify trips using that combination of
fields, many/most will use a single-field serial number to do so, and
adding fields to the primary key would signify that the other fields aren't
sufficient to identify a trip. Primary keys are generally defined with the
minimum set of fields required to uniquely identify records, and in
practice when there are many fields required, a surrogate ID is usually
generated. Besides, requiring a multi-field key would complicate the
software that consumes TIDES data.
A trip doesn't exist unless a vehicle is serving it, and if it exists, it
must have started on some date and time, so, vehicle_id and date (already
required in passenger_events and vehicle_locations) and start_time will
always exist for any row in trips_performed.
Can you explain how a multi-field key would complicate software that
consumes TIDES data? I regularly use multi-field primary keys across a
variety of vendor products (and GTFS) and find them quite useful.
So far I see two options:

require a converter for vendor outputs to ensure that trip_id_performed is unique

Definitely! And the converter will have to check many other things to
comply with TIDES.
Our system (Transit Master) records and reports only the scheduled trip_id
as the trip_ids of the trips as run
Are you sure? Maybe in another table, version of the table, etc. that you
don't have access to? I ask only because if the system is keeping track of
operated trips, it probably has an identifier for those internally, and it
would be strange if it were left out of the file/table. It's conceivable
that there really isn't an ID, in which case one should be generated.
I'm pretty sure. In the sample data a few fields distinguish trips
operating under the same TRIP_ID, the most obvious and reliable is
VEHICLE_ID, but DAILY_WORK_PIECE_ID, OPERATOR_ID and PULLOUT_ID also work.
As I noted previously
https://github.com/TIDES-transit/TIDES/issues/51#issuecomment-1263580908,
in GTFS-realtime the equivalent of trip_id_performed MUST NOT be provided
if the schedule relationship is not duplicated. So the proposed table
structure is very much at odds with existing practice, even if it is
"experimental".
—
Reply to this email directly, view it on GitHub
https://github.com/TIDES-transit/TIDES/issues/51#issuecomment-1263745544,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADGVYT7OHRTDZNIZRXFKB2DWA4ENXANCNFSM6AAAAAAQUAE6WI
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

There was a lot of discussion on this issue and I want to try to resolve it. I believe the spec, as it stands, has the primary key for trips_performed as trip_id_performed +service_date.  To me, this means that trip_id_performed must be unique across all trips on a given date.  That is not quite consistent with @gabriel-korbato comment that trip_id_performed should be unique across all time.  But I think that is perhaps too difficult to manage.  My sense is that defining trip_id_performed as unique on a given service date is adequate.  Are there further objections to this?  If not, I'd like to close this issue.
I'm not sure we have resolved @mtnsguy use cases of school trips and event service.  In both cases there are trips that do not have a scheduled_trip_id in GTFS.  This is similar to the situation discussed in #50. As with that case, some other mechanism will be required to either modify the GTFS files to include those trips or add another data source with the added trip information.  I don't believe that is a V1 milestone issue, so perhaps this should be broken out for further discussions or added into issue #50.

There was a lot of discussion on this issue and I want to try to resolve it. I believe the spec, as it stands, has the primary key for trips_performed as trip_id_performed +service_date. To me, this means that trip_id_performed must be unique across all trips on a given date. That is not quite consistent with @gabriel-korbato comment that trip_id_performed should be unique across all time. But I think that is perhaps too difficult to manage. My sense is that defining trip_id_performed as unique on a given service date is adequate. Are there further objections to this? If not, I'd like to close this issue.

We can't close this until the description field for trip_id_performed is updated to reflect the working definition of this field, it must be unique within a service_date and it does not need to be the same as the scheduled_trip_id. Anyone want to make a pull-request?


Added bucket sort

What type of PR is this? (check all applicable)

[ ] 🚀 Added Name
[ ] ✨ Feature
[ ] 🌟 stared the repo
[ ] 🐛 Grammatical Error
[ ] 📝 Documentation Update
[x] 🚩 Other

Description
Added bubble sort
Add Link of GitHub Profile
https://github.com/aman-ku

You filled 1 in starred repo but you have not starred this repo.
Fill 0 if you don't want to star this repo else fill 1.
So that i can merge your pull request

Starred the repository.
On Sun, Oct 25, 2020, 05:25 Keshav Singh<EMAIL_ADDRESS>wrote:

You filled 1 in starred repo but you have not starred this repo.
Fill 0 if you don't want to star this repo else fill 1.
So that i can merge your pull request
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/keshavsingh4522/hacktoberfest2020/pull/177#issuecomment-716070489,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AK3ZY37QR2ND3FPCNYCWASTSMNSOBANCNFSM4S5XVAPA
.


iOS cannot play videos sent from web

Videos sent from web do not have thumbnail information.
The ios client must display a video placeholder.

Note: a placeholder will be added later for video attachment without thumbnail


As of dart SDK 2.12, "double" type doesn't append “0” at tenths place

After upgrading to flutter 2.0 my application suddenly crashes, after debugging I found that issue is with double type.
Description of the issue:
Apparently after upgrading to flutter 2.0 (which also upgrades dart SDK) double type doesn't append 0 at tenths place , if there is only 0 to the right of the decimal point.  Also its runtime type changes to int.
It works perfectly fine if there is nonzero number to the right of the decimal point.
double type with dart SDK 2.12.2 (working unexpectedly):

As seen in the above snapshot (dart SDK: 2.12.2 & flutter 2.0.3) variable x is of double type but it changes to int, while variable y is working properly.
double type with dart SDK 2.10.5  (working as expected):

I have already tried using double.parse() method, but in the end it gives me the same output (integer). If this is a genuine issue please assign me to fix this issue, otherwise if there's any work around please suggest one.
Originally posted by @Tapaswi846580 in https://github.com/flutter/flutter/issues/79660

This is one of the differences between numbers on the web and numbers on the native VM.
On the VM (your SDK 2.10.5 results), 3 and 3.0 are objects with different types.
On the web (dartpad), compiled to JavaScript, Dart uses JavaScript numbers or both int and double.
In JavaScript 3 and 3.0 are the same JavaScript Number, so the result of $x is the same.
It is best not to expect a double has any particular number of fractional decimal digits. Sometimes there are many more than you might expect, e.g. print(3.08 - 0.07) prints as 3.0100000000000002 due to floating-point arithmetic.
It is not the same value as 3.01. See https://floating-point-gui.de/ for more detailed explanations.

Thanks for the clarification. As you said, problem lies with javascript, I wrote a code in flutter and executed on both mobile and web platform.
Works perfectly fine on mobile platform:

But on web, due to javascript problem persists

If there is any solution to this, please provide one or else I have to make a workaround by using toStringAsFixed(1) method.
Thanks for the clarification.

I am going to close this as intended (but feel free to continue discussion on the issue).
@rakudrama @sigmundch have we ever considered using static type to produce more consistent results for toString between VM and native (so that doubleValue.toString actually returns something with a .)?

Thanks for the reply, please do continue the discussion, if there's any update on this. Thanks again.

@mraleph I have thought about using the static type more, but I think it is a bad idea to introduce an inconsistency within an implementation in addition to the inconsistency between implementations. The original inconsistency is not removed if the static type is, e.g. num. If toString() is sensitive to the static type, then so should interpolation (as in the initial example). This implies it is not possible to implement interpolation as an instance of a general mechanism (like back-tick in JavaScript).
My thoughts on using double values in the UI is as follows:
One should not rely on the default toString() of a double when presenting the value to a user.
The UI should always choose the format suitable for the context.
Consider
double d1 = 3.1;
double d2 = 3.8 - 0.7;  //  3.0999999999999996
double d3 = d2 - d1;    //  -4.440892098500626e-16

d1 and d2 do not have the same value due to how floating point arithmetic works.
3.0999999999999996 might be confusing to the user, and -4.440892098500626e-16 might be even more confusing.
The difference between 3.0 and 3 is less of a problem than the general problem of working with floating point (double) numbers.
The documentation for double.toString() makes no guarantees as whether the result contains a '.'). double.toString() is good for is the documented invariant: d == double.parse(d.toString()). This allows you to store double numbers in a text format without additional rounding errors.
When presenting numbers to the user, there are additional concerns. Should the number be formatted with separators? What are the appropriate separator and their positions? What are the digits of the language of the user?
These can be addressed by using NumberFormat.
If the rounding and truncation errors built into double arithmetic are a problem, one might use a data type that allows these errors to be better controlled, e.g. aDecimal package.


Fix issues with stopping VMs

Fix: A VM was only marked as stopping after all runs completed
Fix: Stopping executions could be returned

Only CodeCov tests are failing


Fix typo in readme

As simple as it could be :)

@maxsel
Thanks.

Pull Request Test Coverage Report for Build 5407

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.03%) to 65.662%

Totals

Change from base Build 5398:
0.03%

Covered Lines:
10837

Relevant Lines:
16101

💛  - Coveralls


XML attribute associated to wrong type from XSD

Issue Type: Bug
I created an XML schema containing a complexElement with two attributes. The first one is just a simple string, the second one has a custom simpleType inheriting from string but having an additional minLength=1 restriction.
When trying this schema, the first attribute is wrongly associated to the second's custom type.
You can easily reproduce this issue with the linked ZIP archive. It contains a simple schema and an XML file using it and having the described issue.
VSCode_XSD_Bug.zip
In test.xml you'll see that two errors are highlighted where only one should exist, on the Some_Restricted_Value attribute.

The helper popup even tells the wrong type.

When writing a value in the restricted attribute, both of the errors disappear.

VS Code version: Code 1.57.1 (507ce72a4466fbb27b715c3722558bb15afa9f48, 2021-06-17T13:28:07.755Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2592)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledskia_renderer: enabled_onvideo_decode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
31.82GB (16.19GB free)

Process Argv
--crash-reporter-id 911c2726-6c6e-4a5a-ae4b-433ecadb690e

Screen Reader
no

VM
0%

Extensions: none
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt551cf:30311713
vspre833:30321513
pythonptprofiler:30281270
vshan820:30294714
pythondataviewer:30285071
vscus158:30321503
pythonvsuse255cf:30323309
vscorehov:30309549
vscod805:30301674
pythonvspyt200:30324779
binariesv615cf:30323120
vsccppwt:30322536

The XML validation must come from an extension, as we don't provide that out-of-the-box.
Are you sure you have no extensions installed?
Maybe https://marketplace.visualstudio.com/items?itemName=redhat.vscode-xml ?

Indeed, I disabled every extension to test it out but the "Reload required" was not shown to me or some reason. I'll redirect the issue to Red Hat.

See https://github.com/redhat-developer/vscode-xml/issues/524 for people interested in this issue.


design and implement pages(add/edit/delete/list) for "organization"

after designed and implemented base of ui by angular, we need to implement pages for first resource called "organization".
I have attached current(old) ui pages of organization to have idea about fields.

@kushaw
we are using django-rest-framework to implement rest api for resources.
then if you setup the project on your pc and run that locally, you can see the spec of all api in this url:
http://localhost:8000/api/v1/
and so you can find organization rest api here:
http://localhost:8000/api/v1/organization/
please let me know if any question.

I would need help in setting up this application on my Local machine. I would also what to have a walk through of the project.
on the below points:

project description.
what is pending.
what is the project architecture.
if it is Metronic UI are we using this page with all its code css and js?

@kushaw The anaconda installation of Python is a great way to get Python on you Windows machine.
choose the python 3.5
https://bitnami.com/stack/django/installer
What are you using to edit files? What IDE or text editor?
From here is is easy to run a development version of the app from your Windows machine. I or @pprolancer  can probably walk you through the other steps.

@kushaw
1- as a first priority task, better is to install dr referral project locally. you have this choice:
a) as vincent told, you can use anaconda
b) or you can install everything directly in windows(postgresql + python libs).
c) or you can create a virtual machine via virtualbox(or vmware) and install ubuntu on that.
2- regarding project architecture, for now you only need to know we want to implement a single page application via:
a) REST api
b) JSON
c) Angularjs
you can see REST api spec here as I sent in skype: http://<IP_ADDRESS>/api/v1/
3- for start we want to polish metronic theme to create base structure of our ui.
then regarding js and css of metronic theme, you need to hold least libraries to could design base structure of ui + organization page as you see in wireframe in issue #82 .
then we can add new libraries in future if needed.
just again, remember our base ui should be according our metronic theme + wireframe.
then you dont need to design everything from scratch. design is according metronic theme, just you need to polish that to be fit of our work.
Thanks

thanks Ali it clear now


Enhancements to link sharing in VS Code

Integration with vscode.dev

[ ] Add Checkout in vscode.dev command action to GHPRI view PR context menu
[ ] Add Open on vscode.dev to desktop git branch picker

Share menu

[ ] Add support for consolidated Share menu (vscode#172425):

[ ] Editor tab context menu editor/title/context/share
[ ] Explorer file context menu explorer/context/share
[ ] ~SCM resource context menu scm/resourceState/context/share~
[ ] Adopt support in GitHub Pull Requests, GitHub Repositories, and builtin GitHub extension

[ ] Integrate Live Share into Share menu as Share > Start Collaboration Session
[ ] Add Copy __ link to a new editor gutter context menu contribution point (ensure no conflict with gutter breakpoints)

Link behavior

[ ] Copy GitHub Permalink should always generate github.com permalinks links on desktop, vscode.dev, and github.dev
[ ] Copy vscode.dev link should generate vscode.dev links and be present only on desktop and vscode.dev
[ ] Copy github.dev link to generate github.dev links and be present only on github.dev

@alexr00 as part of this work I have a few proposed changes to GHPRI that I'd like your feedback on.
Today there are vscode.dev links coming from the builtin GitHub extension, the GitHub Repositories extension, and the GHPRI extension. IMO the way this should work is:
vscode.dev and desktop RemoteHub:

Copy vscode.dev link (contributed by Remote Repositories extension)
Copy GitHub Permalink
Copy GitHub HEAD Link
Copy GitHub Permalink as Markdown

Desktop git:

Copy vscode.dev link (contributed by builtin GitHub extension)
Copy GitHub Permalink
Copy GitHub HEAD Link
Copy GitHub Permalink as Markdown

github.dev and Codespaces:

Copy github.dev link (contributed by GHPRI extension)
Copy GitHub Permalink
Copy GitHub HEAD Link
Copy GitHub Permalink as Markdown

In all of these cases, the Copy GitHub __ links should IMO always produce github.com links rather than contextualizing them as we currently do today. This is because github.com links render with a nice preview in GitHub issue and PR comments which is useful for providing context when discussing code, so I usually want an action to copy these. On the other hand, I want vscode.dev links in addition to github.com links, e.g. to deeplink to a notebook cell. And it would not make sense to offer vscode.dev links on github.dev or Codespaces since they are served from the github.dev origin (this is actually a flaw in the link generation logic today).
I also propose the following link generation behavior when contributed to the various menus we have in VS Code:

file/share: no file path or range
explorer/context/share: filepath, no range
editor/title/context/share: filepath, no range
editor/lineNumber/context: filepath, range (based on target line number)

when invoked for a notebook, vscode.dev link will include notebook cell range; we can't support this for notebooks on github.dev or github.com so we will omit the notebook cell range

editor/context/share: filepath, range (based on active editor selection)

Feedback from API sync today

file/share link behavior was unexpected, expected the link to include the active file and range
copy link behavior in all other context menus was predictable
need some visual indicator of which lines will be copied
need some confirmation that a copy action has happened


unemployed role

initial proposed definition:
“An unemployed role is a human social role that is conferred by the U.S. Census Bureau and is realized by a person who is not currently working, is currently available for work, and has made active efforts to find employment at some time during the past four weeks. A person who is waiting to be recalled from temporary layoff also realizes an unemployed role, regardless of whether or not that person is actively searching for work.”
definition source: http://www.census.gov/cps/about/cpsdef.html

Here is a proposed new definition.
“A US Census unemployed role is a human social role that inheres in a human who is legally eligible to work, is conferred by the U.S. Census Bureau, and is realized by the bearer not working and either making active efforts to find employment in the four weeks prior to the reference week or waiting to be recalled from temporary layoff.”


update eslint to v9 when typescript-eslint is ready

https://github.com/typescript-eslint/typescript-eslint/issues/8211

I've ditched eslint in favor of using xo which deals with this thing internally and I can focus on the rules instead.


Red ecosystem test show it's broken

Red has a test to be sure that new versions of it won't break any module on the ecosystem that's using it.
That is saying that Mint is broken with last Red's release (https://github.com/FCO/Red/runs/6944620515?check_suite_focus=true).
It doesn't seem to be caused by any change on Red (please, let me know if I'm wrong). Then I'm going to add Mint as an exception while that's broken (if you don't mind).
Please let me know when I should remove that from the exception list.

Hi, I believe it should technically be fixed with commit d41e834d36802df959f1326e27b67706fae52813, but I don't expect any Mint tests to work properly at all as the module requires as PostgreSQL database to function. SQLite is unlikely to work as there is some PostgreSQL specific code in the module.

So, are you ok if I leave that as an exception?


How to count distinct measures?

I have a requirement to measure distinct end-users of the SaaS application (Portal), and I'm wondering what would be the "Abacus"-way of doing this? I can think of several options, but non of them are supported by Abacus out-of-the-box.

First option is to add configurable filter phase to the pipeline in front of usage collector, where one can specify filter function that have access to all raw measures.
Another option is to combine filter functionality with one or several existing phases in pipeline. Similar to JavaScript's map, reduce and filter that pass the whole collection as the last argument of callback function. This will be not so efficient performance-wise.
Alternatively, it may be metadata of metric or metering plan definition that specifies rules on which measures should be treated as duplicate. As far as I understand, Abacus already filters out duplicate measures, but it uses FNV Hash comparison implemented in bloem filters (that work with plain buffers). Using more "smart" hash implementations that take input semantics in account may probably solve the issue.
By including user ID into resource_instance_id or consumer_id I can achieve aggregation on user-level. But still Abacus does not provide a way to aggregate across subset of resource instances or get number of consumers, and I'll need to have a custom aggregation sink to perform aggregation of aggregations.

BTW, I thought about using Time-based metric type (since it is stateful), but it does not scale, when I need to keep track of tens of thousands of users.
So, what would be the recommended way to count distinct measures with Abacus?

Not so sure I fully understand your scenario, but if we consider something like:
{
  "start":<PHONE_NUMBER>000,
  "end":<PHONE_NUMBER>000,
  "organization_id": "us-south:54257f98-83f0-4eca-ae04-9ea35277a538",
  "space_id": "d98b5916-3c77-44b9-ac12-04456df23eae",
  "consumer_id": "app:d98b5916-3c77-44b9-ac12-045678edabae",
  "resource_id": "object-storage",
  "plan_id": "basic",
  "resource_instance_id": "user:ba4eae",
  "measured_usage": [
    {
      "measure": "visit",
      "quantity": 1
    }
  ]
}

This means Abacus would aggregate on user and space/org levels. If I understand correctly you also need to get a list of all consumers for a user, is this correct?

@hsiliev, thanks for proposal. The idea of what I'm trying to achieve is that if, for example, user1 visited portal 3 times and user2 visited 5 times, for each visit of each user measure is sent to Abacus, and at the end there should be a way to get aggregated value 2 as a number of unique users in the given time frame (for example, month).
By implementing your proposal (where user is part of resource_instance_id), it is possible to get all users as part of "Usage Summary Report", not number of them. Also, the list of resource instances is not time-framed. Therefore, to reason about number of resource instances used in certain period of time, there should be separate request to get "Resource Instance Report" for each user. Then all non-zero usages should be filtered out and summed. I would expect all logic above to be done inside Abacus, and the final result to be returned somehow in one report.
What I thought is to send something like:
"measured_usage": [
    {
      "measure": "visit",
      "quantity": "user1"
    }
  ]

and in the accumulate function, for example, to have
(a, qty, start, end, from, to, twCell) =>
    end < to && start >= from ? Object.assign({}, a, {[qty]: true}) && a : a

and in aggregate function to have
(a, prev, curr, aggTwCell, accTwCell) => Object.keys(curr).length

but I'm not sure it will work fine for large numbers of unique users (object created during accumulation phase will be very large).
I'm not an Abacus guru, and for sure missing something, therefore looking forward for the guidelines how to make it right.

Assuming what you want is metering 2 metrics(The charge of the service would be based on 2): The first one is the number of unique visitor, and the second one is the number of visits.
There are some ways of doing this:

Define unique visitor as a metric:

"resource_instance_id": "user1",
"measured_usage": [
  {
    "measure": "unique_visitor",
    "quantity": 1
  }, {
    "measure": "visit",
    "quantity": 3
  }]

For visitor, you will need to define the accumulate function as a Math.max function (the quantity 1 is treated like true -- so you can only submit quantity 1.). The aggregation would be just normal addition.
Now if user2 submission come in:
"resource_instance_id": "user2",
"measured_usage": [
  {
    "measure": "unique_visitor",
    "quantity": 1
  }, {
    "measure": "visit",
    "quantity": 5
  }]

The aggregation would results in:
unique_visitor: 2
visit: 8.

You can also define metering plan this way if you don't want to submit 2 metrics:
{
  plan_id: 'test-metering-plan',
  measures: [
    {
      name: 'visit,
      unit: 'visit'
    }],
  metrics: [
    {
      name: 'visit',
      unit: 'visit',
      meter: ((m) => new BigNumber(m.visit).toNumber()).toString(),
      accumulate: addition
    },
    {
      name: 'unique_user',
      unit: 'user',
      meter: ((m) => m.visit ? 1 : 0).toString(),
      accumulate: ((a, qty, start, end, from, to, twCell) =>
        end < from || end >= to ? null : Math.max(a, qty)).toString()
    }]
}

The accumulate of unique user is basically always return 1 if there was a visit measure submitted during the month.

@KRuelY, thanks for proposal. However, uniqueness of the user may be calculated only relatively to certain time window that only Abacus knows. Therefore, service can't send unique_user measure.
Consider the following case, where Usage Summary Report was requested for 5sec after now:
Measures sent to collector

same: organization_id, space_id, consumer_id, resource_id, plan_id

User (resource_instance_id)
Time (start === end - 1)

user1
yesterday - 3

user2
yesterday - 2

user2
yesterday - 1

user3
now - 3

user1
now - 2

user4
now - 1

Sample
{
  start:<PHONE_NUMBER>054,
  end:<PHONE_NUMBER>055,
  organization_id: 'org:1',
  space_id: 'space:1',
  consumer_id: 'external:1',
  resource_id: 'portal',
  plan_id: 'basic',
  resource_instance_id: 'user1',
  measured_usage: [{
    measure: 'visits',
    quantity: 1
  }]
}

Metering plan (meter, accumulate and aggregate functions as you propose)
{
  plan_id: 'basic-visits',
  measures: [
    {
      name: 'visits',
      unit: 'USER'
    }],
  metrics: [
    {
      name: 'visits',
      unit: 'USER',
      type: 'discrete',
      meter: ((m) => m.visits ? 1 : 0).toString(),
      accumulate: ((a, qty, start, end, from, to, twCell) =>
          end < from || end >= to ? 0 : Math.max(a, qty)).toString(),
      aggregate: ((a, prev, curr, aggTwCell, accTwCell) => a + curr).toString()
    }]
}

Usage summary result that I need

Window
Quantity/Cost/Summary/Charge

Month
4

Day
3, 2

Hour
3

Minute
3

Second
null

Since accumulation and aggregation in Usage Summary Report are for resource_id and not for resource_instance_id the actual result will be different.
Actual result (tested by code)

BTW, the order in which results are present in report are reverse to what is stated in wiki

Window
Quantity/Cost/Summary/Charge

Month
6, null

Day
3

Hour
3

Minute
3

Second
null

Report will contain 4 resource instances (=users), but 6 unique users in monthly summary, which is incorrect.

Hello,
The aggregation function generally should be a + curr - prev.
Aggregate: Org's total usage - instance's last accumulated usage + instance's new accumulated usage.

Thanks a lot @KRuelY !!!
Changing the aggregation function to
((a, prev, curr, aggTwCell, accTwCell) => a + curr - prev).toString()

indeed fixed the numbers in the report to what I expect.
Now I'll need some time to understand how it works under the hood... As for now, I think the most important missing point for me was that accumulation and aggregation is made on the instance level, even when in the report it appears on the level of resource type.


Adding Custom X/Y positions to adapt to the isometric grid

So look here, I use my own map editor atm and their are 3 tiles on the screen with x/y positions
But, when I import using iso, they become like this:

I think it's because the isometric map is.. well, isometric and the x/y positions are not real positions. So is there some type of algorithm I can use to adjust the x, y positions? Thanks! They basically need to be flipped, right?

Flipping wont do it, you need to use unproject or look at the examples.  Did you check out the examples on the website? They will get you started!

ty will do, still learning the ropes here love this plugin


Parked cars reshuffling in to disabled parking lanes

When things are moved (eg. with move it mod), or roads upgraded/edited, etc., the game reshuffles parked cars. That reshuffling seems to be ignoring disabled parking lanes:

Same happens when I disable a parking lane - cars reshuffle, some of them end up in other disabled parking lanes.

Another report from Steam workshop discussion: https://steamcommunity.com/workshop/filedetails/discussion/1637663252/3059618306431199852/
Might be something wrong with those assets:
https://steamcommunity.com/sharedfiles/filedetails/?id=1601040013

Tagging #516, #366, #827
The same problem, requires major change how TM:PE stores data about enabled/disabled parking lanes because of parking lane direction both

Some "Blank Roads" assets (such as this one) have parking on only one side of the road, but (P) icon is shown on both sides when editing parking restrictions.


fix: orientation on iOS

What
Upon testing the new orientation implementation, I found some issues on iOS.
On iOS 17:

onPreviewOrientationChanged and onOutputOrientationChanged do not correctly return the orientation. For example, when the phone is in portrait mode, the returned mode is "landscape-left".

On iOS < 17:

The video orientation is not good. The recorded video is not rotated correctly (it doesn't use the camera sensor orientation).
When the orientation is locked on the phone, the output orientation is not updated (e.g. onOutputOrientationChanged / onUIRotationChanged).

Upon analyzing the code, I realized that depending on the iOS version, we use videoRotationAngleForHorizonLevelPreview/videoRotationAngleForHorizonLevelCapture and on the other side UIDevice.current.orientation/UIApplication.shared.statusBarOrientation.
videoRotationAngleForHorizonLevelPreview/videoRotationAngleForHorizonLevelCapture already takes into account the camera orientation, whereas the other solution takes into account the phone orientation.
Additionally, when portrait orientation lock is on, UIDevice.current.orientation always returns .up. Therefore, I had to modify the LegacyCameraOrientationCoordinator to function correctly even when the orientation is locked (to achieve the behavior described in the documentation and the same as with iOS 17).
Changes

Fix preview / output orientation (same on every iOS version)
Usage of the accelerometer in LegacyCameraOrientationCoordinator to support locked orientation.

Tested on

iPhone 12, iOS 17.4.1
iPad Air 2, iOS 15.8.2
iPod, iOS 12.5.7

Hi - thank you for your PR! Much appreciated.
I will review this asap in the coming days. Thanks!

I don't know what's the best way to look at it.
Currently, in "portrait" mode (let's say you hold the phone normally in your hands) :

on a device with iOS 17, output/preview will be "landscape-left"
on a device with an older version of iOS, output/preview will be "portrait"

Given that the phone is in portrait mode, I think it's more appropriate to set it to portrait.
If, for example, we read the previewOrientation value, we'd like it to be the phone's orientation, wouldn't we? Why should the orientation of the photo sensor be taken into account in the value returned?
Finally, whatever decision is made, I think it's preferable to have the same value for the same orientation regardless of the iOS version.

I think it's preferable to have the same value for the same orientation regardless of the iOS version.

Absolutely! Agreed.

Given that the phone is in portrait mode, I think it's more appropriate to set it to portrait.

I get what you're saying, but that's why I have a onUIRotationChanged event - this is what you actually want to rotate your UI elements by. The other events (onPreviewOrientationChanged and onOutputOrientationChanged) are kinda low-level events, and they should hold the exact value that I will internally also use and set on the AVCaptureConnection.
If I set .landscapeLeft on the AVCaptureConnection and it is in the proper orientation then, then I want to also send landscape-left to the user. It's the actual value that it uses. No need to change that once again.
So in short; onUIRotationChanged is for the user to actually high-level rotate UI, and the other two events are what is internally actually being used. We can get the difference in the orientations to figure out UI rotation, no matter if they are both landscapeLeft or both portrait- UI rotation will be 0.

Btw what's your handle on Discord? Are you on our community discord? Some thing can be discussed quicker over chat, and I also want to give you the contributor role now :)

Yes, you're right, so it makes more sense to use the true orientation (the one that takes into account the sensor's orientation).
As long as the rotations are the same regardless of the iOS version, I'm fine with it ^^
I'll change the code to change that and apply your comment!
Is it acceptable for you to hard-code the +90 degrees in package/ios/Core/Extensions/AVCaptureConnection+orientation.swift for the "legacy" mode (iOS < 17)? (otherwise, I'll think of something else)

Btw what's your handle on Discord? Are you on our community discord? Some thing can be discussed quicker over chat, and I also want to give you the contributor role now :)

I sent you a dm ;)

About the accelerometer
The values reported by the accelerometers are measured in increments of the gravitational acceleration, with the value 1.0 representing an acceleration of 9.8 meters per second (per second) in the given direction.

(Source: https://developer.apple.com/documentation/coremotion/getting_raw_accelerometer_events)
Thanks to Earth’s gravity, we can determine the orientation of our phone based on that.
Left:
X = -1
Y = 0
Right:
X = 1
Y = 0
Portrait
X = 0
Y = -1
Upside down
X = 0
Y = 1
So we take the bigger norm between x and y, and we can determine the orientation.
The value on the Z-axis is used to detect when the phone is parallel to the ground (in either direction). In that case, we don't want to rotate the camera.

I updated my pull request to include the various changes and to fix other issues I hadn’t noticed yesterday.
I tested on different iOS devices (iOS 17 or earlier), with orientation locked or not, using the back and front cameras to take photos and videos.

I had an issue, but only with useSkiaFrameProcessor, where the orientation was on "landscape-right" but I was holding the phone in "portrait". Now with this fix the camera is displayed correctly, but the orientation string is "landscape-right" 😄
Im on iOS 17.5.1

This is what I get inside useFrameProcessor / useSkiaFrameProcessor. Is this intended?

This is the frame.orientation inside useFrameProcessor / useSkiaFrameProcessor. Should it be like this?

Hello @imanderson,
This is the expected orientation because it takes into account the orientation of the camera sensor.
If you want to have the orientation of the phone, you need to use the uiOrientation

Hello @imanderson, This is the expected orientation because it takes into account the orientation of the camera sensor. If you want to have the orientation of the phone, you need to use the uiOrientation

Ah ok, understood. then this PR fixed my issues too. Thanks!

This looks like working fix for an issue I am also having on a project. If it could get merged in would be hugely appreciated. Thanks!

Hey - I took another stab at this to implement this in a clean and effective way. Can you check out https://github.com/mrousavy/react-native-vision-camera/pull/3039 to see if that works for you and if it solves the issues you encountered?


The returning value doesn't satisfy the function

When I run the filter function over the array argument with the function argument, all the tests for the bonfire run perfectly but the one I've mentioned below doesn't. As it is clear that the returning array would contain the values that are greater than 2 i.e. [3,9], the last test for the bonfire mentions that "drop([1, 2, 3, 9, 2], function(n) {return n > 2}) should return [3, 9, 2]". The returning value here should be corrected.
Challenge Bonfire: Drop it has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36 OPR/33.0.1990.58.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
function drop(arr, func) {
  // Drop them elements.
  arr = arr.filter(func);

  return arr;
}

drop([1, 2, 3, 9, 2], function(n) {return n > 2});

Filter is not a valid solution for this problem. The problem is asking you to keep removing elements until the predicate function returns true. This means that you shift 1 and 2 off and then once you hit 3 the predicate returns true and you stop, returning what's left of the array.
Closing as not a problem with the tests.
Thanks and happy coding!

Oh. Thank you for the explanation. As there was only one conflicting test, I thought there was a bug. I will try and modify it.


Python 2.7 compatibility?

I’m getting a relatively trivial-to-fix failure when trying to install Volto with pip2 (Python 2.7):
with open("README.md", encoding="utf-8") as readme:
    TypeError: 'encoding' is an invalid keyword argument for this function

Full log. With pip3 (Python 3) it installs OK.
I know, end of life etc.
[16:54:40] $ pip2 install --user --upgrade git+https://github.com/TiroTypeworks/Volto
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting git+https://github.com/TiroTypeworks/Volto
  Cloning https://github.com/TiroTypeworks/Volto to /private/var/folders/xl/xzdty8fj5db_9d8s_f6178m40000gn/T/pip-req-build-_HSlhQ
  Running command git clone -q https://github.com/TiroTypeworks/Volto /private/var/folders/xl/xzdty8fj5db_9d8s_f6178m40000gn/T/pip-req-build-_HSlhQ
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/xl/xzdty8fj5db_9d8s_f6178m40000gn/T/pip-req-build-_HSlhQ/setup.py", line 3, in <module>
        with open("README.md", encoding="utf-8") as readme:
    TypeError: 'encoding' is an invalid keyword argument for this function
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/xl/xzdty8fj5db_9d8s_f6178m40000gn/T/pip-req-build-_HSlhQ/
~/Developer/vcs/github.twardoch/pub/fontsurgery-tools/macOS/modules

[16:55:01] $ pip3 install --user --upgrade git+https://github.com/TiroTypeworks/Volto
Collecting git+https://github.com/TiroTypeworks/Volto
  Cloning https://github.com/TiroTypeworks/Volto to /private/var/folders/xl/xzdty8fj5db_9d8s_f6178m40000gn/T/pip-req-build-qjiau1vf
Requirement already satisfied, skipping upgrade: fonttools>=3.40.0 in /Users/adam/Library/Python/3.7/lib/python/site-packages (from Volto==0.1.0) (3.40.0)
Building wheels for collected packages: Volto
  Building wheel for Volto (setup.py) ... done
  Stored in directory: /private/var/folders/xl/xzdty8fj5db_9d8s_f6178m40000gn/T/pip-ephem-wheel-cache-dzcqeam3/wheels/28/7c/bb/377a8a81401ca92bbdb355efcdcb5e489ccf5886a944fbdb86
Successfully built Volto
Installing collected packages: Volto
  Found existing installation: Volto 0.1.0
    Uninstalling Volto-0.1.0:
      Successfully uninstalled Volto-0.1.0
Successfully installed Volto-0.1.0

Readme says it requires python 3

Yes, Python 3 is required and the code will need more changes to work under Python 2.

OK, I see, thanks!