Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 3 committers (33.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.8%) to scientific vocabulary
Keywords
Repository
SMILE Lab python helper library.
Basic Info
- Host: GitHub
- Owner: uta-smile
- License: gpl-3.0
- Language: Python
- Default Branch: master
- Size: 46.9 KB
Statistics
- Stars: 4
- Watchers: 5
- Forks: 3
- Open Issues: 6
- Releases: 0
Topics
Metadata Files
README.md
smile-python
SMILE Lab python helper library.
Installation
bash
pip install smile
Usage
This library aims to provide a general way to handle logging and command-line parameters. Its usage is described in the following example:
In example.py, we have
```python import smile as sm from smile import flags from smile import logging
flags.DEFINEstring("param", "defaultvalue", "A general flag.")
with flags.Subcommand("echo", dest="action"): flags.DEFINEstring("echotext", "", "The text to be echoed out.")
with flags.Subcommand("echobool", dest="action"): flags.DEFINEbool("justdoit", False, "some help infomation")
FLAGS = flags.FLAGS
def main(): """Print out the FLAGS in the main function.""" logging.info("param = %s", FLAGS.param) if FLAGS.action == "echo": logging.warning(FLAGS.echotext) elif FLAGS.action == "echobool": logging.info("Just do it? %s", "Yes!" if FLAGS.justdo_it else "No :(")
if name == "main": sm.app.run() ```
Then in terminal, use one of the following way to pass new parameters to the variable of param
bash
python example.py --param=new_value echo --echo_text "Hello, SMILE!"
and YESSSSS!, we support:
- subcommands: much like
git commitorgit rm --cached huang.c. - positional arguments: "abc.py" in
git add abc.py
More about logging
The logging module can be used together with flags to filter logs, e.g.,
bash
python example.py --param=new_value echo --echo_text "Hello, SMILE!" --verbosity -1
This will filter out the INFO level logs and only display WARN level or below logs.
For more details, view logging/init.py.
More examples
Please refer to smoke_test.py.
Owner
- Name: uta-smile
- Login: uta-smile
- Kind: organization
- Location: Arlington, Texas
- Repositories: 15
- Profile: https://github.com/uta-smile
GitHub Events
Total
Last Year
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 33
- Total Committers: 3
- Avg Commits per committer: 11.0
- Development Distribution Score (DDS): 0.242
Top Committers
| Name | Commits | |
|---|---|---|
| Zheng Xu | x****1@g****m | 25 |
| Zhongxing Peng | s****l@g****m | 7 |
| shengwa | s****g@m****u | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 14
- Total pull requests: 14
- Average time to close issues: 2 months
- Average time to close pull requests: about 18 hours
- Total issue authors: 5
- Total pull request authors: 3
- Average comments per issue: 1.07
- Average comments per pull request: 0.57
- Merged pull requests: 14
- 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
- XericZephyr (8)
- shengwa (3)
- chaoyan1037 (1)
- ZhongxingPeng (1)
- rayluo (1)
Pull Request Authors
- XericZephyr (11)
- ZhongxingPeng (2)
- shengwa (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 17,954 last-month
- Total dependent packages: 0
- Total dependent repositories: 3
- Total versions: 5
- Total maintainers: 1
pypi.org: smile
smile-python is a modern absl-like python library for SMILE lab.
- Homepage: https://github.com/uta-smile/smile-python/
- Documentation: https://smile.readthedocs.io/
- License: gpl-3.0
-
Latest release: 0.1.0
published about 8 years ago
Rankings
Maintainers (1)
Dependencies
- absl-py *