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

annotations #14

Closed
wants to merge 5 commits into from
Closed

annotations #14

wants to merge 5 commits into from

Conversation

Cobord
Copy link

@Cobord Cobord commented Aug 27, 2024

  • Create directed graph when the network-type is directed so the from_hif produces either Graph or DiGraph depending on that
  • Use TypedDict rather than an untyped Dict for the validate_hif because there is a fixed set of keys for all the things that can be wrong in the json and the values are only status codes
  • Expand the tests so they use validate_hif to see what was wrong (if anything)

@nwlandry
Copy link
Collaborator

Hi @Cobord --- thanks for these contributions! Before we review this PR, can you write a description of what this PR changes/addresses/adds? Thanks!

@colltoaction
Copy link
Collaborator

+1 to Nicholas' comment. FYI I just merged #13 and now this PR has a few conflicts.

@Cobord Cobord reopened this Aug 31, 2024
@Cobord
Copy link
Author

Cobord commented Aug 31, 2024

Fixed the conflicts

@colltoaction
Copy link
Collaborator

@Cobord I'm happy to take some of these changes. For example the directed NetworkX graph test and implementation. There is more context you might not have like HNX impl here, but it's a great start.

Is it OK if I ask to leave out non-functional changes? e.g typing, variable renaming. I agree those are good changes but at this time we need to keep it simple.

@Cobord
Copy link
Author

Cobord commented Aug 31, 2024

What is the compatibility restriction? Because of Python ecosystem, that makes sense as typing being treated as not being simple (especially if you need pre-3.5). But renaming constants to capitalization and underscoring unused variables shouldn't have any issue with anywhere else and still be simple.

@colltoaction
Copy link
Collaborator

colltoaction commented Aug 31, 2024

We are purposefully ignoring these issues at the moment. This can wait until we set up a linter or similar. In the meantime it makes your changes harder to read and can generate more conflicts for others.

I know the itch to fix simple things but as a maintainer it's better this way 🙏🏻

@Cobord
Copy link
Author

Cobord commented Sep 3, 2024

Cherry picking commit 6f173...
The expanded tests are mixed in with changes not wanting right now so that isn't as cherry pickable

@nwlandry
Copy link
Collaborator

Hi @Cobord --- thanks for this contribution. From looking at the changes and the corresponding discussion, it seems infeasible to implement right now. I would encourage you to break up this sizable PR into smaller pieces: (1) unit tests for the Github action to run, and (2) handling of directed networks in NetworkX. The contribution for validate_hif is not relevant now, because @colltoaction made extensive changes to it. Lastly, the repo is only set up around the schema and unit tests will solely focus on that (not integration tests with other libraries, for example). Again, thanks for the contribution!

@nwlandry nwlandry closed this Sep 20, 2024
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.

3 participants