https://github.com/fermi-ad/drf-generator
Science Score: 8.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
-
○Academic email domains
-
✓Institutional organization owner
Organization fermi-ad has institutional domain (ad.fnal.gov) -
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.5%) to scientific vocabulary
Keywords
Repository
Basic Info
Statistics
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 3
- Releases: 0
Topics
Metadata Files
README.md
DRF Generator
The DRF generator defines a syntax for expressing many DRF strings in a single string.
The syntax is inspired by Unix (bash) glob syntax, but not an exact match as glob is meant to file paths.
Note: For all uses of make in the instructions, py-make is a good option for Windows users.
Installation
bash
pip install --user --extra-index-url https://www-bd.fnal.gov/pip3 drf_generator
Features
List
Curly brackets surrounding comma separated values define a list of strings to be included with each generated DRF string.
For example:
bash
python drf_generator "{I,R}:VT001"
Generates:
text
I:VT001
R:VT001
Range
Curly brackets surrounding two values separated by a double dot (..) define a range of integers to be included with each generated DRF string.
For example:
bash
python drf_generator "I:VT{000..002}"
Generates:
text
I:VT000
I:VT001
I:VT002
Examples
CLI
bash
python drf_generator "I:VT{001..009}"
Package
Generate
```python
!/usr/bin/env python3
-- coding: utf-8 --
from drf_generator.generator import generate
def main(extendeddrfs): return generate(extendeddrfs)
if name == 'main': print(main(sys.argv[1:]))
```
Verify
```python
!/usr/bin/env python3
-- coding: utf-8 --
from drf_generator.generator import verify
def main(extendeddrfs): return verify('testfile.txt', extended_drfs)
if name == 'main': print(main(sys.argv[1:]))
```
Building tarball
Make sure setup.py has the correct version number.
bash
make
will create drf_generator.tgz.
Deploying
This needs to be copied to the web server. Until this is automated, I'm copying it with the command
bash
scp drf_generator.tgz chablis:/usr/local/www/data/pip3/drf-generator/drf_generator-VID.tgz
Replace VID with the current version number in setup.py. Make sure to tag the project, too.
bash
git tag vVID
Development
To test local modifications, use pip's editable mode.
pip install -e .
Unit Tests
To run unit tests under test folder:
bash
make test
You can run the complete test set versus all compatible Python versions using:
bash
make test_full
Generate coverage report
bash
make coverage
Project structure
See the inspiration for our structure and testing process here:
https://github.com/mCodingLLC/SlapThatLikeButton-TestingStarterProject
Thanks to @mCodingLLC for such an excellent introduction to a confusing world!
Owner
- Name: Fermilab Accelerator Directorate
- Login: fermi-ad
- Kind: organization
- Location: United States of America
- Website: https://ad.fnal.gov/
- Repositories: 1
- Profile: https://github.com/fermi-ad
Fermilab Accelerator Systems
GitHub Events
Total
Last Year
Dependencies
- flake8 * development
- mypy * development
- pytest * development
- pytest-cov * development
- tox * development