Skip to content

Linting workflow and pre-commit#26

Merged
tsmathis merged 47 commits intomaterialsproject:masterfrom
HugoOnghai:linting-workflow
Aug 4, 2025
Merged

Linting workflow and pre-commit#26
tsmathis merged 47 commits intomaterialsproject:masterfrom
HugoOnghai:linting-workflow

Conversation

@HugoOnghai
Copy link
Copy Markdown
Collaborator

Summary

  • Added a linting workflow that uses uv (to install dependencies temporarily in the cache) and ruff (the dependency used to lint and check)
  • Added a pre-commit git hook to also check for preferred style before permitting commits (~.git\hooks\pre-commit and configured with the ~.pre-commit-config.yaml to use ruff-check and ruff-format.)

Notes

  • the pre-commit does excludes anything in ~\legacy\
  • the linting workflow ignores the directories listed in pyproject.toml, including \legacy, \notebooks, and ~\uv.lock. other config information for the linting workflow is provided in pyproject.toml as well, or the ~.github\workflows\lint.yml

HugoOnghai and others added 30 commits June 20, 2025 11:26
after upgrading... pip freeze > requirements.txt

the old requirements are saved in oldrequirements.txt for reference
- deserialization works
- re-serialization does not, there are additional dictionary keys that exist that don't match the provided config_file. will need to discuss the goal of this doi_builder a bit more to understand it
…ink found bug with rows greater than 100 on ElinkAPI query_records (144845 dois under 10.17188, 12 are not titled Materials Data On... (edge cases), 144833 Materials have DOIs)
* move old code to 'legacy'

* setup project using uv

* add license

* testing skeleton

* gh actions skeleton

* remove old reqs file to prevent dependabot alerts

---------

Co-authored-by: Tyler Mathis <35553152+tsmathis@users.noreply.github.com>
@tsmathis
Copy link
Copy Markdown
Collaborator

tsmathis commented Aug 1, 2025

First thing, can you remove all of the files/directories that are not related to linting?

Looks like src/, tests/, and the .gitignore should be removed

@HugoOnghai
Copy link
Copy Markdown
Collaborator Author

First thing, can you remove all of the files/directories that are not related to linting?

Looks like src/, tests/, and the .gitignore should be removed

fixed now! i'll make sure the rest are cleaned up too

@tsmathis tsmathis merged commit 2896c50 into materialsproject:master Aug 4, 2025
0 of 3 checks passed
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.

2 participants