From 2989ed14b9bf398afe78bafb1cb14e5b10db6903a1cb66856c09c7ef6ade7fa2 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Sun, 2 Jun 2019 15:23:46 +0000 Subject: [PATCH 1/4] - update to version 2.0.1: - Added: - [Registration and discovery] of languages and generators ([#187]) - New textx CLI commands for listing generators and languages (`list-generators`, `list-languages`) and calling a generator (`generate`) ([#187]) - Meta-models may now [reference other registered meta-models] using the `reference` statement ([#187]) - Adding examples and documentation related to scope providers (related to model modification through scope providers) ([#168]) - metamodel export feature for [PlantUML] ([#165]) - `textx_isinstance` from `textx.scoping.tools` made available in `textx` ([#164], [#157]) - CLI extensibility ([#162], [#161]) - An initial version of FAQ page ([#138]). Thanks Aluriak@GitHub - A version of `calc.py` exercises usage of `text.scoping.tools.textx_isinstance()` to inspect model objects types during traversal. ([#136], [#123]). Thanks dkrikun@GitHub - A version of `calc.py` in expression example that exercises dynamically adding properties to object classes ([#126]). Thanks dkrikun@GitHub - python like imports (named import rules, scope providers affected) ([#114]) - Added `STRICTFLOAT` as buildin type to allow to distinguish ints from floats in `NUMBER`. Fixed docu link ([#98]). Possible **(BIC)** - Added [flake8] and [coverage] checking ([#92]) - Changed: - All textX commands implemented using textX CLI extensibility. `check` command reworked to support the new registration feature ([#187]) **(BIC)** - (Meta-)model visualization reworked as a set of textX generators ([#187]). **(BIC)** - Made scope provider implementation of `RelativeName` and `ExtRelativeName` more readable ([#186]). Minor functional changes, not very probable to have OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=14 --- python-textX-2.0.1.tar.gz | 3 ++ python-textX.changes | 67 +++++++++++++++++++++++++++++++++++++++ python-textX.spec | 4 +-- v1.8.0.tar.gz | 3 -- 4 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 python-textX-2.0.1.tar.gz delete mode 100644 v1.8.0.tar.gz diff --git a/python-textX-2.0.1.tar.gz b/python-textX-2.0.1.tar.gz new file mode 100644 index 0000000..39572be --- /dev/null +++ b/python-textX-2.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a2e40b4c5772072b2a7da32e3fa11b950a1233a0852a127819402a6bb8922b6 +size 1821512 diff --git a/python-textX.changes b/python-textX.changes index 0d88208..08f86d8 100644 --- a/python-textX.changes +++ b/python-textX.changes @@ -1,3 +1,70 @@ +------------------------------------------------------------------- +Sun Jun 2 15:22:59 UTC 2019 - Sebastian Wagner + +- update to version 2.0.1: + - Added: + - [Registration and discovery] of languages and generators ([#187]) + - New textx CLI commands for listing generators and languages + (`list-generators`, `list-languages`) and calling a generator (`generate`) ([#187]) + - Meta-models may now [reference other registered meta-models] using the + `reference` statement ([#187]) + - Adding examples and documentation related to scope providers (related to + model modification through scope providers) ([#168]) + - metamodel export feature for [PlantUML] ([#165]) + - `textx_isinstance` from `textx.scoping.tools` made available in `textx` + ([#164], [#157]) + - CLI extensibility ([#162], [#161]) + - An initial version of FAQ page ([#138]). Thanks Aluriak@GitHub + - A version of `calc.py` exercises usage of + `text.scoping.tools.textx_isinstance()` to inspect model objects types + during traversal. ([#136], [#123]). Thanks dkrikun@GitHub + - A version of `calc.py` in expression example that exercises dynamically adding + properties to object classes ([#126]). Thanks dkrikun@GitHub + - python like imports (named import rules, scope providers affected) ([#114]) + - Added `STRICTFLOAT` as buildin type to allow to distinguish ints from floats + in `NUMBER`. Fixed docu link ([#98]). Possible **(BIC)** + - Added [flake8] and [coverage] checking ([#92]) + - Changed: + - All textX commands implemented using textX CLI extensibility. `check` + command reworked to support the new registration feature ([#187]) **(BIC)** + - (Meta-)model visualization reworked as a set of textX generators ([#187]). + **(BIC)** + - Made scope provider implementation of `RelativeName` and `ExtRelativeName` + more readable ([#186]). Minor functional changes, not very probable to have + any impact (only affects model-paths containing a list not at the end of the + path; see [#186]). Possible **(BIC)**. + - Improved handling of abstract rules references. Improved the definition of + rules for various cases. Docs + tests ([#185], [#166]) **(BIC)** + - Changed the time of call of match rule object processors to be during the + model construction. This enable proper override of base types processors and + calls on nested match rules ([#183], [#182], [#96]). Possible **(BIC)** + - CLI migrated to the [click] library ([#162]) + - Docs improvements ([#146], [#153], [#151]). Thanks simkimsia@GitHub. + - `FQN` constuctor param `follow_loaded_models` removed and introduced + callback `scope_rediction_logic` to implement arbitrary logic on FQN + resolution ([#133], [#114], [#103]) **(BIC)** + - Changed attribute name for the meta-model object (from `metamodel._parser` + to `metamodel._parser_blueprint`). ([#93]) **(BIC)** + - Started using _[Keep a Changelog][keepachangelog]_ ([#174]) + - Started using _[Semantic Versioning][semver]_ ([#174]) + - Dropped support for Python 3.3 + - Fixed: + - White-spaces in string matches were erroneously stripped ([#188]) + - Calling of match rule object processors ([#183], [#182], [#96]) + - Circular rule references in grammars ([#173], [#159], [#155]) + - Assertion error while calling object processors with multi meta models + (extended grammars) and custom types ([#141], [#140]) + - Using a sequence of matches and rule reference in an abstract rule choice + alternative, and explicitly disallowing referencing more than one rule in an + abstract rule choice alternative ([#134]) + - Unicode requirement for (meta)-model strings API parameters made strict. + This should prevent common errors with Python 2.x. ([#120]) (related: [#99], + [#105], [#117]). Possible **(BIC)** + - OS incompatibility fixes (path separator). ([#114]) + - Object processors called twice for imported models ([#108], [#118]) + - Documentation and examples regarding `NUMBER` base type ([#97], [#100]). + Thanks approxit@GitHub + ------------------------------------------------------------------- Fri Apr 5 08:46:58 UTC 2019 - pgajdos@suse.com diff --git a/python-textX.spec b/python-textX.spec index 83972c8..cf12759 100644 --- a/python-textX.spec +++ b/python-textX.spec @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without test Name: python-textX -Version: 1.8.0 +Version: 2.0.1 Release: 0 Summary: Meta-language for DSL implementation inspired by Xtext License: MIT @@ -27,7 +27,7 @@ Group: Development/Languages/Python Url: https://github.com/igordejanovic/textX #Source: https://files.pythonhosted.org/packages/source/t/textX/textX-%%{version}.tar.gz # PyPI release misses docs and tests -Source: https://github.com/igordejanovic/textX/archive/v%{version}.tar.gz +Source: https://github.com/igordejanovic/textX/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros diff --git a/v1.8.0.tar.gz b/v1.8.0.tar.gz deleted file mode 100644 index 88b2443..0000000 --- a/v1.8.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ad57b4d5ef20f39e3e651cdbffe75a5939775a62dd3d30a24c613ce31ebbdd89 -size 1629076 From 30f6189e89d00fd066eac574d243682b7e10c03a72d402487b05097c0120c1ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 4 Jun 2019 14:23:45 +0000 Subject: [PATCH 2/4] - Make sure the package actually again gets to the test phase * the tests are actually failing now OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=15 --- python-textX.changes | 6 ++++++ python-textX.spec | 36 ++++++++++++------------------------ 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/python-textX.changes b/python-textX.changes index 08f86d8..805a7ec 100644 --- a/python-textX.changes +++ b/python-textX.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 4 14:23:23 UTC 2019 - Tomáš Chvátal + +- Make sure the package actually again gets to the test phase + * the tests are actually failing now + ------------------------------------------------------------------- Sun Jun 2 15:22:59 UTC 2019 - Sebastian Wagner diff --git a/python-textX.spec b/python-textX.spec index cf12759..b0a7546 100644 --- a/python-textX.spec +++ b/python-textX.spec @@ -17,37 +17,31 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -%bcond_without test Name: python-textX Version: 2.0.1 Release: 0 Summary: Meta-language for DSL implementation inspired by Xtext License: MIT Group: Development/Languages/Python -Url: https://github.com/igordejanovic/textX -#Source: https://files.pythonhosted.org/packages/source/t/textX/textX-%%{version}.tar.gz -# PyPI release misses docs and tests +URL: https://github.com/igordejanovic/textX Source: https://github.com/igordejanovic/textX/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-Arpeggio >= 1.9.0 +Requires: python-click >= 7.0 +Requires: python-setuptools +Obsoletes: %{name}-doc +BuildArch: noarch # SECTION tests BuildRequires: %{python_module Arpeggio} BuildRequires: %{python_module Jinja2} +BuildRequires: %{python_module click >= 7.0} BuildRequires: %{python_module memory_profiler} BuildRequires: %{python_module pytest} # /SECTION -Requires: python-Arpeggio >= 1.9.0 -Requires: python-setuptools -Suggests: %name-doc -BuildArch: noarch - %python_subpackages -%package -n %name-doc -Summary: Documentation for %name -Group: Documentation/Other - %description textX is a meta-language for building Domain-Specific Languages (DSLs) in Python. It is inspired by Xtext. @@ -63,10 +57,8 @@ ambiguities, unlimited lookahead, interpreter style of work. %prep %setup -q -n textX-%{version} -sed -i '0,/#!\/usr\/bin\/env/ d' textx/commands/console.py examples/hello_world/hello.py - -%description -n %name-doc -Documentation, tutorial and examples for %name. +# do not hardcode deps +sed -i -e 's:click==:click>=:g' setup.py %build %python_build @@ -76,16 +68,12 @@ Documentation, tutorial and examples for %name. %python_expand %fdupes %{buildroot}%{$python_sitelib}/textx %check -%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_version} -find examples/ -name \*.dot | xargs rm # drop indeterministic files (boo#1114571) +%pytest %files %{python_files} -%defattr(-,root,root,-) %{python_sitelib}/* %python3_only %{_bindir}/textx -%doc AUTHORS.md CHANGELOG.md LICENSE.txt README.rst - -%files -n %name-doc -%doc art docs examples +%license LICENSE.txt +%doc AUTHORS.md CHANGELOG.md README.rst %changelog From a25a57af846bc33fc884fc8adde8ff195b43acca8a7e4a8d8754501ab83c63cf Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Thu, 6 Jun 2019 18:57:22 +0000 Subject: [PATCH 3/4] - Fix the tests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=16 --- python-textX.changes | 5 +++++ python-textX.spec | 41 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/python-textX.changes b/python-textX.changes index 805a7ec..4845f96 100644 --- a/python-textX.changes +++ b/python-textX.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jun 6 18:56:06 UTC 2019 - Sebastian Wagner + +- Fix the tests + ------------------------------------------------------------------- Tue Jun 4 14:23:23 UTC 2019 - Tomáš Chvátal diff --git a/python-textX.spec b/python-textX.spec index b0a7546..1e1b4d6 100644 --- a/python-textX.spec +++ b/python-textX.spec @@ -40,6 +40,7 @@ BuildRequires: %{python_module click >= 7.0} BuildRequires: %{python_module memory_profiler} BuildRequires: %{python_module pytest} # /SECTION + %python_subpackages %description @@ -57,18 +58,56 @@ ambiguities, unlimited lookahead, interpreter style of work. %prep %setup -q -n textX-%{version} +sed -i '0,/#!\/usr\/bin\/env/ d' examples/hello_world/hello.py # do not hardcode deps sed -i -e 's:click==:click>=:g' setup.py %build %python_build +pushd tests/functional/subcommands/example_project +%python_build +popd +pushd tests/functional/registration/projects/types_dsl +%python_build +popd +pushd tests/functional/registration/projects/data_dsl +%python_build +popd +pushd tests/functional/registration/projects/flow_dsl +%python_build +popd +pushd tests/functional/registration/projects/flow_codegen +%python_build +popd %install %python_install +pushd tests/functional/subcommands/example_project +%python_install +popd +pushd tests/functional/registration/projects/types_dsl +%python_install +popd +pushd tests/functional/registration/projects/data_dsl +%python_install +popd +pushd tests/functional/registration/projects/flow_dsl +%python_install +popd +pushd tests/functional/registration/projects/flow_codegen +%python_install +popd %python_expand %fdupes %{buildroot}%{$python_sitelib}/textx %check -%pytest +PATH=$PATH:%{buildroot}%{_bindir} %pytest +find examples/ -name \*.dot | xargs rm # drop indeterministic files (boo#1114571) +%python_expand rm -r %{buildroot}%{$python_sitelib}/data_dsl* +%python_expand rm -r %{buildroot}%{$python_sitelib}/flow_codegen* +%python_expand rm -r %{buildroot}%{$python_sitelib}/flow_dsl* +%python_expand rm -r %{buildroot}%{$python_sitelib}/types_dsl* +%python_expand rm -r %{buildroot}%{$python_sitelib}/textX_subcommand_test* +%python_expand rm -r %{buildroot}%{$python_sitelib}/textx_subcommand_test* %files %{python_files} %{python_sitelib}/* From 6b19a733f4fa0c61948395fdd0e1da3112df01a08b6766dfc56ec8b19ff7e241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 7 Jun 2019 10:44:02 +0000 Subject: [PATCH 4/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=17 --- python-textX.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-textX.spec b/python-textX.spec index 1e1b4d6..cb2ae0e 100644 --- a/python-textX.spec +++ b/python-textX.spec @@ -100,8 +100,8 @@ popd %python_expand %fdupes %{buildroot}%{$python_sitelib}/textx %check +export PYTHONDONTWRITEBYTECODE=1 PATH=$PATH:%{buildroot}%{_bindir} %pytest -find examples/ -name \*.dot | xargs rm # drop indeterministic files (boo#1114571) %python_expand rm -r %{buildroot}%{$python_sitelib}/data_dsl* %python_expand rm -r %{buildroot}%{$python_sitelib}/flow_codegen* %python_expand rm -r %{buildroot}%{$python_sitelib}/flow_dsl*