Setting up dev environment
We highly recommend to use Julius Haertl docker setup for Nextcloud dev setup.
Development of nc-py-api can be done on any OS as it is a pure Python package.
Suggested IDE: PyCharm, but of course you can use any IDE you like for this like VS Code or Vim.
Steps to setup up the development environment:
Setup Nextcloud locally or remotely.
Install AppAPI, follow it’s steps to register
deploy daemon
if needed.Clone the nc_py_api with shell:
git clone https://github.com/cloud-py-api/nc_py_api.git
Set current working dir to the root folder of cloned nc_py_api with shell:
cd nc_py_api
Create and activate Virtual Environment with shell:
python3 -m venv env
Activate Python Virtual Environment with shell:
source ./env/bin/activate
Update
pip
to the last version with pip:python3 -m pip install --upgrade pip
Install dev-dependencies with pip:
pip install ".[dev]"
Install pre-commit hooks with shell:
pre-commit install
If
deploy daemon
is registered for AppAPI, register nc_py_api as an application with shell:make register28
In
tests/gfixture.py
editNC_AUTH_USER
andNC_AUTH_PASS
, if they are different in your setup.Run tests to check that everything works with shell:
python3 -m pytest
Install documentation dependencies if needed with pip:
pip install ".[docs]"
You can easy build documentation with shell:
make docs
Your setup is ready for the developing nc_py_api and Applications based on it. Best of Luck!