Skip to content

Commit

Permalink
pyproject + github action
Browse files Browse the repository at this point in the history
  • Loading branch information
ldevillez committed May 3, 2023
1 parent a667650 commit 37c6725
Show file tree
Hide file tree
Showing 14 changed files with 1,052 additions and 14 deletions.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
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.

**Setup:**
- pySwTool version: [e.g. 0.1 or commit]
- Module: [e.g. clean-dxf]
- OS version: [e.g. Windows 11/macOS 12.6.3/Debian 11]
- Solidworks version: [2022 student] if relevent

**To Reproduce**
- Input file or ideally a minimal reproductible examble
- Output result
- Options


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

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
32 changes: 32 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

- [ ] Test A
- [ ] Test B


# Checklist:

- [ ] My code follows the style guidelines of this project (black/pylint)
- [ ] I have updated the changelog with the corresponding changes
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
10 changes: 10 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Formating with black

on: [pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
38 changes: 38 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Linting with Pylint
on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
name: Checks with pylint
steps:

- name: Install dependencies
run: sudo apt-get install libgirepository1.0-dev

- name: Checkout branch
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v35
with:
files: "**/*.py"

- name: Install python
if: steps.chaged-files.output.any_changed == 'true'
uses: actions/setup-python@v3
with:
python-version: 3.x


- run: pip install --upgrade pip
if: steps.chaged-files.output.any_changed == 'true'
- run: pip install .
if: steps.chaged-files.output.any_changed == 'true'
- run: pip install pylint==2.16.*
if: steps.chaged-files.output.any_changed == 'true'
- run: pylint --rcfile=pylintrc ${{ steps.changed-files.outputs.all_changed_files }}
if: steps.chaged-files.output.any_changed == 'true'
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
## [Unreleased]

### Added
- Adding `pyproject.toml`
- Adding issue and PR template
- Adding formating (black) and linting (pylint) github action

### Changed
- Changing the project from Ready-dxf to a collection of tools
### Deprecated
### Removed
- Removing `requirements.txt`

### Fixed
### Security

Expand All @@ -18,4 +24,4 @@

## V0.0 - 2022/05/10
### Added
- Proof of concept for Ready-dxf
- Proof of concept for Ready-dxf
5 changes: 3 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"""Docstring"""

import sys
import os
import ezdxf

from src.dxf_utilities import check_file_and_folder
from src.dxf_utilities import check_file_and_folder
from src.file_utilities import append_name


Expand Down
Loading

0 comments on commit 37c6725

Please sign in to comment.