Phil 4.5.2022

Tasks

  • Roofwork
  • BGE Home

SBIRs

  • Sprint meeting
  • Discuss triage with Orest?

GPT Agents

  • Work some more on deploying Keyword Explorer – done! Here’s how you deploy using JetBains PyCharm
  • First, make sure you have up-to-date versions of setuptools and twine. Also make sure your directory looks something like this:
  • Create your setup.cfg file
[metadata]
description-file = README.md
name = keyword_explorer
  • Then, your setup.py file. It is important to explicitly list the subdirectories in the packages array. Here’s my example (Note that “long_description) is a variable. It is what PyPI uses to create its description, and needs to be updated before creating the wheel. (see here for an example):
from  distutils.core import  setup

setup(
    name='keyword_explorer',
    version= "0.0.3.dev",
    packages=['keyword_explorer',
              'keyword_explorer.utils',
              'keyword_explorer.TwitterV2',
              'keyword_explorer.tkUtils',
              'keyword_explorer.OpenAI',
              'keyword_explorer.Apps'],
    url='https://github.com/pgfeldman/KeywordExplorer',
    license='MIT',
    author='Philip Feldman',
    author_email='phil@philfeldman.com',
    description='A tool for producing and exploring keywords',
    long_description= long_s,
    install_requires=[
        'pandas~=1.3.5',
        'matplotlib~=3.2.2',
        'numpy~=1.19.5',
        'sklearn~=0.0',
        'scikit-learn~=0.24.2',
        'requests~=2.27.1',
        'wikipedia~=1.4.0',
        'openai~=0.11.5',
        'networkx~=2.6.2',
        'tkinterweb~=3.12.2'],

    classifiers=[  # Optional
        # How mature is this project? Common values are
        #   3 - Alpha
        #   4 - Beta
        #   5 - Production/Stable
        'Development Status :: 3 - Alpha',
        "Programming Language :: Python :: 3",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
    ],
)
[distutils]
index-servers=
    testpypi
    pypi

[testpypi]
repository = https://test.pypi.org/legacy/
username = your_login
password = your_password

[pypi]
repository = https://upload.pypi.org/legacy/
username = your_login
password = your_password
  • At this point, you can run setup from within the IDE:
  • That will bring up a dialog. Type “sdist” as the task name
  • That will bring up another dialog. Type bdist_wheel and click OK
  • That will build the files and place them in the dist directory
  • Then, using the terminal or console window, deploy using twine. Notice that -r option uses the .pypirc file to get the rest of the arguments:
D:\Development\External\KeywordExplorer> twine upload dist/* -r pypi
  • To use API token rather than username/password:
    • Set your username to __token__
    • Set your password to the token value, including the pypi- prefix
    • Where you edit or add these values will depend on your individual use case. For example, some users may need to edit their .pypirc file, while others may need to update their CI configuration file (e.g. .travis.yml if you are using Travis).
    • Advanced users may wish to inspect their token by decoding it with base64, and checking the output against the unique identifier displayed on PyPI.
  • Ran into a problem on a subsequent install: “Unknown distribution option: ‘install_requires’” Here’s the fix:
  • 3:30 Meeting. Went over the DARPA RFP, discovered that movie stars might be a good thing to search for. Added a max_chars limit to the parser

Book

  • Finished up Fire, and started pulling all that back to egalitarianism