Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
89cad84
👷 ci: add support for beta releases on pypi
megasanjay Dec 11, 2023
163e676
feat: updated beta version code (#11)
nygim Dec 14, 2023
2133552
feat: ✨ validation and generation functions for datatype_dictionary (…
slugb0t Jan 9, 2024
13ae328
✨ feat: add support for datacite v4.5 (#13)
megasanjay Mar 12, 2024
c1c9cf1
💚 ci:: update release condition
megasanjay Mar 12, 2024
3bd9b0d
👷 ci: test pull request deploys (#15)
megasanjay Mar 12, 2024
5c08730
👷 ci: fix production deployments
megasanjay Mar 12, 2024
c237c8a
👷 ci: fix production deployments
megasanjay Mar 12, 2024
d81114c
refactor: ♻️ pipeline conversion function (#17)
slugb0t Mar 19, 2024
9402470
:recycle: refactor: correct payload for datacite
slugb0t Mar 19, 2024
9f4d40f
:recycle: refactor: update url for payload and append funding references
slugb0t Mar 19, 2024
95f4131
package: build: update version
slugb0t Mar 19, 2024
e2f2429
:bug: fix: duplicate funding_references
slugb0t Mar 19, 2024
f02f12d
:package: build: test invalid url for payload
slugb0t Mar 19, 2024
55ab51f
:recycle: refactor: update tests to handle validation and generation …
slugb0t Mar 26, 2024
4ab678f
feat: add clinical trials study description generation (#19)
Aydawka Jul 30, 2025
3164f7c
fix: remove redundant integration import
Aydawka Jul 30, 2025
469f2e2
fix: test (#20)
Aydawka Aug 5, 2025
8049fa5
fix: update version
Aydawka Aug 21, 2025
891333f
fix: update/generate validate docs (#22)
Aydawka Sep 3, 2025
cb389e4
feat: versioning
Aydawka Sep 9, 2025
be137a0
fix: remove python specific version guideline
Aydawka Sep 14, 2025
0f74869
fix: update version
Aydawka Sep 15, 2025
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Check dependencies
run: make doctor

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: .venv
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
Expand All @@ -36,8 +36,8 @@ jobs:
- name: Revert the changes to bin folder
run: chmod 644 ./bin/*

- name: Check code
run: make check
# - name: Check code
# run: make check

- name: Test code
run: make test
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/publish-to-pypi-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Publish to PyPI - beta tags

on:
release:
types: [published]
push:
branches:
- staging
pull_request:
types: [closed]
branches:
- staging
workflow_dispatch:

jobs:
release:
if: (!(github.event.action == 'closed' && github.event.pull_request.merged != true))
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11]

steps:
- name: Checkout the repository
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Setup Poetry
uses: Gr1N/setup-poetry@v8

- name: Install dependencies
run: poetry install

- name: Setup poetry config
run: poetry config pypi-token.pypi "${{ secrets.PYPI_API_TOKEN }}"

- name: Build package
run: poetry build

- name: Publish package
run: poetry publish
1 change: 1 addition & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:

jobs:
release:
if: (!(github.event.action == 'closed' && github.event.pull_request.merged != true))
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Icon*
# Temporary virtual environment files
/.cache/
/.venv/
venv/
tmp/

# Temporary server files
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pyfairdatatools is a Python package that includes functions of fairhub.io for ma

You will need the following installed on your system:

- Python 3.8+
- [Python](https://www.python.org/)
- [Pip](https://pip.pypa.io/en/stable/)
- [Poetry](https://poetry.eustace.io/)

Expand Down
182 changes: 182 additions & 0 deletions dev/changes/clinicaltrials.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
# All Changes

- `IdentificationModule` has been renamed to `identificationModule`
- `officialTitle` has been added
- `acronym` has been added
- `OrgStudyIdInfo` has been renamed to `orgStudyIdInfo`
- `OrgStudyId` has been renamed to `orgStudyId`
- `OrgStudyIdType` has been renamed to `orgStudyIdType`
- `OrgStudyIdDomain` has been renamed to `orgStudyIdDomain`
- `OrgStudyIdLink` has been renamed to `orgStudyIdLink`
- `SecondaryIdInfoList` has been renamed to `secondaryIdInfoList`
- `SecondaryId` has been renamed to `secondaryId`
- `SecondaryIdType` has been renamed to `secondaryIdType`
- `SecondaryIdDomain` has been renamed to `secondaryIdDomain`
- `SecondaryIdLink` has been renamed to `secondaryIdLink`
- `StatusModule` has been renamed to `statusModule`
- `OverallStatus` has been renamed to `overallStatus`
- `WhyStopped` has been renamed to `whyStopped`
- `StartDateStruct` has been renamed to `startDateStruct`
- `StartDate` has been renamed to `startDate` and the format has been changed to `YYYY-MM`
- `StartDateType` has been renamed to `startDateType`
- `CompletionDateStruct` has been renamed to `completionDateStruct` and is now required
- `CompletionDate` has been renamed to `completionDate` and the format has been changed to `YYYY-MM`
- `CompletionDateType` has been renamed to `completionDateType`
- `SponsorCollaboratorsModule` has been renamed to `sponsorCollaboratorsModule`
- `LeadSponsor` has been renamed to `leadSponsor`
- `LeadSponsorName` has been renamed to `leadSponsorName`
- `leadSponsorIdentifier` has been added
- `leadSponsorIdentifierValue` has been added and is now required
- `leadSponsorIdentifierScheme` has been added and is now required
- `schemeURI` has been added
- `ResponsibleParty` has been renamed to `responsibleParty`
- `ResponsiblePartyInvestigatorFullName` has been removed and replaced with `responsiblePartyInvestigatorFirstName` and `responsiblePartyInvestigatorLastName`
- `responsiblePartyInvestigatorFirstName` has been added and is now required
- `responsiblePartyInvestigatorLastName` has been added and is now required
- `ResponsiblePartyInvestigatorTitle` has been renamed to `responsiblePartyInvestigatorTitle`
- `responsiblePartyInvestigatorIdentifier` has been added and is now required
- `responsiblePartyInvestigatorIdentifierValue` has been added and is now required
- `responsiblePartyInvestigatorIdentifierScheme` has been added and is now required
- `schemeURI` has been added
- `ResponsiblePartyInvestigatorAffiliation` has been renamed to `responsiblePartyInvestigatorAffiliation`
- `responsiblePartyInvestigatorAffiliationName` has been added and is now required
- `responsiblePartyInvestigatorAffiliationIdentifier` has been added
- `responsiblePartyInvestigatorAffiliationIdentifierValue` has been added and is now required
- `responsiblePartyInvestigatorAffiliationIdentifierScheme` has been added and is now required
- `schemeURI` has been added
- `CollaboratorList` has been renamed to `collaboratorList`
- `CollaboratorName` has been renamed to `collaboratorName`
- `collaboratorNameIdentifier` has been added
- `collaboratorNameIdentifierValue` has been added and is now required
- `collaboratorNameIdentifierScheme` has been added and is now required
- `schemeURI` has been added
- `OversightModule` has been renamed to `oversightModule`
- `OversightHasDMC` has been renamed to `oversightHasDMC`
- `isFDARegulatedDrug` has been added
- `isFDARegulatedDevice` has been added
- `humanSubjectReviewStatus` has been added and is now required
- `DescriptionModule` has been renamed to `descriptionModule`
- `BriefSummary` has been renamed to `briefSummary`
- `DetailedDescription` has been renamed to `detailedDescription`
- `ConditionsModule` has been renamed to `conditionsModule`
- `ConditionList` has been renamed to `conditionList`
- `conditionName` has been added and is now required
- `conditionIdentifier` has been added
- `conditionClassificationCode` has been added and is now required
- `conditionScheme` has been added and is now required
- `schemeURI` has been added
- `conditionURI` has been added
- `KeywordList` has been renamed to `keywordList`
- `keywordValue` has been added and is now required
- `keywordIdentifier` has been added
- `keywordClassificationCode` has been added and is now required
- `keywordScheme` has been added and is now required
- `schemeURI` has been added
- `keywordURI` has been added
- `DesignModule` has been renamed to `designModule`
- `StudyType` has been renamed to `studyType`
- `DesignInfo` has been renamed to `designInfo`
- `DesignAllocation` has been renamed to `designAllocation`
- `DesignInterventionModel` has been renamed to `designInterventionModel`
- `DesignInterventionModelDescription` has been renamed to `designInterventionModelDescription`
- `DesignObservationalModelList` has been renamed to `designObservationalModelList`
- `DesignTimePerspectiveList` has been renamed to `designTimePerspectiveList`
- `DesignPrimaryPurpose` has been renamed to `designPrimaryPurpose`
- `DesignMaskingInfo` has been renamed to `designMaskingInfo`
- `DesignMasking` has been renamed to `designMasking`
- `DesignMaskingDescription` has been renamed to `designMaskingDescription`
- `PhaseList` has been renamed to `phaseList`
- `EnrollmentInfo` has been renamed to `enrollmentInfo`
- `EnrollmentCount` has been renamed to `enrollmentCount`
- `EnrollmentType` has been renamed to `enrollmentType`
- `isPatientRegistry` has been added
- `BioSpec` has been renamed to `bioSpec`
- `BioSpecRetention` has been renamed to `bioSpecRetention`
- `BioSpecDescription` has been renamed to `bioSpecDescription` and is now required
- `TargetDuration` has been renamed to `targetDuration` and now requires a regex pattern and is required if `isPatientRegistry` is true
- `NumberGroupsCohorts` has been renamed to `numberGroupsCohorts` and has an updated regex pattern
- `ArmsInterventionsModule` has been renamed to `armsInterventionsModule`
- `ArmGroupList` has been renamed to `armGroupList`
- `ArmGroupLabel` has been renamed to `armGroupLabel`
- `ArmGroupType` has been renamed to `armGroupType`
- `ArmGroupDescription` has been renamed to `armGroupDescription` and is now required
- `ArmGroupInterventionList` has been renamed to `armGroupInterventionList`
- `InterventionList` has been renamed to `interventionList`
- `InterventionType` has been renamed to `interventionType`
- `InterventionName` has been renamed to `interventionName`
- `InterventionDescription` has been renamed to `interventionDescription` and is now required
- `InterventionOtherNameList` has been renamed to `interventionOtherNameList`
- `EligibilityModule` has been renamed to `eligibilityModule`
- `Gender` has been renamed to `sex`
- `GenderBased` has been renamed to `genderBased`
- `GenderDescription` has been renamed to `genderDescription`
- `MinimumAge` has been renamed to `minimumAge`
- `MaximumAge` has been renamed to `maximumAge`
- `HealthyVolunteers` has been renamed to `healthyVolunteers`
- `EligibilityCriteria` has been renamed to `eligibilityCriteria`
- `eligibilityCriteriaInclusion` has been added
- `eligibilityCriteriaExclusion` has been added
- `studyPopulation` has been added
- `samplingMethod` has been added
- `ContactsLocationsModule` has been renamed to `contactsLocationsModule`
- `CentralContactList` has been renamed to `centralContactList`
- `CentralContactName` has been removed and replaced with `centralContactFirstName` and `centralContactLastName`
- `CentralContactFirstName` has been added and is now required
- `CentralContactLastName` has been added and is now required
- `centralContactDegree` has been added
- `centralContactIdentifier` has been added
- `centralContactIdentifierValue` has been added and is now required
- `centralContactIdentifierScheme` has been added and is now required
- `schemeURI` has been added
- `centralContactAffiliation` has been added
- `centralContactAffiliationName` has been added and is now required
- `centralContactAffiliationIdentifier` has been added
- `centralContactAffiliationIdentifierValue` has been added and is now required
- `centralContactAffiliationIdentifierScheme` has been added and is now required
- `schemeURI` has been added
- `CentralContactPhone` has been renamed to `centralContactPhone` is no longer required
- `CentralContactPhoneExt` has been renamed to `centralContactPhoneExt`
- `CentralContactEMail` has been renamed to `centralContactEMail`
- `OverallOfficialList` has been renamed to `overallOfficialList`
- `OverallOfficialName` has been removed and replaced with `overallOfficialFirstName` and `overallOfficialLastName`
- `OverallOfficialFirstName` has been added and is now required
- `OverallOfficialLastName` has been added and is now required
- `overallOfficialDegree` has been added
- `overallOfficialIdentifier` has been added
- `overallOfficialIdentifierValue` has been added and is now required
- `overallOfficialIdentifierScheme` has been added and is now required
- `schemeURI` has been added
- `overallOfficialAffiliation` has been added
- `overallOfficialAffiliationName` has been added and is now required
- `overallOfficialAffiliationIdentifier` has been added
- `overallOfficialAffiliationIdentifierValue` has been added and is now required
- `overallOfficialAffiliationIdentifierScheme` has been added and is now required
- `schemeURI` has been added
- `OverallOfficialRole` has been renamed to `overallOfficialRole`
- `LocationList` has been renamed to `locationList`
- `LocationFacility` has been renamed to `locationFacility`
- `LocationStatus` has been renamed to `locationStatus`
- `LocationCity` has been renamed to `locationCity`
- `LocationState` has been renamed to `locationState`
- `LocationZip` has been renamed to `locationZip`
- `LocationCountry` has been renamed to `locationCountry`
- `locationIdentifier` has been added
- `locationIdentifierValue` has been added and is now required
- `locationIdentifierScheme` has been added and is now required
- `schemeURI` has been added
- `LocationContactList` has been renamed to `locationContactList`
- `LocationContactName` has been removed and replaced with `locationContactFirstName` and `locationContactLastName`
- `LocationContactFirstName` has been added and is now required
- `LocationContactLastName` has been added and is now required
- `locationContactDegree` has been added
- `locationContactIdentifier` has been added
- `locationContactIdentifierValue` has been added and is now required
- `locationContactIdentifierScheme` has been added
- `schemeURI` has been added
- `LocationContactRole` has been renamed to `locationContactRole`
- `LocationContactPhone` has been renamed to `locationContactPhone`
- `LocationContactPhoneExt` has been renamed to `locationContactPhoneExt`
- `LocationContactEMail` has been renamed to `locationContactEMail`
- `IPDSharingStatementModule` has been removed
- `ReferencesModule` has been removed
- `humanSubjectReviewStatus` has controlled options
69 changes: 69 additions & 0 deletions dev/changes/datacite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# All Changes

- `Identifier` has been renamed to `identifier`
- `Title` has been renamed to `title`
- `Version` has been renamed to `version`
- `AlternateIdentifier` has been renamed to `alternateIdentifier`
- `Creator` has been renamed to `creator`
- `affiliationValue` has been renamed to `affiliationName`
- `affiliationName` has been renamed to required
- `affiliationIdentifier` has been changed to an object
- `affiliationIdentifierValue` has been added and is required
- `affiliationIdentifierScheme` has been added and is required
- `schemeURI` has been added
- `Contributor` has been renamed to `contributor`
- `affiliationValue` has been renamed to `affiliationName`
- `affiliationName` has been renamed to required
- `affiliationIdentifier` has been changed to an object
- `affiliationIdentifierValue` has been added and is required
- `affiliationIdentifierScheme` has been added and is required
- `schemeURI` has been added
- `PublicationYear` has been renamed to `publicationYear`
- `Date` has been renamed to `date`
- `ResourceType` has been renamed to `resourceType`
- `DatasetRecordKeys` has been removed
- `DatasetDeIdentLevel` has been renamed to `datasetDeIdentLevel`
- `NotKnown` has been removed as an option for `deIdentType`
- `DatasetConsent` has been renamed to `datasetConsent`
- `NotKnown` has been removed as an option for `consentType`
- `Description` has been renamed to `description`
- `SeriesInformation` has been removed as an option for `descriptionType`
- `TableOfContents` has been removed as an option for `descriptionType`
- `Language` has been renamed to `language`
- `RelatedIdentifier` has been renamed to `relatedIdentifier` and added to the libarary
- `relatedIdentifierValue` has been added and is required
- `relatedIdentifierType` has been added and is required
- `relationType` has been added and is required
- `relatedMetadataScheme` has been added
- `schemeURI` has been added
- `schemeType` has been added
- `resourceTypeGeneral` has been added
- `Subject` has been renamed to `subject`
- `subjectIdentifier` has been added
- `classificationCode` has been added and is required
- `subjectScheme` has been added and is required
- `schemeURI` has been added
- `valueURI` has been moved to here
- `ManagingOrganization` has been renamed to `managingOrganization`
- `AccessType` has been renamed to `accessType`
- `NotYetKnown` has been removed as an option for `accessType`
- `AcessDetails` has been renamed to `accessDetails`
- `Rights` has been renamed to `rights`
- `rightsValue` has been renamed to `rightsName`
- `rightsIdentifier` has been changed to an object
- `rightsIdentifierValue` has been added and is required
- `rightsIdentifierScheme` has been added and is required
- `schemeURI` has been added
- `Publisher` has been renamed to `publisher`
- `publisherName` has been added and is required
- `publisherIdentifier` has been changed to an object
- `publisherIdentifierValue` has been added and is required
- `publisherIdentifierScheme` has been added and is required
- `schemeURI` has been added
- `Size` has been renamed to `size`
- `format` has been added
- `FundingReference` has been renamed to `fundingReference`
- `funderIdentifierType` is now required in `funderIdentifier`
- `RelatedItem` has been removed
- `other` option has been renamed to `Other` for `identifierType`
- `Study lead` option has been renamed to `StudyLead` for `contributorType`
46 changes: 46 additions & 0 deletions dev/pull_schemas.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
"""Pulls A JSON schema from a URL and saves it to a filepath"""

import json
import requests

schema_paths = [
{
"sourceURL": "https://raw.githubusercontent.com/AI-READI/cds-specification/main/docs/schemas/dataset_description.schema.json", # noqa: E501 # pylint: disable=line-too-long
"destinationFileName": "dataset_description.schema.json",
},
{
"sourceURL": "https://raw.githubusercontent.com/AI-READI/cds-specification/main/docs/schemas/study_description.schema.json", # noqa: E501 # pylint: disable=line-too-long
"destinationFileName": "study_description.schema.json",
},
{
"sourceURL": "https://raw.githubusercontent.com/AI-READI/datatype-dictionary/main/datatype_dictionary.schema.json", # noqa: E501 # pylint: disable=line-too-long
"destinationFileName": "datatype_dictionary.schema.json",
},
]


def main():
"""CLI entrypoint."""

folder_path = "pyfairdatatools/schemas/"

for schema_path in schema_paths:
file_path = folder_path + schema_path["destinationFileName"]

print(f"Pulling {schema_path['sourceURL']} to {file_path}")

# Pull the schema from the URL
response = requests.get(
schema_path["sourceURL"], allow_redirects=True, timeout=10
)
schema = response.json()

# Write the schema to a file
with open(file_path, "w", encoding="utf-8") as file:
json.dump(schema, file, indent=2)

return


if __name__ == "__main__": # pragma: no cover
main() # pylint: disable=no-value-for-parameter
Loading
Loading