[Bug 2305184] Review Request: python-dandischema - Python library for maintaining and managing DANDI metadata schemata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=2305184



--- Comment #3 from Sandro <gui1ty@xxxxxxxxxxxxx> ---
Alright! We are getting closer to the finish line.

A couple of remarks (no action required):

> # ref was mistakenly set to v0.10.2 by forge causing download to fail
> # so manually set it
> %global ref %{version}

Setting the `v` prefix is the default. It seems the majority of projects use
that when setting the version. Some don't and some use a different prefix. I
usually use `%global tag %{version}` if upstream does not use a prefix as per
[1]. But if `ref` works, feel free...


> # Exclude tests which need network
> export DANDI_TESTS_NONETWORK=1

Excellent! That was made easy by upstream. However, that's not always the case.
Sometimes upstream uses a different approach and other times you will have to
exclude tests specifically. You'll learn about that when you get there.


Two points that need attention:

> git tag %{version}

Since you dit not commit your changes before tagging, `git status` would tell
you:

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   tox.ini

and that results in something like `Version: 0.10.2+0.g7e9edc1.dirty` in the
packages metadata (in
`%{python3_sitelib}/dandischema-0.10.2+0.g7e9edc1.dirty.dist-info/METADATA) as
well as `__version__ = "0.10.2+0.g7e9edc1.dirty"` in
`%{python3_sitelib}/dandischema/_version.py`.

Make sure you commit all changes before tagging to avoid those pitfalls. See
the example I pointed to on Matrix [2].


> # Exclude tests which use flake 
> %pytest -v --ignore=dandischema/tests/{test_datacite.py,test_models.py}

I suppose you misinterpreted the error message thrown by the excluded tests
(going by your comment):

> E   pytest.PytestUnknownMarkWarning: Unknown pytest.mark.flaky - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html

That has nothing to do with the linters called `flake*` (e.g. flake8). The
error is thrown, because you are missing a pytest plugin. The plugin in
question is mentioned in the `test` extra in `setup.cfg` [3].

Simply add the missing plugin as a BR and those tests will succeed.


[1]
https://docs.fedoraproject.org/en-US/packaging-guidelines/SourceURL/#_tag_example
[2]
https://src.fedoraproject.org/rpms/python-superqt/blob/rawhide/f/python-superqt.spec
[3]
https://github.com/dandi/dandi-schema/blob/6fc16b8c0305d175873bcb9b5862ef5c6ec896c7/setup.cfg#L55


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2305184

Report this comment as SPAM: https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202305184%23c3

-- 
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux