Re: [new] devel/py-jsonpointer and devel/py-jsonpatch

2022-04-26 Thread Theo Buehler
> new tarballs attached.

Imported, thanks!



Re: [new] devel/py-jsonpointer and devel/py-jsonpatch

2022-04-25 Thread Stuart Henderson
this is OK sthen@

On 2022/04/25 13:37, portno12 wrote:
> new tarballs attached.
> test warning for jsonpointer fixed, descr updated with summaries, jsonpointer 
> added as test dep for jsonpatch, and uses pytest for both will all tests 
> passing.
> 
> --- Original Message ---
> On Tuesday, March 29th, 2022 at 9:33 PM, portno12  
> wrote:
> 
> 
> > thanks for the explanation about MODPY_PYTEST. i will give these an update 
> > and submit updated tarballs
> >
> > --- Original Message ---
> >
> > On Tuesday, March 29th, 2022 at 9:29 PM, Stuart Henderson 
> > s...@spacehopper.org wrote:
> >
> > > On 2022/03/29 22:26, Stuart Henderson wrote:
> > >
> > > > As things stand they rely on setuppy test runner support which has a
> > > >
> > > > warning in capital letters when it runs. Not sure when it goes away but
> > > >
> > > > I would like to see that gone. Using pytest's test runner is generally
> > > >
> > > > the easy way to do this and is the standard way for most python ports
> > > >
> > > > that have been touched recently.
> > >
> > > Also you often get better information from pytest's runner than the
> > >
> > > setup.py one
> > >
> > > With MODPY_PYTEST_ARGS=tests.py in jsonpointer you get to see this
> > >
> > > warning too:
> > >
> > > ===> Regression tests for py3-jsonpointer-2.2
> > >
> > > = test session starts 
> > > ==
> > >
> > > platform openbsd7 -- Python 3.9.10, pytest-7.1.0, pluggy-1.0.0
> > >
> > > rootdir: /usr/obj/ports/py-jsonpointer-2.2-python3/jsonpointer-2.2
> > >
> > > plugins: remotedata-0.3.3, openfiles-0.5.0, xdist-2.5.0, 
> > > lazy-fixture-0.6.3, hypothesis-6.39.0, astropy-header-0.2.1, 
> > > filter-subpackage-0.1.1, mock-3.7.0, arraydiff-0.5.0, doctestplus-0.12.0, 
> > > cov-3.0.0
> > >
> > > collected 19 items
> > >
> > > tests.py ... [100%]
> > >
> > > === warnings summary 
> > > ===
> > >
> > > tests.py:88
> > >
> > > /usr/obj/ports/py-jsonpointer-2.2-python3/jsonpointer-2.2/tests.py:88: 
> > > DeprecationWarning: invalid escape sequence \j
> > >
> > > ("/i\\j", ['i\j']),
> > >
> > > -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
> > >
> > >  19 passed, 1 warning in 0.25s 
> > > =





Re: [new] devel/py-jsonpointer and devel/py-jsonpatch

2022-03-29 Thread Stuart Henderson
On 2022/03/29 22:26, Stuart Henderson wrote:
> As things stand they rely on setuppy test runner support which has a
> warning in capital letters when it runs. Not sure when it goes away but
> I would like to see that gone. Using pytest's test runner is generally
> the easy way to do this and is the standard way for most python ports
> that have been touched recently.

Also you often get better information from pytest's runner than the
setup.py one

With MODPY_PYTEST_ARGS=tests.py in jsonpointer you get to see this
warning too:

===>  Regression tests for py3-jsonpointer-2.2
= test session starts ==
platform openbsd7 -- Python 3.9.10, pytest-7.1.0, pluggy-1.0.0
rootdir: /usr/obj/ports/py-jsonpointer-2.2-python3/jsonpointer-2.2
plugins: remotedata-0.3.3, openfiles-0.5.0, xdist-2.5.0, lazy-fixture-0.6.3, 
hypothesis-6.39.0, astropy-header-0.2.1, filter-subpackage-0.1.1, mock-3.7.0, 
arraydiff-0.5.0, doctestplus-0.12.0, cov-3.0.0
collected 19 items

tests.py ... [100%]

=== warnings summary ===
tests.py:88
  /usr/obj/ports/py-jsonpointer-2.2-python3/jsonpointer-2.2/tests.py:88: 
