Skip to content

Commit

Permalink
change from object programming to functional programming + update to …
Browse files Browse the repository at this point in the history
…tests
  • Loading branch information
gitstart-nimhdsst committed Aug 7, 2024
1 parent 4378d68 commit a9fadc7
Show file tree
Hide file tree
Showing 7 changed files with 482 additions and 457 deletions.
2 changes: 2 additions & 0 deletions osm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ def generate_version_file():
with open(version_file_path, "w") as version_file:
version_file.write(version_file_content)


__version__ = get_version()
4 changes: 1 addition & 3 deletions osm/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

import requests

from osm import get_version

__version__ = get_version()
from osm._version import __version__

DEFAULT_OUTPUT_DIR = "./osm_output"

Expand Down
16 changes: 8 additions & 8 deletions osm/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Metrics(EmbeddedModel):

class Client(EmbeddedModel):
compute_context_id: int
email: Optional[EmailStr]
email: Optional[EmailStr] = None


class Work(EmbeddedModel):
Expand All @@ -62,8 +62,8 @@ class Work(EmbeddedModel):
openalex_id: Optional[str] = None
scopus_id: Optional[str] = None
filename: str
file: str
content_hash: str
file: Optional[str] = None
content_hash: Optional[str] = None


class Invocation(Model):
Expand All @@ -81,8 +81,8 @@ class Invocation(Model):
# components: list[Component]


# Rtransparent:
# Component.construct(name="rtransparent", version="0.13", docker_image="nimh-dsst/rtransparent:0.13", docker_image_id="dsjfkldsjflkdsjlf2jkl23j")
# Derivative.construct(name="rtransparent", version="0.13", docker_image="nimh-dsst/rtransparent:0.13", docker_image_id="dsjfkldsjflkdsjlf2jkl23j")
# ScibeamParser:
# Component.construct(name="scibeam-parser", version="0.5.1", docker_image="elife/scibeam-parser:0.5.1", docker_image_id="dsjfkldsjflkdsjlf2jkl23j")
# Rtransparent: Component.construct(name="rtransparent", version="0.13", docker_image="nimh-dsst/rtransparent:0.13",
# docker_image_id="dsjfkldsjflkdsjlf2jkl23j") Derivative.construct(name="rtransparent", version="0.13",
# docker_image="nimh-dsst/rtransparent:0.13", docker_image_id="dsjfkldsjflkdsjlf2jkl23j") ScibeamParser:
# Component.construct(name="scibeam-parser", version="0.5.1", docker_image="elife/scibeam-parser:0.5.1",
# docker_image_id="dsjfkldsjflkdsjlf2jkl23j")
Loading

0 comments on commit a9fadc7

Please sign in to comment.