Overarching library for Michiel Cottaar's projects
Project description
The personal utilities and libraries from Michiel Cottaar.
This code contains many different packages which can either be installed separately using pip install mcot.<package> or as one whole pip install mcot.
Command line scripts
Command line scripts are all available through a single executable: mcot . This executable will be installed irrespective of the package you install (it is part of mcot.utils, which is required by all other packages). You can run a specific script using:
mcot $SCRIPTNAME
Many scripts are grouped together, in which case they can be called as:
mcot $GROUP $SCRIPTNAME
To list the installed scripts just type:
mcot
Developer’s notes
All packages are managed as a single monorepo available at https://git.fmrib.ox.ac.uk/ndcn0236/mcot. Testing and packaging is handled through the pants build system https://www.pantsbuild.org/. First make sure to be in the top-level directory and then run the following to test:
./pants test ::
or to build the packages:
./pants package ::
To bump the version number of a package run:
./bump_project.sh <package> <part>
where <part> is one of “major”, “minor”, or “patch”. This will bump the version of both the package and the mcot complete package, which can then be uploaded using twine.
Adding a new package
Create a new directory in “src/mcot”
Add a README.rst and VERSION file with a description and the version number.
Use mcot.utils.build.load_info in __init__.py to import the README and version number
from mcot.utils.build import load_info __doc__, __version__ = load_info(__name__) del load_info
Copy an existing .bumpversion.cfg from another directory and update the current version number
Copy a BUILD script from another package (e.g., mcot.surface) and adjust the contents accordingly
Copy BUILD script to test directory from test directory of another project (e.g., “src/mcot/surface/tests”)
Add package requirements to “requirements.txt”
Add the package to documentation in doc/index.rst
Run the tests for this package
./pants test src/mcot/<package name>/tests/:
Test the package build:
./pants package src/mcot/<package name>:
Build the documentation
python doc/publish.py
Once the package is ready to be uploaded to pypi: add the package to the BUILD script in the top-level directory and to the upload.sh script
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 mcot-0.7.0.tar.gz
.
File metadata
- Download URL: mcot-0.7.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.61.2 importlib-metadata/4.6.1 keyring/23.0.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3428acc7e383d32a5bbceee27b738a9a2d5413d3bf44f819c8e637e74ea79335 |
|
MD5 | 920b51e6cd6371420e4537907b3d8b31 |
|
BLAKE2b-256 | b9c047aaa3690f7ac007adb271da885e3156bc2fb29c44acb26df03cd0a86084 |
File details
Details for the file mcot-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: mcot-0.7.0-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.61.2 importlib-metadata/4.6.1 keyring/23.0.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3dab38a5a523e6a0fd9d5c88f9332b98b46b2391837fa7f1a4c642686fc4c36 |
|
MD5 | 00f9b4bae4d0c41e70bad04d15124ce2 |
|
BLAKE2b-256 | 33d9d0bb251716559faac7f24d9f73f245c77ed39908a2903a4f6fbda6e658ad |