Skip to content

Commit

Permalink
Dev/0.2.0 (#32)
Browse files Browse the repository at this point in the history
* refactor: init

* feat: reworked pyproject and tests

* del: gitkeep

* feat: renamed folder

* feat: renamed module

* add: Readme:

* feat: updated poetry.lock

* docs: added base readme

* add: Add package jupyter and ipykernel

* Feat/core (#26)

* feat: added utils

* del: useless base class

* feat: aled

* add parsing path

* feat: added base plugin resolver

* del: useless folders

* feat: renamed import

* del: useless tests

* feat: added generic test

* feat: added path

* feat: updated pytest

* fmt: added logging

* test: revamped test_generic

* feat: added context functions

* fix: parse_plugins

* fix: useless PluginEntry functions

* test: generic_build

* feat: added handler

* feat: added file handler

* feat: dump file location

* feat: encapsulated common functions and organized imports

* feat: cleaned code and added docstrings

* feat: code duplication

* feat: multiple functions

* test: use generic plugin banners

* fix: allow the context to be ran

* fmt: added comment on test_generic_build

* docs: added some docstrings

* docs: added docstrings

* docs: examples

* fix: unused import

* feat: created abstract class Renderer

* test: render constructed context

* feat: created base Windows class

* add: Additional Format for jupyter notebook

* fix: Ajout d'un __getattr__ et recuperation des arguments pour les fonctions

RIEN n'est fait actuellement avec ses parametres

* add: Ajout de test pour le getattr

* fix: renderer using json and dataframe

* fix poetry : Probleme lors du build par la non présence du dossier de build necessaire à poetry (#23)

fix renderer : Probleme de typo

Co-authored-by: St0n14 <alexis.debrito@lgm.fr>

* Fix/rendering (#24)

* fix rendering : Le rendering est plus simple a utiliser
fix core : return Renderer() plutot que la data dans le getattr

* fix type :  fix type in both files

* fix docstring : fix docstring in renderer for each functions

---------

Co-authored-by: St0n14 <alexis.debrito@lgm.fr>

* fix: forget kwargs in base ^^

* fix base : Prameters to function ok

* fix test: Check pid 4

* fix typo : Typing add_arguments

* fix typo : add_arguments remove try except

* add test: add test for to_dict, to_json
fix rendering: fix rendering to return a proper dict instead of a list with a dict

* add tests: add some test to verify output of functions
add logging: add logger if the results of functions will not render a valid output due to functions parameters
fix base: function name not case sensitive

* fix issue with rendering

* ssssssssssss

* add lock file for poetry

* add dependancies : Juptyer IpyKernel

---------

Co-authored-by: std3 <67806187+standard3@users.noreply.github.com>
Co-authored-by: Br4guette <Br4guette@pm.me>
Co-authored-by: St0n14 <alexis.debrito@lgm.fr>

* Feat/core (#27)

* feat: added utils

* del: useless base class

* feat: aled

* add parsing path

* feat: added base plugin resolver

* del: useless folders

* feat: renamed import

* del: useless tests

* feat: added generic test

* feat: added path

* feat: updated pytest

* fmt: added logging

* test: revamped test_generic

* feat: added context functions

* fix: parse_plugins

* fix: useless PluginEntry functions

* test: generic_build

* feat: added handler

* feat: added file handler

* feat: dump file location

* feat: encapsulated common functions and organized imports

* feat: cleaned code and added docstrings

* feat: code duplication

* feat: multiple functions

* test: use generic plugin banners

* fix: allow the context to be ran

* fmt: added comment on test_generic_build

* docs: added some docstrings

* docs: added docstrings

* docs: examples

* fix: unused import

* feat: created abstract class Renderer

* test: render constructed context

* feat: created base Windows class

* add: Additional Format for jupyter notebook

* fix: Ajout d'un __getattr__ et recuperation des arguments pour les fonctions

RIEN n'est fait actuellement avec ses parametres

* add: Ajout de test pour le getattr

* fix: renderer using json and dataframe

* fix poetry : Probleme lors du build par la non présence du dossier de build necessaire à poetry (#23)

fix renderer : Probleme de typo

Co-authored-by: St0n14 <alexis.debrito@lgm.fr>

* Fix/rendering (#24)

* fix rendering : Le rendering est plus simple a utiliser
fix core : return Renderer() plutot que la data dans le getattr

* fix type :  fix type in both files

* fix docstring : fix docstring in renderer for each functions

---------

Co-authored-by: St0n14 <alexis.debrito@lgm.fr>

* fix: forget kwargs in base ^^

* fix base : Prameters to function ok

* fix test: Check pid 4

* fix typo : Typing add_arguments

* fix typo : add_arguments remove try except

* add test: add test for to_dict, to_json
fix rendering: fix rendering to return a proper dict instead of a list with a dict

* add tests: add some test to verify output of functions
add logging: add logger if the results of functions will not render a valid output due to functions parameters
fix base: function name not case sensitive

* fix rendering: to_dict -> to_list
fix rendering: rendering issue
add test: Linux is ok with an ISF at specified location

* Lock poetey dependancies

---------

Co-authored-by: std3 <67806187+standard3@users.noreply.github.com>
Co-authored-by: Br4guette <Br4guette@pm.me>
Co-authored-by: St0n14 <alexis.debrito@lgm.fr>

* fix: LOckfile

* Add/test (#28)

* rename test: rename test_core file
split test: split name of test files
fix rendering: beautify function in Rendering class

* add tests: add a pytest only for volatility windows functions

* [=] fix test_core_rendering : test_to_list not test_to_dict
[+] add fixture_test : add fixture for testing
[+] add logger_test : Add logger in begin of test
[+] add test_function : add more reliable
[+] fix test : check return, type, object and len of a return

* remove test_imports :Remove Useless Import

* remove test_imports :Remove Useless Import in rendering

* fix: Exception Handling to EN

---------

Co-authored-by: St0n14 <alexis.debrito@lgm.fr>

* fix docstring: For renderer add better docstring (#30)

Co-authored-by: St0n14 <alexis.debrito@lgm.fr>

* Create LICENSE

* fix rendering: change to_dataframe -> to_df
add doc: Add some documentations
fix doc: Old use of the lib

* Add Usage: Add usage and beautiful readme <3
add pakcage : Jupyter to use Jupyter-lab
add to_df_option : In the function to_df it's possible to specify if you want to print max rows or not

* docs: Add some explanations, index and begin tuto

* add : add files for workflow to push on pypi
fix : base

* add : config for testing

* add : documentation on test

* add : CICD Dev update

* fix : Cicd issue
fix mypy : Mypy type ignoring

---------

Co-authored-by: std3 <67806187+standard3@users.noreply.github.com>
Co-authored-by: Br4guette <Br4guette@pm.me>
Co-authored-by: St0n14 <alexis.debrito@lgm.fr>
  • Loading branch information
4 people authored Jun 27, 2024
1 parent 60ea754 commit 6737e53
Show file tree
Hide file tree
Showing 11 changed files with 301 additions and 257 deletions.
200 changes: 103 additions & 97 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -1,97 +1,103 @@
## This is a basic workflow to help you get started with Actions
#
#name: dev build CI
## Controls when the action will run.
#on:
# # Triggers the workflow on push or pull request events
# push:
# branches:
# - '*'
# pull_request:
# branches:
# - '*'
# # Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:
#
## A workflow run is made up of one or more jobs that can run sequentially or in parallel
#jobs:
# # This workflow contains a single job called "build"
# test:
# # The type of runner that the job will run on
# strategy:
# matrix:
# python-versions: ['3.10']
# os: [ubuntu-20.04]
# runs-on: ${{ matrix.os }}
# # map step outputs to job outputs so they can be share among jobs
# outputs:
# package_version: ${{ steps.variables_step.outputs.package_version }}
# package_name: ${{ steps.variables_step.outputs.package_name }}
# repo_name: ${{ steps.variables_step.outputs.repo_name }}
# repo_owner: ${{ steps.variables_step.outputs.repo_owner }}
#
# # Steps represent a sequence of tasks that will be executed as part of the job
# steps:
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - uses: actions/checkout@v2
# - uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-versions }}
#
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install poetry
# poetry install
#
# # declare package_version, repo_owner, repo_name, package_name so you may use it in web hooks.
# - name: Declare variables for convenient use
# id: variables_step
# run: |
# echo "::set-output name=repo_owner::${GITHUB_REPOSITORY%/*}"
# echo "::set-output name=repo_name::${GITHUB_REPOSITORY#*/}"
# echo "::set-output name=package_name::`poetry version | awk '{print $1}'`"
# echo "::set-output name=package_version::`poetry version --short`"
# shell: bash
#
# - name: test with tox
# run: pytest
#
# publish_dev_build:
# # if test failed, we should not publish
# needs: test
# # you may need to change os below
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-python@v2
# with:
# python-version: '3.9'
#
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install poetry
#
# - name: build documentation
# run: |
# poetry install -E doc
# poetry run mkdocs build
# git config --global user.name Docs deploy
# git config --global user.email docs@dummy.bot.com
# poetry run mike deploy -p -f --ignore "`poetry version --short`.dev"
# poetry run mike set-default -p "`poetry version --short`.dev"
#
# - name: Build wheels and source tarball
# run: |
# poetry version $(poetry version --short)-dev.$GITHUB_RUN_NUMBER
# poetry lock
# poetry build
#
# - name: publish to Test PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.TEST_PYPI_API_TOKEN}}
# repository_url: https://test.pypi.org/legacy/
# skip_existing: true
# This is a basic workflow to help you get started with Actions

name: dev build CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events
push:
branches:
- '*'
pull_request:
branches:
- '*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
test:
# The type of runner that the job will run on
strategy:
matrix:
python-versions: ['3.10']
# github action doesn't goes well with windows due to docker support
# github action doesn't goes well with macos due to `no docker command`
#os: [ubuntu-20.04, windows-latest, macos-latest]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
# map step outputs to job outputs so they can be share among jobs
outputs:
package_version: ${{ steps.variables_step.outputs.package_version }}
package_name: ${{ steps.variables_step.outputs.package_name }}
repo_name: ${{ steps.variables_step.outputs.repo_name }}
repo_owner: ${{ steps.variables_step.outputs.repo_owner }}

# uncomment the following to pickup services


# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-versions }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions poetry
# declare package_version, repo_owner, repo_name, package_name so you may use it in web hooks.
- name: Declare variables for convenient use
id: variables_step
run: |
echo "::set-output name=repo_owner::${GITHUB_REPOSITORY%/*}"
echo "::set-output name=repo_name::${GITHUB_REPOSITORY#*/}"
echo "::set-output name=package_name::`poetry version | awk '{print $1}'`"
echo "::set-output name=package_version::`poetry version --short`"
shell: bash

- name: test with tox
run: tox

publish_dev_build:
# if test failed, we should not publish
needs: test
# you may need to change os below
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry tox tox-gh-actions
- name: build documentation
run: |
poetry install -E doc
poetry run mkdocs build
git config --global user.name Docs deploy
git config --global user.email docs@dummy.bot.com
poetry run mike deploy -p -f --ignore "`poetry version --short`.dev"
poetry run mike set-default -p "`poetry version --short`.dev"
- name: Build wheels and source tarball
run: |
poetry version $(poetry version --short)-dev.$GITHUB_RUN_NUMBER
poetry lock
poetry build
- name: publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN}}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
186 changes: 93 additions & 93 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,93 +1,93 @@
## Publish package on release branch if it's tagged with 'v*'
#
#name: build & release
#
## Controls when the action will run.
#on:
# # Triggers the workflow on push or pull request events but only for the master branch
# push:
# branch: [main, master]
# tags:
# - 'v*'
#
# # Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:
#
## A workflow run is made up of one or more jobs that can run sequentially or in parallel
#jobs:
# release:
# runs-on: ubuntu-latest
#
# strategy:
# matrix:
# python-versions: ['3.10']
#
# # map step outputs to job outputs so they can be share among jobs
# outputs:
# package_version: ${{ steps.variables_step.outputs.package_version }}
# package_name: ${{ steps.variables_step.outputs.package_name }}
# repo_name: ${{ steps.variables_step.outputs.repo_name }}
# repo_owner: ${{ steps.variables_step.outputs.repo_owner }}
#
# # Steps represent a sequence of tasks that will be executed as part of the job
# steps:
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - uses: actions/checkout@v2
#
# - name: build change log
# id: build_changelog
# uses: mikepenz/release-changelog-builder-action@v3.2.0
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#
# - uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-versions }}
#
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install poetry
#
# # declare package_version, repo_owner, repo_name, package_name so you may use it in web hooks.
# - name: Declare variables for convenient use
# id: variables_step
# run: |
# echo "::set-output name=repo_owner::${GITHUB_REPOSITORY%/*}"
# echo "::set-output name=repo_name::${GITHUB_REPOSITORY#*/}"
# echo "::set-output name=package_name::`poetry version | awk '{print $1}'`"
# echo "::set-output name=package_version::`poetry version --short`"
# shell: bash
#
# - name: publish documentation
# run: |
# poetry install -E doc
# poetry run mkdocs build
# git config --global user.name Docs deploy
# git config --global user.email docs@dummy.bot.com
# poetry run mike deploy -p -f --ignore `poetry version --short`
# poetry run mike set-default -p `poetry version --short`
#
# - name: Build wheels and source tarball
# run: |
# poetry lock
# poetry build
#
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref_name }}
# release_name: Release ${{ github.ref_name }}
# body: ${{ steps.build_changelog.outputs.changelog }}
# draft: false
# prerelease: false
#
# - name: publish to PYPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}
# skip_existing: true
# Publish package on release branch if it's tagged with 'v*'

name: build & release

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branch: [main, master]
tags:
- 'v*'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
release:
runs-on: ubuntu-latest

strategy:
matrix:
python-versions: ['3.9']

# map step outputs to job outputs so they can be share among jobs
outputs:
package_version: ${{ steps.variables_step.outputs.package_version }}
package_name: ${{ steps.variables_step.outputs.package_name }}
repo_name: ${{ steps.variables_step.outputs.repo_name }}
repo_owner: ${{ steps.variables_step.outputs.repo_owner }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: build change log
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v3.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-versions }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox-gh-actions poetry
# declare package_version, repo_owner, repo_name, package_name so you may use it in web hooks.
- name: Declare variables for convenient use
id: variables_step
run: |
echo "::set-output name=repo_owner::${GITHUB_REPOSITORY%/*}"
echo "::set-output name=repo_name::${GITHUB_REPOSITORY#*/}"
echo "::set-output name=package_name::`poetry version | awk '{print $1}'`"
echo "::set-output name=package_version::`poetry version --short`"
shell: bash

- name: publish documentation
run: |
poetry install -E doc
poetry run mkdocs build
git config --global user.name Docs deploy
git config --global user.email docs@dummy.bot.com
poetry run mike deploy -p -f --ignore `poetry version --short`
poetry run mike set-default -p `poetry version --short`
- name: Build wheels and source tarball
run: |
poetry lock
poetry build
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
body: ${{ steps.build_changelog.outputs.changelog }}
draft: false
prerelease: false

- name: publish to PYPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true
2 changes: 2 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ and consists of four separate parts:
2. [How-To Guides](how-to-guides.md)
3. [Reference](reference/reference.md)
4. [Explanation](explanation.md)
5. [Test](test.md)


Quickly find what you're looking for depending on
your use case by looking at the different pages.
Loading

0 comments on commit 6737e53

Please sign in to comment.