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

using the latest cookiecutter to make maintenance easier #93

Merged
merged 31 commits into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2875477
using the cookiecutter
xiki-tempula Mar 23, 2024
492e5cc
remove .DS_Store
xiki-tempula Mar 23, 2024
727c9f9
enable CI
xiki-tempula Mar 23, 2024
00c17be
fix test
xiki-tempula Mar 23, 2024
fe19677
fix deploy
xiki-tempula Mar 23, 2024
7448897
fix rtd
xiki-tempula Mar 23, 2024
4f3fb77
test the cookiecutter
xiki-tempula Mar 23, 2024
b100159
fix rtd
xiki-tempula Mar 23, 2024
a5e9fec
use the old version
xiki-tempula Mar 23, 2024
4b344c0
fix rtd
xiki-tempula Mar 23, 2024
72d64a5
fix CI
xiki-tempula Mar 23, 2024
1a35534
fix deploy
xiki-tempula Mar 23, 2024
235decf
fix RTD
xiki-tempula Mar 23, 2024
22b0e0c
update
xiki-tempula Mar 23, 2024
0e948f2
fix rtd
xiki-tempula Mar 23, 2024
bda3397
install ocnda env
xiki-tempula Mar 23, 2024
c02d05c
fix rtd
xiki-tempula Mar 23, 2024
6f270c6
fix rtd
xiki-tempula Mar 23, 2024
7746920
fixz rtd
xiki-tempula Mar 23, 2024
1ededa4
fix rtd
xiki-tempula Mar 23, 2024
211f397
fix rtd
xiki-tempula Mar 23, 2024
573ab64
fix doc
xiki-tempula Mar 23, 2024
96dd258
remove idea
xiki-tempula Mar 23, 2024
6338522
clean up
xiki-tempula Mar 23, 2024
5e6edbc
cleanup
xiki-tempula Mar 23, 2024
fd62fc7
fix manifest
xiki-tempula Mar 24, 2024
58cfd47
change include_package_data
xiki-tempula Mar 24, 2024
c508a30
Update .github/CONTRIBUTING.md
xiki-tempula Mar 30, 2024
1bea840
address comments
xiki-tempula Mar 30, 2024
3efeb8c
Merge branch 'feat_main' of https://github.com/xiki-tempula/alchemtes…
xiki-tempula Mar 30, 2024
eb912be
Apply suggestions from code review
orbeckst Mar 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 14 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Codecov configuration to make it a bit less noisy
coverage:
status:
patch: false
project:
default:
threshold: 50%
comment:
layout: "header"
require_changes: false
branches: null
behavior: default
flags: null
paths: null
4 changes: 2 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
branch = True
omit =
# omit all tests
src/alchemtest/tests/*
alchemtest/tests/*
# omit the versioneer-installed _version.py
src/alchemtest/_version.py
alchemtest/_version.py
Copy link
Member

Choose a reason for hiding this comment

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

Do we still have a file _version.py?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is automatically generated by git versioneer when you pip install it. Looks like
__version__ = "0.10.0.dev0"


[report]
exclude_lines =
Expand Down
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
src/alchemtest/_version.py export-subst
alchemtest/_version.py export-subst
47 changes: 47 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# How to contribute

We welcome contributions from external contributors, and this document
describes how to merge code changes into this alchemtest.
xiki-tempula marked this conversation as resolved.
Show resolved Hide resolved

If you want to **contribute a new test files** then please also read the
[Contributing new data sets](https://alchemtest.readthedocs.io/en/latest/contributing.html)
chapter in the documentation.


## Getting Started

* Make sure you have a [GitHub account](https://github.com/signup/free).
* [Fork](https://help.github.com/articles/fork-a-repo/) this repository on GitHub.
* On your local machine,
[clone](https://help.github.com/articles/cloning-a-repository/) your fork of
the repository.

## Making Changes

* Add some really awesome code to your local fork. It's usually a [good
idea](http://blog.jasonmeridth.com/posts/do-not-issue-pull-requests-from-your-master-branch/)
to make changes on a
[branch](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/)
with the branch name relating to the feature you are going to add.
* When you are ready for others to examine and comment on your new feature,
navigate to your fork of alchemtest on GitHub and open a [pull
request](https://help.github.com/articles/using-pull-requests/) (PR). Note that
after you launch a PR from one of your fork's branches, all
subsequent commits to that branch will be added to the open pull request
automatically. Each commit added to the PR will be validated for
mergability, compilation and test suite compliance; the results of these tests
will be visible on the PR page.
* If you're providing a new feature, you must add test cases and documentation.
* When the code is ready to go, make sure you run the test suite using pytest.
* When you're ready to be considered for merging, check the "Ready to go"
box on the PR page to let the alchemtest devs know that the changes are complete.
The code will not be merged until this box is checked, the continuous
integration returns checkmarks,
and multiple core developers give "Approved" reviews.

# Additional Resources

* [General GitHub documentation](https://help.github.com/)
* [PR best practices](http://codeinthehole.com/writing/pull-requests-and-other-good-practices-for-teams-using-github/)
* [A guide to contributing to software packages](http://www.contribution-guide.org)
* [Thinkful PR example](http://www.thinkful.com/learn/github-pull-request-tutorial/#Time-to-Submit-Your-First-PR)
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Description
Provide a brief description of the PR's purpose here.

## Todos
Notable points that this PR has either accomplished or will accomplish.
- [ ] TODO 1

## Questions
- [ ] Question1

## Status
- [ ] Ready to go
101 changes: 45 additions & 56 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,63 +24,52 @@ jobs:
strategy:
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
# Only test lowest and highest version on the expensive/slow
# macOS and windows runners (UPDATE when supported versions change):
exclude:
- os: macOS-latest
python-version: 3.8
- os: macOS-latest
python-version: 3.11
- os: windows-latest
python-version: 3.8
- os: windows-latest
python-version: 3.11
- os: macOS-latest
python-version: 3.10
- os: macOS-latest
python-version: 3.11
- os: windows-latest
python-version: 3.10
- os: windows-latest
python-version: 3.11

steps:
- uses: actions/checkout@v2

- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Display Python version
run: python -c "import sys; print(sys.version)"

- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a

- name: Install pytest, pytest plugins
run: |
python -m pip install wheel
python -m pip install pytest pytest-cov pytest-pep8

- name: Install package
run: |
python -m pip install .

- name: Run tests

# conda setup requires this special shell
shell: bash -l {0}

run: |
pytest -v --cov=alchemtest --cov-report=xml --color=yes src/alchemtest/tests

- name: CodeCov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
file: ./coverage.xml
flags: unittests
fail_ci_if_error: true

- uses: actions/checkout@v3

# More info on options: https://github.com/marketplace/actions/provision-with-micromamba
- uses: mamba-org/provision-with-micromamba@main
with:
environment-file: devtools/conda-envs/test_env.yaml
environment-name: test
channels: conda-forge,defaults
extra-specs: |
python=${{ matrix.python-version }}

- name: Install package
# conda setup requires this special shell
shell: bash -l {0}
run: |
python -m pip install . --no-deps
micromamba list

- name: Run tests
# conda setup requires this special shell
shell: bash -l {0}
run: |
pytest -v --cov=alchemtest --cov-report=xml --color=yes alchemtest/tests/

- name: CodeCov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
file: ./coverage.xml
flags: unittests
fail_ci_if_error: true

pypi_check:
name: Check source package integrity (for PyPi deployment)
Expand All @@ -97,12 +86,12 @@ jobs:

- name: Install tools
run: |
python -m pip install setuptools twine
python -m pip install twine build

- name: Build alchemtest source dist
run: |
python setup.py sdist
python -m build --sdist --wheel --outdir dist/

- name: Check package build sdist
run: |
DISTRIBUTION=$(ls -t1 dist/alchemtest-*.tar.gz | head -n 1)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: build
run: |
python -m build --sdist --wheel --outdir dist/

- name: publish_testpypi
# Upload to testpypi on every tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
Expand Down
117 changes: 111 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,111 @@
docs/_build
src/alchemtest.egg-info
*__pycache__*
.idea
*.DS_Store
build
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
.pytest_cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# profraw files from LLVM? Unclear exactly what triggers this
# There are reports this comes from LLVM profiling, but also Xcode 9.
*profraw

# In-tree generated files
*/_version.py
*/.DS_Store
*/.idea/
11 changes: 11 additions & 0 deletions .lgtm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Configure LGTM for this package

extraction:
python: # Configure Python
python_setup: # Configure the setup
version: 3 # Specify Version 3
path_classifiers:
library:
- devtools/*
generated:
- alchemtest/_version.py
Loading
Loading