DeprecationWarning: invalid escape sequence \j
("/i\\j", ['i\j']),

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
 19 passed, 1 warning in 0.25s =



Re: [new] devel/py-jsonpointer and devel/py-jsonpatch

2022-03-29 Thread Stuart Henderson
CC'ing ports@


On 2022/03/29 21:04, portno12 wrote:
> these libraries use the built in unittest library so pytest shouldnt be 
> needed.

As things stand they rely on setuppy test runner support which has a
warning in capital letters when it runs. Not sure when it goes away but
I would like to see that gone. Using pytest's test runner is generally
the easy way to do this and is the standard way for most python ports
that have been touched recently.

jsonpointer should be in jsonpatch's TEST_DEPENDS

As these are for working with json which are really text files it would
probably be better to move them to textproc/ with the other ports
handling json


> new tarballs attached with the changes. i cleaned up the makefiles and copied 
> the short description from the rfcs to DESCR.
> 
> --- Original Message ---
> 
> On Tuesday, March 29th, 2022 at 8:49 PM, Stuart Henderson 
>  wrote:
> 
> > On 2022/03/29 19:57, portno12 wrote:
> >
> > > new ports for small python libraries needed by another port i am working 
> > > on.
> > >
> > > generated with portgen and all tests pass for both. license wasnt 
> > > detected right but seems to be BSD-3Clause for both ports
> >
> > -
> >
> > | # $OpenBSD$
> >
> > we are no longer using this in ports -current
> >
> > | MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
> >
> > don't use this, use FLAVOR=python3 and FLAVORS=python3
> >
> > | RUN_DEPENDS = pypi/py-jsonpointer${MODPY_FLAVOR}>=1.9
> >
> > pypi is an invalid category.
> >
> > drop the version check, it's not needed.
> >
> > use MODPY_PYTEST if it does something sensible. (sometimes you need to
> >
> > point at a particular directory or file with MODPY_PYTEST_ARGS, especially
> >
> > if you get some error to do with an import mismatch).
> >
> > setting expectations: we're currently working on things that need to
> >
> > make release, so new ports are not a priority at the moment.
> >
> > > both repos didnt have much info so i used the comment as the DESCR. 
> > > should something be done different in these cases?
> >
> > it's friendly to the user to include a bit more information if possible.
> >
> > for example maybe a quick description of what a json pointer / json patch
> >
> > is? i found this on a website for some other related software which
> >
> > could serve as inspiration for py-jsonpointer..
> >
> > | JSON Pointer is a standardized (RFC6901) way to select a value inside a
> >
> > | JSON Document (DOM). This can be analogous to XPath for XML document.
> >
> > | However, JSON Pointer is much simpler, and a single JSON Pointer only
> >
> > | pointed to a single value.





Re: [new] devel/py-jsonpointer and devel/py-jsonpatch

2022-03-29 Thread Stuart Henderson
On 2022/03/29 19:57, portno12 wrote:
> new ports for small python libraries needed by another port i am working on.
> generated with portgen and all tests pass for both. license wasnt detected 
> right but seems to be BSD-3Clause for both ports

-

| # $OpenBSD$

we are no longer using this in ports -current

| MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}

don't use this, use FLAVOR=python3 and FLAVORS=python3

| RUN_DEPENDS =   pypi/py-jsonpointer${MODPY_FLAVOR}>=1.9

pypi is an invalid category.
drop the version check, it's not needed.

use MODPY_PYTEST if it does something sensible. (sometimes you need to
point at a particular directory or file with MODPY_PYTEST_ARGS, especially
if you get some error to do with an import mismatch).


setting expectations: we're currently working on things that need to
make release, so new ports are not a priority at the moment.


> 
> both repos didnt have much info so i used the comment as the DESCR. should 
> something be done different in these cases?

it's friendly to the user to include a bit more information if possible.
for example maybe a quick description of what a json pointer / json patch
is? i found this on a website for some other related software which
could serve as inspiration for py-jsonpointer..

| JSON Pointer is a standardized (RFC6901) way to select a value inside a
| JSON Document (DOM). This can be analogous to XPath for XML document.
| However, JSON Pointer is much simpler, and a single JSON Pointer only
| pointed to a single value.