Skip to content

Commit b7f5753

Browse files
author
Gal Ben David
committed
updated pyo3 version and deploy workflow
1 parent 073befe commit b7f5753

File tree

5 files changed

+14
-21
lines changed

5 files changed

+14
-21
lines changed

.github/workflows/deploy.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,16 @@ jobs:
2727
run: |
2828
python -m pip install --upgrade pip maturin
2929
- name: Build & Publish to PyPi
30-
if: matrix.os != 'windows-latest'
30+
if: matrix.os == 'ubuntu-latest'
31+
run: |
32+
python -m pip install --upgrade twine auditwheel;
33+
maturin build --no-sdist --interpreter python${{ matrix.python-version }} --manylinux=2014 --skip-auditwheel;
34+
auditwheel repair target/wheels/*.whl;
35+
twine upload --username __token__ wheelhouse/*.whl;
36+
env:
37+
TWINE_PASSWORD: ${{ secrets.pypi_password }}
38+
- name: Build & Publish to PyPi
39+
if: matrix.os == 'macos-latest'
3140
run: maturin publish --username __token__ --no-sdist --interpreter python${{ matrix.python-version }} --manylinux=2014
3241
env:
3342
MATURIN_PASSWORD: ${{ secrets.pypi_password }}

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pyrepscan"
3-
version = "0.9.4"
3+
version = "0.9.5"
44
authors = ["Gal Ben David <[email protected]>"]
55
edition = "2018"
66
description = "A Git Repository Secrets Scanner written in Rust"
@@ -46,7 +46,7 @@ crossbeam-utils = "0.8"
4646
version = "0.13"
4747

4848
[dependencies.pyo3]
49-
version = "0.13.2"
49+
version = "0.14.2"
5050
features = ["extension-module"]
5151

5252
[profile.release]

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["maturin"]
2+
requires = ["maturin>=0.11,<0.12"]
33
build-backend = "maturin"
44

55
[tool.maturin]
@@ -14,7 +14,7 @@ strip = true
1414

1515
[tool.poetry]
1616
name = "pyrepscan"
17-
version = "0.9.4"
17+
version = "0.9.5"
1818
authors = ["Gal Ben David <[email protected]>"]
1919
description = "A Git Repository Secrets Scanner written in Rust"
2020
readme = "README.md"

src/lib.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use std::sync::Arc;
1818
/// example:
1919
/// grs = pyrepscan.GitRepositoryScanner()
2020
#[pyclass]
21-
#[text_signature = "()"]
2221
#[derive(Default)]
2322
struct GitRepositoryScanner {
2423
rules_manager: rules_manager::RulesManager,
@@ -57,7 +56,6 @@ impl GitRepositoryScanner {
5756
/// "(?:test|example|xxx|empty)",
5857
/// ],
5958
/// )
60-
#[text_signature = "(name, pattern, whitelist_patterns, blacklist_patterns, /)"]
6159
fn add_content_rule(
6260
&mut self,
6361
name: String,
@@ -88,7 +86,6 @@ impl GitRepositoryScanner {
8886
/// name="Rule #2",
8987
/// pattern=r".*\.(?:pem|cer)",
9088
/// )
91-
#[text_signature = "(name, pattern, /)"]
9289
fn add_file_path_rule(
9390
&mut self,
9491
name: String,
@@ -117,7 +114,6 @@ impl GitRepositoryScanner {
117114
/// grs.add_file_extension_to_skip(
118115
/// file_extension="tar.gz",
119116
/// )
120-
#[text_signature = "(file_extension, /)"]
121117
fn add_file_extension_to_skip(
122118
&mut self,
123119
file_extension: String,
@@ -141,7 +137,6 @@ impl GitRepositoryScanner {
141137
/// grs.add_file_path_to_skip(
142138
/// file_extension="example",
143139
/// )
144-
#[text_signature = "(file_path, /)"]
145140
fn add_file_path_to_skip(
146141
&mut self,
147142
file_path: String,
@@ -163,7 +158,6 @@ impl GitRepositoryScanner {
163158
/// repository_path="/path/to/repository",
164159
/// file_oid="6b584e8ece562ebffc15d38808cd6b98fc3d97ea",
165160
/// )
166-
#[text_signature = "(repository_path, file_oid, /)"]
167161
fn get_file_content(
168162
&mut self,
169163
py: Python,
@@ -192,7 +186,6 @@ impl GitRepositoryScanner {
192186
/// repository_path="/path/to/repository",
193187
/// branch_glob_pattern="*",
194188
/// )
195-
#[text_signature = "(repository_path, branch_glob_pattern, from_timestamp, /)"]
196189
fn scan(
197190
&self,
198191
py: Python,
@@ -232,7 +225,6 @@ impl GitRepositoryScanner {
232225
/// repository_path="/path/to/repository",
233226
/// branch_glob_pattern="*",
234227
/// )
235-
#[text_signature = "(url, repository_path, branch_glob_pattern, from_timestamp, /)"]
236228
fn scan_from_url(
237229
&self,
238230
py: Python,

src/rules_manager.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ struct FilePathRule {
1616
}
1717

1818
#[pyclass]
19-
#[text_signature = "()"]
2019
#[derive(Default)]
2120
pub struct RulesManager {
2221
file_extensions_to_skip: HashSet<String>,
@@ -32,7 +31,6 @@ impl RulesManager {
3231
RulesManager::default()
3332
}
3433

35-
#[text_signature = "(name, pattern, whitelist_patterns, blacklist_patterns, /)"]
3634
pub fn add_content_rule(
3735
&mut self,
3836
name: String,
@@ -119,7 +117,6 @@ impl RulesManager {
119117
Ok(())
120118
}
121119

122-
#[text_signature = "(name, pattern, /)"]
123120
pub fn add_file_path_rule(
124121
&mut self,
125122
name: String,
@@ -148,7 +145,6 @@ impl RulesManager {
148145
Ok(())
149146
}
150147

151-
#[text_signature = "(file_extension, /)"]
152148
pub fn add_file_extension_to_skip(
153149
&mut self,
154150
file_extension: String,
@@ -163,7 +159,6 @@ impl RulesManager {
163159
Ok(())
164160
}
165161

166-
#[text_signature = "(file_path, /)"]
167162
pub fn add_file_path_to_skip(
168163
&mut self,
169164
file_path: String,
@@ -178,7 +173,6 @@ impl RulesManager {
178173
Ok(())
179174
}
180175

181-
#[text_signature = "(file_path, /)"]
182176
pub fn should_scan_file_path(
183177
&self,
184178
file_path: &str,
@@ -202,7 +196,6 @@ impl RulesManager {
202196
true
203197
}
204198

205-
#[text_signature = "(file_path, content, /)"]
206199
pub fn scan_file(
207200
&self,
208201
file_path: &str,
@@ -248,7 +241,6 @@ impl RulesManager {
248241
}
249242
}
250243

251-
#[text_signature = "(content, pattern, /)"]
252244
pub fn check_pattern(
253245
&mut self,
254246
content: String,

0 commit comments

Comments
 (0)