-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from cav71/new-code
updates
- Loading branch information
Showing
12 changed files
with
551 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Pull-Request | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
env: | ||
PACKAGE: mono2repo | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Setup Python toolchain | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Python dependencies | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r tests/requirements.txt | ||
- name: Run Python checks (ruff) | ||
shell: bash | ||
env: | ||
PYTHONPATH: src | ||
run: | | ||
ruff check src tests | ||
- name: Run Python checks (mypy) | ||
shell: bash | ||
env: | ||
PYTHONPATH: src | ||
OUTDIR: build/qa-${{ matrix.python-version }}-${{ matrix.os}} | ||
run: | | ||
mypy src \ | ||
--no-incremental --xslt-html-report $OUTDIR/mypy | ||
- name: Run Python checks | ||
shell: bash | ||
env: | ||
PYTHONPATH: src | ||
OUTDIR: build/qa-${{ matrix.python-version }}-${{ matrix.os}} | ||
run: | | ||
py.test \ | ||
--cov=${{ env.PACKAGE }} \ | ||
--cov-report=html:$OUTDIR/coverage --cov-report=xml:$OUTDIR/coverage.xml \ | ||
--junitxml=$OUTDIR/junit/junit.xml --html=$OUTDIR/junit/junit.html --self-contained-html \ | ||
tests | ||
- name: Build wheel packages | ||
if: ${{ ! contains(matrix.os, 'windows') }} | ||
env: | ||
GITHUB_DUMP: ${{ toJson(github) }} | ||
run: | | ||
python -m build | ||
touch .keepme | ||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: qa-results-${{ matrix.python-version }}-${{ matrix.os }} | ||
path: | | ||
build/qa-${{ matrix.python-version }}-${{ matrix.os}} | ||
dist | ||
.keepme | ||
# Use always() to always run this step to publish test results when there are test failures | ||
if: always() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,89 @@ | ||
[build-system] | ||
requires = [ "setuptools", "setuptools-github", "wheel" ] | ||
build-backend = 'setuptools.build_meta' | ||
requires = ["setuptools>=68.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.black] | ||
|
||
[project] | ||
name = "mono2repo" | ||
version = "0.1.0" | ||
description = "create a standalone repo from a monorepo subdir." | ||
readme = "README.md" | ||
license = { text = "MIT" } | ||
requires-python = ">= 3.9" | ||
|
||
|
||
authors = [ | ||
{ name = "Antonio Cavallo", email = "[email protected]" }, | ||
] | ||
|
||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13", | ||
] | ||
|
||
[project.urls] | ||
Source = "https://github.com/cav71/mono2repo" | ||
Issues = "https://github.com/cav71/mono2repo/issues" | ||
Documentation = "https://github.com/cav71/mono2repo" | ||
|
||
[project.scripts] | ||
mono2repo = "mono2repo.mono2repo:main" | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
|
||
[tool.ruff] | ||
target-version = "py39" | ||
line-length = 88 | ||
src = ["src/mono2repo"] | ||
|
||
[tool.ruff.format] | ||
quote-style = "double" | ||
|
||
[tool.ruff.lint] | ||
ignore = [] | ||
select = ["F", "E", "W", "Q", "I001"] | ||
|
||
[tool.ruff.lint.isort] | ||
known-first-party = ["mono2repo"] | ||
|
||
[tool.mypy] | ||
disallow_untyped_defs = false | ||
follow_imports = "normal" | ||
ignore_missing_imports = true | ||
pretty = true | ||
show_column_numbers = true | ||
show_error_codes = true | ||
warn_no_return = false | ||
warn_unused_ignores = true | ||
exclude = [ | ||
"^make\\.py", | ||
"docs/conf\\.py", | ||
"^docs/\\.*", | ||
"^build/\\.*", | ||
] | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
|
||
[tool.coverage.paths] | ||
source = [ | ||
"src/", | ||
] | ||
|
||
[tool.coverage.report] | ||
exclude_lines = [ | ||
"no cov", | ||
"if __name__ == .__main__.:", | ||
"if TYPE_CHECKING:", | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
markers = [ | ||
"manual: marks tests unsafe for auto-run (eg. better run them manually)", | ||
] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
__version__ = "" | ||
__hash__ = "" |
Oops, something went wrong.