Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAINT] switch bidsschematools to pyproject.toml #1948

Merged
merged 10 commits into from
Oct 11, 2024

Conversation

Remi-Gau
Copy link
Collaborator

@Remi-Gau Remi-Gau commented Oct 8, 2024

Use pyproject.toml for config and package metadata.

@Remi-Gau Remi-Gau added the exclude-from-changelog This item will not feature in the automatically generated changelog label Oct 8, 2024
@Remi-Gau Remi-Gau requested a review from erdalkaraca as a code owner October 8, 2024 14:42
dependencies = [
"click",
"pyyaml",
"importlib_resources; python_version < '3.9'",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this can go now, no?

Copy link
Collaborator

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think...

tools/schemacode/pyproject.toml Outdated Show resolved Hide resolved
tools/schemacode/pyproject.toml Show resolved Hide resolved
@effigies
Copy link
Collaborator

effigies commented Oct 8, 2024

I also think it's okay to keep using setuptools, if that's easiest.

@Remi-Gau
Copy link
Collaborator Author

I also think it's okay to keep using setuptools, if that's easiest.

tried and it was a bit easier

@Remi-Gau
Copy link
Collaborator Author

Thanks bc83dcb @effigies

would have taken me a while to find it

@Remi-Gau
Copy link
Collaborator Author

This is good to go for me

Copy link
Collaborator

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nits.

rev: v2.14.0
hooks:
- id: pretty-format-toml
args: [--autofix, --indent, '4']
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think sorting leads to a very readable pyproject.toml, where I think there are some rough importance levels that are good to indicate (e.g. "name" should be the first thing in project metadata).

Suggested change
args: [--autofix, --indent, '4']
args: [--autofix, --indent, '4', --no-sort]

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good with me
defo not a hill I want to die on

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forgot to commit this one

tools/schemacode/pyproject.toml Outdated Show resolved Hide resolved
tools/schemacode/pyproject.toml Outdated Show resolved Hide resolved
tools/schemacode/pyproject.toml Show resolved Hide resolved
tools/schemacode/pyproject.toml Outdated Show resolved Hide resolved
Comment on lines 101 to 115
[tool.setuptools.dynamic]
version = {file = "bidsschematools/data/schema/SCHEMA_VERSION"}

[tool.setuptools.package-data]
bidsschematools = [
"data/metaschema.json",
"data/schema/BIDS_VERSION",
"data/schema/SCHEMA_VERSIO",
"data/schema/**/*.yaml",
"tests/data/**/*",
"tests/data/**/.bidsignore"
]

[tool.setuptools.packages.find]
include = ["bidsschematools*"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO packager config should come immediately after the [project] tables.

Remi-Gau and others added 2 commits October 11, 2024 14:36
@effigies effigies added the schema-code Updates or changes to the code used to parse, filter, and render the schema. label Oct 11, 2024
@effigies effigies merged commit f2771e1 into bids-standard:master Oct 11, 2024
24 of 25 checks passed
yarikoptic added a commit to yarikoptic/bids-specification that referenced this pull request Oct 28, 2024
…ttype

* commit 'v1.10.0-35-g5f7004819': (218 commits)
  Include entity-less "scans.json" into an example of inheritance principle (bids-standard#1945)
  fix(checks): Enforce timing mutual exclusions on BOLD/ASL data only (bids-standard#1969)
  refactor contributing (bids-standard#1965)
  [pre-commit.ci] pre-commit autoupdate (bids-standard#1967)
  [SCHEMA] Allow physio files for anat datatype (bids-standard#1961)
  [pre-commit.ci] pre-commit autoupdate
  Add an empty line in hope to get table rendered properly in "Ordering rules" section (bids-standard#1953)
  schema: add check for duplicate READMEs (bids-standard#1952)
  [MAINT] switch bidsschematools to pyproject.toml (bids-standard#1948)
  fix(schema): Disable TaskName check for channels and markers files
  Permit and warn on task/acquisition/run for electrodes and coordsystems
  [FIX] Allow (but discourage) task entity for coordsystem.json
  fix(schema): Limit MRI metadata checks to NIfTIs
  fix: Only check for sorted times in arrays
  py3.13 (bids-standard#1947)
  [pre-commit.ci] pre-commit autoupdate (bids-standard#1946)
  [FIX] Update changelog links to avoid redirects (bids-standard#1944)
  [ENH] Update DWI suffixes to include most common scanner derivatives (bids-standard#1864)
  [pre-commit.ci] pre-commit autoupdate
  [MAINT] Update Release_Protocol.md
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude-from-changelog This item will not feature in the automatically generated changelog schema-code Updates or changes to the code used to parse, filter, and render the schema.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants