diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..46b7ec6d --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,31 @@ +name: Test Coverage + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest coverage pytest-cov + pip install -e . + - name: Run tests with coverage + run: | + pytest --cov=./ --cov-report=xml + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.xml + fail_ci_if_error: true diff --git a/.gitignore b/.gitignore index 23a27c40..4a6890c5 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ Thumbs.db htmlcov/ .coverage .coverage.* +coverage.xml # Log files logs/ @@ -55,4 +56,3 @@ examples/markdown/readme-edgecase.md readmeai/settings/prompts.toml readmeai/markdown/data/badges.json templates/ -.github/workflows/coverage.yml diff --git a/README.md b/README.md index 02d5d5e2..630a7dba 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Automatically generate beautiful README files using OpenAI's GPT language models Streamlines documentation creation and maintenance, enhancing developer productivity. README-AI aims to improve the adoption of open-source software, enabling all skill levels and disciplines to understand, utilize, and contribute to projects more effectively.
-> [!NOTE] +> [!IMPORTANT] > > This project is under development with an opinionated setup. It is vital to review the text generated by the OpenAI API to ensure it accurately represents your codebase.
diff --git a/pyproject.toml b/pyproject.toml index e261f10d..11a1ec33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "readmeai" -version = "0.4.062" +version = "0.4.065" description = "🚀 Generate beautiful README files from the terminal, powered by OpenAI's GPT language models 💫" authors = ["Eli <0x.eli.64s@gmail.com>"] license = "MIT" diff --git a/scripts/test.sh b/scripts/test.sh index 370a106d..db5fa8d1 100644 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -3,15 +3,11 @@ eval "$(conda shell.bash hook)" conda activate readmeai -# Set the directories to include in the coverage report source_dir="readmeai" - -# Set the directories to exclude from the coverage report omit_dir="tests" - -# Exclude __init__.py specifically omit_file="readmeai/__init__.py,readmeai/*/__init__.py" # Generate the coverage report and save it to a file +#pytest --cov=./ --cov-report=xml coverage run --source="$source_dir" --omit="$omit_dir" --omit="$omit_file" -m pytest -v coverage report --show-missing --fail-under=90