Name | sinfo JSON |
Version |
0.3.4
JSON |
| download |
home_page | https://gitlab.com/joelostblom/sinfo |
Summary | sinfo outputs version information for modules loaded in the current session, Python, and the OS. |
upload_time | 2021-05-06 16:03:07 |
maintainer | |
docs_url | None |
author | Joel Ostblom |
requires_python | >=3.6 |
license | BSD-3 |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# sinfo
**Note the new name**
> The `sinfo` package has changed name and is now called `session_info`
> to become more discoverable and self-explanatory.
> The `sinfo` PyPI package will be kept around to avoid breaking old installs
> and you can downgrade to 0.3.2 if you want to use it without seeing this message.
> For the latest features and bug fixes,
> please install `session_info` instead.
> The usage and defaults also changed slightly,
> so please review the latest README at https://gitlab.com/joelostblom/session_info.
`sinfo` outputs version information for modules loaded in the current session,
Python, the OS, and the CPU. It is designed as a minimum measure to increase
reproducibility and provides similar information as `sessionInfo` in R. The
name is shortened to encourage regular usage through reduced typing =)
## Motivation
`sinfo` is particularly useful when conducting exploratory data analysis in
Jupyter notebooks. Listing the version numbers of all loaded modules after
importing them is a simple way to ensure a minimum level of reproducibility
while requiring little additional effort. This practice is useful both when
revisiting notebooks and when sharing them with colleagues. `sinfo` is meant to
complement more robust practices such as frozen virtual environments,
containers, and binder.
## Installation
`sinfo` can be installed via `pip install sinfo`. It does not depend on a package
manager to find version numbers since it fetches them from the module's version
string. Its only dependency is `stdlib_list`, which is used to distinguish
between standard library and third party modules.
## Usage
```python
import math
import natsort
import numpy
import pandas
from sinfo import sinfo
sinfo()
```
Output:
```
-----
natsort 5.3.3
numpy 1.17.3
pandas 0.25.1
sinfo 0.3.0
-----
Python 3.7.3 | packaged by conda-forge | (default, Dec 6 2019, 08:54:18) [GCC 7.3.0]
Linux-5.4.2-arch1-1-x86_64-with-arch
4 logical CPU cores
-----
Session information updated at 2019-12-14 16:14
```
The default behavior is to only output modules not in the standard library,
which is why the `math` module is omitted above (it can be included by
specifying `std_lib=True`). To include not only the explicitly imported
modules, but also any dependencies they import internally, specify `dependencies=True`.
The notebook output is concealed in `<details>` tags by default to not take up too much visual real estate.
When called from a notebook, `sinfo` writes the module dependencies
to a file called to `<notebook_name>-requirements.txt`, which is compatible with `pip install -r /path/to/requirements.txt`.
See the docstring for complete parameter info.
## Background
`sinfo` started as minor modifications of `py_session`, and as it grew it
became convenient to create a new package. `sinfo` was built with the help of
information provided in stackoverflow answers and existing similar packages,
including
- https://github.com/fbrundu/py_session
- https://github.com/jrjohansson/version_information
- https://stackoverflow.com/a/4858123/2166823
- https://stackoverflow.com/a/40690954/2166823
- https://stackoverflow.com/a/52187331/2166823
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/joelostblom/sinfo",
"name": "sinfo",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "Joel Ostblom",
"author_email": "joel.ostblom@protonmail.com",
"download_url": "https://files.pythonhosted.org/packages/cd/37/3bedd499ae24c765fa2a165f96bb05d86ad0dd40fdf9917adbf80434445a/sinfo-0.3.4.tar.gz",
"platform": "",
"description": "# sinfo\n\n**Note the new name**\n> The `sinfo` package has changed name and is now called `session_info`\n> to become more discoverable and self-explanatory.\n> The `sinfo` PyPI package will be kept around to avoid breaking old installs\n> and you can downgrade to 0.3.2 if you want to use it without seeing this message.\n> For the latest features and bug fixes,\n> please install `session_info` instead.\n> The usage and defaults also changed slightly,\n> so please review the latest README at https://gitlab.com/joelostblom/session_info.\n\n`sinfo` outputs version information for modules loaded in the current session,\nPython, the OS, and the CPU. It is designed as a minimum measure to increase\nreproducibility and provides similar information as `sessionInfo` in R. The\nname is shortened to encourage regular usage through reduced typing =)\n\n## Motivation\n\n`sinfo` is particularly useful when conducting exploratory data analysis in\nJupyter notebooks. Listing the version numbers of all loaded modules after\nimporting them is a simple way to ensure a minimum level of reproducibility\nwhile requiring little additional effort. This practice is useful both when\nrevisiting notebooks and when sharing them with colleagues. `sinfo` is meant to\ncomplement more robust practices such as frozen virtual environments,\ncontainers, and binder.\n\n## Installation\n\n`sinfo` can be installed via `pip install sinfo`. It does not depend on a package\nmanager to find version numbers since it fetches them from the module's version\nstring. Its only dependency is `stdlib_list`, which is used to distinguish\nbetween standard library and third party modules.\n\n## Usage\n\n```python\nimport math\n\nimport natsort\nimport numpy\nimport pandas\nfrom sinfo import sinfo\n\n\nsinfo()\n```\n\n\nOutput:\n\n```\n\n-----\nnatsort 5.3.3\nnumpy 1.17.3\npandas 0.25.1\nsinfo 0.3.0\n-----\nPython 3.7.3 | packaged by conda-forge | (default, Dec 6 2019, 08:54:18) [GCC 7.3.0]\nLinux-5.4.2-arch1-1-x86_64-with-arch\n4 logical CPU cores\n-----\nSession information updated at 2019-12-14 16:14\n```\n\nThe default behavior is to only output modules not in the standard library,\nwhich is why the `math` module is omitted above (it can be included by\nspecifying `std_lib=True`). To include not only the explicitly imported\nmodules, but also any dependencies they import internally, specify `dependencies=True`.\nThe notebook output is concealed in `<details>` tags by default to not take up too much visual real estate.\nWhen called from a notebook, `sinfo` writes the module dependencies\nto a file called to `<notebook_name>-requirements.txt`, which is compatible with `pip install -r /path/to/requirements.txt`.\nSee the docstring for complete parameter info.\n\n## Background\n\n`sinfo` started as minor modifications of `py_session`, and as it grew it\nbecame convenient to create a new package. `sinfo` was built with the help of\ninformation provided in stackoverflow answers and existing similar packages,\nincluding\n\n- https://github.com/fbrundu/py_session\n- https://github.com/jrjohansson/version_information\n- https://stackoverflow.com/a/4858123/2166823\n- https://stackoverflow.com/a/40690954/2166823\n- https://stackoverflow.com/a/52187331/2166823",
"bugtrack_url": null,
"license": "BSD-3",
"summary": "sinfo outputs version information for modules loaded in the current session, Python, and the OS.",
"version": "0.3.4",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cd373bedd499ae24c765fa2a165f96bb05d86ad0dd40fdf9917adbf80434445a",
"md5": "cff8af2927236dd994c26d101523f285",
"sha256": "81ea91c69a875de178e10bada9476d7300a1f712e1823dbd7714f43a10baba4d"
},
"downloads": -1,
"filename": "sinfo-0.3.4.tar.gz",
"has_sig": false,
"md5_digest": "cff8af2927236dd994c26d101523f285",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 24533,
"upload_time": "2021-05-06T16:03:07",
"upload_time_iso_8601": "2021-05-06T16:03:07.306794Z",
"url": "https://files.pythonhosted.org/packages/cd/37/3bedd499ae24c765fa2a165f96bb05d86ad0dd40fdf9917adbf80434445a/sinfo-0.3.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2021-05-06 16:03:07",
"github": false,
"gitlab": true,
"bitbucket": false,
"gitlab_user": "joelostblom",
"gitlab_project": "sinfo",
"lcname": "sinfo"
}