diff --git a/.gitignore b/.gitignore index ea94102..b9acec5 100644 --- a/.gitignore +++ b/.gitignore @@ -71,9 +71,6 @@ target/ # IPython Notebook .ipynb_checkpoints -# pyenv -.python-version - # celery beat schedule file celerybeat-schedule diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..c8cfe39 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.10 diff --git a/README.md b/README.md index b0ca90c..4bd0e34 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Morango -[![build](https://github.com/learningequality/morango/actions/workflows/tox.yml/badge.svg?branch=master)](https://github.com/learningequality/morango/actions) -[![image](http://codecov.io/github/learningequality/morango/coverage.svg?branch=master)](http://codecov.io/github/learningequality/morango?branch=master) +[![Python tests](https://github.com/learningequality/morango/actions/workflows/tox.yml/badge.svg?branch=release-v0.9.x)](https://github.com/learningequality/morango/actions) +[![PyPI](https://img.shields.io/pypi/v/morango.svg?color=blue)](https://pypi.org/project/morango/) [![image](https://readthedocs.org/projects/morango/badge/?version=latest)](http://morango.readthedocs.org/en/latest/) Morango is a pure-Python database replication engine for Django that supports peer-to-peer syncing of data. It is structured as a Django app that can be included in projects to make specific application models syncable. @@ -11,6 +11,7 @@ Developed in support of the [Kolibri](https://github.com/learningequality/kolibr - A certificate-based authentication system to protect privacy and integrity of data - A change-tracking system to support calculation of differences between databases across low-bandwidth connections - A set of constructs to support data partitioning +- Support for SQLite and PostgreSQL ## Developer documentation @@ -20,9 +21,9 @@ See [morango.readthedocs.io](https://morango.readthedocs.io) for documentation o To start contributing to Morango, first make sure you [have `uv` installed](https://docs.astral.sh/uv/getting-started/installation/). -Create a virtual environment, with at least python 3.9: +Create a virtual environment, which will create it in the `.venv/` directory, with the python version defined in `.python-version`: ```bash -uv venv -p 3.10 +uv venv ``` Then install dependencies: @@ -30,19 +31,26 @@ Then install dependencies: uv sync --all-extras ``` -If you get during installation, you may need to install system packages such as `openssl` and `libssl-dev`. +If you get errors during installation, you may need to install system packages such as `openssl` and `libssl-dev`. Finally, set up pre-commit hooks: ```bash prek install # with -f to reinstall ``` +### Building +Building the project is as easy as: +```bash +uv build +``` +Afterwards, you'll find a source archive and wheel file in `dist/`. + ### Docs To build and edit the docs, run: ```bash -# install requirements +# install requirements (if necessary) uv sync --extra docs # build docs diff --git a/pyproject.toml b/pyproject.toml index cc5f631..a1c0a18 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "morango" dynamic = ["version"] -description = "Pure Python sqlite-based Django DB replication engine." +description = "A pure Python DB replication engine for Django that supports SQLite and PostgreSQL." authors = [{name = "Learning Equality", email = "dev@learningequality.org"}] maintainers = [{name = "Learning Equality", email = "dev@learningequality.org"}] readme = "README.md"