-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs: commit febe947 made on 2024-11-16T18:28:10+00:00 from refs/head…
…s/main by bigcat88
- Loading branch information
0 parents
commit cd1882b
Showing
165 changed files
with
39,239 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 4c47e4092cf3a83ba1a1b7abf7bbb73f | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,208 @@ | ||
<!DOCTYPE html> | ||
<html class="writer-html5" lang="en" data-content_root="./"> | ||
<head> | ||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Setting up dev environment — NcPyApi 0.18.0 documentation</title> | ||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" /> | ||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" /> | ||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" /> | ||
<link rel="stylesheet" type="text/css" href="_static/tabs.css?v=4c969af8" /> | ||
<link rel="stylesheet" type="text/css" href="_static/autodoc_pydantic.css" /> | ||
<link rel="stylesheet" type="text/css" href="_static/css/styles.css?v=0f758665" /> | ||
<link rel="stylesheet" type="text/css" href="_static/css/dark.css?v=41caee7b" /> | ||
<link rel="stylesheet" type="text/css" href="_static/css/light.css?v=c3d70dd7" /> | ||
|
||
|
||
<!--[if lt IE 9]> | ||
<script src="_static/js/html5shiv.min.js"></script> | ||
<![endif]--> | ||
|
||
<script src="_static/jquery.js?v=5d32c60e"></script> | ||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> | ||
<script src="_static/documentation_options.js?v=ba2e7b09"></script> | ||
<script src="_static/doctools.js?v=9a2dae69"></script> | ||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script> | ||
<script src="_static/clipboard.min.js?v=a7894cd8"></script> | ||
<script src="_static/copybutton.js?v=f281be69"></script> | ||
<script src="_static/tabs.js?v=3ee01567"></script> | ||
<script src="_static/js/script.js?v=783f4f19"></script> | ||
<script src="_static/js/theme.js"></script> | ||
<link rel="index" title="Index" href="genindex.html" /> | ||
<link rel="search" title="Search" href="search.html" /> | ||
<link rel="next" title="AppAPI Benchmarks" href="benchmarks/AppAPI.html" /> | ||
<link rel="prev" title="Webhooks API" href="reference/Webhooks.html" /> | ||
</head> | ||
|
||
<body class="wy-body-for-nav"> | ||
<div class="wy-grid-for-nav"> | ||
<nav data-toggle="wy-nav-shift" class="wy-nav-side"> | ||
<div class="wy-side-scroll"> | ||
<div class="wy-side-nav-search" > | ||
|
||
|
||
|
||
<a href="index.html"> | ||
|
||
<img src="_static/logo.svg" class="logo" alt="Logo"/> | ||
</a> | ||
<div class="version"> | ||
0.18.0 | ||
</div> | ||
<div role="search"> | ||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get"> | ||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" /> | ||
<input type="hidden" name="check_keywords" value="yes" /> | ||
<input type="hidden" name="area" value="default" /> | ||
</form> | ||
</div> | ||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> | ||
<ul class="current"> | ||
<li class="toctree-l1"><a class="reference internal" href="Installation.html">Installation</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="FirstSteps.html">First steps</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="MoreAPIs.html">More APIs</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="NextcloudApp.html">Writing a Nextcloud Application</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="NextcloudApp3rdParty.html">Packaging 3rd party software as a Nextcloud Application</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="NextcloudTalkBot.html">Nextcloud Talk Bot API in Applications</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="NextcloudTalkBotTransformers.html">Talk Bot App with Transformers</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="NextcloudUiApp.html">Writing Nextcloud App with UI</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="Options.html">Options</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="reference/index.html">Reference</a></li> | ||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Setting up dev environment</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="benchmarks/AppAPI.html">AppAPI Benchmarks</a></li> | ||
</ul> | ||
|
||
</div> | ||
</div> | ||
</nav> | ||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > | ||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i> | ||
<a href="index.html">NcPyApi</a> | ||
</nav> | ||
|
||
<div class="wy-nav-content"> | ||
<div class="rst-content"> | ||
<div role="navigation" aria-label="Page navigation"> | ||
<ul class="wy-breadcrumbs"> | ||
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li> | ||
<li class="breadcrumb-item active">Setting up dev environment</li> | ||
<li class="wy-breadcrumbs-aside"> | ||
<a href="_sources/DevSetup.rst.txt" rel="nofollow"> View page source</a> | ||
</li> | ||
</ul> | ||
<hr/> | ||
</div> | ||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> | ||
<div itemprop="articleBody"> | ||
|
||
<section id="setting-up-dev-environment"> | ||
<h1>Setting up dev environment<a class="headerlink" href="#setting-up-dev-environment" title="Link to this heading"></a></h1> | ||
<p>We highly recommend to use <a class="reference external" href="https://github.com/juliushaertl/nextcloud-docker-dev">Julius Haertl docker setup</a> for Nextcloud dev setup.</p> | ||
<p>Development of <cite>nc-py-api</cite> can be done on any OS as it is a <strong>pure</strong> Python package.</p> | ||
<div class="admonition note"> | ||
<p class="admonition-title">Note</p> | ||
<p>We suggest to use <strong>PyCharm</strong>, but of course you can use any IDE you like for this like <strong>VS Code</strong> or <strong>Vim</strong>.</p> | ||
</div> | ||
<p>Steps to setup up the development environment:</p> | ||
<ol class="arabic"> | ||
<li><p>Setup Nextcloud locally or remotely.</p></li> | ||
<li><p>Install <a class="reference external" href="https://github.com/cloud-py-api/app_api">AppAPI</a>, follow it’s steps to register <code class="docutils literal notranslate"><span class="pre">deploy</span> <span class="pre">daemon</span></code> if needed.</p></li> | ||
<li><p>Clone the <a class="reference external" href="https://github.com/cloud-py-api/nc_py_api">nc_py_api</a> with <strong class="command">shell</strong>:</p> | ||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">cloud</span><span class="o">-</span><span class="n">py</span><span class="o">-</span><span class="n">api</span><span class="o">/</span><span class="n">nc_py_api</span><span class="o">.</span><span class="n">git</span> | ||
</pre></div> | ||
</div> | ||
</li> | ||
<li><p>Set current working dir to the root folder of cloned <strong>nc_py_api</strong> with <strong class="command">shell</strong>:</p> | ||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">nc_py_api</span> | ||
</pre></div> | ||
</div> | ||
</li> | ||
<li><p>Create and activate Virtual Environment with <strong class="command">shell</strong>:</p> | ||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">venv</span> <span class="n">env</span> | ||
</pre></div> | ||
</div> | ||
</li> | ||
<li><p>Activate Python Virtual Environment with <strong class="command">shell</strong>:</p> | ||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">source</span> <span class="o">./</span><span class="n">env</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">activate</span> | ||
</pre></div> | ||
</div> | ||
</li> | ||
<li><p>Update <code class="docutils literal notranslate"><span class="pre">pip</span></code> to the last version with <strong class="command">pip</strong>:</p> | ||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="o">--</span><span class="n">upgrade</span> <span class="n">pip</span> | ||
</pre></div> | ||
</div> | ||
</li> | ||
<li><p>Install dev-dependencies with <strong class="command">pip</strong>:</p> | ||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="s2">".[dev]"</span> | ||
</pre></div> | ||
</div> | ||
</li> | ||
<li><p>Install <cite>pre-commit</cite> hooks with <strong class="command">shell</strong>:</p> | ||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pre</span><span class="o">-</span><span class="n">commit</span> <span class="n">install</span> | ||
</pre></div> | ||
</div> | ||
</li> | ||
<li><p>Run <cite>nc_py_api</cite> with appropriate PyCharm configuration(<code class="docutils literal notranslate"><span class="pre">register_nc_py_api(xx)</span></code>) or if you are not using PyCharm execute this command in the <strong class="command">shell</strong>:</p> | ||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">APP_ID</span><span class="o">=</span><span class="n">nc_py_api</span> <span class="n">APP_PORT</span><span class="o">=</span><span class="mi">9009</span> <span class="n">APP_SECRET</span><span class="o">=</span><span class="mi">12345</span> <span class="n">APP_VERSION</span><span class="o">=</span><span class="mf">1.0.0</span> <span class="n">NEXTCLOUD_URL</span><span class="o">=</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">nextcloud</span><span class="o">.</span><span class="n">local</span> <span class="n">APP_HOST</span><span class="o">=</span><span class="mf">0.0.0.0</span> <span class="n">python3</span> <span class="n">tests</span><span class="o">/</span><span class="n">_install</span><span class="o">.</span><span class="n">py</span> | ||
</pre></div> | ||
</div> | ||
</li> | ||
<li><p>In a separate terminal while the <code class="docutils literal notranslate"><span class="pre">nc_py_api</span></code> <strong>_install.py</strong> script is running execute this command in the <strong class="command">shell</strong>:</p> | ||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">register28</span> | ||
</pre></div> | ||
</div> | ||
</li> | ||
<li><p>In <code class="docutils literal notranslate"><span class="pre">tests/gfixture.py</span></code> edit <code class="docutils literal notranslate"><span class="pre">NC_AUTH_USER</span></code> and <code class="docutils literal notranslate"><span class="pre">NC_AUTH_PASS</span></code>, if they are different in your setup.</p></li> | ||
<li><p>Run tests to check that everything works with <strong class="command">shell</strong>:</p> | ||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">pytest</span> | ||
</pre></div> | ||
</div> | ||
</li> | ||
<li><p>Install documentation dependencies if needed with <strong class="command">pip</strong>:</p> | ||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="s2">".[docs]"</span> | ||
</pre></div> | ||
</div> | ||
</li> | ||
<li><p>You can easy build documentation with <strong class="command">shell</strong>:</p> | ||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">docs</span> | ||
</pre></div> | ||
</div> | ||
</li> | ||
<li><p><strong>Your setup is ready for the developing nc_py_api and Applications based on it. Best of Luck!</strong></p></li> | ||
</ol> | ||
</section> | ||
|
||
|
||
</div> | ||
</div> | ||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer"> | ||
<a href="reference/Webhooks.html" class="btn btn-neutral float-left" title="Webhooks API" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a> | ||
<a href="benchmarks/AppAPI.html" class="btn btn-neutral float-right" title="AppAPI Benchmarks" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a> | ||
</div> | ||
|
||
<hr/> | ||
|
||
<div role="contentinfo"> | ||
<p>© Copyright 2024 NcPyApi Authors.</p> | ||
</div> | ||
|
||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a | ||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> | ||
provided by <a href="https://readthedocs.org">Read the Docs</a>. | ||
|
||
|
||
</footer> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
<script> | ||
jQuery(function () { | ||
SphinxRtdTheme.Navigation.enable(true); | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.