Filename Profil ? Error ?

Hi,
I don't really know how to use this, i use this command with windows 10 version of InstaLoader :
.\instaloader --login=######## -- -PostNumber (for specific post) &
.\instaloader --login=######## :stories --no-captions --no-metadata-json --no-compress-json --no-video-thumbnails (for stories)
Want to know 2 things, when i download post or stories, name file are only date, how to put automically name profil on file downloaded ?
And with the first command (for specific post) i can download pics/vid but  can't add --no-captions --no-metadata-json --no-compress-json --no-video-thumbnails to avoid download caption metadata..., i get error :
--no-captions: Fetching Post metadata failed.
--no-metadata-json: Fetching Post metadata failed.
--no-compress-json: Fetching Post metadata failed.
--no-video-thumbnails: Fetching Post metadata failed.

How can i this option to work with specific post download ?
Thanks in advance for your help!

@NicotherZ

how to put automically name profil on file downloaded ?

https://instaloader.github.io/basic-usage.html#filename-specification ?


chore(image): update base image

Automated changes by create-pull-request GitHub action

Codecov Report
Patch and project coverage have no change.

Comparison is base (3d19d8b) 72.94% compared to head (bb18d89) 72.94%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #371   +/-   ##
=======================================
  Coverage   72.94%   72.94%
=======================================
  Files          25       25
  Lines         743      743
=======================================
  Hits          542      542
  Misses        201      201

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

/retest

/retest

/retest


Fixing typo "Motiviation" into correct word "Motivation" in in file C…

…ontributingBestPractices.md

As mentioned earlier, since we want to keep the mistakes in the tests for other participants to use, we wouldn't be merging this PR. Hope the practice was good nevertheless 😄


Critical Mod Compatibility Issue: WorldEdit

The latest version of this mod prevents World Edit from working. Confirmed with various combinations of mods, only removing this one allowed WorldEdit to work.
This only happens when a mod that uses this one (e.g. Base Metals) is installed as well.
As I use WE extensively, this is a deal breaker for me.
I believe that the reflection hack you use has something to do with the issue.

On the mention of that, with the new loot table system in forge, the reflection hack probably isn't necessary any more.

Try v1.03p1 (or v1.05 for MC 1.9.4) and see if that fixes it.

I can confirm that WorldEdit now works. Thanks.
OT: I HATE it when a crash doesn't give enough information to figure out what caused it. I am trying to debug a creative mod crash when MC fails to render a dandelion on a creative tab with the exception "Already Building" and no mods listed in the stack trace. :angry:


BOSH randomly throws Unknown CPI error in 'create_vm' CPI (vSphere)

Recently we are frequently coming up with this annoying problem:
During bosh deploy, bosh directors calls vsphere cpi to create vm but returns such error:
Failed creating missing vms > db/ea4b553d-4d46-4960-838a-1b1236b4a821 (0): Unknown CPI error 'Unknown' with message 'Invalid configuration for device '11'.' in 'create_vm' CPI method (00:03:45)
 Failed creating missing vms > worker/ab7bb541-fa47-4c7f-b773-eb72a68cae10 (0): Unknown CPI error 'Unknown' with message 'Invalid configuration for device '11'.' in 'create_vm' CPI method (00:03:47)
 Failed creating missing vms > web/9d1b8e28-ce08-4053-9150-c6e240d34626 (0): Unknown CPI error 'Unknown' with message 'Invalid configuration for device '11'.' in 'create_vm' CPI method (00:04:11)
 Failed creating missing vms > discovery/ed59d955-be2f-45c8-a26f-d717c1d31cbb (0): Unknown CPI error 'Unknown' with message 'Invalid configuration for device '11'.' in 'create_vm' CPI method (00:04:37)
 Failed creating missing vms (00:04:37)

Such kind of problem start to appear since we added multiple datastore to vcenter.
Here is our BOSH information
$ bosh --version
BOSH 1.3232.0

$ bosh_vs status
Config
             /home/-----/.bosh_config_vsphere

Director
RSA 1024 bit CA certificates are loaded due to old openssl compatibility
  Name       bosh-lab-vsphere
  URL        https://------:25555
  Version    260.0.0 (00000000)
  User       admin
  UUID       5eca588d-4a94-4d6e-87de-e56fcccd936d
  CPI        vsphere_cpi
  dns        disabled
  compiled_package_cache disabled
  snapshots  disabled

Deployment
  Manifest   ---------------

@liuhewei did you stemcell get deleted from vsphere?

We don't delete stemcell by ourselves.
However, it is possible something is triggered unintentionally during deploy and vmdk get deleted.
By the way, this is the same issue as https://github.com/cloudfoundry-incubator/bosh-vsphere-cpi-release/issues/22

let me close this ticket then in favor of cloudfoundry-incubator/bosh-vsphere-cpi-release#22


[BUG]: Directly posting to API creates unvalid races

Description
I've encountered a bug in the web application that you can create new finished races to show up in dashboard with same snippet id by posting to 'https://code-racer-eight.vercel.app/race/practice' directly. This allows users to create multiple races by using the same snippet id.
Also system only checks if the cpm is less than or equal 10k and accuracy is less than or equal to 100. Other than that there is no validation to check the cpm and accuracy of races that have been posted. Any post using same headers allows users to create races with fake results. Steps i followed to be able to post any cpm and accuracy ratings:

Copy the valid request from the network panel of devtools by playing a random race.
Find the snippet id by refreshing the page after the snippet is loaded. (It is in the last script tag which contains self.__next_f)
Send request after changing the snippetId value to the new snippet id.

(optional) What browsers are you seeing the problem on?
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

I'll work on this


feat/Devtooling-448 oauth cred cache

Should we use this new cache map for the oauth_client export as well?

No.  I kept separate on purpose.


feat:New Home+Bookmarks Merged into Main Screen(#1499)

feat:Global Search Added along with Bookmarks added to Home Page(#1499)
First steps for issues #1499
Screenshots have been posted in the Issue itself

There are many UI duplications for what already exists. Please find the common use cases and use them instead :)

And also, avoid unnecessary changes. Format only the code you wrote. I understand that it might be hard now to revert but from next time, please keep in mind. It becomes hard to review with so many changes

Also, please squash commits

@iamareebjamal  Thank you for your review! I was meaning to change all this but lost track due to the huge code changes. Will fix them soon

This has been kept for future addition to the Search
On May 17, 2017 12:24 PM, "Areeb Jamal"<EMAIL_ADDRESS>wrote:

@iamareebjamal commented on this pull request.
In android/app/src/main/java/org/fossasia/openevent/adapters/
GlobalSearchAdapter.java
https://github.com/fossasia/open-event-android/pull/1565#discussion_r116922706
:

+import butterknife.ButterKnife;
+import io.reactivex.disposables.CompositeDisposable;

+/**

Created by Shreyas on 5/15/2017.

*/
+public class GlobalSearchAdapter extends BaseRVAdapter<Object,RecyclerView.ViewHolder>{

private Context context;
private CompositeDisposable disposable;

private List filteredResultList = new ArrayList<>();

//ViewType Constants
private final int TRACK = 0;
private final int SESSION = 1;

Please remove
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/fossasia/open-event-android/pull/1565#discussion_r116922706,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AS-BfQI2bGRX6i5e0RGW-drURIT7Cl2xks5r6pmOgaJpZM4NcaKZ
.

But the thing is there are try catch blocks within each if so I don't see
how to avoid nesting here.
On May 17, 2017 12:29 PM, "Areeb Jamal"<EMAIL_ADDRESS>wrote:

@iamareebjamal commented on this pull request.
In android/app/src/main/java/org/fossasia/openevent/fragments/
AboutFragment.java
https://github.com/fossasia/open-event-android/pull/1565#discussion_r116923394
:

   SearchManager searchManager = (SearchManager)getContext(). getSystemService(Context.SEARCH_SERVICE);

   searchView = (SearchView) menu.findItem(R.id.action_search_home).getActionView();

   // Assumes current activity is the searchable activity

   searchView.setSearchableInfo(searchManager.getSearchableInfo(getActivity().getComponentName()));

   searchView.setIconifiedByDefault(true); // Do not iconify the widget; expand it by default

}

@Override
public void onResume() {

   super.onResume();

   if (sessionsListAdapter == null) {

       return;

   }

   else{

       try {

           if (searchText != null) {

Don't do
if(blah == null) {
return;
} else {
// Do something
}
This is still nesting
Please do this instead:
if(blah == null)
return;
// Do something
It automatically is the else condition
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/fossasia/open-event-android/pull/1565#pullrequestreview-38583452,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AS-BfVQn0FIG8-7rDKq2ijvEQOIbrqscks5r6pq0gaJpZM4NcaKZ
.

Please look at this
https://hastebin.com/durufecofa.java

Oh I see nice!
On May 17, 2017 12:54 PM, "Areeb Jamal"<EMAIL_ADDRESS>wrote:
Please look at this
https://hastebin.com/durufecofa.java
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/fossasia/open-event-android/pull/1565#issuecomment-302008194,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AS-BfYZg_dfxVCmHLBwDoLaaaxkUpuSrks5r6qCrgaJpZM4NcaKZ
.

@iamareebjamal @mananwason All requested changes have been done. l don't think that anything else is needed. Do review.

@mananwason Please review this PR so that it doesn't go old. The older the PR gets the harder it would be for me to solve merge conflicts and other issues.

@iamareebjamal Reqd changes have been done. Please review. I don't want to maintain this PR for very long.

@shreyasnbhat Please be patient. PRs with these much changes are generally hard to maintain but also hard to merge. Everyone should align to an agreed solution, only then we can move forward
If there are disagreements between viewpoints of several users, we must find a common ground. We can't just accept one's view and press it on others.
I will pull the request and remove conflicts and reduce the changes so that we can iterate on it faster

@iamareebjamal I was just saying! I would want others to put in their views but that isn't happening.
And I'll be more patient.
Thanks!

Currently, almost everyone is having exams, so that is understandable

@iamareebjamal Yeah that's understandable.

@shreyasnbhat i suggest you should have done this work in separate prs because this one is large and changing it again and again can become frustrating. also my implementation of getting distinct orgs and country is not getting affected so thats not a problem.

@iamareebjamal Shall I resolve the conflicts and update the PR?

Yes please do, I wasn't able to look into it because of exams. Once you do, I'll try it and give more suggestions

@iamareebjamal I have removed the bookmarks tab in my PR. So in the MainActivity both the conflicts involve R.nav_bookmarks.Could you help me out in resolving these As i feel that those lines of code should be removed.

Currently, I am a little busy as I have my exam tomorrow, but if I get some time, I'll take a look
What you can try though is test by removing them and building, and if it fails, add them again
I know it's hit and try but works

@iamareebjamal That's fine. I have fixed the conflicts but now I can't squash my commits easily as they have aren't back to back. I'll keep it like this for now.
If there is an easy way to squash commits which are not back to back do tell me.

@shreyasnbhat Read this

@iamareebjamal Now I have reordered the commits to the top but when i do
git rebase -i HEAD~2 it doesn't show me these 2 commits but shows some of the earlier ones and lot more than 2 commits.

@shreyasnbhat You should have ordered them in bottom, not on top
I'll try to take a look in the evening

@iamareebjamal I'll fix the conflict in MainActivity soon. Then you could review.

@iamareebjamal I guess i'll have to change the search logic too now right?

Witch realm, it is easier. Wait, I'm taking a look

@iamareebjamal Shall I refactor the search? Now the search could be a bit more powerful than earlier as now we could use built in search functions

Yeah @shreyasnbhat. Sure. That was what I meant about it being easier

@iamareebjamal
public void addResultsFromTracks(String queryString) {

        List<Track> filteredTracks = realm.copyFromRealm(RealmDataRepository.getInstance(realm)
                .getTracksFiltered(queryString));
        results.addAll(filteredTracks);
        globalSearchAdapter.notifyDataSetChanged();
        Timber.d("Filtering done total results %d", filteredTracks.size());
    }

    public void addResultsFromSpeakers(String queryString) {

        List<Speaker> filteredSpeakers = realm.copyFromRealm(realmRepo.getSpeakersFiltered(queryString, Speaker.NAME));
        results.addAll(filteredSpeakers);
        globalSearchAdapter.notifyDataSetChanged();
        Timber.d("Filtering done total results %d", filteredSpeakers.size());
    }

    public void addResultsFromLocations(String queryString) {

        RealmResults<Microlocation> locations = realmRepo.getLocationsSync();

        List<Microlocation> filteredMicrolocationList = Observable.fromIterable(locations)
                .filter(new Predicate<Microlocation>() {
                    @Override
                    public boolean test(@NonNull Microlocation microlocation) throws Exception {
                        return microlocation.getName()
                                .toLowerCase(Locale.getDefault())
                                .contains(queryString);
                    }
                }).toList().blockingGet();
        results.addAll(filteredMicrolocationList);
        globalSearchAdapter.notifyDataSetChanged();
        Timber.d("Filtering done total results %d", filteredMicrolocationList.size());

    }

Just check this out. This is giving me a slow search. Any suggestions?

copyFromRealm is extremely slow. Avoid using it please

@iamareebjamal But all the filters of Adapters are using copyFromRealm so what do you suggest I use?

I know. This part was pain in the neck for me. Realm objects are not thread safe so you can't touch them inside filter without copying from realm, and copying is really slow. For now, I'd say that you let the query be slow. I'm implementing a new Adapter which will not require filter to search and will have a better API for searching, but it will take time

@iamareebjamal  I am using findAllSortedAsync() as of now and I am using RealmResults directly. And I am getting pretty good search speeds now. Shall I update the PR?

Sure @shreyasnbhat

Will remove the unused imports soon.

@iamareebjamal @the-dagger @arp95 @mahikaw Do review!

@iamareebjamal I guess all the necessary changes have been done. Do review it now.

@iamareebjamal I have fixed conflicts till the latest commit. Please review.

@shreyasnbhat I have sent a PR to your fork doing some standard changes. Let's discuss there and get this merged

@iamareebjamal  Checking it out now.

@iamareebjamal  I have merged your PR. I guess now it can be merged after a final review?

@iamareebjamal  DO NOT MERGE THIS NOW.
I got an error during my second run of the app.
                  Process: org.fossasia.openevent, PID: 19772
                  java.lang.IllegalStateException: Object is no longer managed by Realm. Has it been deleted?
                      at io.realm.internal.InvalidRow.getStubException(InvalidRow.java:183)
                      at io.realm.internal.InvalidRow.getString(InvalidRow.java:89)
                      at io.realm.EventRealmProxy.realmGet$startTime(EventRealmProxy.java:390)
                      at org.fossasia.openevent.data.Event.getStartTime(Event.java:152)
                      at org.fossasia.openevent.fragments.AboutFragment.loadEvent(AboutFragment.java:129)
                      at org.fossasia.openevent.fragments.AboutFragment.lambda$onViewCreated$0(AboutFragment.java:122)
                      at org.fossasia.openevent.fragments.AboutFragment$$Lambda$1.onChange(Unknown Source)
                      at io.realm.ProxyState$RealmChangeListenerWrapper.onChange(ProxyState.java:46)
                      at io.realm.internal.OsObject$ObjectObserverPair.onChange(OsObject.java:67)
                      at io.realm.ProxyState$QueryCallback.onCalled(ProxyState.java:66)
                      at io.realm.ProxyState$QueryCallback.onCalled(ProxyState.java:61)
                      at io.realm.internal.ObserverPairList.foreach(ObserverPairList.java:108)
                      at io.realm.ProxyState.notifyQueryFinished(ProxyState.java:127)
                      at io.realm.ProxyState.onQueryFinished(ProxyState.java:194)
                      at io.realm.internal.PendingRow.notifyFrontEnd(PendingRow.java:240)
                      at io.realm.internal.PendingRow.access$000(PendingRow.java:18)
                      at io.realm.internal.PendingRow$1.onChange(PendingRow.java:46)
                      at io.realm.internal.PendingRow$1.onChange(PendingRow.java:43)
                      at io.realm.internal.Collection$RealmChangeListenerWrapper.onChange(Collection.java:65)
                      at io.realm.internal.Collection$CollectionObserverPair.onChange(Collection.java:46)
                      at io.realm.internal.Collection$Callback.onCalled(Collection.java:90)
                      at io.realm.internal.Collection$Callback.onCalled(Collection.java:80)
                      at io.realm.internal.ObserverPairList.foreach(ObserverPairList.java:108)
                      at io.realm.internal.Collection.notifyChangeListeners(Collection.java:531)
                      at android.os.MessageQueue.nativePollOnce(Native Method)
                      at android.os.MessageQueue.next(MessageQueue.java:323)
                      at android.os.Looper.loop(Looper.java:136)
                      at android.app.ActivityThread.main(ActivityThread.java:6126)
                      at java.lang.reflect.Method.invoke(Native Method)
                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

@shreyasnbhat This is a weird bug in Realm

@iamareebjamal I guess if we update our app from an older commit it works fine. But if we do a fresh install in this commit we get the above errors. I think that there might be some problem with realm with this commit. Just check it out.

Sure

And I feel that we could move the floor into a circle similar to tracks.
For example we have Annexe Hall(Ground Floor) Floor:1
We could have a CircularDrawable containing the number one. And then have Annexe Hall(Ground Floor) written next to it. @iamareebjamal What do you think? This would make all ViewHolders uniform.

I think we should stick with this commit for now. Weird bugs start creeping in when changes are huge :stuck_out_tongue:

Yeah I guess
On Jun 8, 2017 10:30 AM, "Areeb Jamal"<EMAIL_ADDRESS>wrote:

I think we should stick with this commit for now. Weird bugs start
creeping in when changes are huge 😛
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/fossasia/open-event-android/pull/1565#issuecomment-306998871,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AS-BfeghGL0LzwYP-mAcPT_6uVKOmvnEks5sB4AIgaJpZM4NcaKZ
.

@iamareebjamal I guess then this is ready for merge.
@the-dagger @arp95 @mahikaw Please review.

@shreyasnbhat I guess Realm error was still there. Let's wait till we solve it

@iamareebjamal Yeah sure. What do you think the real problem is? It basically says that Realm doesn't have the stuff it needs to populate the fields in the MainActivity right?

The same error was happening in case I was fetching Event in MainActivity, because of it, I had to fetch event synchronously

@iamareebjamal Why is it coming up now?Just a fragment was swapped. Weird bug.

Fixed.
@shreyasnbhat Because first, MainActivity was the first to load Event, and now AboutFragment is. Realm throws invalid RealmObject the first time it gets queried, and also, it does not notify the first time it gets created, that's why I loaded event synchronously in MainActivity

@iamareebjamal Ah I see. Great Work anyways!

@arp95 @mahikaw @the-dagger  @Shailesh351 Please review. It becomes cumbersome for me to fix merge conflicts again and again. Do review this ASAP.

@iamareebjamal I have updated the PR and fixed the conflicts. Do review.

Yes please @shreyasnbhat

Sorry for the delay. @shreyasnbhat Tested your PR. Great work!!!
Currently

Requires more number of clicks for searching through out app.

User clicks on search button -> Enters string -> new activity opens
now if user want to search for other string it is again requiring user to click on search button from action bar.

Headers are being displayed even if there is no results for it
example : if result of string is 0 Tracks , some speakers , 0 Locations then Tracks and Locations headers are still visible.

In my opinion it will look good and give better user experience if

Move search app option from action bar to navigation drawer (Like udacity intersect app)
In Home fragment we can show bookmarked sessions vertically
For Event and organiser info we can set onclick listener on header view in navigation drawer where logo is being displayed

@Shailesh351 If we show bookmarks vertically, it'll essentially become a bookmark fragment and about the  event and organiser info, well, that's what home fragment is for. So hiding it won't make sense

@Shailesh351 I think point 1 is how the default search behavior is implemented by Google. So I guess I can't do much about that.
It's like if you want to search some thing you are directed to a page where you get you results directly. If you want to search more he/she could. So this seems reasonable to me.
Technically it is only 2 clicks for the first search then one-click and the search gets updated as you type.
And for 2 I couldn't figure something out to do that. As results are fetched Asynchronously I can't determine if the size of the RealmResult is zero or not before. I'll give it another shot and try.
For the next 3 points you raise.
1)This could be done. But adding a Search nav-item seems unnecessary to me.
2)Firstly, I plan to refactor the Bookmarks in future PR's. For eg. Date-wise listing of bookmarks.
And vertically I think we shouldn't do we the current ViewHolder as it is very big a takes up too much space. Take this case. If a user bookmarks 30 Sessions he/she would have to scroll down a lot to view some detail such as Event date/description etc.
3)That is not true exactly. If we add bookmarks we do see the Bookmarks in the AboutFragment along with the description which goes below the bookmarks.

@iamareebjamal Some help in point 2 raised by Shailesh?

@Shailesh351 Issue2 is fixed now.

@shreyasnbhat I recommend splitting up larger issues/PRs into smaller commits where-ever possible to make reviews easier and faster next time.

@mariobehling I'll keep that in mind next time.

@iamareebjamal @Shailesh351 I guess all Issues which could be fixed have been fixed now. Please review for merging.

@iamareebjamal @shreyasnbhat Will it be good to show event and organiser info every time user opens app?
Currently we are showing organiser description from About us nav item. IMO it will be better to show event and organiser info on clicking this  About  item.

And for search feature in my opinion  it will give better user experience if we move it to Navigation drawer like Udacity intersect app,  user can just click on search and start typing string he/she wants to search.

@the-dagger @mananwason @mariobehling @iamareebjamal ?

@Shailesh351 The concept of Home Fragment was to show the event info. And rest assured that the complete info is not shown yet and there is much more to be added, like background images, some highlighted speakers, etc.
Furthermore, this PR is related to global search and merging of bookmark fragment in home. The home fragment existed prior to it and can be modified as seen fit in future. The question is if the implementation of the requested feature listed in the issue fulfilled in the PR

@Shailesh351 I think we should build the app iteratively. At the time of creation of issue, a feature is drafted and approved. If we dynamically keep changing the design requirements, PRs will never get merged. If we have an idea of better implementation, let's create an issue and get it approved. It's just my 2 cents. If we keep demanding new, albeit better things at the last day of PRs, they will definitely become blcoked

Sorry for the inconvenience guys. We will move further.
@iamareebjamal Just for checking are you facing this issue  ?
java.lang.IllegalStateException: Object is no longer managed by Realm. Has it been deleted?                                                                             at io.realm.internal.InvalidRow.getStubException(InvalidRow.java:183)                                                                             at io.realm.internal.InvalidRow.getString(InvalidRow.java:89)                                                                             at io.realm.EventRealmProxy.realmGet$startTime(EventRealmProxy.java:390)                                                                             at org.fossasia.openevent.data.Event.getStartTime(Event.java:152)                                                                             at org.fossasia.openevent.fragments.AboutFragment.loadEvent(AboutFragment.java:124)                                                                             at org.fossasia.openevent.fragments.AboutFragment.lambda$onViewCreated$0(AboutFragment.java:117)
i am facing it while running. so not able to test.

@Shailesh351 No problem man :)
About the error,
This should have been fixed by my latest commit. Are you doing a fresh install?
Will check

OK. Could have been changed by date fixes.  But as far as I remember while doing a rebase I had to fix merge conflicts with your commit too. I don't know how did it vanish? I am extremely sorry for this.

Only the synchronization one was overwritten. I have re-added it

@Shailesh351 Please review now

@iamareebjamal @shreyasnbhat Still facing same issue. I have uninstalled app and reinstalled.
May be app is crashing because of event is not loaded fully and you are using event.startTime.
Please have a look.

@iamareebjamal I guess what is done currently is we are calling the getEvent() function and adding a onChangeListener. We aren't using getEventSync() yet. Shouldn't we be using that?

@shreyasnbhat @Shailesh351 i just faced the same issue and opened the same issue right now.
on uninstalling app is crashing and it is due to the event dates which are not being loaded.

is it due to realm taking time to fetch data sometimes?

Can you tell the case where it is failing @arp95 ?

@arp95 The new issue of offline loading is due to the JSONs not being updated to the new format of time. Please reopen the issue

@iamareebjamal actually the app on first time install in offline mode crashes. On seeing the log it is due to the event dates being null.
Now the event json file has the start time and end time, i think realm is causing this. What do you think?

Please refer to #1691

@Shailesh351 Did you get that error for offline as @arp95 said or for online download of event?

@shreyasnbhat ctually the app on first time install in offline mode crashes

@Shailesh351 Can you confirm that happens when app is online?

Somehow the changes I made are gone again. Really strange. Fixing it again

@arp95 @Shailesh351 @shreyasnbhat Please review before the changes disappear again
Please test online only as offline one is fixed in #1691

@iamareebjamal Works fine now!

@shreyasnbhat This layout is violating the UI guidelines for card layouts by Google. Card layouts are NEVER used with horizontal scrolls.
At first, when I opened the new UI, I was unable to understand why only one session was showing up, after which I realised that there was a horizontal scroll.
I would suggest to use a vertical list view, similar to schedule fragment to display the bookmarked sessions. This will make it more clean and intuitive.
@the-dagger @niranjan94 @mananwason @arp95 @Shailesh351 Please give in your suggestions.

@mahikaw Just read the above comments. Areeb has also clarified why a horizontal list makes more sense.
And many apps use horizontal scrolling. If we see the facebook cards of friend suggestions it is a horizontal list. It wouldn't make sense to have friends suggestions in our feed as a vertical list right?  And in the Google Play Store all apps belonging to a category is also a horizontal list with apps as cards.
And I guess Peer Reviews are to be done before a PR gets merged. So next time please add in your thoughts before a PR is merged.
I'll be refactoring the UI later on. For sure as the current UI isn't quite ideal but it fulfilled the purpose of the issue raised.

@shreyasnbhat Yes, I agree that I have missed out on some issues here as I was busy with the samples but please consider my inputs as they do sense and are for the betterment of the project only.
As for the comments above,

I want to say that it doesn't matter if it becomes similar to bookmarks fragment as long as it is intuitive. We could perhaps remove the bookmarks fragment as suggested by you in #1697

As for the example about, 25-30 bookmarks given by you above, I think it will be more difficult to scroll through the horizontal scroll as it is showing just one session at a time. The user will have to scroll 30 times, in that case.

Both play store and facebook have multiple cards on the screen at a time, which is still understandable. Friend requests are shown randomly in between our feed and it too has an option to go the complete list there(which is a vertical layout).
Same is the case with play store.

The horizontal scrolls used in these 2 apps that you mentioned are used just to give a short and quick insight into the topic at hand. They all eventually lead to vertical layouts. In our case we have to show all the bookmarks in detail.
I would request you to refer to this link. This will hopefully make whatever I am trying to say more clear
https://material.io/guidelines/components/cards.html#cards-behavior
Finally, please keep this in mind, when re-designing the UI. The current UI seems pretty confusing and counter-intuitive.

@mahikaw This issue wasn't UI focused. I will be taking that up in a separate Issue. As I said we could have a datewise vertical list using the ScheduleViewHolder. This seems  the most optimal way to convert it into a vertical list. The thing is that this PR was sent like 25-30 days back have accepted multiple changes over the month. If you would've suggested this earlier I might have also done some UI improvement. Anyways from next time keep in mind to review big PR's first.

Yes, that's all I am saying. Please keep in mind the guidelines when re-designing the UI. I am sure you will come up with something great and much more intuitive. Infact, if you want you can open up an issue right away and start working on it.
And yeah, I have skipped some issues earlier due to my samples work and found out this PR only after it was merged. I will try not to repeat that again 👍


Map darkens when zooming in and tiles are loaded

Describe the bug
Map darkens when zooming in and tiles are loaded
To Reproduce
Steps to reproduce the behavior:

Use the MapTiler Basic style
Zoom into a new area

Expected behavior
The map does not get a sudden dark overlay when zooming in.
Screenshots
https://github.com/maplibre/maplibre-native/assets/649392/4930a919-0586-4c62-b33f-85d669362dfa
Platform information (please complete the following information):

OS: Android
Version: 11-pre4 (Drawable Renderer, release build)
Device: Samsung S10

Additional context

Here is the legacy renderer
https://github.com/maplibre/maplibre-native/assets/649392/8b4100dd-1f5d-4099-8102-aa61130255d4

I did a bisect and found that the problem starts with https://github.com/maplibre/maplibre-native/pull/1871


Why data female voice but got result is male voice?

I have trained End to End model with tacotron2 and waveglow. I used 25 hours of female voice for train both tacotron2 model and waveglow model.  The sampling rate of training data is 22050 hz.
At the checkpoint_87000(epoch 398) of tacotron2 and at waveglow_98000(epoch20) I have got result voice is male while training voice is female. Could you please help me to explain this problems and fix it.
Thank you so much!

Did you feed in a male's mel-spec? The data you used to train is female, however, if you use male's mel-spec to do inference, you will get a male's voice.

I have trained End to End model with tacotron2 and waveglow. I used 25 hours of female voice for train both tacotron2 model and waveglow model. The sampling rate of training data is 22050 hz.
At the checkpoint_87000(epoch 398) of tacotron2 and at waveglow_98000(epoch20) I have got result voice is male while training voice is female. Could you please help me to explain this problems and fix it.
Thank you so much!

Check for melspectrogram feature extraction of tacotron and waveglow. These must match.
You can also check for your tacotron quality by using Griffin Lim to generate wav from your predicted mels.

Closing due to inactivity.

Did you feed in a male's mel-spec?


Login Migration Pre Validation Changes

Added a new Pre validation dialog that performs the below validations before proceeding to migration. This reduces all the migrations failures that customers are facing today and pre validated beforehand to avoid migration failures and increase the successful migrations.

Validate Sys admin validation- Validates the Sys Admin permission for source and target connection
Validate Entra ID - Validates the Entra ID entered for windows login migration
Validate user mapping -
Validates the User mapping FOR Target DB existence
Target DB user existence
Target DB user with same SID existence

Testing (https://microsoftapc-my.sharepoint.com/:w:/g/personal/bhavikshah_microsoft_com/ER_jJ3YqZXtCoKOfZS4EXRMBY6bvOEGbPP97ltlvS4MNew?e=fawvcw)

Select logins to run validation
Perform validation to run migration
Sysadmin validation: Source doesn't have permissions, but Target has permissions
Sysadmin validation: Source has permission, but Target doesn't have permissions
Sysadmin validation: Source and Target both doesn't have permissions
Entra id validation: Incorrect format
User Mapping: Database not found
User Mapping: Database found but user not found
User Mapping: Database found, user found but userid does not match
Happy path

Pull Request Test Coverage Report for Build<PHONE_NUMBER>4
Details

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

Totals

Change from base Build<PHONE_NUMBER>4:
0.002%

Covered Lines:
30731

Relevant Lines:
68921

💛  - Coveralls


[Question] How do I add the .bash_aliases and .bashrc files in chromeOS?

For example, I've moved my chroot precise to /media/removable/laizureboi/precise and I don't want to have to type sudo startxfce4 -c /media/removable/laizureboi/precise every time I want to start my environment. I've added alias s-xfce4='sudo startxfce4 -c /media/removable/laizureboi' to the .bash_aliases file, and it's in the Downloads folder... But it doesn't work. I'm assuming this means that it's not in the correct spot - could someone nudge me in the right direction? Where should I move the file?
Thanks!

Do the aliases in your ~/.bashrc

As @tonyxue mentioned, put your alias assignments in your ~/.bashrc file.
Or, if you have many, put them in a ~./.bash_aliases file and use something like this in your ~/.bashrc file -
[ -f ~/.bash_aliases ] && . ~/.bash_aliases


Malduino not running scripts (Red light is flashing)

I have flashed my new malduino elite that I got and it will not run the scripts for me at all. I have tried 2 different SD cards: 1 was a the 64GB samsung evo class 10 card formatted to exFAT because it wont format to FAT 32 due to the size, The other is a standard micro SD , again a class 10 card,(sandisk? i think) which is formatted to 16 GB FAT32. I have tried flashing it multiple times on my main pc and laptop and still no dice. Tried seytonics video and then tried the wiki way and neither worked for me. The USB is being recognised when inserted that much I do know. I tried increasing the delay to 5000 at the start and it still didn't run. Any help would be appreciated.
P.S. The files I saved onto it were txt files and were named "0000" , "0010" and a bunch of other switches I tried.
OS: windows 10 on both machines. keyboard layout is also UK

Turns out it was because both cards were class 10. Always use less than a class 10. A class 4 worked for me


cmd/go: go build does not reject importing commands

% echo $GOPATH
/tmp/foo
% pwd
/tmp/foo/src/y
% cat main.go
package main
import (
	"fmt"
	xmain "x"
)

func main() {
	fmt.Printf("y main called\n")
	xmain.Main()
}
% cat ../x/main.go
package main
import (
	"fmt"
)

func main() {
	Main()
}

func Main() {
	fmt.Printf("x main called\n")
}

% go build
% y
y main called
x main called
% go install
% go build
# y
./main.go:4: can't find import: "x"
% go install
% rm $GOPATH/bin/y
% go build
# y
./main.go:4: can't find import: "x"
% rm -r $GOPATH/pkg
rm: cannot remove `/tmp/foo/pkg': No such file or directory
% rm $GOPATH/bin/x
% go build
%

It looks as if go build is treating the x binary as a valid prerequisite for the build
of y, which it is not.

Perhaps the build process should take into account the fact that main packages can
compile to both archives and executables.

I'm curious -- what has changed since https://golang.org/cl/4126053?  It seems like the intent of that change was to allow what https://golang.org/cl/10925 is now disallowing.

CL 4126053 is a change to the spec, which describes the language.  The language permits importing a package named main.  That can be used, for example, when writing unit tests for functions in commands that use package main.
This issue here is about the go tool, not the language.  The question is whether the go tool should permit packages to import a package that defines a command.  The general consensus is that it should not.

Got it.  Thanks.

FWIW, this "fixing" commit just made cleanly writing multicall binaries (i.e. Busybox, Toybox, git, etc) take more work, whereas prior to this it was extremely simple.

@extemporalgenome what kind of stuff broke? Can you provide more details?

@adg I've put together a minimal representative example (and explanation in the README) at https://github.com/extemporalgenome/multicall-example

I see, thanks for the thorough example.
I guess the main question is whether the brevity benefit in the minority case is worth the conceptual overhead of encoding what it means for a 'package main' to be importable. The Go tool, at least, is not equipped to deal with this properly.
I'm feeling ambivalent about it. :-/

Indeed. The main points: 1) There is at least one additional legitimate need for which importing main is strictly the simplest/shortest approach. 2) Preventing import of main isn't a direct solution to #4210 --  it merely makes the cause of #4210 impossible. A direct fix seems plausible (make the go tool aware of the difference between binaries and archives), thus I'd argue that the toolchain transparently could become well equipped to deal with these matters properly.
(Oddly enough, #4210 has never affected me -- only the commit closing #4210 will affect me).
If the toolchain change remains in place or is explicitly re-ordained, it needs to be addressed in the specification. The spec currently doesn't have any "Implementation restriction:" notes that allow the toolchain to prohibit imports of main, thus with this change, the toolchain at best supports only a subset of the [current] language.
That said, the previously mentioned CL 4126053 removed a yet-earlier language-level prohibition of such imports. Since the official toolchain is, clearly, the canonical Go implementation, toolchain changes of this nature are defacto language changes, thus this would be a defacto reversal of the prior consensus reached in the codereview 4126053.
I would personally be fully satisfied if all the LGTM's from 4126053 also put LGTM's on CL 10925, though I can't speak for @kevinwallace, who also has the same use-case as I do, and would also need to reorganize code if Ian's commit sticks through to the 1.5 release.
Additionally/alternatively, I will be at GopherCon (including the optional days), and will happily demonstrate my counter-case; if informed consensus occurs in either direction, I will of course graciously yield.

FWIW, my code has already been reorganized to work around this, and while I would be happy to see an outcome that allows importing of main packages, I'm not particularly attached to that outcome at this point.


Incorrect door logs when holding id second hand

Description
Interacting with doors and lockers while holding ID in not active hand results in logging your PDA slot id (UNKNOWN if no id is present).
Reproduction

Hold id in hand.
Switch hands.
Open door/locker by clicking or pressing E.
Enjoy opening it and leaving no evidence for detective.

Screenshots
https://github.com/user-attachments/assets/a7974c68-8c6e-4b97-ac30-dbd8dacc20cb

Does throwing IDs/PDAs at doors also cause this? Cause I reckon IDs and PDAs do not have hands either.

Does throwing(literally) IDs/PDAs at doors also cause this? Cause I reckon IDs and PDAs do not have hands either.

Throwing results in correct ID log that is being thrown at the door.


some minor command line typeos

thanks 👍

:) I have some feature requests coming your way soon. I'll open git issues for them. and if I'm really ambitious, some pr's.


Add README.md file

Issue: No README.md file
Description: CONTRIBUTING.md file should be added to the project to guide developers on how to contribute effectively. This file should include:

Steps to fork the repository
Instructions for setting up the development environment
Guidelines for submitting issues and pull requests
Coding style and best practices
Information on how to run tests (if applicable)
Code of conduct for contributors

Kindly assign this issue to me with the gssoc-extd label so that I can start working on it.

@Nandini-13 Please assign me this issue, if this is a part of GSSoC-Ext

@Nandini-13 @Muskan-bhatt249 this issue has already been done by someone else look for some new issue

i did this issue but i want to say i asked to tag it under gssoc and that  did not happen


Tweak validation of backuptarget URL.

https://github.com/longhorn/longhorn/issues/6608
Accept NFS mount options as a query appended to the backup target URL.
Confine the check for bogus characters "," and "$" to the URL path, not the whole string.
Can be separable from the vendor update to be done after backupstore is merged.

@james-munson Please resolve the conflict.

@mergify backport v1.5.x


Allow PHP 8 & provide missing ViewableData use

There doesn't seem to be any code that would break under PHP 8.
Also, MessageBoxField referenced ViewableData (not fully qualified) without a use statement.

Hello @oddnoc
Thank you! Looks good, I've merged it and tagged a release.
Cheers,
Peter


Mounted Combat not working as intended

When having the feat 'Mounted Combat' there is no save each turn to save the mount from damage. I don't know if the save is not happening or just not showing in the combat log.
Disabling this mod brings the save back.

That's a good catch. I'll have to investigate.

Hi, apologies to bother, but has any progress been made on this issue? Being able to mount immediately in fights that start in a cutscene is useful, but not being able to actually utilize the Mounted Combat feat is a rather harsh tradeoff, to the point where I have been turning off the mod.


Hi, how to deal with one-channel(i mean gray scale) images with SRGAN's network?

@CaptainEven change the in channel of the network to 1, and other misc

Hi, i changed input channels from 3 to 1 in   Generator and Discriminator but an error occured like this:  File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\container.py", line 67, in forward
input = module(input)
File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 325, in call
result = self.forward(*input, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\conv.py", line 277, in forward
self.padding, self.dilation, self.groups)
File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\functional.py", line 90, in conv2d
return f(input, weight, bias)
RuntimeError: Given groups=1, weight[64, 3, 3, 3], so expected input[8, 1, 88, 88] to have 3 channels, but got 1 channels instead
got any idea or suggestion?

@CaptainEven Because you only change that, you should also change other misc, not just only there, you should change the image preprocessing code, visualization code, some save image code and PSNR computation code, etc.

In data_utils.py simply add .convert('RGB') to convert a grayscale image to RGB and add three channels. It is a built-in function in PIL.
class TrainDatasetFromFolder(Dataset):
def init(self, dataset_dir, crop_size, upscale_factor):
super(TrainDatasetFromFolder, self).init()
self.image_filenames = [join(dataset_dir, x) for x in listdir(dataset_dir) if is_image_file(x)]
crop_size = calculate_valid_crop_size(crop_size, upscale_factor)
self.hr_transform = train_hr_transform(crop_size)
self.lr_transform = train_lr_transform(crop_size, upscale_factor)
def __getitem__(self, index):
    hr_image = self.hr_transform(Image.open(self.image_filenames[index]).convert('RGB'))
    lr_image = self.lr_transform(hr_image)
    return lr_image, hr_image

def __len__(self):
    return len(self.image_filenames)

class ValDatasetFromFolder(Dataset):
def init(self, dataset_dir, upscale_factor):
super(ValDatasetFromFolder, self).init()
self.upscale_factor = upscale_factor
self.image_filenames = [join(dataset_dir, x) for x in listdir(dataset_dir) if is_image_file(x)]
def __getitem__(self, index):
    hr_image = Image.open(self.image_filenames[index]).convert('RGB')
    w, h = hr_image.size
    crop_size = calculate_valid_crop_size(min(w, h), self.upscale_factor)
    lr_scale = Resize(crop_size // self.upscale_factor, interpolation=Image.BICUBIC)
    hr_scale = Resize(crop_size, interpolation=Image.BICUBIC)
    hr_image = CenterCrop(crop_size)(hr_image)
    lr_image = lr_scale(hr_image)
    hr_restore_img = hr_scale(lr_image)
    return ToTensor()(lr_image), ToTensor()(hr_restore_img), ToTensor()(hr_image)


[$250] Dupe detect - Paid expense appears in Review duplicates flow but unable to complete the flow

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 9.0.13-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Action Performed:

Go to staging.new.expensify.com
Go to workspace chat
Submit an expense
Pay the expense
Submit another two same expenses (same amount, date and merchant) as expense from Step 3
Go to transaction thread of any of the submitted expense from Step 5
Click Review duplicates
Click Keep this one on the paid expense (from Step 4)
Click Confirm
Note that the other two expenses are not removed
Go to transaction thread of any of the submitted expense from Step 5
Click Review duplicates
Click Keep this one on any of the unpaid expense (from Step 5)
Click Confirm
Note that the process fails and Review duplicates button reappears

Expected Result:
In Step 8, the paid expense should not appear in Review duplicates flow if we cannot keep only the paid one (Step 10)
Actual Result:
In Step 8, the paid expense appears in Review duplicates flow and we cannot keep only the paid one (Step 10)
We also cannot keep only the unpaid one (Step 15) after attempting to keep only the paid expense
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/user-attachments/assets/731d19e9-7c4a-4897-a442-db366f5e4dda
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01add0c19e8ce4b462
Upwork Job ID:<PHONE_NUMBER>389694342
Last Price Increase: 2024-08-05

We think that this bug might be related to #wave-collect - Release 2

@zanyrenney  FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

adding external and to project

Hey there @parasharrajat please can you review the proposals above and let me know if we can move forward with either of these.

Looks like we are returning transactions from other reports as well.

Not overdue, already commented above.

Looking for some help here. Are transactions from other reports expected to show up on the review duplicates page?

Yes, that's the core design of the feature, showing duplicates no matter whether they are on the same report or not. cc @trjExpensify

That's a good question. I think dupes do get flagged on approved and paid reports, but perhaps @pecanoro can confirm. I'm unsure how that's supposed to technically work today on OldDot when it comes to merging expenses and deleting (potentially) a dupe on an approved/paid report? 🤔

@pecanoro can you confirm? I would be surprised if we are ignoring an expense that an admin has paid, which has the same date and amount that someone has just potentially re-submitting, though that scenario also creates problems in itself, since to @trjExpensify's point, you can't merge a paid/approved expense.

I need to test this on oldDot tomorrow. We don't compute violations on approved and paid reports, but I am not really sure if, when trying to find duplicates from an expense on an open report, we flag paid expenses as potential duplicates.

Hey @pecanoro I'm just following up on this one if you managed to test it on olddot so we can move ahead here? Thanks!

In oldDot, it also gets flagged if there is an expense in a reimbursed report. But the one in the open report is the one that gets flagged:

But this is the difference, you can't merge them if one of them is in an approved or reimbursed report, you can only click ignore to dismiss the violation:

My opunion is that we should only leave the Keep All option and show a similar message to the one in oldDot to let them know they have to be in open or submitted reports. But @JmillsExpensify and @trjExpensify probably have a opinion that makes more sense form the design point of view

My opunion is that we should only leave the Keep All option and show a similar message to the one in oldDot to let them know they have to be in open or submitted reports

I was thinking the same, so like:

Yeah, to Rocio's point:

But the one in the open report is the one that gets flagged:

The duplicate violations doesn't show on the expense on the approved / reimbursed report.

Thank you for confirming the expected behavior. So we want to have

We do not want to display duplicate violations for approved/reimbursed expenses.
Instead, we should display a message under the Keep All button indicating that some duplicates have already been approved or reimbursed. And we want to get rid of the keep this one option completely from UI.

@nyomanjyotisa @daledah, can you please update the proposal accordingly? Thanks.

A minor improvement to point 2 would be that the keep this one will be hidden on paid or approved expenses only. Imagine there are 3 duplicates on the review screen and one of them is approved so that one will not have keep this one button.

Make sense 👍

We can't filter paid expenses though, because this is the core feature (preventing expenses that have been paid already from being paid twice). If we are ignoring the paid expenses on Keep all and then no showing Keep this one on paid expenses, then we don't need a backend change, right?

TY @parasharrajat! @daledah when can we expect a PR ready for review?

Sorry, I was on vacation. I thought we were going to simply not allow to resolve duplicates if one of them was in a paid report as we mentioned here, so I am not sure if I understand your question.

No, the only option would be Keep All

Yes, approved and paid!

@daledah bump on this:

OK. Got it. Thanks for the clarification. @daledah, it looks like there is a small divergence from what we implemented on the PR.

Could you please hide keep this one button when there are any paid expenses in the duplicate? Thus only keep All will function.

It has been more than 2 weeks since the PR has hit production. I think we can move with the payment here. cc @zanyrenney, thanks.

Seems like the automation is still failing.

payment summary
$250 for @parasharrajat can be requested through ND.
$250 for @daledah needs to be paid through upwork.
@daledah can you apply to the job please?

@daledah still hasn't applied to the job,.

Hey @daledah offer sent!!

payment summary
$250 for @parasharrajat can be requested through ND.
$250 for @daledah needs to be paid through upwork. PAID

$250 approved for @parasharrajat


python37Packages.onnx libstdc++.so.6: version `GLIBCXX_3.4.26' not found

Hi, I am using the unstable branch.
When I try to import the onnx package in Python, I get the following error.
>>> import onnx
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/nix/store/ln8r1m11ypy3a642g4vab9c06mqmpsdn-python3.7-onnx-1.7.0/lib/python3.7/site-packages/onnx/__init__.py", line 8, in <module>
    from .onnx_cpp2py_export import ONNX_ML
ImportError: /nix/store/6qx8ijrs82bnq60vp09pv46mdx4rnq9d-gcc-7.5.0-lib/lib/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /nix/store/ln8r1m11ypy3a642g4vab9c06mqmpsdn-python3.7-onnx-1.7.0/lib/python3.7/site-packages/onnx/onnx_cpp2py_export.cpython-37m-x86_64-linux-gnu.so)

I don't if this can be solved in the package itself.
I managed solve this in a nix shell by adding export LD_LIBRARY_PATH=${pkgs.stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH to the shellHook.
feel free to close this one.

@Zhen-hao It sounds like it ought to be solvable, but I'm unable to reproduce your error on Linux. Are you on Darwin?
Also are you able to reproduce this with the latest unstable nixpkgs?

@acairncross sorry, I didn't get time to build a new environment.
did you mean it is solved on the unstable branch?

did you mean it is solved on the unstable branch?

It might be, I haven't seen the problem on the unstable branch, or any other branch. I'm just trying to understand if/when this problem occurs. If it's not possible to reproduce the error then I agree we can close this issue.

it makes sense to closes it.
other people can use my solution as a workaround in case they have to use earlier revs.


When using the view controller with a custom timezone the calendar gets messed up

I'm using the PDTSimpleCalendarViewController in the following way (in Swift):
var vc = PDTSimpleCalendarViewController()
var calendar = NSCalendar(calendarIdentifier: NSGregorianCalendar)!
calendar.locale = NSLocale.currentLocale()
calendar.timeZone = NSDate.localTimeZone()
vc.calendar = calendar

NSDate.localTimeZone() is an custom function (an extension). This function gives the original default time zone (from when the app starts up, Europe/Amsterdam in my case), during the rest of the app the default time zone will be UTC.
When using this code the following incorrect calendar is produced: (note, I made this printscreen on the 5th, not the 4th)

Is there a way to solve this? (An other solution can be to support to overwrite the 'today' date)

I see what's going on. To determine if a cell is today, we compare the date to [NSDate date] which will be using the system default which is GMT.
So we need to take into account the time difference generated by your timezone.
May I ask you why you handle 2 different timezones in your app?

The strange thing is my time zone difference is only 1 hour, so the [NSDate date] bug is probably not it. But maybe determining the first day of the month etc. is ? 2014-12-31 23:00 vs 2015-01-01 00:00 ?
Anyways, "May I ask you why you handle 2 different timezones in your app?" is a good question I asked myself aswell. I decided that was indeed not the way to go. For this app, a reservation system, we dont store dates with a timezone (so we choose UTC (without daylight saving)). A long story. Instead of chancing the whole app's default timezone to UTC I rewrote the code to only use UTC where necessary. Because I have to send an YYYY-MM-dd HH:mm formatted string to our server, the timezone doesn't matter. So I dont really have to worry about timezones at all because the server will interpreted it as UTC anyways.

Glad that you've been able to find an alternative way.
I think you're right, the method to find the first day of the month is probably the one to blame in that case.
Due to the fact that the calendar & the system use 2 different timezones. I created myself a task to investigate that. Thanks!

Hi Jerome,
Sorry for a basic question. Any chance you have a demo of PDTSimpleCalendar in Swift?
Bobby

Hello,
Please update if there is a demo code for PDTSimpleCalendar in Swift.
Thanks


Typed Function for better class inheritance.

🔍 Search Terms
"Typed Function", "typed Callable object", "extends Function", "Function type definitions", "Function typed Parameters", "Function typed ReturnType", "generic Function types"
✅ Viability Checklist

[x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[x] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
[x] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
[x] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals

⭐ Suggestion
I'd like to be able to define the actual Function type with some generic types for its parameters and return type.
In my head, something like:
type Function<P extends any[] = any[], R = any>;

... where P is the type of the parameters and R is the return type.
Or -yet- better to support optional parameters:
type Function<T extends (...args: any[]) => any = (...args: any[]) => any>;

... where T is the actual function type on which internals can perform Parameters<T> and ReturnType<T>.
This would allow developers to define types like this:
type MyFunction = Function<(value: number, base?: number) => boolean>;

📃 Motivating Example
I do know well that -as described- it seems to be completely useless.
This hypothetical type MyFunction won't be different from:
type MyFunction = (value: number, base?: number) => boolean;

So why this proposal?

The real reason to use this comes from the need to implement something like this:
class MyFunction extends Function<(value: number, base?: number) => boolean>
{
  /* ... */
}

By extending the Function class, you can make objects callable just like any other function, while still having their own properties and methods.

Right now, it is possible to make an object callable like so, while isn't allowed to strictly define what kind of parameters it takes or what kind of result it will return.
The current type will be (...args: any[]) => any which "disables" all TypeScript typing and doesn't allow relying on types when using such objects.
💻 Use Cases
1. What do you want to use this for?
I'm going to use this like -as I said- to strictly type callable objects in a secure way.
2. What shortcomings exist with current approaches?
The type system isn't reliable when these kind of objects are involved.
3. What workarounds are you using in the meantime?
I'm not implementing a callable object, since I need to rely on type system.
I'm using some wrappers, which make things more complex to handle and less readable, while adding a little JavaScript overhead in a case where it's just a typing issue and shouldn't involve any additional JavaScript code at all.

What's in the /* ... */ there? How does the function body passed as a string ensure that it actually implements (value: number, base?: number) => boolean? Seems like nothing stops new MyFunction() which will always return undefined when called. I'm having a hard time imagining how TS would actually provide the type safety implied by this.

Oh, sorry... My bad!
Of course, my /* ... */ is a comment to leave space to whatever implementation a developer would need.
I would never imagine that the body of a generic class -in this case- would affect in some way what I was saying...
But... Anyway... I'm going to provide you what I was trying to implement:
abstract class CallableObject<T extends (...args: any[]) => any = () => void> extends Function {
    public constructor() {
        super(`return this.invoke(...arguments);`);

        return this.bind(this);
    }

    public abstract invoke(...args: Parameters<T>): ReturnType<T>;
}

class SwitchableCallback<T extends (...args: any[]) => any = () => void> extends CallableObject<T> {
    protected _key: string;
    public get key(): string { return this._key; }

    protected _callback: T;
    protected _callbacks: Map<string, T>;

    public constructor()
    {
        const _default = () => {
            throw new Error(
                "Unable to invoke a `SwitchableCallback` without any callback defined. " +
                "Did you forget to call the `register` method?"
            );
        };

        super();

        this._key = "";

        this._callback = ((_default) as unknown) as T;
        this._callbacks = new Map<string, T>();
    }

    public invoke(...args: Parameters<T>): ReturnType<T> {
        return this._callback(...args);
    }

    public register(key: string, callback: T): void {
        if (this._callbacks.size === 0) {
            this._key = key;
            this._callback = callback;
        } else if (this._callbacks.has(key)) {
            throw new Error(`Unable to register a callback with key '${key}' as it already exists.`);
        }

        this._callbacks.set(key, callback);
    }
    public unregister(key: string): void {
        if (!(this._callbacks.has(key))) {
            throw new Error(`Unable to unregister a callback with key '${key}' as it does not exist.`);
        }

        this._callbacks.delete(key);
    }

    public switch(key: string): void  {
        if (!(this._callbacks.has(key))) {
            throw new Error(`Unable to switch to the callback with key '${key}' as it does not exist.`);
        }

        this._key = key;
        this._callback = this._callbacks.get(key)!;
    }
}

const onPointerMove = new SwitchableCallback<(event: PointerEvent) => void>();

onPointerMove.register("pointerup", (evt: PointerEvent) => {
    /* Do whatever you need to do while the mouse is moving and no buttons are pressed... */
});
onPointerMove.register("pointerdown", (evt: PointerEvent) => {
    /* Do whatever you need to do while the mouse is moving and whatever button is pressed... */
});

window.addEventListener("pointerup", () => onPointerMove.switch("pointerup"));
window.addEventListener("pointerdown", () => onPointerMove.switch("pointerdown"));

// First kind use:
window.addEventListener("pointermove", onPointerMove); // TypeScript doesn't recognize this as a valid EventListener. Odd but fair enough.
window.addEventListener("pointermove", () => onPointerMove()); // For TypeScript that's ok.
window.addEventListener("pointermove", (evt) => onPointerMove(evt)); // For TypeScript that's ok. Of course.
window.addEventListener("pointermove", () => onPointerMove(Math.PI, "Lorem ipsum dolor sit amet.", { width: 1920, height: 1080 })); // For TypeScript that's ok too.

// Second kind use:
window.addEventListener("pointermove", onPointerMove.invoke); // For TypeScript that's ok.
window.addEventListener("pointermove", () => onPointerMove.invoke()); // For TypeScript that's not ok. Obviously.
window.addEventListener("pointermove", (evt) => onPointerMove.invoke(evt)); // For TypeScript that's ok too.
window.addEventListener("pointermove", () => onPointerMove.invoke(Math.PI, "Lorem ipsum dolor sit amet.", { width: 1920, height: 1080 })); // For TypeScript that's not ok.

At the end of the day, I perfectly know that if the first kind of use isn't type-safe, I can fall back on the second kind.
They do the same exact thing.
What I was pointing out is that this is a missing type-check in TypeScript.
Probably I'm the only one that ever dared to extend a Function class to implement a callable object... Sad but makes sense. 😅
But if it were possible to define the type of the actual Function using generics, this kind of problem would be solved.
The defined generic type on Function -of course- would be the actual function signature to let TypeScript know what kind of function it is, what kind and how many parameters it accepts and what value type it returns.
abstract class CallableObject<T extends (...args: any[]) => any = (...args: any[]) => any> extends Function<T> {

    /* ...

At the moment, I'm using some functions to workaround this problem:
function createSwitchableCallback<T extends (...args: any[]) => any = (...args: any[]) => any>()
{
    return new SwitchableCallback() as SwitchableCallback<T> & T;
}

I also tried to define a decorator to do this and to make @callable any class...
But a decorator does not change the TypeScript type of the class so I wasn't able to solve this problem.

You may already be aware of this, but TypeScript already has the ability to model well-typed functions with additional properties. Here's a silly example:
function foo(value: string): number {
  foo.aggregateValue += value
  return foo.aggregateValue.length
}
foo.aggregateValue = ''

The type of such a function can be described using an interface with a call signature:
interface Foo {
  (value: string): number
  aggregateValue: string
}

The handbook has more info.

Hi, @mkantor!
Yeah... I tried it in one of my tests...
Sadly, I can't inherit it to a new class and extend the foo function.
There's no inheritance in this case.

During one of my attempts, I also tried to define my class as follows:
interface IFunction<T extends (...args: any[]) => any = () => void> {
    (...args: Parameters<T>): ReturnType<T>;
}

abstract class CallableObject<T extends (...args: any[]) => any = () => void> extends Function implements IFunction<T> {

... but -again- it ends up with an typing error.

I wouldn't use classes at all for what you're trying to do. Classes aren't designed to produce callable instances—even in plain JavaScript there's no way to make this work without manual prototype hacking or unsafely creating a Function from a string like you're doing, which should put up red flags.
Here's a simpler and safer way to handle your use case:
let onPointerMove = (event: PointerEvent) => {}

const pointerup = (evt: PointerEvent) => {
    /* Do whatever you need to do while the mouse is moving and no buttons are pressed... */
};
const pointerdown = (evt: PointerEvent) => {
    /* Do whatever you need to do while the mouse is moving and whatever button is pressed... */
};

window.addEventListener("pointerup", () => { onPointerMove = pointerup });
window.addEventListener("pointerdown", () => { onPointerMove = pointerdown });

// First kind use:
window.addEventListener("pointermove", onPointerMove); // For TypeScript that's ok.
window.addEventListener("pointermove", () => onPointerMove()); // For TypeScript that's not ok. Obviously.
window.addEventListener("pointermove", (evt) => onPointerMove(evt)); // For TypeScript that's ok too.
window.addEventListener("pointermove", () => onPointerMove(Math.PI, "Lorem ipsum dolor sit amet.", { width: 1920, height: 1080 })); // For TypeScript that's not ok.

If you're convinced that you really do need to make a class with callable instances, I think this approach is better than extending Function (but again I strongly advise against going down this path in the first place).

I don't see a benefit in modifying Function for everyone who uses TS, especially since the motivating use case looks like an exceptionally uncommon approach to implementing functions. Can't you just assign Function to a new variable and give it whatever construct signature you want?  Maybe like
const MyFunction = Function as any as new
    <F extends (...args: any) => any>(...args: string[]) => (...args: Parameters<F>) => ReturnType<F>;

abstract class CallableObject<T extends (...args: any[]) => any = () => void> extends MyFunction<T> {
    public constructor() {
        super(`return this.invoke(...arguments);`);
        return this.bind(this) as CallableObject<T>; // <-- need this assertion
    }

    public abstract invoke(...args: Parameters<T>): ReturnType<T>;
}

class Foo extends CallableObject<(x: string) => number> {
    invoke(x: string) {
        return x.length
    }
}

const f = new Foo();
console.log(f("abc")); // 3

Playground link to code
I'm not saying the particulars of the above are what you want, just that nothing is stopping you from doing this locally in your own code.  Is there something where the actual language needs to change in order to support this use case?  The only thing I can think of is if you wanted TS to somehow verify that the string-valued constructor arguments actually satisfies the call signature, but that is almost certainly too complex. Maybe I'm just not seeing something obvious here?

The approach of @mkantor, as obvious as it may be, it doesn't work as intended.
The reference of onPointerMove defined like so, would change without let other handlers knowing about it.
let onPointerMove = (event: PointerEvent) => console.log("#0");

const pointerup = (evt: PointerEvent) => console.log("#1");
const pointerdown = (evt: PointerEvent) => console.log("#2");

window.addEventListener("pointerup", () => { onPointerMove = pointerup });
window.addEventListener("pointerdown", () => { onPointerMove = pointerdown });

window.addEventListener("pointermove", onPointerMove);

Using this approach -from now on- will always print #0 without any possibility of change.
Using () => onPointerMove() would solve this specific problem but -again- would also create other problems...

Anyway...
The solution proposed from @jcalz it actually work. Perfectly, indeed!
That's exactly what I was trying to do. Nothing less. Nothing more.
Thanks. ❤

In conclusion, IMHO...
You actually do recognize what the use case is...
You actually do recognize that this is something that TypeScript doesn't handle properly...
But since this is an exceptionally uncommon approach I can handle it in my own code rather than make it available to everyone.

Have you ever thought about whether arrays were an extremely uncommon approach?
const MyArray = Array as any as new<T>(...args: T[]) => T[];

Fair enough... The important thing is that it's at least implementable, somehow...
That's enough for me.
Thank you for your support.
Hoping this could be useful to someone else, one day.


Hide "unauthenticated users" warning when 'helm init' is called securely

After a successful run of helm init, the following message is displayed:
Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy.
For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation

I took this to mean that my specific installation was insecure, even after following the specified instructions.  But after reading the source, I see this message is displayed unconditionally, even if the proper security configuration is provided.  I would suggest hiding this message when the proper/secure configuration is provided.
It might also be worth clarifying the message, as it's not entirely clear to me exactly what section of the linked doc it is referring to.
For reference, my actual helm init command which generated the output:
helm init \
    --tiller-tls \
    --tiller-tls-cert ${tmp}/tiller.cert.pem \
    --tiller-tls-key ${tmp}/tiller.key.pem \
    --tls-ca-cert ${HELMHOME}/ca.pem \
    --tiller-tls-verify \
    --service-account=tiller

I suggest hiding this message when --tiller-tls-verify is enabled (assuming my
Output of helm version:
Client: &version.Version{SemVer:"v2.9.0", GitCommit:"f6025bb9ee7daf9fee0026541c90a6f557a3e0bc", GitTreeState:"clean"}

This seems like an easy issue to tackle should someone want to get their feet wet with Helm. :)

I'll take a crack at it if someone can confirm which condition(s) should disable the warning. Is the --tiler-tls-verify the key?  That along with --service-account?

Yes, I'd say that with the TLS flags enabled that should be more than enough to suppress the warning, since then only users with the TLS client cert can authorize tiller to install resources.


feat: export prop interface

I'd like to access the interface so I can extend it in my custom infinite scroll components.

Thanks, I'll merge this shortly and release a new patch version!


Add react and react-dom as peer dependencies

Fixes errors using Yarn 2 (berry).
See https://github.com/ant-design/ant-design/issues/27339 for details.

Coverage remained the same at 82.305% when pulling 0d3633f2a013f93081f617cb2cf3ffa49835f1e9 on brandonbloom:react-peer-dependencies into 8dcd21d279bd2ff2b49dea64a5e0be9a31560187 on react-component:master.


move yaml to end of file

@gleckler1 when green feel free to merge in
@durack1 @lee1043  pinging you too.

Pull Request Test Coverage Report for Build 1178

5 of 5 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.02%) to 76.22%

Totals

Change from base Build 1172:
0.02%

Covered Lines:
3234

Relevant Lines:
4243

💛  - Coveralls


illuminate/support ^7.0

Is it possible to add support for illuminate/support 7.* ?

Now support in version 0.3.0


Add missing word-break module

Word-break is the only tachyons module present in sources but not included in build css.

Removed it's inclusion intentionally but apparently didn't remove the module itself. Won't be adding it back in. Thanks for the PR though. Great attention to detail.

@mrmrs Thanks.
May I ask why it has been removed?
And is there a list of optional modules that aren't included in main tachyons.css?

Moreover you can close this PR https://github.com/tachyons-css/tachyons/issues/110 too.


to_xarray() result is incorrect when one of multi-index levels is not sorted

What happened:
to_xarray() sorts multi-index level values and returns result for the sorted values but it doesn't sort levels or expects levels to be sorted resulting in completely incorrect order of data for the displayed coordinates.
df:
            C1  C2
lev1 lev2
b    foo    0   1
a    foo    2   3

df.to_xarray():
 <xarray.Dataset>
Dimensions:  (lev1: 2, lev2: 1)
Coordinates:
  * lev1     (lev1) object 'b' 'a'
  * lev2     (lev2) object 'foo'
Data variables:
    C1       (lev1, lev2) int64 2 0
    C2       (lev1, lev2) int64 3 1

What you expected to happen:
Should account for the order of levels in the original index.
Minimal Complete Verifiable Example:
import pandas as pd
df = pd.concat(
    {
        'b': pd.DataFrame([[0, 1]], index=['foo'], columns=['C1', 'C2']),
        'a': pd.DataFrame([[2, 3]], index=['foo'], columns=['C1', 'C2']),
    }
).rename_axis(['lev1', 'lev2'])
print('df:\n', df, '\n')
print('df.to_xarray():\n', df.to_xarray(), '\n')
print('df.index.levels[0]:\n', df.index.levels[0])

Anything else we need to know?:
Environment:
Output of xr.show_versions()

INSTALLED VERSIONS
commit: None
python: 3.8.2 | packaged by conda-forge | (default, Apr 24 2020, 08:20:52)
[GCC 7.3.0]
python-bits: 64
OS: Linux
OS-release: 5.4.7-100.fc30.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: en_GB.UTF-8
libhdf5: 1.10.4
libnetcdf: 4.6.3
xarray: 0.15.1
pandas: 1.0.5
numpy: 1.19.0
scipy: 1.5.0
netCDF4: 1.5.3
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: None
cftime: 1.1.3
nc_time_axis: None
PseudoNetCDF: None
rasterio: None
cfgrib: None
iris: None
bottleneck: 1.3.2
dask: 2.19.0
distributed: 2.19.0
matplotlib: 3.2.2
cartopy: None
seaborn: 0.10.1
numbagg: installed
setuptools: 46.3.0.post20200513
pip: 20.1
conda: None
pytest: 5.4.3
IPython: 7.15.0
sphinx: None

It seems the problem here is in Dataset.from_dataframe the dims and coords are created with df.index.levels which is unsorted: https://github.com/pydata/xarray/blob/732750a06aef2025b206ba6ff765f5acc53bfa25/xarray/core/dataset.py#L4642-L4643
Then in Dataset._set_numpy_data_from_dataframe, the pd.MultiIndex.from_product and dataframe.reindex unintentionally sort the dataframe by index:
https://github.com/pydata/xarray/blob/732750a06aef2025b206ba6ff765f5acc53bfa25/xarray/core/dataset.py#L4588-L4589
Besides the perf improvement it provides, #4184 seems also have a nice side effect fixing this issue.

Hi @pzhlobi @Li9htmare -- thanks for raising this issue.
Could you kindly clarify for me exactly what behavior you think xarray should do? The results are indeed reordered currently, but as far as I can tell the pairing between coordinators and values remains consistent.
When I test this myself, I see the same behavior (documented in the first post) either with or without my changes from #4184.

Hi @shoyer, sorry I got you confused, I should have run your code at first place. You code removes the problematic dataframe.reindex in Dataset._set_numpy_data_from_dataframe, but there is indeed another place causing the problem, which is actually already fixed (but not released yet) by https://github.com/pydata/xarray/pull/3953/files#diff-921db548d18a549f6381818ed08298c9L4607-L4608
Using pzhlobi's example df with xarray 0.15.1 (incorrect result):
df.to_xarray()
<xarray.Dataset>
Dimensions:  (lev1: 2, lev2: 1)
Coordinates:
  * lev1     (lev1) object 'b' 'a'
  * lev2     (lev2) object 'foo'
Data variables:
    C1       (lev1, lev2) int64 2 0
    C2       (lev1, lev2) int64 3 1

Using the same df with both #3953 and #4184 (correct result):
df.to_xarray()
Out[3]:
<xarray.Dataset>
Dimensions:  (lev1: 2, lev2: 1)
Coordinates:
  * lev1     (lev1) object 'a' 'b'
  * lev2     (lev2) object 'foo'
Data variables:
    C1       (lev1, lev2) int64 2 0
    C2       (lev1, lev2) int64 3 1

Thanks for clarifying!
This raises an interesting question for #4184: do we want to keep @fujiisoup's fix from #3953 or not?
If we remove @fujiisoup's fix, then the output we see is:
df.to_xarray()
 <xarray.Dataset>
Dimensions:  (lev1: 2, lev2: 1)
Coordinates:
  * lev1     (lev1) object 'b' 'a'
  * lev2     (lev2) object 'foo'
Data variables:
    C1       (lev1, lev2) int64 0 2
    C2       (lev1, lev2) int64 1 3

This is also correct -- coordinates match up with values -- but the order of the result is different from what is currently on master.

I think the #3953 fixes the case where the multiindex has unused levels.
I had no better idea than #3953, but if it works without #3953, it would be better ;)

I verified that #4184 fixes the tests added for #3953 even after removing the call to remove_unused_levels_categories().
The main question is what behavior we want to do have: Should from_dataframe preserve index levels exactly, or should it sort them first?
I think it's better to not to sort (but of course it's better to sort than to get the wrong order).

I agree that it's better not to sort.

Actually, I realize now that this is basically the same issue as https://github.com/pydata/xarray/issues/2619
If I remove the use of removed_unused_levels_categories from from_dataframe, then I get the same behavior that we considered a bug in that issue:
In [5]: ds.isel(xy=ds['x'] < 4).to_pandas().to_xarray()
Out[5]:
<xarray.DataArray (x: 8, y: 5)>
array([[ 0.,  1.,  2.,  3.,  4.],
       [ 5.,  6.,  7.,  8.,  9.],
       [10., 11., 12., 13., 14.],
       [15., 16., 17., 18., 19.],
       [nan, nan, nan, nan, nan],
       [nan, nan, nan, nan, nan],
       [nan, nan, nan, nan, nan],
       [nan, nan, nan, nan, nan]])
Coordinates:
  * x        (x) int64 0 1 2 3 4 5 6 7
  * y        (y) int64 0 1 2 3 4

So maybe it is more consistent to keep calling remove_unused_levels(), which somewhat surprisingly sorts MultiIndex levels.

The sorting seems to be a separate matter, caused by dataframe.set_index() inside our remove_unused_levels_categories function. I think we can remove that, which will fix the sorting issue when removing unused levels. Then the result will be the desired:
df.to_xarray()
 <xarray.Dataset>
Dimensions:  (lev1: 2, lev2: 1)
Coordinates:
  * lev1     (lev1) object 'b' 'a'
  * lev2     (lev2) object 'foo'
Data variables:
    C1       (lev1, lev2) int64 0 2
    C2       (lev1, lev2) int64 1 3

Hi @shoyer , without dataframe.set_index(), dataframe.index can potentially be different from idx returned by remove_unused_levels_categories, this will lead to other problems. One example is the following df:
df = pd.DataFrame(
    {
        'lev1': pd.Series(
            ['b', 'a'], dtype=pd.CategoricalDtype(['c', 'b', 'a'], ordered=True)
        ),
        'lev2': 'foo',
        'C1': [0, 2],
        'C2': [1, 3],
    }
).set_index(['lev1', 'lev2'])

I agree it will be better if we can maintain the order from df to xr.Dataset, but I think we should never work with a copy of idx which is different from dataframe.index, as this will lead to hard to debug problems due to "surprising" behavior pandas does.

@Li9htmare I'm not sure I follow your example. #4184 does remove the use of DataFrame.set_index(), but it also removes any subsequent use of dataframe.index -- it always uses the separately processed index.
Is there something specific that you are worried about going wrong with your latest example? For what it's worth, here's what to_xarray() does with the current version of #4184:
In [4]: df.to_xarray()
Out[4]:
<xarray.Dataset>
Dimensions:  (lev1: 2, lev2: 1)
Coordinates:
  * lev1     (lev1) object 'b' 'a'
  * lev2     (lev2) object 'foo'
Data variables:
    C1       (lev1, lev2) int64 0 2
    C2       (lev1, lev2) int64 1 3

In [5]: df.to_xarray().indexes
Out[5]:
lev1: CategoricalIndex(['b', 'a'], categories=['b', 'a'], ordered=True, name='lev1', dtype='category')
lev2: Index(['foo'], dtype='object', name='lev2')

I think this is does the right thing?

Sorry @shoyer, I didn't notice you have pushed new commits to #4184 and thought you meant to just remove the DataFrame.set_index. Your latest commits indeed give the correct result. My concern was when another person works on this and didn't get the context that idx might be different from dataframe.index and new bugs could potentially be introduced. Though consider the limited scope where we are maintaining both idx and dataframe, I guess it should be fine.

My concern was when another person works on this and didn't get the context that idx might be different from dataframe.index and new bugs could potentially be introduced

Let me see if I can rewrite the helper functions to avoid passing around a DataFrame

My concern was when another person works on this and didn't get the context that idx might be different from dataframe.index and new bugs could potentially be introduced

Let me see if I can rewrite the helper functions to avoid passing around a DataFrame

This was a good suggestion. Done in https://github.com/pydata/xarray/pull/4184/commits/96b544b5a59894359a35680151af71c0226f0505

This intention of variables used constructing the Dataset looks a lot clearer now. Many thanks Stephan!


Added pandas to requirements of tutorial template doc

Description

Resolves #527
Updated dependencies in tutorial template documentation
Development notes

None, only docs/source updated.
Checklist

[x] Read the contributing guidelines
[x] Opened this PR as a 'Draft Pull Request' if it is work-in-progress
[x] Updated the documentation to reflect the code changes
[x] Added a description of this change and added my name to the list of supporting contributions in the RELEASE.md file
[x] Added tests to cover my changes

Notice

[x] I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":

I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.

I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.

I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.

Can you reword "Resolves #527" in your description, so it doesn't auto-close the issue. :) I think the issue encompasses a bit more work.


Implemented linked-list exercise from x-common

I implemented the x-common/linked-list exercise (README.md). While Python has a collections.deque since 2.4 I still think you could learn a lot from implementing this.
I added a skeleton file that already has a class Node to help starting in the right direction.

Thanks @behrtam, this is much appreciated.
I'm going to leave this for @Dog to review/merge.

I haven't looked too deep at this yet. I'll take a deeper look at it tonight.
Notes regarding problem as a whole

The ReadMe does not prohibit structures implemented by the standard library

I wish the exercise didn't use the abbreviated name of double ended queue. It could be confused with dequeue later on. Dequeue is commonly used to refer to removing an element from a FIFO queue.

I wish that the ReadMe mentioned sentinel nodes for extra reading.

Notes regarding your implementation

It looks like your code can't handle a call attempting to remove an element from an empty queue. It throws an exception. It would also be nice to test this case.

It'd be ideal not to use the variable name next, only because of overwriting the built in function. A better name isn't immediately coming to mind. Its very minor though. Its really if we can come up with a synonym, it'd be preferable.

Extra Credit Ideas
What I think would be very cool to do for this problem is to make users implement the magic method __iter__ in python. I'm not sure how to add the extra language specific information for it, but this means they could then iterate their structure just like a list.
for x in my_deque:
    do_something()

It would also work with other built ins:
iterator = iter(my_deque)
first = next(iterator)
second = next(iterator)

It could also be interesting to make them implement __len__, and keep track of the size of their structure.
my_deque = Deque()
my_deque.push(1)
my_deque.push(2)
size = len(my_deque)
assert size == 2

Comments regarding the problem as a whole

I don't have a solution to prohibit structures implemented by the standard library. My best idea was to provide a skeleton file with a class Node implementation to get the user on the right track.

I was also confused reading the name Deque in a problem with that name linked-list. But I didn't want to differ from the readme, so I stayed with the name.

We could provide a link for extra reading about sentinel nodes in the skeleton file if you know something good.

Comments regarding my implementation

You are right my code can't handle removing an element from an empty queue. That didn't happen by accident as I didn't want to conflict with the readme.

To keep your implementation simple, the tests will not cover error conditions. Specifically: pop or shift will never be called on an empty Deque.

So I mad sure my implementation can't handle a remove if it's empty, so my tests don't accidentally check for that.

We could replace prev with left and next with right.

It'd be ideal not to use the variable name next, only because of overwriting the built in function.

Comments regarding your extra credit ideas
I really like your idea. We could totally make this about the magic methods, by providing already the method signatures for the magic methods (we can't put them in the readme) and maybe push/pop implementation.
Would also fix the problem from the top of using structures implemented by the standard library.

Comments regarding the problem as a whole

There are a few exercises that the ReadMe states you should not use a standard library function if it exists in a language. It isn't something that we enforce. Its kind of a cue that it is an intellectual exercise, and this is a structure commonly used in a lot of problems.

Yeah, I understand that. I wrote it down here first because I wasn't quite ready to suggest a change for every language in x-common. I wanted to collect my thoughts a bit more, but I thought @kytrinyx may comment on it before I came back to this request.

I did a quick search for a good source, and I'm having trouble finding anything I really like. I'll keep looking.

Comments regarding my implementation

Okay, I missed that.

I think it'll be okay to use next in this context since its really an intellectual exercise.

Comments regarding your extra credit ideas
@kytrinyx is there a good way to do this in the system currently?

Sorry, I'm been traveling and dropped offline for a couple of days. Yeah, I think we should fix the README, and then adjust any implementations that need it based on the more accurate and useful README.
For the extra credit stuff, we've just been putting it with pending tests and a comment saying extra credit. What I'd really like to do is have a file that can be included into the README on a per-exercise basis, so that we could describe the extra credit and have it just show up as a part of the problem description.

So, apparently all the Dequeue confusion got fixed (commit).
Maybe we could add the additional magic methods in the same skipped fashion like we discussed for the clockexercise (see #373).


NB2: Simulate crop cycle

Hi, here is another issue. Sorry to interrupt you again:
When I ran the NB2, the "Simulate crop cycle" part told me that "name 'L6a' is not defined", but before this part, it could run successfully.
Could you please tell me how that happened? Here is the issue below:

Hi @WeirdCxychen,
Could you do these checking?

Are you simulation perennial crop or annual crop? Usually L** is used in annual crop-specific rule excel sheet while N** is used for perennials. (Refer to crop specific rule setting notation differences in sample crop-specific rule sheet).
In your input crop parameter setting, is your selected crop name's column "annual/perennial flag 0 or 1. (0 for annual, 1 for perennial).

I suspect there's something wrongly set up, causing this error. Still, if the error persist, you can send me your sample NB2 notebook, excel sheet of crop parameters and crop-specific rule.
Regards,
Swun Wunna Htet

@NokuzaSezo97,
Thank you so much for your reply.
After checking my parameter in NB2, I found that if in the "Setting up the thermal screening parameters (Optional)", "aez.setThermalClimateScreening(tclimate, no_t_climate=[2,6,7,8,9,10,11,12])" matches with the sample code, it could be run successfully, but in my own study area, using this parameter may not be suitable.
Could you please tell me why the sample code was chosen 2, 6, 7, 8, 9, 10, 11, 12? And whether I should choose the same amount as the sample?
Here is the issue below:

Regards,
Xinyue Chang

Here are my Thermal Climate zone and issue part:

Hi @WeirdCxychen,
After checking maize parameters and your thermal climate map, I found out that the maize in example data sheet is for tropical regions. So, obviously, running tropical maize in temperate regions won't be suitable. I would suggest going to GAEZ Appendices where temperate maize thermal climate suitability classes are mentioned and modify in the no_t_climate list. Note that if you're running maize in temperate regions, make sure all the crop parameters are specifically for temperate regions.
Regards,
Swun Wunna Htet

Hi @NokuzaSezo97,
I'm glad your suggestion enlightened me a lot. The no_t_climate list can be found in Appendix 4-6.1, but after l changed the list to temperate maize, it still noticed the same error "name 'L6a' is not defined".
sorry for interrupting you, and thank you for your time~
Here is the issue and my data below:

cxy_test.zip

And another data package:
cxy_test_1.zip

Hi @WeirdCxychen,
In your excel sheet, the annual/perennial flag is set to 1 (which is for perennial, and mentioned earlier in the comment  (https://github.com/gicait/PyAEZ/issues/105#issuecomment-1897750982). That's why you got an error. Please set to 0 (annual) flag, and rerun it; everything should be ok.
Regards,
Swun Wunna Htet

Thank you so much for your checking and advice!


Add JustList: {JustList name}

JustList URL: 0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce
JustList Name: shibainu
Link to the official homepage of the JustList manager: https://shibatoken.com

Sorry, your issue will be closed as you did not submit your information in the correct format.


Small multiples distribution chart

This is done, although we have yet to have Last week and Last month data to see how it looks.


bemuddled, exhilarated

This pull request was generated by the 'mq' tool
[test]
flake rate: 0.1
logical conflict every: 100
sleep for: 300s
close stale after: 4 hours
[pullrequest]
requests per hour: 30
deps=[b,e]

/trunk merge


Is it possible to have a flag set when the tld doesn't match the list of tlds from Mozilla ?

It would help to invalidate bad links

Could you please open a new issue the the IDN specifically so we can have a conversation over there? I have no problem handling non-ascii domains. What do we want to archive here?
I keep this ticket open to solve the issue you mentioned. I will add a new field that also tells you if this was an IP address.
Thanks!


AWS - npm ERR! nospc ENOSPC: no space left on device, write

[cloudshell-user@ip-10-0-180-32 ~]$ npm install -g @aws-amplify/cli
npm ERR! code ENOSPC
npm ERR! syscall write
npm ERR! errno -28
npm ERR! nospc ENOSPC: no space left on device, write
npm ERR! nospc There appears to be insufficient space on your system to finish.
npm ERR! nospc Clear up some disk space and try again.
[cloudshell-user@ip-10-0-180-32 ~]$

Issue was that the AWS EC2 CLI was being used through the AWS console as opposed to CLI on local machine for deployment.


History view: datapoint info difficult to hide

Description:
On History view user is able to tap to datapoint to see more info. Seems that user is required to touch the exact datapoint to hide it, making it quite difficult to hide.
Expected: Let's try to make it so that user could hide the info box by touching on the box.

QA passed