Skip to content

aYukiYoshida/pyigata

Repository files navigation

PyIgata

Requirements

諸情報

環境設定

  • 旧仮想環境準備 (公式ドキュメント)

    % python3 -m venv venv
    % source ./venv/bin/activate
    % deactivate  # 仮想環境終了
  • with mise

    % mise install
    % mise run setup

docker command

  • build

    % docker build -t pyigata -f docker/Dockerfile.pyigata .
  • run

    • run python script

      % docker run [-i] [-t] --rm -v $PWD:/opt/src pyigata [ARGUMENT]
    • run shell prompt

      % docker run [-i] [-t] --entrypoint /bin/bash --rm -v $PWD:/opt/src pyigata

usage of setup script

If you want to learn more about setup.py files, check out this repository.

  • build

    % ./setup.py build
  • install

    % ./setup.py install
  • unit test

    % ./setup.py test
  • clean

    % ./setup.py clean
  • check

    % ./setup.py check
  • generate package

    % ./setup.py sdist

    Then the package is generated in dist/.

pre-commit

% pre-commit --version # verify that the installation was successful
% pre-commit install

check OSS licenses

% python3 -m venv venv
% source ./venv/bin/activate
% pip install -r requirements.txt
% deactivate
% python3 main.py license \
    --target=./venv/lib/python3.8/site-packages \
    --output=./out/license_list.csv

Run jupyter lab on docker

  • build

    % docker-compose build
  • run

    % docker-compose up -d
  • run shell

    % docker-compose exec -u root jupyternbenv bash -p
  • shutdown

    % docker-compose down