diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml new file mode 100644 index 0000000..772bb6a --- /dev/null +++ b/.github/workflows/python-app.yml @@ -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 diff --git a/README.md b/README.md index d8910eb..268784b 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/twosigma/memento/__init__.py b/twosigma/memento/__init__.py index ae35b0b..bbdc09e 100644 --- a/twosigma/memento/__init__.py +++ b/twosigma/memento/__init__.py @@ -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()