Skip to content

Commit

Permalink
Adding set-up files to repo
Browse files Browse the repository at this point in the history
  • Loading branch information
PovilasMat committed Sep 17, 2024
0 parents commit 2ff1ec6
Show file tree
Hide file tree
Showing 24 changed files with 1,907 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Deploy to GitHub Pages

permissions:
contents: write
pages: write

on:
push:
branches: [ "main", "master" ]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps: [uses: fastai/workflows/quarto-ghp@master]
7 changes: 7 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: CI
on: [workflow_dispatch, pull_request, push]

jobs:
test:
runs-on: ubuntu-latest
steps: [uses: fastai/workflows/nbdev-ci@master]
166 changes: 166 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
#dev
# NOTE: For .gitignore, order matters. The last match wins. meaning if you want to ignore a folder but keep something in the folder, first ignore the folder, then unignore the file.
.venv

token
# input/output is designed as a generic folder for input files if the config isn't adjusted. Because of this we want to ensure it's documented out. As it'll be an empty folder a .gitkeep file is used for git to maintain the structure.
input/*
!input/.gitkeep
output/*
!output/.gitkeep
# The config folder is intended to keep multiple program configs, these are sensitive to the system, a default is included for people to work off of while the others are hidden
config/*
# If you are using pypi integration
.pypirc

_proc/
# The following files ignored are part of a standard python project with minor additions
_docs/

*.bak
.gitattributes
.last_checked
.gitconfig
*.bak
*.log
*~
~*
_tmp*
tmp*
tags
*.pkg

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.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
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

*.swp

# osx generated files
.DS_Store
.DS_Store?
.Trashes
ehthumbs.db
Thumbs.db
.idea

# pytest
.pytest_cache

# tools/trust-doc-nbs
docs_src/.last_checked

# symlinks to fastai
docs_src/fastai
tools/fastai

# link checker
checklink/cookies.txt

# .gitconfig is now autogenerated
.gitconfig

# Quarto installer
.deb
.pkg

# Quarto
.quarto
8 changes: 8 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The MIT License (MIT)
Copyright © 2023 Statens Serum Institut

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.

THE 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.
7 changes: 7 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include settings.ini
include LICENSE
include CONTRIBUTING.md
include README.md
recursive-exclude * __pycache__
include bifrost_bridge/config/config.default.env
include bifrost_bridge/config/config.default.yaml
67 changes: 67 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# bifrost_bridge


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

This file will become your README and also the index of your
documentation.

## Developer Guide

If you are new to using `nbdev` here are some useful pointers to get you
started.

### Install bifrost_bridge in Development mode

``` sh
# make sure bifrost_bridge package is installed in development mode
$ pip install -e .

# make changes under nbs/ directory
# ...

# compile to have changes apply to bifrost_bridge
$ nbdev_prepare
```

## Usage

### Installation

Install latest from the GitHub
[repository](https://github.com/$GIT_USER_NAME/bifrost_bridge):

``` sh
$ pip install git+https://github.com/$GIT_USER_NAME/bifrost_bridge.git
```

or from [conda](https://anaconda.org/$GIT_USER_NAME/bifrost_bridge)

``` sh
$ conda install -c $GIT_USER_NAME bifrost_bridge
```

or from [pypi](https://pypi.org/project/bifrost_bridge/)

``` sh
$ pip install bifrost_bridge
```

### Documentation

Documentation can be found hosted on this GitHub
[repository](https://github.com/$GIT_USER_NAME/bifrost_bridge)’s
[pages](https://$GIT_USER_NAME.github.io/bifrost_bridge/). Additionally
you can find package manager specific guidelines on
[conda](https://anaconda.org/$GIT_USER_NAME/bifrost_bridge) and
[pypi](https://pypi.org/project/bifrost_bridge/) respectively.

## How to use

Fill me in please! Don’t forget code examples:

``` python
1+1
```

2
1 change: 1 addition & 0 deletions bifrost_bridge/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.0.1"
17 changes: 17 additions & 0 deletions bifrost_bridge/_modidx.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Autogenerated by nbdev

d = { 'settings': { 'branch': 'main',
'doc_baseurl': '/bifrost_bridge',
'doc_host': 'https://$GIT_USER_NAME.github.io',
'git_url': 'https://github.com/$GIT_USER_NAME/bifrost_bridge',
'lib_path': 'bifrost_bridge'},
'syms': { 'bifrost_bridge.core': { 'bifrost_bridge.core.cli': ('core.html#cli', 'bifrost_bridge/core.py'),
'bifrost_bridge.core.get_config': ('core.html#get_config', 'bifrost_bridge/core.py'),
'bifrost_bridge.core.get_samplesheet': ('core.html#get_samplesheet', 'bifrost_bridge/core.py'),
'bifrost_bridge.core.hello_world': ('core.html#hello_world', 'bifrost_bridge/core.py'),
'bifrost_bridge.core.set_env_variables': ('core.html#set_env_variables', 'bifrost_bridge/core.py'),
'bifrost_bridge.core.show_project_env_vars': ( 'core.html#show_project_env_vars',
'bifrost_bridge/core.py')},
'bifrost_bridge.hello_world': { 'bifrost_bridge.hello_world.cli': ('hello_world.html#cli', 'bifrost_bridge/hello_world.py'),
'bifrost_bridge.hello_world.hello_two_world': ( 'hello_world.html#hello_two_world',
'bifrost_bridge/hello_world.py')}}}
24 changes: 24 additions & 0 deletions bifrost_bridge/config/config.default.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# environmental (ENV) variables. These are written as BIFROST_BRIDGE_VARIABLENAME=VALUE to avoid conflicts with other ENV variables.
# Using the standard template these values can be overwritten by:
# - defining BIFROST_BRIDGE_CONFIG_FILE pointing to a similar file with a subset of values
# - setting the values as environmental variables.
# The priority goes env variables > config file > default file.
# The all configs other than config.default.env are in .gitignore
# All .env config files should have an associated .yaml config file with it which the program interacts with.

# NOTE: remember if referencing another ENV var as a variable it needs to be defined first

# If more structured variables are needed use config.default.yaml or another of your own creation
# This file path is stored as CORE_CONFIG_FILE when overriding
# It is commented out because of the default use case, but should be included for all non default cases.
# CORE_YAML_CONFIG_FILE=
CORE_PROJECT_VARIABLE_PREFIX=BIFROST_BRIDGE_
# For testing purposes
CORE_TEST_VAR="Test"

# Example variable please exchange with relevant variables
BIFROST_BRIDGE_INPUT_DIR=./input
BIFROST_BRIDGE_OUTPUT_DIR=./output
BIFROST_BRIDGE_OUTPUT_FILE=${BIFROST_BRIDGE_OUTPUT_DIR}/output.txt
BIFROST_BRIDGE_USER_INPUT_NAME=Kim

9 changes: 9 additions & 0 deletions bifrost_bridge/config/config.default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# When accessing this in the code you'll work with it as a dict.
# ENV variables will be replaced with their values. This is done with the envyaml package that is in the code template `load_config`.
# By convention all variables for the project should have the BIFROST_BRIDGE_* prefix.
# e.g
# name: ${BIFROST_BRIDGE_NAME}
example:
input:
name: ${BIFROST_BRIDGE_USER_INPUT_NAME}
alternative_name: Lee
Loading

0 comments on commit 2ff1ec6

Please sign in to comment.