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

feat: hatchling build system, update workflows #149

Merged
merged 18 commits into from
Mar 9, 2023
Merged

feat: hatchling build system, update workflows #149

merged 18 commits into from
Mar 9, 2023

Conversation

manzt
Copy link
Member

@manzt manzt commented Feb 25, 2023

Description

What was changed in this pull request?

  • Migrates clodius to a hatching build system (pyproject.toml-only, no setup.py or setup.cfg)
  • Updates GH Actions with separate workflows for linting/testing
  • GH Action caches data/* (uses hash of .gitignore and get_test_data.sh as cache key)
  • Pins cooler & numpy versions for compatability
  • Consolidate flake8 config to just .flake8.

Why is it necessary?

Some much needed updates to use clodius in modern projects.

Fixes #___

Checklist

  • Unit tests added or updated
  • Updated CHANGELOG.md
  • Run black .

@manzt
Copy link
Member Author

manzt commented Feb 25, 2023

@nvictus pybbi didn't compile with 3.11 so I haven't included

@manzt
Copy link
Member Author

manzt commented Feb 25, 2023

Ready for review...

uses: actions/cache@v3
with:
path: data/
key: ${{ runner.os }}-{{ hashFiles('get_test_data.sh') }}-{{ hashFiles('.gitignore') }}
Copy link
Member Author

Choose a reason for hiding this comment

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

creates a key from the hash to get_test_data.sh and .gitignore. Cache is invalidated if either of these change.

pyproject.toml Outdated
{ name = "Peter Kerpedjiev", email = "pkerpedjiev@gmail.com" },
]
dependencies = [
"numpy<=1.23.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

cooler < 9.0 relies on np.object which has been deprecated

pyproject.toml Outdated
"slugid",
"sortedcontainers",
"nose",
"cooler>=0.8.5, <0.9.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

tiles/cooler.py is not compatible with cooler v0.9

@manzt
Copy link
Member Author

manzt commented Feb 25, 2023

it might be worth thinking about breaking about the dependencies of clodius so modules can be installed separately in the future. e.g.,

pip install clodius[all]

vs.,

pip install clodius[cooler,bigbed]

@manzt
Copy link
Member Author

manzt commented Feb 25, 2023

The linting error yields real errors now for undeclared variables. not sure how to resolve.

@nvictus
Copy link
Member

nvictus commented Mar 9, 2023

The linting error yields real errors now for undeclared variables. not sure how to resolve.

It's a broken function. Let's fix or remove it.

@nvictus nvictus merged commit 966a323 into higlass:develop Mar 9, 2023
@manzt manzt deleted the manzt/pyproject.toml branch March 9, 2023 20:02
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