https://github.com/hover2pi/gitfit
Simple tool to split and concatenate large files so they don't exceed Github limit of 100MB
https://github.com/hover2pi/gitfit
Last synced: 8 months ago
JSON representation
Simple tool to split and concatenate large files so they don't exceed Github limit of 100MB
- Host: GitHub
- URL: https://github.com/hover2pi/gitfit
- Owner: hover2pi
- License: gpl-3.0
- Created: 2020-09-28T14:58:29.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-12T15:10:42.000Z (over 5 years ago)
- Last Synced: 2025-09-26T09:11:57.474Z (9 months ago)
- Language: Python
- Size: 32.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gitfit
[](https://travis-ci.org/hover2pi/gitfit)
[](https://coveralls.io/github/hover2pi/gitfit?branch=master)
`gitfit` is a simple Python 3.6+ tool to split and concatenate large FITS files so they don't exceed Github limit of 100MB.
## Installation
To install, you can clone this repo and install manually with
```
git clone https://github.com/hover2pi/gitfit.git
python setup.py gitfit/install
```
or install via `pip` with
```
pip install gitfit
```
## Usage
`gitfit` pulls the data out of large FITS file extensions and saves them in small chunked `.npy` files in a `_data` directory.
To accomplish this, call the `disassemble` function like so:
```
from gitfit import gitfit
file_list = gitfit.disassemble('/path/to/large_fits_file.fits')
```
This will return a list of the files that were created. Then you will be able to commit and push to your Github repo.
To read or reassemble the original file, call the `reassemble` function like so:
```
hdu_list = gitfit.reassemble('/path/to/large_fits_file.fits', save=False)
```
This reads the reassembled FITS file `HDUList` into memory but does not save it to disk so that it can continue to be pushed to Github in the smaller format. If `save` is set to `True`, the original large FITS file will be restored and the `_data` directory will be deleted.