A tool for reproducible scientific computing
Project description
Import the logging library.
import repsci
Create an experiment. A unique directory will be created with the experiment name, a timestamp, and the current git hash.
exp_name = "hello_world"
exp = repsci.Experiment(exp_name)
Get the logger and write a log message.
log = exp.get_logger()
log.debug("Hello, World!")
Create an output file in the unique output directory.
filename = exp.get_filename('output.csv')
with open(filename, "wb") as f:
f.write("Hello, World\n")
The state of python's random number generator is stored in random_state.bin
in pickle format. This state can be used to reproduce the output of randomized
scripts.
The Experiment constructor also has some optional parameters:
config: a configparser object, which will exported to the output directory.output_dir: the subdirectory of the current directory to place experiment directories in.suffix: a string to append to the end of the trial's directory.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file repsci-elplatt-1.1.1.tar.gz.
File metadata
- Download URL: repsci-elplatt-1.1.1.tar.gz
- Upload date:
- Size: 1.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72bafdee6eeff64f118eacbd2573f888ef4919b8d34e4782e6d7916be0071042
|
|
| MD5 |
31550188b88cb10c405347cce152f261
|
|
| BLAKE2b-256 |
f877dfdc065f0ee62a1e37795704870dac4d562e94b5e92d15dc32cf2e3addda
|
File details
Details for the file repsci_elplatt-1.1.1-py3-none-any.whl.
File metadata
- Download URL: repsci_elplatt-1.1.1-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26ebade73ca3bae412a9b408cf5ea5b8bc881af4e4cd6ddbea8805f5d12573df
|
|
| MD5 |
5f2e7c0f281c0935d2d7d17dbc445940
|
|
| BLAKE2b-256 |
0eff26c020776e868cd9f02c6dfc2a8921d63103dd505dcfc890e3f99d9407a3
|