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

Add codespell support (config, workflow to detect/not fix) and make it fix few typos #53

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

yarikoptic
Copy link

More about codespell: https://github.com/codespell-project/codespell .

I personally introduced it to dozens if not hundreds of projects already and so far only positive feedback.

CI workflow has 'permissions' set only to 'read' so also should be safe.

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i -e 's, nd log it, and log it,g' sql/sql_generate_export_tables.py",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "sed -i -e s,retrival,retrieval,g ./sql/sql_generate_export_tables.py",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
…agically

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
@@ -47,5 +47,5 @@ def export_postgres_to_s3(query, s3_key, chunk_size):
if __name__ == "__main__":
s3_bucket = f"openalex-sandbox/affiliations/{time.strftime('%Y-%m-%d')}"
chunk_size = 4250000 # 850M / 200 parts = 4.25M rows per part
query = "SELECT * from mid.affilation ORDER BY paper_id, author_id"
query = "SELECT * from mid.affiliation ORDER BY paper_id, author_id"
Copy link
Author

Choose a reason for hiding this comment

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

I guess this script is rarely used since seems this would fix a bug?

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.

1 participant