Skip to content

Enable people to install this package via pip#41

Merged
eecavanna merged 3 commits intomainfrom
pip_install-able
Jun 13, 2025
Merged

Enable people to install this package via pip#41
eecavanna merged 3 commits intomainfrom
pip_install-able

Conversation

@shreddd
Copy link
Copy Markdown
Contributor

@shreddd shreddd commented Jun 13, 2025

No description provided.

@shreddd shreddd closed this Jun 13, 2025
@shreddd shreddd reopened this Jun 13, 2025
@eecavanna eecavanna changed the title Pip install able Enable people to install this package via pip Jun 13, 2025
@eecavanna eecavanna self-requested a review June 13, 2025 18:33
@eecavanna
Copy link
Copy Markdown
Contributor

eecavanna commented Jun 13, 2025

FYI, regarding testing package installation before merge:

People can use pip to install this package from this branch by running:

$ pip install git+https://github.com/ber-data/bertron-schema.git@pip_install-able

Collecting git+https://github.com/ber-data/bertron-schema.git@pip_install-able
  Cloning https://github.com/ber-data/bertron-schema.git (to revision pip_install-able) to /private/var/folders/4h/xtpf5p4156z0pzs7nsv76k1w0000gp/T/pip-req-build-7ned4577
  Running command git clone --filter=blob:none --quiet https://github.com/ber-data/bertron-schema.git /private/var/folders/4h/xtpf5p4156z0pzs7nsv76k1w0000gp/T/pip-req-build-7ned4577
  Running command git checkout -b pip_install-able --track origin/pip_install-able
  Switched to a new branch 'pip_install-able'
  branch 'pip_install-able' set up to track 'origin/pip_install-able'.
  Resolved https://github.com/ber-data/bertron-schema.git to commit 4fc0a5b78fc3653a4342ed52dfb9280533f8abba
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting linkml>=1.9.2 (from bertron-schema==0.1.0)
(...)
Downloading types_python_dateutil-2.9.0.20250516-py3-none-any.whl (14 kB)
Building wheels for collected packages: bertron-schema
  Building wheel for bertron-schema (pyproject.toml) ... done
  Created wheel for bertron-schema: filename=bertron_schema-0.1.0-py3-none-any.whl size=8664 sha256=5e7f2da93b9f16ab498b920f5d442707c5fabf2354b8a40beed6e131ca76dbc8
  Stored in directory: /private/var/folders/4h/xtpf5p4156z0pzs7nsv76k1w0000gp/T/pip-ephem-wheel-cache-zztdyovv/wheels/a8/a2/87/355a6f96f78a31bc8941413697cdabd7fc01ffc0f53306885e
Successfully built bertron-schema
Installing collected packages: sortedcontainers, (...), linkml, bertron-schema
Successfully installed MarkupSafe-3.0.2 (...) bertron-schema-0.1.0 (...)

Note: I replaced some unrelated output with (...).

@eecavanna eecavanna linked an issue Jun 13, 2025 that may be closed by this pull request
@eecavanna
Copy link
Copy Markdown
Contributor

Hi @shreddd, I'll go ahead and merge this in now, as (a) I have reviewed it, (b) it is plumbing-specific and does not affect how anything is modeled, and (c) it not being merged is blocking full completion of ber-data/bertron#56.

@eecavanna eecavanna merged commit d9ea00e into main Jun 13, 2025
1 check passed
@eecavanna eecavanna deleted the pip_install-able branch June 13, 2025 20:46
@eecavanna
Copy link
Copy Markdown
Contributor

eecavanna commented Jun 13, 2025

After merging this branch into main, I confirmed I could install the package via:

pip install git+https://github.com/ber-data/bertron-schema.git

I confirmed it's installed.

$ pip show bertron-schema
Name: bertron-schema
Version: 0.1.0
Summary: LinkML schema for BER data integration work
Home-page:
Author:
Author-email:
License:
Location: /private/tmp/venv1/lib/python3.12/site-packages
Requires: linkml, linkml-runtime, mkdocs-material, mkdocs-mermaid2-plugin
Required-by:

I haven't tried importing its contents in a Python context yet, though.

I have not been able to import a bertron_schema package in Python, though. I don't know whether that's the correct package name.

$ which python
/private/tmp/venv1/bin/python

$ python -i
Python 3.12.9 | packaged by conda-forge | (main, Mar  4 2025, 22:44:42) [Clang 18.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import bertron_schema
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'bertron_schema'
>>>

Update: I filed a new ticket about this, here: #42


Update: The fix is to import it this way: import schema.datamodel.bertron_schema_pydantic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the repo pip installable

2 participants