# Changelog

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format.


## [0.13.0] -- 2026-07-01
- Migrated from `peppy` to `peprs` across all modules (project, sample, view, models, utils)
- Updated subsample key constant: `SUBSAMPLE_RAW_LIST_KEY` → `SUBSAMPLE_RAW_DICT_KEY`
- Added alembic database migration support; `run_migrations` parameter added to `PEPDatabaseAgent` and `BaseEngine`
- Fixed nullable fields in schema models (`SchemaVersionAnnotation`, `SchemaRecordAnnotation`, `UpdateSchemaRecordFields`, `UpdateSchemaVersionFields`)
- Added support for `"latest"` schema version resolution when uploading/updating projects
- Moved `SAMPLE_NAME_ATTR` and `SAMPLE_TABLE_INDEX_KEY` constants into `pepdbagent/const.py`
- Performed code cleanup and refactoring across modules, including modernization of the codestyle, installation and dependencies.
- ❗`get_raw` method (returning raw project) now returns keys: {config, samples, subsamples} instead of {config, sample_list, subsample_list}

## [0.12.4] -- 2026-01-26
- Added project search by tag in annotation module
- Updated github actions workflows


## [0.12.3] -- 2025-04-03
- Fixed models for schema records and versions


## [0.12.2] -- 2025-03-27
- Fixed links between schema and project

## [0.12.1] -- 2025-03-27
- Added alembic to the project
- Fixed errors in methods getting user stars


## [0.12.0] -- 2025-03-27
- New database model for schemas
- Added schema version and schema record
- Added tags to schemas


## [0.11.1] -- 2024-09-04
- Added archive table of namespaces
- Added sort by stars


## [0.11.0] -- 2024-07-24
- Added validation schemas


## [0.10.0] -- 2024-07-18
- Added user delete method
- Added project history and restoring projects


## [0.9.0] -- 2024-06-25
- Introduced new sample ordering with linked list [#133](https://github.com/pepkit/pepdbagent/issues/133)
- Efficiency improvements of project update function 
- Test restructuring 


## [0.8.0] -- 2024-02-26
- Fixed forking schema
- Improved forking efficiency [#129](https://github.com/pepkit/pepdbagent/issues/129)
- Added uploading project from dict 
- Added get_config, get_samples, get_subsamples methods to project module [#128](https://github.com/pepkit/pepdbagent/issues/128)
- Fixed error handling in views API [#130](https://github.com/pepkit/pepdbagent/issues/130)
- Added no_fail to views API 


## [0.7.3] -- 2024-02-08
- Fixed POP update
- Improved error handling in views API
- Added stats method to Namespace module
- Updated docs
- Added coverage


## [0.7.2] -- 2024-02-02
- Fixed Unique Constraint in the Views
- Fixed update project pop method
- Fixed bug in duplicating samples


## [0.7.1] -- 2024-01-22
- Fixed bug in Stars annotation
- SQL efficiency improvements
- Added sort by date in stared projects

## [0.7.0] -- 2024-01-17
- Added `pop` to project table and annotation model [#107](https://github.com/pepkit/pepdbagent/issues/107)
- Added `forked_from` feature [#73](https://github.com/pepkit/pepdbagent/issues/73)
- Switched to pydantic2 [#105](https://github.com/pepkit/pepdbagent/issues/105)
- Updated requirements (psycopg2 -> psycopg3) [#102](https://github.com/pepkit/pepdbagent/issues/102)
- Added sample module that contains functionality for updating, adding, and deleting samples in the project separately [#111](https://github.com/pepkit/pepdbagent/issues/111)
- Added user and favorite tables with functionality [#104](https://github.com/pepkit/pepdbagent/issues/104)
- Updated the sample update method when updating the whole project. Following this change, samples are updated without changing the ID in the database

## [0.6.0] -- 2023-08-24
- Added date filter to project annotation

## [0.5.5] -- 2023-07-19
- Updated requirements

## [0.5.4] -- 2023-07-14
- Added namespaces info method that returns list of namespaces with 

## [0.5.3] -- 2023-07-13
- Fixed bugs in updating dates and descriptions

## [0.5.2] -- 2023-07-13
- Fixed error in updating date in overwriting function

## [0.5.1] -- 2023-07-10
- Fixed errors in updating projects, that caused Unique Constraint violation error

## [0.5.0] -- 2023-07-07
- Introduced a new database schema (3 tables: projects, samples, subsamples)
- Added new tests
- Fixed the issue of sqlalchemy session already being closed

## [0.4.3] -- 2023-06-30
- Changed the orientation of the raw project dictionary to "records" and updated peppy version to 0.35.6.
- Added description column
- Added sql description search
- Deleted unused files

## [0.4.2] -- 2023-06-27
- Added validation of question mark in name and tag
- Fixed description and name in config file
- Fixed preserving order of columns in database

## [0.4.1] -- 2023-06-09
- Fixed project.update function

## [0.4.0] -- 2023-06-09
- Transitioned to SQLAlchemy ORM.
- Added a pep_schema column to the database.
- Implemented a new testing approach.
- Integrated sorting functionality into the annotations module.
- Temporarily disabled description-based searches to mitigate long processing times and reduce database load.
- Included timezone support in the database.
- Standardized namespace and names to lowercase for case-insensitivity.
- Streamlined the database schema creation process, with tables now created dynamically as needed.


## [0.3.1] -- 2023-03-23
- Fixed bug with peppy const dependencies


## [0.3.0] -- 2023-01-19
- Restructured pepdbagent: 
  - Renamed `Agent` class to `PEPDatabaseAgent`
  - created subclasses (project, annotation, namespace).
  - Merged methods that have similar use case.
  - Removed unused methods.
  - Simplified pepdbagent API
- Restructured database (added columns: `private`, `number_of_samples`, `submission_date`, `last_update_date`)
- Improved logging
- Added new tests
- Improved documentation


## [0.2.3] -- 2022-11-21

- Added more logging information in uploading project methods
- Added `update_only` argument `upload_project` method

## [0.2.2] -- 2022-11-09

- Fixed error in pepannotation (privacy error)

## [0.2.1] -- 2022-11-09

- Fixed error with namespace user if user is unknown

## [0.2.0] -- 2022-11-08

- Added limits and offset to function: `get_projects_in_namespace()`
- Annotation changed to BaseModel from pydantic
- Added privacy information in annotations
- Added update feature to `upload_project` method with `overwrite` argument
- Added mock tests
- Deleted unused functions:
  - `get_projects_in_list`
  - `get_projects_annotation_by_namespace`
  - `project_status`
  - `project_status_by_registry`
  - `get_registry_paths_by_digest`

- Changed method names:
  - `get_project_by_registry` --> `get_project_by_registry_path`
  - `get_project_annotation_by_registry` --> `get_project_annotation_by_registry_path`

## [0.1.0] -- 2022-08-18

- 🎉 first release!
