-
Notifications
You must be signed in to change notification settings - Fork 0
Draft: Initial buildout of lincbrain CLI/Python Client from dandi-cli #2
Changes from 3 commits
85dfd00
80114bc
062cbc5
7eb75fe
61ea2b0
3e3af7a
a1b5be9
9d7c211
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 |
---|---|---|
|
@@ -417,7 +417,7 @@ def __init__( | |
:param str token: User API Key. Note that different instance APIs have | ||
different keys. | ||
""" | ||
check_dandi_version() | ||
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.
|
||
# check_dandi_version() | ||
if api_url is None: | ||
if dandi_instance is None: | ||
instance_name = os.environ.get("DANDI_INSTANCE", "dandi") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -610,10 +610,10 @@ def _get_instance( | |
f" please contact that server's administrators: {e}" | ||
) | ||
our_version = Version(__version__) | ||
if our_version < minversion: | ||
raise CliVersionTooOldError(our_version, minversion, bad_versions) | ||
if our_version in bad_versions: | ||
raise BadCliVersionError(our_version, minversion, bad_versions) | ||
Comment on lines
-613
to
-616
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. Similar to https://github.com/lincbrain/linc-cli/pull/2/files#r1406776675 -- |
||
# if our_version < minversion: | ||
# raise CliVersionTooOldError(our_version, minversion, bad_versions) | ||
# if our_version in bad_versions: | ||
# raise BadCliVersionError(our_version, minversion, bad_versions) | ||
api_url = server_info.services.api.url | ||
if dandi_id is None: | ||
dandi_id = api_url.host | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,22 +25,22 @@ | |
# therein for more information. | ||
sys.path.insert(0, os.path.dirname(__file__)) | ||
|
||
try: | ||
import versioneer | ||
version_config = versioneer.get_version() | ||
cmdclass = versioneer.get_cmdclass() | ||
except ImportError: | ||
print("WARNING: failed to import versioneer, falling back to no version for now") | ||
version_config = "0.1.0" # Fallback version | ||
cmdclass = {} | ||
# try: | ||
# import versioneer | ||
# version_config = versioneer.get_version() | ||
# cmdclass = versioneer.get_cmdclass() | ||
# except ImportError: | ||
# print("WARNING: failed to import versioneer, falling back to no version for now") | ||
# version_config = "0.4.0" # Fallback version | ||
# cmdclass = {} | ||
Comment on lines
+28
to
+35
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. Similar to https://github.com/lincbrain/linc-cli/pull/2/files#r1406776675 -- versioneer needs to be refined |
||
|
||
# Ensure the version is PEP 440 compliant | ||
if '+' in version_config: | ||
version_config = version_config.split('+')[0] | ||
# if '+' in version_config: | ||
# version_config = version_config.split('+')[0] | ||
|
||
if __name__ == "__main__": | ||
setup( | ||
name="lincbrain", | ||
version="0.1.0", | ||
cmdclass=cmdclass, | ||
version="0.9.0", | ||
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. This is the value that is bumped to create a new semantic version in PyPI for now during the build and distribute phases |
||
cmdclass={}, | ||
) |
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.
Please update line 100 to the following: