-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from flatironinstitute/nemos
converted to nemos
- Loading branch information
Showing
21 changed files
with
128 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Build and upload to PyPI for pure python | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
name: Build and test package | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# this is necessary for setuptools_scm to work properly with github | ||
# actions, see https://github.com/pypa/setuptools_scm/issues/480 and | ||
# https://stackoverflow.com/a/68959339 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
- name: Build package | ||
run: | | ||
pip install build | ||
python -m build --outdir dist/ --sdist --wheel | ||
- name: Check there's only one sdist and one whl file created | ||
shell: bash | ||
# because the following two tests will be weird otherwise. see | ||
# https://askubuntu.com/a/454568 for why this is the right way to handle | ||
# it. using [[ BOOLEAN ]] || EXPR is a compact way of writing IF NOT | ||
# BOOLEAN THEN EXPR in bash | ||
run: | | ||
[[ $(find dist/ -type f -name "*whl" -printf x | wc -c) == 1 ]] || exit 1 | ||
[[ $(find dist/ -type f -name "*tar.gz" -printf x | wc -c) == 1 ]] || exit 1 | ||
- name: Check setuptools_scm version against git tag | ||
shell: bash | ||
run: | | ||
# we use the error code of this comparison: =~ is bash's regex | ||
# operator, so it checks whether the right side is contained in the | ||
# left side. In particular, we succeed if the path of the source code | ||
# ends in the most recent git tag, fail if it does not. | ||
[[ "$(ls dist/*tar.gz)" =~ "-$(git describe --tags).tar.gz" ]] | ||
- name: Check we can install from wheel | ||
# note that this is how this works in bash (different shells might be | ||
# slightly different). we've checked there's only one .whl file in an | ||
# earlier step, so the bit in `$()` will expand to that single file, | ||
# then we pass [dev] to get specify the optional dev dependencies, and | ||
# we wrap the whole thing in quotes so bash doesn't try to interpret the | ||
# square brackets but passes them directly to pip install | ||
shell: bash | ||
run: | | ||
pip install "$(ls dist/*whl)[dev]" | ||
- name: Run some tests | ||
# modify the following as necessary to e.g., run notebooks | ||
run: | | ||
pytest | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/* | ||
|
||
publish: | ||
name: Upload release to Test PyPI | ||
needs: [build] | ||
environment: pypi | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
- name: Publish package to test pypi | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
![LOGO](CCN-logo-wText.png) | ||
|
||
# neurostatslib | ||
A toolbox of statistical analysis for neuroscience. | ||
# nemos | ||
NEural MOdelS, a statistical modeling framework for neuroscience. | ||
|
||
## Disclaimer | ||
This is an alpha version, the code is in active development and the API is subject to change. | ||
|
||
## Setup | ||
|
||
To install, clone this repo and install using `pip`: | ||
|
||
``` sh | ||
git clone [email protected]:flatironinstitute/generalized-linear-models.git | ||
cd generalized-linear-models/ | ||
git clone [email protected]:flatironinstitute/nemos.git | ||
cd nemos/ | ||
pip install -e . | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# neurostatslib | ||
# nemos | ||
A toolbox of statistical analysis for neuroscience. | ||
|
||
## Disclaimer | ||
Please note that this package is currently under development. While you can download and test the functionalities that are already present, it's important to be aware that the code stability and systematic testing cannot be guaranteed at this stage. | ||
|
||
See our [README](https://github.com/flatironinstitute/generalized-linear-models/blob/main/README.md) for more info. | ||
See our [README](https://github.com/flatironinstitute/nemos/blob/main/README.md) for more info. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ requires = ["setuptools", "setuptools-scm"] | |
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "neurostatslib" | ||
name = "nemos" | ||
version = "0.1.0" | ||
authors = [ | ||
{name = "Edoardo Balzani", email = "[email protected]"}, | ||
|
@@ -41,7 +41,7 @@ dependencies = [ | |
# Configure package discovery for setuptools | ||
[tool.setuptools.packages.find] | ||
where = ["src"] # The directory where package modules are located | ||
include = ["neurostatslib"] # The specific package(s) to include in the distribution | ||
include = ["nemos"] # The specific package(s) to include in the distribution | ||
|
||
|
||
# Define optional dependencies for the project | ||
|
@@ -96,7 +96,7 @@ profile = "black" | |
|
||
# Configure pytest | ||
[tool.pytest.ini_options] | ||
addopts = "--cov=neurostatslib" # Additional options to pass to pytest, enabling coverage for the 'neurostatslib' package | ||
addopts = "--cov=nemos" # Additional options to pass to pytest, enabling coverage for the 'nemos' package | ||
testpaths = ["tests"] # Specify the directory where test files are located | ||
|
||
[tool.coverage.report] | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.