bw2data.project
#
Module Contents#
Classes#
Functions#
|
|
|
Attributes#
- class bw2data.project.ProjectManager[source]#
Bases:
collections.abc.Iterable
- property output_dir[source]#
Get directory for output files.
Uses environment variable
BRIGHTWAY2_OUTPUT_DIR
;preferences['output_dir']
; or directoryoutput
in current project.Returns output directory path.
- _restore_orig_directory()[source]#
Point the ProjectManager back to original directories.
Used exclusively in tests.
- _use_temp_directory()[source]#
Point the ProjectManager towards a temporary directory instead of user_data_dir.
Used exclusively for tests.
- copy_project(new_name, switch=True)[source]#
Copy current project to a new project named
new_name
. Ifswitch
, switch to new project.
- delete_project(name=None, delete_dir=False)[source]#
Delete project
name
, or the current project.name
is the project to delete. Ifname
is not provided, delete the current project.By default, the underlying project directory is not deleted; only the project name is removed from the list of active projects. If
delete_dir
isTrue
, then also delete the project directory.If deleting the current project, this function sets the current directory to
default
if it exists, or to a random project.Returns the current project.
- migrate_project_25()[source]#
Migrate project to Brightway 2.5.
Reprocesses all databases and LCIA objects.
- purge_deleted_directories()[source]#
Delete project directories for projects which are no longer registered.
Returns number of directories deleted.
- report()[source]#
Give a report on current projects, including installed databases and file sizes.
Returns tuples of
(project name, number of databases, size of all databases (GB))
.
- bw2data.project.READ_ONLY_PROJECT = Multiline-String[source]#
Show Value
""" ***Read only project*** This project is being used by another process and no writes can be made until: 1. You close the other program, or switch to a different project, *and* 2. You call `projects.enable_writes` *and* get the response `True`. If you are **sure** that this warning is incorrect, call `projects.enable_writes(force=True)` to enable writes. """