diff --git a/dev-python/dandischema/ChangeLog b/dev-python/dandischema/ChangeLog new file mode 100644 index 0000000..fea6082 --- /dev/null +++ b/dev-python/dandischema/ChangeLog @@ -0,0 +1,6 @@ +*dandischema-0.3.4 (27 Sep 2021) + + 27 Sep 2021; +dandischema-0.3.4.ebuild, + +files/dandischema-0.3.4-coverage.patch, + +files/dandischema-0.3.4-versioningit.patch, +metadata.xml: + dev-python/dandischema: new package (DANDI stack) diff --git a/dev-python/dandischema/Manifest b/dev-python/dandischema/Manifest new file mode 100644 index 0000000..adc9c40 --- /dev/null +++ b/dev-python/dandischema/Manifest @@ -0,0 +1 @@ +DIST dandischema-0.3.4.tar.gz 47642 SHA256 f154b8c9f4e06cbf770241a1cfd75fabaa9e6f1dd4cac1554627e85ac4e93681 SHA512 764db251e47147b16d6beaecabf7b4610caf60f8bdaf6a4b05c084a6274d249aa340cb503912895812fcfad7a0c305cae5b2db3d590aeb69a8afd4e7068edf82 WHIRLPOOL bfe8edb5da25b5d45a8fb7df9acdb4797478e2329bde0738cf4af3c318bb7d73942de79a4b70f78e2ac90d67bf74d11f1c733db111d1d676537dddc5d1be882c diff --git a/dev-python/dandischema/dandischema-0.3.4.ebuild b/dev-python/dandischema/dandischema-0.3.4.ebuild new file mode 100644 index 0000000..8c1dac5 --- /dev/null +++ b/dev-python/dandischema/dandischema-0.3.4.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit distutils-r1 + +DESCRIPTION="Schemata for DANDI archive project" +HOMEPAGE="https://github.com/dandi/dandischema" +EGIT_REPO_URI="https://github.com/dandi/dandischema.git" +SRC_URI="https://github.com/dandi/dandischema/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-python/wheel[${PYTHON_USEDEP}] + dev-python/jsonschema[${PYTHON_USEDEP}] + dev-python/pydantic[${PYTHON_USEDEP}] + dev-python/python-email-validator[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] +" +DEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] +" + +PATCHES=( + "${FILESDIR}/${P}-coverage.patch" + "${FILESDIR}/${P}-versioningit.patch" +) + +src_configure() { + echo "__version__ = '${PV}'" >> dandischema/_version.py +} + +distutils_enable_tests pytest + +python_test() { + local EPYTEST_DESELECT=( + # Requires network access: + # https://github.com/dandi/dandischema/issues/87 + dandischema/tests/test_metadata.py::test_migrate_041 + ) + pushd dandischema || die + epytest tests + popd +} diff --git a/dev-python/dandischema/files/dandischema-0.3.4-coverage.patch b/dev-python/dandischema/files/dandischema-0.3.4-coverage.patch new file mode 100644 index 0000000..a9c7b6c --- /dev/null +++ b/dev-python/dandischema/files/dandischema-0.3.4-coverage.patch @@ -0,0 +1,11 @@ +--- a/tox.ini 2021-09-22 19:31:20.534576095 -0400 ++++ b/tox.ini 2021-09-26 16:11:30.080164191 -0400 +@@ -17,7 +17,7 @@ + flake8 --config=setup.cfg {posargs} dandischema setup.py + + [pytest] +-addopts = --cov=dandischema --tb=short --durations=10 ++addopts = --tb=short --durations=10 + filterwarnings = error + + [coverage:run] diff --git a/dev-python/dandischema/files/dandischema-0.3.4-versioningit.patch b/dev-python/dandischema/files/dandischema-0.3.4-versioningit.patch new file mode 100644 index 0000000..5890917 --- /dev/null +++ b/dev-python/dandischema/files/dandischema-0.3.4-versioningit.patch @@ -0,0 +1,10 @@ +--- a/setup.py 2021-09-22 19:31:20.533576086 -0400 ++++ b/setup.py 2021-09-23 07:42:02.856983656 -0400 +@@ -21,7 +21,7 @@ + + # Give setuptools a hint to complain if it's too old a version + # Should match pyproject.toml +-SETUP_REQUIRES = ["setuptools >= 42.0.0", "versioningit ~= 0.1.0"] ++SETUP_REQUIRES = ["setuptools >= 42.0.0"] + # This enables setuptools to install wheel on-the-fly + SETUP_REQUIRES += ["wheel"] if "bdist_wheel" in sys.argv else [] diff --git a/dev-python/dandischema/metadata.xml b/dev-python/dandischema/metadata.xml new file mode 100644 index 0000000..edc7df9 --- /dev/null +++ b/dev-python/dandischema/metadata.xml @@ -0,0 +1,22 @@ + + + + + gentoo@chymera.eu + Horea Christian + + + sci@gentoo.org + Gentoo Science Project + + + A Python library for maintaining and managing DANDI metadata schemata. + The library helps create and validate DANDI schema-compliant metadata + for Dandisets and assets. Every Dandiset and associated asset has a + metadata object that can be retrieved using the DANDI API. This + library uses Pydantic to implement all the metadata classes. Schemas + are generated on schema modifications and placed into this repository. + Dandischema generates JSON schema definitions and also an associated + context.json file for JSON-LD compliance of the metadata models. + +