Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.1%) to scientific vocabulary
Last synced: 7 months ago
·
JSON representation
·
Repository
Python printer configurations.
Basic Info
- Host: GitHub
- Owner: lewiuberg
- License: mit
- Language: Python
- Default Branch: main
- Size: 183 KB
Statistics
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 7
Created over 4 years ago
· Last pushed about 4 years ago
Metadata Files
Readme
License
Citation
README.ipynb
{
"cells": [
{
"cell_type": "markdown",
"id": "ea090593-83c7-41b7-bccc-aacc8f430eaa",
"metadata": {},
"source": [
""
]
},
{
"cell_type": "markdown",
"id": "aa1a16b6",
"metadata": {
"tags": []
},
"source": [
"# ConfPrint \n",
"[](LICENSE)\n",
"\n",
"[](https://pypi.org/project/confprint/)\n",
"[](https://pepy.tech/project/confprint)\n",
"[](https://app.codecov.io/gh/lewiuberg/confprint)\n",
"\n",
"\n",
"[](https://github.com/lewiuberg/confprint/issues)\n",
"\n",
"\n",
"[](https://github.com/lewiuberg/confprint/actions/workflows/cicd.yml)\n",
"\n",
"Copyright 2021 [Lewi Lie Uberg](https://uberg.me/)\\\n",
"_Released under the MIT license_\n",
"\n",
"**ConfPrint** provides a simple way to make predefined printer configurations.\n",
"\n",
"## Contents \n",
"\n",
"- [Citation](#citation)\n",
" - [APA](#apa)\n",
" - [BibTex](#bibtex)\n",
"- [Prerequisites](#prerequisites)\n",
"- [Installation](#installation)\n",
" - [Using pip](#using-pip)\n",
" - [Using Poetry](#using-poetry)\n",
"- [Usage](#usage)\n",
" - [prefix_printer](#prefix_printer)\n",
"- [Authors](#authors)\n",
"- [License](#license)\n",
"- [Acknowledgments](#acknowledgments)\n",
"\n",
"## Citation\n",
"\n",
"Please see [CITATION.cff](CITATION.cff) for the full citation information.\n",
"\n",
"### APA\n",
"\n",
"```apa\n",
"Lie Uberg, L., & Hjelle, G. A. (2022). confprint (Version 0.4.5) [Computer software]. https://github.com/lewiuberg/confprint\n",
"```\n",
"\n",
"### BibTex\n",
"\n",
"```BibTex\n",
"@software{Lie_Uberg_confprint_2022,\n",
"author = {Lie Uberg, Lewi and Hjelle, Geir Arne},\n",
"license = {MIT},\n",
"month = {10},\n",
"title = {{confprint}},\n",
"url = {https://github.com/lewiuberg/confprint},\n",
"version = {0.4.5},\n",
"year = {2022}\n",
"}\n",
"```\n",
"\n",
"## Prerequisites\n",
"\n",
"[Click](https://pypi.org/project/click/)\n",
"\n",
"Please see [pyproject.toml](pyproject.toml) for the full citation information.\n",
"\n",
"## Installation\n",
"\n",
"### Using pip\n",
"\n",
"```bash\n",
"python -m pip install confprint\n",
"```\n",
"\n",
"### Using Poetry\n",
"\n",
"```bash\n",
"poetry add confprint\n",
"```\n",
"\n",
"## Usage\n",
"\n",
"### prefix_printer"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "e44140be-3e10-46ff-8334-8cb2ceb608dd",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[TEST1]: Please read all the lines to understand the usage.\n",
" \n",
"[TEST2]: use whitespace to indent the output.\n",
" \n",
"[test3]: unaltered text, a.k.a .upper() not applied to the string.\n",
" \n",
"[TEST5]: using click.echo as the print function\n",
" \n",
"( TEST6 ): using custom frame characters\n",
" \n",
"[TEST7:0]: By defining a 'counter_start',\n",
"[TEST7:1]: a counter number will be appended\n",
"[TEST7:2]: to the prefix.\n",
" \n",
"[TEST8:1]: Different prefix printers can have different counters.\n",
"[TEST7:3]: As you see in this example,\n",
"[TEST8:2]: they have do not interfere with each other.\n",
" \n",
"[TEST9:10]: Global counters can also be set.\n",
"[TEST9:11]: However, if any prefix printers has already been defined,\n",
"[TEST8:3]: you have to set global_redefine to True.\n",
"[TEST7:4]: But as you can see here,\n",
"[TEST7:5]: global counters still doesn't interfere with local counters.\n",
" \n",
"[TEST10:12]: New prefix_printers will pick up the last global count, which can\n",
"[TEST10:13]: be handy with different prefixes should be used with sequential counting.\n",
" \n",
"[TEST1]: With new lines in strings the text is converted\n",
" to multiline, then all but the first are\n",
" indented to line up with the rest.\n",
" \n",
"[TEST1]: The next example wil not be ending with a `:`, since it has no input.\n",
" And as you can see, this is also a multiline text.\n",
" \n",
"[DONE]\n",
"\n",
"[BONUS]: variable_name = \"Using a 'f-string' with an added '=' can be handy when debugging.\" \n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"[TEST4]: using sys.stderr.write as the print function\n",
" \n"
]
}
],
"source": [
"from confprint import prefix_printer\n",
"\n",
"p_test1 = prefix_printer(prefix=\"test1\")\n",
"p_test1(\"Please read all the lines to understand the usage.\\n\")\n",
"\n",
"p_test2 = prefix_printer(prefix=\"test2\", whitespace=4)\n",
"p_test2(\"use whitespace to indent the output.\\n\")\n",
"\n",
"p_test3 = prefix_printer(prefix=\"test3\", upper=False)\n",
"p_test3(\"unaltered text, a.k.a .upper() not applied to the string.\\n\")\n",
"\n",
"p_test4 = prefix_printer(prefix=\"test4\", stderr=True)\n",
"p_test4(\"using sys.stderr.write as the print function\\n\")\n",
"\n",
"p_test5 = prefix_printer(prefix=\"test5\", click=True)\n",
"p_test5(\"using click.echo as the print function\\n\")\n",
"\n",
"p_test6 = prefix_printer(prefix=\"test6\", frame_left=\"( \", frame_right=\" )\")\n",
"p_test6(\"using custom frame characters\\n\")\n",
"\n",
"p_test7 = prefix_printer(prefix=\"test7\", counter_start=0)\n",
"p_test7(\"By defining a 'counter_start',\")\n",
"p_test7(\"a counter number will be appended\")\n",
"p_test7(\"to the prefix.\\n\")\n",
"\n",
"p_test8 = prefix_printer(prefix=\"test8\", counter_start=1)\n",
"p_test8(\"Different prefix printers can have different counters.\")\n",
"p_test7(\"As you see in this example,\")\n",
"p_test8(\"they have do not interfere with each other.\\n\")\n",
"\n",
"p_test9 = prefix_printer(prefix=\"test9\", counter_start=10, global_counter=True)\n",
"p_test9(\"Global counters can also be set.\")\n",
"p_test9(\"However, if any prefix printers has already been defined,\")\n",
"p_test8(\"you have to set global_redefine to True.\")\n",
"p_test7(\"But as you can see here,\")\n",
"p_test7(\"global counters still doesn't interfere with local counters.\\n\")\n",
"\n",
"p_test10 = prefix_printer(prefix=\"test10\", global_counter=True)\n",
"p_test10(\"New prefix_printers will pick up the last global count, which can\")\n",
"p_test10(\"be handy with different prefixes should be used with sequential counting.\\n\")\n",
"\n",
"p_test1(\n",
" \"\"\"With new lines in strings the text is converted\n",
"to multiline, then all but the first are\n",
"indented to line up with the rest.\\n\"\"\"\n",
")\n",
"\n",
"p_test1(\n",
" \"The next example wil not be ending with a `:`, \"\n",
" \"since it has no input.\\nAnd as you can see, this is also a multiline text.\\n\"\n",
")\n",
"\n",
"p_done = prefix_printer(prefix=\"done\")\n",
"p_done()\n",
"\n",
"print() # adding a blank line.\n",
"p_bonus = prefix_printer(prefix=\"bonus\")\n",
"variable_name = \"Using a 'f-string' with an added '=' can be handy when debugging.\"\n",
"p_bonus(f\"{variable_name = } \")"
]
},
{
"cell_type": "markdown",
"id": "f41e688a-80e6-4b92-bc67-cb06aed71a8a",
"metadata": {},
"source": [
"```\n",
"[TEST1]: Please read all the lines to understand the usage.\n",
" \n",
"[TEST2]: use whitespace to indent the output.\n",
" \n",
"[test3]: unaltered text, a.k.a .upper() not applied to the string.\n",
" \n",
"[TEST4]: using sys.stderr.write as the print function\n",
" \n",
"[TEST5]: using click.echo as the print function\n",
" \n",
"( TEST6 ): using custom frame characters\n",
" \n",
"[TEST7:0]: By defining a 'counter_start',\n",
"[TEST7:1]: a counter number will be appended\n",
"[TEST7:2]: to the prefix.\n",
" \n",
"[TEST8:1]: Different prefix printers can have different counters.\n",
"[TEST7:3]: As you see in this example,\n",
"[TEST8:2]: they have do not interfere with each other.\n",
" \n",
"[TEST9:10]: Global counters can also be set.\n",
"[TEST9:11]: However, if any prefix printers has already been defined,\n",
"[TEST8:3]: you have to set global_redefine to True.\n",
"[TEST7:4]: But as you can see here,\n",
"[TEST7:5]: global counters still doesn't interfere with local counters.\n",
" \n",
"[TEST10:12]: New prefix_printers will pick up the last global count, which can\n",
"[TEST10:13]: be handy with different prefixes should be used with sequential counting.\n",
" \n",
"[TEST1]: With new lines in strings the text is converted\n",
" to multiline, then all but the first are\n",
" indented to line up with the rest.\n",
" \n",
"[TEST1]: The next example wil not be ending with a `:`, since it has no input.\n",
" And as you can see, this is also a multiline text.\n",
" \n",
"[DONE]\n",
"\n",
"[BONUS]: variable_name = \"Using a 'f-string' with an added '=' can be handy when debugging.\" \n",
"```"
]
},
{
"cell_type": "markdown",
"id": "55457ad4-a900-4e78-86cd-3b0e1ddae9a6",
"metadata": {},
"source": [
"## Authors\n",
"\n",
"- **[Lewi Lie Uberg](https://github.com/lewiuberg)** - [uberg.me](https://uberg.me/)\n",
"\n",
"## License\n",
"\n",
"This project is licensed under the MIT License - see the [LICENSE](https://github.com/lewiuberg/confprint/blob/main/LICENSE) file for details\n",
"\n",
"## Acknowledgments\n",
"\n",
"- [Geir Arne Hjelle](https://github.com/gahjelle), for his presentation on 'Introduction to Decorators' given at [PyCon 21](https://www.youtube.com/watch?v=VWZAh1QrqRE&t=17m0s)"
]
}
],
"metadata": {
"interpreter": {
"hash": "683efc668cabcf7482f8fb4df2464cf2dabd6781d68b5346501ed26e6b3414b9"
},
"jupytext": {
"formats": "ipynb,md"
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Owner
- Name: Lewi Uberg
- Login: lewiuberg
- Kind: user
- Location: Arendal, Norway
- Company: @PuzzelSolutions
- Website: uberg.me
- Repositories: 35
- Profile: https://github.com/lewiuberg
Full-stack Developer at Puzzel AS
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
title: "confprint"
abstract: "Python printer configurations."
authors:
- family-names: "Lie Uberg"
given-names: Lewi
orcid: "https://orcid.org/0000-0001-8839-0960"
- family-names: "Hjelle"
given-names: Geir Arne
version: 0.5.1 # This is automatically set using the bumpversion tool.
date-released: 2021-10-16
repository-code: "https://github.com/lewiuberg/confprint"
license: MIT
keywords:
- "print"
- "printer configurations"
- "prefix"
- "stderr"
GitHub Events
Total
Last Year
Committers
Last synced: about 3 years ago
All Time
- Total Commits: 37
- Total Committers: 2
- Avg Commits per committer: 18.5
- Development Distribution Score (DDS): 0.027
Top Committers
| Name | Commits | |
|---|---|---|
| Lewi Uberg | l****g@i****m | 36 |
| Lewi Uberg | 4****g@u****m | 1 |
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 0
- Total pull requests: 7
- Average time to close issues: N/A
- Average time to close pull requests: 4 minutes
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.86
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- lewiuberg (7)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 55 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 15
- Total maintainers: 1
pypi.org: confprint
Python printer configurations.
- Homepage: https://github.com/lewiuberg/confprint
- Documentation: https://github.com/lewiuberg/confprint/README.md
- License: MIT
-
Latest release: 0.5.1
published about 4 years ago
Rankings
Dependent packages count: 10.0%
Dependent repos count: 21.7%
Average: 23.0%
Stargazers count: 25.0%
Downloads: 28.6%
Forks count: 29.8%
Maintainers (1)
Last synced:
8 months ago
Dependencies
poetry.lock
pypi
- 103 dependencies
pyproject.toml
pypi
- black ^21.9b0 develop
- bump2version ^1.0.1 develop
- debugpy ^1.4.3 develop
- flake8 ^3.9.2 develop
- isort ^5.9.3 develop
- jupyterlab ^3.2.0 develop
- jupytext ^1.13.0 develop
- mypy ^0.910 develop
- peodd ^0.2.2 develop
- pydocstyle ^6.1.1 develop
- pytest ^6.2.5 develop
- pytest-cov ^2.12.1 develop
- pytest-sugar ^0.9.4 develop
- click 7.1.2
- colorama ^0.4.4
- python ^3.8