Skip to content

Commit 15b80be

Browse files
committed
project with simple test
1 parent 68e67f6 commit 15b80be

File tree

12 files changed

+1637
-786
lines changed

12 files changed

+1637
-786
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Upload stl2step Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
deploy:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Python
18+
uses: actions/setup-python@v3
19+
with:
20+
python-version: '3.12'
21+
- name: Install dependencies
22+
run: |
23+
python3 -m pip install poetry
24+
poetry install --only main
25+
- name: Build package
26+
run: make build
27+
- name: Publish package
28+
run:
29+
poetry publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}
30+

.github/workflows/python-test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: stl2step
2+
3+
on:
4+
push:
5+
branches: [ "master", "ci" ]
6+
pull_request:
7+
branches: [ "master", "ci" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Set up Python 3.12
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: "3.12"
23+
- name: Install dependencies
24+
run: |
25+
python3 -m pip install poetry
26+
sudo apt-get install -y admesh
27+
poetry install
28+
- name: Lint with black and isort
29+
run: |
30+
make lint
31+
- name: Test with pytest
32+
run: |
33+
make test
34+

.gitignore

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
2+
# Created by https://www.gitignore.io/api/python
3+
# Edit at https://www.gitignore.io/?templates=python
4+
5+
### Python ###
6+
# Byte-compiled / optimized / DLL files
7+
__pycache__/
8+
*.py[cod]
9+
*$py.class
10+
11+
# C extensions
12+
*.so
13+
14+
# Distribution / packaging
15+
.Python
16+
build/
17+
develop-eggs/
18+
dist/
19+
downloads/
20+
eggs/
21+
.eggs/
22+
lib/
23+
lib64/
24+
parts/
25+
sdist/
26+
var/
27+
wheels/
28+
pip-wheel-metadata/
29+
share/python-wheels/
30+
*.egg-info/
31+
.installed.cfg
32+
*.egg
33+
MANIFEST
34+
35+
# PyInstaller
36+
# Usually these files are written by a python script from a template
37+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
38+
*.manifest
39+
*.spec
40+
41+
# Installer logs
42+
pip-log.txt
43+
pip-delete-this-directory.txt
44+
45+
# Unit test / coverage reports
46+
htmlcov/
47+
.tox/
48+
.nox/
49+
.coverage
50+
.coverage.*
51+
.cache
52+
nosetests.xml
53+
coverage.xml
54+
*.cover
55+
.hypothesis/
56+
.pytest_cache/
57+
58+
# Translations
59+
*.mo
60+
*.pot
61+
62+
# Scrapy stuff:
63+
.scrapy
64+
65+
# Sphinx documentation
66+
docs/_build/
67+
68+
# PyBuilder
69+
target/
70+
71+
# pyenv
72+
.python-version
73+
74+
# pipenv
75+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
76+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
77+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
78+
# install all needed dependencies.
79+
#Pipfile.lock
80+
81+
# celery beat schedule file
82+
celerybeat-schedule
83+
84+
# SageMath parsed files
85+
*.sage.py
86+
87+
# Spyder project settings
88+
.spyderproject
89+
.spyproject
90+
91+
# Rope project settings
92+
.ropeproject
93+
94+
# Mr Developer
95+
.mr.developer.cfg
96+
.project
97+
.pydevproject
98+
99+
# mkdocs documentation
100+
/site
101+
102+
# mypy
103+
.mypy_cache/
104+
.dmypy.json
105+
dmypy.json
106+
107+
# Pyre type checker
108+
.pyre/
109+
110+
# End of https://www.gitignore.io/api/python
111+
travis.log
112+
*.swp
113+
114+
115+
116+
*.stl
117+
*.step

0 commit comments

Comments
 (0)