Skip to content
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 setup.py and distribute through pip #1

Open
hanslovsky opened this issue Dec 18, 2018 · 1 comment
Open

Add setup.py and distribute through pip #1

hanslovsky opened this issue Dec 18, 2018 · 1 comment

Comments

@hanslovsky
Copy link

Certain parts of CNNectome can be useful as library and should be distributed as such. Distribution (of the relevant) as a library would make CNNectome reusable and allow for better reproducible builds (i.e. create docker containers or requirements.txt specifying the version of CNNectome to be fetched from PyPI). Also, it would allow for easier separation of scripts from library code. This should be as simple as just adding a setup.py file at the top level and specifying the packages as well as dependencies.

In particular, I am talking about networks/*.py but there might be other parts of CNNectome for which that is true.

The only difficulty would be to introduce another level in the directory tree for more unique imports in python, e.g. change

CNNectome
├── docker_start_scripts
├── multi_scale_aff
│   └── multi_scale_aff
├── networks
│   ├── autoencoder.py
│   ├── custom_fw_unet.py
│   ├── custom_ops.py
│   ├── __init__.py
│   ├── ops2d.py
│   ├── ops3d.py
│   ├── __pycache__
│   ├── scale_net.py
│   ├── strided_autoencoder.py
│   ├── strided_unet.py
│   ├── unet2d.py
│   ├── unet_auto.py
│   ├── unet_class.py
│   └── unet.py
├── training
│   ├── anisotropic
│   └── isotropic
├── utils
└── validation

into

CNNectome
├── CNNectome
│   ├── networks
│   │   ├── autoencoder.py
│   │   ├── custom_fw_unet.py
│   │   ├── custom_ops.py
│   │   ├── __init__.py
│   │   ├── ops2d.py
│   │   ├── ops3d.py
│   │   ├── scale_net.py
│   │   ├── strided_autoencoder.py
│   │   ├── strided_unet.py
│   │   ├── unet2d.py
│   │   ├── unet_auto.py
│   │   ├── unet_class.py
│   │   └── unet.py
├── docker_start_scripts
├── multi_scale_aff
│   └── multi_scale_aff
├── networks
│   ├── anisotropic
│   └── isotropic
├── training
│   ├── anisotropic
│   │   └── log
│   └── isotropic
├── utils
└── validation

(only relevant files shown, only showing changes for networks)

@hanslovsky
Copy link
Author

@neptunes5thmoon have you thought about this? All my other dependencies can be downloaded via pip, which causes much less headache.

hanslovsky added a commit to saalfeldlab/eqip that referenced this issue Feb 16, 2019
Cnnectome cannot be downloaded through pip, instead we need to go through this fragile setup process

cf saalfeldlab/CNNectome#1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant