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

Remove Sim treanttype #65

Closed
dotsdl opened this issue Feb 21, 2017 · 3 comments
Closed

Remove Sim treanttype #65

dotsdl opened this issue Feb 21, 2017 · 3 comments

Comments

@dotsdl
Copy link
Member

dotsdl commented Feb 21, 2017

In the spirit of datreant/datreant#100, we want to get rid of the concept of treanttypes and make all statefiles have names like Treant.<uuid>.json. This has the benefit that tools such as datreant.cli can easily work with all Treants, not just those generated with datreant.core. It also greatly simplifies the relationship between datreant and libraries such as mdsynthesis, allowing us to fix some annoying behavior.

To accomplish this consistently, mdsynthesis must at least:

  1. Feature its own discover method that only selects Treants that already feature the mdsynthesis namespace in their state file, returning these as Sim objects. This will come with a performance penalty since now the files must be parsed to check for this condition, whereas before the filename encoded this.
  2. Have a Sim object that, upon use on an existing Treant file, creates the mdsynthesis namespace marking it as a Sim for later discovery.
  3. Not change the behavior of any datreant components on import, such as discover or Bundle, as it currently does.

In order for this scheme to work consistently, datreant.core.Bundle must be modified to not allow paths as input, but instead only take Treant objects or their subclasses directly (otherwise it's not clear what class to use on the path). Must check that serialization and deserialization still works under this scheme.

@kain88-de
Copy link
Contributor

In order for this scheme to work consistently, datreant.core.Bundle must be modified to not allow paths as input, but instead only take Treant objects

That sounds like a sane idea. Makes the code more explicit anyway.

@dotsdl
Copy link
Member Author

dotsdl commented Dec 8, 2017

This is being addressed in #70. Almost there. 😁

@dotsdl
Copy link
Member Author

dotsdl commented Dec 17, 2017

With #70 merged, closing.

@dotsdl dotsdl closed this as completed Dec 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants