Unify the plugin installation for standalone and context-scoped plugins and use context as recommendation

What this PR does / why we need it

Unify the plugin installation for standalone and context-scoped plugins
Use context as a recommendation for which plugin/version to install
Updates the tanzu plugin install and tanzu plugin sync experience
Updates the tanzu plugin list output
Updates the tanzu plugin describe output

User facing changes:

Once a plugin is installed and plugin-specific commands are available, that plugin is always shown as installed and all plugin-related commands are available irrespective of whether the plugin was installed manually by the user with the tanzu plugin install command (standalone plugin) or it was installed automatically when the user created a context (context-scoped plugin).

Before this change, context-scoped plugins were getting removed once the corresponding context was deleted or unset.
After this change, the plugin's availability is mostly not dependent on whether a context is active or not, and even after the context gets deleted or unset, corresponding plugins are still available to the user to use.

Details:
tanzu plugin list:

Rename column from VERSION to INSTALLED.
Introduces a new column for recommended version based on active context called RECOMMENDED.
When a plugin is not recommended from an active context, the RECOMMENDED is left empty.
The RECOMMENDED column will be dynamic and will only be shown if at least one recommended version.
The STATUS column is used to show the installation and recommended status of the plugin considering the active context. Two new status values are added install recommended and update recommended.
Introduce a new flag --wide to view additional columns.
The ACTIVE column will be added to show if the plugin is active or not.
Update the tanzu plugin list --help to specify the meaning of INSTALLED and RECOMMENDED columns (TODO)

tanzu plugin sync

Use context-plugins as recommended plugins/versions and install all recommended plugins as standalone plugins.
As mentioned above, the STATUS column will be used to reflect the installation status.
When plugin sync is happening as part of the tanzu plugin sync or tanzu context create or tanzu context use command, a table will be shown with the INSTALLED and RECOMMENDED columns to show how the plugin is getting updated (install, upgrade, downgrade).

Which issue(s) this PR fixes

Fixes #
Describe testing done for PR

Initial plugin and context setup

~ $ tz plugin list
  NAME       DESCRIPTION                                                 TARGET  INSTALLED  STATUS
  telemetry  configure cluster-wide settings for vmware tanzu telemetry  global  v1.1.0     installed

~ $ tz context list
  NAME                   ISACTIVE  TYPE             PROJECT  SPACE
  cluster-1              false     kubernetes       n/a      n/a
  one-tanzu-integration  false     tanzu
  tmc                    false     mission-control  n/a      n/a

[i] Use '--wide' flag to view additional columns.

Install plugins with tz plugin install command and verify with tz plugin list

~ $ tz plugin install appsv2
[i] Installed plugin 'appsv2:v0.1.1-beta.2' with target 'kubernetes'
[ok] successfully installed 'appsv2' plugin

~ $ tz plugin install package
[i] Installed plugin 'package:v0.34.2' with target 'kubernetes'
[ok] successfully installed 'package' plugin

~ $ tz plugin list
  NAME       DESCRIPTION                                                 TARGET      INSTALLED      STATUS
  appsv2     Applications on Kubernetes for TAP (SaaS distribution)      kubernetes  v0.1.1-beta.2  installed
  package    tanzu package management                                    kubernetes  v0.34.2        installed
  telemetry  configure cluster-wide settings for vmware tanzu telemetry  global      v1.1.0         installed

Set the cluster-1 context as an active context that recommended some context-scoped plugins. Verify the installation and check the UX

~ $ tz context use cluster-1
[i] Successfully activated context 'cluster-1' of type 'kubernetes'.
[i] Fetching recommended plugins for active context 'cluster-1'...
[i] Installing following plugins recommended by the context 'cluster-1':
  NAME     TARGET      RECOMMENDED
  project  kubernetes  v0.1.0-build.4
  space    kubernetes  v0.1.0-build.5
[i] Installed plugin 'project:v0.1.0-build.4' with target 'kubernetes'
[i] Installed plugin 'space:v0.1.0-build.5' with target 'kubernetes'
[ok] Successfully installed all recommended plugins.

~ $ tz plugin list
  NAME       DESCRIPTION                                                 TARGET      INSTALLED       RECOMMENDED     STATUS
  appsv2     Applications on Kubernetes for TAP (SaaS distribution)      kubernetes  v0.1.1-beta.2                   installed
  package    tanzu package management                                    kubernetes  v0.34.2                         installed
  project    View, list and use Tanzu Projects.                          kubernetes  v0.1.0-build.4  v0.1.0-build.4  installed
  space      Tanzu space, space profile, and space trait management      kubernetes  v0.1.0-build.5  v0.1.0-build.5  installed
  telemetry  configure cluster-wide settings for vmware tanzu telemetry  global      v1.1.0                          installed

Manually Delete the project plugin and Install a different version of the space plugin that is not recommended by the active context. Verify the tz plugin list output.

~ $ tz plugin uninstall project -y
[i] Uninstalling plugin 'project' for target 'kubernetes'
[ok] successfully uninstalled plugin 'project'

~ $ tz plugin install space --version v0.1.0-alpha.1
[i] Installed plugin 'space:v0.1.0-alpha.1' with target 'kubernetes'
[ok] successfully installed 'space' plugin

~ $ tz plugin list
  NAME       DESCRIPTION                                                 TARGET      INSTALLED       RECOMMENDED     STATUS
  appsv2     Applications on Kubernetes for TAP (SaaS distribution)      kubernetes  v0.1.1-beta.2                   installed
  package    tanzu package management                                    kubernetes  v0.34.2                         installed
  project    View, list and use Tanzu Projects                           kubernetes                  v0.1.0-build.4  install recommended
  space      Tanzu space, space profile, and space trait management      kubernetes  v0.1.0-alpha.1  v0.1.0-build.5  update recommended
  telemetry  configure cluster-wide settings for vmware tanzu telemetry  global      v1.1.0                          installed

Note: As shown above, some recommended plugins have not been installed or are outdated. To install them please run 'tanzu plugin sync'.

Run tz plugin sync to install recommended version of the context-scoped plugins.

~ $ tz plugin sync
[i] Fetching recommended plugins for active context 'cluster-1'...
[i] Installing following plugins recommended by the context 'cluster-1':
  NAME     TARGET      INSTALLED       RECOMMENDED
  project  kubernetes                  v0.1.0-build.4
  space    kubernetes  v0.1.0-alpha.1  v0.1.0-build.5
[i] Installed plugin 'project:v0.1.0-build.4' with target 'kubernetes' (from cache)
[i] Installed plugin 'space:v0.1.0-build.5' with target 'kubernetes' (from cache)
[ok] Successfully installed all recommended plugins.

~ $ tz plugin list
  NAME       DESCRIPTION                                                 TARGET      INSTALLED       RECOMMENDED     STATUS
  appsv2     Applications on Kubernetes for TAP (SaaS distribution)      kubernetes  v0.1.1-beta.2                   installed
  package    tanzu package management                                    kubernetes  v0.34.2                         installed
  project    View, list and use Tanzu Projects.                          kubernetes  v0.1.0-build.4  v0.1.0-build.4  installed
  space      Tanzu space, space profile, and space trait management      kubernetes  v0.1.0-build.5  v0.1.0-build.5  installed
  telemetry  configure cluster-wide settings for vmware tanzu telemetry  global      v1.1.0                          installed

Activate tmc context that recommends additional context-scoped plugins.

~ $ tz context use tmc
[i] Successfully activated context 'tmc' of type 'mission-control'.
[i] Fetching recommended plugins for active context 'tmc'...
[i] Installing following plugins recommended by the context 'tmc':
  NAME                  TARGET           RECOMMENDED
  account               mission-control  v0.3.1
  agentartifacts        mission-control  v0.1.18
  aks-cluster           mission-control  v0.3.4
  apply                 mission-control  v0.3.17
  audit                 mission-control  v0.1.18
  cluster               mission-control  v0.2.14
  clustergroup          mission-control  v0.1.18
  context               mission-control  v0.1.13
  continuousdelivery    mission-control  v0.1.18
  data-protection       mission-control  v0.1.18
  ekscluster            mission-control  v0.2.3
  events                mission-control  v0.1.18
  helm                  mission-control  v0.1.19
  iam                   mission-control  v0.1.18
  inspection            mission-control  v0.1.18
  integration           mission-control  v0.1.18
  management-cluster    mission-control  v0.2.20
  policy                mission-control  v0.1.18
  provider-aks-cluster  mission-control  v0.1.20
  provider-eks-cluster  mission-control  v0.1.18
  secret                mission-control  v0.1.20
  setting               mission-control  v0.2.16
  tanzupackage          mission-control  v0.4.5
  workspace             mission-control  v0.1.20
[i] Installed plugin 'account:v0.3.1' with target 'mission-control'
[i] Installed plugin 'agentartifacts:v0.1.18' with target 'mission-control'
[i] Installed plugin 'aks-cluster:v0.3.4' with target 'mission-control'
[i] Installed plugin 'apply:v0.3.17' with target 'mission-control'
[i] Installed plugin 'audit:v0.1.18' with target 'mission-control'
[i] Installed plugin 'cluster:v0.2.14' with target 'mission-control'
[i] Installed plugin 'clustergroup:v0.1.18' with target 'mission-control'
[i] Installed plugin 'context:v0.1.13' with target 'mission-control'
[i] Installed plugin 'continuousdelivery:v0.1.18' with target 'mission-control'
[i] Installed plugin 'data-protection:v0.1.18' with target 'mission-control'
[i] Installed plugin 'ekscluster:v0.2.3' with target 'mission-control'
[i] Installed plugin 'events:v0.1.18' with target 'mission-control'
[i] Installed plugin 'helm:v0.1.19' with target 'mission-control'
[i] Installed plugin 'iam:v0.1.18' with target 'mission-control'
[i] Installed plugin 'inspection:v0.1.18' with target 'mission-control'
[i] Installed plugin 'integration:v0.1.18' with target 'mission-control'
[i] Installed plugin 'management-cluster:v0.2.20' with target 'mission-control'
[i] Installed plugin 'policy:v0.1.18' with target 'mission-control'
[i] Installed plugin 'provider-aks-cluster:v0.1.20' with target 'mission-control'
[i] Installed plugin 'provider-eks-cluster:v0.1.18' with target 'mission-control'
[i] Installed plugin 'secret:v0.1.20' with target 'mission-control'
[i] Installed plugin 'setting:v0.2.16' with target 'mission-control'
[i] Installed plugin 'tanzupackage:v0.4.5' with target 'mission-control'
[i] Installed plugin 'workspace:v0.1.20' with target 'mission-control'
[ok] Successfully installed all recommended plugins.

~ $ tz plugin list
  NAME                  DESCRIPTION                                                                       TARGET           INSTALLED       RECOMMENDED     STATUS
  account               TMC account management for the organization                                       mission-control  v0.3.1          v0.3.1          installed
  agentartifacts        Image artifacts of all the agents to be made available on the cluster             mission-control  v0.1.18         v0.1.18         installed
  aks-cluster           aks-cluster plugin is used to provision and manage the tmc aks clusters.          mission-control  v0.3.4          v0.3.4          installed
  apply                 Apply a resource file                                                             mission-control  v0.3.17         v0.3.17         installed
  appsv2                Applications on Kubernetes for TAP (SaaS distribution)                            kubernetes       v0.1.1-beta.2                   installed
  audit                 Run an audit request on an organization                                           mission-control  v0.1.18         v0.1.18         installed
  cluster               A TMC managed Kubernetes cluster                                                  mission-control  v0.2.14         v0.2.14         installed
  clustergroup          A group of Kubernetes clusters                                                    mission-control  v0.1.18         v0.1.18         installed
  context               Management for TMC contexts                                                       mission-control  v0.1.13         v0.1.13         installed
  continuousdelivery    Manage cluster configurations                                                     mission-control  v0.1.18         v0.1.18         installed
  data-protection       Backup, restore, or migrate cluster data.                                         mission-control  v0.1.18         v0.1.18         installed
  ekscluster            ekscluster plugin is used to provision and manage the tmc eks clusters.           mission-control  v0.2.3          v0.2.3          installed
  events                TMC events for any meaningful user activity or system state change                mission-control  v0.1.18         v0.1.18         installed
  helm                  Manage helm deployments                                                           mission-control  v0.1.19         v0.1.19         installed
  iam                   IAM Policies for tmc resources                                                    mission-control  v0.1.18         v0.1.18         installed
  inspection            Run an inspection on a cluster                                                    mission-control  v0.1.18         v0.1.18         installed
  integration           Get available integrations and their information from registry.                   mission-control  v0.1.18         v0.1.18         installed
  management-cluster    A TMC registered Management cluster                                               mission-control  v0.2.20         v0.2.20         installed
  package               tanzu package management                                                          kubernetes       v0.34.2                         installed
  policy                Policy management for resources                                                   mission-control  v0.1.18         v0.1.18         installed
  project               View, list and use Tanzu Projects.                                                kubernetes       v0.1.0-build.4  v0.1.0-build.4  installed
  provider-aks-cluster  provider-aks-cluster plugin is used to manage and unmanage tmc provider aks       mission-control  v0.1.20         v0.1.20         installed
                        clusters
  provider-eks-cluster  provider-eks-cluster plugin is used to manage and unmanage tmc provider eks       mission-control  v0.1.18         v0.1.18         installed
                        clusters
  secret                Manage kubernetes secrets resource for a cluster                                  mission-control  v0.1.20         v0.1.20         installed
  setting               Manage default settings for some tmc features                                     mission-control  v0.2.16         v0.2.16         installed
  space                 Tanzu space, space profile, and space trait management                            kubernetes       v0.1.0-build.5  v0.1.0-build.5  installed
  tanzupackage          Install and manage Tanzu packages. Note: tanzu-standard package repository is     mission-control  v0.4.5          v0.4.5          installed
                        unavailable for non-TKG clusters.
  telemetry             configure cluster-wide settings for vmware tanzu telemetry                        global           v1.1.0                          installed
  workspace             A group of Kubernetes namespaces                                                  mission-control  v0.1.20         v0.1.20         installed

Unset the context and notice that plugins are still present and available

~ $ tz context unset tmc
The context 'tmc' of type 'mission-control' has been set as inactive

~ $ tz plugin list
  NAME                  DESCRIPTION                                                                       TARGET           INSTALLED       RECOMMENDED     STATUS
  account               TMC account management for the organization                                       mission-control  v0.3.1                          installed
  agentartifacts        Image artifacts of all the agents to be made available on the cluster             mission-control  v0.1.18                         installed
  aks-cluster           aks-cluster plugin is used to provision and manage the tmc aks clusters.          mission-control  v0.3.4                          installed
  apply                 Apply a resource file                                                             mission-control  v0.3.17                         installed
  appsv2                Applications on Kubernetes for TAP (SaaS distribution)                            kubernetes       v0.1.1-beta.2                   installed
  audit                 Run an audit request on an organization                                           mission-control  v0.1.18                         installed
  cluster               A TMC managed Kubernetes cluster                                                  mission-control  v0.2.14                         installed
  clustergroup          A group of Kubernetes clusters                                                    mission-control  v0.1.18                         installed
  context               Management for TMC contexts                                                       mission-control  v0.1.13                         installed
  continuousdelivery    Manage cluster configurations                                                     mission-control  v0.1.18                         installed
  data-protection       Backup, restore, or migrate cluster data.                                         mission-control  v0.1.18                         installed
  ekscluster            ekscluster plugin is used to provision and manage the tmc eks clusters.           mission-control  v0.2.3                          installed
  events                TMC events for any meaningful user activity or system state change                mission-control  v0.1.18                         installed
  helm                  Manage helm deployments                                                           mission-control  v0.1.19                         installed
  iam                   IAM Policies for tmc resources                                                    mission-control  v0.1.18                         installed
  inspection            Run an inspection on a cluster                                                    mission-control  v0.1.18                         installed
  integration           Get available integrations and their information from registry.                   mission-control  v0.1.18                         installed
  management-cluster    A TMC registered Management cluster                                               mission-control  v0.2.20                         installed
  package               tanzu package management                                                          kubernetes       v0.34.2                         installed
  policy                Policy management for resources                                                   mission-control  v0.1.18                         installed
  project               View, list and use Tanzu Projects.                                                kubernetes       v0.1.0-build.4  v0.1.0-build.4  installed
  provider-aks-cluster  provider-aks-cluster plugin is used to manage and unmanage tmc provider aks       mission-control  v0.1.20                         installed
                        clusters
  provider-eks-cluster  provider-eks-cluster plugin is used to manage and unmanage tmc provider eks       mission-control  v0.1.18                         installed
                        clusters
  secret                Manage kubernetes secrets resource for a cluster                                  mission-control  v0.1.20                         installed
  setting               Manage default settings for some tmc features                                     mission-control  v0.2.16                         installed
  space                 Tanzu space, space profile, and space trait management                            kubernetes       v0.1.0-build.5  v0.1.0-build.5  installed
  tanzupackage          Install and manage Tanzu packages. Note: tanzu-standard package repository is     mission-control  v0.4.5                          installed
                        unavailable for non-TKG clusters.
  telemetry             configure cluster-wide settings for vmware tanzu telemetry                        global           v1.1.0                          installed
  workspace             A group of Kubernetes namespaces                                                  mission-control  v0.1.20                         installed

Release note

Updates to `tanzu plugin list`, and `tanzu plugin sync` user experience. All plugins are installed as standalone plugins.

Additional information
Special notes for your reviewer

Thanks, @marckhouzam @vuil  for the review and feedback. I am updating based on what we discussed in our meeting.
Adding some details here based on what we discussed during our meeting.

On the other hand, it is only when I saw the code that I understood what the ACTIVE column really meant.  Until then I thought it was a short form of installed vs not installed.  I think this needs to be described, maybe in the help.

We decided to hide the --wide flag for tanzu plugin list as it will be mainly used for debugging purpose for now and users should not need to know about the ACTIVE column at the moment.

The status "update recommended" should be "upgrade recommended" I think.  The command we have is tanzu plugin upgrade.  Also, for package managers, update is used to get the latest info while upgrade is used to install a new version.

Because there is a chance that when switching the context user might want to downgrade a plugin as well, we decided to use update here.

Am I right that in a future effort, we can cleanup the logic of the catalog to no longer deal with context plugins?

Yes. I will fill an issue to track this.

For discussion for a potential follow-up:
I was about to delete this comment, but then I thought that when a user sees "install recommended" or "update recommended" in the plugin list output, they may just try tanzu plugin install <plugin>.  The below would address this scenario.
What if, when doing plugin install <plugin> with no version specified, instead of always using the latest we would use the recommended version?  One could argue that if a version is recommended, that is what should be installed with plugin install.  We could also not require the --target flag if only one plugin with a name is recommended but not installed.

+1 Good point. I will file an issue to track this enhancement.

Below are some thoughts that I'd like to discuss with you. I'm not sure any of them are good ideas or not.
A- In plugin list, in the RECOMMENDED column, should we put "N/A" or "none" or something like that for plugins that are not currently recommended?

We decided to keep it empty as it is.

B- In plugin list, I was wondering about the sorting. Would it be nicer to sort uninstalled plugins at the end, or maybe even better sorting by the STATUS colum so plugins that need a sync (to install or upgrade) are shown at the bottom?

We decided to keep it sorted by names for now.

C- When synching plugins (plugin sync, context create/use) I find the column names a bit confusing:

Agreed. Updated PR to address this.

D- I'm getting used to the empty INSTALLED column meaning "not installed", but at the beginning it was not totally obvious, especially since we don't use "not installed" but "install recommended" (which I like). So I'm wondering if we should put "none" instead of empty? But I'm not sure at all to be honest.

We decided to use empty columns for this one.

E- When I unset a context, do I need a way to uninstall the corresponding context plugins? I'm starting to see that keeping them is probably easier to understand for users, but what will they do if they want to remove them once they get rid of a context that is using plugins that have been abandoned? Rare case probably. I think we should consider to eventually (not this PR) provide a way to do a cleanup. Maybe a plugin clean that does not wipe the cache.

We might have to think about this but it might not be based on the context but can do something similar in different ways. But we decided to not do anything for this PR.


Show Md5 and Sha256 hashes in details dialog

Show these on the dialog.
Clicking each should copy the relevant hash to the clipboard.

Are you sure you're commenting on the right repo? What hidden apk? :')


Heap overflow when it tries to generate an index for my profile

When I run cohost-dl I'm seeing this output:
generating index for viv
<--- Last few GCs --->

[2547006:0x5649aeec0000]   291368 ms: Mark-Compact (reduce) 1399.2 (1407.8) -> 1396.7 (1401.9) MB, pooled: 0 MB, 134.19 / 0.00 ms  (+ 1.3 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 143 ms) (average mu = 0.56[2547006:0x5649aeec0000]   291540 ms: Mark-Compact 1398.0 (1402.1) -> 1396.1 (1405.6) MB, pooled: 0 MB, 168.97 / 0.00 ms  (average mu = 0.332, current mu = 0.017) allocation failure; scavenge might not succeed

<--- JS stacktrace --->

#
# Fatal JavaScript out of memory: Reached heap limit
#
==== C stack trace ===============================

    deno(+0x2d8b133) [0x5649a95f7133]
    deno(+0x2d8a9fb) [0x5649a95f69fb]
    deno(+0x2d85f18) [0x5649a95f1f18]
    deno(+0x2ddc1ac) [0x5649a96481ac]
    deno(+0x2f90467) [0x5649a97fc467]
    deno(+0x2f8e613) [0x5649a97fa613]
    deno(+0x2f85211) [0x5649a97f1211]
    deno(+0x2f85ce2) [0x5649a97f1ce2]
    deno(+0x2f6b55a) [0x5649a97d755a]
    deno(+0x33e0d22) [0x5649a9c4cd22]
    deno(+0x426ad36) [0x5649aaad6d36]
./run.sh: line 3: 2547006 Trace/breakpoint trap   (core dumped) deno run --allow-env --allow-ffi --allow-net --allow-read --allow-sys --allow-write=out main.ts

This is on a machine with 12GB of physical ram so it's probably not running out of memory. I don't know much about deno but I can try to either collect more info or investigate myself later if you have any ideas of what it could be.

OK, it's a ~38mb html file and took around 4gb ram at peak. I'm not able to open it in Firefox, but Edge is able to (slowly!) handle it.
posts.json contains 1361 posts.

lol
let me know if there's anything you want me to try. one idea is to write a stream of newline-separated json objects to posts.json instead of an array where the whole array needs to be held in memory at once. that doesn't directly help with building the html doc(s) but would at least be more manageable to work with.


Please improve the documentation how to use a non global database

Describe your use-case which is not covered by existing documentation.
This plugin is also very helpful for end users if they want to execute SQL command in a pipeline
As example I created this pipeline script (could perhaps be added as example to the documentation):
node {
  stage('Verify') {
    getDatabaseConnection(type: "GLOBAL") {
      def resultCount = sql(sql: "SELECT count(*) FROM identifier i1, identifier i2 WHERE i1.value = i2.value AND i1.product_id < i2.product_id");
      def duplicates = resultCount.get(0).get('count');
      if (duplicates > 0) {
          if (duplicates < 201) {
            echo "Found ${duplicates} duplicates:";
            def duplicateIds = sql(sql: "SELECT i1.product_id id FROM identifier i1, identifier i2 WHERE i1.value = i2.value AND i1.product_id < i2.product_id");
            for(duplicateId in duplicateIds) {
                def id = duplicateId.get('id');
                echo "${id}";
            }
          }
          error "Found ${duplicates} duplicates ...";
      }
    }
  }
}

But this only works if I configure a database in Jenkins / Configure system
I was not able to find an example how to configure the database in the pipeline or in a stage of the script.
EDIT: Yes, I have seen the "This plugin is not meant to be used by end users by itself" but why not make a plugin helpful for many users?

@basil @jetersen @timja Could someone answer this question please?

you can't configure a database in the pipeline itself currently, only via global configuration

yes that would be fine if someone implemented it


Update .gitignore file

For better stability and security

Thanks for the contribution!

You're Welcome @jeffdefacto . Hope I'm able to help you out more in future 👍 😃 .


Callback api change

change for https://github.com/puuu/ESPiLight/pull/19

This seems not to be used in further commits. Close it.


About the data and model apply

Hi, I would like to test the model using the data I have and I have some questions.
The provided 'data' in the paper and GitHub repository uses the sklearn dataset. If I want to augment my own dataset, should I format it as a DataFrame and place it in the 'data = {mydata}?
Additionally, I noticed in a previous issue that it is possible to use an alternative API for the LLM integrated into the model, such as models available on Hugging Face. In this case, should I specify the model path, for example, "meta-llama/Meta-Llama-3-8B-Instruct"?
Thank you.

Hi,

If I want to augment my own dataset, should I format it as a DataFrame and place it in the 'data = {mydata}?
That is correct, our approach requires feature names and thus it needs pandas DataFrames as input.

In this case, should I specify the model path, for example, "meta-llama/Meta-Llama-3-8B-Instruct"?
Yes, but I recommend to use the base version of this models, such as Llama-3.2-1B, not the instruct

Hi, Thanks a lot for your reply.
Can I leave additional issues if I have any questions? 😅

Glad to help.
Sure, just open an issue


Create a mask for a smaller image

There is a suggestion that the image size we are using is larger than it needs to be, which is potentially limiting our ability to train more complex models. After analysis of the distance clouds are likely to move in the three hours of our prediction window, a smaller image size of 350km distance from the PVNet bounding box seems more logical.
Instead of having to re-download all the data, we will add the coordinates of this mask to the repo

In the end, I did re-download all the data into Baskerville, it is in the eumetsat/cropped folder. I add the dimensions of this mask to the code in #78


Add ability to remove faux menu

Closes #72

Very nice! Thanks!
One other thing that I found confusing is that the Title option stays enabled when disabling the Header. Since it's not showing, it should probably enable and disable together with the Header option?

No problem!

it should probably enable and disable together with the Header option?

Yea we could do that 👍  I've created an issue for it here: https://github.com/stevebauman/showcode/issues/75


UConn incorrect logo

UConn logo URL takes you to Notre Dame. Logo URL should be https://a.espncdn.com/combiner/i?img=/i/teamlogos/ncaa/500/41.png

Fixed!


How to delete a project created ?

Because of multiple failed project, now I have many projects created, how can I delete the projects ?

For now, I just go to devika.db and remove the projects in sqlite DB direct. It work


Open links in Announcement in a new page

Suggestion: Open links in Announcement in a new page :)

nvm found a config option that can do this
$g_html_make_links = LINKS_NEW_WINDOW;


Add teams list and device posture rule resources

@Justin-Holmes are we able to drop the dependency upgrades here please? we generally bump them outside of the PRs and then just update the PRs to prevent conflicts (which it looks like we have here).

@jacobbednarz Are those linter errors a concern? I'm happy to fix them if so.

Yeah, they are worth while listening to. They generally catch hard to debug issues (like type incompatibilites in the schema) which commonly silently fail.

@jacobbednarz Alright, should be fixed!

noice! 👏


Pass parameters on train_step/validation_step/test_step

🚀 Feature
As title
Motivation
I'm currently working with Seq-to-seq architecture, which requires a variable called max_length when decoding outputs. I mean, while training, it could be fixed as a model hyperparameter. However, during testing, we could vary its value to make predict longer or shorter in need. Therefore, I think there should be a way to pass other arguments in the validating/testing phase to make it more flexible, especially with argparse. This also helps in case we have different strategies during evaluating, such as I could select either greedy or beam search algorithms.
For example:
I could run
# training model with max_length = 15 and using Greedy (as default) to save training time
python train.py --max_length 15

# eval model with a longer length and use Beamsearch to increase performance
python eval.py epoch=0.ckpt --max_length 20 --using_beamsearch

@VinhLoiIT you could try this argparse docs and its best practices


Allow renaming states

Setting meaningful names for states greatly helps understanding what the automaton does. This commit allows the user to set display names for the states (the internal ID being the default), while keeping the internal IDs intact. It also adjusts the layout to account for longer user-defined names: the states may be wider than 100px if needed (but never narrower). It uses flexbox, which has pretty good browser support, and degrades gracefully even in browsers not supporting it.

Thanks for the PR, that is a nice feature.


Adding EU27 & UK (*) for OSeMBE

Added "EU27 & UK ()" under "common regions". This region is the same as our "EU27 & UK" but the new "EU27 & UK ()" region is added so that a filter for "EU27 & UK (*)" can be applied, and by doing so getting results from all models.

Looks good, but please also add the approximate-region EU27 (*).
cc @robertpietzcker

Thanks for pointing it out @danielhuppmann , now the EU27 (*) has also been added.


Getting 'uninitialized constant PM (NameError)', but ProMotion:: works fine?

I've just upgraded everything to the latest gems for ProMotion and I'm noticing that the ::PM short-cut (which I think is defined here) is not defined by the time the app runs.
This is odd, because ::ProMotion is defined, and works as expected.
Rakefile looks like this:
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/ios'
require 'motion/project/template/gem/gem_tasks'

require 'bundler'
require 'bundler/gem_tasks'

begin
  if ARGV.join(' ') =~ /spec/
    Bundler.require :default, :spec
  else
    Bundler.require
  end
rescue Exception => e
  puts "Exception processing Bundler.require:"
  puts e
end

require 'ib'
require 'cdq'
require 'rubygems'
require 'motion-cocoapods'
require 'bubble-wrap'
require 'bubble-wrap/all'
require 'sugarcube-all'
require 'ProMotion'
require 'motion-layout'
require 'motion-kit'
require 'motion-kit-events'
require 'restikle'
require 'tillless-uikit'

Motion::Project::App.setup do |app|
  app.name                 = 'T-UIKit'
  app.identifier           = '...'
  app.codesign_certificate = '...'
  app.provisioning_profile = 'provisioning/iOS_Team_Provisioning_Profile_.mobileprovision'

  app.frameworks += [
    'AddressBook',
    'AddressBookUI',
    'AudioToolbox',
    'AVFoundation',
    'CoreMedia',
    'CoreVideo',
    'CoreLocation',
    'CoreBluetooth',
    'QuartzCore',
    'CoreData',
    'MessageUI',
    'MobileCoreServices',
    'OpenGLES',
    'Security',
    'UIKit',
    'SystemConfiguration'
  ]
  app.detect_dependencies    = true
  app.interface_orientations = [:portrait]

  if ARGV.include? 'spec'
    app.name = 'T-UIKit Spec'
  end

  app.pods do
    pod 'AFNetworking', '~> 1.3.4'
    pod 'RestKit'
    pod 'NSData+MD5Digest'
    pod 'NSData+Base64'
    pod 'SVProgressHUD'
    pod 'JMImageCache'
    pod 'SVProgressHUD'
    pod 'TSMessages'
    pod 'ABPadLockScreen'
  end
end

Any ideas?

Hmm ... and it's worse than I thought. Changing  PM  to ProMotion in the app_delegate.rb is fine, but as soon as I go to use any other ProMotion classes, they're all using the PM:: shorthand, at which point the app crashes. This is only a very, very simple app with a couple of skeleton screens in it, so I'm quite confused as to why this is happening ...

Just throwing it out there did you try rake clean:all ? From time to time I have noticed that's required after a gem update.

Yeah, always a good tip. Sadly, not helping, I'm afraid.

Yep, it was purely build order. An updated version of my lib/gem_name.rb file fixed it. Very odd, because I've been using that format for a while. I think the problem might have been that have split the gem into lib and motion components. I must have been incorrectly including them two parts somehow.
Anyway, fixed now.

heh I was having a hard time recreating it - glad you sorted it out!

These load path/load order issues have been some of the more annoying and persistent ones on ProMotion. Thought I fixed it with 2.2 with the manually specified file dependencies. Perhaps I should add one for pro_motion.rb.

I've never been a fan of those manual dependencies, they always seem like such a hack ...

Me either! But it's the only way some gems will play well with ProMotion. :-/

Work around incase anyone stumbles over this:
  (inside of Rakefile.rb)
  puts app.ordered_build_files

  files = [whatever build order you want]

  files.each do |f|
    app.ordered_build_files.delete(f)
  end

  files.each do |f|
    app.ordered_build_files << f
  end

Not bad!


installation + run instructions

ref: #39

LGTM, thank you @AndreSlavescu
We can add more details about step by step, retrieve, rerank, etc in a follow up cl. Once we have the resource paper drafted, it would be easy to add similar details here.


⚠ Bofrost.nl has degraded performance

