An all-in-one toolkit package to easy my Python work in my PhD.
Project description
pyhdtoolkit
♻️ An all-in-one package for Python work in my PhD
Installation
This code is compatible with Python 3.6+
.
If for some reason you have a need for it, create & activate a virtual enrivonment, then install with pip:
> pip install pyhdtoolkit
This repository respects the PEP 518 development and build recommandations, and Poetry as a tool to do so. If you intend on making changes, clone this repository through VCS and set yourself up with:
> git clone https://github.com/fsoubelet/PyhDToolkit.git
> cd PyhDToolkit
> poetry install
Standards, Testing, Tools and VCS
This repository follows the Google
docstring format, uses Black as a code formatter with a default enforced line length of 100 characters, and Pylint as a linter.
You can format the code with make format
and lint it (which will format first) with make lint
.
Testing builds are ensured after each commit through Travis-CI.
You can run tests locally with the predefined make tests
, or through poetry run pytest <options>
for customized options.
VCS is done through git and follows the Gitflow workflow.
As a consequence, make sure to always install from master
.
Miscellaneous
Feel free to explore the Makefile
for sensible defaults commands.
You will get an idea of what functionality is available by running make help
.
Python Environment
This repository currently comes with an environment.yml
file to reproduce my work conda
environment.
You can install this environment and add it to your ipython kernel by running make condaenv
.
Container
You can directly pull a pre-built image - tag latest
is an automated build - from Dockerhub
with:
> docker pull fsoubelet/simenv
You can then run the container in interactive mode, and make use of the already activated conda
environment.
It is highly advised to run with --init
for zombie processes protection (see Tini for details).
Assuming you pulled the provided image from Dockerhub, the command is then (remove the --rm
flag if you wish to preserve it after running):
> docker run -it --rm --init fsoubelet/simenv
If you want to do some exploration through jupyter
you will need to install it first as it is not bundled in the image, then add the custom environment kernelspec.
Run the following command before heading over to localhost:8888
:
> docker run -it --rm --init -p 8888:8888 fsoubelet/simenv /bin/bash -c "/opt/conda/bin/conda install -c conda-forge jupyterlab -y --quiet > /dev/null && mkdir /opt/notebooks && /opt/conda/envs/PHD/bin/ipython kernel install --user --name=PHD && /opt/conda/bin/jupyter lab --notebook-dir=/opt/notebooks --ip='*' --port=8888 --no-browser --allow-root"
License
Copyright © 2019-2020 Felix Soubelet. MIT License
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
Built Distribution
File details
Details for the file pyhdtoolkit-0.4.1.tar.gz
.
File metadata
- Download URL: pyhdtoolkit-0.4.1.tar.gz
- Upload date:
- Size: 45.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.7.6 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 323b829140b55f28f7e89ac1fa8ff48e68343cc5661b7678c32268e19ddb661f |
|
MD5 | 9502f9d9c257e6cec199ee96e8abfcf3 |
|
BLAKE2b-256 | 00467c2291155b4a8e0c280b40c528915d518280ab063fc9f661379ae9cbfa44 |
File details
Details for the file pyhdtoolkit-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: pyhdtoolkit-0.4.1-py3-none-any.whl
- Upload date:
- Size: 52.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.7.6 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f8cfaea6c9e3187b98a5f4654ccdbe6475a85b4ae2d25f480a8d12ae18b2a9f |
|
MD5 | 0e271845b5bb9a924d2761a681221a00 |
|
BLAKE2b-256 | 21d9f73687f1bf98f1ed48d6fc7586f6399ea0661f95767216eb36a0a0bbc135 |