Skip to content

Commit

Permalink
CI (#9)
Browse files Browse the repository at this point in the history
Enable CI with black linting and ensure Memento works on python 3.8 through 3.12
  • Loading branch information
markroth8 committed Feb 16, 2024
1 parent 9b3536b commit 75c5a63
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:

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

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black hatch
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with black
run: |
black --diff --check -t py311 .
- name: Test with hatch
run: |
hatch run cov
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Memento
# Two Sigma Memento
Memento is a framework and lightweight set of standards that encourage discipline in the way data
is incrementally transformed through code. The goal of Memento is to ensure that data is
reproducible and that accurate provenance is maintained in metadata. The Memento Framework
Expand Down
5 changes: 3 additions & 2 deletions twosigma/memento/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ def _load_plugins():
"""
Dynamically load plugins by importing their modules.
"""
for entry_point in entry_points(group="twosigma.memento.plugin"):
importlib.import_module(entry_point.name)
for entry_point in entry_points():
if "group" in entry_point and entry_point.group == "twosigma.memento.plugin":
importlib.import_module(entry_point.name)


_load_plugins()

0 comments on commit 75c5a63

Please sign in to comment.