Package: semvecpy
semvecpySemvecpy 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 UsersInstallationFor the most recent released version, see runpip install semvecpy, which installs the most recent
deployed package fromhttps://pypi.org/project/semvecpy/For development versions,git clonethe repository, or install usingpip install git+https://github.com/semanticvectors/semvecpy.Imports and UsageImport paths are designed to start withsemvecpyin the hope that this will avoid name clashes from common terms such
asvectors. 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 DevelopersUse Python 3+ throughout.Please don't try to getprint "Hello World"working instead ofprint("Hello World").Dependencies are listed inrequirements.txtand can be installed usingpip install -e ..This goes through thesetup.pyfile to play nice withpip install.Imports should work relative to the project ./semvecpy directory.E.g.,from semvecpy.vectors import vector_utils, rather than justfrom 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 usefrom . import my_modulein 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.pyare 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 thesemvecpyroot directory.Useful Social ConventionsFeel 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 thatpytest .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 NumbersSmall "micro" updates are encouraged, typically using themajor.minor.micropattern as inhttps://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.)