Skip to content

Commit

Permalink
init OSS
Browse files Browse the repository at this point in the history
  • Loading branch information
genric committed Jul 24, 2024
1 parent 34186d6 commit 0aa7898
Show file tree
Hide file tree
Showing 97 changed files with 13,009 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.git
.tox
48 changes: 48 additions & 0 deletions .github/workflows/sdist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: sdist

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
release:
types:
- published

jobs:

build_sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build SDist
run: pipx run build --sdist

- name: Check metadata
run: pipx run twine check dist/*

- uses: actions/upload-artifact@v4
with:
name: build
path: dist

upload_sdist:
name: Upload sdist
needs: [build_sdist]
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- uses: actions/download-artifact@v4
with:
name: build
path: dist

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
38 changes: 38 additions & 0 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: tox

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
release:
types:
- published

jobs:
checks:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11', '3.12']

steps:

- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install tox-gh-actions
- name: Run tox
run: tox
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*.pyc
*.swp
coverage.xml
*.egg-info
.coverage
build/
dist/
doc/build
doc/source/generated
.tox
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "libsonata"]
path = libsonata
url = https://github.com/BlueBrain/libsonata.git
52 changes: 52 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[MESSAGES CONTROL]
disable=fixme,invalid-name,len-as-condition,no-else-return,no-member,empty-docstring

[FORMAT]
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# Maximum number of characters on a single line.
max-line-length=100

[DESIGN]
# Maximum number of arguments for function / method
max-args=8
# Argument names that match this expression will be ignored. Default to name
# with leading underscore
ignored-argument-names=_.*
# Maximum number of locals for function / method body
max-locals=15
# Maximum number of return / yield for function / method body
max-returns=6
# Maximum number of branch for function / method body
max-branches=12
# Maximum number of statements in function / method body
max-statements=50
# Maximum number of parents for a class (see R0901).
max-parents=7
# Maximum number of attributes for a class (see R0902).
max-attributes=40
# Minimum number of public methods for a class (see R0903).
min-public-methods=0
# Maximum number of public methods for a class (see R0904).
max-public-methods=60
# checks for similarities and duplicated code. This computation may be
# memory / CPU intensive, so you should disable it if you experiments some
# problems.
#

[SIMILARITIES]
# Minimum lines number of a similarity.
min-similarity-lines=25
# Ignore comments when computing similarities.
ignore-comments=yes
# Ignore docstrings when computing similarities.
ignore-docstrings=yes

[TYPECHECK]
# List of classes names for which member attributes should not be checked
# (useful for classes with attributes dynamically set).

#as of numpy 1.8.0, name resolution seems to be a problem. Ignore lookups in numpy
ignored-classes=numpy,list

extension-pkg-whitelist=numpy,lxml
25 changes: 25 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-lts-latest
tools:
python: "3.11"
apt_packages:
- graphviz

sphinx:
configuration: doc/source/conf.py
fail_on_warning: true

python:
install:
- method: pip
path: .
extra_requirements:
- docs
16 changes: 16 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Maintainer
----------
* BBP/NSE

Authors
-------
Adrien Christian Fleury
Eduard Subert
Eleftherios Zisis
Genrich Ivaska
Gianluca Ficarelli
Ilkan Fabrice Kiliç
Jaquier Aurélien Tristan
Joni Herttuainen
Marek Naskret
Mike Gevaert
10 changes: 10 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Changelog
=========

Version 4.0.0 (2024-07-25)
--------------------------

Improvements
~~~~~~~~~~~~

- Open source.
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM python:3.11-slim

ENV DEBIAN_FRONTEND=noninteractive

RUN ln -sf /usr/share/zoneinfo/Europe/Zurich /etc/localtime

RUN apt-get update && apt-get install -q -y --no-install-recommends curl rsync ssh jq htop

COPY requirements.txt /tmp

RUN apt-get install -q -y --no-install-recommends build-essential && \
pip install --no-cache-dir --upgrade setuptools pip && \
pip install --no-cache-dir -r /tmp/requirements.txt scikit-learn && \
apt-get purge -q -y --auto-remove build-essential

WORKDIR /home/bbp-workflow

COPY logging.cfg ./

ENV HOME=/home/bbp-workflow

COPY dist/* dist/
RUN pip install --no-cache-dir $(ls -t $PWD/dist/*.* | head -n 1)

ENTRYPOINT ["luigi", "--local-scheduler", "--logging-conf-file", "/home/bbp-workflow/logging.cfg", "--module"]
Loading

0 comments on commit 0aa7898

Please sign in to comment.