Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
mar10 committed Oct 10, 2024
1 parent c81991a commit 10e6186
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ jobs:
# Python 3.11 # EOL 2027-10-24
# Python 3.12 # EOL 2028-10-02
# Python 3.13 # EOL
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"]

steps:

- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
Expand All @@ -40,6 +42,8 @@ jobs:
python -m pip install --upgrade pip
python -m pip install pydot pytest pytest-cov pytest-html rdflib ruff
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install -e .
python -m pip list
- name: Lint with ruff
run: |
Expand Down
16 changes: 9 additions & 7 deletions docs/sphinx/ug_objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,20 @@ access ``node.data.age`` as ``node.age`` for example::
assert alice.name == "Person<Alice, 23>"

.. note::
The `shadow_attrs` feature is readonly, so you cannot modify the object
through the shadow attributes. You need to access the object directly for that.
The `forward_attrs` feature is readonly, so we cannot modify the object
through the forwarded attributes.
We need to access the object directly for that, e.g. ``node.data.age = 24``.

.. warning::

Aliasing only works for attribute names that are **not** part of the native
:class:`~nutree.node.Node` data model. So these attributes will always return
the native values:
:class:`~nutree.node.Node` data model. So the following attributes will
always return the native values:
`children`, `data_id`, `data`, `kind`, `meta`, `node_id`, `parent`, `tree`,
and all other methods and properties.
and all other methods and properties, like `parent`, `name`, etc.

Note also that shadow attributes are readonly.
Use the `forward_attrs` feature with caution, as it can lead to unexpected
behavior, especially when new native attributes are added to `Node` in
future releases!


.. _generic-node-data:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ zip_safe = False
# bin/second.py

install_requires =
typing-extensions;python_version<'3.11'
typing_extensions>=4.0; python_version<='3.10'

# [options.package_data]
# * = *.txt, *.rst
Expand Down

0 comments on commit 10e6186

Please sign in to comment.