Skip to content

Commit

Permalink
Start dev v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Strilanc committed Dec 14, 2023
1 parent bb976be commit 6837488
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 24 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,17 @@ jobs:
- run: pip install pytest stim sinter pygltflib
- run: pytest src
- run: tools/doctest_proper.py --module chromobius
upload_dev_release_to_pypi:
needs: ["build_dist"]
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
packages_dir: dist/
password: ${{ secrets.pypi_token_chromobius }}
1 change: 1 addition & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ cc_binary(
"-std=c++20",
"-fvisibility=hidden",
"-DNDEBUG",
"-DVERSION_INFO=0.0.dev0",
],
includes = ["src/"],
linkshared = 1,
Expand Down
62 changes: 39 additions & 23 deletions doc/getting_started.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def build_extension(self, ext):
ext.sourcedir,
f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={pathlib.Path(self.get_ext_fullpath(ext.name)).parent.absolute()}",
f"-DPYTHON_EXECUTABLE={sys.executable}",
f"-DVERSION_INFO={__version__}",
*osx_cmake_flags,
*[
env_arg_item
Expand Down
5 changes: 4 additions & 1 deletion src/chromobius/pybind/chromobius.pybind.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@

#include "stim.h"

#define str_literal(s) #s
#define xstr_literal(s) str_literal(s)

struct CompiledDecoder {
chromobius::Decoder decoder;
uint64_t num_detectors;
Expand Down Expand Up @@ -119,7 +122,7 @@ struct CompiledDecoder {
};

PYBIND11_MODULE(chromobius, m) {
m.attr("__version__") = "0.0.dev0";
m.attr("__version__") = xstr_literal(VERSION_INFO);
m.doc() = R"pbdoc(
chromobius: A fast implementation of the mobius color code decoder.
)pbdoc";
Expand Down

0 comments on commit 6837488

Please sign in to comment.