From cc65449214ee5ef15542655337fedbf55eca8884 Mon Sep 17 00:00:00 2001 From: DailyDreaming Date: Tue, 7 Nov 2023 11:49:50 -0800 Subject: [PATCH 1/7] Reduce the number of extras. --- pyproject.toml | 62 +++++++++++++++++++------------------------------- 1 file changed, 24 insertions(+), 38 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 72cf3f9..f8f8ed6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,8 +5,11 @@ build-backend = "hatchling.build" [project] name = "braingeneers" -authors = [ - { name = "Braingeneers", email = "me@example.com" }, +authors = ["UCSC Braingeneers"] +maintainers = [ + { name = "David", email = "dfparks@ucsc.edu" }, + { name = "Alex", email = "atspaeth@ucsc.edu" }, + { name = "Lon", email = "lblauvel@ucsc.edu" }, ] description = "Braingeneers Python utilities" readme = "README.md" @@ -27,12 +30,23 @@ classifiers = [ ] dynamic = ["version"] dependencies = [ - "typing_extensions >=4.6; python_version<'3.11'", - 'deprecated', - 'requests', - 'numpy', - 'tenacity', - 'boto3', + 'awswrangler==3.*', + 'boto3', + 'braingeneers-smart-open==2023.10.6', + 'deprecated', + 'h5py', + 'matplotlib', + 'nptyping', + 'numpy', + 'paho-mqtt', + 'pandas', + 'powerlaw', + 'redis', + 'requests', + 'schedule', + 'scipy>=1.10.0', + 'tenacity', + "typing_extensions >=4.6; python_version<'3.11'" ] [tool.hatch.build.hooks.vcs] @@ -43,35 +57,9 @@ local_scheme = "no-local-version" [project.optional-dependencies] all = [ - 'braingeneers[data]', - 'braingeneers[analysis]', 'braingeneers[ml]', - 'braingeneers[iot]', 'braingeneers[hengenlab]', - 'braingeneers[test]', - 'braingeneers[docs]', -] -data = [ - 'h5py', - 'braingeneers-smart-open==2023.10.6', # 'smart_open>=5.1.0', the hash version fixes the bytes from-to range header issue. - 'awswrangler==3.*', - 'pandas', - 'nptyping', - 'paho-mqtt' -] -iot = [ - 'redis', - 'schedule', - 'paho-mqtt' -] -analysis = [ - 'scipy>=1.10.0', - 'pandas', - 'powerlaw', - 'matplotlib', - # Both of these dependencies are required for read_phy_files - 'awswrangler==3.*', - 'braingeneers-smart-open==2023.10.6', # 'smart_open>=5.1.0', the hash version fixes the bytes from-to range header issue. + 'braingeneers[dev]', ] ml = [ 'torch', @@ -80,11 +68,9 @@ ml = [ hengenlab = [ 'neuraltoolkit==0.3.1', # channel mapping information ] -test = [ +dev = [ "pytest >=6", "pytest-cov >=3", -] -docs = [ "sphinx>=4.0", "myst_parser>=0.13", "sphinx_book_theme>=0.1.0", From ff1494420ea0896412b4527916ea397664dda549 Mon Sep 17 00:00:00 2001 From: DailyDreaming Date: Tue, 7 Nov 2023 12:07:48 -0800 Subject: [PATCH 2/7] Update author. --- pyproject.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f8f8ed6..12bb5e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,9 @@ build-backend = "hatchling.build" [project] name = "braingeneers" -authors = ["UCSC Braingeneers"] +authors = [ + { name = "UCSC Braingeneers", email = "ucscgi@ucsc.edu" }, +] maintainers = [ { name = "David", email = "dfparks@ucsc.edu" }, { name = "Alex", email = "atspaeth@ucsc.edu" }, @@ -46,7 +48,7 @@ dependencies = [ 'schedule', 'scipy>=1.10.0', 'tenacity', - "typing_extensions >=4.6; python_version<'3.11'" + "typing_extensions>=4.6; python_version<3.11" ] [tool.hatch.build.hooks.vcs] From 78ca96ea682326beb0b6c1bd7e30c952d409c1d0 Mon Sep 17 00:00:00 2001 From: DailyDreaming Date: Tue, 7 Nov 2023 12:14:27 -0800 Subject: [PATCH 3/7] Update docs. --- .readthedocs.yaml | 2 +- README.md | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 551f036..fc29d96 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -15,4 +15,4 @@ python: - method: pip path: . extra_requirements: - - docs + - dev diff --git a/README.md b/README.md index f11bafe..38fb8d8 100644 --- a/README.md +++ b/README.md @@ -39,10 +39,22 @@ pip install --force-reinstall git+https://github.com/braingeneers/braingeneerspy You can install `braingeneerspy` with specific optional dependencies based on your needs. Use the following command examples: -- Install with IoT, analysis, and data access functions (skips machine learning and lab-specific dependencies): +- Install with machine-learning dependencies: ```bash -pip install "braingeneers[iot,analysis,data]" +pip install "braingeneers[ml]" +``` + +- Install with Hengen lab dependencies: + +```bash +pip install "braingeneers[ml]" +``` + +- Install with developer dependencies (running tests and building sphinx docs): + +```bash +pip install "braingeneers[dev]" ``` - Install with all optional dependencies: From 852b9cfc520e6198768d23e7d1cd23ad6269b48b Mon Sep 17 00:00:00 2001 From: DailyDreaming Date: Tue, 7 Nov 2023 12:15:20 -0800 Subject: [PATCH 4/7] Typo. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 38fb8d8..7dc7fa2 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ pip install "braingeneers[ml]" - Install with Hengen lab dependencies: ```bash -pip install "braingeneers[ml]" +pip install "braingeneers[hengenlab]" ``` - Install with developer dependencies (running tests and building sphinx docs): From 18048a84f1f49914329cb685d66034f007fc55f5 Mon Sep 17 00:00:00 2001 From: DailyDreaming Date: Tue, 7 Nov 2023 12:18:20 -0800 Subject: [PATCH 5/7] Dependencies. --- .github/workflows/ci.yml | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7fb802c..dd37722 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11"] # add this back later: , "3.12" runs-on: [ubuntu-latest, macos-latest, windows-latest] experimental: [false, false, true] @@ -39,7 +39,7 @@ jobs: allow-prereleases: true - name: Install package - run: python -m pip install .[test] + run: python -m pip install .[dev] - name: Test package run: >- diff --git a/pyproject.toml b/pyproject.toml index 12bb5e6..3a67133 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ dependencies = [ 'schedule', 'scipy>=1.10.0', 'tenacity', - "typing_extensions>=4.6; python_version<3.11" + "typing_extensions>=4.6; python_version<'3.11'" ] [tool.hatch.build.hooks.vcs] From 86f55b6502313dc648b4ab2ffee2b56022649b60 Mon Sep 17 00:00:00 2001 From: Alex Spaeth Date: Thu, 30 Nov 2023 01:44:34 -0800 Subject: [PATCH 6/7] Move new deps from configure.py to pyproject.toml (#55) The new dependencies added by cc88906 were in the old location, `braingeneers.utils.configure.DEPENDENCIES`, so I wasn't able to load any IOT functionality. Add those dependencies to the correct place in `pyproject.toml`, and completely remove the confusing and redundant `DEPENDENCIES` variable. --- pyproject.toml | 4 ++- src/braingeneers/utils/configure.py | 54 ----------------------------- 2 files changed, 3 insertions(+), 55 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3a67133..114dc64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,9 @@ dependencies = [ 'schedule', 'scipy>=1.10.0', 'tenacity', - "typing_extensions>=4.6; python_version<'3.11'" + "typing_extensions>=4.6; python_version<'3.11'", + 'diskcache', + 'pytz' ] [tool.hatch.build.hooks.vcs] diff --git a/src/braingeneers/utils/configure.py b/src/braingeneers/utils/configure.py index 4bab37a..67607cc 100644 --- a/src/braingeneers/utils/configure.py +++ b/src/braingeneers/utils/configure.py @@ -13,60 +13,6 @@ CURRENT_ENDPOINT = None _open = None # a reference to the current smart_open function that is configured this should not be used directly -""" -Define all groups of dependencies here. `minimal` dependencies are always installed with -the braingeneerspy package, all other groups of dependencies will be installed -braingeneerspy[all] or braingeneerspy[specific_dependency_group] -Maintainers are encouraged to move dependencies to specific dependency groups and keep -`minimal` as small as possible. `minimal` would typically be used in a RaspberryPI -environment for example, where large dependencies can be very slow to build. -""" -DEPENDENCIES = { - # Minimal dependencies are always installed with a pip install of the repo - 'minimal': [ - 'deprecated', - 'requests', - 'numpy', - 'tenacity', - # 'sortedcontainers', - 'boto3', - 'joblib>=1.3.0,<2', - 'braingeneers_smart_open', # 'smart_open>=5.1.0', the hash version fixes the bytes from-to range header issue. - 'awswrangler==3.*', - ], - 'data': [ - 'h5py', - 'pandas', - 'nptyping', - 'paho-mqtt', - ], - # Specific dependency groups allow unnecessary (and often large) dependencies to be skipped - # add dependency groups here, changes will be dynamically added to setup(...) - 'iot': [ - # 'awsiotsdk==1.6.0', # dependency issues occur when the current version is installed, that may be resolvable - 'redis', - 'schedule', - 'paho-mqtt', - 'diskcache', - 'pytz', - 'tzlocal', - ], - 'analysis': [ - 'scipy>=1.10.0', - 'pandas', - 'powerlaw', - 'matplotlib', - ], - 'ml': [ - 'torch', - 'scikit-learn', - ], - 'hengenlab': [ - 'neuraltoolkit @ git+https://github.com/hengenlab/neuraltoolkit.git', # channel mapping information - ], -} - - def get_default_endpoint() -> str: """ Returns the current default (S3) endpoint. By default this will point to the standard From c758b475ae935136d73f261bac8abd1650189263 Mon Sep 17 00:00:00 2001 From: Cordero Core <127983572+uwcdc@users.noreply.github.com> Date: Wed, 6 Dec 2023 15:34:59 -0800 Subject: [PATCH 7/7] Update README.md (#57) Update CONTRIBUTING.md URL --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7dc7fa2..d6d494d 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ pip install "braingeneers[all]" ## Committing Changes to the Repo -To make changes and publish them on GitHub, please refer to the [CONTRIBUTING.md](https://github.com/braingeneers/braingeneerspy/blob/development/.github/CONTRIBUTING.md) file for up-to-date guidelines. +To make changes and publish them on GitHub, please refer to the [CONTRIBUTING.md](https://github.com/braingeneers/braingeneerspy/blob/master/.github/CONTRIBUTING.md) file for up-to-date guidelines. ## Modules and Subpackages