-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
Package Manager Proposal Discussion #119
Comments
Looks pretty good to me. One suggestion: Use Package manager will compare git HEADs and will determine to Install/Update/Remove the extension. |
git has a library for C# but I wasn't able to get it to work in IronPython libgit2sharp |
Also the json file is part of the pyRevit git repo so it gets cloned on the local folder. You might be able to use that instead of pulling from web. |
Agree on head Vs manual version control. What about using something like gitpython in conjunction with git portable? Gui Talarico On Aug 16, 2016 5:11 PM, "Ehsan Iran-Nejad" notifications@github.com
|
Never used gitpython. is it properly maintained? |
Gitpython: Looks like it's active: Either way, I want to wrap the clone/delete into functions, so later we can change method more easily. |
UI test preview. build dynamically from packages JSON + compared data (ie: Installed) |
I like it! I think it's simple and easy to use! Thanks pal! |
Just a quick update It is was also hard to delete package/files when package is removed because git locks some files, but I found a work around. (remove read only first if fails to delete). I have a beta working on my fork under a the manager branch. Missing functionalities before beta release:
|
_Question:_ How did u end up having a repo inside another repo? Isn't the package manager cloning the extension tabs in the root folder? (where git, init, and pyRevit clone exist) |
I am actually just just working out of the latest commit on your master : ) Do you have a branch of the "new structure" you emailed me ? |
Yeah I'll email you a dropbox link. I have it in the private pyRevit master repo but I also have other company tools in there that has made the repo a bit big. I'll be cleaning that up later as the main development repo for pyRevit and will share with you. Till then I'll send you the folders in compressed archives. |
Just Played around with new dev version and modified package manager to work with it. Remote + Local Packages RepoImplemented as following: Remove Tab after removing pacakge
Potential Solution: Hide Tab by Name? Adding Scripts after installing.
Relationship of Pyrevit Core, Pyrevit scripts, and Packages Repos.
Video of latest testshttps://www.dropbox.com/s/p8igh0orprxeo0y/2016-08-23%2019-55-09.flv?dl=0 |
Nah. Revit doesn't return any objects when creating Ribbon Tabs |
@eirannejad Users this packages.json: https://github.com/gtalarico/pyRevit/blob/v3/pyRevit/pyRevit.tab/pkgManager/packages.json |
Looks really good to me! Thanks so much! On 24 August 2016 at 20:40, Gui Talarico notifications@github.com wrote:
|
@eirannejad I made a few revisions to the packages manager and I think it's ready for beta, most importantly, I updated the git commands to the use separate git directories (non-nested) and the correct folder structure. The latest packages is in this branch: I can't do a pull request because the directory structure doesn't match the your master (ie. pyrevit.tab directory), |
I get an error. The portable git is installed in [image: Inline images 2] On 27 August 2016 at 15:04, Gui Talarico notifications@github.com wrote:
|
I belive this was fixed on commit bb53c65 Gui Talarico On Aug 29, 2016 12:41 PM, "Ehsan Iran-Nejad" notifications@github.com
|
@eirannejad I think I figure out why yours was not working |
Gui, And it's working like a charm! Love the way it removes the extension tab being uninstalled. I'll cleanup everything else this weekend and publish v3 for the labour day. Thanks again!! |
Sketch of Package Manager Concept for discussion:
### What does it do
Allows pyrevit users to install/remove/update pyrevit extensions from within revit.
### How it works
1. A Package Index in json format is Stored on PyRevit Repo
2. Package stores (name, version, url, and description).
3. Pulls json from Repo using requests or .net webclient
4. Find pyrevit local dir by package manager script location
5. Check local folders and compare to name of packages in packages.json
6. Determine if remote package is installed, and compare version to local packages
(use version variable insite package's init.py or version.py file instead of opening files and re searching for version for better performance and reliability)
7. Render a Datagrid with action buttons for every row:
Package name, remote version, local version, description, and actions:
Not installed: Install
Installed but not latest: Upgrate + Remove
Installed and latest: Remove
Actions:
* Remove: Delete folder
* On install/Upgrade: Clone remote repo from json: url path into folder 'packagename'
### Implementation Details:
PACKAGES.JSON (stored on pyrevit repo): item # 1/2/3 abovelist:
example:
[
{'name':'pyrevitplus','version':'1.0.0', 'url':'github.com/gtalarico/pyrevitplus, 'description': 'Tools for XXX'},
{'name':'selectiontools', version':'1.0.0', 'url':'github.com/gtalarico/pyrevitplus, 'description': 'etc'},
]
Once packages is read and compared to local folders, a local_packages dictionary is created in memory, adding the following keys:
'installed': True/False,
'local_version': '0.2.0''
local_packages is then used to render datagrid, and add appropriate actions.
Note: If program cannot reach packages.json, TaskDialog warns user, and dialog is closed.
UI:
- Use WPF
- Simple white window, with full-size data-grid as described above
- Future Feature: Add button to manually install package by browsing to .zip file (version 2.0)
The text was updated successfully, but these errors were encountered: