Skip to content

Commit

Permalink
initial rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
nmichlo committed Apr 20, 2024
1 parent 42d57dc commit 0716fad
Show file tree
Hide file tree
Showing 34 changed files with 3,405 additions and 1,440 deletions.
44 changes: 25 additions & 19 deletions .github/workflows/python-lint.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
name: pre-commit
on: [pull_request]

name: python-lint
on: [push, pull_request]
jobs:
isort:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- uses: jamescurtin/isort-action@master
with:
configuration: "--check --verbose --diff --color --py=38 --profile=black"
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
with:
options: "--check --verbose --diff --color --target-version=py38"
version: "22.8.0"
src: "."

- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'

- id: cache-pre-commit-envs
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}

- id: install-requirements
run: pip install -e .[dev]

- name: pre-commit
id: pre-commit
run: |
set -o pipefail
pre-commit run --all-files
4 changes: 2 additions & 2 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'

Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,19 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest] # [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10"]
python-version: [
"3.8",
"3.9",
"3.10",
"3.11",
"3.12",
]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -34,7 +40,7 @@ jobs:
- name: Test with pytest
run: |
python3 -m pytest --cov=pydependance tests/
python3 -m pytest --cov=pydependence tests/
- uses: codecov/codecov-action@v1
with:
Expand Down
24 changes: 19 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-added-large-files
args: ["--maxkb=500"]
- id: check-case-conflict
- id: detect-private-key

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
- id: pyupgrade
args:
- "--py38-plus"

- repo: https://github.com/PyCQA/isort
rev: 5.10.1
rev: 5.13.2
hooks:
- id: isort
name: isort
args: ["--py=38", "--profile=black"]
args: ["--verbose", "--py=39", "--profile=black"]

- repo: https://github.com/psf/black
rev: 22.8.0
rev: 24.4.0
hooks:
- id: black
args: ["--target-version=py38"]
args: ["--verbose", "--target-version=py39"]

# - repo: https://github.com/nmichlo/pydependence
# # rev: v0.2.0
# hooks:
# - id: pydependence
15 changes: 15 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- id: pydependence
name: PyDependence
description: Generate dependencies for your project using the python AST.
language: python
always_run: true
verbose: true
entry: python3 -m pydependence.__main__
files: ^pyproject\.toml$
language_version: "3.9"
additional_dependencies:
- 'pydantic==2.*'
- 'packaging'
- 'networkx'
- 'stdlib_list'
- 'tomlkit'
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Nathan
Copyright (c) 2023 Nathan Juraj Michlo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@

<p align="center">
<h1 align="center">🕵️ pydependance 🐍</h1>
<h1 align="center">🕵️ pydependence 🐍</h1>
<p align="center">
<i>Python local package dependency discovery and resolution</i>
</p>
</p>

<p align="center">
<a href="https://choosealicense.com/licenses/mit/" target="_blank">
<img alt="license" src="https://img.shields.io/github/license/nmichlo/pydependance?style=flat-square&color=lightgrey"/>
<img alt="license" src="https://img.shields.io/github/license/nmichlo/pydependence?style=flat-square&color=lightgrey"/>
</a>
<!-- <a href="https://pypi.org/project/pydependance" target="_blank"> -->
<!-- <img alt="python versions" src="https://img.shields.io/pypi/pyversions/pydependance?style=flat-square"/> -->
<!-- <a href="https://pypi.org/project/pydependence" target="_blank"> -->
<!-- <img alt="python versions" src="https://img.shields.io/pypi/pyversions/pydependence?style=flat-square"/> -->
<!-- </a> -->
<a href="https://pypi.org/project/pydependance" target="_blank">
<img alt="pypi version" src="https://img.shields.io/pypi/v/pydependance?style=flat-square&color=blue"/>
<a href="https://pypi.org/project/pydependence" target="_blank">
<img alt="pypi version" src="https://img.shields.io/pypi/v/pydependence?style=flat-square&color=blue"/>
</a>
<!-- <a href="https://github.com/nmichlo/pydependance/actions?query=workflow%3Atest"> -->
<!-- <img alt="tests status" src="https://img.shields.io/github/workflow/status/nmichlo/pydependance/test?label=tests&style=flat-square"/> -->
<!-- <a href="https://github.com/nmichlo/pydependence/actions?query=workflow%3Atest"> -->
<!-- <img alt="tests status" src="https://img.shields.io/github/workflow/status/nmichlo/pydependence/test?label=tests&style=flat-square"/> -->
<!-- </a> -->
<!-- <a href="https://codecov.io/gh/nmichlo/pydependance/"> -->
<!-- <img alt="code coverage" src="https://img.shields.io/codecov/c/gh/nmichlo/pydependance?token=86IZK3J038&style=flat-square"/> -->
<!-- <a href="https://codecov.io/gh/nmichlo/pydependence/"> -->
<!-- <img alt="code coverage" src="https://img.shields.io/codecov/c/gh/nmichlo/pydependence?token=86IZK3J038&style=flat-square"/> -->
<!-- </a> -->
</p>

<p align="center">
<p align="center">
<a href="https://github.com/nmichlo/pydependance/issues/new/choose">Contributions</a> are welcome!
<a href="https://github.com/nmichlo/pydependence/issues/new/choose">Contributions</a> are welcome!
</p>
</p>

Expand Down Expand Up @@ -69,15 +69,15 @@ This project was created for multiple reasons

## Install

`pydependance` currently requires `python==3.10`, however,
`pydependence` currently requires `python==3.10`, however,
it can still be run in a virtual environment over legacy python code

```bash
pip install pydependance
pip install pydependence
```

## Usage

```bash
python -m pydependance --help
python -m pydependence --help
```
Loading

0 comments on commit 0716fad

Please sign in to comment.