-
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
300 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Security Policy | ||
|
||
## Supported Versions | ||
|
||
Versions which are currently being supported with security updates: | ||
|
||
| Version | Supported | | ||
| ------- | ------------------ | | ||
| > 0.2 | :white_check_mark: | | ||
|
||
## Reporting a Vulnerability | ||
|
||
To report a vulnerability, please create a new [*issue*](https://github.com/DerwenAI/pytextrank/issues). | ||
We will be notified immediately, and will attempt to respond on the reported issue immediately. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
#!/bin/bash -e | ||
#!/bin/bash -e -x | ||
|
||
## debugging the uploaded README: | ||
# pandoc README.md --from markdown --to rst -s -o README.rst | ||
rm -rf dist build pytextrank.egg-info | ||
python3 -m build | ||
twine check dist/* | ||
|
||
rm -rf dist | ||
python setup.py sdist bdist_wheel | ||
twine upload --verbose dist/* | ||
# this assumes the use of `~/.pypirc` | ||
# https://packaging.python.org/en/latest/specifications/pypirc/ | ||
|
||
twine upload ./dist/* --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"src_url": "https://github.com/DerwenAI/pytextrank/blob/main", | ||
|
||
"module": "pytextrank", | ||
|
||
"classes": [ | ||
"BaseTextRankFactory", | ||
"BaseTextRank", | ||
"TopicRankFactory", | ||
"TopicRank", | ||
"PositionRankFactory", | ||
"PositionRank", | ||
"BiasedTextRankFactory", | ||
"BiasedTextRank", | ||
"Lemma", | ||
"Phrase", | ||
"Sentence", | ||
"VectorElem" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,43 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import pyfixdoc | ||
""" | ||
Generate the `apidocs` markdown needed for the package reference. | ||
""" | ||
|
||
import importlib | ||
import json | ||
import sys | ||
|
||
import pyfixdoc | ||
|
||
|
||
###################################################################### | ||
## main entry point | ||
|
||
if __name__ == "__main__": | ||
ref_md_file: str = sys.argv[1] | ||
|
||
# NB: `inspect` is picky about paths and current working directory | ||
# this only works if run from the top-level directory of the repo | ||
sys.path.insert(0, "../") | ||
|
||
# customize the following, per use case | ||
import pytextrank # pylint: disable=W0611 | ||
|
||
class_list = [ | ||
"BaseTextRankFactory", | ||
"BaseTextRank", | ||
"TopicRankFactory", | ||
"TopicRank", | ||
"PositionRankFactory", | ||
"PositionRank", | ||
"BiasedTextRankFactory", | ||
"BiasedTextRank", | ||
"Lemma", | ||
"Phrase", | ||
"Sentence", | ||
"VectorElem", | ||
] | ||
|
||
pkg_doc = pyfixdoc.PackageDoc( | ||
"pytextrank", | ||
"https://github.com/DerwenAI/pytextrank/blob/main", | ||
class_list, | ||
with open("pkg_doc.cfg", "r", encoding="utf-8") as fp: | ||
config: dict = json.load(fp) | ||
|
||
importlib.import_module(config["module"]) | ||
|
||
pkg_doc: pyfixdoc.PackageDoc = pyfixdoc.PackageDoc( | ||
config["module"], | ||
config["src_url"], | ||
config["classes"], | ||
) | ||
|
||
# NB: uncomment to analyze/troubleshoot the results of `inspect` | ||
#pkg_doc.show_all_elements(); sys.exit(0) | ||
# NB: uncomment to analyze/troubleshoot the results of `inspect` | ||
#pkg_doc.show_all_elements(); sys.exit(0) | ||
|
||
# build the apidocs markdown | ||
pkg_doc.build() | ||
# build the apidocs markdown | ||
pkg_doc.build() | ||
|
||
# output the apidocs markdown | ||
ref_md_file = sys.argv[1] | ||
pkg_doc.write_markdown(ref_md_file) | ||
# output the apidocs markdown | ||
pkg_doc.write_markdown(ref_md_file) |
Oops, something went wrong.