Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusBC59 committed Apr 5, 2023
0 parents commit 19c12d4
Show file tree
Hide file tree
Showing 37 changed files with 3,461 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
versioneercheck/_version.py export-subst
13 changes: 13 additions & 0 deletions .github/actions/install-dependencies-and-qstream/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Install-dependencies-and-qstream"
description: "Install qstream and its dependencies"
runs:
using: "composite"
steps:
- name: Install-dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
pip install -r test_requirements.txt
pip install -r docs_requirements.txt
pip install -e .
shell: bash
63 changes: 63 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Python application

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.9]
env:
DISPLAY: ':99.0'

steps:
- name: setup ubuntu-latest xvfb
run: |
sudo apt install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: ./.github/actions/install-dependencies-and-qstream
- name: disable_telemetry
shell: bash -l {0}
run: sed -i "s/\(enabled *= *\).*/\1False/" ./qstream/conf/telemetry.ini

- name: Run Mypy
run: mypy qstream
- name: Test with pytest
run: |
pytest ./qstream/tests/
- uses: r-lib/actions/setup-pandoc@v1
with:
pandoc-version: '2.7.3' # The pandoc version to download (if necessary) and use.
- name: Build The Docs
shell: bash
run: |
cd docs &&
export SPHINXOPTS="-W -v" &&
make html
- name: Deploy
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/_build/html # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch






92 changes: 92 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# .pyenv file
.python-version

# ipython extras
.ipynb_checkpoints/

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
.pytest_cache/*

nosetests.xml
coverage.xml
*,cover
.hypothesis

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/
docs/_notebooks
docs/api/generated/
docs/_auto

# PyBuilder
target/

# Generated data
*.csv
*.data
*.dat
*.hdf5
*.json

# Temporary files
*.md~
*.py~
tmp/
.#*
.mypy_cache/*

docs/examples/data/*

.idea/
.vscode/
.ionide/

# Mac files
.DS_Store
23 changes: 23 additions & 0 deletions LICENSE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Copyright (c) Rasmus Bjerregaard Christensen.

qstream is available under the `MIT open-source
license <https://opensource.org/licenses/MIT>`__ :

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include versioneer.py
include versioneercheck/_version.py
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# qstream

# Description

# Installation

# Usage

## Running the tests

If you have gotten 'qstream' from source, you may run the tests locally.

Install `qstream` along with its test dependencies into your virtual environment by executing the following in the root folder

```bash
$ pip install .
$ pip install -r test_requirements.txt
```

Then run `pytest` in the `tests` folder.

## Building the documentation

If you have gotten `qstream` from source, you may build the docs locally.

Install `qstream` along with its documentation dependencies into your virtual environment by executing the following in the root folder

```bash
$ pip install .
$ pip install -r docs_requirements.txt
```

You also need to install `pandoc`. If you are using `conda`, that can be achieved by

```bash
$ conda install pandoc
```
else, see [here](https://pandoc.org/installing.html) for pandoc's installation instructions.

Then run `make html` in the `docs` folder. The next time you build the documentation, remember to run `make clean` before you run `make html`.
35 changes: 35 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Makefile for Sphinx documentation
# for the qstream package
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile clean genapi htmlfast

clean:
rm -rf $(BUILDDIR)/*
rm -rf _auto
rm -rf api/generated
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

# generate api docs
genapi:
sphinx-apidoc -o _auto -d 10 ../qstream
mkdir -p api/generated/
cp _auto/* api/generated/

# faster build by skipping execution of all notebooks
htmlfast: genapi
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -D nbsphinx_execute=never

html: genapi
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
1 change: 1 addition & 0 deletions docs/_static/readme
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This folder can hold images and other static files for the qstream docs.
3 changes: 3 additions & 0 deletions docs/_static/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.wy-nav-content {
max-width: 1000px !important;s
}
15 changes: 15 additions & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
**************************************************
qstream API Documentation
**************************************************


This page documents the qstream API.

API
---

.. toctree::
:maxdepth: 4
:includehidden:

generated/modules
Loading

0 comments on commit 19c12d4

Please sign in to comment.