Skip to content

Commit

Permalink
🏗️ Lazy reload upon import (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
falexwolf authored Oct 1, 2024
1 parent 8dc7d90 commit c9c0f25
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ jobs:
- uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
- uses: nwtgck/actions-netlify@v1.2
with:
publish-dir: "_build/html"
production-deploy: ${{ github.event_name == 'push' }}
github-token: ${{ secrets.GITHUB_TOKEN }}
enable-commit-comment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
env:
repo_token: ${{ secrets.GITHUB_TOKEN }}
docs_token: ${{ secrets.LAMIN_BUILD_DOCS }}
changelog_file: PATH_TO_CHANGELOG_FILE
changelog_file: lamin-docs/docs/changelog/soon/usecases.md
8 changes: 3 additions & 5 deletions clinicore/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""A clinicorel schema.
"""A clinical schema.
Import the package::
Expand All @@ -21,11 +21,9 @@
from lamindb_setup import _check_instance_setup


# trigger instance loading if users
# want to access attributes
def __getattr__(name):
if name not in {"models"}:
_check_instance_setup(from_lamindb=True)
if name != "models":
_check_instance_setup(from_module="clinicore")
return globals()[name]


Expand Down
5 changes: 0 additions & 5 deletions lamin-project.yaml

This file was deleted.

0 comments on commit c9c0f25

Please sign in to comment.