Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# OpenGraph Copilot Instructions
# OpenAttributeGraph Copilot Instructions

This file contains coding guidelines and conventions for AI assistants working on the OpenGraph project.
This file contains coding guidelines and conventions for AI assistants working on the OpenAttributeGraph project.

## Quick Reference

### Key Principles
- Use `swift-testing` framework with `#expect` macro (not XCTest)
- Follow OpenGraph C++ and Swift interop patterns
- Follow OpenAttributeGraph C++ and Swift interop patterns
- Trim trailing whitespaces automatically
- Use 4-space indentation consistently

Expand All @@ -23,7 +23,7 @@ This file contains coding guidelines and conventions for AI assistants working o
```swift
import Testing

struct OpenGraphTests {
struct OpenAttributeGraphTests {
@Test
func functionality() {
let value = SomeType()
Expand Down Expand Up @@ -100,40 +100,40 @@ struct OpenGraphTests {

## C++ Coding Style

### OpenGraphCxx Guidelines
### OpenAttributeGraphCxx Guidelines

- Follow existing OpenGraph C++ patterns and conventions
- Use `OG_INLINE` and `OG_CONSTEXPR` macros for inline and constexpr functions
- Use `OG_NOEXCEPT` for exception specifications
- Maintain compatibility with existing OpenGraph APIs
- Follow existing OpenAttributeGraph C++ patterns and conventions
- Use `OAG_INLINE` and `OAG_CONSTEXPR` macros for inline and constexpr functions
- Use `OAG_NOEXCEPT` for exception specifications
- Maintain compatibility with existing OpenAttributeGraph APIs
- Use proper header guards with project-specific naming

### Memory Management

- Use RAII principles for resource management
- Prefer smart pointers and custom deleters for automatic cleanup
- Use `ptr<T>` template for OpenGraph-specific pointer management
- Use `ptr<T>` template for OpenAttributeGraph-specific pointer management
- Implement proper validation and assertion mechanisms

### Template Usage

```cpp
template <typename T>
class ptr {
// Implementation following OpenGraph patterns
// Implementation following OpenAttributeGraph patterns
};
```

## Architecture Patterns

### OpenGraph Compatibility
- Maintain API compatibility with existing OpenGraph functionality
### OpenAttributeGraph Compatibility
- Maintain API compatibility with existing OpenAttributeGraph functionality
- Use similar naming conventions and parameter patterns
- Implement protocols and extensions that mirror OpenGraph's design
- Implement protocols and extensions that mirror OpenAttributeGraph's design

### Module Organization
- Keep related functionality in appropriate modules
- Use clear module boundaries between OpenGraphCxx and Swift layers
- Use clear module boundaries between OpenAttributeGraphCxx and Swift layers
- Avoid circular dependencies between modules

### C++/Swift Interop
Expand Down Expand Up @@ -163,7 +163,7 @@ func someFunction(value: String) throws -> Int {

## Performance Considerations

- Optimize memory allocation patterns using OpenGraph's table/page system
- Optimize memory allocation patterns using OpenAttributeGraph's table/page system
- Use lazy initialization for expensive computations
- Consider memory management and avoid retain cycles
- Optimize for common use cases while maintaining flexibility
Expand All @@ -179,7 +179,7 @@ func someFunction(value: String) throws -> Int {

### C++ Files
- Use proper header inclusion guards
- Include OpenGraph base headers first
- Include OpenAttributeGraph base headers first
- Follow dependency order in include statements
- Use forward declarations when possible

Expand All @@ -193,16 +193,16 @@ func someFunction(value: String) throws -> Int {

## Memory and Data Management

### OpenGraph Patterns
### OpenAttributeGraph Patterns
- Use `data::table` for memory region management
- Implement proper page allocation and deallocation
- Use `ptr<T>` for type-safe offset-based pointers
- Follow OpenGraph's zone-based memory organization
- Follow OpenAttributeGraph's zone-based memory organization

### Validation and Assertions
- Use `assert_valid` methods for pointer validation
- Implement proper precondition checking
- Use OpenGraph's assertion macros consistently
- Use OpenAttributeGraph's assertion macros consistently
- Handle edge cases gracefully

---
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/compatibility_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
xcode-version: "16.4" # Swift 6.1.2
runs-on: ${{ matrix.os }}
env:
OPENGRAPH_WERROR: 1
OPENGRAPH_ATTRIBUTEGRAPH: 1
OPENGRAPH_COMPATIBILITY_TEST: 1
OPENGRAPH_USE_LOCAL_DEPS: 1
OPENGRAPH_TARGET_RELEASE: 2024
OPENATTRIBUTEGRAPH_WERROR: 1
OPENATTRIBUTEGRAPH_ATTRIBUTEGRAPH: 1
OPENATTRIBUTEGRAPH_COMPATIBILITY_TEST: 1
OPENATTRIBUTEGRAPH_USE_LOCAL_DEPS: 1
OPENATTRIBUTEGRAPH_TARGET_RELEASE: 2024
DARWIN_PRIVATE_FRAMEWORKS_TARGET_RELEASE: 2024
GH_TOKEN: ${{ github.token }}
steps:
Expand All @@ -42,7 +42,7 @@ jobs:
- name: Run tests against Apple's AttributeGraph on macOS via Xcode
run: |
xcodebuild test \
-scheme OpenGraph-Package \
-scheme OpenAttributeGraph-Package \
-sdk macosx \
-destination "platform=macOS" \
-skipPackagePluginValidation \
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
ios-simulator-name: "iPhone 16 Pro"
runs-on: ${{ matrix.os }}
env:
OPENGRAPH_WERROR: 1
OPENGRAPH_ATTRIBUTEGRAPH: 0
OPENGRAPH_COMPATIBILITY_TEST: 0
OPENGRAPH_USE_LOCAL_DEPS: 1
OPENGRAPH_TARGET_RELEASE: 2024
OPENATTRIBUTEGRAPH_WERROR: 1
OPENATTRIBUTEGRAPH_ATTRIBUTEGRAPH: 0
OPENATTRIBUTEGRAPH_COMPATIBILITY_TEST: 0
OPENATTRIBUTEGRAPH_USE_LOCAL_DEPS: 1
OPENATTRIBUTEGRAPH_TARGET_RELEASE: 2024
DARWIN_PRIVATE_FRAMEWORKS_TARGET_RELEASE: 2024
GH_TOKEN: ${{ github.token }}
steps:
Expand All @@ -41,7 +41,7 @@ jobs:
- name: Build in debug mode on iOS
run: |
xcodebuild build \
-scheme OpenGraph-Package \
-scheme OpenAttributeGraph-Package \
-configuration Debug \
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
-derivedDataPath .build-debug \
Expand All @@ -51,7 +51,7 @@ jobs:
- name: Build and run tests in debug mode with coverage on iOS Simulator
run: |
xcodebuild test \
-scheme OpenGraph-Package \
-scheme OpenAttributeGraph-Package \
-configuration Debug \
-destination "platform=iOS Simulator,OS=${{ matrix.ios-version }},name=${{ matrix.ios-simulator-name }}" \
-enableCodeCoverage=YES \
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
xcode-version: ["16.4"] # Swift 6.1.2
runs-on: ${{ matrix.os }}
env:
OPENGRAPH_WERROR: 1
OPENGRAPH_ATTRIBUTEGRAPH: 0
OPENGRAPH_COMPATIBILITY_TEST: 0
OPENGRAPH_USE_LOCAL_DEPS: 1
OPENGRAPH_TARGET_RELEASE: 2024
OPENATTRIBUTEGRAPH_WERROR: 1
OPENATTRIBUTEGRAPH_ATTRIBUTEGRAPH: 0
OPENATTRIBUTEGRAPH_COMPATIBILITY_TEST: 0
OPENATTRIBUTEGRAPH_USE_LOCAL_DEPS: 1
OPENATTRIBUTEGRAPH_TARGET_RELEASE: 2024
DARWIN_PRIVATE_FRAMEWORKS_TARGET_RELEASE: 2024
GH_TOKEN: ${{ github.token }}
steps:
Expand All @@ -42,7 +42,7 @@ jobs:
--build-path .build-test-debug
xcrun llvm-cov show \
-instr-profile=.build-test-debug/debug/codecov/default.profdata \
.build-test-debug/debug/OpenGraphPackageTests.xctest/Contents/MacOS/OpenGraphPackageTests \
.build-test-debug/debug/OpenAttributeGraphPackageTests.xctest/Contents/MacOS/OpenAttributeGraphPackageTests \
> coverage.txt
- name: Build and run tests in release mode
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
swift_version: ["6.1.2"]
runs-on: ubuntu-22.04
env:
OPENGRAPH_WERROR: 1
OPENGRAPH_ATTRIBUTEGRAPH: 0
OPENGRAPH_COMPATIBILITY_TEST: 0
OPENATTRIBUTEGRAPH_WERROR: 1
OPENATTRIBUTEGRAPH_ATTRIBUTEGRAPH: 0
OPENATTRIBUTEGRAPH_COMPATIBILITY_TEST: 0
container: swift:${{ matrix.swift_version }}-jammy
steps:
- uses: actions/checkout@v4
Expand All @@ -32,7 +32,7 @@ jobs:
--build-path .build-test-debug
llvm-cov show \
-instr-profile=.build-test-debug/debug/codecov/default.profdata \
.build-test-debug/debug/OpenGraphPackageTests.xctest \
.build-test-debug/debug/OpenAttributeGraphPackageTests.xctest \
> coverage.txt
- name: Building and running tests in release mode
run: |
Expand Down
2 changes: 1 addition & 1 deletion .spi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ version: 1
builder:
configs:
- swift_version: 6.0
documentation_targets: [OpenGraph]
documentation_targets: [OpenAttributeGraph]
2 changes: 1 addition & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This project uses third-party libraries and code. Their licenses and acknowledge

## Compute

OpenGraphCxx's Data, Graph, Vector and more is modified based on [Compute](https://github.com/jcmosc/Compute)'s implementations.
OpenAttributeGraphCxx's Data, Graph, Vector and more is modified based on [Compute](https://github.com/jcmosc/Compute)'s implementations.

Compute is licensed as follows:

Expand Down
Loading