Skip to main content

semvecpy

Semvecpy is a repository for Semantic Vectors work in Python (version 3 and above).

It is a research project. It includes some well-tested production-grade work, but it's up to users to be aware of which parts this is.

For External Users

Installation

For the most recent released version, see run pip install semvecpy, which installs the most recent deployed package from https://pypi.org/project/semvecpy/

For development versions, git clone the repository, or install using pip install git+https://github.com/semanticvectors/semvecpy.

Imports and Usage

Import paths are designed to start with semvecpy in the hope that this will avoid name clashes from common terms such as vectors. So after installation, the following should work:

>>> from semvecpy.vectors import vector_utils as vu
>>> vu.normalize([3, 4])
array([0.6, 0.8])

For Internal Developers

  • Use Python 3+ throughout.
    • Please don't try to get print "Hello World" working instead of print("Hello World").
  • Dependencies are listed in requirements.txt and can be installed using pip install -e ..
    • This goes through the setup.py file to play nice with pip install.
  • Imports should work relative to the project ./semvecpy directory.
    • E.g., from semvecpy.vectors import vector_utils, rather than just from vectors import vector_utils.
    • Please don't add deeper dependencies to your PYTHONPATH or set directories as sources roots in an IDE to make import statements shorter, this may break other internal and external developers.
    • It's fine to use from . import my_module in tests, though fully qualified dependencies are encouraged for readability in module source files.
  • Module names are preferred with underscore_separators, but there's no firm rule in place.
  • Tests for module .../dir/foo.py are in .../dir/foo_test.y.
    • This is one of the standard patterns, and it makes it particularly easy to see which modules already have dedicated tests, and whether these files should be moved / renamed if the modules they're testing are renamed.
    • pytest . should run and pass all tests from the semvecpy root directory.

Useful Social Conventions

Feel free to clone, fork, and play with this repository. When it comes to merging code, feel free to submit merge requests, and for frequent contributors, ask the Admins for Maintain permissions. We tend to say yes.

Before sending merge requests, please do check that pytest . runs and passes all tests. Feel free to ask for help if it doesn't.

Since it's a research project, we encourage work-in-progress and experimental code. This does sometimes lead to duplicated functionality, some variation in naming and code styles, etc.

To make things work together, code may be refactored. It's nice to discuss this with original authors, but for small changes, developers with suitable permissions are encouraged to just go ahead. It follows that some changes may be unexpected to some authors. If it's a bother just sync your repository wherever you left off, feel free to fork, and we can discuss how to merge things back together later. Basically DON'T WORRY.

Release and Version Numbers

Small "micro" updates are encouraged, typically using the major.minor.micro pattern as in https://www.python.org/dev/peps/pep-0440/#final-releases.

We're using odd micro numbers for development versions (merged into github), and even numbers for released versions (in PyPi.)

Metadata

Release files for semvecpy 0.1.26

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for semvecpy 0.1.26
File Size Uploaded Provenance Actions
semvecpy-0.1.26.tar.gz 24.4 kB Without provenance Details for semvecpy-0.1.26.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for semvecpy 0.1.26
File Interpreter ABI Platform Actions
semvecpy-0.1.26-py3-none-any.whl Python 3 none any Details for semvecpy-0.1.26-py3-none-any.whl

Total release size: 70.5 kB

Release files / semvecpy-0.1.26.tar.gz

Download URL semvecpy-0.1.26.tar.gz
Size 24.4 kB
Tags Source
SHA-256 checksum
How to use checksums
45daf9bc6ffc67badcb21a0e40ca21e79eff339e404853c5aa7f02504b75e1fd
BLAKE2b-256 checksum
How to use checksums
2881a948a6e44133c999db589365fe7eaca478494dba15cb2f6ac026365daae7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.4

Release files / semvecpy-0.1.26-py3-none-any.whl

Download URL semvecpy-0.1.26-py3-none-any.whl
Size 46.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9116cd8ff45c125b711c20f7a3fa3e0de8caa6add7fe64a46a0c10b00d27d717
BLAKE2b-256 checksum
How to use checksums
90c65af55741c82e436b6d9a1485422144a6d62cfd551de1420842c33d1b1273
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.4

Security for semvecpy 0.1.26

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page