karrlab / obj_tables Goto Github PK
View Code? Open in Web Editor NEWTools for creating and reusing high-quality spreadsheets
Home Page: https://objtables.org
License: MIT License
Tools for creating and reusing high-quality spreadsheets
Home Page: https://objtables.org
License: MIT License
Start with %
Associated with worksheet/table
/xl/worksheets/sheet19.xml
'Cell'!$B$0:$XFD$0
should be 'Cell'!$B$1:$XFD$1
<dataValidation type="list" errorStyle="warning" allowBlank="1" showInputMessage="1" showErrorMessage="1" errorTitle="Cell" error="Value must be a value from "Cell:0" or blank." promptTitle="Cell" prompt="Select a value from "Cell:0" or blank." sqref="B1:B2">
<formula1>'Cell'!$B$0:$XFD$0</formula1>
</dataValidation>
Table header: \n!!SBtab ... \n
Example:
!!SBtab TableID='def_table' SBtabVersion='1.0' TableType='Definition' TableName='Allowed_types'
... if they make sense
If you want this feature, please provide a use case to motivate this
while very handy, pprint() produces too much output. filter it.
None
valuesSee example problem Andrew encountered and I debugged.
Add a test of ParsedExpression.__prep_expr_for_tokenization()
to obj_model/tests/test_expression.py
. It's covered because it's always called, but the substitutions it makes need to be tested.
ILLEGAL_TOKENS_NAMES
--> LEGAL_TOKENS_NAMES
consider this code:
is_attr = False
for base in bases:
if attr_name in dir(base):
is_attr = True
this code is risky, because dir(base) may contain a string that matches attr_name
but is not an attribute inherited from base. E.g., the name of a method could match.
a better approach would be to directly check whether attr_name is an attribute of a base that is an obj_model.core.Models. namespace doesn't have the same problem.
add migrate commands to H1 & Mp
remove branch from Git metadata
expose the optional locations for migrated files
obtain schema commit metadata from pip installed package
detect erroneous schema changes file annotations
ensure that the Git version of a data file is a sentinel commit
enforce this invariant: each sentinel commit must be identified by one schema changes file
In the return values of obj_model.io.get_fields()
, what's the difference between attrs
& sub_attrs
? Docs say:
:obj:`list` of :obj:`Attribute`: attributes in the order they should be printed
:obj:`list` of tuple of :obj:`Attribute`: attributes in the order they should be printed
A modeler writing a wc_lang
spreadsheet might have trouble fixing this error:
ValueError: The model cannot be loaded because '2_species_1_reaction.xlsx' contains error(s):
Taxon
The attributes must be defined in this order:
Id
Name
Rank
Comments
References
Submodel
The attributes must be defined in this order:
Id
Name
Algorithm
Compartment
Biomass reaction
Objective function
Comments
References
Compartment
The attributes must be defined in this order:
Id
Name
Initial volume
Comments
References
SpeciesType
The attributes must be defined in this order:
Id
Name
Structure
Empirical formula
Molecular weight
Charge
Type
Comments
References
Observable
The attributes must be defined in this order:
Id
Name
Species
Observables
Comments
Function
The attributes must be defined in this order:
Id
Name
Expression
Comments
StopCondition
The attributes must be defined in this order:
Id
Name
Expression
Comments
Reference
The attributes must be defined in this order:
Id
Name
Title
Author
Editor
Year
Type
Publication
Publisher
Series
Volume
Number
Issue
Edition
Chapter
Pages
Comments
my file "Cash transactions 2017" is a counter-example
Generates
decoded = {}
for json_obj in json_objs:
> model = models_by_name[json_obj['__type']]
E KeyError: 'DataRepoMetadata'
Hi Jonathan
In def set_value(self, obj, new_value), at ../obj_model/obj_model/core.py:3884: ValueError
an example error looks like:
ValueError: Attribute '<wc_lang.core.RateLaw object at 0x7fbb31678a58>' of '<wc_lang.core.RateLawEquation object at 0x7fbb31678b00>' must be None
I think it would be better if the first value was the string value of the attribute and the 2nd was something like the classname, id and name of the Model.
Thanks
Features
Example:
ensure that subclasses of MigrationWrapper satisfy its method signatures type-checking statically with typing
and using mypy.api
to verify subclasses
Potentially use RestrictedPython when there is more documentation to understand how to use it.
cls.get_related_attributes()
- returns names of all RelatedAttributes of the classcls.get_scalar_attributes()
- returns all LiteralAttributes of the classcls.get_attributes()
- returns names of all Attributescls.get_related_name(attribute)
- for a given RelatedAttribute of this class, get the related nameself.get_empty_scalar_attributes()
- returns LiteralAttributes that are set to Noneself.get_nonempty_scalar_attributes()
- opposite of aboveself.get_empty_related_attributes()
- returns RelatedAttributes that are set to None or []self.get_nonempty_related_attributes()
- opposite of aboveCheck that all sheets and columns are provided
the line return self.default_cleaned_value()
in
if isinstance(self.default_cleaned_value, (
six.types.FunctionType, six.types.MethodType, six.types.LambdaType)):
return self.default_cleaned_value()
looks wrong. default_cleaned_value
isn't defined as a function anywhere.
don't have time to investigate now.
SlugAttribute
--> customIntAttribute
--> Whole number (min, max)FloatAttribute
--> Decmial (min, max)OneToOneAttribute
--> ListManyToOneAttribute
--> ListDateAttribute
--> DateTimeAttribute
--> TimeEnumAttribute
--> ListStored Models, such as spreadsheets and delimited files on disk, can become incompatible with updates to model definitions in obj_model. Create a utility that migrates stored models to be compatible with a modified model. E.g., Django has a migration utility, which was originally called fabric.
Verify that attribute_order is a tuple (or at least not a string) so that a model definition like this
class A(obj_model.Model):
id = SlugAttribute()
class Meta(obj_model.Model.Meta):
attribute_order = ('id')
does not return an incomprehensible error like this:
raise ValueError("`attribute_order` must contain attribute names; '{}' not found in "
> "attributes of {}".format(attr_name, name))
E ValueError: `attribute_order` must contain attribute names; 'i' not found in attributes of A
Listed in decreasing order of my subjective assessment of importance
Unless a user knows that this problem is possible, they're unlikely to be able to debug it.
Sphinx
generates 21 WARNINGs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.