personal lib
Project description
personal python lib
legacy python lib see xsthunder/python-lib: useful python pieces of code
code and release
-
code at xsthunder/xs_lib at master
-
merge to releae and travis will deploy to pip
TODO
Features
- Full test with traivis to make sure things are on rail.
xs_lib.ismain.main(__name__, main)
to define entrancexs_lib.common.IN_TRAVIS
andxs_lib.common.IN_JUPYTER
to tell current state, also allow bash env setting totrue
orfalse
to overwrite.xs_lib.common.CLI_TEST
is read from bash env to control cli.
Install and Run
Install via xs-lib · PyPI
pip install xs-lib
Use in Code
use for single ipynb
file
export the ipynb
file
import xs_lib.common as common
# this will choose con tqdm
for i in common.tqdm(range(3)):
print(i)
nbe = common.NBExporter()
nbe('./pdb.ipynb', to='./')
use for projcet
clone xsthunder/jupyter_dev_template
Use in cli
nb2py --help
optional pakage tqdm
conda install tqdm
Usage suggestion
add #test_export
to top of the code cell which will be exported to test and standard file.
add #export
to top ot the code cell which will be exported to standard file.
use Sure 1.4.7 - Documentation — sure 1.4.7 documentation for #test_export
.
Development
Environment Setup
bash ./config/create-env.sh
for conda
deps
- not all deps are necessary. only ipython are set in the
setup.py/deps
. xs_lib.common
supports dynamic import. feel free to import.- to import other modules, please install corresponding deps first or you may come across import error.
- It's recommanded to install all packages listed in create-env.sh
code structures
Ref
Packaging Python Projects — Python Packaging User Guide
notebook2script
from course-v3/nbs/dl2 at master · fastai/course-v3
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
File details
Details for the file xs_lib-0.0.9.tar.gz
.
File metadata
- Download URL: xs_lib-0.0.9.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2034367f735ffb1c2c7135bf3fa91b2482dd29c5e331984c8b80921d3fcabeb |
|
MD5 | e3e72a584b46ef5d0f309cb505df3ffe |
|
BLAKE2b-256 | 3a5ad6f507af99a301a57a3c47c7973e42cf6b54cda277ebda8a807bbfb3db48 |