Skip to content

Commit 9810431

Browse files
committed
fix python import path and update readme
1 parent 8ef97af commit 9810431

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,13 @@ Available languages are:
3535
- typescript.
3636

3737
In order to communicate effectively with the ahnlich db, you would have to extend the bincode serialization protocol automatically provided by `serde_generate`.
38-
Your message(in bytes) should be serialized and deserialized in the following format => `AHNLICH_HEADERS` + `VERSION` + `QUERY/SERVER_RESPONSE`. Bytes are `Little Endian`.
38+
Your message(in bytes) should be serialized and deserialized in the following format => `AHNLICH_HEADERS` + `VERSION` + `QUERY/SERVER_RESPONSE`. Bytes are `Little Endian`.
39+
40+
41+
## How Client Releases Work
42+
43+
The clients follow a similar process when deploying new releases.
44+
[Example with python client](https://github.com/deven96/ahnlich/blob/main/sdk/ahnlich-client-py/README.md#deploy-to-artifactory).
45+
46+
47+

ahnlich/typegen/src/tracers/mod.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,15 @@ impl<'a> OutputFile<'a> {
134134
let _ = std::fs::create_dir_all(&output_dir);
135135
let output_file = output_dir.join(format!("{}.{extension}", self.output_file));
136136
let mut buffer = self.get_output_buffer(output_file);
137-
let installer = serde_generate::python3::Installer::new(
138-
output_dir,
139-
Some(format!("ahnlich_client_{extension}.internals")),
140-
);
137+
let import_path = Some(format!("ahnlich_client_{extension}.internals"));
138+
139+
let installer =
140+
serde_generate::python3::Installer::new(output_dir, import_path.clone());
141141
installer.install_bincode_runtime().unwrap();
142142
installer.install_serde_runtime().unwrap();
143-
serde_generate::python3::CodeGenerator::new(config).output(&mut buffer, registry)
143+
serde_generate::python3::CodeGenerator::new(config)
144+
.with_serde_package_name(import_path)
145+
.output(&mut buffer, registry)
144146
}
145147
Language::Golang => {
146148
// All packages are already published

0 commit comments

Comments
 (0)