Skip to content

Commit 732fcfd

Browse files
committed
Fix MkDocs configuration and GitHub Pages deployment
- Fix typo in site name (reproschema-py) - Remove incorrect CNAME file - Update GitHub workflow to use modern actions and proper permissions
1 parent bf6ecdb commit 732fcfd

File tree

7 files changed

+299
-12
lines changed

7 files changed

+299
-12
lines changed

.github/workflows/deploy_mkdocs.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,21 @@ jobs:
88
build:
99
name: Deploy docs
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
1113
steps:
1214
- name: Checkout main
13-
uses: actions/checkout@v2
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.10'
21+
22+
- name: Install dependencies
23+
run: |
24+
pip install mkdocs
1425
1526
- name: Deploy docs
16-
uses: mhausenblas/mkdocs-deploy-gh-pages@master
17-
# Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme
18-
env:
19-
GITHUB_TOKEN: ${{ secrets.AUTO_TOKEN }}
20-
CUSTOM_DOMAIN: https://repronim.github.io/reproschema-py/
21-
CONFIG_FILE: mkdocs.yml
22-
EXTRA_PACKAGES: build-base
23-
# GITHUB_DOMAIN: github.myenterprise.com
24-
# REQUIREMENTS: folder/requirements.txt
27+
run: |
28+
mkdocs gh-deploy --force --clean

.serena/project.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# language of the project (csharp, python, rust, java, typescript, go, cpp, or ruby)
2+
# * For C, use cpp
3+
# * For JavaScript, use typescript
4+
# Special requirements:
5+
# * csharp: Requires the presence of a .sln file in the project folder.
6+
language: python
7+
8+
# whether to use the project's gitignore file to ignore files
9+
# Added on 2025-04-07
10+
ignore_all_files_in_gitignore: true
11+
# list of additional paths to ignore
12+
# same syntax as gitignore, so you can use * and **
13+
# Was previously called `ignored_dirs`, please update your config if you are using that.
14+
# Added (renamed) on 2025-04-07
15+
ignored_paths: []
16+
17+
# whether the project is in read-only mode
18+
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
19+
# Added on 2025-04-18
20+
read_only: false
21+
22+
23+
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
24+
# Below is the complete list of tools for convenience.
25+
# To make sure you have the latest list of tools, and to view their descriptions,
26+
# execute `uv run scripts/print_tool_overview.py`.
27+
#
28+
# * `activate_project`: Activates a project by name.
29+
# * `check_onboarding_performed`: Checks whether project onboarding was already performed.
30+
# * `create_text_file`: Creates/overwrites a file in the project directory.
31+
# * `delete_lines`: Deletes a range of lines within a file.
32+
# * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
33+
# * `execute_shell_command`: Executes a shell command.
34+
# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
35+
# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
36+
# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
37+
# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
38+
# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
39+
# * `initial_instructions`: Gets the initial instructions for the current project.
40+
# Should only be used in settings where the system prompt cannot be set,
41+
# e.g. in clients you have no control over, like Claude Desktop.
42+
# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
43+
# * `insert_at_line`: Inserts content at a given line in a file.
44+
# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
45+
# * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
46+
# * `list_memories`: Lists memories in Serena's project-specific memory store.
47+
# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
48+
# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
49+
# * `read_file`: Reads a file within the project directory.
50+
# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
51+
# * `remove_project`: Removes a project from the Serena configuration.
52+
# * `replace_lines`: Replaces a range of lines within a file with new content.
53+
# * `replace_symbol_body`: Replaces the full definition of a symbol.
54+
# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
55+
# * `search_for_pattern`: Performs a search for a pattern in the project.
56+
# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
57+
# * `switch_modes`: Activates modes by providing a list of their names
58+
# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
59+
# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
60+
# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
61+
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
62+
excluded_tools: []
63+
64+
# initial prompt for the project. It will always be given to the LLM upon activating the project
65+
# (contrary to the memories, which are loaded on demand).
66+
initial_prompt: ""
67+
68+
project_name: "reproschema-py"

CLAUDE.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
ReproSchema Python library and CLI for working with ReproSchema format - a standardized way to represent assessments, questionnaires, and protocols used in research. The library provides validation, conversion utilities, and integrations with REDCap and FHIR.
8+
9+
## Key Commands
10+
11+
### Development Setup
12+
```bash
13+
# Install in development mode
14+
pip install -e .
15+
16+
# Install with all development dependencies
17+
pip install -e ".[dev]"
18+
19+
# Run pre-commit hooks
20+
pre-commit install
21+
pre-commit run --all-files
22+
```
23+
24+
### Testing
25+
```bash
26+
# Run tests with coverage
27+
pytest --cov=reproschema
28+
29+
# Run specific test file
30+
pytest reproschema/tests/test_validate.py
31+
32+
# Run tests in parallel
33+
pytest -n auto
34+
```
35+
36+
### Linting and Formatting
37+
```bash
38+
# Format code with black
39+
black reproschema/
40+
41+
# Run flake8 linter
42+
flake8 reproschema/
43+
44+
# Sort imports
45+
isort reproschema/
46+
47+
# Check spelling
48+
codespell
49+
```
50+
51+
## Architecture
52+
53+
### Core Modules
54+
55+
- **reproschema/cli.py**: Main CLI entry point using Click framework. Provides commands for validation, conversion, migration.
56+
- **reproschema/models/model.py**: Pydantic models auto-generated from LinkML schema. DO NOT modify directly - changes should be made in ReproNim/reproschema repository.
57+
- **reproschema/validate.py**: Schema validation using PyShacl
58+
- **reproschema/redcap2reproschema.py**: Convert REDCap CSV to ReproSchema format
59+
- **reproschema/reproschema2redcap.py**: Convert ReproSchema to REDCap CSV format
60+
- **reproschema/reproschema2fhir.py**: Convert ReproSchema to FHIR Questionnaire resources
61+
- **reproschema/output2redcap.py**: Process reproschema-ui output into REDCap CSV
62+
63+
### Conversion Workflows
64+
65+
1. **REDCap → ReproSchema**: Requires CSV data dictionary + YAML config file
66+
2. **ReproSchema → REDCap**: Takes protocol directory, outputs CSV
67+
3. **ReproSchema → FHIR**: Converts activities/items to FHIR Questionnaire
68+
4. **UI Output → REDCap**: Processes survey responses to REDCap format
69+
70+
## CLI Commands
71+
72+
- `reproschema validate <path>` - Validate ReproSchema format
73+
- `reproschema redcap2reproschema <csv> <yaml>` - Convert REDCap to ReproSchema
74+
- `reproschema reproschema2redcap <input_dir> <output_csv>` - Convert ReproSchema to REDCap
75+
- `reproschema reproschema2fhir <input_dir> <output_dir>` - Convert to FHIR
76+
- `reproschema output2redcap <input_dir> <output_dir>` - Process UI output
77+
- `reproschema migrate <path>` - Migrate to new schema version
78+
- `reproschema convert` - Convert between formats (jsonld, n-triples, turtle)
79+
80+
## Important Notes
81+
82+
- Python 3.10+ required
83+
- The Pydantic models in `reproschema/models/model.py` are auto-generated - DO NOT edit directly
84+
- All schema changes must be made in the LinkML source at ReproNim/reproschema repository
85+
- Uses pre-commit for code quality - commits may require running twice
86+
- Line length limit: 79 characters (enforced by black)

docs/CNAME

Lines changed: 0 additions & 1 deletion
This file was deleted.

internal/CLAUDE.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# reproschema-py - Documentation
2+
3+
## Inherits From
4+
→ Parent: ../../internal/CLAUDE.md (all shared practices apply)
5+
6+
## Repository Purpose
7+
Python library for ReproSchema validation, conversion, and manipulation
8+
9+
## Local Overrides
10+
- **Python**: 3.8+ (parent: 3.7+) - Need dataclasses and typing features
11+
- **Testing**: 90% coverage (parent: 80%) - Critical library requiring high reliability
12+
- **Type hints**: Required for all public APIs - Better IDE support and documentation
13+
14+
## Tech Stack
15+
- Language: Python 3.8+
16+
- Validation: Pydantic
17+
- CLI: Click
18+
- Testing: pytest, pytest-cov
19+
20+
## Key Commands
21+
```bash
22+
# Development
23+
pip install -e .
24+
pytest --cov=reproschema
25+
26+
# CLI usage
27+
reproschema validate <path>
28+
reproschema redcap2reproschema <input> <output>
29+
```
30+
31+
## Dependencies
32+
- **Depends on**: reproschema (core definitions)
33+
- **Used by**: reproschema-agents, reproschema-server
34+
- **External**: pydantic, click, jsonld
35+
36+
## Current Focus
37+
- Active: FHIR converter implementation
38+
- Next: Optimize validation performance
39+
- Blocked: None
40+
41+
## Recent Changes (Last 5)
42+
- 2025-01-29: Memory optimization → ./learnings/2025-01-memory.md
43+
- 2025-01-28: Added FHIR support → ./changes/2025-01-fhir.md
44+
45+
## Local Patterns
46+
- CLI design → ./patterns/cli-architecture.md
47+
- Converter pattern → ./patterns/converter-design.md
48+
- Validation pipeline → ./patterns/validation-flow.md
49+
50+
## Quick Links
51+
- PyPI: https://pypi.org/project/reproschema
52+
- CI: .github/workflows/test.yml
53+
- Issues: /issues?label=reproschema-py
54+
55+
---
56+
*Line count: ~65 (target: < 100)*

internal/CLAUDE.md.backup

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# ReproSchema Python Library - Repository Documentation
2+
3+
## Inherits From
4+
- Parent: ../../internal/CLAUDE.md (all shared practices apply)
5+
6+
## Repository-Specific Details
7+
8+
### Purpose
9+
Python library for working with ReproSchema - provides validation, conversion, and manipulation tools for ReproSchema documents.
10+
11+
### Local Overrides
12+
- **Python version**: Minimum Python 3.8 (not 3.7)
13+
- **Testing**: Use pytest exclusively, maintain 90% coverage (higher than parent requirement)
14+
- **Type hints**: Required for all public APIs
15+
16+
### Unique Patterns
17+
- CLI tool in `reproschema/cli.py`
18+
- Conversion utilities for REDCap, FHIR, and other formats
19+
- Pydantic models for schema validation
20+
- Custom JSON-LD utilities
21+
22+
### Dependencies on Other Repos
23+
- Depends on: reproschema (core schema definitions)
24+
- Used by: reproschema-agents, reproschema-server
25+
26+
### Key Commands
27+
```bash
28+
# Install in development mode
29+
pip install -e .
30+
31+
# Run tests with coverage
32+
pytest --cov=reproschema --cov-report=html
33+
34+
# Validate a schema
35+
reproschema validate <path-to-schema>
36+
37+
# Convert REDCap to ReproSchema
38+
reproschema redcap2reproschema <csv-file> <output-dir>
39+
40+
# Convert ReproSchema to REDCap
41+
reproschema reproschema2redcap <input-dir> <output-csv>
42+
```
43+
44+
### Development Workflow
45+
1. Write tests first (TDD approach)
46+
2. Implement features with type hints
47+
3. Run full test suite
48+
4. Update CLI help text if adding commands
49+
5. Update README with examples
50+
51+
### Testing Strategy
52+
- Unit tests for all converters
53+
- Integration tests for CLI commands
54+
- Test with real-world schemas from reproschema-library
55+
- Mock external dependencies
56+
57+
### Release Process
58+
1. Update CHANGELOG.md
59+
2. Bump version in pyproject.toml
60+
3. Ensure tests pass on all Python versions
61+
4. Create GitHub release
62+
5. Auto-publish to PyPI via GitHub Actions
63+
## Lessons Learned
64+
65+
### Template for New Lessons
66+
```markdown
67+
### [YYYY-MM-DD] - [Brief Description]
68+
**Problem**: [What challenge we faced]
69+
**Solution**: [How we solved it]
70+
**Transferable to**: [Which other repos might benefit]
71+
**Status**: [Shared/Local-only/Under-evaluation]
72+
```
73+
74+
<!-- Add new lessons above this line -->

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
site_name: reporschema-py
1+
site_name: reproschema-py
22
nav:
33
- Home: index.md
44
- Installation: installation.md

0 commit comments

Comments
 (0)