Skip to main content

Python routines dealing with Neuropixels data.

Project description

routines


Formal Definition of a "routine" -> a python function with the following properties:

  • short memorable name
  • computes a commonly used Variable from a raw dataset directory.
  • when called, looks for the Variable in dir/routinesMemory where dir is the directory of the dataset. If not found, the routine saves the variable after having computed it.

Python version has to be >=3.7 ot there will be imports issues!

Useful link to create a python package from a git repository In particular, to upload

Installation:

Using a conda environment is very much advised. Instructions here: manage conda environments

  • from a local repository (recommended if plans to work on it/regularly pull upgrades)
$ conda activate env_name
$ cd path/to/save_dir # any directory where your code will be accessible by your editor and safe. NOT downloads folder.
$ git clone https://github.com/Npix-routines/NeuroPyxels
$ cd NeuroPyxels
$ python setup.py develop # this will create an egg link to save_dir, which means that you do not need to reinstall the package each time you pull an udpate from github.

  • from the remote repository (recommended for easy passive install)
$ conda activate env_name
$ pip install git+https://github.com/Npix-routines/NeuroPyxels@master

  • Now test that the installation works. If it doesn't, figure out which packages are missing from the error log.
$ conda activate env_name
$ python
>>> import npix # NO ERROR OMG THIS PACKAGE IS SO AWESOME

Pull remote updates (after Maxime's updates :)):

$ conda activate env_name
$ cd path/to/save_dir/NeuroPyxels
$ git pull
# And that's it, thanks to the egg link no need to reinstall the package!

Push local updates:

# DO NOT DO THAT WITHOUT CHECKING WITH MAXIME FIRST
# ONLY ON DEDICATED BRANCH CREATED WITH THE GITHUB BROWSER INTERFACE

$ cd path/to/save_dir/NeuroPyxels
$ git checkout DEDICATED_BRANCH_NAME # ++++++ IMPORTANT
$ git add.
$ git commit -m "commit details - try to be specific"
$ git push origin DEDICATED_BRANCH_NAME # ++++++ IMPORTANT

# Then pull request to master branch using the online github green button! Do not forget this last step, to allow the others repo to sync.

Push local updates to PyPI (only Maxime)

First change the version in ./setup.py in a text editor

setup(name='npyx',
      version='1.0',... # change to 1.1 or whatev

Then re-generate the distribution files for the new version using twine:

python setup.py sdist bdist_wheel # this will generate version 1.1 wheel without overwriting version 1.0 wheel in ./dist

Before pushing them to PyPI (it will keep track of older versions!)

$ twine upload dist/*
Uploading distributions to https://upload.pypi.org/legacy/
Enter your username: your-username
Enter your password: 
Uploading npyx-1.0-py3-none-any.whl
100%|█████████████████████████████████████████████████████████| 156k/156k [00:01<00:00, 154kB/s]
Uploading npyx-1.1-py3-none-any.whl
100%|████████████████████████████████████████████████████████| 156k/156k [00:01<00:00, 96.8kB/s]
Uploading npyx-1.0.tar.gz
100%|█████████████████████████████████████████████████████████| 149k/149k [00:00<00:00, 169kB/s]
Uploading npyx-1.1.tar.gz
100%|█████████████████████████████████████████████████████████| 150k/150k [00:01<00:00, 142kB/s]

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

npyx-1.2.tar.gz (148.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

npyx-1.2-py3-none-any.whl (152.6 kB view details)

Uploaded Python 3

File details

Details for the file npyx-1.2.tar.gz.

File metadata

  • Download URL: npyx-1.2.tar.gz
  • Upload date:
  • Size: 148.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for npyx-1.2.tar.gz
Algorithm Hash digest
SHA256 0393bbfe76fb6133ce6a9474f617bf5d034a2c86dd2d9a9edcbed3a7b9d6c21d
MD5 647c93981db4ea86a72ffda28c88c5b9
BLAKE2b-256 b80ed4023b7d03e60029a2b14ceb09de80649b6b9b5c3071aad2f4c95a473761

See more details on using hashes here.

File details

Details for the file npyx-1.2-py3-none-any.whl.

File metadata

  • Download URL: npyx-1.2-py3-none-any.whl
  • Upload date:
  • Size: 152.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for npyx-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 204e63fe976260761475ac6bd952b7cfda6eb09a34b430d4e0829a40655219b3
MD5 deb0a2b6ebb69cd066a13c3078f73174
BLAKE2b-256 331791a8124e5109c781434407f858c058b7d655937294671727c17b9889a5c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page