Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/ruff-0.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ouhammmourachid authored Aug 28, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 5dd9b08 + 1af3fba commit 6f0007d
Showing 12 changed files with 99 additions and 46 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
This CODEOWNERS file is valid.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @ouhammmourachid
15 changes: 15 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Security Policy


## Supported Versions

We will endeavour to support:

* the most recent minor release with bug fixes
* the latest minor release from the last major version for 6 months after a new major version is released with critical bug fixes

## Reporting a Vulnerability

If you find what you think might be a security vulnerability with pydantic,
please do not create an issue on github. Instead please email [email protected]
I'll reply to your email promptly and try to get a patch out ASAP.
2 changes: 1 addition & 1 deletion .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ runs:
using: 'composite'
steps:
- name: install dependencies with Python ${{ inputs.python-version }}
uses: ouhammmourachid/poetry-install@v2
uses: ouhammmourachid/poetry-install@v2.0.0
with:
python-version: ${{ inputs.python-version }}
- name: Run test for python version ${{inputs.python-version}}
42 changes: 42 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CodeQL

on:
push:
branches-ignore:
- main
pull_request:
branches:
- main
schedule:
- cron: 40 4 * * 4

jobs:
analyze:
name: Analyze
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
security-events: write

# only required for workflows in private repositories
actions: read
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: python

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:python
17 changes: 11 additions & 6 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ on:
- main
paths:
- 'docs/**'
- 'README.md'

workflow_dispatch:

@@ -19,12 +20,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: change directory
run: cd docs
- name: change directory and sync index.md with README.md
run: |
cd docs
cp ../README.md pages/index.md
- uses: actions/setup-node@v3
with:
node-version: 16
- run: cd docs && yarn install --immutable
- run: cd docs && yarn vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- run: cd docs && yarn vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- run: cd docs && yarn vercel deploy --prod --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
- run: |
cd docs
yarn install --immutable
yarn vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
yarn vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
yarn vercel deploy --prod --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/make-lint.yml
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: install dependencies
uses: ouhammmourachid/poetry-install@v2
uses: ouhammmourachid/poetry-install@v2.0.0
- name: create test coverage.
run: make coverage
- name: upload coverage reports to Codecov
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ jobs:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: bump version
uses: ouhammmourachid/bumpversion-action@v1
uses: ouhammmourachid/bumpversion-action@v1.1.0
with:
bump-type: ${{ github.event.inputs.bump-type }}
github-token: ${{ secrets.TOKEN_PAT}}
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -23,9 +23,9 @@ publish:
test:
$(POETRY_RUN) pytest

.PHONY: install-pre-commit
install-pre-commit:
$(PRE_COMMIT_CMD) uninstall && $$(PRE_COMMIT_CMD) install
.PHONY: install/pre-commit
install/pre-commit:
$(PRE_COMMIT_CMD) uninstall && $(PRE_COMMIT_CMD) install

.PHONY: lint
lint:
@@ -53,7 +53,7 @@ help:
@echo " publish publish package"
@echo ""
@echo " test run tests"
@echo " install-pre-commit install pre-commit hooks"
@echo " install/pre-commit install pre-commit hooks"
@echo " lint run linters"
@echo " coverage run tests with coverage"
@echo ""
31 changes: 8 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,29 +2,14 @@

this package works as an interface for the famous mermaid-js library that uses scripts to create diagrams.

<p align="center">
<a href="https://codecov.io/gh/ouhammmourachid/mermaid-py">
<img src="https://codecov.io/gh/ouhammmourachid/mermaid-py/graph/badge.svg?token=732C2PA73Z"
alt="Code Coverage"></a>
<a href="https://github.com/ouhammmourachid/mermaid-py/blob/main/LICENSE" >
<img src="https://img.shields.io/github/license/ouhammmourachid/mermaid-py"
alt="GitHub LICENSE" /></a>
<a href="https://pypistats.org/packages/mermaid-py">
<img src="https://img.shields.io/pypi/dm/mermaid-py"
alt="Mounthly Download" /></a>
<a href="https://pypi.org/project/mermaid-py/">
<img src="https://img.shields.io/pypi/v/mermaid-py.svg?style=flat"
alt="latest version" /></a>
<a href="https://pypi.org/project/mermaid-py/">
<img src="https://img.shields.io/pypi/pyversions/mermaid-py"
alt="supported python version" /></a>
<a href="https://github.com/astral-sh/ruff">
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json"
alt="ruff badge"/></a>
<a href="https://snyk.io/advisor/python/mermaid-py">
<img src="https://snyk.io/advisor/python/mermaid-py/badge.svg"
alt="mermaid-py on snyk"/></a>
</p>
[![Code Coverage](https://codecov.io/gh/ouhammmourachid/mermaid-py/graph/badge.svg?token=732C2PA73Z)](https://codecov.io/gh/ouhammmourachid/mermaid-py)
[![GitHub LICENSE](https://img.shields.io/github/license/ouhammmourachid/mermaid-py)](https://github.com/ouhammmourachid/mermaid-py/blob/main/LICENSE)
[![Mounthly Download](https://img.shields.io/pypi/dm/mermaid-py)](https://pypistats.org/packages/mermaid-py)
[![latest version](https://img.shields.io/pypi/v/mermaid-py.svg?style=flat)](https://pypi.org/project/mermaid-py/)
[![supported python version](https://img.shields.io/pypi/pyversions/mermaid-py)](https://pypi.org/project/mermaid-py)
[![ruff badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![mermaid-py on snyk](https://snyk.io/advisor/python/mermaid-py/badge.svg)](https://snyk.io/advisor/python/mermaid-py)


## Description

15 changes: 14 additions & 1 deletion docs/pages/about.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# About

This is the about page! This page is shown on the navbar.

Mermaid-py is a Python library that allows you to generate diagrams and flowcharts using a simple and intuitive syntax.
It is based on the popular Mermaid.js library and provides a convenient way to create visual representations of complex
systems, processes, and relationships.
With Mermaid-py, you can easily create diagrams in various formats such as SVG, PNG, and PDF. It supports a wide range of
diagram types including flowcharts, sequence diagrams, Gantt charts, and more. The library is highly customizable,
allowing you to style and customize your diagrams to match your specific needs.

Whether you are a software developer, system architect, or technical writer, Mermaid-py can be a valuable tool in your
toolkit. It simplifies the process of creating and sharing visual representations of your ideas, making it easier for
others to understand and collaborate on your projects.

To get started with Mermaid-py, simply install the library using pip and import it into your Python project. Then,
you can start creating beautiful and informative diagrams with just a few lines of code.
1 change: 1 addition & 0 deletions docs/pages/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# README.md -> docs/pages/index.mdx
9 changes: 0 additions & 9 deletions docs/pages/index.mdx

This file was deleted.

0 comments on commit 6f0007d

Please sign in to comment.