From eccff21745ae935f82187f3530e1d90c16550aa8 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 10 May 2023 09:18:00 +0000 Subject: automatic import of python-bw2io --- .gitignore | 1 + python-bw2io.spec | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 152 insertions(+) create mode 100644 python-bw2io.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..5ce3b65 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/bw2io-0.8.8.tar.gz diff --git a/python-bw2io.spec b/python-bw2io.spec new file mode 100644 index 0000000..2341e72 --- /dev/null +++ b/python-bw2io.spec @@ -0,0 +1,150 @@ +%global _empty_manifest_terminate_build 0 +Name: python-bw2io +Version: 0.8.8 +Release: 1 +Summary: Tools for importing and export life cycle inventory databases +License: BSD 3-clause +URL: https://github.com/brightway-lca/brightway2-io +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c8/1f/2a4dcf4c9babba31f9d27262df21c23822fe634c0507459fb194713c08b6/bw2io-0.8.8.tar.gz +BuildArch: noarch + + +%description +This package provides tools for the import, export, and management of inventory databases and impact assessment methods. It is part of the `Brightway2 LCA framework `_. `Online documentation `_ is available, and the source code is hosted on `Bitbucket `_. +In contrast with previous IO functionality in Brightway2, brightway2-io uses an iterative approach to importing and linking data. First, data is *extracted* into a common format. Next, a series of *strategies* is employed to uniquely identify each dataset and link datasets internally and to the biosphere. Following internal linking, linking to other background datasets can be performed. Finally, database data is written to disk. +This approach offers a number of benefits that help mitigate some of the serious problems in existing inventory data formats: the number of unlinked exchanges can be easily seen, linking strategies can be iteratively applied, and intermediate results can be saved. +Here is a typical usage: + In [1]: from bw2io import * + In [2]: so = SingleOutputEcospold2Importer("/path/to/ecoinvent/3.1/cutoff/datasets", "ecoinvent 3.1 cutoff") + 11301/11301 (100%) |||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Time: 0:01:56 + Converting to unicode + Extracted 11301 datasets in 262.63 seconds + In [3]: so.apply_strategies() + Applying strategy: remove_zero_amount_coproducts + Applying strategy: remove_zero_amount_inputs_with_no_activity + Applying strategy: es2_assign_only_product_with_amount_as_reference_product + Applying strategy: assign_single_product_as_activity + Applying strategy: create_composite_code + Applying strategy: link_biosphere_by_flow_uuid + Applying strategy: link_internal_technosphere_by_composite_code + Applying strategy: delete_exchanges_missing_activity + Applying strategy: delete_ghost_exchanges + Applying strategy: mark_unlinked_exchanges + In [4]: so.statistics() + 11301 datasets + 521712 exchanges + 0 unlinked exchanges + Out[4]: (11301, 521712, 0) + In [5]: so.write_database() +Note that brightway2-io can't magically make problems in databases go away. + +%package -n python3-bw2io +Summary: Tools for importing and export life cycle inventory databases +Provides: python-bw2io +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-bw2io +This package provides tools for the import, export, and management of inventory databases and impact assessment methods. It is part of the `Brightway2 LCA framework `_. `Online documentation `_ is available, and the source code is hosted on `Bitbucket `_. +In contrast with previous IO functionality in Brightway2, brightway2-io uses an iterative approach to importing and linking data. First, data is *extracted* into a common format. Next, a series of *strategies* is employed to uniquely identify each dataset and link datasets internally and to the biosphere. Following internal linking, linking to other background datasets can be performed. Finally, database data is written to disk. +This approach offers a number of benefits that help mitigate some of the serious problems in existing inventory data formats: the number of unlinked exchanges can be easily seen, linking strategies can be iteratively applied, and intermediate results can be saved. +Here is a typical usage: + In [1]: from bw2io import * + In [2]: so = SingleOutputEcospold2Importer("/path/to/ecoinvent/3.1/cutoff/datasets", "ecoinvent 3.1 cutoff") + 11301/11301 (100%) |||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Time: 0:01:56 + Converting to unicode + Extracted 11301 datasets in 262.63 seconds + In [3]: so.apply_strategies() + Applying strategy: remove_zero_amount_coproducts + Applying strategy: remove_zero_amount_inputs_with_no_activity + Applying strategy: es2_assign_only_product_with_amount_as_reference_product + Applying strategy: assign_single_product_as_activity + Applying strategy: create_composite_code + Applying strategy: link_biosphere_by_flow_uuid + Applying strategy: link_internal_technosphere_by_composite_code + Applying strategy: delete_exchanges_missing_activity + Applying strategy: delete_ghost_exchanges + Applying strategy: mark_unlinked_exchanges + In [4]: so.statistics() + 11301 datasets + 521712 exchanges + 0 unlinked exchanges + Out[4]: (11301, 521712, 0) + In [5]: so.write_database() +Note that brightway2-io can't magically make problems in databases go away. + +%package help +Summary: Development documents and examples for bw2io +Provides: python3-bw2io-doc +%description help +This package provides tools for the import, export, and management of inventory databases and impact assessment methods. It is part of the `Brightway2 LCA framework `_. `Online documentation `_ is available, and the source code is hosted on `Bitbucket `_. +In contrast with previous IO functionality in Brightway2, brightway2-io uses an iterative approach to importing and linking data. First, data is *extracted* into a common format. Next, a series of *strategies* is employed to uniquely identify each dataset and link datasets internally and to the biosphere. Following internal linking, linking to other background datasets can be performed. Finally, database data is written to disk. +This approach offers a number of benefits that help mitigate some of the serious problems in existing inventory data formats: the number of unlinked exchanges can be easily seen, linking strategies can be iteratively applied, and intermediate results can be saved. +Here is a typical usage: + In [1]: from bw2io import * + In [2]: so = SingleOutputEcospold2Importer("/path/to/ecoinvent/3.1/cutoff/datasets", "ecoinvent 3.1 cutoff") + 11301/11301 (100%) |||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Time: 0:01:56 + Converting to unicode + Extracted 11301 datasets in 262.63 seconds + In [3]: so.apply_strategies() + Applying strategy: remove_zero_amount_coproducts + Applying strategy: remove_zero_amount_inputs_with_no_activity + Applying strategy: es2_assign_only_product_with_amount_as_reference_product + Applying strategy: assign_single_product_as_activity + Applying strategy: create_composite_code + Applying strategy: link_biosphere_by_flow_uuid + Applying strategy: link_internal_technosphere_by_composite_code + Applying strategy: delete_exchanges_missing_activity + Applying strategy: delete_ghost_exchanges + Applying strategy: mark_unlinked_exchanges + In [4]: so.statistics() + 11301 datasets + 521712 exchanges + 0 unlinked exchanges + Out[4]: (11301, 521712, 0) + In [5]: so.write_database() +Note that brightway2-io can't magically make problems in databases go away. + +%prep +%autosetup -n bw2io-0.8.8 + +%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-bw2io -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 10 2023 Python_Bot - 0.8.8-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..2c748ee --- /dev/null +++ b/sources @@ -0,0 +1 @@ +6c586259df9083cac4b9912406d3feae bw2io-0.8.8.tar.gz -- cgit v1.2.3