Skip to content

Commit

Permalink
Revert PRs #21, #22 (#23)
Browse files Browse the repository at this point in the history
This reverts commits
c132883
869663a
  • Loading branch information
MusicalNinjaDad authored May 13, 2024
1 parent 5f9f284 commit ce45da7
Show file tree
Hide file tree
Showing 23 changed files with 15 additions and 131 deletions.
1 change: 0 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
// "image": "ghcr.io/musicalninjas/pyo3-devcontainer:latest", // untested with mac, expect issues due to x_64 rust installation
"build": {
"dockerfile": "Dockerfile",
"args": {
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/deploy-rust.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
name: Deploy Rust
concurrency: ADO-Cargo

on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[test]
python -m pip install -e .[dev]
python -m pip install pytest-cov
- name: Test with pytest
run: |
Expand Down
5 changes: 0 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# FizzBuzz Changelog

## Python 2.0.0

- **Breaking:** Changed top level module name to `fizzbuzz`. Use `from fizzbuzz.fizzbuzzo3 import fizzbuzz`
for rust implementation or `from fizzbuzz.fizzbuzzpy import fizzbuzz` for python implementation (slower).

## Rust 2.1.0 & Python 1.3.0

- Process `Vec`s / `list`s with more than 300k elements in parallel
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace]

members = [
"fizzbuzz-rust",
"fizzbuzz",
"fizzbuzzo3"
]

Expand Down
2 changes: 1 addition & 1 deletion __pyversion__
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0
1.3.0
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion fizzbuzzo3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ crate-type = ["cdylib"] # cdylib required for python import, rlib required for

[dependencies]
pyo3 = { git = "https://github.com/MusicalNinjaDad/pyo3.git", branch = "pyo3-testing" }
fizzbuzz = { path = "../fizzbuzz-rust" }
fizzbuzz = { path = "../fizzbuzz" }

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/perftest.py → fizzbuzzpy/tests/perftest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ruff: noqa
import timeit

from fizzbuzz.fizzbuzzo3 import fizzbuzz as fbo3
from fizzbuzz.fizzbuzzpy import fizzbuzz as fbpy
from fizzbuzzo3 import fizzbuzz as fbo3
from fizzbuzzpy import fizzbuzz as fbpy


REPEAT = 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest
from fizzbuzz.fizzbuzzo3 import fizzbuzz

from fizzbuzzo3 import fizzbuzz


def test_lazy():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from fizzbuzz.fizzbuzzpy import fizzbuzz
from fizzbuzzpy import fizzbuzz


def test_lazy():
Expand Down
13 changes: 6 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ Issues = "https://github.com/MusicalNinjaDad/fizzbuzz/issues"
version = { file = "__pyversion__" }

[tool.setuptools.packages.find]
where = ["python"]
where = ["fizzbuzzpy"]

[[tool.setuptools-rust.ext-modules]]
# Private Rust extension module to be nested into the Python package
target = "fizzbuzz.fizzbuzzo3" # The last part of the name (e.g. "_lib") has to match lib.name in Cargo.toml,
target = "fizzbuzzo3" # The last part of the name (e.g. "_lib") has to match lib.name in Cargo.toml,
# but you can add a prefix to nest it inside of a Python package.
path = "fizzbuzzo3/Cargo.toml"
binding = "PyO3"
path = "fizzbuzzo3/Cargo.toml" # Default value, can be omitted
binding = "PyO3" # Default value, can be omitted
features = ["pyo3/extension-module"]

[tool.cibuildwheel]
Expand Down Expand Up @@ -72,13 +72,12 @@ xfail_strict = true
addopts = [
"--doctest-modules",
"--doctest-mdcodeblocks",
"--doctest-glob=*.md",
"--doctest-glob=*.pyi",
"--doctest-glob='*.md'",
]

[tool.coverage.run]
branch = true
omit = ["test_*", "tests/*"]
omit = ["test_*"]
dynamic_context = "test_function"

[tool.ruff]
Expand Down
Empty file removed python/fizzbuzz/__init__.py
Empty file.
38 changes: 0 additions & 38 deletions python/fizzbuzz/fizzbuzzo3/__init__.pyi

This file was deleted.

71 changes: 0 additions & 71 deletions python/fizzbuzz/fizzbuzzo3/repl_notes.txt

This file was deleted.

0 comments on commit ce45da7

Please sign in to comment.