-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add constructor manager api #46
base: main
Are you sure you want to change the base?
Changes from all commits
f41c905
2f76bcd
0c20d70
016165b
aca9451
d8b7935
76c66a7
3641dd2
073cc39
c0ccc01
903d242
9fa4de2
4fa4c4b
2a4cbc6
5193ed6
b7e970e
dffe0cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Constructor manager API | ||
|
||
## Requirements | ||
|
||
- qtpy | ||
- constructor-manager-cli (on base environment) | ||
|
||
## Usage | ||
|
||
```python | ||
from constructor_manager_api.api import check_updates | ||
|
||
|
||
def finished(result): | ||
print(result) | ||
|
||
|
||
worker = check_updates(package_name="napari", current_version="0.4.10", channels=[]"conda-forge"]) | ||
worker.finished.connect(finished) | ||
worker.start() | ||
``` | ||
|
||
## Other examples | ||
|
||
```python | ||
import sys | ||
|
||
from qtpy.QtCore import QCoreApplication, QTimer # type: ignore | ||
|
||
from constructor_manager_api.api import open_manager | ||
|
||
|
||
def _finished(res): | ||
print("This is the result", res) | ||
|
||
|
||
if __name__ == "__main__": | ||
app = QCoreApplication([]) | ||
|
||
# Process the event loop | ||
timer = QTimer() | ||
timer.timeout.connect(lambda: None) # type: ignore | ||
timer.start(100) | ||
|
||
worker = check_updates( | ||
"napari", | ||
current_version="0.4.15", | ||
channel="napari", | ||
dev=True, | ||
) | ||
worker = check_updates( | ||
"napari", | ||
build_string="pyside", | ||
plugins_url="https://api.napari-hub.org/plugins", | ||
) | ||
worker = check_version("napari") | ||
worker.finished.connect(_finished) | ||
worker.start() | ||
sys.exit(app.exec_()) | ||
``` | ||
|
||
## License | ||
|
||
Distributed under the terms of the MIT license. is free and open source software |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
[metadata] | ||
name = constructor-manager | ||
version = 0.0.1 | ||
description = Constructor environment and updates manager API | ||
name = constructor-manager-api | ||
version = 0.1.0 | ||
description = TODO | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
url = https://github.com/napari/packaging/constructor-manager | ||
author = napari team | ||
author_email = [email protected] | ||
url = https://github.com/napari/packaging/constructor-manager-api | ||
author = napari | ||
author_email = TODO | ||
license = MIT | ||
license_files = LICENSE | ||
classifiers = | ||
|
@@ -23,11 +23,12 @@ classifiers = | |
Topic :: Scientific/Engineering :: Image Processing | ||
project_urls = | ||
Bug Tracker = https://github.com/napari/packaging/issues | ||
Source Code = https://github.com/napari/packaging/constructor-manager | ||
Source Code = https://github.com/napari/packaging/constructor-manager-api | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should from constructor_manager_api.api import check_updates and I got an error related to the >>> from constructor_manager_api.api import check_updates
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "E:\Acer\Documentos\Quansight\Napari\packaging-otros\gonzalo\packaging\constructor-manager-api\src\constructor_manager_api\api.py", line 10, in <module>
from constructor_manager_api.utils.settings import save_settings
File "E:\Acer\Documentos\Quansight\Napari\packaging-otros\gonzalo\packaging\constructor-manager-api\src\constructor_manager_api\utils\settings.py", line 5, in <module>
import yaml
ModuleNotFoundError: No module named 'yaml' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes you are right! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
|
||
[options] | ||
packages = find: | ||
install_requires = | ||
pyyaml | ||
qtpy | ||
python_requires = >=3.8 | ||
include_package_data = True | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
VERSION_INFO = (0, 1, 0) | ||
__version__ = "0.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess there is not a email to use here, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what email we should use 🤔
@kephale do you have a suggestion ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[email protected] is still the official napari SC email address, this can be reverted.