molbo 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- molbo-0.1.0/.github/workflows/docs.yml +58 -0
- molbo-0.1.0/.github/workflows/publish.yml +50 -0
- molbo-0.1.0/.gitignore +2 -0
- molbo-0.1.0/PKG-INFO +50 -0
- molbo-0.1.0/README.md +31 -0
- molbo-0.1.0/docs/about/contributing.md +49 -0
- molbo-0.1.0/docs/about/identity.md +21 -0
- molbo-0.1.0/docs/about/installation.md +29 -0
- molbo-0.1.0/docs/about/license.md +12 -0
- molbo-0.1.0/docs/index.md +25 -0
- molbo-0.1.0/docs/static/molbo-logo.png +0 -0
- molbo-0.1.0/docs/static/molbo-mascot.png +0 -0
- molbo-0.1.0/docs/static/molbo-mascot.svg +12 -0
- molbo-0.1.0/docs/static/molbo-text.png +0 -0
- molbo-0.1.0/docs/usage/inputs.md +48 -0
- molbo-0.1.0/docs/usage/quickstart.md +44 -0
- molbo-0.1.0/docs/usage/sharing.md +69 -0
- molbo-0.1.0/mkdocs.yml +68 -0
- molbo-0.1.0/pyproject.toml +52 -0
- molbo-0.1.0/src/molbo/__init__.py +3 -0
- molbo-0.1.0/src/molbo/__main__.py +5 -0
- molbo-0.1.0/src/molbo/cli.py +353 -0
- molbo-0.1.0/src/molbo/server.py +358 -0
- molbo-0.1.0/src/molbo/vendor/LICENSE-molstar +21 -0
- molbo-0.1.0/src/molbo/vendor/LICENSE-qrcode-generator +21 -0
- molbo-0.1.0/src/molbo/vendor/molstar-4.5.0.css +1 -0
- molbo-0.1.0/src/molbo/vendor/molstar-4.5.0.js +2 -0
- molbo-0.1.0/src/molbo/vendor/qrcode-generator-2.0.4.min.js +8 -0
- molbo-0.1.0/src/molbo/viewer.html +449 -0
- molbo-0.1.0/tests/test_molbo.py +202 -0
- molbo-0.1.0/uv.lock +305 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: Deploy Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
pages: write
|
|
12
|
+
id-token: write
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: pages
|
|
16
|
+
cancel-in-progress: false
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout
|
|
24
|
+
uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: Set up Python
|
|
27
|
+
uses: actions/setup-python@v5
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.12"
|
|
30
|
+
|
|
31
|
+
- name: Set up uv
|
|
32
|
+
uses: astral-sh/setup-uv@v5
|
|
33
|
+
|
|
34
|
+
- name: Install docs dependencies
|
|
35
|
+
run: uv sync --group dev
|
|
36
|
+
|
|
37
|
+
- name: Build docs
|
|
38
|
+
run: uv run zensical build
|
|
39
|
+
|
|
40
|
+
- name: Configure Pages
|
|
41
|
+
uses: actions/configure-pages@v5
|
|
42
|
+
|
|
43
|
+
- name: Upload Pages artifact
|
|
44
|
+
uses: actions/upload-pages-artifact@v3
|
|
45
|
+
with:
|
|
46
|
+
path: site
|
|
47
|
+
|
|
48
|
+
deploy:
|
|
49
|
+
needs: build
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
environment:
|
|
52
|
+
name: github-pages
|
|
53
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
54
|
+
|
|
55
|
+
steps:
|
|
56
|
+
- name: Deploy to GitHub Pages
|
|
57
|
+
id: deployment
|
|
58
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types:
|
|
6
|
+
- published
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Set up Python
|
|
18
|
+
uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.12"
|
|
21
|
+
|
|
22
|
+
- name: Set up uv
|
|
23
|
+
uses: astral-sh/setup-uv@v5
|
|
24
|
+
|
|
25
|
+
- name: Build distributions
|
|
26
|
+
run: uv build
|
|
27
|
+
|
|
28
|
+
- name: Upload distributions
|
|
29
|
+
uses: actions/upload-artifact@v4
|
|
30
|
+
with:
|
|
31
|
+
name: dist
|
|
32
|
+
path: dist/*
|
|
33
|
+
|
|
34
|
+
publish:
|
|
35
|
+
needs: build
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
permissions:
|
|
38
|
+
id-token: write
|
|
39
|
+
environment:
|
|
40
|
+
name: pypi
|
|
41
|
+
|
|
42
|
+
steps:
|
|
43
|
+
- name: Download distributions
|
|
44
|
+
uses: actions/download-artifact@v4
|
|
45
|
+
with:
|
|
46
|
+
name: dist
|
|
47
|
+
path: dist
|
|
48
|
+
|
|
49
|
+
- name: Publish to PyPI
|
|
50
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
molbo-0.1.0/.gitignore
ADDED
molbo-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: molbo
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Inspect PDB/CIF molecular structures from the command line
|
|
5
|
+
Author: molbo contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: cif,cli,molbo,molecular,molstar,pdb,structure,viewer
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Requires-Dist: rich>=13.0.0
|
|
17
|
+
Requires-Dist: typer>=0.9.0
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# Molbo
|
|
21
|
+
|
|
22
|
+
[](https://pypi.org/project/molbo/) [](https://pypi.org/project/molbo/)
|
|
23
|
+
|
|
24
|
+
<p align="center">
|
|
25
|
+
<img src="docs/static/molbo-logo.png" width="50%" alt="poorly drawn molbo logo">
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
## Overview
|
|
29
|
+
|
|
30
|
+
`molbo` is a command-line launcher for interactive molecular structure viewing in [Mol*](https://molstar.org/). It accepts local structure files, remote structure URLs, 4-character PDB IDs, and starts a small HTTP server that serves a self-contained Mol* viewer from vendored frontend assets.
|
|
31
|
+
|
|
32
|
+
## Installation
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
uv tool install molbo
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
Opening a structure is as easy as:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
molbo structure.pdb
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Read [the documentation](https://leightonpayne.github.io/molbo/) for more information on what `molbo` can do.
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
`molbo` is released under the [MIT license](https://choosealicense.com/licenses/mit/). The package also vendors frontend assets available under the [MIT license](https://choosealicense.com/licenses/mit/). See `src/molbo/vendor/LICENSE-molstar` and `src/molbo/vendor/LICENSE-qrcode-generator` for more information.
|
molbo-0.1.0/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Molbo
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/molbo/) [](https://pypi.org/project/molbo/)
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<img src="docs/static/molbo-logo.png" width="50%" alt="poorly drawn molbo logo">
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
`molbo` is a command-line launcher for interactive molecular structure viewing in [Mol*](https://molstar.org/). It accepts local structure files, remote structure URLs, 4-character PDB IDs, and starts a small HTTP server that serves a self-contained Mol* viewer from vendored frontend assets.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
uv tool install molbo
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Opening a structure is as easy as:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
molbo structure.pdb
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Read [the documentation](https://leightonpayne.github.io/molbo/) for more information on what `molbo` can do.
|
|
28
|
+
|
|
29
|
+
## License
|
|
30
|
+
|
|
31
|
+
`molbo` is released under the [MIT license](https://choosealicense.com/licenses/mit/). The package also vendors frontend assets available under the [MIT license](https://choosealicense.com/licenses/mit/). See `src/molbo/vendor/LICENSE-molstar` and `src/molbo/vendor/LICENSE-qrcode-generator` for more information.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
icon: lucide/heart-handshake
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Contributing
|
|
6
|
+
|
|
7
|
+
Contributions to `molbo` are welcome.
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
git clone https://github.com/leightonpayne/molbo.git
|
|
12
|
+
cd molbo
|
|
13
|
+
uv sync
|
|
14
|
+
|
|
15
|
+
## Development Commands
|
|
16
|
+
|
|
17
|
+
| Command | Description |
|
|
18
|
+
| ----------------------- | --------------------------- |
|
|
19
|
+
| `uv run python -m unittest discover -s tests -v` | Run tests |
|
|
20
|
+
| `uv run zensical serve` | Serve docs locally |
|
|
21
|
+
| `uv run zensical build` | Build docs locally |
|
|
22
|
+
| `uv build` | Build sdist and wheel |
|
|
23
|
+
|
|
24
|
+
## Project Structure
|
|
25
|
+
|
|
26
|
+
src/molbo/
|
|
27
|
+
├── cli.py # Typer CLI entrypoint
|
|
28
|
+
├── server.py # Local HTTP server
|
|
29
|
+
├── viewer.html # Browser UI template
|
|
30
|
+
└── vendor/ # Vendored frontend assets
|
|
31
|
+
|
|
32
|
+
## Making Changes
|
|
33
|
+
|
|
34
|
+
1. Make changes in `src/molbo/`
|
|
35
|
+
2. Run the test suite
|
|
36
|
+
3. If you changed docs, preview them with Zensical
|
|
37
|
+
4. If you changed packaged assets or templates, check `uv build`
|
|
38
|
+
|
|
39
|
+
## Submitting Changes
|
|
40
|
+
|
|
41
|
+
1. Fork the repository
|
|
42
|
+
2. Create a feature branch
|
|
43
|
+
3. Make your changes
|
|
44
|
+
4. Run tests and linting
|
|
45
|
+
5. Submit a pull request
|
|
46
|
+
|
|
47
|
+
## Release Process
|
|
48
|
+
|
|
49
|
+
Maintainers should verify both the test suite and the built wheel before publishing a release.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
icon: lucide/paintbrush
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Identity
|
|
6
|
+
|
|
7
|
+
## Name
|
|
8
|
+
|
|
9
|
+
"Molbo" (/ˈmɔlˌpoˀ/) is a Danish cow's milk cheese made in Mols. For the purposes of this package, it is a portmanteau of *Mol\** and *browser*.
|
|
10
|
+
|
|
11
|
+
## Logo
|
|
12
|
+
|
|
13
|
+
The typeface is [Isobare](https://www.clemencefontaine.fr/page/isobar.html), designed by Clémence Fontaine and licensed under the [SIL Open Font License, Version 1.1](https://openfontlicense.org/).
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<img src="../../static/molbo-mascot.png" width="80" alt="Molbo mascot">
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
<img src="../../static/molbo-logo.png" width="200" alt="Molbo logo">
|
|
21
|
+
</p>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
icon: lucide/package
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Installation
|
|
6
|
+
|
|
7
|
+
## Install as a CLI tool with uv
|
|
8
|
+
|
|
9
|
+
For normal use, install `molbo` globally with `uv`:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
uv tool install molbo
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Development setup
|
|
16
|
+
|
|
17
|
+
If you are working from a clone of the repository:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
git clone https://github.com/leightonpayne/molbo.git
|
|
21
|
+
cd molbo
|
|
22
|
+
uv sync
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Run the CLI from the project environment with:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
uv run molbo
|
|
29
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
icon: lucide/scale
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# License
|
|
6
|
+
|
|
7
|
+
`molbo` is released under the MIT license.
|
|
8
|
+
|
|
9
|
+
The package also vendors frontend assets with their own license files:
|
|
10
|
+
|
|
11
|
+
- `src/molbo/vendor/LICENSE-molstar`
|
|
12
|
+
- `src/molbo/vendor/LICENSE-qrcode-generator`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
icon: lucide/house
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Molbo
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<img src="static/molbo-logo.png" width="50%" alt="molbo logo">
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
`molbo` is a command-line launcher for interactive molecular structure viewing in [Mol*](https://molstar.org/). It accepts local structure files, remote structure URLs, 4-character PDB IDs, and starts a small HTTP server that serves a self-contained Mol* viewer from vendored frontend assets.
|
|
14
|
+
|
|
15
|
+
## What it is for
|
|
16
|
+
|
|
17
|
+
`molbo` is meant to make it fast to go from a structure identifier or file on disk to an interactive browser session. It is useful both for private inspection on your own machine and for lightweight sharing through a tailnet, tunnel, or reverse proxy.
|
|
18
|
+
|
|
19
|
+
## Getting Started
|
|
20
|
+
|
|
21
|
+
Start with [Installation](about/installation.md), then see:
|
|
22
|
+
|
|
23
|
+
- [Quickstart](usage/quickstart.md)
|
|
24
|
+
- [Inputs](usage/inputs.md)
|
|
25
|
+
- [Sharing Sessions](usage/sharing.md)
|
|
Binary file
|
|
Binary file
|