zsh-users
 help / color / mirror / code / Atom feed
* Anyone wants to join Zsh-Suite project, tools with integrations for Zsh software development
@ 2018-06-25 12:51 Sebastian Gniazdowski
  2018-06-29  6:15 ` Marc Chantreux
  2018-07-13 12:02 ` Sebastian Gniazdowski
  0 siblings, 2 replies; 11+ messages in thread
From: Sebastian Gniazdowski @ 2018-06-25 12:51 UTC (permalink / raw)
  To: Zsh Users

Hello,
I was just about to create a zsh-suite project, or zsh-IDE, with
author of zunit, an unit testing framework, but he apparently has
withdrawn. Has anyone a testing framework or other project that could
be part of a "zsh-suite" – tools, with integrations, for Zsh software
development? I have Zshelldoc, a Doxygen-like tool, and custom ctags,
that recognize Zsh source with its syntax and through modelines not
only .sh/.zsh extension, and works at prompt:
https://asciinema.org/a/188607. I know author of Zshdb, a debugger
(I've tested it, works), but didn't speak with him yet as he said he
is not a Zsh user.

I recently wrote bash script and utilized BATS and it was nice to have
tests working in about 5 minutes. A nice unit tests framework would be
best to add to the Zsh-Suite, but other tools are also needed. It
would be then possible to do some integrations of the tools, and in
effect writing a test script would be an elevated thing, with
methodology, kind of IDE (integrated development environment). I've
registered "zsh-suite" Github organization.
-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Anyone wants to join Zsh-Suite project, tools with integrations for Zsh software development
  2018-06-25 12:51 Anyone wants to join Zsh-Suite project, tools with integrations for Zsh software development Sebastian Gniazdowski
@ 2018-06-29  6:15 ` Marc Chantreux
  2018-06-29 17:22   ` Daniel Shahaf
  2018-06-29 18:39   ` Sebastian Gniazdowski
  2018-07-13 12:02 ` Sebastian Gniazdowski
  1 sibling, 2 replies; 11+ messages in thread
From: Marc Chantreux @ 2018-06-29  6:15 UTC (permalink / raw)
  To: Sebastian Gniazdowski; +Cc: Zsh Users

hello Sebastian,

> Has anyone a testing framework or other project that could
> be part of a "zsh-suite"

i don't know what are the crietia to be a part of zsh-suite.
for the uze project, i wrote a TAP (https://testanything.org/)
emiter inspired by Test::More ().

but everything is written using the uze convention and helpers.
i would be pleased to be part of a larger project but i'm really
bound to some "good practices" i developped over years. for example
uze use those options and i'm not open to discussion about
it (because reliability and readability).

    braceccl extendedglob globstarshort
    rcquotes promptbang promptsubst
    nohashdirs pathdirs
    nounset warncreateglobal
    pipefail shinstdin

also: i use "alternative syntax" as a first choice and really encourage
it

Back to TAP.zsh

the idea behind that is to have a simple implemetation to
give me the ability to reuse all the tooling already written
for TAP and JUnit (because there is a converter).

here is an exemple of test suite

https://github.com/zsh-uze/http-tools/blob/master/t/100_json.t

if you clone the repo and zsh is already installed, you
can have a test report using

    prove -ezsh -r t

prove comes with perl, it has a lot of plugin
(html reports for example)

at some point, i also would like to hack on ztst.zsh to give
it a TAP output.

> I have Zshelldoc

for the moment, i use inline pod strings

: <<=cut

=head1 why?

this is cool because i can just run

    perldoc my/zsh/lib.zsh

to have a manpage

=cut

but i'm not bound to this.

regards


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Anyone wants to join Zsh-Suite project, tools with integrations for Zsh software development
  2018-06-29  6:15 ` Marc Chantreux
@ 2018-06-29 17:22   ` Daniel Shahaf
  2018-06-29 17:52     ` Marc Chantreux
  2018-06-29 18:39   ` Sebastian Gniazdowski
  1 sibling, 1 reply; 11+ messages in thread
From: Daniel Shahaf @ 2018-06-29 17:22 UTC (permalink / raw)
  To: Zsh Users

Marc Chantreux wrote on Fri, Jun 29, 2018 at 08:15:24 +0200:
> i don't know what are the crietia to be a part of zsh-suite.
> for the uze project, i wrote a TAP (https://testanything.org/)
> emiter inspired by Test::More ().

if (( ${+SHAMELESS_PLUG} )); then

  z-sy-h's test suite also uses TAP, and consequently z-sy-h's source tree
  contains two TAP scripts that may be of independent interest (to any TAP
  project, not just to zsh TAP projects):
  
  - tests/tap-filter
    # This is a stdin-to-stdout filter that takes TAP output (such as 'make test')
    # on stdin and deletes lines pertaining to expected results.
    #
    # More specifically, if any of the test points in a test file either failed but
    # was expected to pass, or passed but was expected to fail, then emit that test
    # file's output; else, elide that test file's output.
    
  - tests/tap-colorizer.zsh
    # This is a stdin-to-stdout filter that takes TAP output (such as 'make test')
    # on stdin and passes it, colorized, to stdout.

  Of course, both of these must have been implemented countless times in CPAN,
  but they were useful to z-sy-h since its TAP output is done "by hand", not
  through any module.

fi

Cheers,

Daniel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Anyone wants to join Zsh-Suite project, tools with integrations for Zsh software development
  2018-06-29 17:22   ` Daniel Shahaf
@ 2018-06-29 17:52     ` Marc Chantreux
  2018-06-29 18:04       ` Jérémie Roquet
  2018-06-29 18:04       ` Daniel Shahaf
  0 siblings, 2 replies; 11+ messages in thread
From: Marc Chantreux @ 2018-06-29 17:52 UTC (permalink / raw)
  To: Daniel Shahaf; +Cc: Zsh Users

hello,

>   z-sy-h's test suite also uses TAP, and consequently z-sy-h's source tree
>   contains two TAP scripts that may be of independent interest (to any TAP
>   project, not just to zsh TAP projects):

any link to z-sh-y ?

regards
marc


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Anyone wants to join Zsh-Suite project, tools with integrations for Zsh software development
  2018-06-29 17:52     ` Marc Chantreux
@ 2018-06-29 18:04       ` Jérémie Roquet
  2018-06-29 18:04       ` Daniel Shahaf
  1 sibling, 0 replies; 11+ messages in thread
From: Jérémie Roquet @ 2018-06-29 18:04 UTC (permalink / raw)
  To: Marc Chantreux; +Cc: Daniel Shahaf, Zsh Users

Hi,

2018-06-29 19:52 GMT+02:00 Marc Chantreux <eiro@phear.org>:
>>   z-sy-h's test suite also uses TAP, and consequently z-sy-h's source tree
>>   contains two TAP scripts that may be of independent interest (to any TAP
>>   project, not just to zsh TAP projects):
>
> any link to z-sh-y ?

https://github.com/zsh-users/zsh-syntax-highlighting

Best regards,

-- 
Jérémie


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Anyone wants to join Zsh-Suite project, tools with integrations for Zsh software development
  2018-06-29 17:52     ` Marc Chantreux
  2018-06-29 18:04       ` Jérémie Roquet
@ 2018-06-29 18:04       ` Daniel Shahaf
  2018-06-29 18:57         ` Marc Chantreux
  1 sibling, 1 reply; 11+ messages in thread
From: Daniel Shahaf @ 2018-06-29 18:04 UTC (permalink / raw)
  To: Marc Chantreux; +Cc: Zsh Users

Marc Chantreux wrote on Fri, 29 Jun 2018 19:52 +0200:
> >   z-sy-h's test suite also uses TAP, and consequently z-sy-h's source tree
> >   contains two TAP scripts that may be of independent interest (to any TAP
> >   project, not just to zsh TAP projects):
> 
> any link to z-sh-y ?

Sure:

https://github.com/zsh-users/zsh-syntax-highlighting/

The scripts are here:

https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/tests/tap-filter
https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/tests/tap-colorizer.zsh


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Anyone wants to join Zsh-Suite project, tools with integrations for Zsh software development
  2018-06-29  6:15 ` Marc Chantreux
  2018-06-29 17:22   ` Daniel Shahaf
@ 2018-06-29 18:39   ` Sebastian Gniazdowski
  2018-06-29 18:58     ` Bart Schaefer
  2018-06-29 20:38     ` Sebastian Gniazdowski
  1 sibling, 2 replies; 11+ messages in thread
From: Sebastian Gniazdowski @ 2018-06-29 18:39 UTC (permalink / raw)
  To: Marc Chantreux; +Cc: Zsh Users

On 29 June 2018 at 08:15, Marc Chantreux <eiro@phear.org> wrote:
> hello Sebastian,
>
>> Has anyone a testing framework or other project that could
>> be part of a "zsh-suite"
>
> i don't know what are the crietia to be a part of zsh-suite.
> for the uze project, i wrote a TAP (https://testanything.org/)
> emiter inspired by Test::More ().

I see the zsh-suite as a collection of self-contained tools and
libraries. By self-contained I mean I don't like dependencies
spreading in exponential or so speed and things ending up as 1000
modules installed by node.js. Then, on the other hand, going outside
zsh code feels a bit refreshing. Integration is a good thing (if not
exponential, etc.), and for test framework Perl use is not a problem,
it's even nice.

> but everything is written using the uze convention and helpers.
> i would be pleased to be part of a larger project but i'm really
> bound to some "good practices" i developped over years. for example
> uze use those options and i'm not open to discussion about
> it (because reliability and readability).
>
>     braceccl extendedglob globstarshort
>     rcquotes promptbang promptsubst
>     nohashdirs pathdirs
>     nounset warncreateglobal
>     pipefail shinstdin
>
> also: i use "alternative syntax" as a first choice and really encourage
> it

Your syntax gives good impression. When coding Zsh scripts and the
project gets bigger, one can have an impression of the code being
logy, sluggish-looking. So for example I wrote a logging library,
which is characterized by use of <( the_logger ) process substitution,
yielding mysql, sqlite, etc. backend support and 0-delays in
foreground producer-process. But it doesn't feel nice to announce it,
because I see people reacting to it in terms of "such project in Zsh?
it must be logy". I of course fight with any logy part of my code,
sometimes it's not possible, and I think your syntax and style is
contrary to logy. Zsh-Suite should be good quality code explicitly
without logy parts and I think you could help with this.

> Back to TAP.zsh
>
> the idea behind that is to have a simple implemetation to
> give me the ability to reuse all the tooling already written
> for TAP and JUnit (because there is a converter).
>
> here is an exemple of test suite
>
> https://github.com/zsh-uze/http-tools/blob/master/t/100_json.t

I read the source (TAP.zsh), it's not long, I can agree with
namespaces for whole Zsh-Suite because it seems to force not-logy
looking code (the same with alternate syntax). To compare, the bats
test file I mentioned:

https://github.com/zdharma/git-url/blob/master/test/short.bats

I would miss this syntax: the conditions enumerations in [ ... ]\n[
... ]..., but TAP.zsh integrates with other stuff so there's no clear
winner. Zsh-Suite could provide 2 test suites, they would probably
differ in details and user would have a choice.

> if you clone the repo and zsh is already installed, you
> can have a test report using
>
>     prove -ezsh -r t
>
> prove comes with perl, it has a lot of plugin
> (html reports for example)

That's nice feature.

>> I have Zshelldoc
>
> for the moment, i use inline pod strings
>
> : <<=cut
>
> =head1 why?
>
> this is cool because i can just run
>
>     perldoc my/zsh/lib.zsh
>
> to have a manpage
>
> =cut
>
> but i'm not bound to this.

Here is the situation I've described earlier: Zshelldoc, coming with
impression of logy Zsh code somewhat glued together, and perldoc which
has a normal aura. Again, user can have a choice. To defend Zshelldoc
which lost at start ;), it has a function-extraction code (I wrote
some unit tests using this code, it extracts functions, then autoloads
them and tests them) and generates call-trees and reverse-call-trees
for each function. Zsh-Suite could do something to convey the message
that it's not weekend top-down script logy coding.

-- 
Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Anyone wants to join Zsh-Suite project, tools with integrations for Zsh software development
  2018-06-29 18:04       ` Daniel Shahaf
@ 2018-06-29 18:57         ` Marc Chantreux
  0 siblings, 0 replies; 11+ messages in thread
From: Marc Chantreux @ 2018-06-29 18:57 UTC (permalink / raw)
  To: Daniel Shahaf; +Cc: Zsh Users

hello,

> > any link to z-sh-y ?
> Sure:
> https://github.com/zsh-users/zsh-syntax-highlighting/

arggh ... i was thinking about a library or something.

thanks for the link.

marc


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Anyone wants to join Zsh-Suite project, tools with integrations for Zsh software development
  2018-06-29 18:39   ` Sebastian Gniazdowski
@ 2018-06-29 18:58     ` Bart Schaefer
  2018-06-29 20:38     ` Sebastian Gniazdowski
  1 sibling, 0 replies; 11+ messages in thread
From: Bart Schaefer @ 2018-06-29 18:58 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 122 bytes --]

I think you just spiked books.google.com's graph for use-over-time of the
word "logy" to levels not seen since the 1870s.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Anyone wants to join Zsh-Suite project, tools with integrations for Zsh software development
  2018-06-29 18:39   ` Sebastian Gniazdowski
  2018-06-29 18:58     ` Bart Schaefer
@ 2018-06-29 20:38     ` Sebastian Gniazdowski
  1 sibling, 0 replies; 11+ messages in thread
From: Sebastian Gniazdowski @ 2018-06-29 20:38 UTC (permalink / raw)
  To: Marc Chantreux; +Cc: Zsh Users

On 29 June 2018 at 20:39, Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
> I see the zsh-suite as a collection of self-contained tools and
> libraries. By self-contained I mean I don't like dependencies

PS. There would be a tool like `rails' in Ruby-On-Rails, which would
create and manage projects with selection of Zsh-Suite tools and
libraries. So like in Rails: `rails new blog'.

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Anyone wants to join Zsh-Suite project, tools with integrations for Zsh software development
  2018-06-25 12:51 Anyone wants to join Zsh-Suite project, tools with integrations for Zsh software development Sebastian Gniazdowski
  2018-06-29  6:15 ` Marc Chantreux
@ 2018-07-13 12:02 ` Sebastian Gniazdowski
  1 sibling, 0 replies; 11+ messages in thread
From: Sebastian Gniazdowski @ 2018-07-13 12:02 UTC (permalink / raw)
  To: Zsh Users

On 25 June 2018 at 14:51, Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
> Hello,
> be part of a "zsh-suite" – tools, with integrations, for Zsh software
> development? I have Zshelldoc, a Doxygen-like tool, and custom ctags,

To express what Zsh-Suite would be: suppose you create a backend
script at work, first you select subsystems: "log" (to store logs in
e.g. mysql (also e.g. ElasticSearch db), without performance
drawbacks, for e.g. easy remote access for e.g. aggregation or
monitoring), "Doxygen" (Zshelldoc actually, to generate documentation
for the project also taking care to properly construct the script,
with use of functions, for easy extending by other workers), "unit
tests" (to write a better code, too), and you issue similarly to
Rails:

% zsh-suite create my-work-script -m log,doc,unit-test

and obtain skeleton with copied subprojects for the subsystems, with
hello-world main script that loads the "log" subsystem, with
unit-tests subdirectory with hello-world test case already set up.

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-07-14 11:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-25 12:51 Anyone wants to join Zsh-Suite project, tools with integrations for Zsh software development Sebastian Gniazdowski
2018-06-29  6:15 ` Marc Chantreux
2018-06-29 17:22   ` Daniel Shahaf
2018-06-29 17:52     ` Marc Chantreux
2018-06-29 18:04       ` Jérémie Roquet
2018-06-29 18:04       ` Daniel Shahaf
2018-06-29 18:57         ` Marc Chantreux
2018-06-29 18:39   ` Sebastian Gniazdowski
2018-06-29 18:58     ` Bart Schaefer
2018-06-29 20:38     ` Sebastian Gniazdowski
2018-07-13 12:02 ` Sebastian Gniazdowski

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).