summaryrefslogtreecommitdiff
path: root/python-pyarxaas.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-pyarxaas.spec')
-rw-r--r--python-pyarxaas.spec237
1 files changed, 237 insertions, 0 deletions
diff --git a/python-pyarxaas.spec b/python-pyarxaas.spec
new file mode 100644
index 0000000..4508935
--- /dev/null
+++ b/python-pyarxaas.spec
@@ -0,0 +1,237 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pyARXaaS
+Version: 0.5.7
+Release: 1
+Summary: ARXaaS Python wrapper package
+License: MIT License
+URL: https://github.com/navikt/PyARXaaS
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c5/67/a2acdf44460083fdc1bfade8d0aaee000d53cf1717d59d87b7e4dedc71d0/pyARXaaS-0.5.7.tar.gz
+BuildArch: noarch
+
+Requires: python3-uplink
+Requires: python3-pandas
+Requires: python3-coverage
+
+%description
+[![CircleCI](https://circleci.com/gh/navikt/PyARXaaS.svg?style=svg)](https://circleci.com/gh/navikt/PyARXaaS)
+[![Maintainability](https://api.codeclimate.com/v1/badges/d4f7e73c09cb1affea99/maintainability)](https://codeclimate.com/github/navikt/PyARXaaS/maintainability)
+[![Test Coverage](https://api.codeclimate.com/v1/badges/d4f7e73c09cb1affea99/test_coverage)](https://codeclimate.com/github/navikt/PyARXaaS/test_coverage)
+[![Documentation Status](https://readthedocs.org/projects/pyarxaas/badge/?version=latest)](https://pyarxaas.readthedocs.io/en/latest/?badge=latest)
+[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
+
+# PyARXaaS
+
+Python Package for interfacing with ARXaaS in Python
+
+Read more about PyARXaaS at: https://pyarxaas.readthedocs.io/
+
+
+## Getting Started
+
+#### Installation
+
+````bash
+pip install pyarxaas
+
+````
+
+#### Basic Usage
+
+````python
+
+ # import dependencies
+ from pyarxaas import ARXaaS
+ from pyarxaas.privacy_models import KAnonymity
+ from pyarxaas import AttributeType
+ from pyarxaas import Dataset
+ import pandas as pd
+
+ arxaas = ARXaaS(url) # url contains url to AaaS web service
+
+ df = pd.read_csv("data.csv")
+
+ # create Dataset
+ dataset = Dataset.from_pandas(df)
+
+
+ # set attribute type
+ dataset.set_attributes(AttributeType.QUASIIDENTIFYING, 'name', 'gender')
+ dataset.set_attribute(AttributeType.IDENTIFYING, 'id')
+
+ # get the risk profle of the dataset
+ risk_profile = arxaas.risk_profile(dataset)
+
+ # get risk metrics
+ re_indentifiation_risk = risk_profile.re_identification_risk
+ distribution_of_risk = risk_profile.distribution_of_risk
+````
+
+
+
+
+%package -n python3-pyARXaaS
+Summary: ARXaaS Python wrapper package
+Provides: python-pyARXaaS
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pyARXaaS
+[![CircleCI](https://circleci.com/gh/navikt/PyARXaaS.svg?style=svg)](https://circleci.com/gh/navikt/PyARXaaS)
+[![Maintainability](https://api.codeclimate.com/v1/badges/d4f7e73c09cb1affea99/maintainability)](https://codeclimate.com/github/navikt/PyARXaaS/maintainability)
+[![Test Coverage](https://api.codeclimate.com/v1/badges/d4f7e73c09cb1affea99/test_coverage)](https://codeclimate.com/github/navikt/PyARXaaS/test_coverage)
+[![Documentation Status](https://readthedocs.org/projects/pyarxaas/badge/?version=latest)](https://pyarxaas.readthedocs.io/en/latest/?badge=latest)
+[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
+
+# PyARXaaS
+
+Python Package for interfacing with ARXaaS in Python
+
+Read more about PyARXaaS at: https://pyarxaas.readthedocs.io/
+
+
+## Getting Started
+
+#### Installation
+
+````bash
+pip install pyarxaas
+
+````
+
+#### Basic Usage
+
+````python
+
+ # import dependencies
+ from pyarxaas import ARXaaS
+ from pyarxaas.privacy_models import KAnonymity
+ from pyarxaas import AttributeType
+ from pyarxaas import Dataset
+ import pandas as pd
+
+ arxaas = ARXaaS(url) # url contains url to AaaS web service
+
+ df = pd.read_csv("data.csv")
+
+ # create Dataset
+ dataset = Dataset.from_pandas(df)
+
+
+ # set attribute type
+ dataset.set_attributes(AttributeType.QUASIIDENTIFYING, 'name', 'gender')
+ dataset.set_attribute(AttributeType.IDENTIFYING, 'id')
+
+ # get the risk profle of the dataset
+ risk_profile = arxaas.risk_profile(dataset)
+
+ # get risk metrics
+ re_indentifiation_risk = risk_profile.re_identification_risk
+ distribution_of_risk = risk_profile.distribution_of_risk
+````
+
+
+
+
+%package help
+Summary: Development documents and examples for pyARXaaS
+Provides: python3-pyARXaaS-doc
+%description help
+[![CircleCI](https://circleci.com/gh/navikt/PyARXaaS.svg?style=svg)](https://circleci.com/gh/navikt/PyARXaaS)
+[![Maintainability](https://api.codeclimate.com/v1/badges/d4f7e73c09cb1affea99/maintainability)](https://codeclimate.com/github/navikt/PyARXaaS/maintainability)
+[![Test Coverage](https://api.codeclimate.com/v1/badges/d4f7e73c09cb1affea99/test_coverage)](https://codeclimate.com/github/navikt/PyARXaaS/test_coverage)
+[![Documentation Status](https://readthedocs.org/projects/pyarxaas/badge/?version=latest)](https://pyarxaas.readthedocs.io/en/latest/?badge=latest)
+[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
+
+# PyARXaaS
+
+Python Package for interfacing with ARXaaS in Python
+
+Read more about PyARXaaS at: https://pyarxaas.readthedocs.io/
+
+
+## Getting Started
+
+#### Installation
+
+````bash
+pip install pyarxaas
+
+````
+
+#### Basic Usage
+
+````python
+
+ # import dependencies
+ from pyarxaas import ARXaaS
+ from pyarxaas.privacy_models import KAnonymity
+ from pyarxaas import AttributeType
+ from pyarxaas import Dataset
+ import pandas as pd
+
+ arxaas = ARXaaS(url) # url contains url to AaaS web service
+
+ df = pd.read_csv("data.csv")
+
+ # create Dataset
+ dataset = Dataset.from_pandas(df)
+
+
+ # set attribute type
+ dataset.set_attributes(AttributeType.QUASIIDENTIFYING, 'name', 'gender')
+ dataset.set_attribute(AttributeType.IDENTIFYING, 'id')
+
+ # get the risk profle of the dataset
+ risk_profile = arxaas.risk_profile(dataset)
+
+ # get risk metrics
+ re_indentifiation_risk = risk_profile.re_identification_risk
+ distribution_of_risk = risk_profile.distribution_of_risk
+````
+
+
+
+
+%prep
+%autosetup -n pyARXaaS-0.5.7
+
+%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-pyARXaaS -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 0.5.7-1
+- Package Spec generated