File tree Expand file tree Collapse file tree 9 files changed +972
-0
lines changed
Expand file tree Collapse file tree 9 files changed +972
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will upload a Python Package using Twine when a release is created
2+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+ # This workflow uses actions that are not certified by GitHub.
5+ # They are provided by a third-party and are governed by
6+ # separate terms of service, privacy policy, and support
7+ # documentation.
8+
9+ name : Upload Python Package
10+
11+ on :
12+ release :
13+ types : [published]
14+
15+ permissions :
16+ contents : read
17+
18+ jobs :
19+ deploy :
20+
21+ runs-on : ubuntu-latest
22+
23+ steps :
24+ - uses : actions/checkout@v3
25+ - name : Set up Python
26+ uses : actions/setup-python@v3
27+ with :
28+ python-version : ' 3.x'
29+ - name : Install dependencies
30+ run : |
31+ python -m pip install --upgrade pip
32+ python -m pip install flit
33+ flit install
34+ - name : Build package
35+ run : |
36+ flit build
37+ - name : Publish package
38+ uses : pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
39+ with :
40+ user : __token__
41+ password : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change 1+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+ name : Python testing
5+
6+ on :
7+ push :
8+ branches : [ "main" ]
9+ pull_request :
10+ branches : [ "main" ]
11+
12+ jobs :
13+ build :
14+ strategy :
15+ fail-fast : false
16+ matrix :
17+ os : [macos-latest, windows-latest, ubuntu-latest]
18+ python-version : ["3.10", "3.11", "3.12"]
19+ runs-on : ${{ matrix.os }}
20+ steps :
21+ - uses : actions/checkout@v3
22+ - name : Set up Python ${{ matrix.python-version }}
23+ uses : actions/setup-python@v3
24+ with :
25+ python-version : ${{ matrix.python-version }}
26+ - name : Install dependencies
27+ run : |
28+ python -m pip install --upgrade pip
29+ python -m pip install uv
30+ python -m uv pip install .
31+ python -m uv pip install black
32+ - name : Test black formatted
33+ run : |
34+ black src --check
35+ - name : Test with pytest
36+ run : |
37+ pytest
Original file line number Diff line number Diff line change 1+ # Project related
2+ Examples /* /models /*
3+
4+ # Byte-compiled / optimized / DLL files
5+ __pycache__ /
6+ * .py [cod ]
7+ * $py.class
8+
9+ # C extensions
10+ * .so
11+
12+ # Distribution / packaging
13+ .Python
14+ build /
15+ develop-eggs /
16+ dist /
17+ downloads /
18+ eggs /
19+ .eggs /
20+ lib /
21+ lib64 /
22+ parts /
23+ sdist /
24+ var /
25+ wheels /
26+ pip-wheel-metadata /
27+ share /python-wheels /
28+ * .egg-info /
29+ .installed.cfg
30+ * .egg
31+ MANIFEST
32+
33+ # PyInstaller
34+ # Usually these files are written by a python script from a template
35+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
36+ * .manifest
37+ * .spec
38+
39+ # Installer logs
40+ pip-log.txt
41+ pip-delete-this-directory.txt
42+
43+ # Unit test / coverage reports
44+ htmlcov /
45+ .tox /
46+ .nox /
47+ .coverage
48+ .coverage. *
49+ .cache
50+ nosetests.xml
51+ coverage.xml
52+ * .cover
53+ * .py,cover
54+ .hypothesis /
55+ .pytest_cache /
56+
57+ # Translations
58+ * .mo
59+ * .pot
60+
61+ # Django stuff:
62+ * .log
63+ local_settings.py
64+ db.sqlite3
65+ db.sqlite3-journal
66+
67+ # Flask stuff:
68+ instance /
69+ .webassets-cache
70+
71+ # Scrapy stuff:
72+ .scrapy
73+
74+ # Sphinx documentation
75+ docs /_build /
76+
77+ # PyBuilder
78+ target /
79+
80+ # Jupyter Notebook
81+ .ipynb_checkpoints
82+
83+ # IPython
84+ profile_default /
85+ ipython_config.py
86+
87+ # pyenv
88+ .python-version
89+
90+ # pipenv
91+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94+ # install all needed dependencies.
95+ # Pipfile.lock
96+
97+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
98+ __pypackages__ /
99+
100+ # Celery stuff
101+ celerybeat-schedule
102+ celerybeat.pid
103+
104+ # SageMath parsed files
105+ * .sage.py
106+
107+ # Environments
108+ .env
109+ .venv
110+ env /
111+ venv /
112+ ENV /
113+ env.bak /
114+ venv.bak /
115+
116+ # Spyder project settings
117+ .spyderproject
118+ .spyproject
119+
120+ # Rope project settings
121+ .ropeproject
122+
123+ # mkdocs documentation
124+ /site
125+
126+ # mypy
127+ .mypy_cache /
128+ .dmypy.json
129+ dmypy.json
130+
131+ # Pyre type checker
132+ .pyre /
133+ Examples /Example 2 /models /CB0.0.toml
You can’t perform that action at this time.
0 commit comments