From 2cff6f6ac9472147f9ddeab1e21618ad71174f32 Mon Sep 17 00:00:00 2001 From: suqingdong <1078595229@qq.com> Date: Wed, 11 Jan 2023 13:33:33 +0800 Subject: [PATCH] update docs --- docs/source/api/impact_factor.bin.rst | 21 ------- docs/source/api/impact_factor.db.rst | 29 ---------- docs/source/api/impact_factor.rst | 20 ------- docs/source/api/impact_factor.util.rst | 45 --------------- docs/source/api/modules.rst | 7 --- docs/source/conf.py | 2 +- docs/source/index.rst | 2 +- docs/source/installation.rst | 2 +- docs/source/tutorial.rst | 80 ++++++++------------------ 9 files changed, 28 insertions(+), 180 deletions(-) delete mode 100644 docs/source/api/impact_factor.bin.rst delete mode 100644 docs/source/api/impact_factor.db.rst delete mode 100644 docs/source/api/impact_factor.rst delete mode 100644 docs/source/api/impact_factor.util.rst delete mode 100644 docs/source/api/modules.rst diff --git a/docs/source/api/impact_factor.bin.rst b/docs/source/api/impact_factor.bin.rst deleted file mode 100644 index ad965b4..0000000 --- a/docs/source/api/impact_factor.bin.rst +++ /dev/null @@ -1,21 +0,0 @@ -impact\_factor.bin package -========================== - -Submodules ----------- - -impact\_factor.bin.main module ------------------------------- - -.. automodule:: impact_factor.bin.main - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: impact_factor.bin - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/api/impact_factor.db.rst b/docs/source/api/impact_factor.db.rst deleted file mode 100644 index 69b72ca..0000000 --- a/docs/source/api/impact_factor.db.rst +++ /dev/null @@ -1,29 +0,0 @@ -impact\_factor.db package -========================= - -Submodules ----------- - -impact\_factor.db.manager module --------------------------------- - -.. automodule:: impact_factor.db.manager - :members: - :undoc-members: - :show-inheritance: - -impact\_factor.db.models module -------------------------------- - -.. automodule:: impact_factor.db.models - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: impact_factor.db - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/api/impact_factor.rst b/docs/source/api/impact_factor.rst deleted file mode 100644 index 9a1e021..0000000 --- a/docs/source/api/impact_factor.rst +++ /dev/null @@ -1,20 +0,0 @@ -impact\_factor package -====================== - -Subpackages ------------ - -.. toctree:: - :maxdepth: 4 - - impact_factor.bin - impact_factor.db - impact_factor.util - -Module contents ---------------- - -.. automodule:: impact_factor - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/api/impact_factor.util.rst b/docs/source/api/impact_factor.util.rst deleted file mode 100644 index 4f3504d..0000000 --- a/docs/source/api/impact_factor.util.rst +++ /dev/null @@ -1,45 +0,0 @@ -impact\_factor.util package -=========================== - -Submodules ----------- - -impact\_factor.util.factor module ---------------------------------- - -.. automodule:: impact_factor.util.factor - :members: - :undoc-members: - :show-inheritance: - -impact\_factor.util.journal module ----------------------------------- - -.. automodule:: impact_factor.util.journal - :members: - :undoc-members: - :show-inheritance: - -impact\_factor.util.nlmcatalog module -------------------------------------- - -.. automodule:: impact_factor.util.nlmcatalog - :members: - :undoc-members: - :show-inheritance: - -impact\_factor.util.webrequest module -------------------------------------- - -.. automodule:: impact_factor.util.webrequest - :members: - :undoc-members: - :show-inheritance: - -Module contents ---------------- - -.. automodule:: impact_factor.util - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/api/modules.rst b/docs/source/api/modules.rst deleted file mode 100644 index 2d34171..0000000 --- a/docs/source/api/modules.rst +++ /dev/null @@ -1,7 +0,0 @@ -impact_factor -============= - -.. toctree:: - :maxdepth: 4 - - impact_factor diff --git a/docs/source/conf.py b/docs/source/conf.py index 9ad0d79..af7a934 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -28,7 +28,7 @@ # -- Project information ----------------------------------------------------- project = 'impact_factor' -copyright = '2022, suqingdong' +copyright = '2023, suqingdong' author = 'suqingdong' # The full version, including alpha/beta/rc tags diff --git a/docs/source/index.rst b/docs/source/index.rst index 0bb1524..086d4f4 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -3,7 +3,7 @@ ==================================== ImpactFactor |version| Documentation ==================================== -ImpactFactor is a Impact Factor Toolkits, which contains ``build``, ``version``, ``search``, ``pubmed_filter`` +ImpactFactor is a Impact Factor Toolkits, which contains ``build``, ``search``, ``filter`` sub-commands. You can search the IF of a journal, and you can generate a pubmed filter for NCBI Pubmed. Installation Guide diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 0580704..9739f15 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -4,7 +4,7 @@ Installation guide Install with ``pip``:: - pip install impact_factor + python3 -m pip install -U impact_factor Install from `source code`_ :: diff --git a/docs/source/tutorial.rst b/docs/source/tutorial.rst index 62b5291..c995147 100644 --- a/docs/source/tutorial.rst +++ b/docs/source/tutorial.rst @@ -5,57 +5,26 @@ Tutorials ``build`` ========= -Download NCBI Journals ----------------------- - -`NCBI Journal List`_ - -.. _NCBI Journal List: https://www.ncbi.nlm.nih.gov/books/NBK3827/table/pubmedhelp.T.journal_lists/ - -download with ``wget``:: - - wget -c ftp://ftp.ncbi.nih.gov/pubmed/J_Entrez.gz - wget -c ftp://ftp.ncbi.nih.gov/pubmed/J_Medline.gz - -.. note:: - You can also download the journals from browser, or you can speed up with ``ascp`` - - -Build the Database +build the database ------------------ .. code:: console - impact_factor build -ef J_Entrez.gz -mf J_Medline.gz -t 32 - -.. note:: - * ``--threads N`` parameter can be used to speed up building - * ``--echo`` parameter will show the detail processing of building - + impact_factor build # default + impact_factor -d test.db build -i IF.xlsx -``version`` -=========== - -Show the informations of database - -.. code:: console - - impact_factor version - -might shown as follows:: +.. note:: + * ``-d dbfile`` specify a dbfile + * ``-i excel`` specify a excel file - ========================================================== - program version: 1.0.0 - database version: 2020 [2020-08-20 15:32:34.141140] - total journals: 9167 - indexed journals: 8714 - database filepath: /data/work/suqingdong/code/impact_factor/impact_factor/data/impact_factor.db - ========================================================== ``search`` ========== +search the database +------------------- + * search with ISSN:: impact_factor search 0028-0836 @@ -73,40 +42,41 @@ might shown as follows:: impact_factor search "nature com%" -``pubmed_filter`` +``filter`` ================= +filter with factor +------------------ + IF >= 30:: - impact_factor pubmed_filter -min 30 + impact_factor filter -min 30 IF <= 1:: - impact_factor pubmed_filter -min 1 + impact_factor filter -min 1 5 <= IF <= 10:: - impact_factor pubmed_filter -min 5 -max 10 + impact_factor filter -min 5 -max 10 -save result to a file:: +output pubmed filter format:: - impact_factor pubmed_filter -min 5 -max 10 -o 5_10.txt + impact_factor filter -min 5 -max 10 --pubmed-filter use as a module =============== .. code:: python - from impact_factor import ImpactFactor - - IF = ImpactFactor() - - IF.check_version() + from impact_factor.core import Factor - IF.search('nature') + fa = Factor() - IF.search('nature com%') + print(fa.dbfile) - IF.pubmed_filter(min_value=30) + fa.search('nature') + fa.search('nature c%') - IF.pubmed_filter(min_value=5, max_value=10) + fa.filter(min_value=100, max_value=200) + fa.filter(min_value=100, max_value=200, pubmed_filter=True) \ No newline at end of file