Skip to content

Commit f887901

Browse files
committed
init
0 parents  commit f887901

26 files changed

+488
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Publish to PyPI and update files
2+
3+
# GitHub events that triggers the workflow:
4+
on:
5+
release:
6+
types:
7+
- published
8+
9+
jobs:
10+
call_tests_workflow:
11+
name: Test
12+
uses: ./.github/workflows/test.yaml
13+
14+
publish:
15+
name: Publish to PyPI
16+
needs: [call_tests_workflow]
17+
runs-on: ubuntu-latest
18+
environment: release
19+
20+
permissions:
21+
id-token: write
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
submodules: recursive
27+
28+
- name: Install Hatch
29+
uses: pypa/hatch@install
30+
31+
- name: Check if the release tag matches the version
32+
uses: samuelcolvin/[email protected]
33+
with:
34+
version_file_path: rendercv_tinytex/__init__.py
35+
36+
- name: Build
37+
run: |
38+
hatch build
39+
40+
- name: Upload package to PyPI
41+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Test
2+
3+
# GitHub events that triggers the workflow:
4+
on:
5+
push:
6+
branches: ["main"]
7+
pull_request:
8+
branches: ["main"]
9+
workflow_call: # to make the workflow triggerable from other workflows (publish-to-pypi.yaml)
10+
workflow_dispatch: # to make the workflow triggerable manually
11+
12+
# The workflow:
13+
jobs:
14+
test:
15+
name: Test
16+
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Install Hatch
22+
uses: pypa/hatch@install
23+
24+
- name: Test
25+
run: hatch run test.py3.13:test

.gitignore

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
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+
# UV
98+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
#uv.lock
102+
103+
# poetry
104+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105+
# This is especially recommended for binary packages to ensure reproducibility, and is more
106+
# commonly ignored for libraries.
107+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108+
#poetry.lock
109+
110+
# pdm
111+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112+
#pdm.lock
113+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114+
# in version control.
115+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116+
.pdm.toml
117+
.pdm-python
118+
.pdm-build/
119+
120+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121+
__pypackages__/
122+
123+
# Celery stuff
124+
celerybeat-schedule
125+
celerybeat.pid
126+
127+
# SageMath parsed files
128+
*.sage.py
129+
130+
# Environments
131+
.env
132+
.venv
133+
env/
134+
venv/
135+
ENV/
136+
env.bak/
137+
venv.bak/
138+
139+
# Spyder project settings
140+
.spyderproject
141+
.spyproject
142+
143+
# Rope project settings
144+
.ropeproject
145+
146+
# mkdocs documentation
147+
/site
148+
149+
# mypy
150+
.mypy_cache/
151+
.dmypy.json
152+
dmypy.json
153+
154+
# Pyre type checker
155+
.pyre/
156+
157+
# pytype static type analyzer
158+
.pytype/
159+
160+
# Cython debug symbols
161+
cython_debug/
162+
163+
# PyCharm
164+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166+
# and can be added to the global gitignore or merged into this file. For a more nuclear
167+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
168+
#.idea/
169+
170+
# PyPI configuration file
171+
.pypirc

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 to present RenderCV
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# rendercv-fonts
2+
3+
A Python package with some fonts for the `rendercv` package.

pyproject.toml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
[build-system]
2+
requires = ["hatchling==1.26.3"]
3+
build-backend = "hatchling.build"
4+
5+
[tool.hatch.build.targets.wheel]
6+
# In wheel, what do we want to include and exclude?
7+
packages = ["rendercv_fonts"]
8+
9+
[tool.hatch.version]
10+
path = "rendercv_fonts/__init__.py"
11+
12+
[project]
13+
name = 'rendercv-fonts'
14+
authors = [{ name = 'Sina Atalay', email = '[email protected]' }]
15+
description = 'Some fonts for RenderCV'
16+
license = "MIT"
17+
readme = "README.md"
18+
requires-python = '>=3.10'
19+
classifiers = [
20+
"Intended Audience :: Science/Research",
21+
"Intended Audience :: Education",
22+
]
23+
dynamic = ["version"]
24+
25+
[project.urls]
26+
Source = 'https://github.com/rendercv/rendercv-fonts'
27+
28+
# ======================================================================================
29+
# Virtual Environments Below ===========================================================
30+
# ======================================================================================
31+
32+
[tool.hatch.envs.default]
33+
installer = "uv"
34+
python = "3.13"
35+
dependencies = [
36+
"ruff", # to lint and format the code
37+
"black", # to format the code
38+
"ipython", # for ipython shell
39+
"pyright", # to check the types
40+
"pytest", # for testing
41+
]
42+
[tool.hatch.envs.default.scripts]
43+
format = "ruff check --fix && ruff format && black rendercv_fonts" # hatch run format
44+
lint = "ruff check" # hatch run lint
45+
check-types = "pyright rendercv_fonts" # hatch run check-types
46+
test = "pytest tests" # hatch run test
47+
48+
[tool.hatch.envs.test]
49+
template = "default"
50+
[[tool.hatch.envs.test.matrix]]
51+
python = ["3.10", "3.11", "3.12", "3.13"]
52+
53+
# ======================================================================================
54+
# Virtual Environments Above ===========================================================
55+
# ======================================================================================
56+
57+
[tool.ruff]
58+
line-length = 88
59+
60+
[tool.ruff.format]
61+
docstring-code-format = true
62+
63+
[tool.ruff.lint]
64+
extend-select = [
65+
"B", # flake8-bugbear
66+
"I", # isort
67+
"ARG", # flake8-unused-arguments
68+
"C4", # flake8-comprehensions
69+
"EM", # flake8-errmsg
70+
"ICN", # flake8-import-conventions
71+
"ISC", # flake8-implicit-str-concat
72+
"G", # flake8-logging-format
73+
"PGH", # pygrep-hooks
74+
"PIE", # flake8-pie
75+
"PL", # pylint
76+
"PT", # flake8-pytest-style
77+
"PTH", # flake8-use-pathlib
78+
"RET", # flake8-return
79+
"RUF", # Ruff-specific
80+
"SIM", # flake8-simplify
81+
"T20", # flake8-print
82+
"UP", # pyupgrade
83+
"YTT", # flake8-2020
84+
"EXE", # flake8-executable
85+
"NPY", # NumPy specific rules
86+
"PD", # pandas-vet
87+
]
88+
ignore = [
89+
"PLR", # Design related pylint codes
90+
"ISC001", # Conflicts with formatter
91+
"UP007", # I like Optional type
92+
"PGH003", # It would be nice to not ignore this
93+
]
94+
flake8-unused-arguments.ignore-variadic-names = true
95+
96+
[tool.black]
97+
line-length = 88 # maximum line length
98+
preview = true # to allow enable-unstable-feature
99+
enable-unstable-feature = [
100+
"string_processing",
101+
] # to break strings into multiple lines

0 commit comments

Comments
 (0)