doorstop
doorstop copied to clipboard
Interpretation of Fields issue - (Previously: Failure to import using csv from GoogleSheets)
I used google sheets to create the set of ASPICE BPs for MAN.3 as shown below. When I went to import this file. I received the error messages below. Can you help me determine why this failed?
uid,level,text,ref,links,active,derived,header,normative,reviewed
MAN.3.BP00,1.0,"The purpose of the Project Management Process is to identify, establish, and control the activities and resources necessary for a project to produce a product, in the context of the project's requirements and constraints.",,,TRUE,FALSE,TRUE,FALSE,
MAN.3.BP01,1.1,"Define the scope of work. Identify the project's goals, motivation and boundaries. ",,,TRUE,FALSE,FALSE,TRUE,
MAN.3.BP02,1.2,"Define project life cycle. Define the life cycle for the project, which is appropriate to the scope, context, magnitude and complexity of the project.
NOTE 1: This typically means that the project life cycle and the customer's development process are consistent with each other.",,,TRUE,FALSE,FALSE,TRUE,
MAN.3.BP03,1.3,"Evaluate feasibility of the project. Evaluate the feasibility of achieving the goals of the project in terms of technical feasibility within constraints with respect to time, project estimates, and available resources.",,,TRUE,FALSE,FALSE,TRUE,
MAN.3.BP04,1.4,"Define, monitor and adjust project activities. Define, monitor and adjust project activities and their dependencies according to defined project life cycle and estimations. Adjust activities and their dependencies as required.
NOTE 2: A structure and a manageable size of the activities and related work packages support an adequate progress monitoring.
NOTE 3: Project activities typically cover engineering, management and supporting processes.",,,TRUE,FALSE,FALSE,TRUE,
MAN.3.BP05,1.5,"Define, monitor and adjust project estimates and resources. Define, monitor, and adjust project estimates of effort and resources based on project's goals, project risks, motivation and boundaries.
NOTE 4: Appropriate estimation methods should be used.
NOTE 5: Examples of necessary resources are people, infrastructure (such as tools, test equipment, communication mechanisms...) and hardware/materials.
NOTE 6: Project risks (using MAN.5) and quality criteria (using SUP.1) may be considered.
NOTE 7: Estimations and resources typically include engineering, management and supporting processes.",,,TRUE,FALSE,FALSE,TRUE,
MAN.3.BP06,1.6,"Ensure required skills, knowledge, and experience. Identify the required skills, knowledge, and experience for the project in line with the estimates and make sure the selected individuals and teams either have or acquire these in time.
NOTE 8: In the case of deviations from required skills and knowledge trainings are typically provided.",,,TRUE,FALSE,FALSE,TRUE,
MAN.3.BP07,1.7,"Identify, monitor and adjust project interfaces and agreed commitments. Identify and agree interfaces of the project with other (sub-) projects, organizational units and other affected stakeholders and monitor agreed commitments.
NOTE 9: Project interfaces relate to engineering, management and supporting processes.",,,TRUE,FALSE,FALSE,TRUE,
MAN.3.BP08,1.8,"Define, monitor and adjust project schedule. Allocate resources to activities, and schedule each activity of the whole project. The schedule has to be kept continuously updated during lifetime of the project.
NOTE 10: This relates to all engineering, management and supporting processes.",,,TRUE,FALSE,FALSE,TRUE,
MAN.3.BP09,1.9,"Ensure consistency. Ensure that estimates, skills, activities, schedules, plans, interfaces, and commitments for the project are consistent across affected parties.",,,TRUE,FALSE,FALSE,TRUE,
MAN.3.BP10,1.10,"Review and report progress of the project. Regularly review and report the status of the project and the fulfillment of activities against estimated effort and duration to all affected parties. Prevent recurrence of problems identified.
NOTE 11: Project reviews may be executed at regular intervals by the management. At the end of a project, a project review contributes to identifying e.g. best practices and lessons learned.",,,TRUE,FALSE,FALSE,TRUE,
$ doorstop create COMPANY COMPANY
building tree...
created document: COMPANY (@/COMPANY)
$ doorstop create ASPICE --parent COMPANY ASPICE
building tree...
created document: ASPICE (@/ASPICE)
$ doorstop create MAN.3.BP --parent ASPICE MAN.3.BP
building tree...
created document: MAN.3.BP (@/MAN.3.BP)
$ doorstop import ~/Downloads/MAN.3.BP.csv MAN.3.BP
building tree...
importing '~/Downloads/MAN.3.BP.csv' into document MAN.3.BP...
Traceback (most recent call last):
File "/usr/local/bin/doorstop", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/doorstop/cli/main.py", line 176, in main
success = function(args, os.getcwd(), parser.error)
File "/usr/local/lib/python3.7/site-packages/doorstop/cli/commands.py", line 473, in run_import
importer.import_file(args.path, document, ext, mapping=mapping)
File "/usr/local/lib/python3.7/site-packages/doorstop/core/importer.py", line 43, in import_file
func(path, document, mapping=mapping, **kwargs)
File "/usr/local/lib/python3.7/site-packages/doorstop/core/importer.py", line 167, in _file_csv
_itemize(header, data, document, mapping=mapping)
File "/usr/local/lib/python3.7/site-packages/doorstop/core/importer.py", line 283, in _itemize
item = add_item(document.prefix, uid, attrs=attrs, document=document)
File "/usr/local/lib/python3.7/site-packages/doorstop/core/importer.py", line 104, in add_item
item.set(key, value)
File "/usr/local/lib/python3.7/site-packages/doorstop/core/base.py", line 179, in wrapped
return func(self, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/doorstop/core/base.py", line 189, in wrapped
result = func(self, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/doorstop/core/base.py", line 355, in set
setattr(self, name, value)
File "/usr/local/lib/python3.7/site-packages/doorstop/core/base.py", line 189, in wrapped
result = func(self, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/doorstop/core/item.py", line 413, in header
self._data['header'] = Text(value)
File "/usr/local/lib/python3.7/site-packages/doorstop/core/types.py", line 282, in __new__
obj = super(Text, cls).__new__(cls, Text.load_text(value)) # type: ignore
File "/usr/local/lib/python3.7/site-packages/doorstop/core/types.py", line 303, in load_text
text_value = re.sub('^\n+', '', value)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/re.py", line 192, in sub
return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object
I determined the source of the error. It's related to my mis-understanding of the header
field. I interpreted it as a TRUE, FALSE field; however, it is a text field. It would be very nice if an error message was added for standard fields which identifies the expected type.