Support stargazer

The stargazer Python package implements the R package of the same name, which "Produces LaTeX code, HTML/CSS code and ASCII text for well-formatted tables that hold regression analysis results from several models side-by-side, as well as summary statistics."
Currently, it works with statsmodels, but not with linearmodels (https://github.com/mwburke/stargazer/issues/26).
In that issue, @toobaz suggested:

I suspect it would be easy for linearmodels devs (or even an independent project) to build a compatibility layer which puts model internals where statsmodels expects them. I did something similar in https://github.com/toobaz/rmodel , which allows R models to be plugged into stargazer tables.

I think this would probably need to go into stargazer or standalone package. Ideally, stargazer would have a well-defined API that a model shim could target to simplify things.

Ideally, stargazer would have a well-defined API

I agree, ideally. But in practice, stargazer is a young and small project, whereas statsmodels is a standard library in the field.
I have in mind something like (in this order):

interested projects provide their own compatibility interface to (an extension of) statsmodels objects' interface, so that stargazer works
statsmodels documents and possibly rearranges such interface
the interface possibly becomes a standard, not necessarily tied to statsmodels (and certainly not to stargazer - e.g. it can make sense also for sharing/transmitting/integrating results, not just for creating tables)

Alternatively: an independent project creates an interface and a translation for statsmodels. But that's a non-trivial task (e.g. stargazer currently supports very little of statsmodels' models). In any case, defining the API would be out of the scope of stargazer.
(I'm not speaking as, or on behalf of, the stargazer maintainer, just as a recurrent contributor)
I'll elaborate in https://github.com/mwburke/stargazer/issues/26 on the technical aspects.

I think linermodels is unlikely to take stargazer as a dependency, which is what would be needed for this to go into linearmodels. It is also not feasible to change the linearmodels API.
IMO there are a few sensible solutions:

stargazer could provide "adapters" for models from other packages(linearmodels, pysal, scikit-learn, and probably lots more), or other statsmodels models that don't fit the basic structure.  These adapters will take whatever if returned in the result of fitting the model and then repackage it to have a standard interface.
If the maintainer of stargazer doesn't want to do this, then it could go into another package (like RModel has done). For example, stargazer-adapters.
I suspect that it is pretty easy to write a simple shim object to wrap any specific class. ssuming stargazer duck types, then any object with properties like params and bse could be consumed. Although the lack of a well-defined API for stargazer makes this less fun.

I'm not suggesting that stargazer defines statsmodels API. Stargazer would define the API for model results that it would happily consume. This may look a lot like statsmodel OLSREsults, but could also differ. This is the most user-friendly approach since it lets any "target" stargazer for table production with a model estimated in anything simply by providing the object. In an ideal world, stargzaer would provide an ABC that would be wrapped, e.g.
from abc import ABCmeta, abstract_method

class StargazerResults(metaclass=ABCmeta):
   """ABC that projects can wrap to provide an object consumale by stargazer"""

    @property
    @abstract_method
    def params(self):
        """The estimated parameters, 1d"""

    @property
    @abstract_method
    def bse(self):
        """The parameter standard errors, 1d"""
...

I think linermodels is unlikely to take stargazer as a dependency, which is what would be needed for this to go into linearmodels

"this" what? I never suggested that linearmodels changes anything very deep in its code. I just suggested it (and any other project with similar needs) should either 1) provide a statsmodels-look-alike translation that stargazer can consume, or 2) make a list of what a statsmodels-look-alike translation lacks in order to do the task, and see if we can extend it.
... but apparently using statsmodels as a reference sounds humiliating, so forget it.

2. If the maintainer of stargazer doesn't want to do this, then it could go into another package (like RModel has done). For example, stargazer-adapters.

As a stargazer contributor, I would object to this too. It still means that it is the responsability of the stargazer project, in a broader sense to, for instance, keep up with code changes in the various libraries. Moreover, as I said already, sharing model results among libraries goes beyond just creating tables - which is all stargazer does. So let's think about something independent from stargazer, for which stargazer can work as the reference test bench. Hint: the name "pymodref" is apparently free.

stargazer would provide an ABC that would be wrapped

What is the advantage over just documenting what a library should expose in order to be compatible? Notice that virtually everything except params and dependent variables is (or should be) optional, so the API in the end should just, for each possible result that a model can produce,

give it a name
describe its possible type (including e.g. dimensions of arrays, and which dimensions of which arrays correspond)

... then each library could just expose a same method, e.g. _modref_get(feature_name) that stargazer (or anything else) would use.
I would be happy to support something like this in RModel, for instance.
If you think the approach makes sense, I can try to produce a new repo with a first draft.

"this" what? I never suggested that linearmodels changes anything very deep in its code. I just suggested it (and any other project with similar needs) should either 1) provide a statsmodels-look-alike translation that stargazer can consume, or 2) make a list of what a statsmodels-look-alike translation lacks in order to do the task, and see if we can extend it.

"this" is an adapter from a linearmodels result to something that stargazer would accept.  If something goes into linearmodels then linearmodels (or its maintainer) is responsible for making sure that it maintains compatibility with stargazer.  I don't think this is reasonable for such a small library like stargazer.  It makes more sense for stargazer to own the interface, or for it to be independent. This is similar to how pandas provides adapters (pandas.io) for all sorts of foreign data format that import into DataFrames.
I looked at stargazer and it uses a type(result) is RegressionResultsWrapper. This makes it impossible to extend in a sensible way.

As a stargazer contributor, I would object to this too. It still means that it is the responsibility of the stargazer project, in a broader sense to, for instance, keep up with code changes in the various libraries. Moreover, as I said already, sharing model results among libraries goes beyond just creating tables - which is all stargazer does. So let's think about something independent from stargazer, for which stargazer can work as the reference test bench. Hint: the name "pymodref" is apparently free.

It makes more sense for statgazer to define what it wants.  Right not only wanting RegressionResultsWrapper makes it completely inflexible, as evidence by the hoops RModels had to jump through.

What is the advantage over just documenting what a library should expose in order to be compatible?

An ABC is a contract.  Override all of the abstract classes in the ABC with a user class and the consumer API promises that it will work. It also make version checks super simple, since all you need is isinstance(results, StargazerResults) since any child is required to subclass. It is much easier to have an ABC than to duck type.
It is also OK for a child of an ABC to not return anything.  For example, the definition in the ABC could have something like
   @property
   @abstract_method
    def rsquare(self) -> Optional[float]:
        """The model's measure of fit, or None if not supported"""

I still think something like
from statgazer.adapters.linearmodels import IVResult
# or statgazer.adapters.scikit_learn, or pysal...
# or from stargazer_adapters.MODULE import ModelType
from linearmodels.iv import IV2SLS

sg_res = IVResults(IV2SLS(y,x1,x2,z).fit())

provides the most straightforward way to users who want to use stargazer to extend it since it doesn't require tieing the upstream package to stargazer.

It makes more sense for stargazer to own the interface, or for it to be independent.

The latter.
Comments on my (last) proposal are welcome. It doesn't envisage ducktyping, RegressionResultsWrapper, tying to stargazer or any other dangers you mentioned in your reply.
In any case...

from statgazer.adapters.linearmodels import IVResult

I'm not following you here. This is different from your proposal of abstract class above, right?

The latter.
Comments on my (last) proposal are welcome. It doesn't envisage ducktyping, RegressionResultsWrapper, tying to stargazer or any other dangers you mentioned in your reply.

There will need to be some changes in stargazer to make it a generally useful library, rather than a presentation layer for OLS and similar results. The most important would be to remove the explicit dependency on RegressionResultsWrapper. It would be pretty easy to
from stargazer.adapters.abstract implement StargazerResults
from stargazer.adapters.statsmodels import RegressionResults

<in the main class' __init__>
   if isinstance(result, sm.RegressionResultsWrapper)
       result = RegressionResults(result)  # wrap with stargazer abstraction
    elif not isinstance(result, StargazerResult):
        raise TypeError("Only subclasses of StargazerResult are allowed")

The minimal change needed in stargazer would be to provide the ABC so that it would be as happy to accept a subclasses of the ABC (likely in addition to ResultsWrapper).

I'm not following you here. This is different from your proposal of abstract class above, right?

stargazer.adapters.abstract would supply StargazerResults, the ABC.  stargazer.adapters.linearmodels would then
from stargazer.adapters.abstract implement StargazerResults

class IVResults(StargazerResults):
    def __init__(self, result: "linearmodels.iv.results.IVResults"):
        self._result = result

    @property
    def params(self):
        return self._result.params  # pass through, no change

    @property
    def bse(self):
        return self._results.std_errors # different attribute
...

stargazer.adapters.linearmodels.IVResults is a concrete implementation of the abstract base class StargazerResults.

The most important would be to remove the explicit dependency on RegressionResultsWrapper.

That's for granted, we're discussing how.

stargazer.adapters.abstract would supply StargazerResults, the ABC.

OK, I got this

stargazer.adapters.linearmodels would then

I don't get this. In your view stargazer should provide a base class and the adapters for each library? (this is a no-go) Or should each library be populating the stargazer namespace?

... then each library could just expose a same method, e.g. _modref_get(feature_name) that stargazer (or anything else) would use.

@bashtage comments on this, thanks. It's much simpler than ABC. If you're ready to support it in linearmodels, I'm ready to produce a draft (docs, not code) & support it in stagazer code.

I don't get this. In your view stargazer should provide a base class and the adapters for each library? (this is a no-go) Or should each library be populating the stargazer namespace?

Where the adapters resid is ultimately up to the stargazer maintainer.  stargazer might find it worth the trouble to provide adpaters for some models, and not for others. For example, it might make sense to provide 1st party support statsmodels GLM results.

@bashtage comments on this, thanks. It's much simpler than ABC. If you're ready to support it in linearmodels, I'm ready to produce a draft (docs, not code) & support it in stagazer code.

It is not simpler, it is different.  It still needs an ABC so that stargazer would know that it is getting a representation of a more result that it can work with.  I also think it is a nonstarter, since it requires statistical model library writers (and I can speak both as the owner of linearmodels and a committer to statsmodels) to add a "magic" function to support stargazer, and so to take a dependency on stargazer.  I don't think you will get statsmodels, linearmodel, pysal or scikit-learn to do this.  The only libraries that I know that are universal enough to get custom functions to have wide-spread support are NumPy (__array_function__) and IPython (_repr_html_).
The other approach, which only requires a 3rd party (to each of the statistical libraries) to write an adapter, is much more likely to succeed. This 3rd party library could be stargazer, anything else the community wants to write like RModels, or some combination of the two.

If you're ready to support it in linearmodels, I'm ready to produce a draft (docs, not code) & support it in stagazer code.

Just to 100% clarity, I won't take a dependency on stargazer.  Any adapter that would allow linearmodels results to be used with stargazer would need to live in a different package. I suspect that writing an adapter would be a pretty trivial exercise in most cases.
The upside of writing adapters is that model results classes are extremely stable and almost never get changes in attribute  or property names.

It still needs an ABC so that stargazer would know that it is getting a representation of a more result that it can work with

hasattr("_modref_get") suffices.

I won't take a dependency on stargazer

Sorry, I had so far interpreted "dependency" in a literal sense, apparently you mean "any explicit effort towards compatibility with"?

The other approach, which only requires a 3rd party (to each of the statistical libraries) to write an adapter, is much more likely to succeed.

OK, I will start with _modref_get(feature_name) but any third party library can easily produce wrappers, including with ABC wrappers if they like.

I don't think you will get statsmodels

statsmodels doesn't need an interface as of now, but still, I might write it. I do plan to add one to Rmodel which, as you correctly observed, is a mess.
Which features
Having said the above about how to support libraries, I'd like your help understanding what to support.
The most immediate thing that linearmodels seems to require on top of statsmodels is the possible multiplicity of dependent variables. Are there any other obvious ways in which the statsmodels model is too restrictive, that I should be aware of before trying to design a common interface?

hasattr("_modref_get") suffices.

It doesn't because you don't know what res._modref_get() returns. Or at best you have an error-prone  set of possible output.

Sorry, I had so far interpreted "dependency" in a literal sense, apparently you mean "any explicit effort towards compatibility with"?

No, dependency means that linear models would need to have a test that _modref_get produces the correct output in the sense that what it return can be consumed by libraries that it is intended for.  The requires taking an optional dependency (or producing code that isn't tested, which is a no-no for me).

statsmodels doesn't need an interface as of now, but still, I might write it.

I'm do not think statsmodels will accept it since it creates maintenance burden for them against what may be a fast moving target.  I don't think it belongs in statsmodels.  It is far simpler to have the transformation of the statsmodels results in a 3rd party library (stargazer or anything else). Essentially the chain looks like
numpy->scipy & pandas -> statsmodels (and other modeling libraries) -> presentation libraries

It shouldn't be
             presentation library -----
                                      |
                                      v
numpy->scipy & pandas -> statsmodels (and other modeling libraries)

Having said the above about how to support libraries, I'd like your help understanding what to support.

It really depends on what end-users what.  Providing a common interface for different statsmodels results types (regression, GLM, Logit/probit, possible some of the time series) would be a great start.  Models from R would also be a natural fit given the fairly uniform structure of the results classes in R. There seems to be interest in linearmodels.  I don't know if there are any PySAL users who would be interested. Ditto for scikit-learn models.

Are there any other obvious ways in which the statsmodels model is too restrictive, that I should be aware of before trying to design a common interface?

Some of the statsmodels attribute names are daft. It sometimes uses functions that should be properties. Getting access to some common and important attributes requires 3 or 4 layers.
In terms of a common interface that is designed for a presentation library, what matters is what the presentation library would want to possibly present.  parameters, std errors, t stats, values, R2, Adj R2, f-stat. Probably something similar to what stargazer is pulling from RegressionResultsWrapper only independent of RRW.

I'm do not think statsmodels will accept it since it creates maintenance burden for them against what may be a fast moving target.

By now, you should have understood that I see it exactly the opposite way: the multiplicity of libraries around, not necessarily very stable, are fast moving targets, while what stargazer needs and does is pretty obvious. Anyway, statsmodels is not the problem: stargazer was born with at least minimal support for it, it is the standard library for statistical models, and stepping back is not an option.

No, dependency means that linear models would need to have a test that _modref_get produces the correct output in the sense that what it return can be consumed by libraries that it is intended for.

You do realize that according to your argument all software standards in the world imply either 1) hard dependencies or 2) untested code... and that it isn't so. You'll have specs to test against, promised.

It really depends on what end-users what.

I'm really asking you what linearmodels end-users might want (which is not covered by statsmodels currently). But if there is nothing obvious apart from multiple dependent variables I'll start with that.

You do realize that according to your argument all software standards in the world imply either 1) hard dependencies or 2) untested code... and that it isn't so. You'll have specs to test against, promised.

There is also bad software, which is what you are describing.
Good software even with a spec is tested against the spec.  They have to write their own version of the spec which requires mocking when there isn't an abstract implementation available.
In the python universe, an ABC is the programmatic way to convey a spec. See https://docs.python.org/3/library/collections.abc.html which contains a high list of ABCs.

I'm really asking you what linearmodels end-users might want (which is not covered by stargazer currently). But if there is nothing obvious apart from multiple dependent variables I'll start with that.

I can't answer for them.  This issue seems to want to show an IV2SLS or similar model result in stargazer.

See https://github.com/StatsReporting/stargazer/pull/98


Translate property of jsx element

Hi, I just started using your library and it has been great so far. I do have a feature request / "can I do this question".
I was trying to assign a translated text to the placeholder property of an input element. however I can't seem to get it working.
const placeholder = <Translate id={'search'} />;

return (
     <input type="text" className="form-control" placeholder={placeholder} />
);

This however shows a [object] [Object] placeholder since an object is returned. Is there any way I can accomplish this without moving my complete input element to my translation file?

You need to use the translate function, which can be accessed by either using the Render Props version of <Translate /> or the withLocalize HOC.
With render props:
return (
  <Translate>
   {({ translate }) => <input type="text" className="form-control" placeholder={translate('search')} />}
 </Translate>
);

@ryandrewjohnson, Following my previous issue ( https://github.com/ryandrewjohnson/react-localize-redux/issues/146#issuecomment-462599763, marked as duplicate to this one) I am still unable to return a plain string.

return (
      <Translate>
        {({ translate }) => (
            <option value={translate('salutations.default')}>
              {translate('salutations.default')}
            </option>
        )}
      </Translate>
    );

The issue is passing the translation to the value attribute of the option
dictionary file for the saluations

is giving me error

could you advise if I am doing something wrong please as this seems to be as described in the docs.
Thank you for any help you can provide and apologise if I am missing something simple


Make note color changing more precise

While the current method of changing the note color is sufficient enough, it doesn't allow you to get the precise color that you want. If you're trying to go for a single color setup, it's very hard to get them all to match.
This PR rectifies this by tackling note colors in a different fashion. Instead of using ColorSwap to change the HSV of the current note assets, we separate the 3 colors of the note into each of the RGB channels then use a color mask shader to change the color much more precisely. This means we can now directly use RGB values for changing the note colors.
https://user-images.githubusercontent.com/15317421/215308992-d5e2b8b4-b048-49ee-b8bd-41688755619a.mp4
https://user-images.githubusercontent.com/15317421/215309013-1e7f75e6-1315-41a4-bedc-842c45b7db60.mp4
It is possible to modify all 3 parts of the note color, but I chose to keep it simple since I don't know how to easily integrate it into Psych's menus.
This doesn't apply to note and splash skins set by the songs themselves, since otherwise it would break compatibility.

Setting back to draft for now since it bugs out if the chart defines splashSkin as ""

begging for this to get merged, good stuff

although, one criticism I could give is that I'd probably keep the HSB support, something like "TAB to switch color modes" kind of deal could mitigate the issue, as note colors were made specifically for people who have colorblindness issues, but came off as a really great tool for everyone

👍

yo would you mind if i used this for a project? i will make sure to give proper credit and such

@BeastlyGabi Sure, go ahead!

PR made obsolete by 4f1817fb637a358d224147607e95cba1ebd649f6 in the experimental branch, closing.


Add official Discord server to readme

Adds the invite to the official Discord server to the readme file.

Thanks.


See the attached image :))

Hi, thanks for reporting this. Can you show me the logs so I can better diagnose the problem? The easiest way I know of getting this is simply launching ulauncher in the command line and giving me its output.

Hi, I just pushed a commit ac5ed78 that might fix your problem if my hunch is correct. Please let me know if this persists.

Hi, I just pushed a commit ac5ed78 that might fix your problem if my hunch is correct. Please let me know if this persists.

@iboyperson I'm having the same issue, here are the logs:
2021-04-13 09:15:35,246 | ERROR | ulauncher.api.server.ExtensionRunner: _run_process() | Extension "com.github.iboyperson.ulauncher-system" exited instantly with code 1
2021-04-13 09:15:35,246 | ERROR | ulauncher.api.server.ExtensionRunner: _run_process() | Extension "com.github.iboyperson.ulauncher-system" failed with an error: ImportError: Requiring namespace 'Gdk' version '3.0', but '4.0' is already loaded

Started happening after upgrading to Gnome 40, which uses Gdk 4.0 now.

Hi, @feimosi I believe your issue is different than @glorand had. If its not too much to ask can you create a separate issue for tracking your problem as it is one I can try to fix.

No problem, thanks for the quick reply!


Lens Flare artifact

From the post-processing-1.0 branch, open the Lens Flare Sandcastle example and click View from Everest. You'll see this:

Any ideas how to fix this @byumjin?
CC #5615

Sorry, there is no way to fix it
Because, it uses the scene image for its ghost effects, not the HDR scene image (only bright part).
Thus, only space scene could show the appropriate result :(

Thanks @byumjin!  We plan to implement HDR - will that fix this?  Or will we need to do additional work once HDR is implemented?

it needs additional work creating a shader extracting HDR part instead of just using scene image.

Gotcha, thanks @byumjin!
@bagnell up to you if you want to just keep this as a known issue or add the disable workaround.


Docs: Svelte integration

Here's a basic Svelte docs page with static code blocks.
As mentioned in the previous PR, I've had issues with Sandpack and Svelte.
I was able to set up a Svelte REPL that mostly works.  For some reason it stops rendering the list of TODOs if you remove the <pre> block that is subscribed to the entire store.   What's neat is that you can collaborate on the TODOs using the React and Vue examples from your other docs pages.
https://svelte.dev/repl/a3eb6fab2c8a47019ca7dc12701f6b7b?version=3.46.3
I updated my previous Codesanbox example to use the updated @syncedstore/svelte npm package.  Work great, even if you remove the <pre> block.
https://codesandbox.io/s/reverent-glitter-lb1g7?file=/App.svelte
Example (and buggy online playgrounds) aside, I hope to integrate this library into a Svelte app I've been building.
I may try to write up a tutorial as I learn more.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 82.309%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
497

Relevant Lines:
584

💛  - Coveralls

Merged as part of #51. Thanks @SkaterDad !
I'll deploy a new version of the docs and website. A blog post would be really cool. Any other ideas on where to highlight this to the Svelte community? (I'm not a really active svelte user)


32 feature settings menu

The deployment seems broken. I can't start the timer or open any settings menu. Is this the final PR or is this meant to be a draft?

The unit test issues are inherited from the issues of #65 so they'll be ignored for now

Definitely need to fix up the styling, there also appear to be some HTML issues that should be polished up ASAP: namely the labels should reference the input elements they're connected to using the for attribute, and the settings menu shouldn't use an h1 given that there's only meant to be a single h1 per page.
Additionally, the settings menu shouldn't be accessible during a timer session. Possibly it would make sense to be accessible during a break, but the option shouldn't exist while the timer is running for a work session. I'm also unsure whether it makes sense for the settings menu to be grouped with the other page options, when it only opens a modal rather than navigating to a new page. I do wonder if maybe having the settings exist solely on the timer page makes the most sense given that all our settings only interact with the timer and not the tasks list or the stats page.
With all that said I'm going to approve the changes given that we want our Web Components team to have access to the general changes ASAP.


clone and merge should have a meta param

according to #53 and #46 the easiest way to get a class line is using clone() and merge() with a meta param. I am not sure whether that would work, but I'll check. in order to do that I have to implement deepClone and deepMerge with meta first #47

I close this in favor of #63 and #66


Make the url of database more persistent

Is there any way to make the url of the database more persistent? When it is outputed to logcat, it is quickly pushed out of the window by recent logcat outputs. Is there any other way I can view the database url outside logcat?

Yes, you can use this
public static void showDebugDBAddressLogToast(Context context) {
    if (BuildConfig.DEBUG) {
       try {
            Class<?> debugDB = Class.forName("com.amitshekhar.DebugDB");
            Method getAddressLog = debugDB.getMethod("getAddressLog");
            Object value = getAddressLog.invoke(null);
            Toast.makeText(context, (String) value, Toast.LENGTH_LONG).show();
       } catch (Exception ignore) {

       }
    }
}


how to make auto-scroll work when scrollbar is on body

I have the same scenario as in your example(link below), the body is not auto-scrolling when dragging an item to the top or bottom of the page.
http://jsbin.com/boqugumiqi/1/edit?html,js,output
I have tried increasing scrollSensitivity but didnt work. Horizontal scrolling is working fine but not vertical.
Thanks.

In other words it does not work in your code?
P.S. I check my example, work: http://recordit.co/tKarLIIbBn

It does work, even though on jsbin is hard to see because the last few items are overflowing, you could notice on the scrollbar.
Check out on codepen: https://codepen.io/anon/pen/mMwwYg

Check latest version


MS SQL Server Syntax

There is some diferences between MS SQL Server syntax and others DBMS. I'm using GenericBuilder
How can I adapt for MS SQL Server?
Example:
MySQL:
SELECT * FROM table_name LIMIT 10
SQL Server:
SELECT TOP 10 * FROM table_name

Looks like you'll need to create your own builder like the MySQL builder and then replace some of the query writers:
    protected $queryWriterArray = [
        'SELECT' => '\NilPortugues\Sql\QueryBuilder\Builder\Syntax\WriterFactory::createSelectWriter',
        'INSERT' => '\NilPortugues\Sql\QueryBuilder\Builder\Syntax\WriterFactory::createInsertWriter',
        'UPDATE' => '\NilPortugues\Sql\QueryBuilder\Builder\Syntax\WriterFactory::createUpdateWriter',
        'DELETE' => '\NilPortugues\Sql\QueryBuilder\Builder\Syntax\WriterFactory::createDeleteWriter',
        'INTERSECT' => '\NilPortugues\Sql\QueryBuilder\Builder\Syntax\WriterFactory::createIntersectWriter',
        'MINUS' => '\NilPortugues\Sql\QueryBuilder\Builder\Syntax\WriterFactory::createMinusWriter',
        'UNION' => '\NilPortugues\Sql\QueryBuilder\Builder\Syntax\WriterFactory::createUnionWriter',
        'UNION ALL' => '\NilPortugues\Sql\QueryBuilder\Builder\Syntax\WriterFactory::createUnionAllWriter',
    ];

You'll need to extend the src/Builder/Syntax/SelectWriter.php as your own and then replace the select writer in that query builder writer array.

I recently discover this package and it's awesome!
But I had implemented in this way:
SqlSrvBuilder:
<?php namespace MyNamespace\SqlSrv;

use \NilPortugues\Sql\QueryBuilder\Builder\Syntax\PlaceholderWriter;
use \NilPortugues\Sql\QueryBuilder\Builder\BuilderInterface;
use \NilPortugues\Sql\QueryBuilder\Builder\GenericBuilder;

class SqlSrvBuilder extends GenericBuilder {
    public function __construct() {
        parent::__construct();

        // override select factory
        $this->queryWriterArray["SELECT"] = self::class . "::createSelectWriter";
    }

    public static function createSelectWriter(BuilderInterface $writer, PlaceholderWriter $placeholderWriter) {
        return new CustomSelectWriter($writer, $placeholderWriter);
    }
}

CustomSelectWriter:
<?php namespace MyNamespace\SqlSrv;

use NilPortugues\Sql\QueryBuilder\Manipulation\Select;
use \NilPortugues\Sql\QueryBuilder\Builder\Syntax\SelectWriter;

class CustomSelectWriter extends SelectWriter {
    const rowNumberColumn = "_RowNumber";

    public function writeSelectColumns(Select $select, array &$parts)
    {
        $mask = $this->getStartingLimit($select).$this->getLimitCount($select);

        if ($mask !== '00') {
            $select->setFunctionAsColumn("ROW_NUMBER() OVER ({_orderClause})", array(), self::rowNumberColumn);
        }

        parent::writeSelectColumns($select, $parts);

        return $this;
    }

    /**
     * @param Select $select
     * @param array  $parts
     *
     * @return $this
     */
    public function writeSelectLimit(Select $select, array &$parts)
    {
        $mask = $this->getStartingLimit($select).$this->getLimitCount($select);
        $limit = [""];

        if ($mask !== '00') {
            $start = $this->placeholderWriter->add($select->getLimitStart());
            $count = $this->placeholderWriter->add($select->getLimitCount());
            $limit = "LIMIT2 {$start}, {$count}";

            $orderClause = "";
            $orderIndex = -1;

            foreach ($parts as $index => $part) {
                // Localizar la ordenación.
                if (substr($part, 0, 8) == "ORDER BY") {
                    $orderClause = $part;
                    $orderIndex = $index;
                    break;
                }
            }

            if ($orderIndex === -1) {
                throw new \Exception("ORDER BY not implemented.");
            }

            foreach ($parts as $index => $part) {
                if (strpos($part, "ROW_NUMBER()") !== false) {
                    $parts[$index] = str_replace("{_orderClause}", $orderClause, $part);
                }
            }

            unset($parts[$orderIndex]);

            $sql = ["SELECT", "*","FROM", "("];
            $sql[] = implode(" ", \array_filter($parts));
            $parts = \array_merge($sql, [
                ")", " AS _OrderedTable", "WHERE",
                self::rowNumberColumn, ">=", $start, "AND",
                self::rowNumberColumn, "<=", $count]);
        }

        return $this;
    }
}

I know this and old issue!
Thanks for your code!


Cannot add character

{"body":"{"error":"Not found"}","code":404,"path":"https://esi.evetech.net/v1/characters/affiliation/","sheet_id":"1-TfHicMlu-qoH5om1454hJbEC12RqIJKnjuGtz8aE2Q","character":null} (line 291, file "gesi", project "GESI")

@brygphilomena This actually isn't a GESI issue.  ESI is just having issues with that endpoint.  Just try again in a bit.
Can use https://status.esiknife.space/?endpoints=c75893 to monitor the status of it.


Unable to verify secret hash for client xxxxxxx

Hello there!
Thanks for putting up this package :) Nice work!
I am trying to use it by running the example app, but when I try to sign in (sign-up has already been done via another app), I get a error "Unable to verify secret hash for client xxxxxxx".
I don't see a way to specify the app client secret anywhere. Is it the secret that is generated in the AWS Cognito console, under the pool's "App Clients" section ? If yes, how can you make your example app work without it ? I am confused...

Ok, nevermind... I was generating a app client secret, that is not really useful in the context of a mobile app.
https://forums.aws.amazon.com/thread.jspa?messageID=820616


XCalendar.Maui 4.4.2 works when debugging, crashes at startup when installed on android phone

Greetings!
After successfully implementing this amazing control and trying to test it on my phone (Realme 8 Pro with Android 13)
The program crashes at startup after installation.
The program works just fine in the emulator when debugging, but when changing to release and trying to manually install the app into my android phone, the program installs fine, however when starting the program up, the .net maui splashscreen appears and then app instantly crashes without any error.
I have tried using a clean project from scratch, same problem persists.
Is there any tip or anything i could do to make it run on a android phone?
Devices and OS Versions:
Realme 8 Pro:
Android 13:
Windows Version: 11 Pro, 22h2 (custom built pc)
Visual Studio 2022 17.6.1 .NET 7
Thanks in advance for all your help!

May be related to #67.

What device are you using in your emulator?
What happens when you try to run the MAUI app on your Windows Machine (Debug and Release)?
What code did you have in your clean project from scratch?
Are you able to run your project on your Android device in debug mode instead of release mode?
Are you able to run your project if you remove the use of any XCalendar controls such as CalendarView or MonthView?
Are you able to run a file new MAUI app without XCalendar on your Android device (Debug and Release)?
Are you able to run a file new MAUI app with XCalendar.MAUI but not using any controls from it on your Android Device (Debug and Release)?
Are you able to run the sample app on your Android device (Debug and Release)?

Greetings, to make this debugging easier, i have uploaded a test project to a zip file on wetransfer.
You can find it here by clicking this link
As to reply to your questions

The device in the emulator is the default android device (Pixel 5 API 33 i think this is the default)
I never tried to run in Windows Machine as i need to change some code behind to be able to do so, i only used the android emulator to debug and a physical Realme 8 Pro device to test when released.
The code i had from scratch was just the default .net Maui Code + the xcalendar code, a few more lines in the csproj file to accomodate a key to publish the .apk file, a models folder with a model.cs class inside where the xcalendar has its binded data and thats about it.
I have never tried it in debug, i tought you werent able to do so in .net Maui as it wont even install if i try as it says its not compatible with my phone.
5 and 6) Once i add the XCalendar to the project, even after removing it from said project by removing all the lines of codes and uninstalling the nuget package, still, i can no longer run the published apk.
Yes as long as i do not ever reference XCalendar i am able to run the released apk (debug is not compatible with my arm device).
No.
I have never tried it as i couldnt build the sample Xcalendar app.

NOTE: This information might be important, in order to sign the apk, i use the terminal with the following guide:
In terminal VS2022
keytool -genkey -v -keystore key.keystore -alias ProjectAlias -keyalg RSA -keysize 2048 -validity 10000
Password: passwordsomething153
FirstName Eugen
LastName Systems
In MainProject programming class (example open file explorer go inside project folder and find NewMauiApp1.csproj), add before last  line

True
key.keystore
passwordsomething153
ProjectAlias
passwordsomething153

Please dont hesitate to contact me for further details as i am very new to .net MAUI and this is actually my very first .net MAUI project that im trying to build.
Best Regards!

I am able to run your project in debug mode but not release mode. In release mode I get these errors:

They don't seem to be related to XCalendar but I have yet to do actual testing by removing XCalendar from the project etc.
I've only ever signed APK and provided keystore details in Xamarin but in MAUI it seems to be the same: Project (NetMauiApp1) -> Properties -> Android -> Package Signing and then right clicking Project (NetMauiApp1) and clicking "publish" and then selecting the resulting archive and clicking "Distribute" and entering the keystore details there.
I've never seen someone experiencing your answer to Q4. It may provide insight into why your app crashes in release. What is the exact error message that says it isn't compatible with your phone? If it's your app that isn't compatible then it would make sense it doesn't work in release, but if debugging isn't compatible then that needs to be troubleshooted as to why. I just don't see how debugging wouldn't be supported on a standard Android 13 device. I assume you have the developer options enabled and the "USB Debugging" setting enabled. I see the Release package format is set to "Bundle" instead of "Apk" in the project so I don't even know how an APK would be genereated.
For your answer to Q3, could you create a new project and not include the code to do with publishing and see if it works first, then add the publishing details to see if that is causing yor issue.
I have no experience with using the terminal to sign the apk. It seems like you're generating an APK and installing it manually on your Android device, which is where you would get the "App is incompatible" error. The app should automatically be deployed onto your device whether in debug or release and you shouldn't have to manually do anything other than open the resulting app. If you install the app manually on your device then it makes sense why it would work in the emulator but not in your physical device. When you generate your APK how do you actually get it to your device? Could you provide steps if it isn't just: Run in release -> Go to Android device -> run app?
Im unable to understand your answer to Q5 ad Q6

4. I have never tried it in debug, i tought you werent able to do so in .net Maui as it wont even install if i try as it says its not compatible with my phone.
   5 and 6) Once i add the XCalendar to the project, even after removing it from said project by removing all the lines of codes and uninstalling the nuget package, still, i can no longer run the published apk.

5. Yes as long as i do not ever reference XCalendar I am able to run the released apk (debug is not compatible with my arm device).

6. No.

Your answer to Q4 where it says "5 and 6)" seems to contradict your answer to Q5. I understand that you created a new project which worked initially. Then you added XCalendar and then removed it and it never worked afterwards. I've never seen this before either. What happens when you add and remove other nuget packages that add MAUI controls? Can you try at least 2 others one at a time and see if you get the same result? I think I see that Q4 "5 and 6)" refers to Q5 and Q6 and then your answers to Q5, Q6, and Q7 are actually your aswers to Q7, Q8, and Q9.
From what I've seen I think this issue is caused by how you build and deploy your app to your device rather than by XCalendar, but it is weird that installing it and removing it permanently stops your app from running. Does this happen if you install other packages that add MAUI controls?

Sorry for the confusion with the point numbering there....
For some reason github changes the numbers automatically of each point, go figure.
I can "publish" an apk without using any key or any commands from the terminal but then it wont be compatible with my phone as the apk is not published "properly".
It's probably because the android emulator is running in a x86 cpu and my phone is actually arm.
What i wanted to achieve was actually very simple, i want to make an .apk file that i can manually copy to my phone internal storage and then the user installs said apk from its mobile phone internal memory (Not Google Play Store).
I do not intend to debug the app with adb, or debug it directly from visual studio, i want to check how the app actually behaves when published and installed in a non dev phone, which is where it actually crashes after xecalendar is referenced.
All tutorials i've found online shows me that i must sign the android apk with the keytool in order for me to actually be able to generate a proper apk that can install and run in any phone.
Is there perhaps something wrong with my process or maybe im missing something?

I don't know the difference between ARM and the architecure of your emulator and its implications. What do you mean it's not compatible with your phone? At what point do you get a warning or error when you don't publish the app using your method?
Have you tried the below method for generating a signed apk? I think it's an alternative to using the terminal.

I have no experience with using the terminal to sign the apk. I've only ever signed APK and provided keystore details in Xamarin but in MAUI it seems to be the same: Project (NetMauiApp1) -> Properties -> Android -> Package Signing and then right clicking Project (NetMauiApp1) and clicking "publish" and then selecting the resulting archive and clicking "Distribute" and entering the keystore details there.

What result did you get from this:

it is weird that installing it and removing it will permanently stop your app from running. Does this happen if you install other packages that add MAUI controls?

As far as I'm aware and in my experience you don't need to sign an apk to have it run on devices. I don't know why it doesn't let you install the app on your device. There are some security/developer settings such as "Install from unknown sources" which could prevent the user from installing your app though. I'm out of ideas as to what it could be.
In regards to:

Is there perhaps something wrong with my process or maybe im missing something?

I'm out of ideas and can only suggest to try with other packages or with other sample apps on GitHub to see if your apk-signing process works with them. If they do, then its an issue with XCalendar and I don't know why it would cause crashing after its been removed from the project. Maybe you could try to find someone else with a similar issue with their MAUI app, or raise an issue in the MAUI repo to get help from people with more knowledge of the Android OS and MAUI framework.
I would suggest Syncfusion's Calendar as an alternative since I don't think this issue will be solved anytime soon.

Im not sure if this is of any interest as im not even sure if it's actually accurate information, but, perhaps .net maui no longer uses relaycommands and probably replaced it with something newer?
Again i have really no experience with .net maui and this is my first ever project with it, so take this specific info with a grain of salt.

Will look at this again some time, great debugging

Running first set of code
Issue 1

Solution
Remove Style="{StaticResource DefaultCalendarViewStyle}" from
            <xc:CalendarView
                Background="LightGray"
                x:Name="MainCalendarView"
                BackwardsArrowCommand="{Binding NavigateCalendarCommand}"
                Days="{Binding Calendar.Days}"
                DaysOfWeek="{Binding Calendar.DayNamesOrder}"
                ForwardsArrowCommand="{Binding NavigateCalendarCommand}"
                NavigatedDate="{Binding Calendar.NavigatedDate}"
                Style="{StaticResource DefaultCalendarViewStyle}">

Issue 2

Solution
Remove Style="{StaticResource DefaultNavigationViewStyle}" from
                <xc:CalendarView.NavigationViewTemplate>
                    <ControlTemplate>
                        <xc:NavigationView
                            BackwardsArrowCommand="{Binding BackwardsArrowCommand, Source={RelativeSource TemplatedParent}}"
                            BackwardsArrowCommandParameter="{Binding BackwardsArrowCommandParameter, Source={RelativeSource TemplatedParent}}"
                            ForwardsArrowCommand="{Binding ForwardsArrowCommand, Source={RelativeSource TemplatedParent}}"
                            ForwardsArrowCommandParameter="{Binding ForwardsArrowCommandParameter, Source={RelativeSource TemplatedParent}}"
                            Style="{StaticResource DefaultNavigationViewStyle}"
                            Text="{Binding Text, Source={RelativeSource TemplatedParent}}"/>
                    </ControlTemplate>
                </xc:CalendarView.NavigationViewTemplate>

Issue 3
The StaticResources "DefaultDayViewCurrentMonthStyle", "DefaultDayViewTodayStyle", and "DefaultDayViewSelectedStyle" are used in the following code but are not defined:
                                <xc:DayView.CurrentMonthStyle>
                                    <Style BasedOn="{StaticResource DefaultDayViewCurrentMonthStyle}" TargetType="{x:Type xc:DayView}">
                                        <Setter Property="Command" Value="{Binding BindingContext.ChangeDateSelectionCommand, Source={x:Reference This}}"/>
                                        <Setter Property="CommandParameter" Value="{Binding DateTime}"/>
                                    </Style>
                                </xc:DayView.CurrentMonthStyle>

                                <xc:DayView.TodayStyle>
                                    <Style BasedOn="{StaticResource DefaultDayViewTodayStyle}" TargetType="{x:Type xc:DayView}">
                                        <Setter Property="Command" Value="{Binding BindingContext.ChangeDateSelectionCommand, Source={x:Reference This}}"/>
                                        <Setter Property="CommandParameter" Value="{Binding DateTime}"/>
                                    </Style>
                                </xc:DayView.TodayStyle>

                                <xc:DayView.SelectedStyle>
                                    <Style BasedOn="{StaticResource DefaultDayViewSelectedStyle}" TargetType="{x:Type xc:DayView}">
                                        <Setter Property="Command" Value="{Binding BindingContext.ChangeDateSelectionCommand, Source={x:Reference This}}"/>
                                        <Setter Property="CommandParameter" Value="{Binding DateTime}"/>
                                    </Style>
                                </xc:DayView.SelectedStyle>

Solution
Either don't set "BasedOn", or if you want to use the default look of the DayView, replace them with the values in the XCalendar.Maui.DefaultStyles class. For example:
                                <xc:DayView.CurrentMonthStyle>
                                    <Style BasedOn="{x:Static xcStyles.DefaultStyles.DefaultDayViewCurrentMonthStyle}" TargetType="{x:Type xc:DayView}">
                                        <Setter Property="Command" Value="{Binding BindingContext.ChangeDateSelectionCommand, Source={x:Reference This}}"/>
                                        <Setter Property="CommandParameter" Value="{Binding DateTime}"/>
                                    </Style>
                                </xc:DayView.CurrentMonthStyle>

Where xcStyles is defined earlier in the view:  xmlns:xcStyles="clr-namespace:XCalendar.Maui.Styles;assembly=XCalendar.Maui"
Looking at second set of code:
Issues from your first set of code also apply and will not be ammended in the solutions provided.
Issue 1

It builds fine, works fine in emulator and even the published apk installs fine on the phone and displays without crashing!
Im not sure how to be able to change the months and arrows colors and select different dates using the new 4.5.1 calendar version with the working code, as of right now the working example doesnt allow the user to interact with the control at all.

You have defined the DateSelectionCommand but you have not assigned it to the days in your Calendar in XAML like you did in your first example. The day is being tapped but non of the states know that you want to use that command:
                                <xc:DayView.CurrentMonthStyle>
                                    <Style BasedOn="{StaticResource DefaultDayViewCurrentMonthStyle}" TargetType="{x:Type xc:DayView}">
                                        <Setter Property="Command" Value="{Binding BindingContext.ChangeDateSelectionCommand, Source={x:Reference This}}"/>
                                        <Setter Property="CommandParameter" Value="{Binding DateTime}"/>
                                    </Style>
                                </xc:DayView.CurrentMonthStyle>

                                <xc:DayView.TodayStyle>
                                    <Style BasedOn="{StaticResource DefaultDayViewTodayStyle}" TargetType="{x:Type xc:DayView}">
                                        <Setter Property="Command" Value="{Binding BindingContext.ChangeDateSelectionCommand, Source={x:Reference This}}"/>
                                        <Setter Property="CommandParameter" Value="{Binding DateTime}"/>
                                    </Style>
                                </xc:DayView.TodayStyle>

                                <xc:DayView.SelectedStyle>
                                    <Style BasedOn="{StaticResource DefaultDayViewSelectedStyle}" TargetType="{x:Type xc:DayView}">
                                        <Setter Property="Command" Value="{Binding BindingContext.ChangeDateSelectionCommand, Source={x:Reference This}}"/>
                                        <Setter Property="CommandParameter" Value="{Binding DateTime}"/>
                                    </Style>
                                </xc:DayView.SelectedStyle>
### Solution

Set the DayTemplate to a DayView and define the style. Use BasedOn and the DefaultStyles class to inherit from the default styles used. The following code sets the command to use when a day is tapped and is in the `CurrentMonth` DayState. The XAML namespace for "xcStyles" is defined earlier in the view: `xmlns:xcStyles="clr-namespace:XCalendar.Maui.Styles;assembly=XCalendar.Maui"`. The page is given `x:Name="This"` so the page's BindingContext can be accessed inside the DataTemplate.
```xaml
                                <xc:DayView.CurrentMonthStyle>
                                    <Style BasedOn="{StaticResource DefaultDayViewCurrentMonthStyle}" TargetType="{x:Type xc:DayView}">
                                        <Setter Property="Command" Value="{Binding BindingContext.ChangeDateSelectionCommand, Source={x:Reference This}}"/>
                                        <Setter Property="CommandParameter" Value="{Binding DateTime}"/>
                                    </Style>
                                </xc:DayView.CurrentMonthStyle>

It really is valuable testing with a debugger first to see the errors that cause your app to crash. After that you can delete the app and test without the debugger like you do currently. With XAML there can be many runtime errors so I think its essential that you find out why you're not able to run apps in debug mode on your phone, especially if you're using complex templates and bindings. Are you able to run in debug mode in your emulator?
You said it ran fine in the emulator. I don't know how that occurred either as it still should have crashed/thrown an exception because of the afformentioned issues.
Thanks for doing tests and posting what did and didn't work. Made it much easier to spot the difference.

Hello, sorry for the delay i have been really busy these days and couldnt test your answear untill today.
Thank you very much for your reply, great news!
It semms to be working just fine now, it builds ok and no longer crashes on my phone when manually deployed and installed from an apk, however now im confused on how to get the last part working, namely i dont know where to put this code:
<xc:DayView.CurrentMonthStyle>
                                    <Style TargetType="{x:Type xc:DayView}">
                                        <Setter Property="Command" Value="{Binding BindingContext.ChangeDateSelectionCommand, Source={x:Reference This}}"/>
                                        <Setter Property="CommandParameter" Value="{Binding DateTime}"/>
                                    </Style>
                                </xc:DayView.CurrentMonthStyle>

Is there a chance you could help me out make this work on 4.5.1, example: to be able to change months and click on specific days?
I dont know why but im struggling really hard with the documentation, even though it should be as simple as a copy and paste.
Once more thank you for your time!

Stuff from the sample app is almost copy paste but at least a little knowledge is required to recognise what resources were used need to be removed or replicated in your app like Styles or x:Name or nuget packages. Things can also be done in many ways, and the way I have dine it may not always suite your needs.
Anyway, if you want to move the month and be able to select days, I recommend looking at the "Date Selection" example in the sample app.
The <xc:DayView.CurrentMonthStyle> would go in the DataTemplate that you put inside the `xc:CalendarView.DayTemplate>. This usage is present in many of the examples.

