New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added basic API for Column-level attributes (issue #821) #893
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general the PR looks good but there are few things to address.
Also there are two important things missing:
- unit tests
- documentation update
Hi :) I'm creating IsDescription classes by wrapper functions to set column lengths for 1 Bit serialised bool arrays, so they take less space with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation looks good to me.
Please add
- at least basic unit tests
- basic documentation
- a changelog entry
Sorry @jondoesntgit for the long delay to provide a feedback. |
One call to H5*ARRAYmake() used completely different indentation style.
hdf5 doesn't like that: h5py/h5py#1948 HDFGroup/hdf5@16349c5 > The 'not suitable for filters' message does seem to have been added > in 1.12.1 From the code, it looks like it will refuse to apply any > filters to vlen strings. This patch is based on the assumption that the hdf5 code is *correct*, and indeed fletcher32 shouldn't be used in that vlarrays. But if hdf5 is wrong, then the fix should be their side. It might make sense to apply this to get the tests passing again, even if ultimately hdf5 is adjusted too. Fixes PyTables#845.
Add python3.10 classifier
This enables to attach attributes during the assembly of a IsDescription class. Example: ``` class TableLayout(tables.IsDescription): freq = tables.Float32Col( attrs={"val": 13.3, "unit": "Hz", "description": "Ref. freq"}) ```
…l_attrs This registers the Col._v_col_attrs in the ColumnAttributeSet and stores them as table attributes. This way column attributes set in the IsDescription assembly are propagated to the Column attributes.
Otherwise the attributes are only build when the column is used directly for attribute assignment. This then does not store the attributes inserted in the IsDescription class.
No worries on the delay. I'd like to give some time this December to this,
but there's a lot of other things competing for my time (new family member,
wrapping up PhD, etc...)
…On Tue, Dec 14, 2021 at 11:42 PM Antonio Valentino ***@***.***> wrote:
Sorry @jondoesntgit <https://github.com/jondoesntgit> for the long delay
to provide a feedback.
The PS seems to be almost ready for merge.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#893 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZCG2BNCV3FQI3ZXXFML53URBBIFANCNFSM4ZPSVPSQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi, |
@Zybulon I adressed the original leftover tasks quite a while ago, but I'm not sure where this currently stands |
Could you please push new changes in this PR? |
I am not very familiar with Github so I might misunderstand some things. @jondoesntgit does not seems very active, so I guess we can't push code in this PR, am I wrong ? Maybe @mennthor can create a new PR to push its modifications ? |
Hello,
Sorry for the late reply. Things got a little crazy over the holidays.
I think when I left off, I just needed to write some unit tests and documentation. I’d love if someone took over this PR.
…Sent from my iPhone
On Jan 3, 2023, at 05:56, Zybulon ***@***.***> wrote:
I am not very familiar with Github so I might misunderstand some things. @avalentino does not seems very active, so I guess we can't push code in this PR, am I wrong ? Maybe @mennthor can create a new PR to push its modifications ?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
@jondoesntgit I think you can accept menthor's commit in your fork, can you do it ? It should be immediate since there is not conflict. |
Requested updates to merge PyTables PR PyTables#893
Is |
you can re-base or merge master into your branch |
Back in January, I did a rebase, and then I just did a merge a few minutes ago. I'm sorry that this has taken so long. Let me know if there's any issues with merging this into master. I'm needing to factory-reset my laptop, and this is the last thing I'm waiting for before I factory reset. |
Dear @jondoesntgit, thanks a lot for you effort. |
@avalentino Done |
Thanks again @jondoesntgit |
The column-level attributes are only accessible once the table and the columns are instantiated. There's currently no support for adding attributes on creation (e.g., something like
pt.Float32Col(dflt=0.0, shape=(3,2), attrs=dict(foo='bar', description='some string')
)