diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-05 08:04:55 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-05 08:04:55 +0000 |
| commit | 663de00d899314ed519de8306f4617ef4c662a95 (patch) | |
| tree | cdd6d6eb13e103444eb3484b2c04b2062c9328e9 | |
| parent | d3b730cd40b3c0af341a65d47de76146c669a42e (diff) | |
automatic import of python-sparkautomapper-fhiropeneuler20.03
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-sparkautomapper-fhir.spec | 212 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 214 insertions, 0 deletions
@@ -0,0 +1 @@ +/sparkautomapper.fhir-1.0.28.tar.gz diff --git a/python-sparkautomapper-fhir.spec b/python-sparkautomapper-fhir.spec new file mode 100644 index 0000000..53e36ab --- /dev/null +++ b/python-sparkautomapper-fhir.spec @@ -0,0 +1,212 @@ +%global _empty_manifest_terminate_build 0 +Name: python-sparkautomapper.fhir +Version: 1.0.28 +Release: 1 +Summary: FHIR extensions for SparkAutoMapper +License: Apache Software License +URL: https://github.com/imranq2/SparkAutoMapper.FHIR +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/eb/f5/49ee0e7ffbcbd11c820d38b71f7c63baf5fbe9a6048cc48db2ca4319c24d/sparkautomapper.fhir-1.0.28.tar.gz +BuildArch: noarch + +Requires: python3-logger +Requires: python3-pyspark +Requires: python3-sparkautomapper +Requires: python3-sparkfhirschemas +Requires: python3-deprecated + +%description +[](https://github.com/imranq2/SparkAutoMapper.FHIR/actions/workflows/build_and_test.yml) + +[](https://github.com/imranq2/SparkAutoMapper.FHIR/actions/workflows/python-publish.yml) + +[](https://snyk.io/test/github/imranq2/SparkAutoMapper.FHIR?targetFile=requirements.txt) + +# SparkAutoMapper.FHIR +Add custom FHIR data types to SparkAutoMapper. + +## Usage +```shell script +pip install sparkautomapper.fhir +``` + +## Example +```python +from spark_auto_mapper.automappers.automapper import AutoMapper +from spark_auto_mapper.helpers.automapper_helpers import AutoMapperHelpers as A +mapper = AutoMapper( + view="members", + source_view="patients", + keys=["member_id"] +).withResource( + resource=F.patient( + id_=A.column("a.member_id"), + birthDate=A.date( + A.column("date_of_birth") + ), + name=A.list( + F.human_name( + use="usual", + family=A.column("last_name") + ) + ), + gender="female" + ) +) +``` + +# Publishing a new package +1. Create a new release +2. The GitHub Action should automatically kick in and publish the package +3. You can see the status in the Actions tab + + + + +%package -n python3-sparkautomapper.fhir +Summary: FHIR extensions for SparkAutoMapper +Provides: python-sparkautomapper.fhir +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-sparkautomapper.fhir +[](https://github.com/imranq2/SparkAutoMapper.FHIR/actions/workflows/build_and_test.yml) + +[](https://github.com/imranq2/SparkAutoMapper.FHIR/actions/workflows/python-publish.yml) + +[](https://snyk.io/test/github/imranq2/SparkAutoMapper.FHIR?targetFile=requirements.txt) + +# SparkAutoMapper.FHIR +Add custom FHIR data types to SparkAutoMapper. + +## Usage +```shell script +pip install sparkautomapper.fhir +``` + +## Example +```python +from spark_auto_mapper.automappers.automapper import AutoMapper +from spark_auto_mapper.helpers.automapper_helpers import AutoMapperHelpers as A +mapper = AutoMapper( + view="members", + source_view="patients", + keys=["member_id"] +).withResource( + resource=F.patient( + id_=A.column("a.member_id"), + birthDate=A.date( + A.column("date_of_birth") + ), + name=A.list( + F.human_name( + use="usual", + family=A.column("last_name") + ) + ), + gender="female" + ) +) +``` + +# Publishing a new package +1. Create a new release +2. The GitHub Action should automatically kick in and publish the package +3. You can see the status in the Actions tab + + + + +%package help +Summary: Development documents and examples for sparkautomapper.fhir +Provides: python3-sparkautomapper.fhir-doc +%description help +[](https://github.com/imranq2/SparkAutoMapper.FHIR/actions/workflows/build_and_test.yml) + +[](https://github.com/imranq2/SparkAutoMapper.FHIR/actions/workflows/python-publish.yml) + +[](https://snyk.io/test/github/imranq2/SparkAutoMapper.FHIR?targetFile=requirements.txt) + +# SparkAutoMapper.FHIR +Add custom FHIR data types to SparkAutoMapper. + +## Usage +```shell script +pip install sparkautomapper.fhir +``` + +## Example +```python +from spark_auto_mapper.automappers.automapper import AutoMapper +from spark_auto_mapper.helpers.automapper_helpers import AutoMapperHelpers as A +mapper = AutoMapper( + view="members", + source_view="patients", + keys=["member_id"] +).withResource( + resource=F.patient( + id_=A.column("a.member_id"), + birthDate=A.date( + A.column("date_of_birth") + ), + name=A.list( + F.human_name( + use="usual", + family=A.column("last_name") + ) + ), + gender="female" + ) +) +``` + +# Publishing a new package +1. Create a new release +2. The GitHub Action should automatically kick in and publish the package +3. You can see the status in the Actions tab + + + + +%prep +%autosetup -n sparkautomapper.fhir-1.0.28 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-sparkautomapper.fhir -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.28-1 +- Package Spec generated @@ -0,0 +1 @@ +fe1ebf3f3c9c98fb8be0cadd9cbc792c sparkautomapper.fhir-1.0.28.tar.gz |
