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

Esgprep use of pyessv before merging dev to master #19

Open
ltroussellier opened this issue Jul 5, 2022 · 0 comments
Open

Esgprep use of pyessv before merging dev to master #19

ltroussellier opened this issue Jul 5, 2022 · 0 comments
Assignees

Comments

@ltroussellier
Copy link
Contributor

ltroussellier commented Jul 5, 2022

Not for you sadie :), it s for mark

import pyessv

############## CATCHING EXCEPTIONS #################""

from pyessv._exceptions import TemplateParsingError, TemplateValueError

############## LOAD SPECIFIC auth and project #################""

pyessv.load_cv(self.get_cv_authority(), self.project)

#Get all scopes within the loaded authority.
scopes = {scope.name: scope.namespace for scope in pyessv.all_scopes()}

#Returns pyessv scope object as project.
return pyessv.load(scopes[project.pop()])

############## PARSE #################""

terms = pyessv.get_terms(path)
term = pyessv.parse(namespace, strictness=4)

############## PARSING "from manifest" for filename, dataset, directory template #################""

terms = {term.collection.name: term for term in pyessv.parse_filename(project.name, filename)}
terms = {term.collection.name: term for term in pyessv.parse_dataset_identifier(project,dataset.identifier)}
terms = {term.collection.name: term for term in pyessv.parse_directory(project.name, str(drs))}

############## BUILDER ??? #################""

identifier = pyessv.build_dataset_identifier(project.name, set(terms.values()))
identifier = pyessv.build_directory_structure(project.name, set(terms.values()))

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

3 participants