Stuff from the sample app is almost copy paste but at least a little knowledge is required to recognise what resources were used need to be removed or replicated in your app like Styles or x:Name or nuget packages. Things can also be done in many ways, and the way I have dine it may not always suite your needs.
Anyway, if you want to move the month and be able to select days, I recommend looking at the "Date Selection" example in the sample app.
The <xc:DayView.CurrentMonthStyle> would go in the DataTemplate that you put inside the `xc:CalendarView.DayTemplate>. This usage is present in many of the examples.


liferea can't play audio

Issue description
The RSS Reader has a feature to play podcasts, but it don't work.
Steps to reproduce

start liferea
open "EscapePod" feed from examples
try to play any podcast

https://youtu.be/BisT8v6bzJk
console output:
Error: gst-core-error-quark: Your GStreamer installation is missing a plug-in. (12) gsturidecodebin.c(998): no_more_pads_full (): /GstPlayBin:player/GstURIDecodeBin:uridecodebin7:
no suitable plugins found:
gstdecodebin2.c(4600): gst_decode_bin_expose (): /GstPlayBin:player/GstURIDecodeBin:uridecodebin7/GstDecodeBin:decodebin7:
no suitable plugins found:
Missing decoder: MPEG-1 Layer 3 (MP3) (audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3, rate=(int)44100, channels=(int)2, parsed=(boolean)true)

Technical details

system: "x86_64-linux"
host os: Linux 4.14.35, NixOS, 18.03.132155.b50443b5c4a (Impala)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.0.1
channels(davidak): ""
channels(root): "nixos-18.03, nixos-hardware, unstable-18.09pre133640.ea145b68a01"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs

MP3 codecs were moved from gst-plugins-bad to gst-plugins-good. All music players will need to be adjusted.

Maybe we need to set https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/audio/clementine/default.nix#L85 ?

wrapGAppsHook will do that automatically.

I can play EscapePod on 6c064e6b without any error.

Right, the mp3 codec was actually previously in ugly, which liferea package does not depend on, so it did not have MP3 support before https://github.com/NixOS/nixpkgs/pull/38149.

Closing, since it works in unstable. If someone wants this in release, I suggest adding gst-plugins-ugly dependency.


Feature request: Word count of current block

My most frequent action is to select a block (paragraph) to asses what its word count is. I'd like to see an option that displays two word counts side by side in the status bar:

The current line word count OR selected text word count
The total word count

I'm not too sure I understand. Would you like an additional word count that counts the words in the paragraph where the cursor is? It'll be toggleable.

I'm not too sure I understand. Would you like an additional word count that counts the words in the paragraph where the cursor is? It'll be toggleable.

Correct, I'd like an additional word count indicator for the paragraph my cursor is currently within.

Okay will release an update soon 👍

I want something similar. i want a wordcount of text from start of the note to the current block (the cursor position) beside the one that show all the words in the note, it is very useful for measuring progress as i read books and papers in md.
thanks

I would like something similar, I use Templates a lot and every time I end up writing most of the content under only one part of the template. What i care about is the ammount of words in that specific area. It would be good if there was an option to put a Prefix like START: and a suffix like END and it automatically counts only the words inside that delimited area and nothing else on every note that has the prefix and suffix I chose. Of course, START: and END could be used in the text and that could be easily solved by adding an option to let the user decide which prefix and suffix to use as delimiters.
Thanks people.

When I was looking for a word count feature, I was likewise going to comment and add my thoughts, but I found an existing feature that indirectly solved my issue. I read all the comments, I'd like to point out that there is a "Section Word Count" Option now that displays the amount of words within an ATX Heading's Outline. Additionally, if there are child or sub-headings within the outline, It will also show a second amount based on the combined Word Count of both itself and all child ATX Headings.

For Anyone else looking to make it easier to see, here is an example css, so I am using Wikipedia theme, so I change Wikipedia.css and append to the end of the file:  (I believe my 80% is 60% larger than the default of 50%.)
.bwc-section-count {
    font-size: 80%;
    color: green;
    font-weight: bold;
}

Example
Output
Output with modified css

# Example A (3/9)Example A Text## Example A-A (3)Example A-A Text## Example A-B (3)Example A-B Text# Example B (7/18)Example B Text is a little longer## Example B-A (5)Example B-A Text is different## Example B-B (6)Example B-B Text is uncreatively different

If my hint wasn't direct enough, I feel that the numbers are too small, adding an option in the settings to make the text larger is my 2 cents.


Set cookieconsent_dismissed to base domain

It would be great to be able to set the cookieconsent_dismised to .domain.com rather than www.domain.com then it would cover the site sub-domains such as blog.domain.com.

Hey,
We just released a new version with this functionality! #31
You just need to set the path option.

Is this deployed to aws?
To use then in the options I should specify "path":".domain.com"


GIMP: Using installer.script instead of original installer

Close #1369
Please consider merging https://github.com/lukesampson/scoop/pull/3204, current unpack_inno crashed occasionally (due to Move-Item for huge amount of files).

Unquoted $dir in Push-Location
Why both architecture scripts?

There could be one universal which could look like this:
Push-Location $dir
Get-ChildItem -Filter '*.debug' -Recurse | Remove-Item -Recurse
if ($architecture -eq '32') {
   Rename ,1 to twain
   Remove ,2
....
}

$dir is quoted.
The installer script has similar sections, but files manipulation and config setting are differ a lots:

64bit

files have names as *,2*, *,3*
has a 32 dir, but need to copy two extra dirs into it.
python related files need to copy to 32
has a 32bit twain.exe (for 32bit plugins supports)
PATH config set to bin and 32\bin

32bit

files have names as *,1*
move 32 over base dir
PATH config set to bin

So two scripts is prefered, otherwise it is too complex.

Or using pre_install, arch.installer.script, post_install.
pre_install for deleting .debug
post_install for set config
arch.install.er.script for others


Closes: #1

Updated validations.py python script.
Fixed the behavior of validate_user function in validations.py.
Fixes #15606

It's a good idea to open an issue first for discussion.

[x] Tests pass
[x] Appropriate changes to README are included in PR

@googlebot I signed it!

@googlebot I fixed it.

@googlebot I fixed it.

@googlebot I fixed it.

@googlebot I fixed it.


⏫ bump "github-action-add-on-test"

The Issue
The official workflow uses the keep-alive action. This generates commit after inactivity to prevent automated testing from being disabled.
How This PR Solves The Issue
This PR updates the workflow to a version that does not generate commits.
Manual Testing Instructions
Automated Testing Overview

Related Issue Link(s)
https://github.com/gautamkrishnar/keepalive-workflow/releases/tag/2.0.0
Release/Deployment Notes

This is for v2. Did I miss something?


Master

Take a look at the added files in pages/Courses_Projects path:

CoursesProjectsModel
CoursesController
ProjectsController

i think functions are good, but pages are required as we discussed in our last meeting.
please make the required pages are re-send a pull request.
Note:
you may use this as a reference
Bade3 pull request

But I think that's better than having each function in a detached file [that's your thought], the same thing in a different manner.

You shouldn't think, you must believe.

Trust me, that's not going to matter.

i didn't mean that each function should be in a file. 😂
you can put all the functions in one file if you want, what i meant is you still have to implement the pages needed which will call these functions.
course:

add/edit
view
projects:
add/edit
view

Ok, I have no problem with that.
I mentioned how to call them and explained how easy is it, so I thought that was sufficient and they would be created after finishing the site design.

The problem is that front end team will use these pages which we provide to design the website, and they don't know that much about PHP.
so we have to echo all page content then they will add HTML, CSS, JS required for design.


pattern import log statement improved/signoff

Notes for Reviewers
This PR fixes #11422
Signed commits

[X] Yes, I signed my commits.

Thank you @rahulrana701
Let's discuss this on the Meshery dev meeting. Adding it as an agenda item to the meeting minutes.

@leecalcote sure


Unable to provision RKE2 clusters 500 error related to Registry.spec.rkeConfig.registries.configs

Rancher Server Setup

Rancher version: 2.6-head (78b78cb)
Installation option (Docker install/Helm Chart): docker install

If Helm Chart, Kubernetes Info:
Cluster Type (RKE1, RKE2, k3s, EKS, etc): k3s
Node Setup: single node
Version: v1.21.3+k3s1

Proxy/Cert Details: n/a

Information about the Cluster

Kubernetes version: v1.21.3-rc6-rke2r2
Cluster Type (Local/Downstream): downstream

If downstream, what type of cluster? (Custom/Imported or specify provider for Hosted/Infrastructure Provider): ec2/DO providers were tested

Describe the bug

user is unable to deploy an rke2 cluster using ec2 or digital ocean providers
To Reproduce

try to create an rke2 cluster using digital ocean or ec2

Result
(500) error shown in console and through rancher
admission webhook \"rancher.cattle.io\" denied the request: Internal error occurred: json: cannot unmarshal array into Go struct field Registry.spec.rkeConfig.registries.configs of type map[string]v1.RegistryConfig

Expected Result

rke2 clusters should be able to provision through rancher
Screenshots

Additional context

rke1 is working fine with the same credentials.

this is working now on 2.6-head after getting the latest dashboard updates

provision DO node -- pass
provision custom cluster -- pass


feat: old blog path redirects, job positions meta descriptions

This looks good. let's merge this to develop


Publish more docs

Needed for pekko core documentation

I'm not an expert on the paradox stuff in this repo. But I think you need entries in https://github.com/apache/incubator-pekko-samples/blob/main/docs-gen/build.sbt and I don't think these are in there.
When in doubt, I've just been changing links in pekko docs to point at the GitHub READMEs instead. They have the same info.

I'm not an expert on the paradox stuff in this repo. But I think you need entries in https://github.com/apache/incubator-pekko-samples/blob/main/docs-gen/build.sbt and I don't think these are in there.

Done.

When in doubt, I've just been changing links in pekko docs to point at the GitHub READMEs instead. They have the same info.
Ill try and get it done properly by tonight, but then I will give up and just point to README.md

@pjfanning Okay so everything looks good and tests are passing


can you tell me what the port 58785 use for ?

I want to deploy a cluster use a single machine,
then I need to deal with port bind conflict.
so I found this:
tcp        0      0 <IP_ADDRESS>:58785               <IP_ADDRESS>:*                   LISTEN      9150/beam.smp       off (0.00/0/0)
tcp        0      0 <IP_ADDRESS>:18083               <IP_ADDRESS>:*                   LISTEN      9150/beam.smp       off (0.00/0/0)

So I use my script to find out which file contain 58785, but never found.
then I use github to search, use this link "https://github.com/search?q=org%3Aemqtt+58785",
and without result too.
So, can you help me about this ?

OK, when I restart the server, it change to a new port
tcp        0      0 <IP_ADDRESS>:52233               <IP_ADDRESS>:*                   LISTEN      10060/beam.smp      off (0.00/0/0)

It could be a feature 😊

is this ?
http://emqtt.com/docs/cluster.html#cluster-firewall

@Yaoguais, docs about distributed erlang system: http://erlang.org/doc/reference_manual/distributed.html


Write coveragerc to omit caffe_pb2 file from a coverage report

I wrote .coveragerc file which is used in coveralls command to ignore caffe_pb2.py file.

LGTM!


Remove jupyter-desktop-server

This should remove jupyter-desktop-server in response to #73. If it's better to keep it and fix it please feel free to close this, I'm just trying to get familiar with the issue queue 😄
When I build this locally I get
ADD failed: stat /var/lib/docker/tmp/docker-builder757307623/ipython_config.py: no such file or directory

Is that something I'm missing in the build process? I don't see ipython_config.py in images/user.

w00p w00p, awesome @ianabc! THANK YOU!!!!! Am excited for you to poke around here :)
I think the ipython_config.py is something on my system but nowhere else, and hence the builds were succeeding before :'( Can you add a commit removing that line too? Sorry!
You'll need to build and push the image before merging this. Been trying to automate that, but have run into issues where git log images/user is producing the commit of the last change to that directory on my local machine, but the current commit even if it didn't touch that directory in GitHub Actions 😢

Cool, I removed that line from the Dockerfile and it builds happily now. I didn't tried pushing it anywhere, I wasn't sure if I could do that without causing problems for other people and I didn't really test the changes so I left it alone. I'll take a look through build.py and try to understand what is going on. For the moment I'm just looking for things that look easy and "probably" won't break then crossing my fingers and opening a PR! 😄
The term is starting to settle into a pattern so I'll try to set aside some time to catch up on all the new things. Thank you!

indeed @ianabc it makes me happy to see you here as well!


Switch does not catch type errors

I was expecting switch statements to warn me of impossible cases.
/* @flow */

type T = {key: 'a'} | {key: 'b'};

function f(v: T) {
  switch (v) {
    case 'a': // This is NOT flagged
  }
}

Try it
It seems to work with simpler cases like this:
/* @flow */

type T = 'a' | 'b';

function f(v: T) {
  switch (v) {
    case 'c': // This is correctly flagged
  }
}

Try it

Maybe duplicate of https://github.com/facebook/flow/issues/2395 ?

In general Flow doesn't warn on unreachable blocks of code. There is definitely an issue for that.

Your first case now throws errors, which means this case is solved, changing your first example to switch (v.key) { removes the error which is expected.


Support Tobin Tax

Currently is broken, we need to support tobin tax transfers:
Example
//For a locked gold operation that got a tobin tax of 10%  you'll have
// lock(100)
// tax 10
// The event will be `GoldLocked(fromAccount, 90)`
// The Transfer Operation
fromAccountMain       -100
lockedGolContractMain   90
tobinRecipientAccount   10
 // LockedGold operation (created from GoldLocked event) will be:
fromAccountMain                 -90
fromAccountLockedNonVoting       90
lockedGolContractMain            90
// Now we need to figure out that both are the SAME operation group, and output
fromAccountMain                 -100
fromAccountLockedNonVoting       90
lockedGolContractMain            90
tobinRecipientAccount            10

Tobin tax is deprecated with Gingerbread hardfork.


Clear env vars on xcodebuild

Because xcodebuild -exportArchive runs ruby internally, passing ruby related env vars to xcodebuild may lead to an error.
This PR is to clear env vars on xcodebuild invocation.

Sorry, build:archive may fail now. I'm trying to fix that.


Tutorial pytorch-image-transfer-learning does not work

First of all, thank you for all your great work!
I have a current installation of Label-Studio on Ubuntu 20.04. Wanting to classify images, I have followed the tutorial at https://labelstud.io/tutorials/pytorch-image-transfer-learning.html and got to the point where I could run the service and connect to Label-Studio, well sort of. However, it seems I am overlooking something in the last section ImageClassifierAPI.
On trying to connect, the connection itself is established but I get
[](http://slack.labelstud.io.s3-website-us-east-1.amazonaws.com/?source=product-error-msg)Validation error
Successfully connected to http://<IP_ADDRESS>:9090/ but it doesn't look like a valid ML backend. Reason: 500 Server Error: INTERNAL SERVER ERROR for url: http://<IP_ADDRESS>:9090/setup.
Check the ML backend server console logs to check the status. There might be
something wrong with your model or it might be incompatible with the current labeling configuration.
Version: 1.4

in Label-Studio.
From the service terminal I get
File "/~/label-studio/label-studio-ml-image-backend/image_label_backend/model.py", line 113, in __init__
    self.model = ImageClassifier(resources['num_classes'])
NameError: name 'resources' is not defined

I have read in the tutorial that I need to overwrite something but then again - how? Looked like this was a working example. resources ist indeed not defined. How do I need to define this?
Do I need to fetch attributes like super(ImageClassifierAPI, self).__init__(**kwargs) and using the attributes described here: https://pypi.org/project/label-studio-ml/ ?
Any help is highly appreciated. Thank you very much.

@greyeagle Thank you for your kind words!
Could you check the ML backend from this branch - https://github.com/heartexlabs/label-studio-ml-backend/pull/72 ?

@makseq Thank you very much for your support!
Using that branch, things look much better. After going through the necessary installation steps I first got a timeout trying to connect.  Second try after that was finished I got a working connection. Now I do have one more issue but that may be more related to my lack of experience with label-studio. I labeled a few images and then tried to start training. I get an error however stating:
[ERROR] [label_studio_ml.model::_get_latest_job_result_from_workdir::166] The latest job result file ././pytorch_backend/1.1643893404/1644577981/job_result.json doesn't exist

That seems connected to another error:
Traceback (most recent call last):
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/exceptions.py", line 39, in exception_f
    return f(*args, **kwargs)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/api.py", line 66, in _train
    job = _manager.train(annotations, project, label_config, **params)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 372, in train
    project, label_config, train_kwargs=kwargs, tasks=tasks)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 327, in train_script_wrapper
    train_output = m.model.fit(data_stream, workdir, **train_kwargs)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/pytorch_backend/pytorch_transfer_learning.py", line 190, in fit
    dataloader = DataLoader(dataset, shuffle=True, batch_size=batch_size)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/env/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 213, in __init__
    sampler = RandomSampler(dataset)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/env/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 94, in __init__
    "value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integer value, but got num_samples=0

What am I doing wrong?

@greyeagle Maybe you have to label more data with different labels (choices)?

@makseq Thanks again for your time!
I did find an error that looks suspicious:
 File "<path_to_label_studio_ml>/pytorch_transfer_learning.py", line 36, in get_transformed_image
    with open(filepath, mode='rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/lars/.local/share/label-studio/media/upload/e2fb99c3-405065_134d6bSK62facc.jpg'

Looking into my file system I see that the missing file is located in
'/home/lars/.local/share/label-studio/media/upload/1/' note the 1 as the task number.
In the image source set in LabelStudio it shows (only the first task shown her but there are all of them):
Source for task 1

{
  "id": 1,
  "data": {
    "image": "/data/upload/1/e2fb99c3-405065_134d6bSK62facc.jpg"
  },
  "annotations": [
    {
      "id": 2,
      "created_username": "<EMAIL_ADDRESS>1",
      "created_ago": "1 week, 3 days",
      "result": [
        {
          "value": {
            "choices": [
              "no dormers"
            ]
          },
          "id": "7W-Yf2dRlj",
          "from_name": "choice",
          "to_name": "image",
          "type": "choices",
          "origin": "manual"
        }
      ],
      "was_cancelled": false,
      "ground_truth": false,
      "created_at": "2022-02-03T13:13:42.140069Z",
      "updated_at": "2022-02-11T11:25:19.632907Z",
      "lead_time": 1170.11,
      "task": 1,
      "completed_by": 1,
      "parent_prediction": null,
      "parent_annotation": null
    }
  ],
  "predictions": []
} ....

Looks like something is going wrong with the folders? How and where can I adjust that?

Hi @greyeagle
I have pushed latest fixes to https://github.com/heartexlabs/label-studio-ml-backend/pull/72
Could you please update your ML backend and try one more time?
This issue with project number was fixed

Hi @KonstantinKorotaev
Thank you very much for fixing this! I was out of the office for a few days so I tried first thing this morning. I did:
git pull
Delete the backend and then
label-studio-ml init --force pytorch_backend --script label_studio_ml/examples/pytorch_transfer_learning/pytorch_transfer_learning.py to re-generate the backend.
The issue with the image path is gone indeed, so I assume the fix was applied. Unfortunately I get new errors now:
In the "machine learning" setting once I push the "start training" button in the label_studio_ml terminal I get:
[2022-02-21 08:32:56,757] [ERROR] [label_studio_ml.model::get_result::56] Run directory ././pytorch_backend/INITIAL specified by model_version doesn't exist
Traceback (most recent call last):
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 54, in get_result
    job_result = self.get_result_from_job_id(model_version)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 107, in get_result_from_job_id
    result = self._get_result_from_job_id(job_id)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 183, in _get_result_from_job_id
    raise IOError(f'Run directory {job_dir} specified by model_version doesn\'t exist')
OSError: Run directory ././pytorch_backend/INITIAL specified by model_version doesn't exist
Transfer learning with a full ConvNet finetuning

In the Label-Studio terminal I see:
[2022-02-21 07:30:47,737] [ml.models::predict_tasks::169] [WARNING] Prediction not created for project roof form (id=3, url=http://localhost:9090): 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:9090/predict
[21/Feb/2022 07:30:47] "GET /api/dm/tasks/157?project=2 HTTP/1.1" 200 1106
[2022-02-21 07:30:55,188] [ml.models::predict_tasks::169] [WARNING] Prediction not created for project roof form (id=3, url=http://localhost:9090): 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:9090/predict

If I go to the annotations jobs and open an image I see the following error in the label-studio-ml terminal:
Traceback (most recent call last):
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/exceptions.py", line 39, in exception_f
    return f(*args, **kwargs)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/api.py", line 32, in _predict
    predictions, model = _manager.predict(tasks, project, label_config, force_reload, try_fetch, **params)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 560, in predict
    predictions = cls._current_model.model.predict(tasks, **kwargs)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/pytorch_backend/pytorch_transfer_learning.py", line 160, in predict
    logits = self.model.predict(image_urls)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/pytorch_backend/pytorch_transfer_learning.py", line 99, in predict
    return self.model(images).data.numpy()
  File "/home/lars/Progs/label-studio/label_studio_ml_git/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/env/lib/python3.7/site-packages/torchvision/models/resnet.py", line 220, in forward
    return self._forward_impl(x)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/env/lib/python3.7/site-packages/torchvision/models/resnet.py", line 203, in _forward_impl
    x = self.conv1(x)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/env/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/env/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 349, in forward
    return self._conv_forward(input, self.weight)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/env/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 346, in _conv_forward
    self.padding, self.dilation, self.groups)
RuntimeError: Input type (torch.FloatTensor) and weight type (torch.cuda.FloatTensor) should be the same

While in the label-studio terminal I get:
[21/Feb/2022 07:42:18] "GET /api/dm/tasks/120?project=2 HTTP/1.1" 200 1113
[2022-02-21 07:43:47,951] [ml.models::predict_tasks::169] [WARNING] Prediction not created for project roof form (id=3, url=http://localhost:9090): 500 Server Error: INTERNAL SERVER ERROR for url: http://localhost:9090/predict
[21/Feb/2022 07:43:47] "GET /api/dm/tasks/121?project=2 HTTP/1.1" 200 1113

Do I need to change any settings? Thanks for all your work!

Hi @greyeagle
I have pushed fixes to https://github.com/heartexlabs/label-studio-ml-backend/pull/72
Could you please update example and check?

Hi @KonstantinKorotaev
Thank you for the further update. I have updated my installation with the following results:

In the file pytorch_transfer_learning.py in line 99 it said
return self.model(images).data.numpy() raising an error. I changed this to return self.model(images).cpu().data.numpy() and that seemed to solve it. Maybe you can include that change if you deem it valid.
I still see issues with path and model names.
a) I needed to manually create the folder INITIAL below my ml backend folder. I'm not certain this should be the case.
b) I get

File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 186, in _get_result_from_job_id
    raise IOError(f'Result file {result_file} specified by model_version doesn\'t exist')
OSError: Result file ././pytorch_backend/INITIAL/job_result.json specified by model_version doesn't exist

when I try to press "start training".
On opening individual images I get
Collecting annotations...
Creating dataset...
Process Process-4:
Traceback (most recent call last):
  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 81, in job
    result = model.process_event(event, data, job_id, additional_params)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 302, in process_event
    train_output = self.fit((), event=event, data=data, job_id=job_id, **additional_params)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/pytorch_backend/pytorch_transfer_learning.py", line 190, in fit
    dataloader = DataLoader(dataset, shuffle=True, batch_size=batch_size)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/env/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 213, in __init__
    sampler = RandomSampler(dataset)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/env/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 94, in __init__
    "value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integer value, but got num_samples=0

most likely related to
Traceback (most recent call last):
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 126, in get_result_from_last_job
    result = self.get_result_from_job_id(job_id)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 107, in get_result_from_job_id
    result = self._get_result_from_job_id(job_id)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 186, in _get_result_from_job_id
    raise IOError(f'Result file {result_file} specified by model_version doesn\'t exist')
OSError: Result file ././pytorch_backend/1645614421/job_result.json specified by model_version doesn't exist

So do I need to set any folders or path for job_result.json? This file is nowhere to be found so it is not generated. Or do I need to perform any other setting (export) in Label Studio for this to work?
Seems we're getting forward but not quite there. Thank you for all your effort.

Hi @greyeagle
I have pushed fixes for your latest comment to https://github.com/heartexlabs/label-studio-ml-backend/pull/72
Could you please update example and check?

Hi @KonstantinKorotaev Thank you very much. I will test it as soon as I can. Will be Tuesday next week likely.

Hi @KonstantinKorotaev , I did a new test just now and the results are as follows:
On pressing"Start Training" in the project settings I get (on the label studio ml terminal):
[2022-02-28 15:15:07,837] [INFO] [werkzeug::_log::225] <IP_ADDRESS> - - [28/Feb/2022 15:15:07] "POST /webhook HTTP/1.1" 201 -
[2022-02-28 15:15:07,850] [INFO] [werkzeug::_log::225] <IP_ADDRESS> - - [28/Feb/2022 15:15:07] "GET /health HTTP/1.1" 200 -
[2022-02-28 15:15:07,854] [ERROR] [label_studio_ml.model::get_result_from_last_job::128]<PHONE_NUMBER> job returns exception:
Traceback (most recent call last):
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 126, in get_result_from_last_job
    result = self.get_result_from_job_id(job_id)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 108, in get_result_from_job_id
    assert isinstance(result, dict)
AssertionError
Transfer learning with a full ConvNet finetuning
[2022-02-28 15:15:08,471] [ERROR] [label_studio_ml.model::get_result::56]
Traceback (most recent call last):
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 54, in get_result
    job_result = self.get_result_from_job_id(model_version)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 108, in get_result_from_job_id
    assert isinstance(result, dict)
AssertionError
Transfer learning with a full ConvNet finetuning
[2022-02-28 15:15:09,595] [INFO] [werkzeug::_log::225] <IP_ADDRESS> - - [28/Feb/2022 15:15:09] "POST /setup HTTP/1.1" 200 -
Collecting annotations...
Creating dataset with 0 images...
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 81, in job
    result = model.process_event(event, data, job_id, additional_params)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 312, in process_event
    train_output = self.fit((), event=event, data=data, job_id=job_id, **additional_params)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/pytorch_backend/pytorch_transfer_learning.py", line 190, in fit
    dataloader = DataLoader(dataset, shuffle=True, batch_size=batch_size)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/env/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 213, in __init__
    sampler = RandomSampler(dataset)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/env/lib/python3.7/site-packages/torch/utils/data/sampler.py", line 94, in __init__
    "value, but got num_samples={}".format(self.num_samples))
ValueError: num_samples should be a positive integer value, but got num_samples=0

On switching form image to image in the labeling view I get:
[2022-02-28 15:17:44,045] [INFO] [werkzeug::_log::225] <IP_ADDRESS> - - [28/Feb/2022 15:17:44] "GET /health HTTP/1.1" 200 -
[2022-02-28 15:17:44,049] [ERROR] [label_studio_ml.model::get_result_from_last_job::128]<PHONE_NUMBER> job returns exception:
Traceback (most recent call last):
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 126, in get_result_from_last_job
    result = self.get_result_from_job_id(job_id)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 108, in get_result_from_job_id
    assert isinstance(result, dict)
AssertionError
[2022-02-28 15:17:44,050] [ERROR] [label_studio_ml.model::get_result_from_last_job::128]<PHONE_NUMBER> job returns exception:
Traceback (most recent call last):
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 126, in get_result_from_last_job
    result = self.get_result_from_job_id(job_id)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 108, in get_result_from_job_id
    assert isinstance(result, dict)
AssertionError
Transfer learning with a full ConvNet finetuning
[2022-02-28 15:17:45,622] [INFO] [werkzeug::_log::225] <IP_ADDRESS> - - [28/Feb/2022 15:17:45] "POST /setup HTTP/1.1" 200 -
[2022-02-28 15:17:45,647] [ERROR] [label_studio_ml.exceptions::exception_f::53] Traceback (most recent call last):
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/exceptions.py", line 39, in exception_f
    return f(*args, **kwargs)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/api.py", line 32, in _predict
    predictions, model = _manager.predict(tasks, project, label_config, force_reload, try_fetch, **params)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 570, in predict
    predictions = cls._current_model.model.predict(tasks, **kwargs)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/pytorch_backend/pytorch_transfer_learning.py", line 160, in predict
    logits = self.model.predict(image_urls)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/pytorch_backend/pytorch_transfer_learning.py", line 99, in predict
    return self.model(images).to(device).data.numpy()
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.

Traceback (most recent call last):
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/exceptions.py", line 39, in exception_f
    return f(*args, **kwargs)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/api.py", line 32, in _predict
    predictions, model = _manager.predict(tasks, project, label_config, force_reload, try_fetch, **params)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 570, in predict
    predictions = cls._current_model.model.predict(tasks, **kwargs)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/pytorch_backend/pytorch_transfer_learning.py", line 160, in predict
    logits = self.model.predict(image_urls)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/pytorch_backend/pytorch_transfer_learning.py", line 99, in predict
    return self.model(images).to(device).data.numpy()
TypeError: can't convert cuda:0 device type tensor to numpy. Use TensorC to copy the tensor to host memory first.

[2022-02-28 15:17:45,648] [INFO] [werkzeug::_log::225] <IP_ADDRESS> - - [28/Feb/2022 15:17:45] "POST /predict HTTP/1.1" 500 -

If I change that line to return self.model(images).to(device).data.cpu().numpy() I get a new assertion error:
[2022-02-28 15:20:07,247] [INFO] [werkzeug::_log::225] <IP_ADDRESS> - - [28/Feb/2022 15:20:07] "GET /health HTTP/1.1" 200 -
[2022-02-28 15:20:07,251] [ERROR] [label_studio_ml.model::get_result_from_last_job::128]<PHONE_NUMBER> job returns exception:
Traceback (most recent call last):
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 126, in get_result_from_last_job
    result = self.get_result_from_job_id(job_id)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 108, in get_result_from_job_id
    assert isinstance(result, dict)
AssertionError
[2022-02-28 15:20:07,251] [ERROR] [label_studio_ml.model::get_result_from_last_job::128]<PHONE_NUMBER> job returns exception:
Traceback (most recent call last):
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 126, in get_result_from_last_job
    result = self.get_result_from_job_id(job_id)
  File "/home/lars/Progs/label-studio/label_studio_ml_git/label_studio_ml/model.py", line 108, in get_result_from_job_id
    assert isinstance(result, dict)
AssertionError
Transfer learning with a full ConvNet finetuning
[2022-02-28 15:20:08,798] [INFO] [werkzeug::_log::225] <IP_ADDRESS> - - [28/Feb/2022 15:20:08] "POST /setup HTTP/1.1" 200 -
[2022-02-28 15:20:08,824] [INFO] [werkzeug::_log::225] <IP_ADDRESS> - - [28/Feb/2022 15:20:08] "POST /predict HTTP/1.1" 200 -

I'm wondering if we may have an issue with library versions somehow? Thank you for tracking this down!

Hi @KonstantinKorotaev , I just noticed the branch was merged. As I still do not get it to work, I did the following:

deleted the venv
switch back to master and pull
install requirements.txt
install examples/pytorch_transfer_learning/requirements.txt
pip install -U -e .
On trying to init the backend I get a missing redis so pip install redis
I then get a missing rq so pip install rq

Backend ist created.
Trying to start the backend I get cannot import name 'json' from 'itsdangerous' Tryed the solutions given here but no success: https://blogs.thebitx.com/index.php/2022/02/21/solved-importerror-cannot-import-name-json-from-itsdangerous/
What is the Python Version you are using? By the way, I am on Ubuntu 20.04 but I suppose that should not make any difference on a venv.

@greyeagle Hey, I'm facing the same issue on ubuntu 18.04 , using python 3.6 and 3.9
I will let you know if I ever get it to work

@ithinggoon
In my venv, I was able to fix the "itsdangerous" problem by by following the blog directions that @greyeagle referenced above.  In particular I downgraded Flask to 1.1.2 and markupsafe to 2.0.1 .  I hope that helps!

@itswhts4dinner We've updated flask version up to 1.1.4:
https://github.com/heartexlabs/label-studio-ml-backend/pull/96/files

I will try and test the new version. Thanks for keeping this going!


UI5 Deprecated APIs Linter

UI5 regularly deprecates different APIs.  As far as I know, the only tool which is capable of monitoring the usage of deprecated APIs is eslint-plugin-ui5depchk. Although this tool has been developed by the SAP team (A ESlint plugin to scan deprecated SAPUI5 API usage), it's still a third-party plugin for ESLint.
Are there any plans to provide more official tool or to incorporate this plugin into UI5 Inspector or to integrate it directly with the IDEs inspections via the TypeScript annotations?
This question is especially relevant in the light of coming UI5 2.0 release, which might bring even more deprecations already in the near future.

Hello @pubmikeb ,
One thing coming through my mind is running the support assistant in your application. When opening the Technical Information Dialog via Ctrl+Alt+Shift+P you can activate the support assistant. There you have rules on sap.ui.core level which check for usage of deprecated API and elements in the application.
Have you tried it?
Kind Regards,
Elena

Hello @pubmikeb ,
Thank you for your proposal. I've created an internal record<PHONE_NUMBER> and forwarded to the colleagues who are owning the topic. The status of the issue will be updated here in GitHub.
Regards,
Elena

Hi Mike, your suggestion regarding better documentation how to find deprecated APIs was added as input to the internal backlog item CPOUI5FRAMEWORK-534.
I'm not aware of any specific tools being created for this and not sure whether BAS is preparing anything in this direction (exceeds a bit the scope of an OpenUI5 ticket).
You already mentioned TypeScript and while it is not always feasible/reasonable to migrate an existing app, it can only be recommended to use TypeScript for new projects because such usages can then be detected easily.
Regards
Andreas

@elenastoyanovaa It would be nice if the Support Assistant could detect also partially deprecated APIs such as:

[ ] sap.ui.core.theming.Parameters.get: non-object vName deprecated since 1.92 and 1.94
[ ] sap.ui.model.json.JSONModel#loadData: bAsync and bCache deprecated since 1.107
[ ] sap.ui.model.odata.v2.ODataModel#createEntry: passing an array to mProperties.properties deprecated since https://github.com/SAP/openui5/commit/ab37d63e3d774e13404e45fdfd4dc6b7ec997ee0.

Currently, SA doesn't seem to detect them. Could you please check?

@pubmikeb In the meantime, UI5 linter has been introduced (https://community.sap.com/t5/technology-blogs-by-sap/introducing-ui5-linter/ba-p/13633898) which can help detecting use of deprecated APIs and more.


Build a Settings Page

Issue #237
Description
The system needs a settings page so users can log out and change configurations inside the platform.
For now I will start by doing the following points

[x] Add a settings icon to the top right of the navbar
[x] Clicking the settings icon pushes to /settings
[ ] Add logout button and functionality

https://github.dev/setlife-network/website/blob/develop/src/scripts/api.js

Be sure to hide the Settings icon if the user is not logged in

SettingsPage should be a PrivateRoute

https://github.com/expressjs/cookie-session