diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..17a7589b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,46 @@ +name: Release + +on: + workflow_dispatch: + inputs: + version_type: + description: 'Type of version bump (major, minor, patch)' + required: true + default: 'patch' + type: choice + options: + - patch + - minor + - major + +jobs: + release: + runs-on: ubuntu-latest + concurrency: release + permissions: + id-token: write + contents: write + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Python Semantic Release + id: release + uses: python-semantic-release/python-semantic-release@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + if: steps.release.outputs.released == 'true' + with: + password: ${{ secrets.PYPI_TOKEN }} + + - name: Publish to GitHub Release Assets + uses: python-semantic-release/publish-action@v9.8.9 + if: steps.release.outputs.released == 'true' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ steps.release.outputs.tag }} \ No newline at end of file diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 00000000..39a89b12 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,10 @@ +cff-version: 1.0.3 +message: "If you use this project, please cite it as follows:" +authors: + - family-names: "Hernandez" + given-names: "Paul" + affiliation: "Basic Machines" +title: "Basic Memory" +version: "0.0.1" +date-released: "2025-02-03" +url: "https://github.com/basicmachines-co/basic-memory" diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..dc864747 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,19 @@ +# Code of Conduct + +## Purpose + +Maintain a respectful and professional environment where contributions can be made without harassment or +negativity. + +## Standards + +Respectful communication and collaboration are expected. Offensive behavior, harassment, or personal attacks will not be +tolerated. + +## Reporting Issues + +To report inappropriate behavior, contact [paul@basicmachines.co]. + +## Consequences + +Violations of this code may lead to consequences, including being banned from contributing to the project. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..00aa8d12 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,17 @@ +# Contributing to Basic Memory + +Thank you for considering contributing to Basic Memory! Your help is greatly appreciated to improve this project. + +## How to Contribute + +1. **Fork the Repo**: Fork the repository and clone your copy. +1. **Create a Branch**: Create a new branch for your feature or fix. +1. **Test Your Changes**: Ensure tests pass locally and include new tests when necessary to ensure 100& test coverage. +1. **Format Your Code**: Run `make format` to ensure code is formatted appropriately. +4. **Submit a PR**: Submit a pull request with a detailed description of your changes. + +Thank You! + +## Code of Conduct + +All contributors must follow the [Code of Conduct](CODE_OF_CONDUCT.md). diff --git a/Makefile b/Makefile index af302a2d..0996fa32 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,12 @@ clean: find . -type f -name '*.pyc' -delete find . -type d -name '__pycache__' -exec rm -r {} + +format: + uv run ruff format . + +format: format-python +#format: format-python format-prettier + # run inspector tool run-dev: uv run mcp dev src/basic_memory/mcp/main.py \ No newline at end of file diff --git a/README.md b/README.md index e69de29b..07fb9566 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,34 @@ +# Basic Memory + +> Local-first knowledge management combining Zettelkasten with knowledge graphs. + +Basic Memory helps you capture and explore information the way your brain naturally works - across multiple dimensions and perspectives. Built on open standards and powered by proven technology, it's ready for the future of human-AI collaboration. + +## Features + +- Local-first design - your files stay yours +- Knowledge graph with natural relations +- Markdown files with automatic parsing +- Rich context building and search +- Native AI integration via MCP protocol + +## Quick Start + +```bash +pip install basic-memory +``` + +Initialize a new knowledge base: +```bash +basic-memory init my-knowledge +cd my-knowledge +basic-memory status +``` + +## Contributing + +Basic Memory is open source (AGPL-3.0) and welcomes contributions. See our [Contributing Guide](CONTRIBUTING.md) for details. + +## License + +AGPL-3.0 - See [LICENSE](LICENSE) for details. diff --git a/pyproject.toml b/pyproject.toml index f9715b42..a6c5df9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,13 @@ [project] name = "basic-memory" -version = "0.1.0" +version = "0.0.1" description = "Local-first knowledge management combining Zettelkasten with knowledge graphs" readme = "README.md" requires-python = ">=3.12.1" license = { text = "AGPL-3.0-or-later" } +authors = [ + { name = "Basic Machines", email = "hello@basic-machines.co" } +] dependencies = [ "sqlalchemy>=2.0.0", "pyyaml>=6.0.1", @@ -35,6 +38,10 @@ dev = [ "ruff>=0.1.6", ] +[project.urls] +Homepage = "https://github.com/basicmachines-co/basic-memory" +Repository = "https://github.com/basicmachines-co/basic-memory" +Documentation = "https://github.com/basicmachines-co/basic-memory#readme" [project.scripts] basic-memory = "basic_memory.cli.main:app" @@ -44,16 +51,11 @@ requires = ["hatchling"] build-backend = "hatchling.build" [tool.pytest.ini_options] -pythonpath = [ - "src", - "tests" -] +pythonpath = ["src", "tests"] addopts = "--cov=basic_memory --cov-report term-missing -ra -q" testpaths = ["tests"] asyncio_mode = "strict" asyncio_default_fixture_loop_scope = "function" -# Add this line to ensure pytest-mock is loaded -#required_plugins = ["pytest-asyncio", "pytest-cov", "pytest-mock"] [tool.ruff] line-length = 100 @@ -68,16 +70,25 @@ dev-dependencies = [ basic-foundation = { path = "../basic-foundation", editable = true } [tool.pyright] -include = [ - "src/", -] -exclude = [ - "**/__pycache__", -] -ignore = [ - "test/", -] +include = ["src/"] +exclude = ["**/__pycache__"] +ignore = ["test/"] defineConstant = { DEBUG = true } reportMissingImports = "error" reportMissingTypeStubs = false pythonVersion = "3.12" + + +[tool.semantic_release] +version_variable = "src/basic_memory/__init__.py:__version__" +version_toml = [ + "pyproject.toml:project.version", +] +major_on_zero = false +branch = "main" +changelog_file = "CHANGELOG.md" +build_command = "pip install uv && uv build" +dist_path = "dist/" +upload_to_pypi = true +commit_message = "chore(release): {version} [skip ci]" + diff --git a/src/basic_memory/__init__.py b/src/basic_memory/__init__.py index 88e26b80..fc78822c 100644 --- a/src/basic_memory/__init__.py +++ b/src/basic_memory/__init__.py @@ -1,3 +1,3 @@ """basic-memory - Local-first knowledge management combining Zettelkasten with knowledge graphs""" -__version__ = "0.1.0" \ No newline at end of file +__version__ = "0.0.1" \ No newline at end of file