Skip to content

Commit

Permalink
release v0.2.1 preperation (#212)
Browse files Browse the repository at this point in the history
* bump version

* pass json data

* CI setup

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add coverage

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
PythonFZ and pre-commit-ci[bot] authored Sep 16, 2023
1 parent f1da870 commit 6f6a3d8
Show file tree
Hide file tree
Showing 4 changed files with 189 additions and 3 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: tests

on:
push:
branches: [main]
pull_request:
schedule:
- cron: "14 3 * * 1" # at 03:14 on Monday.

jobs:
pytest:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.11"
- "3.10"
- 3.9
os:
- ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install Poetry
run: |
pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install package
run: |
poetry install --no-interaction
- name: Pytest
run: |
poetry run coverage run -m pytest -vv
poetry run coverage xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
139 changes: 138 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "zndraw"
version = "0.2.0"
version = "0.2.1"
description = ""
authors = ["zincwarecode <[email protected]>"]
license = "Apache-2.0"
Expand All @@ -24,6 +24,8 @@ pandas = "^2.0.3"

[tool.poetry.group.dev.dependencies]
pre-commit = "^3.3.3"
pytest = "^7.4.2"
coverage = "^7.3.1"

[build-system]
requires = ["poetry-core"]
Expand Down
6 changes: 5 additions & 1 deletion zndraw/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ def modifier_run(data):
# modifier = available_methods[data["name"]](**data["params"])
print(f"modifier:run {modifier = }")
atoms_list = modifier.run(
atom_ids=data["selection"], atoms=atoms, points=points, segments=segments
atom_ids=data["selection"],
atoms=atoms,
points=points,
segments=segments,
json_data=data["atoms"] if "atoms" in data else None,
)
io.emit("atoms:clear", int(data["step"]) + 1)
for idx, atoms in tqdm.tqdm(enumerate(atoms_list)):
Expand Down

0 comments on commit 6f6a3d8

Please sign in to comment.