Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Draft: Initial buildout of lincbrain CLI/Python Client from dandi-cli #2

Merged
merged 8 commits into from
Jan 29, 2024

Conversation

aaronkanzer
Copy link

@aaronkanzer aaronkanzer commented Nov 27, 2023

This PR/branch is being used to clone/transform the dandi-cli into the lincbrain CLI tool.

A couple things:

versioneer is still problematic for lincbrain, therefore, references are commented out.

The publishing process includes:

  1. Bump the value here: Draft: Initial buildout of lincbrain CLI/Python Client from dandi-cli #2 (comment)

  2. Run python setup.py sdist bdist_wheel locally -- this will populate a new build value in your local dist/ folder

  3. Run twine upload dist/lincbrain-<new-semantic-version>*

  4. You'll be prompted for a username and password: for username, use __token__, for password, use a PyPI token issued to you (ask @aaronkanzer for one if you don't have it)

This workflow will change, but should be sufficient for now

@@ -417,7 +417,7 @@ def __init__(
:param str token: User API Key. Note that different instance APIs have
different keys.
"""
check_dandi_version()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check_dandi_version() (and versioneer by extension) still need to be set up correctly -- thus references are commented out for now.

Comment on lines -613 to -616
if our_version < minversion:
raise CliVersionTooOldError(our_version, minversion, bad_versions)
if our_version in bad_versions:
raise BadCliVersionError(our_version, minversion, bad_versions)
Copy link
Author

Choose a reason for hiding this comment

The 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

Comment on lines +28 to +35
# 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 = {}
Copy link
Author

Choose a reason for hiding this comment

The 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

setup.py Outdated

if __name__ == "__main__":
setup(
name="lincbrain",
version="0.1.0",
cmdclass=cmdclass,
version="0.9.0",
Copy link
Author

Choose a reason for hiding this comment

The 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

@kabilar
Copy link
Member

kabilar commented Nov 29, 2023

Hi @aaronkanzer, let's change the term from dandiset to dataset. For example, here:

https://dandiarchive.org/dandiset/ -> https://lincbrain.org/dataset/

@kabilar
Copy link
Member

kabilar commented Nov 29, 2023

Should we change DANDI_API_KEY to LINCBRAIN_API_KEY?

@aaronkanzer aaronkanzer changed the title Initial buildout of lincbrain CLI/Python Client from dandi-cli Draft: Initial buildout of lincbrain CLI/Python Client from dandi-cli Jan 12, 2024
Copy link
Member

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:

logdir = platformdirs.user_log_dir("lincbrain-cli", "lincbrain")

@aaronkanzer aaronkanzer merged commit 9d7c211 into master Jan 29, 2024
0 of 5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants