-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from sabotack/multiprocessing
Use multiprocessing for grouping and processing timestamps
- Loading branch information
Showing
11 changed files
with
589 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Python QA | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
black: | ||
runs-on: ubuntu-latest | ||
name: Python QA | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python 3.12 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.12" | ||
|
||
# Cache the installation of Poetry itself, e.g. the next step. This prevents the workflow | ||
# from installing Poetry every time, which can be slow. | ||
- name: cache poetry install | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.local | ||
key: poetry-1.8.2 | ||
|
||
# Install Poetry. | ||
# The key configuration value here is `virtualenvs-in-project: true`: this creates the | ||
# venv as a `.venv` in your testing directory, which allows the next step to easily | ||
# cache it. | ||
- uses: snok/install-poetry@v1.3.4 | ||
with: | ||
version: 1.8.2 | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
|
||
# Cache your dependencies (i.e. all the stuff in your `pyproject.toml`). Note the cache | ||
# key: if you're using multiple Python versions, or multiple OSes, you'd need to include | ||
# them in the cache key. I'm not, so it can be simple and just depend on the poetry.lock. | ||
- name: cache deps | ||
id: cache-deps | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: pydeps-${{ hashFiles('**/poetry.lock') }} | ||
|
||
# Install dependencies. `--no-root` means "install all dependencies but not the project itself" | ||
- run: poetry install --no-interaction --no-root | ||
if: steps.cache-deps.outputs.cache-hit != 'true' | ||
|
||
# Now install _your_ project. | ||
- run: poetry install --no-interaction | ||
|
||
################################################################ | ||
# Now finally run your code quality tools | ||
################################################################ | ||
|
||
- name: Format with black | ||
run: | | ||
poetry run black 'p6' --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
from enum import Enum | ||
|
||
|
||
class CalcType(Enum): | ||
BASELINE = 'baseline' | ||
AVERAGE = 'average' | ||
MAX = 'max' | ||
SQUARED = 'squared' | ||
RATIOS = 'ratios' | ||
|
||
BASELINE = "baseline" | ||
AVERAGE = "average" | ||
MAX = "max" | ||
SQUARED = "squared" | ||
RATIOS = "ratios" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.