In fd19abe, Bofrost.nl (https://www.bofrost.nl) experienced degraded performance:

HTTP code: 200
Response time: 870 ms

Resolved: Bofrost.nl performance has improved in 419535c.


Newly opened panel is small

Related:

https://github.com/microsoft/vscode/issues/77884
https://github.com/microsoft/vscode/issues/77954

When doing Cmd+Shift+N, panel is much smaller than it used to be:
Insiders:

Stable:

Also, now in Stable I can do:

Open one window
Open panel
Resize the panel
Open a new window
The new window inherits the same panel height

Now the panel is resized to a smaller default height.

Issue is believed to be fixed, if you are restoring from a previously serialized grid with a small panel, just resize it and it should go away. Re-open if you see it any other case.


proposal: Implement render props & prop getters for customisability

I'm opening a small issue to document this discussion that has before happened "behind the scenes".
Essentially react-simple-code-editor has two major problems. Firstly, specific styles and DOM structures and attributes must be used to make the pattern work. And secondly, this leads to a problem when minor specifics need to be customised, like additional styles, style overrides, extra classNames, ID props, other custom props... —  the list goes on.
Compared to the current way of writing an editor let's explore an alternative (unchanged props have been omitted)
const wrapperStyle = {
  fontFamily: '"Fira code", "Fira Mono", monospace',
  fontSize: 12
}

<Editor>
  {({ getWrapperProps, getTextareaProps, getPreProps }) => (
    <div {...getWrapperProps({ style: wrapperStyle })}>
      <textarea {...getTextareaProps()} id="editor" />
      <pre {...getPreProps({ className: 'prism-theme-dracula' })} />
    </div>
  )}
</Editor>

I could see this working, though, the DOM structure needs to be respected to work, so maybe
const wrapperStyle = {
  fontFamily: '"Fira code", "Fira Mono", monospace',
  fontSize: 12
}

<Editor
  slotProps={{
   root: { style: wrapperStyle },
   textarea: { id: 'editor'},
   highlight: 'prism-theme-dracula',
  }}
/>


Task - Error shows up when creating task via [] @mention  pathway

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: 1.4.24-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Issue found when executing PR https://github.com/Expensify/App/pull/33428
Action Performed:

Go to an empty 1:1 DM
Send [] @mention  where @mention is not the DM user

Expected Result:
The task is created and assigned to the mentioned user.
Actual Result:
The task is not created. Error shows up - Unexpected error create task, please try again later
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/Expensify/App/assets/78819774/00b96f67-ad35-4118-86b6-ace461cbbdef
View all open jobs on GitHub

Assigning @thienlnam since he's been working on this with the contributors on this functionality
But I was not able to simulate this error both on DMs and group chats when inviting people that were not participants, @lanitochka17

I'm not sure if this is the desired behavior, but:

I had a chat with user 1
created a task using the md syntax for user 2
The task was created, assigned to user 2, but also shared with user 1
The task was listed in both 1:1 chats I had with user 1 and user 2

@thienlnam I'll let you chime in from there!

Following because I was testing with him and I thought the behavior was weird/wrong. IMO the user2 should NOT see the task in the DM report, they should only see it in the LHN.

I'm not sure if this is the desired behavior, but:
I had a chat with user 1
created a task using the md syntax for user 2
The task was created, assigned to user 2, but also shared with user 1
The task was listed in both 1:1 chats I had with user 1 and user 2

Yes this is correct behavior - so let's take User A and User B

You're chatting in the DM with User A
In that DM, you create a task for User B ([] @UserB task)
In the DM with User B, you get linked to the task that was created in the DM with User B

I tested this and this seems to be working fine for me - not able to get the failure as mentioned and neither can Daniel so going to remove the blocker

It did not, but you're taking an action that requires something of someone else.
I assigned the task to you specifically, and so it will show up in the DM between us even if it was created somewhere else.
Side note - going to be closing this issue since this bug doesn't seem to be happening. Happy to talk this through more in slack if needed


UAirship.shared().getPushManager().getChannelId() always return null

In push sample app I am getting channelId null always.
private void updateChannelIdField() {
        String channelIdString = UAirship.shared().getPushManager().getChannelId();
        Log.e("","My Application Channel ID: " + channelIdString);
        channelIdString = UAStringUtil.isEmpty(channelIdString) ? "" : channelIdString;

        // fill in channel ID text
        if (!channelIdString.equals(channelID.getText())) {
            channelID.setText(channelIdString);
        }
    }

output
E/﹕ My Application Channel ID: null

Channel registration is an asynchronous operation that requires a network connection. Also, before the SDK starts the channel registration process it tries to register with GCM.  If the channel might not be available right away, but eventually should be created. The sample app will automatically responds to the channel creation and display the channel on the home screen.  It sounds like it might not be happening for you so if you were to check the logs and see if anything stands out such as channel registration failed,  gcm registration failed, etc...
If you can, please post your logs here. Before doing so, remove any app credentials.

Closing now. This is most likely a config issue.


[Bug] Can't call the ApiClientCredentialsProvider class on import

Simple script:
from jamf_pro_sdk import JamfProClient, ApiClientCredentialsProvider

url="https://test.jamfcloud.com"
client_id="<redacted>"
client_secret="<redacted>"

client = JamfProClient(
    server="snyk.jamfcloud.com",
    credentials=ApiClientCredentialsProvider(client_id, client_secret)
)

all_computers = client.pro_api.get_computer_inventory_v1()
print(all_computers)

This results in: cannot import name 'ApiClientCredentialsProvider' from 'jamf_pro_sdk' (/opt/homebrew/lib/python3.11/site-packages/jamf_pro_sdk/init.py)
Installed:
jamf-pro-sdk                   0.4a1

It's missing from here: https://github.com/macadmins/jamf-pro-sdk-python/blob/main/src/jamf_pro_sdk/init.py

The base client credentials provider will be added to the top-level imports in the next update.

Howdy @brysontyrrell, any update on when this issue might be resolved? Unless there's a workaround available, this is a pretty big blocker for me using the sdk.

The ApiClientCredentialsProvider is available as an import using this code:
from jamf_pro_sdk.clients.auth import ApiClientCredentialsProvider

I am planning an overhaul to the credentials providers. Please see #47 for details and to provide feedback.


Retrieving all relationships while filtering on hasMany relationship

I'm trying to retrieve all models filtered by a hasMany field they have (simplified code below) as well as retrieve their belongsTo model fields. In other words, retrieve all "assignments" where "assignment_dates"  has a certain "date", and retrieve all the fields from all the relationships (course/category/assignment_date).
When I try to do this it always returns an object with all fields null even if it shouldn't return anything.
link to jsfiddle
export default class Category extends Model {
  static entity = 'categories'

  static fields () {
    return {
      id: this.increment(),
      name: this.string(null)
    }
  }
}

export default class Course extends Model {
  static entity = 'courses'

  static fields () {
    return {
      id: this.increment(),
      name: this.string(null),
      assignments: this.hasMany(Assignment, 'course_id')
    }
  }
}

export default class Assignment extends Model {
  static entity = 'assignments'

  static fields () {
    return {
      id: this.increment(),
      cat_id: this.attr(''),
      course_id: this.attr(''),
      category: this.belongsTo(Category, 'cat_id'),
      course: this.belongsTo(Course, 'course_id'),
      assignment_dates: this.hasMany(AssignmentDate, 'assignment_id')
    }
  }
}

export default class AssignmentDate extends Model {
  static entity = 'assignments_dates'

  static fields () {
    return {
      id: this.increment(),
      assignment_id: this.attr(''),
      date: this.string(''),
      assignment: this.belongsTo(Assignment, 'assignment_id')
    }
  }
}

I tried the following to retrieve all the info:
const assignments = Assignment.query().whereHas('assignment_dates',
      (query) => {query.where('date', date)}).withAll().get();

I also tried without getting all the fields (without "withAll()") but I got the same result.
const assignments = Assignment.query().whereHas('assignment_dates',
      (query) => {query.where('date', date)})().get();

@stop-start Thank you for the report! OK I've confirmed. The issue is some how course and category gets null, right? This is wired issue but I strongly think this is a defect. I'll look into it!

Great thanks!
It's not only course and category but also the assignment_dates array is empty.
I thought maybe the way I query the data wasn't right.

I am not sure if this is related to the following error:
vuex-orm.esm.js?0937:1354 Uncaught TypeError: Cannot read property 'reduce' of null
    at HasManyBy.getRelatedRecords (vuex-orm.esm.js?0937:1354)
    at eval (vuex-orm.esm.js?0937:1336)
    at Array.forEach (<anonymous>)
    at HasManyBy.load (vuex-orm.esm.js?0937:1335)
    at Function.Loader.eagerLoadRelations (vuex-orm.esm.js?0937:3535)
    at Query.collect (vuex-orm.esm.js?0937:4379)
    at Query.get (vuex-orm.esm.js?0937:4048)
    at HasManyBy.load (vuex-orm.esm.js?0937:1334)
    at Function.Loader.eagerLoadRelations (vuex-orm.esm.js?0937:3535)
    at Query.collect (vuex-orm.esm.js?0937:4379)

happens when trying to query using eg:
  Assignment.query().withAll().get()
 // or
  Assignment.query().withAllRecursive().get()

I have fixed the and will push a PR soon. Just have to write an new issue so that you understand the problem and my solution.

see  #391

I think we can close this. It is indeed working now.

Ah great! Thank you for the inform 👍


1.0.9 is missing from pypi

https://pypi.org/project/py9p/ is missing latest 1.0.9 compatible with Python 3 and source release from https://github.com/svinota/py9p/archive/1.0.9.tar.gz is not installable.

I do not think he is the owner of the py9p namespace on pypi, this is why it isn't installable with pip

@svinota are you the maintainer of https://pypi.org/project/py9p/ ?

@abitrolly I am, but the code is so outdated, so I planned to retire & rewrite completely for Python 3, probably using a different protocol parser.

Any update on new version of py9p on py3?


Canvas unit test fail

Describe the bug
The variable "isPreview" should have been remove before merging the https://github.com/xlayers/xlayers/pull/66 because it's now always null and not used anymore.
The newly introduced SketchSelectedLayerDirective fail the canvas unit test "should have current page", the reason is still unknow.
To Reproduce
Steps to reproduce the behavior:

Checkout fix/unit-test
Remove the test skip by replacing "fit" by "it" at line 47
Run "npm run test"

Expected behavior
Should success unit tests
Desktop (please complete the following information):

OS: MacOS 10.14.1
Browser Firefox
Version 63.0.3

fixed https://github.com/xlayers/xlayers/pull/74


time decoding error with "days since"

I am trying to use xray with some CESM POP model netCDF output, which supposedly follows CF-1.0 conventions. It is failing because the models time units are "'days since 0000-01-01 00:00:00". When calling open_dataset, I get the following error:
ValueError: unable to decode time units u'days since 0000-01-01 00:00:00' with the default calendar. Try opening your dataset with decode_times=False. Full traceback:
Traceback (most recent call last):
  File "/home/rpa/xray/xray/conventions.py", line 372, in __init__
    # Otherwise, tracebacks end up swallowed by Dataset.__repr__ when users
  File "/home/rpa/xray/xray/conventions.py", line 145, in decode_cf_datetime
    dates = _decode_datetime_with_netcdf4(flat_num_dates, units, calendar)
  File "/home/rpa/xray/xray/conventions.py", line 97, in _decode_datetime_with_netcdf4
    dates = np.asarray(nc4.num2date(num_dates, units, calendar))
  File "netCDF4/_netCDF4.pyx", line 4522, in netCDF4._netCDF4.num2date (netCDF4/_netCDF4.c:50388)
  File "netCDF4/_netCDF4.pyx", line 4337, in netCDF4._netCDF4._dateparse (netCDF4/_netCDF4.c:48234)
ValueError: year is out of range

Full metadata for the time variable:
    double time(time) ;
        time:long_name = "time" ;
        time:units = "days since 0000-01-01 00:00:00" ;
        time:bounds = "time_bound" ;
        time:calendar = "noleap" ;

I guess this is a problem with the underlying netCDF4 num2date package?

In fact I just found a netCDF issue on this topic! Apparently they don't think it should be supported. Unidata/netcdf4-python#442

@rabernat -
Yes - this is all coming from the netCDF4.netcdftime module.
The work around with xray is to use ds = xray.open_dataset(filename, decode_times=False) then to fix up the time variable "manually". You can use xray.decode_cf() or simply assign a new pandas time index to your time variable.
As an aside, I also work with CESM output and this is a common problem with its netCDF output.

@jhamman consider using cf_units in xray :wink:
(See https://github.com/Unidata/netcdf4-python/issues/442#issuecomment-129059576)

The PR above fixes this issue. However, since my model years are in the range 100-200, I am still getting the warning
RuntimeWarning: Unable to decode time axis into full numpy.datetime64 objects, continuing using dummy netCDF4.datetime objects instead, reason: dates out of range

and eventually when I try to access the time data, an error with a very long stack trace ending with
pandas/tslib.pyx in pandas.tslib.Timestamp.__new__ (pandas/tslib.c:7638)()
pandas/tslib.pyx in pandas.tslib.convert_to_tsobject (pandas/tslib.c:21232)()
pandas/tslib.pyx in pandas.tslib._check_dts_bounds (pandas/tslib.c:23332)()
OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 100-02-01 00:00:00

I see there is a check in conventions.py that the year has to lie between 1678 and 2226. What is the reason for this?

We try to cast all the time variables to a pandas time index.  This gives xray the ability to use many of the fast and fancy timeseries tools that pandas has.  One consequence of that is that non-standard calendars, such as the "noleap" calendar must have dates inside the valid range of the standard calendars (1678 and 2226).
Does that make since? Ideally, numpy and pandas would support custom calendars but they don't so, at this point, we're bound to there limits.

@jhamman Thanks for the clear explanation! One of the main uses for non-standard calendars would be climate model "control runs", which don't occur any any specific point in historical time but still have seasonal cycles, well defined months, etc. It would be nice to have "group by" functionality for these datasets. But I do see how this is impossible with the current numpy datetime64 datatype. Perhaps the long term fix is to implement non-standard calendars within numpy itself.

Perhaps the long term fix is to implement non-standard calendars within numpy itself.

I agree, although that sounds like quite an undertaking.  Maybe raise an issue over at numpy and ask if they would be interested in a multi-calendar api? If numpy could make it work, then I'm sure pandas could as well.

In case anyone is still struggling with the CESM POP time units convention, with the new CF support of version 0.12 the problem is (almost) solved.
I have slightly different CESM POP netcdf output with time attributes {'units': 'days since 0-1-1 00:00:00',  'calendar': '365_day'} and crucially a dimension d2 (without coordinates) that trips up the decode_cf function.
import xarray as xr  # version >= 0.12

ds = xr.open_dataset('some_CESM_output_file.nc', decode_times=False)
ds = ds.drop_dims(['d2'])
ds = xr.decode_cf(ds, use_cftime=True)

Now the xarray Dataset has a cftime.DatetimeNoLeap type time coordinate.

Could you provide the output of ncdump -h or ds.info() on an example file?

Of course, here is the `ds.info()` output:
xarray.Dataset {
dimensions:
	bnds = 2 ;
	d2 = 2 ;
	nlat = 2400 ;
	nlon = 3600 ;
	time = 1 ;
	z_t = 42 ;
	z_t_150m = 12 ;
	z_w = 42 ;
	z_w_bot = 42 ;
	z_w_top = 42 ;
variables:
float64 time_bound(time, d2) ;
time_bound:long_name = boundaries for time-averaging interval ;
time_bound:units = days since 0000-01-01 00:00:00 ;
float64 time(time) ;
time:long_name = time ;
time:units = days since 0-1-1 00:00:00 ;
time:bounds = time_bnds ;
time:calendar = 365_day ;
time:standard_name = time ;
time:axis = T ;
float32 z_t(z_t) ;
z_t:long_name = depth from surface to midpoint of layer ;
z_t:units = centimeters ;
z_t:positive = down ;
z_t:valid_min =<PHONE_NUMBER>7734375 ;
z_t:valid_max = 587499.875 ;
z_t:axis = Z ;
float32 z_t_150m(z_t_150m) ;
z_t_150m:long_name = depth from surface to midpoint of layer ;
z_t_150m:units = centimeters ;
z_t_150m:positive = down ;
z_t_150m:valid_min =<PHONE_NUMBER>7734375 ;
z_t_150m:valid_max = 14895.82421875 ;
float32 z_w(z_w) ;
z_w:long_name = depth from surface to top of layer ;
z_w:units = centimeters ;
z_w:positive = down ;
z_w:valid_min = 0.0 ;
z_w:valid_max = 574999.875 ;
float32 z_w_top(z_w_top) ;
z_w_top:long_name = depth from surface to top of layer ;
z_w_top:units = centimeters ;
z_w_top:positive = down ;
z_w_top:valid_min = 0.0 ;
z_w_top:valid_max = 574999.875 ;
float32 z_w_bot(z_w_bot) ;
z_w_bot:long_name = depth from surface to bottom of layer ;
z_w_bot:units = centimeters ;
z_w_bot:positive = down ;
z_w_bot:valid_min = 1001.2440185546875 ;
z_w_bot:valid_max = 599999.875 ;
float32 dz(z_t) ;
dz:long_name = thickness of layer k ;
dz:units = centimeters ;
float32 dzw(z_w) ;
dzw:long_name = midpoint of k to midpoint of k+1 ;
dzw:units = centimeters ;
float64 ULONG(nlat, nlon) ;
ULONG:long_name = array of u-grid longitudes ;
ULONG:units = degrees_east ;
ULONG:standard_name = longitude ;
ULONG:_CoordinateAxisType = Lon ;
float64 ULAT(nlat, nlon) ;
ULAT:long_name = array of u-grid latitudes ;
ULAT:units = degrees_north ;
ULAT:standard_name = latitude ;
ULAT:_CoordinateAxisType = Lat ;
float64 TLONG(nlat, nlon) ;
TLONG:long_name = array of t-grid longitudes ;
TLONG:units = degrees_east ;
TLONG:standard_name = longitude ;
TLONG:_CoordinateAxisType = Lon ;
float64 TLAT(nlat, nlon) ;
TLAT:long_name = array of t-grid latitudes ;
TLAT:units = degrees_north ;
TLAT:standard_name = latitude ;
TLAT:_CoordinateAxisType = Lat ;
float64 KMT(nlat, nlon) ;
KMT:long_name = k Index of Deepest Grid Cell on T Grid ;
float64 KMU(nlat, nlon) ;
KMU:long_name = k Index of Deepest Grid Cell on U Grid ;
float64 REGION_MASK(nlat, nlon) ;
REGION_MASK:long_name = basin index number (signed integers) ;
float64 UAREA(nlat, nlon) ;
UAREA:long_name = area of U cells ;
UAREA:units = centimeter^2 ;
float64 TAREA(nlat, nlon) ;
TAREA:long_name = area of T cells ;
TAREA:units = centimeter^2 ;
float64 HU(nlat, nlon) ;
HU:long_name = ocean depth at U points ;
HU:units = centimeter ;
float64 HT(nlat, nlon) ;
HT:long_name = ocean depth at T points ;
HT:units = centimeter ;
float64 DXU(nlat, nlon) ;
DXU:long_name = x-spacing centered at U points ;
DXU:units = centimeters ;
float64 DYU(nlat, nlon) ;
DYU:long_name = y-spacing centered at U points ;
DYU:units = centimeters ;
float64 DXT(nlat, nlon) ;
DXT:long_name = x-spacing centered at T points ;
DXT:units = centimeters ;
float64 DYT(nlat, nlon) ;
DYT:long_name = y-spacing centered at T points ;
DYT:units = centimeters ;
float64 HTN(nlat, nlon) ;
HTN:long_name = cell widths on North sides of T cell ;
HTN:units = centimeters ;
float64 HTE(nlat, nlon) ;
HTE:long_name = cell widths on East sides of T cell ;
HTE:units = centimeters ;
float64 HUS(nlat, nlon) ;
HUS:long_name = cell widths on South sides of U cell ;
HUS:units = centimeters ;
float64 HUW(nlat, nlon) ;
HUW:long_name = cell widths on West sides of U cell ;
HUW:units = centimeters ;
float64 ANGLE(nlat, nlon) ;
ANGLE:long_name = angle grid makes with latitude line ;
ANGLE:units = radians ;
float64 ANGLET(nlat, nlon) ;
ANGLET:long_name = angle grid makes with latitude line on T grid ;
ANGLET:units = radians ;
float64 days_in_norm_year() ;
days_in_norm_year:long_name = Calendar Length ;
days_in_norm_year:units = days ;
float64 grav() ;
grav:long_name = Acceleration Due to Gravity ;
grav:units = centimeter/s^2 ;
float64 omega() ;
omega:long_name = Earths Angular Velocity ;
omega:units = 1/second ;
float64 radius() ;
radius:long_name = Earths Radius ;
radius:units = centimeters ;
float64 cp_sw() ;
cp_sw:long_name = Specific Heat of Sea Water ;
cp_sw:units = erg/g/K ;
float64 sound() ;
sound:long_name = Speed of Sound ;
sound:units = centimeter/s ;
float64 vonkar() ;
vonkar:long_name = von Karman Constant ;
float64 cp_air() ;
cp_air:long_name = Heat Capacity of Air ;
cp_air:units = joule/kg/degK ;
float64 rho_air() ;
rho_air:long_name = Ambient Air Density ;
rho_air:units = kg/m^3 ;
float64 rho_sw() ;
rho_sw:long_name = Density of Sea Water ;
rho_sw:units = gram/centimeter^3 ;
float64 rho_fw() ;
rho_fw:long_name = Density of Fresh Water ;
rho_fw:units = gram/centimeter^3 ;
float64 stefan_boltzmann() ;
stefan_boltzmann:long_name = Stefan-Boltzmann Constant ;
stefan_boltzmann:units = watt/m^2/degK^4 ;
float64 latent_heat_vapor() ;
latent_heat_vapor:long_name = Latent Heat of Vaporization ;
latent_heat_vapor:units = J/kg ;
float64 latent_heat_fusion() ;
latent_heat_fusion:long_name = Latent Heat of Fusion ;
latent_heat_fusion:units = erg/g ;
float64 ocn_ref_salinity() ;
ocn_ref_salinity:long_name = Ocean Reference Salinity ;
ocn_ref_salinity:units = g/kg ;
float64 sea_ice_salinity() ;
sea_ice_salinity:long_name = Salinity of Sea Ice ;
sea_ice_salinity:units = g/kg ;
float64 T0_Kelvin() ;
T0_Kelvin:long_name = Zero Point for Celsius ;
T0_Kelvin:units = degK ;
float64 salt_to_ppt() ;
salt_to_ppt:long_name = Convert Salt in gram/gram to g/kg ;
float64 ppt_to_salt() ;
ppt_to_salt:long_name = Convert Salt in g/kg to gram/gram ;
float64 mass_to_Sv() ;
mass_to_Sv:long_name = Convert Mass Flux to Sverdrups ;
float64 heat_to_PW() ;
heat_to_PW:long_name = Convert Heat Flux to Petawatts ;
float64 salt_to_Svppt() ;
salt_to_Svppt:long_name = Convert Salt Flux to Sverdrups*g/kg ;
float64 salt_to_mmday() ;
salt_to_mmday:long_name = Convert Salt to Water (millimeters/day) ;
float64 momentum_factor() ;
momentum_factor:long_name = Convert Windstress to Velocity Flux ;
float64 hflux_factor() ;
hflux_factor:long_name = Convert Heat and Solar Flux to Temperature Flux ;
float64 fwflux_factor() ;
fwflux_factor:long_name = Convert Net Fresh Water Flux to Salt Flux (in model units) ;
float64 salinity_factor() ;
float64 sflux_factor() ;
sflux_factor:long_name = Convert Salt Flux to Salt Flux (in model units) ;
float64 nsurface_t() ;
nsurface_t:long_name = Number of Ocean T Points at Surface ;
float64 nsurface_u() ;
nsurface_u:long_name = Number of Ocean U Points at Surface ;
float32 KE(time, z_t, nlat, nlon) ;
KE:long_name = Horizontal Kinetic Energy ;
KE:units = centimeter^2/s^2 ;
KE:grid_loc = 3221 ;
KE:cell_methods = time: mean ;
float32 TEMP(time, z_t, nlat, nlon) ;
TEMP:long_name = Potential Temperature ;
TEMP:units = degC ;
TEMP:grid_loc = 3111 ;
TEMP:cell_methods = time: mean ;
float32 SALT(time, z_t, nlat, nlon) ;
SALT:long_name = Salinity ;
SALT:units = gram/kilogram ;
SALT:grid_loc = 3111 ;
SALT:cell_methods = time: mean ;
float32 SSH2(time, nlat, nlon) ;
SSH2:long_name = SSH**2 ;
SSH2:units = cm^2 ;
SSH2:grid_loc = 2110 ;
SSH2:cell_methods = time: mean ;
float32 SHF(time, nlat, nlon) ;
SHF:long_name = Total Surface Heat Flux, Including SW ;
SHF:units = watt/m^2 ;
SHF:grid_loc = 2110 ;
SHF:cell_methods = time: mean ;
float32 SFWF(time, nlat, nlon) ;
SFWF:long_name = Virtual Salt Flux in FW Flux formulation ;
SFWF:units = kg/m^2/s ;
SFWF:grid_loc = 2110 ;
SFWF:cell_methods = time: mean ;
float32 EVAP_F(time, nlat, nlon) ;
EVAP_F:long_name = Evaporation Flux from Coupler ;
EVAP_F:units = kg/m^2/s ;
EVAP_F:grid_loc = 2110 ;
EVAP_F:cell_methods = time: mean ;
float32 PREC_F(time, nlat, nlon) ;
PREC_F:long_name = Precipitation Flux from Cpl (rain+snow) ;
PREC_F:units = kg/m^2/s ;
PREC_F:grid_loc = 2110 ;
PREC_F:cell_methods = time: mean ;
float32 SNOW_F(time, nlat, nlon) ;
SNOW_F:long_name = Snow Flux from Coupler ;
SNOW_F:units = kg/m^2/s ;
SNOW_F:grid_loc = 2110 ;
SNOW_F:cell_methods = time: mean ;
float32 MELT_F(time, nlat, nlon) ;
MELT_F:long_name = Melt Flux from Coupler ;
MELT_F:units = kg/m^2/s ;
MELT_F:grid_loc = 2110 ;
MELT_F:cell_methods = time: mean ;
float32 ROFF_F(time, nlat, nlon) ;
ROFF_F:long_name = Runoff Flux from Coupler ;
ROFF_F:units = kg/m^2/s ;
ROFF_F:grid_loc = 2110 ;
ROFF_F:cell_methods = time: mean ;
float32 SALT_F(time, nlat, nlon) ;
SALT_F:long_name = Salt Flux from Coupler (kg of salt/m^2/s) ;
SALT_F:units = kg/m^2/s ;
SALT_F:grid_loc = 2110 ;
SALT_F:cell_methods = time: mean ;
float32 SENH_F(time, nlat, nlon) ;
SENH_F:long_name = Sensible Heat Flux from Coupler ;
SENH_F:units = watt/m^2 ;
SENH_F:grid_loc = 2110 ;
SENH_F:cell_methods = time: mean ;
float32 LWUP_F(time, nlat, nlon) ;
LWUP_F:long_name = Longwave Heat Flux (up) from Coupler ;
LWUP_F:units = watt/m^2 ;
LWUP_F:grid_loc = 2110 ;
LWUP_F:cell_methods = time: mean ;
float32 LWDN_F(time, nlat, nlon) ;
LWDN_F:long_name = Longwave Heat Flux (dn) from Coupler ;
LWDN_F:units = watt/m^2 ;
LWDN_F:grid_loc = 2110 ;
LWDN_F:cell_methods = time: mean ;
float32 MELTH_F(time, nlat, nlon) ;
MELTH_F:long_name = Melt Heat Flux from Coupler ;
MELTH_F:units = watt/m^2 ;
MELTH_F:grid_loc = 2110 ;
MELTH_F:cell_methods = time: mean ;
float32 IAGE(time, z_t, nlat, nlon) ;
IAGE:long_name = Ideal Age ;
IAGE:units = years ;
IAGE:grid_loc = 3111 ;
IAGE:cell_methods = time: mean ;
float32 WVEL(time, z_w_top, nlat, nlon) ;
WVEL:long_name = Vertical Velocity ;
WVEL:units = centimeter/s ;
WVEL:grid_loc = 3112 ;
WVEL:cell_methods = time: mean ;
float32 UET(time, z_t, nlat, nlon) ;
UET:long_name = Flux of Heat in grid-x direction ;
UET:units = degC/s ;
UET:grid_loc = 3211 ;
UET:cell_methods = time: mean ;
float32 VNT(time, z_t, nlat, nlon) ;
VNT:long_name = Flux of Heat in grid-y direction ;
VNT:units = degC/s ;
VNT:grid_loc = 3121 ;
VNT:cell_methods = time: mean ;
float32 UES(time, z_t, nlat, nlon) ;
UES:long_name = Salt Flux in grid-x direction ;
UES:units = gram/kilogram/s ;
UES:grid_loc = 3211 ;
UES:cell_methods = time: mean ;
float32 VNS(time, z_t, nlat, nlon) ;
VNS:long_name = Salt Flux in grid-y direction ;
VNS:units = gram/kilogram/s ;
VNS:grid_loc = 3121 ;
VNS:cell_methods = time: mean ;
float32 PD(time, z_t, nlat, nlon) ;
PD:long_name = Potential Density Ref to Surface ;
PD:units = gram/centimeter^3 ;
PD:grid_loc = 3111 ;
PD:cell_methods = time: mean ;
float32 HMXL(time, nlat, nlon) ;
HMXL:long_name = Mixed-Layer Depth ;
HMXL:units = centimeter ;
HMXL:grid_loc = 2110 ;
HMXL:cell_methods = time: mean ;
float32 XMXL(time, nlat, nlon) ;
XMXL:long_name = Maximum Mixed-Layer Depth ;
XMXL:units = centimeter ;
XMXL:grid_loc = 2110 ;
XMXL:cell_methods = time: maximum ;
float32 TMXL(time, nlat, nlon) ;
TMXL:long_name = Minimum Mixed-Layer Depth ;
TMXL:units = centimeter ;
TMXL:grid_loc = 2110 ;
TMXL:cell_methods = time: minimum ;
float32 HBLT(time, nlat, nlon) ;
HBLT:long_name = Boundary-Layer Depth ;
HBLT:units = centimeter ;
HBLT:grid_loc = 2110 ;
HBLT:cell_methods = time: mean ;
float32 XBLT(time, nlat, nlon) ;
XBLT:long_name = Maximum Boundary-Layer Depth ;
XBLT:units = centimeter ;
XBLT:grid_loc = 2110 ;
XBLT:cell_methods = time: maximum ;
float32 TBLT(time, nlat, nlon) ;
TBLT:long_name = Minimum Boundary-Layer Depth ;
TBLT:units = centimeter ;
TBLT:grid_loc = 2110 ;
TBLT:cell_methods = time: minimum ;
float64 SSH(time, nlat, nlon) ;
SSH:long_name = Sea Surface Height ;
SSH:units = centimeter ;
SSH:grid_loc = 2110 ;
SSH:cell_methods = time: mean ;
float64 time_bnds(time, bnds) ;
float64 TAUX(time, nlat, nlon) ;
TAUX:long_name = Windstress in grid-x direction ;
TAUX:units = dyne/centimeter^2 ;
TAUX:grid_loc = 2220 ;
TAUX:cell_methods = time: mean ;
float64 TAUY(time, nlat, nlon) ;
TAUY:long_name = Windstress in grid-y direction ;
TAUY:units = dyne/centimeter^2 ;
TAUY:grid_loc = 2220 ;
TAUY:cell_methods = time: mean ;
float64 UVEL(time, z_t, nlat, nlon) ;
UVEL:long_name = Velocity in grid-x direction ;
UVEL:units = centimeter/s ;
UVEL:grid_loc = 3221 ;
UVEL:cell_methods = time: mean ;
float64 VVEL(time, z_t, nlat, nlon) ;
VVEL:long_name = Velocity in grid-y direction ;
VVEL:units = centimeter/s ;
VVEL:grid_loc = 3221 ;
VVEL:cell_methods = time: mean ;
// global attributes:
:title = spinup_pd_maxcores_f05_t12 ;
:history = Thu Sep 14 23:06:30 2017: ncks -A /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/monthly/NEW/needed_Ugrid_vars_0200-01.nc /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/monthly/NEW/spinup_pd_maxcores_f05_t12.pop.h.0200-01.nc
Thu Sep 14 23:01:57 2017: ncrename -d x_2,nlon -d y_2,nlat /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/monthly/NEW/needed_Ugrid_vars_0200-01.nc
Thu Sep 14 23:00:39 2017: ncks -v TAUX,TAUY,UVEL,VVEL /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/monthly/NEW/daily_to_monthly_fields_spinup_pd_maxcores_f05_t12.pop.h.0200-01.nc /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/monthly/NEW/needed_Ugrid_vars_0200-01.nc
Thu Sep 14 21:45:58 2017: cdo -b F64 -timmean /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/daily/spinup_pd_maxcores_f05_t12.pop.h.nday1.0200-01-01.nc /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/monthly/NEW/daily_to_monthly_fields_spinup_pd_maxcores_f05_t12.pop.h.0200-01.nc
none ;
:Conventions = CF-1.0; http://www.cgd.ucar.edu/cms/eaton/netcdf/CF-current.htm ;
:contents = Diagnostic and Prognostic Variables ;
:source = CCSM POP2, the CCSM Ocean Component ;
:revision = $Id: tavg.F90 34115 2012-01-25 22:35:19Z njn01 $ ;
:calendar = All years have exactly  365 days. ;
:start_time = This dataset was created on 2017-04-15 at 12:52:48.4 ;
:cell_methods = cell_methods = time: mean ==> the variable values are averaged over the time interval between the previous time coordinate and the current one.          cell_methods  absent  ==> the variable values are at the time given by the current time coordinate. ;
:nsteps_total = 25052952 ;
:tavg_sum = 86399.99999999974 ;
:CDI = Climate Data Interface version 1.7.0 (http://mpimet.mpg.de/cdi) ;
:CDO = Climate Data Operators version 1.7.0 (http://mpimet.mpg.de/cdo) ;
:NCO = "4.6.0" ;
:history_of_appended_files = Thu Sep 14 23:06:30 2017: Appended file /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/monthly/NEW/needed_Ugrid_vars_0200-01.nc had following "history" attribute:
Thu Sep 14 23:01:57 2017: ncrename -d x_2,nlon -d y_2,nlat /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/monthly/NEW/needed_Ugrid_vars_0200-01.nc
Thu Sep 14 23:00:39 2017: ncks -v TAUX,TAUY,UVEL,VVEL /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/monthly/NEW/daily_to_monthly_fields_spinup_pd_maxcores_f05_t12.pop.h.0200-01.nc /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/monthly/NEW/needed_Ugrid_vars_0200-01.nc
Thu Sep 14 21:45:58 2017: cdo -b F64 -timmean /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/daily/spinup_pd_maxcores_f05_t12.pop.h.nday1.0200-01-01.nc /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/monthly/NEW/daily_to_monthly_fields_spinup_pd_maxcores_f05_t12.pop.h.0200-01.nc
none
Thu Sep 14 23:03:20 2017: Appended file /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/monthly/NEW/needed_Tgrid_vars_0200-01.nc had following "history" attribute:
Thu Sep 14 23:01:57 2017: ncrename -d x,nlon -d y,nlat /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/monthly/NEW/needed_Tgrid_vars_0200-01.nc
Thu Sep 14 23:00:38 2017: ncks -v SSH /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/monthly/NEW/daily_to_monthly_fields_spinup_pd_maxcores_f05_t12.pop.h.0200-01.nc /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/monthly/NEW/needed_Tgrid_vars_0200-01.nc
Thu Sep 14 21:45:58 2017: cdo -b F64 -timmean /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/daily/spinup_pd_maxcores_f05_t12.pop.h.nday1.0200-01-01.nc /projects/0/prace_imau/prace_2013081679/cesm1_0_4/spinup_pd_maxcores_f05_t12/OUTPUT/ocn/hist/monthly/NEW/daily_to_monthly_fields_spinup_pd_maxcores_f05_t12.pop.h.0200-01.nc
none
;
}

Thanks -- in looking at the metadata it seems there is nothing unusual about the 'd2' dimension (in normal circumstances we should be able to decode N-D variables to dates, regardless of their type).
My feeling is that the issue here remains the fact that cftime dates do not support year zero (see the upstream issue @rabernat mentioned earlier: Unidata/netcdf4-python#442).  That said, it's surprising that dropping the 'time_bounds' variable seems to be a workaround for this issue, because the 'time' variable (which remains in the dataset) still has units with a reference date of year zero.
If you don't mind, could you provide me with two more things?

Opening the file as ds = xr.open_dataset('some_CESM_output_file.nc', decode_times=False) the time coordinate ds.time is at first simply an array of floats:
<xarray.DataArray 'time' (time: 1)>
array([73020.])
Coordinates:
  * time     (time) float64 7.302e+04
Attributes:
    long_name:      time
    units:          days since 0-1-1 00:00:00
    bounds:         time_bnds
    calendar:       365_day
    standard_name:  time
    axis:           T

and after decoding xr.decode_cf(ds, use_cftime=True).time returns
<xarray.DataArray 'time' (time: 1)>
array([cftime.DatetimeNoLeap(200, 1, 21, 0, 0, 0, 0, 3, 21)], dtype=object)
Coordinates:
  * time     (time) object 0200-01-21 00:00:00
Attributes:
    long_name:      time
    bounds:         time_bnds
    standard_name:  time
    axis:           T

The traceback of opening the file without decode_times=False complains about year 0 being outside the range of the Gregorian or Julian calendars:

traceback
---------------------------------------------------------------------------
OutOfBoundsDatetime                       Traceback (most recent call last)
~/.conda/envs/CESM/lib/python3.6/site-packages/xarray/coding/times.py in _decode_datetime_with_pandas(flat_num_dates, units, calendar)
    128     try:
--> 129         ref_date = pd.Timestamp(ref_date)
    130     except ValueError:
pandas/_libs/tslibs/timestamps.pyx in pandas._libs.tslibs.timestamps.Timestamp.new()
pandas/_libs/tslibs/conversion.pyx in pandas._libs.tslibs.conversion.convert_to_tsobject()
pandas/_libs/tslibs/conversion.pyx in pandas._libs.tslibs.conversion.convert_str_to_tsobject()
pandas/_libs/tslibs/conversion.pyx in pandas._libs.tslibs.conversion.convert_str_to_tsobject()
pandas/_libs/tslibs/np_datetime.pyx in pandas._libs.tslibs.np_datetime.check_dts_bounds()
OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 0-01-01 00:00:00
During handling of the above exception, another exception occurred:
OutOfBoundsDatetime                       Traceback (most recent call last)
~/.conda/envs/CESM/lib/python3.6/site-packages/xarray/coding/times.py in decode_cf_datetime(num_dates, units, calendar, use_cftime)
175             dates = _decode_datetime_with_pandas(flat_num_dates, units,
--> 176                                                  calendar)
177         except (OutOfBoundsDatetime, OverflowError):
~/.conda/envs/CESM/lib/python3.6/site-packages/xarray/coding/times.py in _decode_datetime_with_pandas(flat_num_dates, units, calendar)
132         # strings, in which case we fall back to using cftime
--> 133         raise OutOfBoundsDatetime
134
OutOfBoundsDatetime:
During handling of the above exception, another exception occurred:
ValueError                                Traceback (most recent call last)
~/.conda/envs/CESM/lib/python3.6/site-packages/xarray/coding/times.py in _decode_cf_datetime_dtype(data, units, calendar, use_cftime)
93         result = decode_cf_datetime(example_value, units, calendar,
---> 94                                     use_cftime)
95     except Exception:
~/.conda/envs/CESM/lib/python3.6/site-packages/xarray/coding/times.py in decode_cf_datetime(num_dates, units, calendar, use_cftime)
178             dates = _decode_datetime_with_cftime(
--> 179                 flat_num_dates.astype(np.float), units, calendar)
180
~/.conda/envs/CESM/lib/python3.6/site-packages/xarray/coding/times.py in _decode_datetime_with_cftime(num_dates, units, calendar)
112         return np.asarray(cftime.num2date(num_dates, units, calendar,
--> 113                                           only_use_cftime_datetimes=True))
114     else:
cftime/_cftime.pyx in cftime._cftime.num2date()
ValueError: zero not allowed as a reference year, does not exist in Julian or Gregorian calendars
During handling of the above exception, another exception occurred:
ValueError                                Traceback (most recent call last)
 in
----> 1 ds = xr.open_dataset(CESM_filename(domain='ocn', run='ctrl', y=200, m=1))#, use_cftime=True)
~/.conda/envs/CESM/lib/python3.6/site-packages/xarray/backends/api.py in open_dataset(filename_or_obj, group, decode_cf, mask_and_scale, decode_times, autoclose, concat_characters, decode_coords, engine, chunks, lock, cache, drop_variables, backend_kwargs, use_cftime)
392
393     with close_on_error(store):
--> 394         ds = maybe_decode_store(store)
395
396     # Ensure source filename always stored in dataset object (GH issue #2550)
~/.conda/envs/CESM/lib/python3.6/site-packages/xarray/backends/api.py in maybe_decode_store(store, lock)
322             store, mask_and_scale=mask_and_scale, decode_times=decode_times,
323             concat_characters=concat_characters, decode_coords=decode_coords,
--> 324             drop_variables=drop_variables, use_cftime=use_cftime)
325
326         _protect_dataset_variables_inplace(ds, cache)
~/.conda/envs/CESM/lib/python3.6/site-packages/xarray/conventions.py in decode_cf(obj, concat_characters, mask_and_scale, decode_times, decode_coords, drop_variables, use_cftime)
477     vars, attrs, coord_names = decode_cf_variables(
478         vars, attrs, concat_characters, mask_and_scale, decode_times,
--> 479         decode_coords, drop_variables=drop_variables, use_cftime=use_cftime)
480     ds = Dataset(vars, attrs=attrs)
481     ds = ds.set_coords(coord_names.union(extra_coords).intersection(vars))
~/.conda/envs/CESM/lib/python3.6/site-packages/xarray/conventions.py in decode_cf_variables(variables, attributes, concat_characters, mask_and_scale, decode_times, decode_coords, drop_variables, use_cftime)
399             k, v, concat_characters=concat_characters,
400             mask_and_scale=mask_and_scale, decode_times=decode_times,
--> 401             stack_char_dim=stack_char_dim, use_cftime=use_cftime)
402         if decode_coords:
403             var_attrs = new_vars[k].attrs
~/.conda/envs/CESM/lib/python3.6/site-packages/xarray/conventions.py in decode_cf_variable(name, var, concat_characters, mask_and_scale, decode_times, decode_endianness, stack_char_dim, use_cftime)
304         for coder in [times.CFTimedeltaCoder(),
305                       times.CFDatetimeCoder(use_cftime=use_cftime)]:
--> 306             var = coder.decode(var, name=name)
307
308     dimensions, data, attributes, encoding = (
~/.conda/envs/CESM/lib/python3.6/site-packages/xarray/coding/times.py in decode(self, variable, name)
417             calendar = pop_to(attrs, encoding, 'calendar')
418             dtype = _decode_cf_datetime_dtype(data, units, calendar,
--> 419                                               self.use_cftime)
420             transform = partial(
421                 decode_cf_datetime, units=units, calendar=calendar,
~/.conda/envs/CESM/lib/python3.6/site-packages/xarray/coding/times.py in _decode_cf_datetime_dtype(data, units, calendar, use_cftime)
99                'opening your dataset with decode_times=False.'
100                % (units, calendar_msg))
--> 101         raise ValueError(msg)
102     else:
103         dtype = getattr(result, 'dtype', np.dtype('object'))
ValueError: unable to decode time units 'days since 0000-01-01 00:00:00' with the default calendar. Try opening your dataset with decode_times=False.

Great that's helpful, thanks.  I see what's happening now.  There's a lot of tricky things going on, so bear with me.
Let's examine the output from ds.info() related to the time bounds and time variables:
float64 time_bound(time, d2) ;
time_bound:long_name = boundaries for time-averaging interval ;
time_bound:units = days since 0000-01-01 00:00:00 ;
float64 time(time) ;
time:long_name = time ;
time:units = days since 0-1-1 00:00:00 ;
time:bounds = time_bnds ;
time:calendar = 365_day ;
time:standard_name = time ;
time:axis = T ;

There are a few important things to note:

In both the 'time_bound' and 'time' variables, the units attribute contains a reference date with year zero.
'time' has a calendar attribute of '365_day', while a calendar attribute is not specified for the 'time_bound'.
'time' has a 'bounds' attribute that points to a variable named 'time_bnds' instead of 'time_bound'.

For non-real-world calendars (e.g. 365_day), reference dates in cftime should allow year zero.  This was fixed upstream in https://github.com/Unidata/netcdf4-python/pull/470.  That being said, because of (2), the calendar for 'time_bound' is assumed to be a standard calendar; therefore you get this ValueError when decoding the times:
ValueError: zero not allowed as a reference year, does not exist in Julian or Gregorian calendars

Ultimately though, with https://github.com/pydata/xarray/pull/2571, we try to propagate the time-related attributes from the time coordinate to the associated bounds coordinate (so in normal circumstances we would use a 365_day calendar in this case as well).  But, because of (3), this is not possible due to the fact that the 'bounds' attribute on the 'time' variable points to a variable name that does not exist.
In theory, another possible way to work around this would be to open the dataset with decode_times=False, add the appropriate calendar attribute to 'time_bound', and then decode the times:
ds = xr.open_dataset('some_CESM_output_file.nc', decode_times=False)
ds.time_bound.attrs['calendar'] = ds.time.attrs['calendar']
ds = xr.decode_cf(ds, use_cftime=True)

Now, this may still not work depending on the values in the the 'time_bound' variable (i.e. if any are less than 365.), because cftime currently does not support year zero in date objects (even for non-real-world calendars).  I think one could make the argument that this is inconsistent with allowing reference dates with year zero for those date types, so it would probably be worth opening an issue there to try and get that fixed upstream.
In conclusion, I'm afraid there is nothing we can do in xarray to automatically fix this situation.  Issue (3) in the netCDF file is particularly unfortunate.  If it weren't for that, I think all of these issues would be possible to work around, e.g. with https://github.com/pydata/xarray/pull/2571 here, or with fixes upstream.

Now, this may still not work depending on the values in the the 'time_bound' variable (i.e. if any are less than 365.), because cftime currently does not support year zero in date objects (even for non-real-world calendars). I think one could make the argument that this is inconsistent with allowing reference dates with year zero for those date types, so it would probably be worth opening an issue there to try and get that fixed upstream.

I opened an issue in cftime regarding this: https://github.com/Unidata/cftime/issues/114.

It's important to be clear that the issues 2 and 3 that @spencerkclark pointed out are objectively errors in the metadata. We have worked very hard over many years to enable xarray to correctly parse CF-compliant dates and non-standard calendars. But xarray cannot and should not be expected to magically fix metadata that is inconsistent or incomplete.
You really need to bring these issues to the attention of whoever generated some_CESM_output_file.nc.

@rabernat , it is not clear to me that issue 2 is an objective error in the metadata.
The CF conventions section on the bounds attribute states:

Since a boundary variable is considered to be part of a coordinate variable’s metadata, it is not necessary to provide it with attributes such as long_name and units.
Boundary variable attributes which determine the coordinate type (units, standard_name, axis and positive) or those which affect the interpretation of the array values (units, calendar, leap_month, leap_year and month_lengths) must always agree exactly with the same attributes of its associated coordinate, scalar coordinate or auxiliary coordinate variable. To avoid duplication, however, it is recommended that these are not provided to a boundary variable.

I conclude from this that software parsing CF metadata should have the variable identified by the bounds attribute inherit the attributes mentioned above from the variable with the bounds attribute. @spencerkclark describes this as a work around. One could argue that based on the CF conventions text, xarray would be justified in dong that automatically.
However, this is confounded by issue 3, that time.attrs.bounds /= 'time_bound', which I agree is an error in the metadata. As a CESM-POP developer, I'm surprised to see that. Raw model output from CESM-POP has time.attrs.bounds = 'time_bound'. So it seems like something in a post-processing workflow has the net effect of changing time.attrs.bounds, but is preserving the name of the variable bounds. That is problematic.
If CESM-POP were to adhere more closely to the CF recommendation in this section, I think it would drop time_bound.attrs.units, not add time_bound.attrs.calendar. But I don't think that is what you are suggesting.

@klindsay28 -- thanks for the clarification. You're clearly right about 2, and I was misinformed. The problem is that 3 makes it impossible follow the CF convention rules to overcome 2 (which xarray would try to do).

@AJueling , do you know the provenance of the file with time.attrs.bounds /= 'time_bound'? If that file is being produced by an NCAR or CESM supplied workflow, then I am willing to see if the workflow can be corrected to keep time.attrs.bounds = 'time_bound'. With this mismatch, it seems hopeless for xarray to automatically figure out how to handle this file as it was intended to be handled.

Thank you all for the clarification! I will get in touch with the person who ran the model and get back to you as soon as possible.

I'm also getting the same error:ValueError: unable to decode time units 'months since 1955-01-01 00:00:00' with 'the default calendar'. Try opening your dataset with decode_times=False or installing cftime if it is not installed.


Add support for digest_class config

This pull request proposes to add support for a digest_class configuration, to override the behavior of asset digesting.
Why?

More control over how the digest is computed.

In our use-case, my interest is more in being able to shorten the length of the digest from 32 characters to 7 or 8 characters, and this is a roundabout way of doing that while offering greater overall control.

Feature parity with the equivalent Sprockets configuration, to streamline the process of migrating from Sprockets to Propshaft.

Open Questions:

Should this have any impact on the behavior of already_digested?, whose implementation may vary depending on the digest logic?
Is there a better way to "pass down" configuration options than carrying along the constructor argument as proposed here?

I was largely following the prior art of how version was passed along

If there's not an interest in adding this configuration, would there be more reception to either (a) allowing the digest length to be configuration, or (b) changing the default to a shorter length? Either of these would satisfy at least my own intended use-case.

@aduth Thank you for the PR, however one of the reasons we've built this gem was to have a clean slate to work on compared to Sprockets. This means that feature parity with Sprockets is the opposite of what we want. We can revisit this at a later date, whoever as long was Sprockets is supported, features that are not core to Propshaft (full support for no build, better support for builders) are not our focus.


Add modules for mmc disks

This makes disks available on boards that have MMC as booting/disk devices

tested and working btw


[optimize](inverted index) Use inverted index filter null field

Proposed changes
Issue Number: close #xxx

We saved segment level null bitmap in the inverted index, so we can use it to filter null field to accelerate query.
after this change:

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

run buildall


cannot import nix file from parent directory?

not sure if im doing something unintended here
example project:
├── nested
│   ├── devenv.nix
│   └── devenv.yaml
├── devenv.lock
├── devenv.nix
└── devenv.yaml

devenv.yaml
inputs:
  nixpkgs:
    url: github:cachix/devenv-nixpkgs/rolling

devenv.nix
{ pkgs, lib, config, inputs, ... }:
{
# https://devenv.sh/packages/
packages = [ ];

enterShell = ''
'';
}

nested/devenv.nix
{ pkgs, lib, config, inputs, ... }:
{
  packages = [ ];

  languages = {
    terraform = {
      enable = true;
      version = "1.5.6";
    };
  };
}

nexted/devenv.yaml
inputs:
  nixpkgs:
    url: github:cachix/devenv-nixpkgs/rolling
imports:
  - ../devenv.nix

when I go into the nested folder and devenv shell I get an error  error: devenv: ../ is not supported for imports
my use case is that different terraform folders contain their own version of terraform, but they can inherit from the parent folder devenv.nix

See nested in examples how that's currently done

I dont see anything named nested in the examples 🤔

https://github.com/cachix/devenv/tree/main/examples/compose

I think @cyberjar09 wants to run devenv shell in a nested folder and import a devenv.nix from the parent directory. We have checks in place to not allow imports starting with ../, which I assume is due to the restriction imposed by Nix flakes. Everything that's used to evaluate the shell must be tracked by git and in the current directory or lower.

My use-case for this is to have a common postgres server running in the parent directory's devenv.nix and then in a sub-folder (micro-service) connect to it while having access to the psql cli.
What I'd do then is:
devenv up # starts server
cd subfolder
psql -d db -f file.sql

Would be cool if this could be supported.


Is there a way to generator mask for the entire image?

I implemented a simplified version based on the official demo.
See this commit and release v1.1.
Screenshot:


partial sources in source method

Doing some tests, it seems like it is wrong to get only partial sources in the build method : when calling conan create on a package requiring Qt, even with "-b Qt" it reuses the existing sources in the local cache, disregarding the options used, so modules disabled the first time the source method was called cannot be added later.
Probably the correct option is to get all the submodules sources in the source method, an then build only the ones selected in the build method. The recommended way to get the full sources is to get  qt-everywhere-opensource-src-5.8.0.tar.xz archive (354MB)

This is still an issue today. This is an issue for me as well. I agree with @ericLemanissier that we should use the archive, as its download is a lot faster than even a few git repositories.


Fix generating release.yaml Namespace should be the first one

Signed-off-by: Chmouel Boudjnah<EMAIL_ADDRESS>

Codecov Report

Merging #120 (50031a0) into main (b9f92fa) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #120   +/-   ##
=======================================
  Coverage   74.58%   74.58%
=======================================
  Files          12       12
  Lines         775      775
=======================================
  Hits          578      578
  Misses        134      134
  Partials       63       63

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9f92fa...50031a0. Read the comment docs.

cc @sbose78


How to display the daily view only from 7am to 9pm?

Summary
How to display the daily view only from 7am to 9pm?
Version
"@toast-ui/react-calendar": "^1.0.5" + "tui-calendar": "^1.12.14"

https://github.com/nhn/tui.calendar/issues/352


Add modern UI

[x] Update glvis.js and versions.js once https://github.com/GLVis/glvis/pull/156 is merged

README instructions need to be updated

Please take a look at my changes in https://github.com/GLVis/glvis-js/blob/modern-ui/live/README.md and feel free to fix issues / improve the docs further!

Thank you so much @jandrej and @tomstitt !

@jandrej , could you run make style before merging? I didn't want to do it because it caused a lot of differences and I don't want the history to show I made the changes last (that you actually made)

Lets 🚢 it!


Unable to access WebUI

Current Behavior
I am trying to access the WebUI via http://XXX.XXX.XXX.XXX:5800 and cannot. I tried both Docker Run and Docker Compose.
Expected Behavior
Access WebUI via http://XXX.XXX.XXX.XXX:5800
Steps To Reproduce
No response
Environment

OS:Debian Container
OS version:
CPU:
Docker version:
Device model:
Browser/OS:

Container creation
docker run -d
--name=freefilesync
-p 5800:5800
-v /docker/appdata/freefilesync:/config:rw
-v /home/user:/storage:rw
jlesage/freefilesync
Container log
.

Container inspect
No response
Anything else?
No response

Is the container able to start, without port conflict ?
Please provide the container log by running the following command:
docker logs freefilesync

That provides:
root@FreeFileSync:~# docker logs freefilesync
[init        ] container is starting...
[cont-env    ] loading container environment variables...
[cont-env    ] APP_NAME: loading...
[cont-env    ] APP_VERSION: loading...
[cont-env    ] DISPLAY: executing...
[cont-env    ] DISPLAY: terminated successfully.
[cont-env    ] DISPLAY: loading...
[cont-env    ] DOCKER_IMAGE_PLATFORM: loading...
[cont-env    ] DOCKER_IMAGE_VERSION: loading...
[cont-env    ] GTK2_RC_FILES: executing...
[cont-env    ] GTK2_RC_FILES: terminated successfully.
[cont-env    ] GTK2_RC_FILES: loading...
[cont-env    ] GTK_THEME: executing...
[cont-env    ] GTK_THEME: terminated successfully.
[cont-env    ] GTK_THEME: loading...
[cont-env    ] HOME: loading...
[cont-env    ] QT_STYLE_OVERRIDE: executing...
[cont-env    ] QT_STYLE_OVERRIDE: terminated successfully.
[cont-env    ] QT_STYLE_OVERRIDE: loading...
[cont-env    ] TAKE_CONFIG_OWNERSHIP: loading...
[cont-env    ] XDG_CACHE_HOME: loading...
[cont-env    ] XDG_CONFIG_HOME: loading...
[cont-env    ] XDG_DATA_HOME: loading...
[cont-env    ] XDG_RUNTIME_DIR: loading...
[cont-env    ] XDG_STATE_HOME: loading...
[cont-env    ] container environment variables initialized.
[cont-secrets] loading container secrets...
[cont-secrets] container secrets loaded.
[cont-init   ] executing container initialization scripts...
[cont-init   ] 10-certs.sh: executing...
[cont-init   ] 10-certs.sh: terminated successfully.
[cont-init   ] 10-check-app-niceness.sh: executing...
[cont-init   ] 10-check-app-niceness.sh: terminated successfully.
[cont-init   ] 10-clean-logmonitor-states.sh: executing...
[cont-init   ] 10-clean-logmonitor-states.sh: terminated successfully.
[cont-init   ] 10-clean-tmp-dir.sh: executing...
[cont-init   ] 10-clean-tmp-dir.sh: terminated successfully.
[cont-init   ] 10-fontconfig-cache-dir.sh: executing...
[cont-init   ] 10-fontconfig-cache-dir.sh: terminated successfully.
[cont-init   ] 10-init-users.sh: executing...
[cont-init   ] 10-init-users.sh: sed: can't move '/etc/group' to '/etc/group.bak': Invalid argument
[cont-init   ] 10-init-users.sh: terminated with error 1.

Ok, the container fails to start.
Are you using Docker on a zfs storage ?

Yes, Proxmox container on ZFS.

This issue happens because overlay2 on zfs doesn't support RENAME_WHITEOUT operation.
See https://github.com/jlesage/docker-jdownloader-2/issues/137 for workarounds and solutions.

Followed this and it somehow removed the freefilesync container.
guba91 commented on Feb 7
for me this procedure worked and i'm able to replicate it:
enable keyctl, nesting, fuse on lxc container, then reboot lxc.
mkdir /etc/docker
nano /etc/docker/daemon.json
{
"storage-driver": "fuse-overlayfs"
} <- put this inside the new file daemon.json
apt install fuse-overlayfs
fuse-overlayfs --version
reboot lxc or reload docker service
docker info if you see Storage Driver: fuse-overlayfs is done..
If I try to rerun the docker run it now fails.

If I try to rerun the docker run it now fails.

What is the error ?

docker: failed to register layer: Error processing tar file(using mount program fuse-overlayfs: fuse: device not found, try 'modprobe fuse' first
fuse-overlayfs: cannot mount: No such file or directory
: exit status 1): .
See 'docker run --help'.
But running docker info I see Storage Driver: fuse-overlayfs.

Did you try to load the driver with modprobe fuse ?

Yes. I edited the last post earlier. That output is at the bottom but here it is again.
root@FreeFileSync:# modprobe fuse modprobe: FATAL: Module fuse not found in directory /lib/modules/5.15.102-1-pve root@FreeFileSync:# fuse-overlayfs --version fuse-overlayfs: version 1.4 FUSE library version 3.10.3 using FUSE kernel interface version 7.31 fusermount3 version: 3.10.3

modprobe fuse modprobe: FATAL: Module fuse not found in directory /lib/modules/5.15.102-1-pve

Maybe you have the install a package that provide the driver ?  Sorry, I don't have experience with Proxmox.  Maybe you should also seek help on the Proxmox's forum.  I'm sure this issue was already discussed.

@jlesage I threw in the towel and moved that CT to an LVM-Thin drive. 🤣 Worked right away. Thanks for trying to help! I appreciate it.

I'm glad to see that it's now working for you.
Thanks for the update !