API call for recent metadata not working

According to the API docs, I should be able to get the list of metadata keys for recent created secrets when I provide my authentication creds.   As in:
curl -u 'USERNAME:APITOKEN' -d '' https://onetimesecret.com/api/v1/private/recent
but when I try this on the live site (https://onetimesecret.com/) it only returns:
{   "secret_key": "recent",   "message": "Unknown secret" }
A brief stroll through the code seems to indicate that it should work.  I know this is potentially an issue with the live server, but if it's supposed to work, there might be a code issue.

Thanks for the heads up. I'll take a look.
On Apr 26, 2017 5:43 PM, "Eric Engstrom"<EMAIL_ADDRESS>wrote:

According to the API docs https://onetimesecret.com/docs/api/secrets, I
should be able to get the list of metadata keys for recent created secrets
when I provide my authentication creds. As in:
curl -u 'USERNAME:APITOKEN' -d '' https://onetimesecret.com/api/
v1/private/recent
but when I try this on the live site (https://onetimesecret.com/) it only
returns:
{ "secret_key": "recent", "message": "Unknown secret" }
A brief stroll through the code seems to indicate that it should work. I
know this is potentially an issue with the live server, but if it's
supposed to work, there might be a code issue.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/onetimesecret/onetimesecret/issues/62, or mute the
thread
https://github.com/notifications/unsubscribe-auth/ABNAVMOSlNVvT1xEgKQb7k4pL4jKX2zlks5rz-SrgaJpZM4NJl1g
.

@eengstrom Did some testing. Any chance you're sending a POST request instead of a GET?

Doh - yes.  Adding -X GET to my curl did the trick.  Sorry to bother you.

@delano - BTW - I noted you updated the API docs, but now you explicitly say -X POST, which is wrong, IIUC.

@eengstrom Doh! Sorry about that. The documentation is fixed now as well.


Research possibilities to distribute the server along with the game

The server distributed with the game would be used to host ad-hoc sessions.

I'd personally check if we could use heroku, this is not exactly to distribute the server but would solve some of the current problems.
As for the distribution, we could bundle the server with portable python installation with all dependencies preinstalled.

Pyinstaller https://pyinstaller.org/en/stable/ could be the way. It can package the whole application into executables which do not require Python to be installed on the target system.
However, I can see several problems:

Windows and MacOS compatibility: pyinstaller supports both of them, but it does not support cross compilation. We are currently building our modules exclusively on Linux (even Windows and MacOS executables).
glibc compatibility: glibc is not packaged with the application, we would have to ensure that we build our application on systems with old enough version of glibc.

This is the command I used to build an executable:
pyinstaller -F -n quadradiusr_server --hidden-import aiosqlite src/quadradiusr_server/__main__.py


Update sys-database-scoped-configurations-transact-sql.md

The column is_value_default was added in MS SQL Server Version v2017.

@DanielAdeniji : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#label:"aq-pr-triaged"

@VanMSFT : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Thanks @DanielAdeniji! I made a quick change, and will approve this.
#sign-off

Van:-
Thanks so very much.
In health and wholeness,
Daniel

From: Van To @.>
Sent: Tuesday, October 5, 2021 11:07 AM
To: MicrosoftDocs/sql-docs @.>
Cc: Daniel Adeniji @.>; Mention @.>
Subject: Re: [MicrosoftDocs/sql-docs] Update sys-database-scoped-configurations-transact-sql.md (#6905)
Thanks @DanielAdenijihttps://github.com/DanielAdeniji! I made a quick change, and will approve this.
#sign-off
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/MicrosoftDocs/sql-docs/pull/6905#issuecomment-934643888, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABAR6DDSSCJQPO7U6FKOACTUFM5FHANCNFSM5FKNEUUA.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

@DanielAdeniji: I'm sorry - only the author of this article, @VanMSFT, can sign off on your changes. But we do have an exception process - if you are on the Microsoft content or product team for this product area, you can ask the PR review team to review and merge it by sending mail to the techdocprs alias.


Remove wl_list of resources in many protocols

A bunch of our interfaces have lists of resources which don't need to be there.
For example
struct wlr_compositor {
    struct wl_global;
    struct wl_list resources; // this
    struct wl_list surface_resources; // this
    struct wl_list subsurface_resources; // this
    // ...
}

I'm not aware of anybody using these resource lists for anything or why they would need to be used.
We don't need to keep track of these for clean-up, because calling wl_display_destroy_clients will go through and destroy the resources through the normal mechanism.

+1 (though there are some cases in which we need to keep track of them)
Related to https://github.com/swaywm/wlroots/issues/1411

Implemented in #1915


Chore/dependency-updates

Will rebase this into develop once the ci-branch has been merged.
Dependency updates and added .slugignore file to reduce slug size in Heroku, which is currently a bit of a problem.
Lets add QA env for these changes and let the customer test it before deploying to production.

Aaand the problem got fixed with the buildback change.

Good job! 💯💎 I'll merge this into develop and lets wait feedback from Kesko after that


OneDrive for Business API resumable upload.createSession: returns 200 invalidRequest

POST /_api/v2.0/drive/items/01W2E4KBTLWQEUUYGCEJBL7PBKNO6QGS32:/IMG_2493.jpg:/upload.createSession
Host: <tenant>-my.sharepoint.com
Content-Type: application/json
Authorization: Bearer {INSERT_TOKEN}
Accept: application/json;odata=verbose

{'item'<EMAIL_ADDRESS>'replace'}}

I've got HTTP 200
request-id: 1735b19d-b07b-2000-b2ad-d00be8fc59fd
SPRequestGuid: 1735b19d-b07b-2000-b2ad-d00be8fc59fd
X-AspNet-Version: 4.0.30319

{"error":{"code":"invalidRequest","message":"The request is malformed or incorrect."}}

It's only with OD4B, personal drive works well

We'll take a look. I wasn't able to reproduce this behavior in ODB, but I'll look at the request ID you included and see what's going on. When were you getting this response?

Hostname is insuredhealthgroup-my.sharepoint.com

Bad header Accept: application/json;odata=verbose had been sent.
Need just application/json without odata=verbose

Thanks @devova - seems like we could improve the error message!
The OneDrive API is OData v4 compliant, and so if you want verbose metadata you can do:
Accept: application/json;odata.metadata=verbose


Test if eslint can be used for automigrations with the --fix flag

@imagoiq proposed to have a look at how eslint fixes issues with the --fix flag and see if we could write eslint rules to automigrate certain of our breaking changes in the projects.
Originally posted in #2907
Dedicate half a day/a day to this and write up your findings in this ticket.

Can we close this?

Resolution: POC makes sense.


How to generate 'mesh_down_sampling_4.npz' ?

If i have a SMAL model, how can i convert it to 'mesh_down_sampling_4.npz' like you did?
I see you have a reply that mentions coma, and I see a coma folder in your code, but I don't see a save code for np.save(*.npz).

Hi @G-Apple1, I use the code below to generate the file:

Hi @G-Apple1, I use the code below to generate the file:

Thanks!!!


LUC025A-99 - Fix to prevent directory upload during Item Submission by

user.
Changes:

Had to alter the original Github version of resumable.js.
(Change commented with Datashare - start & end.)
You can programmatically prevent directory selection at browse phase
with a flag isDirectory false. Not applicable to Drag & Drop. So for
sake of completeness added isDirectory false in Datashare javascript upload-resumable.js:
r.assignDrop($('#' + rdId)[0]);
r.assignBrowse($('#' + rdId)[0], false); // false prevents selecting directory

This worked fine on my Mac \0/. I'll deploy to test on Monday.


question of performance reproduce

Hiiii Wenxuan. Thanks a lot for your nice work sharing!
I have a question for performance reproducing on Brats 2019 dataset using your codes of TransBTS model. I directly run the train and test codes without any modifying. I get the performance feedback after submitting the test inference results on 125 validation data. The  Dice_ET value only has 0.74 in mean which is different from 0.78~0.79. Could you help me with my concern? Thanks in advance!!!

I met the same question, here is my results:
|       ET      |     WT     |      TC      |
|  0.72726  | 0.88315  |  0.79092 |
Did you get the results in the paper？

Hiiii Wenxuan. Thanks a lot for your nice work sharing! I have a question for performance reproducing on Brats 2019 dataset using your codes of TransBTS model. I directly run the train and test codes without any modifying. I get the performance feedback after submitting the test inference results on 125 validation data. The Dice_ET value only has 0.74 in mean which is different from 0.78~0.79. Could you help me with my concern? Thanks in advance!!!

您好，我可以请教您一个问题吗，我在brats2020数据集的测试结果上传到在线验证平台上，提示我说没对齐，请问这个问题怎么解决？

I met the same question, here is my results: | ET | WT | TC | | 0.72726 | 0.88315 | 0.79092 | Did you get the results in the paper？

您好，我可以请教您一个问题吗，我在brats2020数据集的测试结果上传到在线验证平台上，提示我说没对齐，请问这个问题怎么解决？

I met the same question, here is my results: | ET | WT | TC | | 0.72726 | 0.88315 | 0.79092 | Did you get the results in the paper？

您好，我可以请教您一个问题吗，我在brats2020数据集的测试结果上传到在线验证平台上，提示我说没对齐，请问这个问题怎么解决？

您好，我也遇到了这个问题，请问您解决了？能告诉一下我该如何解决？

I met the same question, here is my results: | ET | WT | TC | | 0.72726 | 0.88315 | 0.79092 | Did you get the results in the paper？

您好，我可以请教您一个问题吗，我在brats2020数据集的测试结果上传到在线验证平台上，提示我说没对齐，请问这个问题怎么解决？

你好可以留个联系方式交流一下吗


Tiny remove outdated comments

I get confused when reading this comment. It seems that this code never calls AnimationController.fling (but only things like animateTo). Therefore, I do not think discussing the duration of AnimationController.fling is helpful - maybe it is just an outdated comment?
Pre-launch Checklist

[ ] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[ ] I read the Tree Hygiene wiki page, which explains my responsibilities.
[ ] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[ ] I signed the CLA.
[ ] I listed at least one issue that this PR fixes in the description above.
[ ] I updated/added relevant documentation (doc comments with ///).
[ ] I added new tests to check the change I am making, or this PR is test-exempt.
[ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Looks like AnimationController.fling used to be called but not anymore. The comment on the duration lasting a frame also doesn't seem relevant as newer logic around the duration was also added below and spells out a conditional minimum duration there.


Text is selectable

I just noticed that the text in settings and even on the (micro)break page is selectable. I doesn't break anything, it just looks kinda odd.

Thanks for reporting, what platform are you on?

Windows 10, 16299 (Fall Creators Update)


Add summary to generated openapi spec

OpenAPI spec is missing summary field from Cadwyn() constructor.
Fixed

Thanks for your contribution!

Released: https://pypi.org/project/cadwyn/4.2.2/


exiftool: 12.49 -> 12.50

Description of changes

Upgrade exiftool from 12.49 to 12.50

See https://exiftool.org/history.html

Add meta.changelog

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 200593 run on x86_64-linux 1

24 packages built:

digikam
exiftool (perl536Packages.ImageExifTool)
fgallery
gcstar
hugin
img2pdf (python310Packages.img2pdf)
manga-cli
mat2 (python310Packages.mat2)
megapixels
metadata-cleaner
ocrmypdf (python310Packages.ocrmypdf)
paperless-ngx
pdfarranger
perl534Packages.ImageExifTool
phockup
photoprism
pict-rs
python39Packages.img2pdf
python39Packages.mat2
python39Packages.ocrmypdf
rapid-photo-downloader
shutter
styx
timelapse-deflicker


added Arcanist gitignore

This PR adds Arcanist .gitignore rules. Arcanist is the command line utility for Phabricator, a project management system.
We use Phab here at Uber, and I realized gitignore.io doesn't have an arcanist/phabricator preset, and upon further investigation it uses this repository for its sources.
I suspect it might come up, but these files do occur in repositories that have custom Arcanist linters or other modules that are loaded in as part of the development workflow that are repository-specific. Just pointing that out since Arcanist has the same ignore rules.

fuckoff,.....i just waiting payment from apple...after to long
waiting...apple rejact my jobs in mac.....who use my idea  and my master to
build some apps at facebook...dont patner with me if your friends
stupid.confrm
On Thu, Feb 23, 2017 at 9:50 AM, Josh<EMAIL_ADDRESS>wrote:

Closed #2038 https://github.com/github/gitignore/pull/2038.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/github/gitignore/pull/2038#event-973648672, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AX9HI0tHXmJaxx1l-6QxOm9Q4LieLbqOks5rfOXvgaJpZM4JItyc
.

Lol, come again?


Properly catch errors in tests

Right now a bunch of tests in QueryManager cause mocha to stop running when they fail. Instead of getting useful errors with line numbers, we just see the tests stopping at the last successful test, and an error with a not-so-useful stack trace in the console.

Some of these I added intentionally because the alternative was the tests passing with just an error log to the console. But I'll admit it's not ideal.

I agree that this is better than passing and printing errors to the console, but we should refactor to make sure the exceptions aren't uncaught.

I no longer think it makes sense to do this in a big refactor. We should pay attention to this when we write future tests, and update old tests when we touch them.


Add threats of the ocean floor by DMDOKURO

Song Name
threats of the ocean floor
Artist Name
DMDOKURO
Source
Youtube
Youtube Link
O_zPaC5xqns
Direct File Link
No response
Song ID
10003210
Start Offset [ms]
0
Extra
Created from Auto Nong.
Created for level: 109145674
Downloaded: Yes

This message is just to un-stale it


Firefox 65

Windows Color has to be changed or an adjust must be made for ShadowFox to work properly. Thiis problem did not exist with Firefox 64 . This is in Windows 10 The checkmark has to be left blank which ruins Win 10 colors or a dark color has to be chosen.
[img]https://i.imgur.com/GuZWQ7i.png[/img]

@GTK66 - is this related to the updater or the theming of Firefox?  If the later please close this issue and open up one here:
https://github.com/overdodactyl/ShadowFox/issues
Either way, we likely need more details about what's going on; I'm not entirely sure what you mean by "adjust must be made for ShadowFox to work properly," or what the problem you are observing is.
Screenshots and as much detail as possible is always helpful.
Thanks!

I installed a Black Theme by Madonna that took care of this issue but others are having it.
[img]https://i.imgur.com/JEmDX8X.png[/imghttps://i.imgur.com/JEmDX8X.png[/img]
[img]https://i.imgur.com/C3z2kqF.png[/imghttps://i.imgur.com/C3z2kqF.png[/img]
[img]https://i.imgur.com/v4krYiZ.png[/imghttps://i.imgur.com/v4krYiZ.png[/img]
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Pat Johnson<EMAIL_ADDRESS>Sent: Friday, December 28, 2018 10:38:36 PM
To: SrKomodo/shadowfox-updater
Cc: GTK66; Mention
Subject: Re: [SrKomodo/shadowfox-updater] Firefox 65 (#31)
@GTK66https://github.com/GTK66 - is this related to the updater or the theming of Firefox? If the later please close this issue and open up one here:
https://github.com/overdodactyl/ShadowFox/issues
Either way, we likely need more details about what's going on; I'm not entirely sure what you mean by "adjust must be made for ShadowFox to work properly," or what the problem you are observing is.
Screenshots and as much detail as possible is always helpful.
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/SrKomodo/shadowfox-updater/issues/31#issuecomment-450462411, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ANSRmgnmOnSQGgKio5dvYKcUNbdYmOOOks5u9uO8gaJpZM4ZkYua.

This issue is fixed for me but it still will affect other users. Firefox 65 was changed .


Chrome Search Broken

Any ideas on how to fix the chrome bookmark search workflow? I have been searching the boards with no luck.

@chrishough Could you please provide more details? steps for reproduce your issues...

I bring up alfred, type in the shortcut and it does not find any bookmarks.  It used to bring up everything, for example, if merely typed test many would come up.

@chrishough Could you please go through the following steps and send me your result:

run cmd python --version;
go to Alfred Preferences->Worflows->Chrome Bookmarks press Bug icon, select All Information in Log dropdown and try to search;

Thanks for your help with this btw!  Currently I am running Python 2.7.6
Debug Log when I searched for test and twitter:
Starting debug for 'Chrome Bookmarks'

[INFO: alfred.workflow.input.scriptfilter] <items><item uid="com.mdreizin.chrome.bookmarks-1432412746.3" valid="no"><title>No bookmarks found</title><subtitle>No bookmarks matching your query were found</subtitle><icon>icons/chrome.png</icon></item></items>
[INFO: alfred.workflow.input.scriptfilter] <items><item uid="com.mdreizin.chrome.bookmarks-1432412746.46" valid="no"><title>No bookmarks found</title><subtitle>No bookmarks matching your query were found</subtitle><icon>icons/chrome.png</icon></item></items>
[INFO: alfred.workflow.input.scriptfilter] <items><item uid="com.mdreizin.chrome.bookmarks-1432412758.89" valid="no"><title>No bookmarks found</title><subtitle>No bookmarks matching your query were found</subtitle><icon>icons/chrome.png</icon></item></items>
[INFO: alfred.workflow.input.scriptfilter] <items><item uid="com.mdreizin.chrome.bookmarks-1432412759.05" valid="no"><title>No bookmarks found</title><subtitle>No bookmarks matching your query were found</subtitle><icon>icons/chrome.png</icon></item></items>
[INFO: alfred.workflow.input.scriptfilter] <items><item uid="com.mdreizin.chrome.bookmarks-1432412759.78" valid="no"><title>No bookmarks found</title><subtitle>No bookmarks matching your query were found</subtitle><icon>icons/chrome.png</icon></item></items>
[INFO: alfred.workflow.input.scriptfilter] <items><item uid="com.mdreizin.chrome.bookmarks-1432412760.27" valid="no"><title>No bookmarks found</title><subtitle>No bookmarks matching your query were found</subtitle><icon>icons/chrome.png</icon></item></items>
[INFO: alfred.workflow.input.scriptfilter] <items><item uid="com.mdreizin.chrome.bookmarks-1432412760.42" valid="no"><title>No bookmarks found</title><subtitle>No bookmarks matching your query were found</subtitle><icon>icons/chrome.png</icon></item></items>
[INFO: alfred.workflow.input.scriptfilter] <items><item uid="com.mdreizin.chrome.bookmarks-1432412760.56" valid="no"><title>No bookmarks found</title><subtitle>No bookmarks matching your query were found</subtitle><icon>icons/chrome.png</icon></item></items>
[INFO: alfred.workflow.input.scriptfilter] <items><item uid="com.mdreizin.chrome.bookmarks-1432412760.73" valid="no"><title>No bookmarks found</title><subtitle>No bookmarks matching your query were found</subtitle><icon>icons/chrome.png</icon></item></items>
[INFO: alfred.workflow.input.scriptfilter] <items><item uid="com.mdreizin.chrome.bookmarks-1432412760.87" valid="no"><title>No bookmarks found</title><subtitle>No bookmarks matching your query were found</subtitle><icon>icons/chrome.png</icon></item></items>

Example bookmarks:

@chrishough you are welcome! Could you please remove workflow and download it again from here?
Also you can choose your user profile via chrome-profiles. Let's select correct one. If it doesn't work we will continue to investigate the issue.

I had no idea I had to select my chrome profile first.  That fixed the issue.
Thank you SOO much for your help man.

@chrishough Not at all!


Pre-train Transformer of Drug

Dear Kexin,
According to MT-DTI paper, they pre-trained the transformer on 97,092,853 molecules with canonical SMILES from PubChem. I just curious if I call drug_encoding='Transformer', does your code use the pre-trained weights?
Thank you for your answering.
Best,
Po-Yu Kao

Hi Po-Yu, the current version is not implemented with MT-DTI (as I believe it is implemented with TF while DeepPurpose is PyTorch). Instead, it is the basic transformer encoder block with substructure fingerprint (not pretrained) from our MolTrans paper


Saga -> Component communication (aka sagas and setState)

I want to set form loading state (spinner icon, disable input) when the user submits the form, and clear that state when the action completes or fails. Currently I am storing this state in my store, which involves creating an action creator and reducer, which is annoying for a few reasons:

It's a lot more work than simply calling this.setState
It's more difficult to reason about
I don't really want to store local component state in my store

Essentially I want to do this from within my form component:
handleFormSubmit() {
  this.setState({ isSaving: true })
  this.props.dispatchSaveForm({ formData: this.props.formData })
    .finally(() => this.setState({ isSaving: false }))
}

I haven't been able to find any discussion on this, but conceivably, I could do this:
handleFormSubmit() {
  this.setState({ isSaving: true })
  this.props.dispatchSaveForm({
    formData: this.props.formData,
    callback: () => this.setState({ isSaving: false })
  })
}

Any issues with this? Is there a better way?

Your action is losing its serialibility. Personally I prefer them being plain objects. The question is - what do u want (ui-wise) to do after saving is complete?

Willing to lose serializability for simplicity here. In this example, I want the form to become disabled and show a spinning icon. Of course I can achieve this by storing state in the store, but it requires a ridiculous number of steps for something that should be so simple.

We use redux-wait-for-action as a compromise when we need do do hacks like this. it makes store.dispatch(...) return a Promise which you can .then() or .catch() on.

If u want to bypass the store I think indeed some Promise-based solution is the best way to achieve your goal. Interesting problem nevertheless, wondering if this could be somehow tackled by us on the library level, but no ideas yet. Any thoughts @yelouafi ?

This problem is really old. Some years ago someone posted a similar solution to the callback style.
handleSubmit(data) {
    return new Promise((resolve, reject) => this.props.dispatchAction(data, resolve, reject))

It is working fine in my apps. Loosing serialibility is of course a drawback.

I think the state does belong in the store, but if there's a way to address this:

but it requires a ridiculous number of steps for something that should be so simple.

that would be great.

Any update on this? Some of the transient states do not really belong to redux store. Is there an easy way to do:
class App extends Component {
  state = {
    loading: false,
  }

  handleGetData = () => {
    this.setState({ loading: true });
    const data = this.props.getData();
    this.setState({ loading: false });
  }

  render () {
    const { loading } = this.state;
    return (
        <div>
          { loading && <span> loading... </span> }
          <button onClick={ this.handleGetData }> fetch </button>
       </div>
    );
  }
}

loading state as true/false is maybe a bad example, since it's widely considered correct practice to store that in Redux: http://redux.js.org/docs/advanced/AsyncActions.html

A form getting submitted has nothing to do with redux store. I wanna show a popup before the request and close it after it's done. There is no point writing reducer, action creator, ... for that tiny thing. The Prophet himself seems to agree.

This is how we do it with redux-wait-for-action, give it a try:
// action creators
const getData = (payload) => ({
  type: 'GET_DATA',
  [WAIT_FOR_ACTION]: 'GET_DATA_SUCCESS',
  [ERROR_ACTION]: 'GET_DATA_FAIL'
});

const getDataSuccess = payload => ({
  type: 'GET_DATA_SUCCESS',
  payload
)};

const getDataFail = error => ({
  type: 'GET_DATA_FAIL',
  error
});

// saga
function * handleGetData (action) {
  try {
    const data = fetchDataFromSomewhere();
    yield put(getDataSuccess(data)); // assume there's an action creator
  } catch (error) {
    yield put(getDataFail(error)); // assume there's an action creator
  }
}

// Inside your UI component (I think setState() returns Promises, they are async, I can't remember)
await this.setState({ loading: true });
const result = await this.props.getData() // <-- will be mapped to store.dispatch(getData())
await this.setState({ loading: false });

Thanks. But that's the same thing as writing redux ceremonial stuff.

Now I have two problems.

Right. The redux-wait-for-action approach still has a lot of extra code. This is what I'm currently doing:
// promise-dispatch.js
export default ({ dispatch, actionCreator, payload }) => new Promise((resolve, reject) => dispatch(actionCreator({ ...payload, resolve, reject })))

// In a React component
const response = await promiseDispatch({
  dispatch,
  actionCreator: widgetsPageLoad,
  payload: { foo: 'bar' }
})
this.setState({ loading: false })

Ideally this would just be
const response = await dispatch(widgetsPageLoad({ foo: 'bar' }))
this.setState({ loading: false })

@brettstack, @norbertpy If you want generators with ease and not coupled to redux store, you can use co. It'll be like:
// logic.js
import co from 'co';

export const getData = () =>
  new Promise(res => setTimeout(() => res(), 2000));

export const getRestOfTheData = () =>
  new Promise(res => setTimeout(() => res(), 3000));

export const getAll = co.wrap(function* () {
  const d = yield getData();
  const r = yield getRestOfTheData();
  return { d, r };
});

And then in your component:
import { getAll } from './logic';

class App extends Component {
  state = { loading: false }
  handleGetData = () {
    this.setState({ loading: true });
    getAll()
      .then(r => this.setState({ loading: false, data: r }))
      .catch(e => this.setState({ loading: false, error: 'error' }));
  }
  render () {
        return (...);
  }
}

It would be possible I think to write some kind of sagaConnector HOC, which could glue ur trigger and success actions, inject appropriate handlers into ur wrapped component and effectively allow u to bypass redux's store and just 'react' directly with setState in ur component.
Should be fairly easy to implement this in user land using context API.

hey there! any updates on this point?

Unfortunately not, it is also not a priority right now for the core team of redux-saga. I really wish somebody could pitch in and provide at least API draft, that way it would be easier to work on this for anyone.

@brettstack @norbertpy I use helper function in one of my work projects. Seems like it solves your case.
There is middleware.run(saga, ...args) method described in docs which supposed to run dynamic saga.
So i do something like this:
// middleware.js
import createSagaMiddleware from "redux-saga";

const sagaMiddleware = createSagaMiddleware();

// 'sagaMiddleware' should be registered as middleware in 'createStore'
// otherwise you have no access to store

export function execute(saga, ...args) {
    return sagaMiddleware.run(saga, ...args).done;
}

And in my component use exported execute function:
import * as React from "react";
import { execute } from "./middleware";

class ExampleComponent extends React.Component {
    async onLoadClicked() {
        this.setState({
            loading: true,
        });
        const result = await execute(mySagaHandler);
        this.setState({
            loading: false,
            result
        });
    }
    render() {
        return (...);
    }
}

Note that mySagaHandler can read/write to store and use other effects.

I am much interested in this topic but it's fruitless.  redux-saga is designed for side effects. it can track each event but can't track every event.

I did some exploration into this problem with redux-facet. Specifically, a kind of hack which wraps / intercepts saga generator effects: https://github.com/Bandwidth/redux-facet/blob/master/src/facetSaga.js
The idea in this library is that every action gets tagged with a meta.facetName value so that it can be traced back to the component which dispatched it.
The facetSaga wrapper intercepts all put effects and references the original action which triggered the saga, copying its meta.facetName value onto the outgoing actions.
This makes it (kind of) easy to keep track of the thread from the REQUEST action to the COMPLETE (or FAILED) action.
The same technique might be useful in resolving a promise on the original action.
For instance, a generator wrapper could be written like so...
const smartActionCreator = (data) => {
  let resolve;
  let reject;
  // there's probably a way cleaner way to do this:
  const promise = new Promise((res, rej) => { resolve = res; reject = rej; });
  return {
    type: 'SOME_ACTION',
    payload: data,
    meta: { resolve, reject, promise },
  };
};

function trackCompletion(saga) {
  return function*(action) {
    // ignore 'dumb' actions without promises
    if (!action.meta.resolve || !action.meta.reject) {
      yield* saga(action);
      return;
    }

    const { resolve, reject } = action.meta;

    const iterator = saga(action);
    let lastResult;

    while (true) {
      let next;
      if (lastResult instanceof Error) {
        // an error was thrown, reject the action promise
        reject(lastResult);
        next = iterator.throw(lastResult);
      } else {
        next = iterator.next(lastResult);
      }

      if (next.done) {
        // the saga has completed!
        resolve();
        return;
      }

      // keep generating values
      lastResult = yield next.value;
    }
  };
}

// usage

// using the saga wrapper
function* handleAction(action) { /* ... */ }
function* () {
  yield takeEvery('SOME_ACTION', trackCompletion(handleAction));
}

// dispatching the action and awaiting saga completion
const { meta: { promise } } = dispatch(smartActionCreator(data));
await promise;
// saga is complete.

Code has not been tested, just spitballing
This could probably be streamlined by doing the async action stuff in middleware; there are many solutions for that.
I'm thinking of ways that the redux-saga library could more directly support the kind of pattern seen above without having to do a generator-wrapper (though I don't think the wrapper is too complex by itself).
Perhaps a way to add middleware to the redux-saga library itself? Some place we could put the code above so that it would be applied to every saga? Of course, not every saga has an action as a parameter, so that might not make much sense. Perhaps this wrapper function is good enough.

The idea itself is ok, I'd like to enable connecting such pieces as components and sagas more tightly for some use cases, but a builtin mechanism just for this doesn't seem right - unless we figure out better API. Need to think about something more universal.

I agree, I don't think it's a good idea to make this a built-in behavior.
I've been doing some more thinking on this problem. I think the approach may be flawed from the start. I'm starting to believe that a combination of 1) more case-specific sagas and 2) more usage of saga composition may provide a cleaner answer.
Consider the original form-submit use case. As boilerplate-y as it is to store loading state in Redux, if we consent to do so, we can write a pretty readable saga to achieve our aims...
// generic state reducer for 'raw' profile data. Can be combined in selectors
// to provide data to any view which deals with profiles
const defaultProfileState = null;
const profileReducer = (state = defaultProfileState, { type, payload }) => {
  switch (type) {
    case 'PROFILE/NEW_DATA': return payload.data;
    default: return state;
  }
};

// view state reducer for any state related to the profile edit form
const defaultProfileEditState = { loading: false, error: null };
const profileEditFormReducer = (state = defaultProfileEditState, { type, payload }) => {
  switch (type) {
    case 'PROFILE_EDIT_FORM/SUBMIT': return { ...state, loading: true };
    case 'PROFILE_EDIT_FORM/RESET': return defaultProfileEditState;
    case 'PROFILE_EDIT_FORM/SHOW_ERROR': return { ...state, error: payload.message };
    default: return state;
  }
};

// generic, reusable data saga which encapsulates updating a profile,
// including dispatching data-related actions to update the raw data in the store.
// returns the updated profile.
// this saga isn't directly connected to any `take` effects. It is only called
// by view-related sagas.
function* profileUpdateSaga(profileData) {
  // let's assume this throws an error on 4xx/5xx
  const apiResponse = yield call(sdk.updateProfile, profileData);
  // put a data-centric action to update the raw data in the store
  yield put(profileActions.newData(apiResponse.body);
  return apiResponse.body;
}

// view-specific saga which delegates profile update to the general saga,
// but also adds effects which relate directly to the profile edit form view.
function* profileEditFormSaga({ payload }) {
  try {
	const profile = yield call(profileUpdateSaga, payload.data);
	// we can freely include view-specific concerns here in a readable way
	yield put(profileEditFormActions.reset());
	// even other side-effects like routing, since this saga will only ever represent
	// the experience on the profile edit form view
	yield call(navigation.goTo, '/home'); // mock / generic navigation service
  } catch (err) {
    yield put(profileEditFormActions.showError(err.message));
  }
};

function* watchProfileEditFormSubmit() {
  yield takeLatest('PROFILE_EDIT_FORM/SUBMIT', profileEditFormSaga);
}

This may seem like redux-saga 101... cause it is... but I know I've personally gone really far down the rabbit hole in search of a way to effectively achieve this kind of pattern where we can have generic, reusable logic for common data and still have very specific and easy-to-follow logic for views. I think the desire to manage loading state within the component itself is coming from the same need which this pattern addresses: we want to have a place which can plainly manage highly specialized user flows which come from specific views without polluting our generic logic with edge-cases. Saga composition, based on my explorations, still seems like the best way to do this (even if it means we must move some state to Redux like loading or error alerts). It just seems like once you use redux-saga, it needs to be the exclusive way that you handle asynchronous operations. As a middleware which has no concept of the view, it can't easily be sewn together with view-based logic like other approaches (thunks, etc) can. Personally, I'm cool with that.

Stumbled across this topic while googling for related problem. Currently I solved the need for communication between components and sagas like this https://github.com/dcbrwn/redux-semaphore.
Bunch of helper methods encapsulating boilerplate help to save a few keystrokes. For example:
const ENTITY_FETCH_REQUEST = 'ENTITY_FETCH_REQUEST';
const ENTITY_FETCH_SUCCESS = 'ENTITY_FETCH_SUCCESS';
const ENTITY_FETCH_FAIL = 'ENTITY_FETCH_FAIL';

async function fetchAndWait(requestAction, dispatch) {
  dispatch(requestAction);
  const actionTypePrefix = requestAction.slice(0, -('REQUEST'.length));
  const failActionType = actionTypePrefix + 'FAIL';
  const successActionType = actionTypePrefix + 'SUCCESS';
  return await semaphore(
    action => action.type === successActionType && action.payload.requestAction === requestAction,
    action => action.type === failActionType && action.payload.requestAction === requestAction);
}

// And somewhere in component

async _handleReloadClick(event) {
  event.stopPropagation();
  this._isLoading = true;

  try {
    await fetchAndWait(fetchSomeData(), this.dispatch);
  } catch (error) {
    this.dispatch(addNotification('Failed to fetch data'));
  }

  this._isLoading = false;
}

/**
* Lifecycle method
*/
async componentDidMount() {
try {
this.setState({loading: true});
await this.props.getCities();
const {cities} = this.props;
this.setState({loading: false, tempCities: cities});
} catch (e) {
this.setState({loading: false});
}
}
I was using redux-saga for my app, then I realise to achieve above I have to use library for this. Is there any simple way to achieve above behaviour in redux-saga?

I just started with saga and this is first problem that popped up almost immediately. Using redux to store totally everything is a real pain cause I need also to store every field error messages for every form, I need to dispatch actions to clear error messages every time components unmounts and mounts to make sure that previous error is not shown before form is sent. I also use persistence and I need to exclude all that loading and errors states for every form from persistence. And this is awkward, I do everything to simulate component stare using redux state writing like 5x time more code.

And this is why redux isn't for everyone. It does encourage managing ALL of your state in one place, including loading states and such.
While it's understandable to look for a solution outside the flow due to the awkwardness of the solution that redux provides to those issues, it's inherently wrong, and it's completely outside the scope of this project to solve this "problem".
redux-saga is a clean and declarative way to implement side-effects, and that's it.

Actually I think Redux encourages keeping GLOBAL state in 1 place, I read in numerous places thats it is totally fine to use for instance React state for local things, for example for form messages/errors. This is what I do, and many libraries like Formik as well.

@saboya I'd say that you are talking about redux-saga isn't for everyone. Cause use redux with redux-thunk and can easily get promise returned from the dispatch:
handleLogin() {
  this.setState({loading: true})
  this.props.login(credentials)
    .then(() => this.navigate('DashboardScreen'))
    .catch(err => this.setState({error: err.response.data})
    .then(() => this.setState({loading: false})
}

And save a lot of coding without the need of implementing multiple additional actions, especially when this things just don't belong to global state as they have to be cleared after component unmount.

Keeping state in one place is what redux encourages.. It's up to each developer to decide if they belong there or not.
redux-thunk returns Promise from dispatch and that allows some stuff, sure. But if you landed here in redux-saga it's because you probably realized that it doesn't scale to large-scale apps. Each solution has its pros and cons, but trying to turn redux-saga into something it's not isn't going to solve design problems.

There are multiple ways to achieve what you want (adding a middleware to creating and saving the promises as symbols in your store, etc.) but I'd argue you should only need to either dispatch actions or handle the asynchronous operation internally, and not both.
The essence of what you are trying to achieve is making your React component become aware of the asynchronous nature of the action you are dispatching, and, concretely, introducing promises (or observables, async/await, generators, etc.) into your component. If you are okay with introducing asynchronous operations into your component, then why not just postpone submitting the redux action until the action is resolved?
asynOperation()
 .then(payload => { this.props.action(payload); //component specific actions })
.catch(error => { this.props.action(new Error(error)); //component specific actions })

The point is that if your store does not already contain the information that an asynchronous action has started and is pending and you do not want to add that information to the store because it is not needed at a global level then, by definition, there is no need to dispatch the action until the asynchronous operation has already been resolved/rejected.

Here’s a scenario where Saga -> Component communication is required that I haven’t seen in this thread so far (though I may have missed it):
We are following the Redux SubApp pattern - in our case, I help maintain a “SubApp” that exists in a large SPA consisting of both React and non-React components. The props passed into the root SubApp component are the primary way that the SubApp communicates with the larger application. Unfortunately, the Redux SubApp example linked above has no examples where the SubApp accepts any callback props (or any props at all).
We need to call some callbacks passed to the root SubApp component after asynchronous activities are completed (eg. calling something like this.props.ready() after everything is loaded). Here are some approaches we’ve considered:

Put the prop into Redux Saga context (if the prop is a function) at load using an undocumented createSagaMiddleware API, eg. createSagaMiddleware({context: {ready: this.props.ready}}). Works well enough if you can assume that the prop never changes. If it does change, then you have to update the Redux Saga context every time it changes, which is cumbersome.
Put a reference to the root SubApp react component into the Redux Saga context, eg ``createSagaMiddleware({context: {rootComponent: this}})`. It will always have the latest props, I think, but this seems incredibly hacky.
(not Redux Saga specific) Update some state when we want the callback to be called - basically the top-voted answer to this StackOverflow question. The comparison between this.props and nextProps doesn’t seem ideal, it seems to be a React anti-pattern that should be avoided in React except in specific scenarios like animations. Plus, react-redux doesn’t guarantee that every state change results in a re-render, which may result in the app not calling the callback when expected - not an issue with this particular this.props.ready() example, but could be an issue with other examples.
(not Redux Saga specific) Put the callback in the action, as suggested here, but then the action isn’t serializable, and if the root SubApp component is passed a new callback in the meantime, the action will still reference the old callback.
(not Redux Saga specific) Put the callback in the Redux store, but then the Redux store isn’t serializable, and it has to be kept in sync with the latest props passed into the SubApp root component.

I’m at a bit of a loss of what the best approach is when following the SubApp pattern, any tips would be appreciated!

@saboya Yes, there is a BigApp, to use Redux's terminology, that controls all of that. We do already have an inter-app communication channel - the BigApp passes state and callbacks as props to each SubApp. If you're suggesting adding a second inter-app communication channel, maybe something using events, this seems to add a lot of complexity just to get around some redux/redux-saga limitations. From the SubApps perspective, calling a callback passed from the BigApp seems like a regular side-effect to me, but I don't see a clean way for Redux Saga to interact with the props passed in from the BigApp.

You should handle it through the props passed to each SubApp then. Having the outermost component compare props changed and fire events accordingly.

@saboya that kinda works for BigApp -> SubApp communication, although it suffers from the same issues described in the third point of my first comment. I'm more concerned about SubApp -> BigApp communication, for which neither Redux nor Redux Saga seems to have any solutions for.

@jochakovsky  I've posted some solution earlier in this thread, which can be integrated with component even further.
// declared somewhere near store creation
function bindToSaga(fn) {
  return (...args) => sagaMiddleware.run(fn, ...args).done;
}

class Foo extends React.Component {
  constructor(props) {
    super(props);

    this.initialize = bindToSaga(this.initialize.bind(this));
  }

  *initialize(param1, param2) {
    yield put({
      type: "MAKE_STORE_HAPPY",
      payload: param1 + " " + param2,
    });

    // call function passed from parent
    const readyResult = yield call(this.props.ready);

    this.setState({
      title: "I'm ready!!!",
      verySpecialValue: readyResult,
    });

    // if someone is interested in result
    return {
      meow: true,
    }
  }

  render() {
    return (
      <button onClick={() => this.initialize("Hello", "world")}></button>
    )
  }
}

So this way you can use components state & props inside your saga.

Is the following practice worth considering?
https://stackoverflow.com/a/42590347/433570 .
I spent all day dinking around with this stuff, switching from thunk to redux-saga
I too have a lot of code that looks like this
this.props.actions.login(credentials)
.then((success)=>redirectToHomePage)
.catch((error)=>alertError);

its possible to use thunk + saga
function login(params) {
  return (dispatch) => {
    return new Promise((resolve, reject) => {
      dispatch({
        type: ACTION_TYPES.LOGIN_REQUEST,
        params,
        resolve,
        reject
      })
    }
  }
}

then over in saga land you can just do something like
function* login(action) {
  let response = yourApi.request('http://www.urthing.com/login')
  if (response.success) {
    action.resolve(response.success) // or whatever
  } else { action.reject() }
}

@saboya I landed here only because some of the projects used redux-saga, I ended up just rewriting everything with redux-thunk and it solved all my issues, and I get rid of lots of boilerplate.
@charlax Yeah, absolutely agree with this!

I ran into the same problem and came up with https://www.npmjs.com/package/redux-retry. Has worked fairly well for, is it the right solution, that I can't tell.

I'm really thinking this problem, and it may be hint of solution with for this though it have some problems,
const SUBSCRIBE = '@@Redux-Saga/SUBSCRIBE'

export const sagaSubscribe = (subscriber:()=>void) => ({
  type: SUBSCRIBE,
  payload: subscriber
})

export function subscribe<T extends any>(type = this.name,result?: T)  {
  return put({
    type: `${SUBSCRIBE}/${type}`,
    payload: result
  })
}

export function subscribeSaga (saga: Saga & {type: string}) {
  return function* () {
    yield fork(saga)
    while (true) {
      const callbackAction = yield take(SUBSCRIBE)
      if(callbackAction){
        const channel = yield actionChannel(`${SUBSCRIBE}/${saga.type}`)
        try {
          while (true) {
            const result = yield take([channel,END])
            if(result.type===END) break;
            callbackAction.payload(result.payload)
          }
        } finally {
          channel.close()
        }
      }
    }
  }
}

function * exampleSaga() {
  yield take(anyActonType)
  //... do something
  yield subscribe(exampleSaga.type, {
    result: 'result'
  })
}

exampleSaga.type = 'someId or maybe using exampleSaga.name'

function* rootSaga() {
  yield subscribeSaga(exampleSaga)
}

// ...components
componentDidMount() {
  dispatch(sagaSubscribe((result)=> {
    // can access any component props or state
  }))
}

this way barely obey the loosely-coupled rules of saga event and can be wrapped  ,but this solution have the problems.
1. subscribe effect must be triggered if it doesn't match any sagas' action type.
2. It's fake of subscribe event of redux , so there is possibility to trigger when state update is not completed.
3. saga.type must be named if you don't use function.name, and actions
4. It tough to wrap sagas to subscribe every time .

Though my code can be plugged in/out each saga , it may be good to set global subscribe listener in middleware or run independent saga as global subscriber because it doesn't need type is identical though we need to know the results of actions and handle them appropriately.
ex) Anytime you want to get results from subscriber, yield subscribe(result) when you want to invoke it  is enough to do to component.

Somewhat related, but there's a similar issue here #161 that discusses trying to return a promise from an action dispatch in case anyone stumbles upon this issue and wants to look at possible solutions to their problem.
The referenced issue is specific to redux-saga + redux-form integration but still has some solutions worth looking at imo.
Additionally, this library https://github.com/diegohaz/redux-saga-thunk might be of interest as well as another potential solution.

I like this approach. It makes things simple :)

HI , you can handle loader centrically , let say you have loader component , there you can attach your loader component to the reducer , so on the bases of reducer loading state you can handle easily.
you can use redux - thunk and also you can use redux saga here , every time you just need to dispatch the action to the reducer only .
For more info please do subscribe my youtube channel
Muo sigma classes :- https://www.youtube.com/channel/UCD8bHKf3eRE0bAWShADWAYw
Thanks and regards

and also we have something like finally in redux saga , so using this you can also clear the reducer state for loading issue .
but i am using like this , i made two dispatch one for start_loading and another for stop_loading
, call after success or error in saga
Thanks and regards

Hi there !
Any updates ?
What is the best solution for this problem ?
Thank's !

Not sure if it's a bad practice, but you can give your action a callback function which you can fire from sagas.

ComponentX
dispatch(actionX("par1", "par2", () => { ..doSomthing } )

ActionX

export function actionX(param1, param2, callback) {
  return {
    type: "ACTION_X",
    payload: {
      param1,
      param2,
      callback
    }
  };
}

Sagas:
export function* doSomthingSaga({ payload }) {
// Callback setLoading(true)?
  try {
    const data = yield call(XService.updateDto, payload.param1, payload.param2);
    yield put(actionZ(data));
    payload.callback(); // callback when success? setLoading(false)
    return data;
  } catch (error) {
    // Fire a callback here if somthing goes wrong
  }
}

I was planning on handling this issue with a useEffect, but I agree that almost the first thing I noticed from switching from thunks to sagas was that I couldn't just await the action/saga in my component like I could with a thunk and do a .then or .catch on it to display a snackbar etc.
To get around this I was just going to do something like
dispatch(someActionToFireAnApiCall(data))
then in my component listen for the async state changes
useEffect(() => {
    if (apiSuccess) {
        setSnackbar({ message: "Updated" })
        clearApiState()
    }
    if (apiError) {
       setSnackbar({ message: "Failed" })
       clearApiState()
    }
}, [apiError, apiSuccess, setSnackbar, clearApiState])

depending on your specific use case, you could call the clearApiState anywhere you need. The main idea  being to just listen for the loading statuses that the saga will dispatch.

The only way that I have ever used sagas were to dispatch an action and then respond to a state change in my React component since .then and async/await are unavailable or not feasible.
This is not ideal, but this is the trade off with Thunks vs. Sagas.

I assume this problem can be solved by connecting your sagas to external I/O i.e. to your component's state
This way you don't need to keep local component's state in Redux state

Strange, but git's history says that solution (mention in the docs) for this problem has been existing since 2016. Am I missing something?
https://github.com/redux-saga/redux-saga/commit/3deff3f2255fc6f20cecfa36fa6398e61d78eeb1#diff-3807b7428d45d9fecae6faa3d1a39952e15915fa07e2dac4122e8d866bfc4590

const handleSubmit(){
  //call api inactive service
   dispatch({
          type: 'services/inactiveService',
          note,
    })
    if(dispatch_error){
       setModal(true);
    }
   if(dispatch_sucess){
      setModal(false);
   }
}

How I can listen dispatch failed to setModal suitable state in the local component's?

There's a lot going on in this issue and a lot has changed in the redux ecosystem since it was originally created. Having said that I built a library https://github.com/neurosnap/saga-query that attempts to reduce boilerplate around loading states and using sagas in general.

Circling back, I'm going to close this issue for now.  If anyone is interested in continuing the discussion, I can reopen and chat with you about it!  Just know, at this point in time, a primary goal for this library is maintenance.  Any breaking changes or big new features should probably live in a superset library.


TN-1367 Ironman Demographic QuestionnaireResponse migration

Add 1 to question index for all questions in irondemog and irondemog_v3 Questionnaires
Todo: fix JSONB mutation detection

SQLA can't detect deeply nested changes to a JSONB column
See OpenStack discussion

Hello @ivan-c! Thanks for submitting the PR.

In the file portal/migrations/versions/8efa45d83a3b_.py, following are the PEP8 issues :

Line 53:80: E501 line too long (83 > 79 characters)
Line 62:80: E501 line too long (81 > 79 characters)
Line 85:1: E302 expected 2 blank lines, found 1


Need to dynamically load Hyperon in REPL (possible cause of SegFault on Apple HW)

my best guess (unconfirmed) about the cause of the SegFault when loading the Python stdlib on Apple CPU HW is a tool-chain mismatch between the compiler or build settings used to build the HyperonPy library and the settings used to build the repl.
The fact that this can happen is a fragility that needs to be fixed regardless of the ultimate root cause of the Apple SegFault.
My original thinking is that the problem was theoretical, and therefore could wait until we address https://github.com/trueagi-io/hyperon-experimental/issues/283 by statically embedding the HyperonPy extensions.  However, it appears the problem may have become real and needs immediate attention
I will switch the REPL to dynamic runtime loading of Hyperon.

This issue is fixed by not importing the hyperon core through a dynamic pathway.


Forward, Reply to emails: the cited TO, CC and BCC header should be valid to be copy&paste into new TO, CC and BCC fields

Expected behavior
When I Reply or Forward and email, K9 puts old email including TO, CC and BCC headers into cited email below.
When I go down there and copy all emails text in the TO section of this cited email header, I should be able to paste into the TO, CC or BCC of the new email and it should become valid email addresses.
Actual behavior
When I copy the cited header emails and I paste into TO of new emails, K9 does not recognize emails.
Seems because names and emails are not formatted properly in cited email header for K9 to parse successful when pasted in.
Steps to reproduce

receive and email with a few names and email in TO field
Reply to email and ensure old email is cited below with full header
copy names and emails from TO section of cited email
paste into TO, CC or BCC of new email
see that names and emails are not parsed

Environment
K-9 Mail version:
Android version:
Account type (IMAP, POP3, WebDAV/Exchange):

Perhaps related: I've found k9 accepts a keyboard entered name  pair but rejects   name.  The sequence matters where it shouldn't.

The same issue appears, when copying an addressee by long-holding over the sender name. Sender (addressed to-be) is copied in format
"first last whatever" name@domain
but this format is not accepted in a To field for a new email. An exclamation mark is displayed.


feature request --showall

TIL from @goran-mahovlic that when testing the new @RadionaOrg ULX3S boards, the FTDI firmware version will change and some old versions of fujprog and ujprog will NO LONGER WORK. This could make for a really horrible first time user experience.
So my feature request: add something to fujprog that shows all the interesting characteristics of the board (versions, etc), with a warning as to which respective minimum versions of fujprog and ujprog are needed.
I'm thinking something like: fujprog --showall
This first step should prominently be displayed in all tutorials for the ULX3S to avoid potentially countless hours of frustration in trying the program the ULX3S with an out-of-date bitstream uploader tool.
See also: Warning: New batch - or just testing .
Thanks!

If fujprog had long flags (which it doesn't, @kost hint, hint) I would prefer --boards flag for that. It could be -B as short flag, since -b is already used.

Now that @kost implemented more verbose -d output you can get list of supported boards with:
# fujprog -d -i
ULX2S / ULX3S JTAG programmer v4.6 (git e0cedeb built Aug  1 2020 07:13:47)
Copyright (C) Marko Zec, EMARD, gojimmypi, kost and contributors
Going through cable_hw_map loop
Looking cableID 0 (0x0403, 0x6001) with path FER ULXP2 board JTAG / UART
Looking cableID 0 (0x0403, 0x6001) with path FER ULX2S board JTAG / UART
Looking cableID 0 (0x0403, 0x6015) with path ULX3S FPGA board
Looking cableID 0 (0x0403, 0x6015) with path ULX3S FPGA v1.7
Looking cableID 0 (0x0403, 0x6015) with path ULX3S FPGA 25K v1.7
Looking cableID 0 (0x0403, 0x6015) with path ULX3S FPGA 45K v1.7
Looking cableID 0 (0x0403, 0x6015) with path ULX3S FPGA 12K v2.1.2
Looking cableID 0 (0x0403, 0x6015) with path ULX3S FPGA 25K v2.1.2
Looking cableID 0 (0x0403, 0x6015) with path ULX3S FPGA 45K v2.1.2
Looking cableID 0 (0x0403, 0x6015) with path ULX3S FPGA 85K v2.1.2
Looking cableID 0 (0x0403, 0x6015) with path ULX3S FPGA 12K v3.0.3
Looking cableID 0 (0x0403, 0x6015) with path ULX3S FPGA 25K v3.0.3
Looking cableID 0 (0x0403, 0x6015) with path ULX3S FPGA 45K v3.0.3
Looking cableID 0 (0x0403, 0x6015) with path ULX3S FPGA 85K v3.0.3
Looking cableID 0 (0x0403, 0x6015) with path ULX3S FPGA 12K v3.0.7
Looking cableID 0 (0x0403, 0x6015) with path ULX3S FPGA 25K v3.0.7
Looking cableID 0 (0x0403, 0x6015) with path ULX3S FPGA 45K v3.0.7
Looking cableID 0 (0x0403, 0x6015) with path ULX3S FPGA 85K v3.0.7
Found cableID 0 (0x0403, 0x6015) with path ULX3S FPGA 85K v3.0.7
Returning from setup_usb()
Using USB cable: ULX3S FPGA 85K v3.0.7

This will stop if it finds support board or list all supported boards.
I don't have any v3.0.8 boards anymore so it's not really listing all versions, but up to supported one.


Kermit rebalance

Fixed angle bonus being incorrectly applied
Added explicit nerf for speedflow

oh, oops, wrong branch


Fix onWidthChange only being called on breakpoint changes

This PR fixes issue #769

Yeah, that's a bug. Thanks!


Obsoletion notice:  GO:0035986 senescence-associated heterochromatin focus assembly

Please provide as much information as you can:

GO term ID and Label
GO:0035986 senescence-associated heterochromatin focus assembly

Reason for deprecation
Should be captured as an extension (occurs during cellular senescence)

"Replace by" term (ID and label)
If all annotations can safely be moved to that term

"Consider" term(s) (ID and label)
Suggestions for reannotation

Are there annotations to this term?

How many EXP: 3 (removed)

Are there mappings and cross references to this term? (InterPro, Keywords; check QuickGO cross-references section)
NA

Is this term in a subset? (check the AmiGO page for that term)
NA

Any other information

Dear all,
The proposal has been made to obsolete GO:0035986 senescence-associated heterochromatin focus assembly. The reason for obsoletion is that there is no evidence that this is a distinct process; this should be captured as an extension (occurs_during GO:0090398 cellular senescence).
There are 2 annotations to this term, but these are redundant with other annotations. There are no mappings; this term is not present in any subsets.
You can comment on the ticket: geneontology/go-ontology#22024
Thanks, Pascale


My image is a single channel gray scale image, how to set parameters?

Hello,
I don't think the number of colour channels is relevant to this library? It's just for drawing annotations so it's concerned about coordinates rather than colour depth.


multiple job servers

The ability to have multiple servers running jobs would be a pretty big improvement, especially if they can all have a single web UI for management.
We talked on IRC, and tagging (ala #29) is probably the cleanest way to get to this.

In my own workflow, I've got four servers.  One of them will be the master/web server, but the jobs should be farmed out to the other servers, usually specifying exactly which server (old-school non-auto-balanced).

It'd also be handy if this could both specify "run this job on only this server" but also "only run these jobs on this server", if it's reasonably possible without adding too much complexity.

:+1: should be doable with an alternate CronService impl


fix: move creator coin info to second profile info line on mobile to …

…fix overflow issues
Issue arrises with users who have a long username and/or are verified and/or have a high coin value. Also happens frequently with quote reclouts.
Before:
After:

Can we swap the follow and coin price divs? Coin price feels more important

Can we swap the follow and coin price divs? Coin price feels more important

Updated:


Added reminder for OSDC meetups.

Fixes #18.

@DelusionalOptimist Have you tested the code? Please share a screenshot of its working here.
Also, try to add suitable comments wherever necessary and choose better names for variables. It seems not significant now, but helps a lot in the long run. Thanks.
Also, BTW are you using any Go formatter and Linter? If no, do lint and format the codebase using one. If you use VSCode, there's one for VSCode by Microsoft.

@DelusionalOptimist Have you tested the code? Please share a screenshot of its working here.

Here is a screenshot:

Also, try to add suitable comments wherever necessary and choose better names for variables. It seems not significant now, but helps a lot in the long run. Thanks.

Noted. :+1:

Also, BTW are you using any Go formatter and Linter? If no, do lint and format the codebase using one. If you use VSCode, there's one for VSCode by Microsoft.

Yes, I do use the extension by Microsoft but seems like I have not configured it properly. Will look into it.

Rest, Great work :100: :tada:

Thank you :smile:

Edit: If you have any confusions, feel free to ping me.

Sure. :+1:

Also, I think I should explain how the reminders will work.
Example:
Suppose we have a meetup on 30/05 at 5:00 PM and we add this meetup on 25/05. Then the bot will send a reminder in the group everyday at 4:00 PM (meetup hour -1) till 30/05.
If everyday reminders sound annoying then we can change them.
What do you say @sidntrivedi012 ?
:thinking:

@DelusionalOptimist Yes, reminding everyday will be annoying. It will be great to have reminder only on the same day. For example : One reminder at 10 am/12 pm of the same day would be great.

My bad. I should have messaged you about the same.
I'll do the changes ASAP.

Great work @DelusionalOptimist 💯 🎉  Do comment on any issue if you wanna work on any of them. Also, we have our board to track progress here - https://github.com/osdc/bots/projects/1


Mini question

Hello tony,
i'm eager to test your code but i'm having trouble getting started it seems like the mix task grpc.gen has been removed which is referenced from the docs and examples. I'm having trouble finding what it has been replaced with. Would apprechiate some pointers in the right direction

You can use https://github.com/tony612/protobuf-elixir to generate code. I'll update the doc in this lib later.

Thank you for updating! About to take your work for a ride :)

@AleksandarFilipov Please ping me if you have any problem 😄

I'm back and got some samples running, keep up the good work!

So I'm struggling a bit understanding how to make server request asynch. If managed to connect to a genserver by sending the stream to it and blocking the calling pid. Once the stream is finished I let go of the block (lock) and the stream terminates. This works well, but I've got a feeling that it's not how intended it to work. Using this approach it's unclear to me how I would handle client disconnect. I assume there are some callbacks I've missed such as streamdisconnect. Please point me to an example if there os one which I've missed.

I'm not sure if I fully understand your problem. But if the client has a problem after sending the request. The client should be able to reconnect and you can still use that connection. If you find there're unexpected problems, please report.

Ok, one question at a time 😀. I'm on the serverside with you library. A client connects and a stream is returned. I think of it as a subscription (a genserver writes to the stream in my implementation). Once the client is satisfied with its subscription it disconnects. Question: how do I know that the client is disconnected, where do I put the server side code to stop feeding the stream with data? (The stream is fed from my genserver)

@AleksandarFilipov There's no support for that now. But maybe we can get the info from cowboy. I'll look into cowboy's code to see how to do that.

Sounds great. Now I know I haven't missed something obvious. I'll have look around and I'll try to understand how it works, and potentially be of some help.

A few months has passed and here are my findings :). This really isn't an issue.
Well if the client disconnects abruptly cowboy will
exit(Pid, shutdown)

which means that otp also will bring down any linked process (since the reason isn't normal). In my scenario  this is neatly hadled by adding
Process.flag(:trap_exit, true)

to my genserver, which in turn will get a callback to terminate, giving me a chance to clean up any ongoing leftovers.
My remaining consern is that i have trouble writing testcode for the thing since the terminate is only called once the testcode is terminate, but thats a diffrent story


Be able to hook into the fastAPI subapp

Checklist

[X] There are no similar issues or pull requests for this yet.

Is your feature related to a problem? Please describe.
Hello, great work ! :)
I would like to be able to add my own url paths below the root endpoint of the admin app.
For example I would like to be able to do a POST on the homepage (url "/")
Something that would look like this
@router.post("")
async def post_homepage(request: Request):
    logger.warning("post !!")
    return templates.TemplateResponse("index.html", {"request": request})

From what I understand it is not possible to access or modify the sub app
Neither is it possible to mount another sub application on the same endpoint (because routes would conflict)
It would be great if we could use the default routes but also add some and override existing routes
Describe the solution you would like.
from backoffice import homepage

admin = Admin(app, create_engine(Settings().db_uri), base_url="/backoffice")

admin.include_router(homepage.router)

routes could be added before the existing routes to have priority
Describe alternatives you considered
No response
Additional context
No response

Hi, it might be that I'm not thinking this straight but I would like to have all my backoffice routes under /admin and I cannot find a way to add routes to /admin once the startlette app is mounted.
My use case is to add more routes under /admin (custom pages, api routes)

Let's say I've mounted the backoffice app under base_url='/admin'
would I be able to define independent routes like /admin/foo or PUT /admin ?
Thank you

Yeah I think generally we should allow this.
One way would be to add routes using the Admin app instance: admin.app.add_route and another way maybe would be to expose this directly from the Admin instance, maybe needs more thought.

Allright thanks for your answer !
I was thinking of being able to include another router like in my first example. To have a fastapi like syntax.
I guess that would mean using a router object internally and not mounting the subapp.
It doesn't seem straighforward I'll let you think about it


Redirect Rules beta - can create rule without name via terraform

Confirmation

[X] My issue isn't already found on the issue tracker.
[X] I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version
terraform {
required_providers {
cloudflare = {
source  = "cloudflare/cloudflare"
version = "~> 3.0"
}
}
}
Affected resource(s)
cloudflare_ruleset
Terraform configuration files
locals {
  rule_set = var.rule_set != null ? {
    for rs in flatten(var.rule_set) :
    rs.name => rs
  } : {}
}

resource "cloudflare_ruleset" "default" {
  for_each                   = local.rule_set
  name                       = each.value.name
  zone_id                    = var.zone_id
  kind                       = each.value.kind
  phase                      = each.value.phase
  account_id                 = lookup(each.value, "account_id", null)
  description                = lookup(each.value, "description", null)
  shareable_entitlement_name = lookup(each.value, "shareable_entitlement_name", null)

...
}

Link to debug output
no link
Panic output
No response
Expected output
a redirect rule with a name
Actual output
a new redirect rule without name
Steps to reproduce
try to create a redirect rule using the ruleset resource
Additional factoids
No response
References
No response

`resource "cloudflare_ruleset" "single_redirects_example" {
zone_id     = var.zone_id
name        = "redirects"
description = "Redirects ruleset"
kind        = "zone"
phase       = "http_request_dynamic_redirect"
rules {
action = "redirect"
action_parameters {
from_value {
status_code = 301
target_url {
value = "/console/"
}
preserve_query_string = false
}
}
expression = "(http.request.uri.path eq "/login")"
# description = "Redirect visitors still using old URL"
enabled = true
}
}`
this is the resource i am using when the description field is the filed that is in charge of the required name field via the UI.

The probelmatic file is internal/sdkv2provider/data_source_rulesets.go line 95.
Would it be possible to change the description field name to name? Alternatively, set the description property to Required:    true.
Afterward, documentation needs to be updated.

i'm sorry; i'm not following what your actual issue is here. your example is for a resource but you mention the issue is in the data source code?
can you please update the issue here to reflect the requested information so we can debug what the issue is here?

@jacobbednarz ok sorry i will be more informative:

the code that create a single redirect rule which is a beta feature , is using the following resource for example:

resource "cloudflare_ruleset" "single_redirects_example" {
  zone_id     = "<ZONE_ID>"
  name        = "redirects"
  description = "Redirects ruleset"
  kind        = "zone"
  phase       = "http_request_dynamic_redirect"

  rules {
    action = "redirect"
    action_parameters {
      from_value {
        status_code = 301
        target_url {
          value = "/contacts/"
        }
        preserve_query_string = false
      }
    }
    expression  = "(http.request.uri.path matches \"^/contact-us/\")"
    description = "Redirect visitors still using old URL"
    enabled     = true
  }
}

in case you are not passing the second description property the redirect rule is created with successfully , but with no name , which is a required field via the UI.
see my photo:


php artisan route:catch 404 not found page

Laravel Version: 7.0.4
PHP Version: 7.4.0
Database Driver & Version: MySQL

Description:
resource  routes
php artisan route:catch
exception: "Symfony\Component\HttpKernel\Exception\NotFoundHttpException" file: "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Routing/AbstractRouteCollection.php" line: 42 message: ""

There's not a lot of info here.. Can you please share some code to reproduce the issue?

There's not a lot of info here.. Can you please share some code to reproduce the issue?

{     "message": "",     "exception": "Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException",     "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Routing/AbstractRouteCollection.php",     "line": 42,     "trace": [         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Routing/CompiledRouteCollection.php",             "line": 107,             "function": "handleMatchedRoute",             "class": "Illuminate\\Routing\\AbstractRouteCollection",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Routing/Router.php",             "line": 635,             "function": "match",             "class": "Illuminate\\Routing\\CompiledRouteCollection",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Routing/Router.php",             "line": 624,             "function": "findRoute",             "class": "Illuminate\\Routing\\Router",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Routing/Router.php",             "line": 613,             "function": "dispatchToRoute",             "class": "Illuminate\\Routing\\Router",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",             "line": 165,             "function": "dispatch",             "class": "Illuminate\\Routing\\Router",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",             "line": 128,             "function": "Illuminate\\Foundation\\Http\\{closure}",             "class": "Illuminate\\Foundation\\Http\\Kernel",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/fruitcake/laravel-cors/src/HandleCors.php",             "line": 36,             "function": "Illuminate\\Pipeline\\{closure}",             "class": "Illuminate\\Pipeline\\Pipeline",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",             "line": 167,             "function": "handle",             "class": "Fruitcake\\Cors\\HandleCors",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/fideloper/proxy/src/TrustProxies.php",             "line": 57,             "function": "Illuminate\\Pipeline\\{closure}",             "class": "Illuminate\\Pipeline\\Pipeline",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",             "line": 167,             "function": "handle",             "class": "Fideloper\\Proxy\\TrustProxies",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",             "line": 21,             "function": "Illuminate\\Pipeline\\{closure}",             "class": "Illuminate\\Pipeline\\Pipeline",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",             "line": 167,             "function": "handle",             "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",             "line": 21,             "function": "Illuminate\\Pipeline\\{closure}",             "class": "Illuminate\\Pipeline\\Pipeline",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",             "line": 167,             "function": "handle",             "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",             "line": 27,             "function": "Illuminate\\Pipeline\\{closure}",             "class": "Illuminate\\Pipeline\\Pipeline",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",             "line": 167,             "function": "handle",             "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php",             "line": 63,             "function": "Illuminate\\Pipeline\\{closure}",             "class": "Illuminate\\Pipeline\\Pipeline",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",             "line": 167,             "function": "handle",             "class": "Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",             "line": 103,             "function": "Illuminate\\Pipeline\\{closure}",             "class": "Illuminate\\Pipeline\\Pipeline",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",             "line": 140,             "function": "then",             "class": "Illuminate\\Pipeline\\Pipeline",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",             "line": 109,             "function": "sendRequestThroughRouter",             "class": "Illuminate\\Foundation\\Http\\Kernel",             "type": "->"         },         {             "file": "/home/vagrant/code/mpms/public/index.php",             "line": 46,             "function": "handle",             "class": "Illuminate\\Foundation\\Http\\Kernel",             "type": "->"         }     ] }

@hihuangwei please share some code. Your routes file is the most important bit here.

@hihuangwei please share some code. Your routes file is the most important bit here.

issuse url 'http://localhost/dashboard/enterprise/user'
file name 'routes/dashboard.php'
`<?php
use Illuminate\Support\Facades\Route;
Route::group(['middleware' => ['auth:api', 'throttle:2000,1']], function () {
Route::group(['middleware' => 'scopes:dashboard'], function () {
Route::group(['prefix' => 'enterprise', 'namespace' => 'Enterprise'], function () {
Route::put('user/{id}/link', 'UserController@link');
Route::resource('user', 'UserController')->only([
'index', 'show', 'edit', 'update', 'create', 'store'
]);
});
}
}`

There's no "dashboard" prefix defined. The below works:
<?php

use Illuminate\Support\Facades\Route;

Route::group(['middleware' => ['auth:api', 'throttle:2000,1']], function () {
    Route::group(['prefix' => 'dashboard', 'middleware' => 'scopes:dashboard'], function () {
        Route::group(['prefix' => 'enterprise', 'namespace' => 'Enterprise'], function () {
            Route::put('user/{id}/link', 'UserController@link');
            Route::resource('user', 'UserController')->only([
                'index', 'show', 'edit', 'update', 'create', 'store'
            ]);
        });
    });
});

@driesvints
RouteServiceProvider.php
`<?php
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Route;
class RouteServiceProvider extends ServiceProvider
{
/**
* This namespace is applied to your controller routes.
*
* In addition, it is set as the URL generator's root namespace.
*
* @var string
*/
protected $namespace = 'App\Http\Controllers';
protected $apiNamespace = 'App\Http\Controllers\Api';
protected $dashboardNamespace = 'App\Http\Controllers\Dashboard';
/**
 * Define your route model bindings, pattern filters, etc.
 *
 * @return void
 */
public function boot()
{
    // 只有在 id 为数字时才执行。
    Route::pattern('id', '[0-9]+');

    parent::boot();
}

/**
 * Define the routes for the application.
 *
 * @return void
 */
public function map()
{
    $this->mapApiRoutes();
    $this->mapWebRoutes();
    $this->mapDashboardRoutes();
}

/**
 * Define the "web" routes for the application.
 *
 * These routes all receive session state, CSRF protection, etc.
 *
 * @return void
 */
protected function mapWebRoutes()
{
    Route::middleware('web')
        ->namespace($this->namespace)
        ->group(base_path('routes/web.php'));
}

/**
 * Define the "api" routes for the application.
 *
 * These routes are typically stateless.
 *
 * @return void
 */
protected function mapApiRoutes()
{
    Route::prefix('api')
        ->middleware('api')
        ->namespace($this->apiNamespace)
        ->group(base_path('routes/api.php'));
}

protected function mapDashboardRoutes()
{
    Route::prefix('dashboard')
        ->middleware('api')
        ->namespace($this->dashboardNamespace)
        ->group(base_path('routes/dashboard.php'));
}

}
`

/**

Define the "web" routes for the application.

These routes all receive session state, CSRF protection, etc.

@return void
*/
protected function mapWebRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}


Unable to access env variables in Remix, even in a server file

What is the location of your example repository?
No response
What version of Hydrogen are you using?
^1.5.0
What version of Remix are you using?
1.12.0
Steps to Reproduce
I was using Shopify's version of Remix and ran into an issue where I tried to access an API key to be used in a newsletter signup form. However, I cannot access my env variables due to the error process is not defined.
app/env/env.server.ts:
import {ZodFormattedError} from 'zod';

const serverSchema = z.object({
  KLAVIYO_API_KEY: z.string(),
  KLAVIYO_GLOBAL_LIST_ID: z.string(),
  KLAVIYO_API_VERSION: z.string(),
})

const _serverEnv = serverSchema.safeParse(process.env);

const formatErrors = (errors: ZodFormattedError<Map<string, string>, string>) =>
  Object.entries(errors)
    .map(([name, value]) => {
      if (value && '_errors' in value)
        return `${name}: ${value._errors.join(', ')}\n`;
    })
    .filter(Boolean);

if (_serverEnv.success === false) {
  // eslint-disable-next-line no-console
  console.error(
    '❌ Invalid environment variables:\n',
    ...formatErrors(_serverEnv.error.format()),
  );

  throw new Error('Invalid environment variables');
}

export const env = {..._serverEnv.data};

routes/newsletter/subscribe.tsx:
import {ActionArgs, json} from '@shopify/remix-oxygen';
import { env } from '../../env/env.server';

export async function action({request}: ActionArgs) {
  const email = (await request.formData()).get('email')?.toString() ?? '';
  try {
    const res = await subscribeToKlaviyoList(email);

    return res.json();
  } catch (error) {
    return json({error: error.message, ok: false});
  }
}

export async function subscribeToKlaviyoList(
  email: string,
  source = 'Home Page Footer',
) {
  const API_KEY = env.KLAVIYO_API_VERSION;
  const API_VERSION = env.KLAVIYO_API_VERSION;
  const LIST_ID = env.KLAVIYO_GLOBAL_LIST_ID;

  return await fetch(
    'https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs/',
    {
      method: 'POST',
      headers: {
        accept: 'application/json',
        revision: API_VERSION ?? '2023-01-24',
        'content-type': 'application/json',
        Authorization: `Klaviyo-API-Key ${API_KEY}`,
      },
      body: JSON.stringify({
        data: {
          type: 'profile-subscription-bulk-create-job',
          attributes: {
            list_id: LIST_ID,
            custom_source: source,
            subscriptions: [
              {
                channels: {email: ['MARKETING']},
                email,
              },
            ],
          },
        },
      }),
    },
  );
}

I've followed along with this example from Remix and this GitHub repo, but in both instances, they either aren't using env variables or the API key is hard coded. I would greatly appreciate any help.
Expected Behavior
Able to use env variables
Actual Behavior
Error saying ReferenceError: process is not defined

This worked @kiliman thank you!

I'm not sure how to get the environment outside of context yet.

This is not possible since the environment variables are only available within a request context in worker environments.
The way to access it is basically what you described. Make sure to pass env to your getLoaderContext in server.ts so that it is later available in the loader/action context.
If you need the variables in the browser, you can always return them from a loader and get them with useLoaderData() in the component, but be careful not to leak private variables.


"Health Check Failed" seems to pop up frequently, and vehicle always shows as unlocked

Describe the bug
"Health Check Failed" seems to pop up frequently, and vehicle always shows as unlocked.
To Reproduce
Main screen, top right of vehicle info, Health Check Failed is there, along with unlock symbol.
Expected behavior
Health Check Failed info would be helpful.  Nothing in documentation as to how to troubleshoot.
When vehicle is locked, the locked symbol should also update.
Relevant entries from the logs
No logs during this period...
Data
N/A
Data collection appears to be normal.
Operating environment

TeslaMate Version: 1.17.1
Type of installation: Docker on Synology NAS
OS: Synology DSM 6.2

The health check fails if TeslaMate cannot talk to the Tesla servers, e.g. because of no internet connection or server problems. As a result, the latest data is not available, including whether the car is locked or not.

Relevant entries from the logs
No logs during this period...

There are definitely logs for this period. On Synology you might have to check its dedicated Docker UI.

Not sure what happened but it's working fine now.  Got an upgrade from 2020.4.1 to 2<IP_ADDRESS> yesterday.  Not sure if it's related.
Will keep an eye on it!


Combine runs of a paragraph

I am trying to modify a docx file without disturbing the layout and format of a file.
There are few words in the docx file which i am trying to replace with other words. In most of the cases it can be successfully achieved as the words can easily be found in some specific runs, however some words are getting split into multiple runs and it is becoming very difficult challenge to search those individual pieces and then combine those words which has been split into multiple runs.
As they have been split into multiple pieces my search algorithm is not able to find those words and i am failing in replacing those words.

The algorithm here should work for your case: https://github.com/python-openxml/python-docx/issues/30#issuecomment-879593691


Create script to apply only new data from fixtures

When deploying it's not really possible to use loaddata and only add new entries.
Create a script that will add new entries from selected fixtures; it should accept a table column by which existence of an entry should be determined.

@pbanaszkiewicz  I'm not sure what this.  Can you clarify or provide examples?


Another subcommand named 'help' already exists for command ''

Hi there,
I keep running into the following exception
picocli.CommandLine$InitializationException: Another subcommand named 'help' already exists for command '<main class>'
I know what the cause of this is but I don't know how to fix it.
I have an abstract class AbstractCommand which is annotated so that every class extending it automatically has a specified (custom) help command:
@CommandLine.Command(subcommands = HelpCommand.class)
public abstract class AbstractCommand {
    ...
}

All my commands are extending this abstract class and this hasn't caused any issues thus far.
The problem arises when I make another abstract class extending AbstractCommand e.g.
public abstract class Subcommand extends AbstractCommand {
    ...
 I couldn't find the exact cause for the issue in the picocli source code but I can only assume that it is trying to add the help command twice due to Subcommand inheriting the annotation on AbstractCommand.
I would like to add that this only occurs on version 4.0.0-alpha-2 and up, worked just fine before that.
Perhaps it is related to this?

I think it’s caused by this change: https://github.com/remkop/picocli/issues/660

May need to revert that.

This change has been included in the 4.0.0-beta-1b release that just came out.
I added a test but it would be good if you can confirm the problem no longer exists.


DC agent and .Net Framework Pre-requisite

The text under the DC agent pre-requisite says
All machines where the Azure AD Password Protection proxy service will be installed must have .NET 4.7.2 installed
Should the highlighted text not read DC agent?

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

ID: 23e000f0-84ce-7ec7-e5ed-4bd9c49f5d49
Version Independent ID: e636b9d1-be81-0f00-97c4-ff4fa9078be3
Content: Deploy on-premises Azure AD Password Protection
Content Source: articles/active-directory/authentication/howto-password-ban-bad-on-premises-deploy.md
Service: active-directory
Sub-service: authentication
GitHub Login: @Justinha
Microsoft Alias: justinha

@LijuV-MSFT
Thanks for your feedback! We will investigate and update as appropriate.

Thanks! I made a pull request to update the prerequisites. https://github.com/MicrosoftDocs/azure-docs-pr/pull/189495
Since that section applies to the DC agent, it looks like the text should be updated like you said.


Added Gymnasium Ganderkesee (germany)

@ShiruSan I am sorry for a delay with processing your request.
Pull request merged. Thank you!


Provide default progress loggers

This PR updates the progress logging of VI to the updated ProgressLogging API and makes use of the new @ifwithprogresslogger macro in AbstractMCMC for selecting a default visualization backend in case the none is provided by user.

thanks @devmotion!


expand contribution guidelines

note typical workflow we use, as well as file naming conventions, specifically:

all lowercase file and folder names
kebab case naming (no underscores)
branch naming conventions

Right now, the CONTRIBUTING file has nothing in it. I'm working on writing a quick technical guide to getting the project up and running. Is there anything else I can throw in this documentation while I'm in there? I basically want to give people a guide to installing Ruby, Rails, Jekyll, and Bundler based on the documentation that already exists at:

gorails.com
jekyllrb.com

Does this even relate to this issue?

@am1983 Some of that will need to be in an updated readme file but if you're approaching it from "how to add more " and not "how to make this work locally" then it makes sense to include it. There may be some overlap between the two files, and that's fine.

@jessetylermullins It was a mix of both, tbh. I want to give new contributors a place to go to get the instructions on setting it up and also have a discussion about how to contribute in terms of workflow. IMO, it should look something like clone, branch, "do work", test, push, PR...
I've created branch update-contributing-documentation as a place to start the work. I've added a basic outline but it definitely needs work before a PR.

I can definitely see where this technical outline should probably work itself over to the README.md.

@am1983 I would say "refer to the readme on how to set this up locally" with a link, and only pull out what's essential. The comment on clone, branch, do work, test, push, PR - that's what should be in this doc.
Refer to my comment above if you want to include those things while you're working - and we default to the Atlassian Gitflow Workflow so I would suggest referencing that as a baseline.

That sounds good, Tyler. I'll sort those changes out and spend some more
time on both the README and CONTRIBUTING files in the coming days. Let me
know if there is anything else you can think of that may be useful in those
files.
On Feb 15, 2018 4:36 PM, "Tyler Mullins"<EMAIL_ADDRESS>wrote:

@am1983 https://github.com/am1983 I would say "refer to the readme on
how to set this up locally" with a link, and only pull out what's
essential. The comment on clone, branch, do work, test, push, PR - that's
what should be in this doc.
Refer to my comment above if you want to include those things while you're
working - and we default to the Atlassian Gitflow Workflow
https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow
so I would suggest referencing that as a baseline.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/civicdata/civicdata.github.io/issues/77#issuecomment-366069660,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJQAZ0LVRuVzCQwYjEKxcOO1a0fUnFl-ks5tVKN1gaJpZM4SF4OT
.

Would love to work with you all on this.  For this repo in particular, we're actually using a simpler workflow called GitHub Flow.
We've also went an extra step and locked down the Master branch so there are no direct merges to Master, which is always deployable, before they're ready.
I suggest structuring work in a typical OSS fashion too.  So for this repo, work should be done not in branches directly on this repo by people who want to contribute.  That requires managing who is and is not part of the repo and organization too.  What we should do is a typical forktoyouraccount-branch-"do work"-test-pushtoyouraccount-PR.
Though I'm open to suggestions otherwise.

@thebouv I'm with you - not everyone should be a direct contributor. Should anyone? For instance, when I started working on this, I created a branch on our repo. Should I roll that back, fork to my account, branch, then do the work? Where do you think we should draw the line? (Just curious. I'm down for whatever, tbh).

Just an update: Life has happened. I haven't forgotten about this - I've just been over extended. If anyone else wants to jump in to help, please feel free. I'll jump in when I can.

Raising this issue back up. Can we get a basic document describing how people should contribute?


Update home.tsx

fix: typo in Home component setTimeout

Thanks for the PR! However, the use of the underscore is intentional here. They are used as numeric separators to improve readability in timeout seconds.