How to use the pyiron.base.project.generic.Project function in pyiron

To help you get started, we’ve selected a few pyiron examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pyiron / pyiron / tests / atomistics / master / test_murnaghan_non_modal.py View on Github external
def tearDownClass(cls):
        file_location = os.path.dirname(os.path.abspath(__file__))
        project = Project(os.path.join(file_location, 'testing_murnaghan_non_modal'))
        project.remove_jobs(recursive=True)
        project.remove(enable=True, enforce=True)
github pyiron / pyiron / tests / testing / test_exampleAtomisticJob.py View on Github external
def tearDownClass(cls):
        cls.job.interactive_close()
        project = Project(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'random_testing_atomistic'))
        job = project.load(project.get_job_ids()[0])
        job.remove()
        project.remove(enable=True)
github pyiron / pyiron / tests / testing / test_exampleJobLib.py View on Github external
def tearDownClass(cls):
        file_location = os.path.dirname(os.path.abspath(__file__))
        project = Project(os.path.join(file_location, 'random_testing_lib'))
        ham = project.load(project.get_job_ids()[0])
        ham.remove()
        project.remove(enable=True)
github pyiron / pyiron / tests / testing / test_exampleJobLib.py View on Github external
def setUp(self):
        self.count_run_one = 12
        self.count_run_two = 12
        self.file_location = os.path.dirname(os.path.abspath(__file__))
        self.project = Project(os.path.join(self.file_location, 'random_testing_lib'))
        self.ham = self.project.create_job("ExampleJob", "job_test_run")
        self.ham.input['count'] = self.count_run_one
        self.ham.server.run_mode.interactive = True
        self.ham.run()
        self.ham.input['count'] = self.count_run_two
        self.ham.run()
        self.ham.interactive_close()
github pyiron / pyiron / pyiron / base / project / generic.py View on Github external
def copy(self):
        """
        Copy the project object - copying just the Python object but maintaining the same pyiron path

        Returns:
            Project: copy of the project object
        """
        new = Project(path=self.path, user=self.user, sql_query=self.sql_query)
        new._filter = self._filter
        new._inspect_mode = self._inspect_mode
        return new
github pyiron / pyiron / pyiron / base / project / generic.py View on Github external
def copy(self):
        """
        Copy the project object - copying just the Python object but maintaining the same pyiron path

        Returns:
            Project: copy of the project object
        """
        new = Project(path=self.path, user=self.user, sql_query=self.sql_query)
        new._filter = self._filter
        new._inspect_mode = self._inspect_mode
        return new
github pyiron / pyiron / pyiron / base / project / generic.py View on Github external
def __init__(self, path="", user=None, sql_query=None):
        super(Project, self).__init__(path=path)

        self.user = user
        self.sql_query = sql_query
        self._filter = ["groups", "nodes", "objects"]
        self._inspect_mode = False
        self._store = None

        if not s.database_is_disabled:
            s.open_connection()
            self.db = s.database
        else:
            self.db = FileTable(project=path)
        self.job_type = JobTypeChoice()
github pyiron / pyiron / pyiron / base / generic / hdfio.py View on Github external
def _create_project_from_hdf5(self):
        """
        Internal function to create a pyiron project pointing to the directory where the HDF5 file is located.

        Returns:
            Project: pyiron project object
        """
        from pyiron.base.project.generic import Project

        return Project(path=self.file_path)