Skip to content

Commit

Permalink
Deployed 08712cb with MkDocs version: 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed Aug 9, 2024
1 parent 3449af9 commit c471788
Show file tree
Hide file tree
Showing 6 changed files with 230 additions and 34 deletions.
3 changes: 3 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
<li class="nav-item">
<a href="/changelog/" class="nav-link">Changelog</a>
</li>
<li class="nav-item">
<a href="/contribute/" class="nav-link">Contribute</a>
</li>
<li class="nav-item">
<a href="/entities/" class="nav-link">Entities</a>
</li>
Expand Down
5 changes: 4 additions & 1 deletion changelog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
<li class="nav-item">
<a href="./" class="nav-link active" aria-current="page">Changelog</a>
</li>
<li class="nav-item">
<a href="../contribute/" class="nav-link">Contribute</a>
</li>
<li class="nav-item">
<a href="../entities/" class="nav-link">Entities</a>
</li>
Expand All @@ -57,7 +60,7 @@
</a>
</li>
<li class="nav-item">
<a rel="next" href="../entities/" class="nav-link">
<a rel="next" href="../contribute/" class="nav-link">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
Expand Down
205 changes: 205 additions & 0 deletions contribute/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
<!DOCTYPE html>
<html lang="en" data-bs-theme="light">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">



<link rel="shortcut icon" href="../img/favicon.ico">
<title>Contribute - bfabricPy docs</title>
<link href="../css/bootstrap.min.css" rel="stylesheet">
<link href="../css/fontawesome.min.css" rel="stylesheet">
<link href="../css/brands.min.css" rel="stylesheet">
<link href="../css/solid.min.css" rel="stylesheet">
<link href="../css/v4-font-face.min.css" rel="stylesheet">
<link href="../css/base.css" rel="stylesheet">
<link id="hljs-light" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css" >
<link id="hljs-dark" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github-dark.min.css" disabled>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
</head>

<body>
<div class="navbar fixed-top navbar-expand-lg navbar-dark bg-primary">
<div class="container">
<a class="navbar-brand" href="..">bfabricPy docs</a>
<!-- Expander button -->
<button type="button" class="navbar-toggler" data-bs-toggle="collapse" data-bs-target="#navbar-collapse" aria-controls="navbar-collapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<!-- Expanded navigation -->
<div id="navbar-collapse" class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li class="nav-item">
<a href=".." class="nav-link">Home</a>
</li>
<li class="nav-item">
<a href="../changelog/" class="nav-link">Changelog</a>
</li>
<li class="nav-item">
<a href="./" class="nav-link active" aria-current="page">Contribute</a>
</li>
<li class="nav-item">
<a href="../entities/" class="nav-link">Entities</a>
</li>
</ul>

<ul class="nav navbar-nav ms-md-auto">
<li class="nav-item">
<a href="#" class="nav-link" data-bs-toggle="modal" data-bs-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li class="nav-item">
<a rel="prev" href="../changelog/" class="nav-link">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li class="nav-item">
<a rel="next" href="../entities/" class="nav-link">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
</ul>
</div>
</div>
</div>

<div class="container">
<div class="row">
<div class="col-md-3"><div class="navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
<div class="navbar-header">
<button type="button" class="navbar-toggler collapsed" data-bs-toggle="collapse" data-bs-target="#toc-collapse" title="Table of Contents">
<span class="fa fa-angle-down"></span>
</button>
</div>


<div id="toc-collapse" class="navbar-collapse collapse card bg-body-tertiary">
<ul class="nav flex-column">

<li class="nav-item" data-bs-level="1"><a href="#contribute" class="nav-link">Contribute</a>
<ul class="nav flex-column">
<li class="nav-item" data-bs-level="2"><a href="#development-install" class="nav-link">Development install</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-bs-level="2"><a href="#running-tests" class="nav-link">Running tests</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-bs-level="2"><a href="#integration-tests" class="nav-link">Integration tests</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-bs-level="2"><a href="#documentation" class="nav-link">Documentation</a>
<ul class="nav flex-column">
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div></div>
<div class="col-md-9" role="main">

<h1 id="contribute">Contribute</h1>
<p>This page describes some information relevant for contruibuting to bfabricPy.</p>
<h2 id="development-install">Development install</h2>
<p>You should install the <code>dev</code> group as it contains some extra packages for running the tests.</p>
<pre><code class="language-bash">pip install -e &quot;.[dev]&quot;
</code></pre>
<h2 id="running-tests">Running tests</h2>
<p>With <code>nox</code> and <code>uv</code> installed, it is as simple as running <code>nox</code> in the project root without any arguments.</p>
<h2 id="integration-tests">Integration tests</h2>
<p>Note that integration tests have been moved to a separate repository. Please contact us if you are interested.</p>
<h2 id="documentation">Documentation</h2>
<p>We currently do not have a versioning solution for the documentation, but we can add that later once it is more mature.</p>
<pre><code class="language-bash"># To preview while you write it
mkdocs serve

# To publish after changes
mkdocs gh-deploy
</code></pre></div>
</div>
</div>

<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script src="../js/bootstrap.bundle.min.js"></script>
<script>
var base_url = "..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../js/base.js"></script>
<script src="../search/main.js"></script>

<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="searchModalLabel">Search</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>From here you can search these documents. Enter your search terms below.</p>
<form>
<div class="form-group">
<input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results" data-no-results-text="No results found"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>

</body>
</html>
7 changes: 5 additions & 2 deletions entities/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
<li class="nav-item">
<a href="../changelog/" class="nav-link">Changelog</a>
</li>
<li class="nav-item">
<a href="../contribute/" class="nav-link">Contribute</a>
</li>
<li class="nav-item">
<a href="./" class="nav-link active" aria-current="page">Entities</a>
</li>
Expand All @@ -52,7 +55,7 @@
</a>
</li>
<li class="nav-item">
<a rel="prev" href="../changelog/" class="nav-link">
<a rel="prev" href="../contribute/" class="nav-link">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
Expand Down Expand Up @@ -99,7 +102,7 @@ <h3 id="key-features">Key Features</h3>
<li><strong>No Circular Imports</strong>: Ensure there are no circular dependencies between entities by deferring imports of other entities inside modules until all relevant modules are processed.</li>
</ul>
<h3 id="entity">Entity</h3>
<p>Each entity has to provide the name of its B-Fabric of its class name as <code>ENDPOINT</code>.
<p>Each entity has to provide the name of its B-Fabric entity classname as <code>ENDPOINT</code>.
An entity is defined uniquely by its <code>classname</code> and <code>id</code>.</p>
<p>Entities are initialized with the full result structure obtained from a <code>read</code> operation on its particular endpoint.
A <code>return_id_only</code> result is generally not supposed to be used to initialize an entity instance and behavior is undefined as of now.
Expand Down
42 changes: 12 additions & 30 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
<li class="nav-item">
<a href="changelog/" class="nav-link">Changelog</a>
</li>
<li class="nav-item">
<a href="contribute/" class="nav-link">Contribute</a>
</li>
<li class="nav-item">
<a href="entities/" class="nav-link">Entities</a>
</li>
Expand Down Expand Up @@ -100,44 +103,23 @@ <h1 id="home">Home</h1>
<p>This package connects the <a href="https://fgcz-bfabric.uzh.ch/bfabric/">bfabric</a> system to the <a href="https://www.python.org/">python</a> and <a href="https://cran.r-project.org/">R</a> world while providing a JSON and REST interface using <a href="https://www.fullstackpython.com">Flask</a>.
The <a href="https://github.com/cpanse/bfabricShiny">bfabricShiny</a> R package is an extension and provides code snippets and sample implementation for a seamless R shiny bfabric integration.
For more advanced users the <em>bfabricPy</em> package also provides a powerful query interface on the command-line though using the provided scripts.</p>
<p>Please see below for how to install bfabricPy.</p>
<h2 id="installation">Installation</h2>
<p>The package can be installed like any other Python package, so if you are familiar you might not need to read this section.
Currently, it's only available from GitHub.</p>
<p>The best way to install the package depends on your use case, i.e. whether you want to:</p>
<ol>
<li>Use the command line scripts</li>
<li>Use the Python API</li>
<li>Develop on the package</li>
</ol>
<p>The command line scripts are currently included in all cases.</p>
<h3 id="command-line-scripts">Command line scripts</h3>
<p>To use the command line scripts, it's recommended to install <code>bfabricPy</code> with <a href="https://pipx.pypa.io/">pipx</a>.
If you don't have <code>pipx</code> installed, refer to the <a href="https://pipx.pypa.io/stable/installation/">pipx documentation</a> for instructions.</p>
<p>You can execute a command using a specific version of <code>bfabricPy</code> with the <code>pipx run</code> command.
This command handles the dependencies of multiple concurrent installations:</p>
<pre><code class="language-bash">pipx run --spec &quot;git+https://github.com/fgcz/bfabricPy.git@stable&quot; bfabric_read.py --help
</code></pre>
<p>To install a specific version of bfabricPy on your system and make the command available without <code>pipx run</code> prefix, use the following command:</p>
<p>The package is not available on PyPI as of now, but can be installed directly from GitHub and a <code>stable</code> branch is available for your convenience.</p>
<p>If you are only interested in running the command line scripts, installation with <code>pipx</code> is recommended as it will create a separate virtual environment for bfabricPy and make it possible to upgrade your installation later easily.</p>
<pre><code class="language-bash">pipx install &quot;git+https://github.com/fgcz/bfabricPy.git@stable&quot;
bfabric_read.py --help
</code></pre>
<h3 id="python-api">Python API</h3>
<p>If you're interested in using the Python API of <code>bfabricPy</code>, you have two options:</p>
<h4 id="1-configure-it-in-your-pyprojecttoml-file">1. Configure it in your <code>pyproject.toml</code> file.</h4>
<p>Note that <code>pipx</code> is also useful in scripts, if you want to run a particular version without forcing the global installation of that version (simply replace "stable" with a tag of your chosing):</p>
<pre><code class="language-bash">pipx run --spec &quot;git+https://github.com/fgcz/bfabricPy.git@stable&quot; bfabric_read.py --help
</code></pre>
<p>If you want to add it to a <code>pyproject.toml</code> the syntax for specifying a git dependency is as follows:</p>
<pre><code class="language-toml">[project]
dependencies = [
&quot;bfabricPy @ git+https://github.com/fgcz/bfabricPy.git@stable&quot;
]
</code></pre>
<h4 id="2-install-the-bfabricpy-package-directly-using-pip">2. Install the <code>bfabricPy</code> package directly using pip.</h4>
<pre><code class="language-bash">pip install git+https://github.com/fgcz/bfabricPy.git
</code></pre>
<h3 id="development">Development</h3>
<p>As a bfabricPy developer: (i.e. an editable install)</p>
<pre><code>pip install -e &quot;.[dev]&quot;
</code></pre>
<h2 id="configuration">Configuration</h2>
<p>Create a file as follows: (note: the password is not your login password, but the web service password)</p>
<p>Create a file as follows: (note: the password is not your login password, but the web service password available on your profile page)</p>
<pre><code># ~/.bfabricpy.yml

GENERAL:
Expand Down Expand Up @@ -235,5 +217,5 @@ <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>

<!--
MkDocs version : 1.6.0
Build Date UTC : 2024-08-09 13:34:50.206237+00:00
Build Date UTC : 2024-08-09 13:51:27.864325+00:00
-->
Loading

0 comments on commit c471788

Please sign in to comment.