socialvec 0.1.7__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {socialvec-0.1.7 → socialvec-0.2.0}/AUTHORS.rst +13 -13
- {socialvec-0.1.7 → socialvec-0.2.0}/CONTRIBUTING.rst +131 -128
- socialvec-0.2.0/HISTORY.rst +95 -0
- {socialvec-0.1.7 → socialvec-0.2.0}/LICENSE +22 -22
- {socialvec-0.1.7 → socialvec-0.2.0}/MANIFEST.in +13 -16
- socialvec-0.2.0/PKG-INFO +275 -0
- socialvec-0.2.0/README.md +218 -0
- {socialvec-0.1.7 → socialvec-0.2.0}/docs/Makefile +20 -20
- {socialvec-0.1.7 → socialvec-0.2.0}/docs/authors.rst +1 -1
- {socialvec-0.1.7 → socialvec-0.2.0}/docs/conf.py +165 -162
- {socialvec-0.1.7 → socialvec-0.2.0}/docs/contributing.rst +1 -1
- {socialvec-0.1.7 → socialvec-0.2.0}/docs/history.rst +1 -1
- {socialvec-0.1.7 → socialvec-0.2.0}/docs/index.rst +20 -20
- {socialvec-0.1.7 → socialvec-0.2.0}/docs/installation.rst +68 -51
- {socialvec-0.1.7 → socialvec-0.2.0}/docs/make.bat +36 -36
- socialvec-0.2.0/docs/modules.rst +7 -0
- socialvec-0.2.0/docs/readme.rst +2 -0
- socialvec-0.2.0/docs/socialvec.rst +45 -0
- socialvec-0.2.0/docs/usage.rst +25 -0
- socialvec-0.2.0/pyproject.toml +3 -0
- {socialvec-0.1.7 → socialvec-0.2.0}/setup.cfg +20 -24
- socialvec-0.2.0/setup.py +75 -0
- {socialvec-0.1.7 → socialvec-0.2.0}/socialvec/__init__.py +5 -5
- socialvec-0.2.0/socialvec/_download.py +140 -0
- socialvec-0.2.0/socialvec/api.py +279 -0
- socialvec-0.2.0/socialvec/cli.py +88 -0
- {socialvec-0.1.7 → socialvec-0.2.0}/socialvec/config.yaml +47 -43
- socialvec-0.2.0/socialvec/exceptions.py +21 -0
- socialvec-0.2.0/socialvec/socialvec.py +409 -0
- socialvec-0.2.0/socialvec.egg-info/PKG-INFO +275 -0
- {socialvec-0.1.7 → socialvec-0.2.0}/socialvec.egg-info/SOURCES.txt +11 -3
- socialvec-0.2.0/socialvec.egg-info/entry_points.txt +2 -0
- {socialvec-0.1.7 → socialvec-0.2.0}/socialvec.egg-info/not-zip-safe +1 -1
- {socialvec-0.1.7 → socialvec-0.2.0}/socialvec.egg-info/requires.txt +7 -2
- {socialvec-0.1.7 → socialvec-0.2.0}/tests/__init__.py +1 -1
- socialvec-0.2.0/tests/test_api.py +357 -0
- socialvec-0.2.0/tests/test_cli.py +92 -0
- socialvec-0.2.0/tests/test_download.py +200 -0
- socialvec-0.2.0/tests/test_optional_tensorflow.py +22 -0
- socialvec-0.2.0/tests/test_socialvec.py +157 -0
- socialvec-0.1.7/HISTORY.rst +0 -40
- socialvec-0.1.7/PKG-INFO +0 -33
- socialvec-0.1.7/README.rst +0 -37
- socialvec-0.1.7/docs/readme.rst +0 -1
- socialvec-0.1.7/docs/usage.rst +0 -9
- socialvec-0.1.7/setup.py +0 -64
- socialvec-0.1.7/socialvec/.DS_Store +0 -0
- socialvec-0.1.7/socialvec/cli.py +0 -16
- socialvec-0.1.7/socialvec/socialvec.py +0 -339
- socialvec-0.1.7/socialvec.egg-info/PKG-INFO +0 -33
- socialvec-0.1.7/socialvec.egg-info/entry_points.txt +0 -2
- socialvec-0.1.7/tests/.DS_Store +0 -0
- socialvec-0.1.7/tests/test_socialvec.py +0 -72
- {socialvec-0.1.7 → socialvec-0.2.0}/socialvec/models/SocialVec_age_2022.h5 +0 -0
- {socialvec-0.1.7 → socialvec-0.2.0}/socialvec/models/SocialVec_children_2022.h5 +0 -0
- {socialvec-0.1.7 → socialvec-0.2.0}/socialvec/models/SocialVec_education_2022.h5 +0 -0
- {socialvec-0.1.7 → socialvec-0.2.0}/socialvec/models/SocialVec_ethnicity_2022.h5 +0 -0
- {socialvec-0.1.7 → socialvec-0.2.0}/socialvec/models/SocialVec_gender_2022.h5 +0 -0
- {socialvec-0.1.7 → socialvec-0.2.0}/socialvec/models/SocialVec_income_2022.h5 +0 -0
- {socialvec-0.1.7 → socialvec-0.2.0}/socialvec/models/SocialVec_political_2022.h5 +0 -0
- {socialvec-0.1.7 → socialvec-0.2.0}/socialvec.egg-info/dependency_links.txt +0 -0
- {socialvec-0.1.7 → socialvec-0.2.0}/socialvec.egg-info/top_level.txt +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
=======
|
|
2
|
-
Credits
|
|
3
|
-
=======
|
|
4
|
-
|
|
5
|
-
Development Lead
|
|
6
|
-
----------------
|
|
7
|
-
|
|
8
|
-
* Nir Lotan <nir.lotan@gmail.com>
|
|
9
|
-
|
|
10
|
-
Contributors
|
|
11
|
-
------------
|
|
12
|
-
|
|
13
|
-
None yet. Why not be the first?
|
|
1
|
+
=======
|
|
2
|
+
Credits
|
|
3
|
+
=======
|
|
4
|
+
|
|
5
|
+
Development Lead
|
|
6
|
+
----------------
|
|
7
|
+
|
|
8
|
+
* Nir Lotan <nir.lotan@gmail.com>
|
|
9
|
+
|
|
10
|
+
Contributors
|
|
11
|
+
------------
|
|
12
|
+
|
|
13
|
+
None yet. Why not be the first?
|
|
@@ -1,128 +1,131 @@
|
|
|
1
|
-
.. highlight:: shell
|
|
2
|
-
|
|
3
|
-
============
|
|
4
|
-
Contributing
|
|
5
|
-
============
|
|
6
|
-
|
|
7
|
-
Contributions are welcome, and they are greatly appreciated! Every little bit
|
|
8
|
-
helps, and credit will always be given.
|
|
9
|
-
|
|
10
|
-
You can contribute in many ways:
|
|
11
|
-
|
|
12
|
-
Types of Contributions
|
|
13
|
-
----------------------
|
|
14
|
-
|
|
15
|
-
Report Bugs
|
|
16
|
-
~~~~~~~~~~~
|
|
17
|
-
|
|
18
|
-
Report bugs at https://github.com/nirlotan/socialvec/issues.
|
|
19
|
-
|
|
20
|
-
If you are reporting a bug, please include:
|
|
21
|
-
|
|
22
|
-
* Your operating system name and version.
|
|
23
|
-
* Any details about your local setup that might be helpful in troubleshooting.
|
|
24
|
-
* Detailed steps to reproduce the bug.
|
|
25
|
-
|
|
26
|
-
Fix Bugs
|
|
27
|
-
~~~~~~~~
|
|
28
|
-
|
|
29
|
-
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
|
|
30
|
-
wanted" is open to whoever wants to implement it.
|
|
31
|
-
|
|
32
|
-
Implement Features
|
|
33
|
-
~~~~~~~~~~~~~~~~~~
|
|
34
|
-
|
|
35
|
-
Look through the GitHub issues for features. Anything tagged with "enhancement"
|
|
36
|
-
and "help wanted" is open to whoever wants to implement it.
|
|
37
|
-
|
|
38
|
-
Write Documentation
|
|
39
|
-
~~~~~~~~~~~~~~~~~~~
|
|
40
|
-
|
|
41
|
-
SocialVec could always use more documentation, whether as part of the
|
|
42
|
-
official SocialVec docs, in docstrings, or even on the web in blog posts,
|
|
43
|
-
articles, and such.
|
|
44
|
-
|
|
45
|
-
Submit Feedback
|
|
46
|
-
~~~~~~~~~~~~~~~
|
|
47
|
-
|
|
48
|
-
The best way to send feedback is to file an issue at https://github.com/nirlotan/socialvec/issues.
|
|
49
|
-
|
|
50
|
-
If you are proposing a feature:
|
|
51
|
-
|
|
52
|
-
* Explain in detail how it would work.
|
|
53
|
-
* Keep the scope as narrow as possible, to make it easier to implement.
|
|
54
|
-
* Remember that this is a volunteer-driven project, and that contributions
|
|
55
|
-
are welcome :)
|
|
56
|
-
|
|
57
|
-
Get Started!
|
|
58
|
-
------------
|
|
59
|
-
|
|
60
|
-
Ready to contribute? Here's how to set up `socialvec` for local development.
|
|
61
|
-
|
|
62
|
-
1. Fork the `socialvec` repo on GitHub.
|
|
63
|
-
2. Clone your fork locally::
|
|
64
|
-
|
|
65
|
-
$ git clone git@github.com:your_name_here/socialvec.git
|
|
66
|
-
|
|
67
|
-
3. Install your local copy
|
|
68
|
-
|
|
69
|
-
$
|
|
70
|
-
$
|
|
71
|
-
$
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
$
|
|
84
|
-
$
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
$ git
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
$
|
|
116
|
-
|
|
117
|
-
Deploying
|
|
118
|
-
---------
|
|
119
|
-
|
|
120
|
-
A reminder for the maintainers on how to deploy.
|
|
121
|
-
Make sure all your changes are committed (including an entry in HISTORY.rst).
|
|
122
|
-
Then run::
|
|
123
|
-
|
|
124
|
-
$ bump2version patch # possible: major / minor / patch
|
|
125
|
-
$ git push
|
|
126
|
-
$ git push --tags
|
|
127
|
-
|
|
128
|
-
|
|
1
|
+
.. highlight:: shell
|
|
2
|
+
|
|
3
|
+
============
|
|
4
|
+
Contributing
|
|
5
|
+
============
|
|
6
|
+
|
|
7
|
+
Contributions are welcome, and they are greatly appreciated! Every little bit
|
|
8
|
+
helps, and credit will always be given.
|
|
9
|
+
|
|
10
|
+
You can contribute in many ways:
|
|
11
|
+
|
|
12
|
+
Types of Contributions
|
|
13
|
+
----------------------
|
|
14
|
+
|
|
15
|
+
Report Bugs
|
|
16
|
+
~~~~~~~~~~~
|
|
17
|
+
|
|
18
|
+
Report bugs at https://github.com/nirlotan/socialvec/issues.
|
|
19
|
+
|
|
20
|
+
If you are reporting a bug, please include:
|
|
21
|
+
|
|
22
|
+
* Your operating system name and version.
|
|
23
|
+
* Any details about your local setup that might be helpful in troubleshooting.
|
|
24
|
+
* Detailed steps to reproduce the bug.
|
|
25
|
+
|
|
26
|
+
Fix Bugs
|
|
27
|
+
~~~~~~~~
|
|
28
|
+
|
|
29
|
+
Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
|
|
30
|
+
wanted" is open to whoever wants to implement it.
|
|
31
|
+
|
|
32
|
+
Implement Features
|
|
33
|
+
~~~~~~~~~~~~~~~~~~
|
|
34
|
+
|
|
35
|
+
Look through the GitHub issues for features. Anything tagged with "enhancement"
|
|
36
|
+
and "help wanted" is open to whoever wants to implement it.
|
|
37
|
+
|
|
38
|
+
Write Documentation
|
|
39
|
+
~~~~~~~~~~~~~~~~~~~
|
|
40
|
+
|
|
41
|
+
SocialVec could always use more documentation, whether as part of the
|
|
42
|
+
official SocialVec docs, in docstrings, or even on the web in blog posts,
|
|
43
|
+
articles, and such.
|
|
44
|
+
|
|
45
|
+
Submit Feedback
|
|
46
|
+
~~~~~~~~~~~~~~~
|
|
47
|
+
|
|
48
|
+
The best way to send feedback is to file an issue at https://github.com/nirlotan/socialvec/issues.
|
|
49
|
+
|
|
50
|
+
If you are proposing a feature:
|
|
51
|
+
|
|
52
|
+
* Explain in detail how it would work.
|
|
53
|
+
* Keep the scope as narrow as possible, to make it easier to implement.
|
|
54
|
+
* Remember that this is a volunteer-driven project, and that contributions
|
|
55
|
+
are welcome :)
|
|
56
|
+
|
|
57
|
+
Get Started!
|
|
58
|
+
------------
|
|
59
|
+
|
|
60
|
+
Ready to contribute? Here's how to set up `socialvec` for local development.
|
|
61
|
+
|
|
62
|
+
1. Fork the `socialvec` repo on GitHub.
|
|
63
|
+
2. Clone your fork locally::
|
|
64
|
+
|
|
65
|
+
$ git clone git@github.com:your_name_here/socialvec.git
|
|
66
|
+
|
|
67
|
+
3. Install your local copy and the development tools into a virtual environment::
|
|
68
|
+
|
|
69
|
+
$ cd socialvec/
|
|
70
|
+
$ python -m venv .venv
|
|
71
|
+
$ source .venv/bin/activate # on Windows: .venv\Scriptsctivate
|
|
72
|
+
$ pip install -r requirements_dev.txt -e ".[classifier,api]"
|
|
73
|
+
|
|
74
|
+
4. Create a branch for local development::
|
|
75
|
+
|
|
76
|
+
$ git checkout -b name-of-your-bugfix-or-feature
|
|
77
|
+
|
|
78
|
+
Now you can make your changes locally.
|
|
79
|
+
|
|
80
|
+
5. When you're done making changes, check that your changes pass flake8 and the
|
|
81
|
+
tests, including testing other Python versions with tox::
|
|
82
|
+
|
|
83
|
+
$ flake8 socialvec tests
|
|
84
|
+
$ pytest
|
|
85
|
+
$ tox
|
|
86
|
+
|
|
87
|
+
The first test run downloads the models (about 150 MB each) into
|
|
88
|
+
``~/.cache/socialvec``; set ``SOCIALVEC_HOME`` to use another folder.
|
|
89
|
+
|
|
90
|
+
6. Commit your changes and push your branch to GitHub::
|
|
91
|
+
|
|
92
|
+
$ git add .
|
|
93
|
+
$ git commit -m "Your detailed description of your changes."
|
|
94
|
+
$ git push origin name-of-your-bugfix-or-feature
|
|
95
|
+
|
|
96
|
+
7. Submit a pull request through the GitHub website.
|
|
97
|
+
|
|
98
|
+
Pull Request Guidelines
|
|
99
|
+
-----------------------
|
|
100
|
+
|
|
101
|
+
Before you submit a pull request, check that it meets these guidelines:
|
|
102
|
+
|
|
103
|
+
1. The pull request should include tests.
|
|
104
|
+
2. If the pull request adds functionality, the docs should be updated. Put
|
|
105
|
+
your new functionality into a function with a docstring, and add the
|
|
106
|
+
feature to README.md.
|
|
107
|
+
3. The pull request should work for Python 3.10 to 3.13. The GitHub Actions
|
|
108
|
+
tests run on every pull request; make sure they pass.
|
|
109
|
+
|
|
110
|
+
Tips
|
|
111
|
+
----
|
|
112
|
+
|
|
113
|
+
To run a subset of tests::
|
|
114
|
+
|
|
115
|
+
$ pytest tests/test_cli.py
|
|
116
|
+
|
|
117
|
+
Deploying
|
|
118
|
+
---------
|
|
119
|
+
|
|
120
|
+
A reminder for the maintainers on how to deploy.
|
|
121
|
+
Make sure all your changes are committed (including an entry in HISTORY.rst).
|
|
122
|
+
Then run::
|
|
123
|
+
|
|
124
|
+
$ bump2version patch # possible: major / minor / patch
|
|
125
|
+
$ git push
|
|
126
|
+
$ git push --tags
|
|
127
|
+
|
|
128
|
+
Then create a GitHub release for the new tag. The ``Publish`` GitHub Actions
|
|
129
|
+
workflow builds the package and uploads it to PyPI (using PyPI trusted
|
|
130
|
+
publishing, so no token is stored anywhere). To upload by hand instead, run
|
|
131
|
+
``make release``.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
History
|
|
2
|
+
-------
|
|
3
|
+
|
|
4
|
+
0.1.0 (2022-09-29)
|
|
5
|
+
------------------
|
|
6
|
+
|
|
7
|
+
* First release on PyPI.
|
|
8
|
+
|
|
9
|
+
0.1.1 (2022-09-29)
|
|
10
|
+
------------------
|
|
11
|
+
|
|
12
|
+
* Include config.yaml in the distribution.
|
|
13
|
+
|
|
14
|
+
0.1.2 (2022-10-02)
|
|
15
|
+
------------------
|
|
16
|
+
|
|
17
|
+
* Rearrange config.yaml
|
|
18
|
+
* Support multiple versions of the SocialVec model
|
|
19
|
+
* Fix bug when searching for similarity using username
|
|
20
|
+
|
|
21
|
+
0.1.3 (2022-10-14)
|
|
22
|
+
------------------
|
|
23
|
+
* Initial version of SocialVecClassifier
|
|
24
|
+
|
|
25
|
+
0.1.4 (2022-11-08)
|
|
26
|
+
------------------
|
|
27
|
+
* Updates to SocialVecClassifier
|
|
28
|
+
|
|
29
|
+
0.1.5 (2023-11-07)
|
|
30
|
+
------------------
|
|
31
|
+
* Update a dedicated model for the SocialVecClassifier (2020c)
|
|
32
|
+
|
|
33
|
+
0.1.6 (2023-11-09)
|
|
34
|
+
------------------
|
|
35
|
+
* Modify requirements to support more up-to-date python versions
|
|
36
|
+
|
|
37
|
+
0.1.7 (2024-10-22)
|
|
38
|
+
------------------
|
|
39
|
+
* Add the option to load the model to RAM in case there is no write permission to the package folder.
|
|
40
|
+
|
|
41
|
+
0.1.7.1 (2024-10-22)
|
|
42
|
+
--------------------
|
|
43
|
+
* Add pypi documentation
|
|
44
|
+
|
|
45
|
+
0.2.0 (2026-11-07)
|
|
46
|
+
------------------
|
|
47
|
+
|
|
48
|
+
Highlights: many lookup bugs fixed, safer and cached downloads, optional TensorFlow
|
|
49
|
+
and Flask, a hardened HTTP API, and a real command line.
|
|
50
|
+
|
|
51
|
+
Breaking changes:
|
|
52
|
+
|
|
53
|
+
* Downloaded models and metadata are now kept in ``~/.cache/socialvec`` (see below). Files
|
|
54
|
+
saved by older versions are still found, so nothing is downloaded again.
|
|
55
|
+
* TensorFlow is no longer installed by default; install ``socialvec[classifier]`` for the
|
|
56
|
+
classifiers. Flask is in ``socialvec[api]``.
|
|
57
|
+
* Errors are specific exception classes (all subclasses of ``SocialVecError``) instead of a
|
|
58
|
+
bare ``Exception``.
|
|
59
|
+
* ``validate_username`` and ``sv[name]`` raise ``UserNotFoundError`` for accounts that are
|
|
60
|
+
only in the metadata, not in the loaded model.
|
|
61
|
+
* ``socialvec.api`` no longer loads a model when imported (use ``create_app()``), and
|
|
62
|
+
listens on ``127.0.0.1`` by default.
|
|
63
|
+
* Python 3.8 and 3.9 are no longer supported (both have reached end of life); 3.10 to 3.13 are.
|
|
64
|
+
|
|
65
|
+
All changes:
|
|
66
|
+
|
|
67
|
+
* New ``socialvec`` command line: ``similar``, ``similarity``, ``predict`` and ``download``.
|
|
68
|
+
* The README is now the PyPI project description, with up-to-date examples and a citation.
|
|
69
|
+
* User IDs given as numpy integers (e.g. ``np.int64``) now work everywhere; ``get_average_embeddings`` no longer silently drops them.
|
|
70
|
+
* Errors are now ``socialvec.exceptions.InvalidUserIdError`` (a ``ValueError``) and ``UserNotFoundError`` (a ``KeyError``), both subclasses of ``SocialVecError``, instead of a bare ``Exception``.
|
|
71
|
+
* Looking up a username that is in the metadata but not in the loaded model raises ``UserNotFoundError`` instead of gensim's ``KeyError``.
|
|
72
|
+
* When several accounts share a screen name, the one that is in the loaded model is used.
|
|
73
|
+
* Username lookups are now a dictionary lookup instead of a scan of the whole metadata table.
|
|
74
|
+
* ``get_screen_name`` returns ``None`` for users that are in the model but have no metadata, instead of raising ``IndexError``.
|
|
75
|
+
* ``get_similar`` accepts a list of usernames as well as user IDs.
|
|
76
|
+
* ``init_classifier()`` raises a clear error for models with no classifiers (classifiers are only available for ``2020c``), and ``predict`` raises one for unknown classifier names.
|
|
77
|
+
* Fix ``f1_m`` (it referred to ``self`` from a static method).
|
|
78
|
+
* Remove the hard-coded vector size of 100.
|
|
79
|
+
* API (``socialvec.api``):
|
|
80
|
+
|
|
81
|
+
* The model is chosen with ``SOCIALVEC_MODEL`` (default ``2020``). ``/predict`` and ``/predict_proba`` need ``2020c``, and return 501 with an explanation on other models instead of failing on every request.
|
|
82
|
+
* Classifiers are loaded once when the app is created, not lazily on the first request.
|
|
83
|
+
* App setup moved into ``create_app()``; importing the module no longer downloads or loads a model. ``python -m socialvec.api`` still works.
|
|
84
|
+
* Listens on ``127.0.0.1`` by default instead of ``0.0.0.0``; set ``SOCIALVEC_HOST`` and ``PORT`` to change it. Allowed CORS origins come from ``SOCIALVEC_CORS_ORIGINS`` (default ``*``).
|
|
85
|
+
* Errors: 400 for invalid input (including a non-integer ``topn`` and missing or non-JSON bodies), 404 for users not in the model, and a generic 500 for unexpected errors, which are logged instead of returned to the client.
|
|
86
|
+
* ``/get_similar`` clamps ``topn`` to 1-100 and returns ``application/json``.
|
|
87
|
+
* Downloaded models and metadata are now kept in ``~/.cache/socialvec`` (or the folder in the ``SOCIALVEC_HOME`` environment variable) instead of the package folder. Files that older versions saved in the package folder or the working folder are still used, so they are not downloaded again.
|
|
88
|
+
* Downloads are checked against a SHA-256 checksum before they are loaded.
|
|
89
|
+
* A failed download now raises ``SocialVecError`` instead of leaving a broken ``SocialVec`` object that fails later with ``AttributeError``.
|
|
90
|
+
* Fix loading the wrong model (always ``2020_2022``) when the package folder was not writable.
|
|
91
|
+
* The metadata is downloaded once and cached, instead of being read from Dropbox every time when the package folder was not writable.
|
|
92
|
+
* An unknown ``model_name`` raises ``UnknownModelError`` (a ``ValueError``) listing the available models.
|
|
93
|
+
* TensorFlow is now an optional extra: ``pip install "socialvec[classifier]"``. The embeddings work without it; ``init_classifier()`` raises a clear error if it is missing. Flask is an optional extra too: ``pip install "socialvec[api]"``.
|
|
94
|
+
* ``wget`` is no longer a dependency; downloads use ``requests``.
|
|
95
|
+
* Packaging: ship ``config.yaml`` and the classifier ``.h5`` files in the package, and never the downloaded models.
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022, Nir Lotan
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
22
|
-
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022, Nir Lotan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
include AUTHORS.rst
|
|
2
|
-
include CONTRIBUTING.rst
|
|
3
|
-
include HISTORY.rst
|
|
4
|
-
include LICENSE
|
|
5
|
-
include README.
|
|
6
|
-
|
|
7
|
-
recursive-include socialvec *
|
|
8
|
-
recursive-include tests *
|
|
9
|
-
recursive-exclude * __pycache__
|
|
10
|
-
recursive-exclude * *.py[co]
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
exclude socialvec/metadata.parquet.gz
|
|
15
|
-
|
|
16
|
-
recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
|
|
1
|
+
include AUTHORS.rst
|
|
2
|
+
include CONTRIBUTING.rst
|
|
3
|
+
include HISTORY.rst
|
|
4
|
+
include LICENSE
|
|
5
|
+
include README.md
|
|
6
|
+
|
|
7
|
+
recursive-include socialvec *
|
|
8
|
+
recursive-include tests *
|
|
9
|
+
recursive-exclude * __pycache__
|
|
10
|
+
recursive-exclude * *.py[co]
|
|
11
|
+
global-exclude *.pkl.gz metadata.parquet.gz *.part .DS_Store
|
|
12
|
+
|
|
13
|
+
recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
|