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 docs + gh pages deploy #1

Merged
merged 4 commits into from
Apr 16, 2024
Merged

Add docs + gh pages deploy #1

merged 4 commits into from
Apr 16, 2024

Conversation

dionhaefner
Copy link
Contributor

A stub for docs to get you going. Will be deployed to GH pages whenever a PR is merged into main.

@Ceyron
Copy link
Owner

Ceyron commented Apr 16, 2024

Thanks for the docs setup! :)

@Ceyron Ceyron merged commit 503b1da into main Apr 16, 2024
2 checks passed
@dionhaefner
Copy link
Contributor Author

@Ceyron I think you need to set the Pages source to "GitHub Actions" in the repo settings for the deploy to work

@Ceyron
Copy link
Owner

Ceyron commented Apr 17, 2024

But this will make the documentation public already, doesn't it?

@dionhaefner
Copy link
Contributor Author

No, GH Pages on private repos is private as well (only people with read access to the repo can see it).

@dionhaefner dionhaefner deleted the dion-docs branch April 17, 2024 08:07
@Ceyron
Copy link
Owner

Ceyron commented Apr 17, 2024

image
This is the warning I get on the pages settings site.

@dionhaefner
Copy link
Contributor Author

You don't have that? (Maybe it's an enterprise feature)

Screenshot 2024-04-17 at 10 33 52

@Ceyron
Copy link
Owner

Ceyron commented Apr 17, 2024

image
Seems to, this should only be available in enterprise

Copy link
Owner

@Ceyron Ceyron left a comment

Choose a reason for hiding this comment

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

@dionhaefner, I have a question regarding the Python module system: What was the reason for excluding the submodules from all? Now the import via import exponax; exponax.normalized.XXX does no longer work.

@dionhaefner
Copy link
Contributor Author

Did you re-run pip install? I made a change in pyproject.toml that should add these automatically.

@Ceyron
Copy link
Owner

Ceyron commented Apr 18, 2024

In other experiment folders, I just use the repo as a separate folder from which I import (no installation). In these cases, the import no longer works.

@dionhaefner
Copy link
Contributor Author

(no installation)

There's your problem :)

You can add the imports back, it doesn't hurt (just unnecessary in a sane setup).

@Ceyron
Copy link
Owner

Ceyron commented Apr 22, 2024

I used Equinox as inspiration for this: https://github.com/patrick-kidger/equinox/blob/main/equinox/__init__.py

I also tried the module structure with installation (i.e., what you added with the PR). In these cases, I can do the following

from exponax import stepper

diffusions_stepper = stepper.Diffusion(1, 3.0, 50, 0.1)

but the following does not work:

import exponax as ex

diffusions_stepper = ex.stepper.Diffusion(1, 3.0, 50, 0.1)

Probably, there are proper names for both importing strategies. I would like the latter, which seemingly only works when I have the submodule export in the top-level __init__.py (even with installation).

Or did I do anything incorrectly? For installation, I cloned the repo, cd'ed into the directory, and ran pip install .

@dionhaefner
Copy link
Contributor Author

True, if you never import exponax.stepper from within the top-level module (that is, __init__.py or any submodule imported from it) it won't be loaded at import. You can verify that it works with exponax.etdrk, which is imported from _base_stepper.py.

So yea just add the submodule imports back here if you explicitly want to support that use case.

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