-
Notifications
You must be signed in to change notification settings - Fork 3
Develop Context
class
#34
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #34 +/- ##
==========================================
+ Coverage 86.21% 86.37% +0.15%
==========================================
Files 12 12
Lines 624 697 +73
Branches 103 104 +1
==========================================
+ Hits 538 602 +64
- Misses 65 73 +8
- Partials 21 22 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. A couple quick notes.
7c10dda
to
0d427f4
Compare
9185ba7
to
72dbbeb
Compare
for Sessions class and associated tests for Context class
I just added the tests for the |
Makes sense to me. I would just skip |
Started playing around with this and I'm using the
|
I would actually probably create def walk(directory, dataset, subject=None):
if subject is None and is_subject_dir(directory):
subject = Subject(directory, dataset)
for child in directory.children:
yield Context(child, dataset, subject)
if child.is_dir():
yield from walk(child, dataset, subject)
tree = FileTree.read_from_filesystem(root)
dataset = Dataset(root, schema)
for context in walk(tree, dataset):
... |
Right, that does make sense. This should be in |
Also, am I right in thinking that we'll still be using the |
Yes, or wherever we do the walk.
Yes,
Yes.
Seems excessive. What do you think about making |
closes #32 (eventually)
I'm happy to leave this open and just add to it as I approach the rest of the methods, but if you'd like to open a PR for each of the rest of the methods then I'm also happy to defer to you on that.
Here's my initial attempt at this:
Context
(path, entities, datatype, suffix, extension, modality, and size) and added stubs for the restOne thing I wasn't sure about is where it would be beneficial to use
cached_property
overproperty
for this class (and I suppose more generally). Any advice?My next step will be to develop the
subjects
method along with theSessions
class. I think I'll start by creating test for these (so you can make sure I understand how these are meant to work) and then go from there.