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

Search Function returns limited Results #133

Closed
michaelweinold opened this issue Sep 19, 2023 · 3 comments
Closed

Search Function returns limited Results #133

michaelweinold opened this issue Sep 19, 2023 · 3 comments

Comments

@michaelweinold
Copy link
Contributor

A search for the bw2data.projects.delete_project() function returns nothing from the API documentation (where I would expect at least one result). All I get is a link to a notebook where I use the function.

Screenshot 2023-09-19 at 12 30 14
@michaelweinold
Copy link
Contributor Author

michaelweinold commented Sep 19, 2023

delete_project() is not a method of bw2data.projects, but is instead defined in:

bw_projects.core.ProjectsManager.delete_project()

bw_projects is currently not captured by the API documentation. In bw2data, the a new class based on the bw_projects.ProjectsManager is instantiated and assigned to the variable projects:

from bw_projects import ProjectsManager

class BW2DataProjectManager(ProjectsManager):
(...)

projects = BW2DataProjectManager()

@tjlca
Copy link

tjlca commented Oct 2, 2023

Search Term: Export project/Share project:

I do not get much meaningful result although the function that is helpful does show up in the search. bw2io.backup

Can it be made easier to understand that the way to share project between users are these functions?

Search Term: Copy database

The search result shows up quite later on the search page. While advanced users might find this easy, one might get confused as to how to use the copy function? Is it db.copy()? So we need to get the db withing a variable. From the page it seems bw2data.backends.base is the module that contains the copy,write,delete functions. Can some of these important functions be provided a page with examples of their own for easy searching? I can think of copy project, delete project, copy database, delete database.

Search Term: copy project

Did not find any meaningful functions. It seems the search is taking copy and project separately. Tried copy+project and search results were extremely limited.

Search term: delete database

Did not find any meaningful functions immediately. I will probably try db.delete() but not sure if it will work. Trying database+delete helped me get this function. https://docs.brightway.dev/en/latest/api/bw2data/backends/base/index.html#bw2data.backends.base.SQLiteBackend.delete

@michaelweinold
Copy link
Contributor Author

The utility of the search function was greatly improved after adding the "cheat sheet" of @ KarinTreyer in #147:
9b389ff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants