• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aiidateam / aiida_core / 4541 / 5
69%
develop: 74%

Build:
Build:
LAST BUILD BRANCH: fix_3032_doc_working_importexport
DEFAULT BRANCH: develop
Ran 29 Nov 2018 08:15AM UTC
Files 407
Run time 26s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Nov 2018 08:03AM UTC coverage: 62.023% (-0.05%) from 62.068%
TEST_AIIDA_BACKEND=django TEST_TYPE="tests"

Pull #2246

travis-ci

web-flow
Refactor the function process decorator

The `calcfunction` and `workfunction` decorator are essentially
running the same code, with the only difference being the type of
node they use to represent their execution in the provenance graph.
The code has been refactored to a generic `process_function` decorator
which takes a node class as an argument. The `calcfunction` and
`workfunction` decorators are then simply defined by wrapping the
`process_function` with the correct node class, `CalcFunctionNode` and
`WorkFunctionNode` respectively.

The difference in link rules between the two concrete decorators is
also completely defined by those node classes, so the logic of the
`FunctionProcess` class that is dynamically generated by the process
function decorator can be implemented once. The common functionality of
defining and overriding inputs is tested in `test_process_functions`.
A `process_function` should never actually be run, but for testing
purposes we defined a dummy ORM class.

Functionality that is specific to the two concrete decorators, such as
which type of links can be created, is tested individually.
Pull Request #2246: Refactor the function process decorator

22830 of 36809 relevant lines covered (62.02%)

0.62 hits per line

Source Files on job 4541.5 (TEST_AIIDA_BACKEND=django TEST_TYPE="tests")
  • Tree
  • List 0
  • Changed 32
  • Source Changed 17
  • Coverage Changed 22
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 545
  • Travis Job 4541.5
  • 9c71c58f on github
  • Prev Job for TEST_AIIDA_BACKEND=django TEST_TYPE="tests" on fix_2171_refactor_workfunction_decorator (#4533.5)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc