Skip to content

chore: configure Poetry environment, secure credentials with .env, and update documentation - #3

Open
cherry-git999 wants to merge 2 commits into
Agriworks:mainfrom
cherry-git999:main
Open

chore: configure Poetry environment, secure credentials with .env, and update documentation#3
cherry-git999 wants to merge 2 commits into
Agriworks:mainfrom
cherry-git999:main

Conversation

@cherry-git999

Copy link
Copy Markdown
Member

Summary

This PR updates the project's dependency and development environment management to use Poetry correctly, introduces secure credential management via environment variables (.env), and updates the setup and execution documentation.

Changes Made

1. Poetry & Dependency Management

  • Updated Python requirement to >=3.10,<4.0 in pyproject.toml.
  • Configured development dependency group ([tool.poetry.group.dev.dependencies]) including pytest, ruff, mypy, pandas-stubs, and types-requests.
  • Added python-dotenv for loading environment credentials.
  • Synchronized and locked dependencies in poetry.lock.

2. Environment & Security Configuration

  • Added .env.example as a template for ERPNext authentication credentials.
  • Updated .gitignore to ensure .env and local secret files are strictly ignored while tracking .env.example.
  • Added cache directories (.ruff_cache/, .mypy_cache/, .pytest_cache/) to .gitignore.
  • Refactored example.py to read ERPNEXT_USERNAME and ERPNEXT_PASSWORD securely via dotenv instead of hardcoding values.

3. Documentation

  • Updated README.md with step-by-step instructions for installation (poetry install), credential configuration (cp .env.example .env), and running scripts (poetry run python example.py).

Verification

  • Verified Poetry environment installation (poetry install).
  • Verified code execution and authentication against ERPNext via poetry run python example.py.
  • Verified static type checking (poetry run mypy erp_client) and linting (poetry run ruff check erp_client).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant