Skip to content

Conversation

@HaoZeke
Copy link
Member

@HaoZeke HaoZeke commented Sep 9, 2024

As it says in the title. Closes #1431. Closes #1430. Depends on #1429.

@mattip
Copy link
Contributor

mattip commented May 20, 2025

CI is failing

@Techcable
Copy link

Is there any update on this?

@HaoZeke
Copy link
Member Author

HaoZeke commented Jul 4, 2025

Is there any update on this?

This one needs a decision and a cleanup.. summoning @JuroOravec for an opinion and will clean it up soonish.

@JuroOravec
Copy link
Contributor

Hi, sorry for silence, I was moving countries. If anyone's in Prague hit me up! Having a look now.

autoapi_add_toc_entry = True
autoapi_keep_files = True
autoapi_ignore = ["*_version*", "*migrations*"]
autoapi_ignore = ["*_version*", "*migrations*", "*schema*"]
Copy link
Contributor

Choose a reason for hiding this comment

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

In my other project we use mkdocs, so I'm not that familiar with sphinx. So this addition is to exclude the asv/schema.py file, right?

# Using model_dump with mode='json' to ensure proper serialization
# print(rtoml.dumps(config.model_dump(mode="toml")))
# print(json.dumps(config.model_dump(mode="toml"), indent=4))
mkconf = ASVConfig.model_validate_json(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think using Pydantic for validation is great!

However I don't understand the purpose of this asv/schema.py file:

  1. How does it relate to asv/config.py? Is asv/schema.py simply for documentation? Wouldn't it make more sense to make the main config class Config (in asv/config.py) into a Pydantic model, so all the fields and their descriptions live there?
  2. Also, in asv/config.py, there _get_config_path() which defines the paths for the config. It doesn't yet support .toml extension.
  3. What is this code here at the end with mkconf and print() statements. Is that only for debugging?

@@ -0,0 +1,66 @@
# The version of the config file format. Do not change, unless
# you know what you are doing.
version = 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Also how is this asv.conf.toml used? Is it just an example? Or are these values used as defaults? Because now there wll be both asv.conf.toml and asv.conf.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: Switch away from json DOC: Keep .json configuration closer to the documentation

4 participants