14
0
forked from pool/python-textX
Commit Graph

20 Commits

Author SHA256 Message Date
Sebastian Wagner
0a1d02a680 - update to version 3.0.0:
- Added:
  - Added RREL-'fixed name'-extension, allowing to follow model elements 
    given a fixed name (e.g. an object defined in a builtin model).
    Details described in rrel.md ([#364]).
  - Added ability to access the full path of named objects traversed while
    resolving a RREL expression ([#304]).
  - Added decorator `textx.textxerror_wrap` for object processors to automatically
    transform non-TextXErrors to TextXErrors in order to indicate the filename and
    position of the element being processed ([#306]).
 - Fixed:
  - `model_param_defs` on `TextXMetaMetaModel` ([#360]).
  - Interpreting of backslash special chars (e.g. `\n`, `\t`) in grammar string
    matches ([#323]). Possible **(BIC)** - backslash chars were not interpreted in
    grammar files and raw Python strings prior to this fix.
  - Exception/error messages ([#320])
  - Relaxed assert in model creation enabling some model changes in user classes
    ([#311])
  - Model export to dot in cases where textX object is replaced in the
    processor([#301])
  - Do not allow "empty" RREL expressions (compare unittests in `test_rrel.py`; [#355])
 - Changed:
  - Inheritance chain calculation. Possible **(BIC)** ([#369]).
  - Added `def_file_name` attribute to `RefRulePosition` for storing the definition's
    model file name in case of cross-references between models. ([#313],[#277])
  - Migrated from Travis CI to GitHub Actions ([#307])
  - Dropped support for deprecated Python versions. The lowest supported version
    is 3.6. **(BIC)**

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=35
2022-03-22 20:52:17 +00:00
Sebastian Wagner
88986c68ba - Fix package builds for Leap 15.2 and 15.3, python-xml dependency was missing.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=34
2021-07-04 09:56:52 +00:00
Sebastian Wagner
58327fb08d - Added:
- `textx generate`. Documented passing in arbitrary parameters which can be
      used in the generator function. Also, implemented passing of model
      parameters defined in the meta-model (`model_param_defs` and
      `_tx_model_params`) ([#299])
    - `get_location` function for producing `line/col/filename` from any textX
      object. ([#294])
    - `builtin_models` of type `ModelRepository` to meta-model constructor. Used
      to supply pre-loaded models for `ImportURI` based scoping providers as a
      fallback to search into. ([#284])
    - Initial implementation of TEP-001 ([#111]) allowing to specify scope
      provider behavior within the grammar itself. [#274] and [#287] introduce
      the RREL (reference resolving expression language) to define how
      references are resolved. Details see `rrel.md`.
    - Parameter `should_follow` of callable type to `get_children` and
      `get_children_of_type` model API calls to decide if the element should be
      traversed. ([#281])
 - Fixed:
    - Fixed bug with Falsy user classes in `get_children` ([#288])
    - Fixed bug with unhashable objects during dot export ([#283])
    - Fixed bug where (Ext)RelativeName scope providers accepted any referenced
      object that contained the lookup name in its name. Thanks ipa-mdl@GitHub
      ([#267])
    - Fixed bug in `flow_dsl` test project causing static files not being included
      in package build/installation. Thanks sebix@GitHub ([#272]).
    - Fixed bug, where user classes not used in the grammar caused exceptions
      ([#270]): now, when passing a list of user classes, you need to use them in
      your grammar. You can alternatively also pass a callable (see metamodel.md;
      [#273]). Also, using base classes for rules from imported grammars in 
      conjunction with user classes is not allowed and results in an exception.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=31
2020-11-01 17:58:41 +00:00
Sebastian Wagner
3c4968c147 -This line, and those below, will be ignored--
!    fix_tests_setupcfg.patch
D    python-textX-2.2.0.tar.gz
A    python-textX-2.3.0.tar.gz
M    python-textX.changes
M    python-textX.spec

Diff for working copy: .
Index: python-textX.changes
===================================================================

--- python-textX.changes	(revision 330f9bd3ef646c510cc9e9a2c0ed040e)
+++ python-textX.changes	(working copy)
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Sun Nov  1 17:56:21 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at>
+
+- remove fix_tests_setupcfg.patch, included upstream
+- update to version 2.3.0:
+
 -------------------------------------------------------------------
 Thu Aug  6 13:16:43 UTC 2020 - Sebastian Wagner <sebix+novell.com@sebix.at>
 

Index: python-textX.spec
===================================================================

--- python-textX.spec	(revision 330f9bd3ef646c510cc9e9a2c0ed040e)
+++ python-textX.spec	(working copy)
@@ -18,15 +18,13 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-textX
-Version:        2.2.0
+Version:        2.3.0
 Release:        0
 Summary:        Meta-language for DSL implementation inspired by Xtext
 License:        MIT
 Group:          Development/Languages/Python
 URL:            https://textx.github.io/textX/stable/
-Source:         https://github.com/igordejanovic/textX/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM fix_tests_setupcfg.path -- based on https://github.com/textX/textX/pull/272.patch without changelog
-Patch0:         fix_tests_setupcfg.patch
+Source:         https://github.com/igordejanovic/textX/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
@@ -42,6 +40,7 @@
 BuildRequires:  %{python_module Arpeggio}
 BuildRequires:  %{python_module Jinja2}
 BuildRequires:  %{python_module click >= 7.0}
+BuildRequires:  %{python_module html5lib}
 BuildRequires:  %{python_module memory_profiler}
 BuildRequires:  %{python_module pytest}
 # /SECTION
@@ -65,7 +64,6 @@
 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
-%patch0 -p1
 
 %build
 %python_build

Index: python-textX-2.3.0.tar.gz
===================================================================
Binary file 'python-textX-2.3.0.tar.gz' added.

Index: python-textX-2.2.0.tar.gz
===================================================================
Binary file 'python-textX-2.2.0.tar.gz' deleted.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=30
2020-11-01 17:57:59 +00:00
Tomáš Chvátal
3dbbdb46ed - Add patch to fix tests:
* fix_tests_setupcfg.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=28
2020-08-10 11:51:33 +00:00
Sebastian Wagner
4d535fb634 - update to version 2.2.0:
- Added:
  - Initial docs for Jinja code generator support (from
    [textX-jinja](https://github.com/textX/textX-jinja)) ([#264]).
  - Analyzing grammars programmatically as plain textX models
    (`grammar_model_from_str/file`) ([#235])
  - Initial `startproject` scaffolding (from
    [textX-dev](https://github.com/textX/textX-dev)) docs ([#234])
  - Generator helper functions `get_output_filename` and `gen_file` ([#233])
  - `textx version` command ([#219])
  - Versions for languages/packages in `list-languages` and `list-generators`
    commands ([#228])
  - Added the ability to specify extra parameters during `model_from_file` or
    `model_from_str` and to define which extra parameters exist in the
    meta-model ([#243]).
 - Fixed:
  - Fixed several instances of invalid truthiness checking. Thanks
    markusschmaus@GitHub ([#250])
  - Fixed applying multiple grammar rule modifiers ([#246])
  - Fixed exception on calling `check` CLI command with relative path name.
  - Fixed return value of textx generate and check commands: we return a failure
    on error now ([#222])
  - Fixed type checking for references to builtin elements ([#218])
 - Changed:
  - User classes can now be immutable (e.g. `attr.frozen`) or can use
    `__slots__`. Thanks markusschmaus@GitHub ([#256, #260, #261])
  - Cleanup of setup configuration and install scripts [#231]
  - Dot/PlantUML rendering of meta-models: remove rendering of base types,
    improve rendering of required/optional, render match rules as a single
    table. ([#225])

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=27
2020-08-08 12:01:33 +00:00
Tomáš Chvátal
8959b67229 Accepting request 806909 from home:pgajdos:python
submit

OBS-URL: https://build.opensuse.org/request/show/806909
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=25
2020-05-18 13:03:11 +00:00
Tomáš Chvátal
edfee96d21 Accepting request 783789 from home:pgajdos:python
- version update to 2.1.0
  ### Added
  - Added new function `textx.scoping.is_file_included` ([#197]).
  ### Changed
  - Allow passing kwargs (specially - file_name) argument when loading metamodel
    from string (needed for `textX-LS v0.1.0`) ([#211]).
  - Changed the parser rule for regex matches. Spaces are not stripped any more
    from the beginning and the end of the regexp-pattern. This could be possible
    **BIC** for some special cases [#208].
  - Changed function name `textx.scoping.get_all_models_including_attached_models`
    to `textx.scoping.get_included_models` (marked old function
    as deprecated) ([#197]).
  - Delete all models touched while loading a model, when an error occurs
    while loading in all repositories (strong exception safety guarantee) ([#200]).

OBS-URL: https://build.opensuse.org/request/show/783789
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=23
2020-03-11 11:46:33 +00:00
Sebastian Wagner
7c8d5d2309 - Fix Tests for Leap 15.1: click requires UTF-8 locale.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=21
2019-07-09 11:55:46 +00:00
Sebastian Wagner
22f4b43e8e - Use documentation page as homepage instead of repository.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=18
2019-06-08 14:10:15 +00:00
Sebastian Wagner
a25a57af84 - Fix the tests
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=16
2019-06-06 18:57:22 +00:00
Tomáš Chvátal
30f6189e89 - 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
2019-06-04 14:23:45 +00:00
Sebastian Wagner
2989ed14b9 - 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
2019-06-02 15:23:46 +00:00
Tomáš Chvátal
c19e5e2614 Accepting request 691739 from home:pgajdos
- version update to 1.8.0
   - https://github.com/igordejanovic/textX/pull/71
     - Regular expression with group support
     - See [the
       docs](http://www.igordejanovic.net/textX/development/grammar/#matches)
       for usage.
   - https://github.com/igordejanovic/textX/pull/69
     - Added search path feature (issue #66) - search path support for model
       files (importURI scope providers; see docs/scoping.md).
   - https://github.com/igordejanovic/textX/pull/77
     - New multi meta model support for references-only for better meta model
       modularity (referencing models without having access to the grammar,
       see docs/multimetamodel.md).
   - https://github.com/igordejanovic/textX/pull/79
     - Fixing obj_processors calling.
   - https://github.com/igordejanovic/textX/pull/84
     - New contribution guide.
   - https://github.com/igordejanovic/textX/pull/81
     - Bugfix: lost encoding for multi meta-model.
   - https://github.com/igordejanovic/textX/pull/68
     - changed parser access in metamodel (private attribute "_parser")
   - mkdocs documentation now uses [mike](https://github.com/jimporter/mike) for
     multiversion support.

OBS-URL: https://build.opensuse.org/request/show/691739
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=12
2019-04-06 10:13:52 +00:00
b60157ed54 Remove superfluous devel dependency for noarch package
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=10
2018-12-04 14:09:36 +00:00
Sebastian Wagner
b0c962254e Accepting request 651138 from home:bmwiedemann:branches:devel:languages:python
drop indeterministic unnecessary .dot files to make package build reproducible (boo#1114571)

OBS-URL: https://build.opensuse.org/request/show/651138
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=8
2018-11-22 20:27:39 +00:00
Sebastian Wagner
aadbacf0ff - update to version 1.7.0:
- A major feature of this release is multi-(meta-)model support with
    configurable resolving techniques. Thanks Pierre Bayerl (goto40@GitHub)!
    The docs sections are [here](http://www.igordejanovic.net/textX/scoping/)
    and [here](http://www.igordejanovic.net/textX/multimetamodel/).
    Details follow:
    - added new function textx.get_model.children to search arbritrary children
      using a lambda predicate.
    - remapped textx.model.get_children_of_type to the new children function
    (changed the logic, such that the root node is also checked to be model
    object).
    - added new metamodel function to register scope providers. Scope providers
    are callables, which return the referenced object.
    - added optional attribute "_tx_model_repository", see metamodel.py
      documentation
    - added attribute "scope_provider" like "obj_processors" to organize scope
      providers
    - added an optional argument to model_from_str and model_from_file:
      "pre_ref_resolution_callback": this is required internally to prepare the
      loading of other model files.
    - changed reference resolution in model.py
      - moved default resolution to textx.scoping.py
      - select the scope provider based on rule and rule-attribute (see
        scoping.py documentation)
      - added a Postponed type to postpone the resolution
      - introduced a multi-pass resolution (implemented at the end of
        parse_tree_to_objgraph; introduced new helper argument, e.g., a new
        optional argument "is_this_the_main_model" and
        "pre_ref_resolution_callback" (see metamodel.py above) to support
        reference resolution in the presence of different model files.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=6
2018-07-07 09:18:41 +00:00
Sebastian Wagner
f9f60a148f Accepting request 577862 from home:jengelh:branches:devel:languages:python
- Compact description

OBS-URL: https://build.opensuse.org/request/show/577862
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=3
2018-02-18 20:59:15 +00:00
Sebastian Wagner
43dd2638d8 - update to version 1.6.1. No notable changes.
- update to version 1.6.0. Shortened changelog:
 *  Introduced _tx_fqn class attribute.
 * textX api functions and classes are now available directly from textx module.
 * bugfixes
- update to version 1.5.2. Bugfixes.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=2
2018-01-31 14:25:41 +00:00
Jan Matejek
4ff19f1e82 Accepting request 519127 from home:sebix:branches:devel:languages:python
- initial package

OBS-URL: https://build.opensuse.org/request/show/519127
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-textX?expand=0&rev=1
2017-08-28 14:55:37 +00:00