Rupantaran converts Nepali-specific measurements into SI or metric units.
Project description
Rupantaran
Rupantaran is a Python package that converts various Nepali-specific measurements into SI units or commonly used metric units. You can read the docs here.
📌 Supported Measurement Categories
This package covers a range of traditional Nepalese measurement units, including:
- Land:
khetmuri, bigha, kattha, dhur, ropani, aana, paisa, dam , square meter - Volume: mutthi, mana, pathi, dabba
- Length: angul, dharnugrah, dhanurmushti, vitastaa, haath, kosh, yojan
- Weight: lal, tola, chatak, pau, dharni, sher, kg, g, lb, oz
The package ensures accurate conversions by cross-referencing multiple resources. Please create an issue if you find any discrepancies in conversion maps.
📚 Conversion References
- Wikipedia - Nepalese Units of Measurement
- Mero Kalam - Land Measurement
- Ministry of Land Reform Conversion Tool
- Rotaract - Unit Conversion PDF
- 1990 JICA Conversion Table
Environment Setup Guide for Rupantaran
This document provides a step-by-step guide to setting up the development and production environments for the rupantaran package.
📌 Development Environment
This environment is used for publishing the package to TestPyPI, PyPI's testing server. This is facilated with GitHub Actions workflow. The TestPyPI link for rupantaran is here.
Expand for more details for the development environment
Note: The GitHub Actions workflow is configured to run automatically when a new tag is pushed to the repository. This ensures that the package is always built and uploaded to TestPyPI when a new version is released.
# Always create a tag after the version_id is updated in the setup.py file.
# Create a new tag
git tag v0.2.2
# Push the tag to the repository
git push origin v0.2.2
✅ Steps to Set Up the Development Environment:
-
Activate the development environment:
conda activate env-rupantaran-dev
-
Install required dependencies for building and uploading the package:
pip install build twine
-
Build the package and install it in editable mode:
python -m build pip install -e .
- This generates the
dist/directory containing.tar.gzand.whlfiles.
- This generates the
-
Upload the package to TestPyPI:
twine upload --repository testpypi dist/*
- You will need an API Key for authentication.
-
Install the package from TestPyPI to verify deployment:
pip install --index-url https://test.pypi.org/simple/ rupantaran
-
Run tests on the installed package:
pytest --pyargs rupantaran
📌 Production Environment
This environment is used for publishing the final package to PyPI.This is facilated with GitHub Actions workflow. The PyPI link for rupantaran is here.
Expand for more details for the production environment
Note: The Github Action workflow is configured to push the package to PyPI when a PR is merged into the main branch.
✅ Steps to Set Up the Production Environment:
-
Activate the production environment:
conda activate env-rupantaran-prod
-
Upload the final version to PyPI:
twine upload dist/*
- This makes the package available on the official PyPI repository.
Documentation
- Navigate to directory
cd rupantaran/docs - Generate the docs
make html - Serve the docs in localhost
sphinx-autobuild . _build
🛠 Additional Notes
- Always test the package in the staging environment before publishing to production.
- If needed, remove the
dist/directory before rebuilding the package:rm -rf dist/
- If you face authentication issues, regenerate the API token from TestPyPI or PyPI and update your
~/.pypircfile. This is not relevant here, because we are using GitHub Actions to upload the package to TestPyPI and PyPI.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rupantaran-0.2.7.tar.gz.
File metadata
- Download URL: rupantaran-0.2.7.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ffdd107cee770495614ca00fc2942e324e7b6d2fb7607fba1922981e1cbebd2
|
|
| MD5 |
7971f4db347eadbf862b508fb4afd350
|
|
| BLAKE2b-256 |
d6570008bd21982d8ed6ee8b9ea6a8e0280ed8e05771edb51708b9e88ff90573
|
File details
Details for the file rupantaran-0.2.7-py3-none-any.whl.
File metadata
- Download URL: rupantaran-0.2.7-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a4e87ead54c9f02d8d0f50e51d8c18377219d0e1d1a73c7d530c4c60374aff8
|
|
| MD5 |
f0a459b406c95013799f7e19178a13b3
|
|
| BLAKE2b-256 |
6444bc0b2f3b33ed48c6840049a52bf1576d3c115ee4c203d904e5713d14eb15
|