Skip to content

Commit

Permalink
Merge pull request #54 from bamler-lab/ci
Browse files Browse the repository at this point in the history
Fix deprecation warning by poetry in CI
  • Loading branch information
robamler committed Jun 14, 2024
2 parents 1b5386c + 223a86a commit f7343b7
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install
poetry install --no-root
- name: Install latest stable Rust
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install
poetry install --no-root
- name: Install latest stable Rust
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -353,7 +353,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install
poetry install --no-root
- name: Publish wheels (unix)
if: github.event_name == 'release'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install
poetry install --no-root
- name: Install latest stable Rust
uses: dtolnay/rust-toolchain@stable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/website-from-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install
poetry install --no-root
- name: Install latest stable Rust
uses: dtolnay/rust-toolchain@stable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install
poetry install --no-root
- name: Install latest public version of constriction from pypi
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ Contributors can compile `constriction` manually as follows:
bench`
4. If you want to compile the Python module:
- install [poetry](https://python-poetry.org/).
- install Python dependencies: `cd` into the repository and run `poetry install`
- install Python dependencies: `cd` into the repository and run `poetry install --no-root`
- build the Python module: `poetry run maturin develop --features pybindings --release`
- run Python unit tests: `poetry run pytest tests/python`
- start a Python REPL that sees the compiled Python module: `poetry run ipython`
Expand Down
2 changes: 1 addition & 1 deletion src/stream/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ where
pub fn into_binary(mut self) -> Result<Backend, Option<Backend::WriteError>> {
let valid_bits = (State::BITS - 1).wrapping_sub(self.state.leading_zeros() as usize);

if valid_bits % Word::BITS != 0 || valid_bits == usize::max_value() {
if valid_bits % Word::BITS != 0 || valid_bits == usize::MAX {
Err(None)
} else {
let truncated_state = self.state ^ (State::one() << valid_bits);
Expand Down
4 changes: 2 additions & 2 deletions src/symbol/huffman.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl EncoderHuffmanTree {
.collect::<Result<Vec<_>, E>>()?;
let mut heap = BinaryHeap::from(heap);

if heap.is_empty() || heap.len() > usize::max_value() / 4 {
if heap.is_empty() || heap.len() > usize::MAX / 4 {
panic!();
}

Expand Down Expand Up @@ -213,7 +213,7 @@ impl DecoderHuffmanTree {
.collect::<Result<Vec<_>, E>>()?;
let mut heap = BinaryHeap::from(heap);

if heap.is_empty() || heap.len() > usize::max_value() / 2 {
if heap.is_empty() || heap.len() > usize::MAX / 2 {
panic!();
}

Expand Down

0 comments on commit f7343b7

Please sign in to comment.