Skip to content

Commit a7b22e6

Browse files
committed
Release v1.0.0
0 parents  commit a7b22e6

20 files changed

Lines changed: 3228 additions & 0 deletions

.formatter.exs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[
2+
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
3+
]

.github/workflows/test.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
include:
16+
- elixir: "1.15"
17+
otp: "25"
18+
- elixir: "1.16"
19+
otp: "26"
20+
- elixir: "1.17"
21+
otp: "27"
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Set up Elixir ${{ matrix.elixir }} / OTP ${{ matrix.otp }}
27+
uses: erlef/setup-beam@v1
28+
with:
29+
elixir-version: ${{ matrix.elixir }}
30+
otp-version: ${{ matrix.otp }}
31+
32+
- name: Restore dependencies cache
33+
uses: actions/cache@v4
34+
with:
35+
path: |
36+
deps
37+
_build
38+
key: ${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('mix.lock') }}
39+
restore-keys: |
40+
${{ runner.os }}-mix-${{ matrix.elixir }}-${{ matrix.otp }}-
41+
42+
- name: Install dependencies
43+
run: mix deps.get
44+
45+
- name: Compile
46+
run: mix compile --warnings-as-errors
47+
48+
- name: Run tests
49+
run: mix test

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# The directory Mix will write compiled artifacts to.
2+
/_build/
3+
4+
# If you run "mix test --cover", coverage assets end up here.
5+
/cover/
6+
7+
# The directory Mix downloads your dependencies sources to.
8+
/deps/
9+
10+
# Where third-party dependencies like ExDoc output generated docs.
11+
/doc/
12+
13+
# Ignore .fetch files in case you like to edit your project deps locally.
14+
/.fetch
15+
16+
# If the VM crashes, it generates a dump, let's ignore it too.
17+
erl_crash.dump
18+
19+
# Also ignore archive artifacts (built via "mix archive.build").
20+
*.ez
21+
22+
# Ignore package tarball (built via "mix hex.build").
23+
klime-*.tar
24+
25+
# Temporary files, for example, from tests.
26+
/tmp/

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.0.0] - 2026-01-28
9+
10+
- Initial release of Klime Elixir SDK
11+
12+
# Changelog
13+
14+
All notable changes to this project will be documented in this file.
15+
16+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
17+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

CONTRIBUTING.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributing to Klime Elixir SDK
2+
3+
Thank you for your interest in contributing to the Klime Elixir SDK!
4+
5+
## Important: Repository Structure
6+
7+
This repository is a **read-only mirror** of our internal monorepo. We develop and maintain the SDK internally, then mirror releases to this public repository.
8+
9+
### What This Means for Contributors
10+
11+
- **Pull requests are welcome** and will be reviewed by our team
12+
- If accepted, we'll **manually port your changes** to our internal monorepo
13+
- Your changes will appear in this repository with the **next release**
14+
- You'll be credited as a co-author in the commit
15+
16+
## How to Contribute
17+
18+
### Reporting Bugs
19+
20+
1. Check if the bug has already been reported in [Issues](../../issues)
21+
2. If not, create a new issue with:
22+
- A clear, descriptive title
23+
- Steps to reproduce the bug
24+
- Expected vs actual behavior
25+
- Your environment (Elixir version, OTP version, OS, etc.)
26+
- Any relevant code snippets or error messages
27+
28+
### Suggesting Features
29+
30+
1. Check if the feature has already been suggested in [Issues](../../issues)
31+
2. Create a new issue describing:
32+
- The problem you're trying to solve
33+
- Your proposed solution
34+
- Any alternatives you've considered
35+
36+
### Submitting Code Changes
37+
38+
1. Fork this repository
39+
2. Create a feature branch (`git checkout -b feat/amazing-feature`)
40+
3. Make your changes
41+
4. Write or update tests as needed
42+
5. Ensure all tests pass (`mix test`)
43+
6. Run the formatter (`mix format`)
44+
7. Commit using [Conventional Commits](https://www.conventionalcommits.org/):
45+
```
46+
feat: add new tracking method
47+
fix: handle edge case in batch processing
48+
docs: update README examples
49+
```
50+
8. Push to your fork and open a Pull Request
51+
52+
### Pull Request Guidelines
53+
54+
- Provide a clear description of what the PR does
55+
- Reference any related issues
56+
- Include tests for new functionality
57+
- Update documentation if needed
58+
- Keep PRs focused - one feature or fix per PR
59+
60+
## Development Setup
61+
62+
```bash
63+
# Clone your fork
64+
git clone https://github.com/YOUR_USERNAME/klime-elixir.git
65+
cd klime-elixir
66+
67+
# Install dependencies
68+
mix deps.get
69+
70+
# Run tests
71+
mix test
72+
73+
# Run formatter
74+
mix format
75+
76+
# Generate docs (optional)
77+
mix docs
78+
```
79+
80+
## Project Structure
81+
82+
```
83+
klime-elixir/
84+
├── lib/
85+
│ ├── klime.ex # Main entry point / public API
86+
│ └── klime/
87+
│ ├── client.ex # GenServer client implementation
88+
│ ├── event.ex # Event struct and serialization
89+
│ ├── event_context.ex # Context and library info
90+
│ ├── batch_response.ex # Response parsing
91+
│ └── config.ex # Default configuration
92+
├── test/
93+
│ ├── klime/
94+
│ │ ├── client_test.exs # Integration tests
95+
│ │ └── event_test.exs # Unit tests
96+
│ └── test_helper.exs
97+
├── mix.exs # Project configuration
98+
└── README.md
99+
```
100+
101+
## Code Style
102+
103+
- We follow standard Elixir conventions
104+
- Use `mix format` to format your code
105+
- Add `@moduledoc` and `@doc` documentation for public APIs
106+
- Use typespecs (`@type`, `@spec`) for public functions
107+
- Keep functions small and focused
108+
109+
## Running Tests
110+
111+
```bash
112+
# Run all tests
113+
mix test
114+
115+
# Run specific test file
116+
mix test test/klime/client_test.exs
117+
118+
# Run with coverage
119+
mix test --cover
120+
```
121+
122+
## Questions?
123+
124+
If you have questions about contributing, feel free to open an issue and we'll be happy to help!
125+
126+
## License
127+
128+
By contributing, you agree that your contributions will be licensed under the MIT License.

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Klime
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)