Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a97b97f
updating dependencies
HugoOnghai Jun 20, 2025
afa51f7
Trying to get test_doi_builder to work
HugoOnghai Jun 21, 2025
79c48f2
Revert "Trying to get test_doi_builder to work"
HugoOnghai Jun 23, 2025
7bb812e
preliminary version of ELinkGetResponseModel made, using ELinkAPI Re…
HugoOnghai Jun 25, 2025
2005e5d
queried all desired data entries (stored as batched json files) on EL…
HugoOnghai Jun 27, 2025
8700859
almost done with pipeline, need to incorporate pymongo steps + new do…
HugoOnghai Jul 3, 2025
11c48e5
template for core
tsmathis Jul 3, 2025
ba3c372
push latest doi_builder and other thigns
HugoOnghai Jul 3, 2025
a747326
find_out_of_date func
tsmathis Jul 3, 2025
1020d1f
remaining core functions
HugoOnghai Jul 8, 2025
b34ae35
testing core functionalities on review environment and local mongo da…
HugoOnghai Jul 10, 2025
52382ff
Merged upstream (#1)
HugoOnghai Jul 12, 2025
d0e05ec
Added linting workflow, hopefully it works
HugoOnghai Jul 14, 2025
9391660
Testing linting workflow again
HugoOnghai Jul 14, 2025
b991f09
New Branch for Linting Workflow
HugoOnghai Jul 16, 2025
8d7d55b
Testing Linting workflow
HugoOnghai Jul 17, 2025
61d74c1
Allowing Lint.YML to run on push to linting_workflow
HugoOnghai Jul 17, 2025
d9ab19c
Testing pre-commit and updated lint.yml to disregard legacy files
HugoOnghai Jul 17, 2025
5b96fa5
disable fail-fast to see if other python versions will fail
HugoOnghai Jul 17, 2025
bdac205
Using uv to install ruff dependency, using uv-cache and removing pip …
HugoOnghai Jul 17, 2025
2e7b9ab
added new action to install virtual environment before attempting to …
HugoOnghai Jul 17, 2025
64a5c07
Fixed missing run for uv venv
HugoOnghai Jul 17, 2025
c4d9a8f
attempting ruff check again now that is seems to work...
HugoOnghai Jul 18, 2025
69556e5
Trying uvx
HugoOnghai Jul 18, 2025
8cab90f
Removed assume python 3.9 from ruff config in pyproject.toml
HugoOnghai Jul 21, 2025
edd887e
New Branch for Linting Workflow
HugoOnghai Jul 16, 2025
4657ea3
Testing Linting workflow
HugoOnghai Jul 17, 2025
5c9197e
(after rebase) Allowing Lint.YML to run on push to linting_workflow
HugoOnghai Jul 17, 2025
122e4cb
Testing pre-commit and updated lint.yml to disregard legacy files
HugoOnghai Jul 17, 2025
f9e4753
disable fail-fast to see if other python versions will fail
HugoOnghai Jul 17, 2025
18cf3d2
Using uv to install ruff dependency, using uv-cache and removing pip …
HugoOnghai Jul 17, 2025
059c72d
added new action to install virtual environment before attempting to …
HugoOnghai Jul 17, 2025
1350d61
Fixed missing run for uv venv
HugoOnghai Jul 17, 2025
16e6a33
attempting ruff check again now that is seems to work...
HugoOnghai Jul 18, 2025
7ee8fb5
(after rebase) Trying uvx
HugoOnghai Jul 18, 2025
4a83b7a
Removed assume python 3.9 from ruff config in pyproject.toml
HugoOnghai Jul 21, 2025
5f2f948
fixing typos after rebase
HugoOnghai Jul 30, 2025
c8c53cb
Installing Ruff before calling check; added precommit to uvlock
HugoOnghai Jul 30, 2025
5f2262a
Added verbose keyword to make clear that files are being checked
HugoOnghai Jul 30, 2025
0942819
Trying to remove extraneous files from PR
HugoOnghai Aug 4, 2025
930cf9f
Attempting to revert src/ tests/ and .gitignore to master current ver
HugoOnghai Aug 4, 2025
a1423ed
Readded release and testing default workflows to match master
HugoOnghai Aug 4, 2025
c53df93
Readd changelog to match master
HugoOnghai Aug 4, 2025
2a94abd
restored old version of gitignore
HugoOnghai Aug 4, 2025
9c022d6
Fixing PR comments
HugoOnghai Aug 4, 2025
bef3f59
fix
HugoOnghai Aug 4, 2025
a797639
added mypy and ruff to a dependency group called lint
HugoOnghai Aug 4, 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
16 changes: 16 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,20 @@ on:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:

# TODO: setup linting with uv/ruff
# informed by testing.yml and https://medium.com/@sidharthvijayakumar7/automating-pylint-in-github-workflow-80c84b2ff243 and ruff documentation
jobs:
linting:
steps:
- uses: actions/checkout@v4

- name: Install uv and set up the python version
uses: astral-sh/setup-uv@v6
with:
python-version: '3.12'
version: "latest"

- name: Analyzing the code with ruff
run: uvx ruff check --output-format=github
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.12.4
hooks:
# Run the linter.
- id: ruff-check
types_or: [ python, pyi ]
args: [ --fix ]
# Run the formatter.
- id: ruff-format
types_or: [python, pyi ]
exclude: 'legacy'
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
58 changes: 58 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ dependencies = [
[dependency-groups]
dev = [
"pytest>=8.4.1",
"pre-commit>=4.2.0",
]
lint = [
"mypy>=1.17.1",
"ruff>=0.12.7",
]

[build-system]
Expand All @@ -38,3 +43,56 @@ packages = ["src/mp_cite"]
[project.urls]
Homepage = "https://github.com/materialsproject/MPCite"
Issues = "https://github.com/materialsproject/MPCite/issues"

[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
"legacy",
"notebooks",
"uv.lock"
]

# Same as Black.
line-length = 88
indent-width = 4

[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E4", "E7", "E9", "F"]
ignore = []

# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []

# Allow NO unused variables to exist in the codebase. If underscore-prefixed unused variables are permissible, use this regex $^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
dummy-variable-rgx = "^$"

[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"

# Like Black, indent with spaces, rather than tabs.
indent-style = "space"

# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false

# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"

# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
#
# This is currently disabled by default, but it is planned for this
# to be opt-out in the future.
docstring-code-format = false

# Set the line length limit used when formatting code snippets in
# docstrings.
#
# This only has an effect when the `docstring-code-format` setting is
# enabled.
docstring-code-line-length = "dynamic"
Loading
Loading