Skip to content

Commit

Permalink
test: add pytest and ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Jul 19, 2024
1 parent 8cd454f commit e1734c3
Show file tree
Hide file tree
Showing 4 changed files with 311 additions and 156 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,33 @@ on:

jobs:

test:
pytest:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Run
run: |
pytest -v
cli:

runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -42,4 +68,4 @@ jobs:
- name: Run
run: |
pangonet --output-prefix data/pangonet --output-all
pangonet --output-prefix data/pangonet --output-all
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ pango = PangoNet().build()
pango = PangoNet().build(alias_key="alias_key.json", lineage_notes="lineage_notes.txt")
```

Compress and decompress aliases.
Compress and uncompress aliases.

> ❗ See [pango_aliasor](https://github.com/corneliusroemer/pango_aliasor) for a more sophisticated approach to alias compression.

```python
pango.decompress("KP.3.1")
pango.uncompress("KP.3.1")
'B.1.1.529.2.86.1.1.11.1.3.1'

pango.compress('B.1.1.529.2.86.1.1.11')
Expand Down Expand Up @@ -314,7 +314,7 @@ print(pango_filter.to_json(compact=True))
```json
{
"root": {
"decompressed": "",
"uncompressed": "",
"depth": 0,
"parents": "",
"children": "B",
Expand All @@ -323,7 +323,7 @@ print(pango_filter.to_json(compact=True))
},
...
"BA.2.10.1": {
"decompressed": "B.1.1.529.2.10.1",
"uncompressed": "B.1.1.529.2.10.1",
"depth": 7,
"parents": "BA.2.10",
"children": "BJ.1",
Expand All @@ -332,7 +332,7 @@ print(pango_filter.to_json(compact=True))
},
...
"XDB": {
"decompressed": "XDB",
"uncompressed": "XDB",
"depth": 15,
"parents": "XBB.1.16.19, XBB",
"children": "",
Expand Down
Loading

0 comments on commit e1734c3

Please sign in to comment.