Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MariellaCC committed Nov 23, 2023
0 parents commit 8c10ef9
Show file tree
Hide file tree
Showing 52 changed files with 2,552 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"template": "https://github.com/DHARPA-Project/kiara_plugin.develop.git",
"commit": "e2d43d57283f53eaf5144915075567eff38d738a",
"checkout": null,
"context": {
"cookiecutter": {
"full_name": "Mariella De Crouy Chanel",
"email": "mariella.decrouychanel@uni.lu",
"project_name": "topic_modelling",
"project_slug": "topic_modelling",
"project_short_description": "A Kiara plugin toho create a Topic Modelling workflow.",
"github_user": "DHARPA-Project",
"anaconda_user": "dharpa",
"_template": "https://github.com/DHARPA-Project/kiara_plugin.develop.git"
}
},
"directory": null
}
3 changes: 3 additions & 0 deletions .envrc.disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
layout python3
# or, uncomment for specific 'base'-version of python, e.g.:
# layout python "$HOME/.asdf/installs/python/3.9.2/bin/python"
1 change: 1 addition & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/suggest-a-module.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Suggest a module
about: Suggest a new module for kiara
title: ''
labels: ''
assignees: ''

---

**Module description**
A description of the module, this will be copied into the actual module later on, so make sure you explain the module purpose with kiara users in mind. Use a short one-sentence overview as the first paragraph, then use as many paragraphs as you need to explain the module purpose and what it does.

**Inputs**
List all the inputs this module would need, along with their types, a short description, and whether they are required or should have default values. It can be assumed that a graph will always be an input, so you can skip that.

**Outupts**
List all the outputs this module would produce, along with their types and a short description of what they are.

**Example code**
If you have example code how to do what you are proposing to do, copy and paste it here.
26 changes: 26 additions & 0 deletions .github/workflows/build-darwin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "darwin tests for 'kiara_plugin.topic_modelling'"
# This workflow is triggered on pushes to the repository.
on: [push]
env:
DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer
MACOSX_DEPLOYMENT_TARGET: 10.15

jobs:
test-darwin:
name: pytest on darwin
runs-on: macos-11
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: "Set up Python ${{ matrix.python_version }}"
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python_version }}"
- uses: actions/checkout@v3
- name: install kiara_plugin.topic_modelling
run: pip install -U --extra-index-url https://pypi.fury.io/dharpa/ .[all,dev_testing]
- name: display installed kiara and module package versions
run: pip list | grep kiara
- name: Test with pytest
run: make test
190 changes: 190 additions & 0 deletions .github/workflows/build-linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
name: "linux tests and documentation builds for 'kiara_plugin.topic_modelling'"
# This workflow is triggered on pushes to the repository.
on: [push]

jobs:

# commitlint:
# name: lint commit message
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - uses: wagoid/commitlint-github-action@v4

test-linux:
name: pytest on linux
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: "Set up Python ${{ matrix.python_version }}"
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python_version }}"
- uses: actions/checkout@v3
- name: install kiara_plugin.topic_modelling
run: pip install -U .[all,dev_testing]
- name: display installed kiara and module package versions
run: pip list | grep kiara
- name: Test with pytest
run: make test

# Uncomment this if you have coveralls.io setup with this repo
# coverage:
# name: create and publish test coverage
# runs-on: ubuntu-latest
# steps:
# - name: "Set up Python 3.9"
# uses: actions/setup-python@v4
# with:
# python-version: "3.9"
# - uses: actions/checkout@v3
# - name: install kiara
# run: pip install -U .[all,dev_testing]
# - name: display installed kiara and module package versions
# run: pip list | grep kiara
# - name: Run coverage
# run: coverage run -m pytest tests
# - name: coveralls
# uses: coverallsapp/github-action@v2

# Uncomment this if you want to run mypy
# mypy-linux:
# name: mypy check on linux
# runs-on: ubuntu-latest
# strategy:
# matrix:
# python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
# steps:
# - name: "Set up Python ${{ matrix.python_version }}"
# uses: actions/setup-python@v4
# with:
# python-version: "${{ matrix.python_version }}"
# - uses: actions/checkout@v3
# - name: install kiara_plugin.topic_modelling
# run: pip install -U .[all,dev_testing]
# - name: Test with mypy
# run: make mypy

linting-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: pip cache
id: pip-cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.*') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U ruff
# Include `--format=github` to enable automatic inline annotations.
- name: Run Ruff
run: ruff --output-format=github src/

build_python_package:
name: build python package
runs-on: ubuntu-latest
needs:
- test-linux
# - mypy-linux
# - linting-linux
steps:
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: install pip
run: pip install -U pip setuptools setuptools_scm build
- name: create packages
run: python -m build
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
name: build-dists
path: dist/

release_python_package:
name: publish python package to pypi
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs:
- build_python_package
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Retrieve build distributions
uses: actions/download-artifact@v3
with:
name: build-dists
path: dist/
- name: publish to PyPI # make sure you have pypi trusted publishing configured for this repo
uses: pypa/gh-action-pypi-publish@release/v1

build_and_release_conda_package:
name: conda package build (and upload if release)
runs-on: ubuntu-latest
needs:
- test-linux
# - mypy-linux # uncomment if this step is enabled
# - linting-linux # uncomment if this step is enabled
steps:
- name: "Set up Python 3.11"
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: pip cache
id: pip-cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.*') }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: install kiara
run: pip install kiara
- name: install required plugin packages
run: pip install git+https://github.com/DHARPA-Project/kiara_plugin.develop.git@develop
- name: build conda package
if: ${{ ( github.ref == 'refs/heads/develop') }}
run: kiara conda build-package --patch-data ci/conda/conda-pkg-patch.yaml .
- name: extract tag name
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: build & publish conda package
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: kiara conda build-package --publish --user dharpa --token ${{ secrets.ANACONDA_PUSH_TOKEN }} --patch-data ci/conda/conda-pkg-patch.yaml .

merge_tag_to_main:
name: merge current tag to main branch
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs:
- release_python_package
- build_and_release_conda_package
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git config --global user.email "markus@frkl.io"
- run: git config --global user.name "Markus Binsteiner"
- name: extract tag name
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: checkout main branch
run: git checkout main
- name: merge tag
run: git merge "${RELEASE_VERSION}"
- name: push updated main branch
run: git push https://${{ secrets.GITHUB_TOKEN }}@github.com/DHARPA-Project/kiara_plugin.topic_modelling.git
21 changes: 21 additions & 0 deletions .github/workflows/build-windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "windows tests for 'kiara_plugin.topic_modelling'"
# This workflow is triggered on pushes to the repository.
on: [push]

jobs:
test-windows:
name: pytest on windows
runs-on: windows-latest
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: "Set up Python ${{ matrix.python_version }}"
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python_version }}"
- uses: actions/checkout@v3
- name: install kiara_plugin.topic_modelling
run: pip install -U --extra-index-url https://pypi.fury.io/dharpa/ .[all,dev_testing]
- name: Test with pytest
run: make test
67 changes: 67 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Temporary and binary files
*~
*.py[cod]
*.so
*.cfg
!.isort.cfg
!setup.cfg
*.orig
*.log
*.pot
__pycache__/*
.cache/*
.*.swp
*/.ipynb_checkpoints/*

# Project files
.ropeproject
.project
.pydevproject
.settings
.idea
tags

# Package files
*.egg
*.eggs/
.installed.cfg
*.egg-info

# Unittest and coverage
htmlcov/*
.coverage
.coverage.*
.tox
junit.xml
coverage.xml
.pytest_cache/

# Build and docs folder/files
/build/*
/dist/*
sdist/*
cover/*
MANIFEST

# Per-project virtualenvs
.venv*/
pip-wheel-metadata/
.python-version
src/kiara_plugin/topic_modelling/version.txt
.direnv
public
site
.dephell_report
.mypy_cache
.env
docs/api-documentation.md
.frkl
.envrc
build.sh
onefile.spec
*_complete.zsh.zwc
ci/conda/**/build
ci/conda/kiara_plugin.topic_modelling/meta.yaml
.pixi
pixi.lock
dev.py
Loading

0 comments on commit 8c10ef9

Please sign in to comment.