Skip to content
This repository has been archived by the owner on Aug 25, 2024. It is now read-only.

util: testing: manifest: shim: Initial commit #1273

Closed
wants to merge 25 commits into from
Closed

Conversation

johnandersen777
Copy link

@johnandersen777 johnandersen777 commented Nov 7, 2021

This concept of a manifest seems important (see 2ndparty dependency declaration section for background on how this applies to DFFML, it applies to other projects as well.

If we (talking to non-DFFML CI/CD community people here) use a shim layer it sets us up for forward compatibility. We can all work to define manifest formats that work well for our projects. By using the shim we ensure that they share enough properties that we set ourselves up for an easier eventual merging for manifest formats into one common CI/CD manifest format.

From the DFFML side, a manifest can easily be represented as a DataFlow. The manifest is a more user friendly form of a dataflow essentially, something more tailored to a given use case which describes which operations should be preformed, in what order, and what data types are involved. The shim layer allows projects to parse the manifest however they want. It allows them to easily switch what their next phase is at any time. This next phase might be their existing workflow, or it might be a dataflow enabled workflow. If the next phase parser outputs a dataflow when given a manifest we'll ensure auditability and achievability of the subsequent phase processing that will be taken.

The shim layer effectively operates as a trampoline (think UEFI shim, kexec, etc.) bridging the gap between the initial phase of manifest parsing and the next phase (which in DFFML's case is looking like metric collection, ml job execution, and executing our own CI both in the upcoming polyrepo setup as well as enabling local testing).

@codecov-commenter
Copy link

codecov-commenter commented Nov 7, 2021

Codecov Report

Merging #1273 (eece55a) into master (e91235f) will decrease coverage by 0.21%.
The diff coverage is 53.62%.

❗ Current head eece55a differs from pull request most recent head 87e8a1e. Consider uploading reports for the commit 87e8a1e to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1273      +/-   ##
==========================================
- Coverage   84.97%   84.76%   -0.22%     
==========================================
  Files         174      175       +1     
  Lines       10975    11044      +69     
  Branches     1821     1829       +8     
==========================================
+ Hits         9326     9361      +35     
- Misses       1280     1310      +30     
- Partials      369      373       +4     
Impacted Files Coverage Δ
dffml/util/testing/manifest/shim.py 53.62% <53.62%> (ø)
dffml/df/memory.py 79.48% <0.00%> (-0.26%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e91235f...87e8a1e. Read the comment docs.

Call :py:func:`subprocess.Popen`
"""
read_end, write_end = os.pipe()
proc = subprocess.Popen(cmd, stdin=read_end, **kwargs)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doctest and Popen.communicate were not playing nice together, so when with pipe for now

…e_parsers so shim phase parsers have local variable

Signed-off-by: John Andersen <[email protected]>
…ad modules remotely on the fly

Signed-off-by: John Andersen <[email protected]>
…ad correct wheel on the fly

Signed-off-by: John Andersen <[email protected]>
Comment on lines +1318 to +1321
if not args.no_schema_check:
raise NotImplementedError(
f"schema validation not implemented {(schema_url, schema_validation_action, schema_validation_target)!r}"
)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

schema validation goes here

probably want to add only_schema_check here

Copy link
Author

@johnandersen777 johnandersen777 Nov 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO validate @context,vocab etc. see w3c/vc-data-model#953 (comment) as a part of DID related quest line

Copy link
Author

@johnandersen777 johnandersen777 Nov 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johnandersen777 johnandersen777 deleted the manifest branch March 12, 2022 22:22

.. code-block:: yaml

$schema: "https://example.com/my.document.format.0.0.0.schema.json#sha256=dfd781dca25694dd808630ff4f27f290ba394143bdcae02911bcafa4a13b8319"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could treat . as namespace

@johnandersen777 johnandersen777 restored the manifest branch November 8, 2022 15:17
johnandersen777 pushed a commit that referenced this pull request Apr 18, 2023
johnandersen777 pushed a commit that referenced this pull request Apr 18, 2023
johnandersen777 pushed a commit that referenced this pull request Apr 18, 2023
johnandersen777 pushed a commit that referenced this pull request Apr 18, 2023
johnandersen777 pushed a commit that referenced this pull request Apr 18, 2023
johnandersen777 pushed a commit that referenced this pull request Apr 18, 2023
johnandersen777 pushed a commit that referenced this pull request Apr 18, 2023
johnandersen777 pushed a commit that referenced this pull request Apr 18, 2023
johnandersen777 pushed a commit that referenced this pull request Apr 18, 2023
johnandersen777 pushed a commit that referenced this pull request Apr 18, 2023
johnandersen777 pushed a commit that referenced this pull request Apr 18, 2023
johnandersen777 pushed a commit that referenced this pull request Apr 18, 2023
johnandersen777 pushed a commit that referenced this pull request Apr 18, 2023
johnandersen777 pushed a commit that referenced this pull request Apr 18, 2023
johnandersen777 pushed a commit that referenced this pull request Apr 19, 2023
johnandersen777 pushed a commit that referenced this pull request Apr 19, 2023
johnandersen777 pushed a commit that referenced this pull request Apr 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants