Skip to content
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

Senaite Integration #279

Merged
merged 208 commits into from
Nov 19, 2017
Merged

Senaite Integration #279

merged 208 commits into from
Nov 19, 2017

Conversation

rockfruit
Copy link
Contributor

@rockfruit rockfruit commented Oct 22, 2017

This PR will contain all the commits required for the initial integration of senaite/senaite.lims and senaite/bika.lims.

This includes:

Important PRs against bikalims/bika.lims between the time that it diverged from naralabs/bika.lims.
Commits required to pass relevant tests written in that same time period.
Additional work required to support client implementations using senaite.lims.

New PRs from bikalims/bika.lims to be merged:

Espurna and others added 24 commits September 27, 2017 17:53
Now it is using best-practices from the documentation, and some "utils"
are no longer implemented.  The test_ARImport.py is still failing, and
there is not provision for RST or doctests, but at the least we can now
begin from a common base test configuration to create these.
* PEP8

* HTML formatting only

* Implemented AR Attachments Viewlet

This viewlet supersedes the AR Attachments Macro.

* Removed AR Attachment Macro from template

* Attachment Report options

- Added new Schema field.
- Handle field change via JSONAPI v2 in viewlet.
- Fixed invalid HTML form

* Report Publish View supports now Attachments

* Updated templates to handle Attachments

* HTML formatting only

* HTML formatting only

* Moved all bika.lims viewlets to own package

* Replaced AR Manage Results Attachment Macro with Viewlet

* HTML formatting only

* Replaced Attachment Macro for WS with Viewlet
xispa and others added 28 commits November 18, 2017 21:06
PR-2305 Fixed TypeError in Analysis Specification category expansion
Do not use localized date for chart js
PR-2309 Added contentsMethod methods to instrument listing views
* Added KeyError trap on GenerateUniqueId to provide more detail

* Allow year in all portal types in ID Server config

* Included a test for batch id with a year in it in IDServer

* Improved ID Format description

* Normalise new ID to exclude funny characters

* Used normalise_filename because normalise_id does a lower()

* Added portal type to number generator

* Added seed setting browser view

* Reformated IDFormattingField description

* Added validation to seed function

* Refactored generateUniqueId to use cleaner sub function

* Refactored set_seed to set_number

* Removed duplicate line of code

* Added try/finally around set_number

* Added validation to splitSliceJoin and doc tests

* Fixed splitSpliceJion validation; added CopyError catch in
renameAfterCreation

* Add added normalize to number_generator key
Added seed function to IDServer test

* In idserver, use DateSampled instead of SamplingDate for Sample IDs

* new_seq might be referenced before assignment

* Some formatting and PEP8

* Some formatting and PEP8

* PEP8 only

* Handle alredy taken IDs

* Handle nonexisting SampleDate gracefully

* Refactored ID server so both DateSampled and SamplingDate to be variables in the Sample ID

* Removed unused import

Conflicts:
	bika/lims/browser/configure.zcml
	bika/lims/content/bikasetup.py
	bika/lims/docs/ContactUser.rst
	bika/lims/docs/IDServer.rst
	bika/lims/idserver.py
#2311)

* WIP: Fix ID Server to handle a flushed storage or existing IDs with the same Prefix

* refactored code

* Make tests work again

* remove all manual counter corrections

* Added flush route to Number Generator view

* Added some code and comments for future improvements

Conflicts:
	bika/lims/idserver.py
	bika/lims/numbergenerator.py
ID Server seeding function, flushed storage, utf-8 encoding, etc.
Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module bika.lims.browser.client.workflow, line 208, in __call__
AttributeError: 'ClientWorkflowAction' object has no attribute 'portal_url'
Fix 'ClientWorkflowAction' object has no attribute 'portal_url' when publishing multiple ARs
Traceback (most recent call last):
  File "/home/jordi/Desenvolupament/xispa/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/ZServer/PubCore/ZServerPublisher.py", line 31, in __init__
    response=b)
  File "/home/jordi/Desenvolupament/xispa/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/ZPublisher/Publish.py", line 455, in publish_module
    environ, debug, request, response)
  File "/home/jordi/Desenvolupament/xispa/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/ZPublisher/Publish.py", line 276, in publish_module_standard
    if request is not None: request.close()
  File "/home/jordi/Desenvolupament/xispa/buildout-cache/eggs/Zope2-2.13.24-py2.7.egg/ZPublisher/BaseRequest.py", line 220, in close
    notify(EndRequestEvent(None, self))
  File "/home/jordi/Desenvolupament/xispa/buildout-cache/eggs/zope.event-3.5.2-py2.7.egg/zope/event/__init__.py", line 31, in notify
    subscriber(event)
  File "/home/jordi/Desenvolupament/xispa/buildout-cache/eggs/zope.component-3.9.5-py2.7.egg/zope/component/event.py", line 24, in dispatch
    zope.component.subscribers(event, None)
  File "/home/jordi/Desenvolupament/xispa/buildout-cache/eggs/zope.component-3.9.5-py2.7.egg/zope/component/_api.py", line 136, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/home/jordi/Desenvolupament/xispa/buildout-cache/eggs/zope.component-3.9.5-py2.7.egg/zope/component/registry.py", line 321, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/home/jordi/Desenvolupament/xispa/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 585, in subscribers
    subscription(*objects)
  File "/home/jordi/Desenvolupament/xispa/zinstance/src/bika.lims/bika/lims/browser/analysisrequest/publish.py", line 1536, in EndRequestHandler
    digester(ar, overwrite=True)
  File "/home/jordi/Desenvolupament/xispa/zinstance/src/bika.lims/bika/lims/browser/analysisrequest/publish.py", line 753, in __call__
    data = self._ar_data(ar)
  File "/home/jordi/Desenvolupament/xispa/zinstance/src/bika.lims/bika/lims/browser/analysisrequest/publish.py", line 967, in _ar_data
    data['analyses'] = self._analyses_data(ar, ['verified', 'published'])
  File "/home/jordi/Desenvolupament/xispa/zinstance/src/bika.lims/bika/lims/browser/analysisrequest/publish.py", line 1281, in _analyses_data
    catalog = get_tool(CATALOG_ANALYSIS_LISTING)
  File "/home/jordi/Desenvolupament/xispa/zinstance/src/bika.lims/bika/lims/api.py", line 183, in get_tool
    return ploneapi.portal.get_tool(name)
  File "<string>", line 2, in get_tool
  File "/home/jordi/Desenvolupament/xispa/buildout-cache/eggs/plone.api-1.8.1-py2.7.egg/plone/api/validation.py", line 77, in wrapped
    return function(*args, **kwargs)
  File "/home/jordi/Desenvolupament/xispa/buildout-cache/eggs/plone.api-1.8.1-py2.7.egg/plone/api/portal.py", line 118, in get_tool
    return getToolByName(get(), name)
  File "/home/jordi/Desenvolupament/xispa/buildout-cache/eggs/plone.api-1.8.1-py2.7.egg/plone/api/portal.py", line 82, in get
    'Unable to get the portal object.
Fix Unable to get the portal object when digesting/creation the results report
@xispa xispa merged commit 38ffc88 into master Nov 19, 2017
@xispa xispa deleted the senaite-integration branch November 19, 2017 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

7 participants