htrflow_cookie

A short description of the project


License
MIT
Install
pip install htrflow_cookie==0.0.4

Documentation

htrflow_cookie

PyPI PyPI - Python Version PyPI - License


Documentation: https://Swedish-National-Archives-AI-lab.github.io/htrflow_cookie

Source Code: https://github.com/Swedish-National-Archives-AI-lab/htrflow_cookie

PyPI: https://pypi.org/project/htrflow_cookie/


A short description of the project

Installation

pip install htrflow_cookie

Development

  • Clone this repository
  • Requirements:
  • Create a virtual environment and install the dependencies
poetry install
  • Activate the virtual environment
poetry shell

Testing

Poetry provides a run command to execute the given command inside the project’s virtual environment. So execute the following command to run the tests:

poetry run pytest -v

And if your inside the virtual environment run:

pytest

Building the package

For Poetry, the equivalent of pip install -e . (which is used to install a package in editable mode with pip) is to use the poetry install command in the root directory of the project.

When you run poetry install in a project that is managed by Poetry, it installs the project's dependencies as well as the project itself in editable mode. This means that changes to the project's code will immediately affect the installed package without the need for reinstallation.

You can run poetry install whether you're inside the Poetry-created virtual environment (activated using poetry shell) or not. Poetry will handle the installation of the project in editable mode correctly in either case.


Publish the Package

But before you can publish your library, you need to package it with the build command:

poetry build

To publish your library, you will need to properly configure your PyPI credentials, as Poetry will publish the library to PyPI by default.

poetry config repositories.test-pypi https://test.pypi.org/legacy/

Configure key:

poetry config pypi-token.test-pypi pypi-<tokenv_value>

Once the library is packaged, you can use the publish command to publish it.

# Only `poetry publish` will push by default to pypi directly
poetry publish -r test-pypi