Giter Club home page Giter Club logo

Comments (2)

rob-vh avatar rob-vh commented on August 28, 2024

In rule verifier and now also in browser I have to programmatically select dataframes, e.g., looping through all segments for user profiles, so the code uses the .table() method, e.g., r.table('USTSO'). table() returns the internal dataframe:

    def table(self, rname=None) -> ProfileFrame:
        """ return table with this name (type) """
        if rname:
            try:
                return getattr(self, RACF._recordname_df[rname])
            except KeyError:
                warnings.warn(f'RACF object does not have a table {rname}')

This means, however, that views that have been improved/extended by the the publisher attribute are inaccessible/ignored:

class EnhancedProfileFrame():
    """Profile presentation properties that make data easier to report by adding fields to the original ProfileFrame.
    """
    @property
    def SSIGNON(self) -> ProfileFrame: # GRSIGN
        """combined DataFrame of ``._generalSSIGNON`` and ``.generals``, copying the ``GRBD_APPL_DATA`` field to show if replay protection is available for the passticket.
        """
        return self._generalSSIGNON.join(self._generals['GRBD_APPL_DATA'])

So I think the table() method must be changed to return the publisher associated with the table, instead of the internal table. Then we can use the property method used for SSIGNON also for DIGTCERT and DIGTRING, to join the UACC and APPLDATA fields.

Currently:
r.table('USTSO') -(lookup in map)-> r._userTSO
with the proposed change
r.table('USTSO') -(lookup in new map)-> r.userTSO -(is assigned with atrribute-> r._userTSO

so this is a moot change, but for SSSIGNON:
r.table('GRSIGN') -(lookup in map)-> r._generalSSIGNON
which does not have the extension, but with the proposed change
r.table('GRSIGN') -(lookup in new map)-> r.SSIGNON -(publishing attribute)-> function SSIGNON -> r._generalSSIGNON joined to r._general

This approach would make it possible to "fix" more frames without having to change correlate() / __init__()

from pyracf.

rob-vh avatar rob-vh commented on August 28, 2024

Modified the way publishers are assigned as described above.
ProfilePublisher now has an attribute _doc_stubs that lists the properties that are there purely for documentation (autodoc) purpose.

from pyracf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.